From b118032096b3380de251b5de2466f5198fd2930a Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 10 Dec 2022 21:21:18 +0000 Subject: gentoo auto-resync : 10:12:2022 - 21:21:18 --- app-backup/Manifest.gz | Bin 8208 -> 8207 bytes app-backup/bareos/Manifest | 16 +- app-backup/bareos/bareos-20.0.8.ebuild | 393 ++++++++++++++++++++ app-backup/bareos/bareos-21.1.5-r1.ebuild | 401 +++++++++++++++++++++ app-backup/bareos/bareos-21.1.5.ebuild | 390 -------------------- .../bareos/files/bareos-20.0.2-cmake-gentoo.patch | 24 ++ app-backup/bareos/files/bareos-dir-21-r1.initd | 16 + app-backup/bareos/files/bareos-dir.initd | 34 +- app-backup/bareos/files/bareos-fd-21-r1.initd | 12 + app-backup/bareos/files/bareos-fd.initd | 16 +- app-backup/bareos/files/bareos-sd-21-r1.initd | 16 + app-backup/bareos/files/bareos-sd.initd | 34 +- app-backup/bareos/metadata.xml | 1 + 13 files changed, 905 insertions(+), 448 deletions(-) create mode 100644 app-backup/bareos/bareos-20.0.8.ebuild create mode 100644 app-backup/bareos/bareos-21.1.5-r1.ebuild delete mode 100644 app-backup/bareos/bareos-21.1.5.ebuild create mode 100644 app-backup/bareos/files/bareos-20.0.2-cmake-gentoo.patch create mode 100644 app-backup/bareos/files/bareos-dir-21-r1.initd create mode 100644 app-backup/bareos/files/bareos-fd-21-r1.initd create mode 100644 app-backup/bareos/files/bareos-sd-21-r1.initd (limited to 'app-backup') diff --git a/app-backup/Manifest.gz b/app-backup/Manifest.gz index e3a95d53923c..e63fdc587a8d 100644 Binary files a/app-backup/Manifest.gz and b/app-backup/Manifest.gz differ diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest index 03aad3ac6e6c..da3b4a09398c 100644 --- a/app-backup/bareos/Manifest +++ b/app-backup/bareos/Manifest @@ -1,25 +1,31 @@ +AUX bareos-20.0.2-cmake-gentoo.patch 1332 BLAKE2B b84158913e0bf051013681f8583546add34d48ea56647beb057525a0da1fff57dcd06c20dd125f300e34a42adb450c3a00456077de914dedf50b5a68748ef1ae SHA512 61e2b119d12daa60bf1fa0bc1de81d4322df421c6c5d2de4e823686f8a8657f521d53256533b52b17a105a25ef8070058144620d71aa295b491d2a39bc7de2f4 AUX bareos-21-cmake-gentoo.patch 694 BLAKE2B a01f469c1f61a5887dd75779c96fdebf666989c9ec203d478291bb58d8ae974e624c6d83977247f47fdc9cdcae0761552a2864e31ec26cbd64317610bc87613f SHA512 225afe4c2d9ee7774d34776071b8b8430c0a4c28e8a2b301fb5f3963ae4b02ea6f6020082d4bcc0ba937728cd57f77ba19fbc176f8f14c0dc28fa98135fb3c80 AUX bareos-21.1.2-no-automagic-ccache.patch 837 BLAKE2B 81eea4aa487c59e5514e64e26760d5eaee4b124a2a07e7dc4098adeb0d163dcaa2986c8044b5de9f681e35a8612c3e6a72e5843454e7565747daa536a3e55711 SHA512 1c3b2b9633e7436ce4f782956c9f1722057186a0537a3c4e1f8d78e1ffc8f1afa80c532a6f06ea45a301d4580bc695684a1281b544db376462b613bcb98b803b AUX bareos-21.1.2-werror.patch 785 BLAKE2B b29c00d57818a911251b1ca487372679140131eed7844188ea98b43f654901e88ea5a592bd77330160b2bf401bac8d9118c7989e2d44e8566e847e9625d9b0dc SHA512 b050b796e2f75192b39a7540f2d5a065b97899de2159d5fb9ca5eda19cc00cfeae392550267389c7f6f85ae9106e929117bb8a62be5106b16ad30184381cd4a6 +AUX bareos-dir-21-r1.initd 362 BLAKE2B ed28503db1f91f41f97cc0f9bf83c9f7686a79c6945e82577b7f290df516b6e7ac403023e3aab8c86ef67f67cb3a99bd699fb2d1d0534d53d164c0143cef0e2d SHA512 fc2f217020206ff43238444910555338133370fe423959ca1b5ed53704d371db9993b3a42fe5d9c2065b12ba5a853f6f216ee7418d446466c8f0175a54dc6210 AUX bareos-dir-21.confd 357 BLAKE2B 819a8c4bbf66a4a629128d3b23cc122fc340eb5672e406234d1a2960c30ed075989585e1e4801b2bde8f1edeca770d80b58e58bfcaeb45fa056afab4b610b013 SHA512 9858964a291ee9849e144f968a239758e3e6905bb5420717652114d8a583e3342e50f046efa41730f30cfc3f047b485251e93085fb13b327a6f2272d7c4c0309 AUX bareos-dir-21.initd 541 BLAKE2B 07ec7d342948da390f26a7dbc2209b351ef1f56ada775a37505bd1a0d5d241e2198fa160c1f42dd05609a4b708aca8675684846bcdc038cf1f35d6c46be26c14 SHA512 0d1e1fb9d69bd003b6c99b4c0120c14a4e8bb9c5c112649d299e672623241f98453278667e315c13a0ab0e93b1c17a3d7c2b8f59544c2d764e32c691a1986f3e AUX bareos-dir-21.service 884 BLAKE2B c0a4fb957588136cd043be2670a03e05bd5ffad4ae87275636642961e0e105ff07fb0614490a71771bb7eecfb551e6f860d8d41104e56ea8c5d434c84c5602a8 SHA512 187e331f8495d27d14434bd71baace7051d254e2886c3814493600973cd830cb01f27153321821e0a3bd2356d55f39cf0878488297079ed80bcfb2693cc77809 AUX bareos-dir.confd 640 BLAKE2B 0c80793f66ef9f3b46995a2dcf150b3d7a8a9f53ff97896887314ab31d6082949ac3db2c260b2fc7551c035183c31558cc853f768eca5b0bebdfa483280780b5 SHA512 af71699773ade63c98e2016f48b4d108f29a419a7533444245df4507a7ad7b807948986f9f850ce1f9af58fb445ecd44a5d880f68732b371a7a87dbc5a25ec7c -AUX bareos-dir.initd 869 BLAKE2B 80fec7cbe9b4f80f2f5b6152243ad7aa79760dc5198473515e5642ca29255f869d59b83465f87543e42ffc80ba0b3b277e437ff3446c005c5338350e1d04175f SHA512 ea54b7e569cfa69e6b2d996352dedd52487d1eb6f7776d970c3a9efa7e13f40d12b3b8d7388f035d5d84c2096c7644f5834495cc5b4084203e71b2bd0d833e8f +AUX bareos-dir.initd 681 BLAKE2B a9c73a8e71a318746fdf8ed5894266ced8003e8cc56fa25d2b9810656875299af61862cdd58ab00ba8a241d0f4ff63fa6356eaf4d776ef836a5f12e453d0a72d SHA512 95da6492201ea5bf1b9bacce1a9dd7b2a864af4775158cbdac48f6c6feba26dbca3ea252133c7279f2be8b8220c0f5810b9fa1dd5ef5727c8d83eca64134ce90 AUX bareos-dir.service 841 BLAKE2B e8c9508984f2823b334c3ef3c412f51e50666cd45aea1c5491a3ce6b1fadf09e7e0cb836d0658f5398209aa0a478c5a6b4fa1b67476e0fc317d6e25bc0fc54a8 SHA512 8f886d3c60959f009cf5f626f64071eb5d768ebf6c5ac0dd0c0c34d866d29563a2f0c68519363170ac35595cc743b432f46a54ce10bbfa530971f56b9914b0a9 +AUX bareos-fd-21-r1.initd 277 BLAKE2B 5a7472682a53dbd752be1c3f7fe4f5efcf8fc9400b92eab12824f9ae0a524e279010e05e9908db4522a955ee09cff72f34dfa6de9227fcb96c422a5eef6cebc1 SHA512 9828b8a296ca731d3dbc04380f728fff8831232c2ff04275760147b24d457aa518a43d5daf9cb808e84dbb9a100dc624eeb0fc73f1261060eae6e4d7264ce4c6 AUX bareos-fd-21.confd 208 BLAKE2B 9bf3a34ee07741bdc22aa96f931c46349f8e3fd3147d8afe009904d171af2aabc14472f6c6a3d241ad395aaa0a1b575f37e0734eb6b10474bdc636294b32ab09 SHA512 4bdf1e9d5f2f7a85efdf9aaaa0d35daadf83e766afeccdba69a94490a2e59c0b46fbbbdb1dcd5be389603ac5a196fe35c0fb389bc241eab0bf414c9ec432451f AUX bareos-fd-21.initd 506 BLAKE2B 227045c6aa333b0cb62fe5ac2154183ac928dd1c3249324fec627c94861a0fe57bf98c2ba5917848b58bebedb251699eccbf352b6da7802f3b0125f8201665b8 SHA512 cf0403ca8f3efb5cfb57915df9203ff16ed69a72d8d0bc189f5f221d36233127d9ed5c8391a46969b0de5943ff4717f52ffae9a5afa1ae24e27631bd1c58b438 AUX bareos-fd.confd 208 BLAKE2B a2c4692fd2736604ebd1f12d84f300bac8df46a08859ce61cca8417d2645f75bb14f24b5f4fcad70175b11d28a4c052116a1fe99028d634a2fe1fa89cf2c4313 SHA512 8134d37f9d74ced01e769c1a04461e0141cc88cc305441079d9e672d29083ff4ab329a2c36dd2bdc9b7f07204233ff1b6ebd72af2dcbb15af63759be9d0878bc -AUX bareos-fd.initd 472 BLAKE2B d377348a0a68a31b821299c46a549e82954e7f694c1b78051b619477eb0453326c2f902f66732b88d1e6c1e6f8ff9bba944f53528512d7f8d5683b37d7f50804 SHA512 0fcbed2d1702738f30e09e8705720b84f6d098e9d4a46b7d23d397d7edc04d03c34f35519eac56f559ce5d3bf3ab185357370e6f8d66d986ca80d1ddcf7ccf30 +AUX bareos-fd.initd 250 BLAKE2B 28d4f6b5ced14de5504bbb1594f72d10dbecfba81a754a2784087d6e544ef811160d711182bdb3efca9c5bc929dfa0781bc229059a8330800b587652d6748a60 SHA512 0005b20094f8e7d388455d73573243f46ba38f626d602b2b452e783a07fef66494a0bd1257d96748b4e9798f24d58788d824b2bf00fd1e13a0c2b44e415fc45e AUX bareos-fd.service 670 BLAKE2B b6a93c1ccc74d11c744783993ac68b31ec896e2bc7464fb7295677af86cd86a45c7bdae6c597c7eb2e9fb663a4757455b324260f96503e3d1632f9534b06048b SHA512 33304e148710f3ddb90d75e8803908646e43971e01ca590bb88f3ec03fd83c848123747a86c974ef4529eaadf77a31e24f833205bf810b0803cf0e46f846f5fa +AUX bareos-sd-21-r1.initd 361 BLAKE2B 86f1bdc7443e92f7cb2999f4300711ebb92dfbf7d6b59bbd30f67f606e03c04f406df644de446d95b3d1c8bd4a331de7fa44eb46533320d58c45b4d9cc3c951e SHA512 5c3d1b0386e7d904443b0d16e9205bb772e34160a9aa06644519bf9589fe6a17b744bcbf0571697cb0e1d34aceba34d2dd4a0d0112f74523691571fdcbeae76a AUX bareos-sd-21.confd 360 BLAKE2B 36a73a27a635ec1a4c3d1592e896ba85c3c7d6e91c3c0a2e5057194b6fde8eff6576794c00c0838f27c8165fbc2c65c77f6e2e9cc684fa6c1f978b56701618a3 SHA512 eb5d942edb45d349804c90eb0379cfabca765d63277b21feb4f1937ef8b655b6ba9feb3b671b61f582996ff4f9740614c197ae990c00879731ec43d6da8f4286 AUX bareos-sd-21.initd 512 BLAKE2B fec08730da8fad543bdae427296f9b942ed103be5a8c7fd9fd696537705e90a560a5e026b157e49833f27bfb00f4cc090ab1ffdb7e89f4a0bd59288e25b85f4f SHA512 407af1b90672959bee9206d3f241226e46a7c3091a79b91da70b6e5abb171f93dec53d5151713627096ec9fb81d0f7690a20bcf4c361abc8a018c6cc967db8b7 AUX bareos-sd.confd 360 BLAKE2B d965bf4cf1db59982b57ee0b848f9f7156d695a37d2a3b4cb339ce5ac4b27717db6d609a71b8e318fb297a6065c6ce0c20d6e18180a9d47843de5299a43ce6cd SHA512 4077174b5b49f425d53ec36bde039cee0dc55204c1127467c01bb57c58e6495e000b032f060c5ae6d757472934127776667a78238bcc28fbbe7a713d3da18039 -AUX bareos-sd.initd 855 BLAKE2B 40ca8e89b63e67f6fa4a4f60e735bd101ce0b1ad46be07b6df2d1524cd3f3e1f2540ce4b90095168499cab82306ed3d2d1c306c2b185e22632cbd5d18c6e8f4b SHA512 d45c33374da46e53b5828b4575087d00753f4aea3af6b641933f456f2bf5ba254894fc1fc1a6641ab6ae1c3f85bcd606500d6207e23a7070c78fd4e6aa666543 +AUX bareos-sd.initd 654 BLAKE2B 9cec4086c4ee0a5bbb2643a2e9179d09094281f6f93c99d1a3feeae5fff8a9ce1fdd259e09dce5f32c487209c87291d995d10b365d4f56dfbf1eb1aa245f919f SHA512 afb360c071118f72581d45c3db66a49e65c412d9aeb68e6b7d1dedc63b1b9cee4a81f9176d1ebfe800e284ba844d1f74bcfad69eec25d3dd41dcfc51832a7171 AUX bareos-sd.service 812 BLAKE2B 7ac9754d98ea177614450045fbbaf7406592b30a280646eacdf31271a0cafd63e88ac463b1d94143ccac96c289de3f88a177edab665f073e7c7692037ffedb68 SHA512 6a0fdb3af03e9f94e0d755a3286aff36b41ab1f00a82e9864f6d3de6931691f6aba79aeb7fc952cec039e4174b545f53c23e96fcfbaed71192877d201b3086ad AUX tmpfiles.d-bareos.conf 33 BLAKE2B 68feed7629dde0dad019470851cea33140be3b17186fbbee7ad6c6a591978236ec09252d890117030d8706d22ea02f9971063aa80a393d3726510128527401d0 SHA512 65d3f72e57eb3afc557ab6b56a8ec1895a679b904114fefd1c9d0ceeb6b9fa8413575591ed81e1ce6963bdaf34dad227e781865b39bb237afc6bb5652306d2ef +DIST bareos-20.0.8.tar.gz 13429247 BLAKE2B 5576cf738fccad0ac39f7c92e8da01f4925d58e4373c8bc19f68ddb8cc8d6a07bf73dfd39bd2111766ccd20ce2da224680b8ab9adf7b84421874ae916e633f75 SHA512 1da30d0ff2f1fda2c4a41ec6d41ec60e3212b1bdb153c7f397931580894f31e36ab84f655d263aed47b9eb21e68ef7e59ec3b7bbd4f2c8981ae04b84733ffb68 DIST bareos-21.1.2.tar.gz 11582588 BLAKE2B e7e02b3897d7e377cc79d9d0880da821f1b81d1f54891d89e704e78f51471cdf94b5a02ffe2f4ed54dec38bf37ccc757bf1641c3b678a04e401f48484ed3c941 SHA512 acdc787ff828add93c81b2b7d293dec90f2aa22aa3aee3002662bd30e88dc0dc58b753bb63ca7c111fac6c7eeea888938236c1169f92ed6cec27941036c7b6b1 DIST bareos-21.1.5.tar.gz 11655244 BLAKE2B 18ef42669cfdd7a663910fa1ce9b46f12eab0aa3a2106e9877dc3d341e9a7b309c21bc1768d4873d626938fcbb2084884a85d6dcef0aa2834b117aef1034d28f SHA512 637c6c0500ff31bb2c87f27d87f908d49836191afb880de4b636432b9c20433ec6f32f5805aaa7fb57f2f99a0201c51802c8d213ee5573642698f74da4cb06b7 +EBUILD bareos-20.0.8.ebuild 11419 BLAKE2B 7a54afd54134a4cdccdd15c1b7db9e474a510311129828134e4240722e7ecff9a25582c992eacb46fa6058ae362cb7577bda8c6884ead3cd97033a21170e076c SHA512 670a204964619a195dbd3cb084b6920946bc2d5ebbd0e3661dab6e25600bb8586ee3e40a8d90d5d695367a137eaacb6ce1ca9d72aebb70a78df1c7f2f26a07b9 EBUILD bareos-21.1.2.ebuild 10750 BLAKE2B df1d2161957fb5e4b455255fedff4b419725922ec3a402280e15dd1760ba15bd3dd338baff6d27356bc20537105eef4fbeb6c1d6322b50195dbd68025d0c714e SHA512 252a646c81647b2e9f4857d22f62dec518ceda2286f23217b237d77e2019c072cec7268ed4b66185c9300c9fe7bf360ff1acb626a751c5503677041b32f51371 -EBUILD bareos-21.1.5.ebuild 10773 BLAKE2B 70753edbbbf86d402862e1c70ad96e56f75b30ac3ba51c18556bd27f5ea5edbecd853325c54867787dce23543744d19ab026f6ba1f3f4e9079dd8fbce0f629d5 SHA512 672a9cdecb707fc373a7a5a33e4f90c7862538eef95a564a313e3a9ac434a9f34b1cb8b36f21d549379cd290e0185d5486ed3ff4c6eed3af1fa44db886a97b42 -MISC metadata.xml 1041 BLAKE2B e651303bb34815a8bc1a1f5a98a2f6de0bcd73029253d8fe5334cb62105efbc967e58aa800cb8744ba67b34c0568e599f0e803e519095b388e9837997ffdc2e0 SHA512 cbdcf34c7f4c03423c14973018a4af1e84eef97642f1ef2d5504a436ab25e322039455d0e6efcfea2b634cbcc1f53e3c9ddea2533d624c8c58c9dcb4f804a4d6 +EBUILD bareos-21.1.5-r1.ebuild 11203 BLAKE2B 8f0f611a00552d19d93d0e8766509b1bcd765dd88998d1f557dfecb75802aeeb4e1eb190910855acc50172dfb990cbc8fd30a77d9c2bbb027b1d4ff285e7db80 SHA512 024a38a313ad42eb2a94dd41497202e032ec75174676fafd039a64721f59657017407684cd54a4c7124383604102cbd8c65ab4397594d4489fea5f91f57b68e5 +MISC metadata.xml 1117 BLAKE2B c53e52cc72764097cf0e40ba5318e044d6f0dc8d852cae9bff5e7915062d75a75fb558c8dcdfb321fb42b204de0521c826394102bb8e312d0df874b19e7052ad SHA512 f2d8ac8e4d8f880b46a9535b709d1d0b0dbccf02e0f8ae0bb97bbe3ebf139f090951ad6e9f172804045928d0ed78ea602fdd378a91645e0faf2f4717b0096578 diff --git a/app-backup/bareos/bareos-20.0.8.ebuild b/app-backup/bareos/bareos-20.0.8.ebuild new file mode 100644 index 000000000000..df9da51888cc --- /dev/null +++ b/app-backup/bareos/bareos-20.0.8.ebuild @@ -0,0 +1,393 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} ) +CMAKE_WARN_UNUSED_CLI=no +#CMAKE_REMOVE_MODULES=yes + +inherit python-any-r1 systemd cmake tmpfiles + +DESCRIPTION="Featureful client/server network backup suite" +HOMEPAGE="https://www.bareos.org/" +SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" +RESTRICT="mirror" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="X acl ceph clientonly +director glusterfs ipv6 jansson lmdb + logwatch mysql ndmp +postgres readline scsi-crypto + sqlite static +storage-daemon systemd tcpd vim-syntax vmware xattr" + +# get cmake variables from core/cmake/BareosSetVariableDefaults.cmake +DEPEND=" + !app-backup/bacula + acct-group/${PN} + !x86? ( + ceph? ( sys-cluster/ceph ) + ) + glusterfs? ( sys-cluster/glusterfs ) + lmdb? ( dev-db/lmdb ) + dev-libs/gmp:0 + !clientonly? ( + acct-user/${PN} + postgres? ( dev-db/postgresql:*[threads] ) + mysql? ( virtual/mysql ) + sqlite? ( dev-db/sqlite:3 ) + director? ( + virtual/mta + jansson? ( dev-libs/jansson:= ) + ) + ) + logwatch? ( sys-apps/logwatch ) + ndmp? ( net-libs/rpcsvc-proto ) + tcpd? ( sys-apps/tcp-wrappers ) + readline? ( sys-libs/readline:0 ) + static? ( + acl? ( virtual/acl[static-libs] ) + sys-libs/zlib[static-libs] + dev-libs/lzo[static-libs] + sys-libs/ncurses:=[static-libs] + dev-libs/openssl:0=[static-libs] + ) + !static? ( + acl? ( virtual/acl ) + dev-libs/lzo + dev-libs/openssl:0= + sys-libs/ncurses:= + sys-libs/zlib + ) + " +RDEPEND="${DEPEND} + !clientonly? ( + storage-daemon? ( + sys-block/mtx + app-arch/mt-st + ) + ) + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) + " +BDEPEND="${PYTHON_DEPS}" + +REQUIRED_USE=" + !clientonly? ( || ( mysql postgres sqlite ) ) + static? ( clientonly ) + x86? ( !ceph ) +" + +S=${WORKDIR}/${PN}-Release-${PV} + +src_prepare() { + use mysql && export mydbtypes+=( mysql ) + use postgres && export mydbtypes+=( postgresql ) + use sqlite && export mydbtypes+=( sqlite ) + + # enables default database driver in catalog + pushd core/src/defaultconfigs >&/dev/null || die + sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE_WITH_DATABASE_DRIVER_XXX/d' $(grep -rl XXX_REPLACE_WITH_DATABASE_DRIVER_XXX) \ + || die "sed on MyCatalog.conf.in failed" + popd >&/dev/null || die + + # fix gentoo platform support + eapply -p1 "${FILESDIR}/${PN}-20.0.2-cmake-gentoo.patch" + + # fix missing DESTDIR in symlink creation + sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt" + + # disable dird and stored plugins, because of + # py2 dependency + cd "${S}/core/src/plugins" + cmake_comment_add_subdirectory dird + cmake_comment_add_subdirectory stored + cd - + + CMAKE_USE_DIR="$S/core" + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=() + + CMAKE_USE_DIR="$S/core" + + pushd core/platforms >&/dev/null || die + cmake_comment_add_subdirectory '${DISTNAME}' + popd >&/dev/null || die + + if use clientonly; then + mycmakeargs+=( + -Dclient-only=ON + -Dstatic-cons=$(usex static) + -Dstatic-fd=$(usex static) + ) + fi + + for useflag in acl ipv6 ndmp scsi-crypto \ + systemd mysql lmdb; do + mycmakeargs+=( -D$useflag=$(usex $useflag) ) + done + + mycmakeargs+=( + -DHAVE_PYTHON=0 + -DDEFAULT_DB_TYPE=${mydbtypes[0]} + -Darchivedir=/var/lib/bareos/storage + -Dbackenddir=/usr/$(get_libdir)/${PN}/backend + -Dbasename="`hostname -s`" + -Dbatch-insert=yes + -Dbsrdir=/var/lib/bareos/bsr + -Dconfdir=/etc/bareos + -Dcoverage=no + -Ddb_password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` + -Ddir-group=bareos + -Ddir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Ddir-user=bareos + -Ddocdir=/usr/share/doc/${PF} + -Ddynamic-cats-backends=yes + -Ddynamic-storage-backends=yes + -Dfd-group=bareos + -Dfd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dfd-user=root + -Dhost=${CHOST} + -Dhostname="`hostname -s`" + -Dhtmldir=/usr/share/doc/${PF}/html + -Dlibdir=/usr/$(get_libdir) + -Dlogdir=/var/log/bareos + -Dmandir=/usr/share/man + -Dmon-dir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dmon-fd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dmon-sd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dmysql=$(usex mysql) + -Dopenssl=yes + -Dpiddir=/run/bareos + -Dplugindir=/usr/$(get_libdir)/${PN}/plugin + -Dpostgresql=$(usex postgres) + -Dsbin-perm=0755 + -Dsbindir=/usr/sbin + -Dscriptdir=/usr/libexec/bareos + -Dsd-group=bareos + -Dsd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dsd-user=root + -Dsqlite3=$(usex sqlite) + -Dsubsysdir=/run/lock/subsys + -Dsysconfdir=/etc + -Dworkingdir=/var/lib/bareos + -Dx=$(usex X) + ) + + # disable droplet support for now as it does not build with gcc 10 + # ... and this is a bundled lib, which should have its own package + cd core && cmake_comment_add_subdirectory "src/droplet" + + cmake_src_configure +} + +src_install() { + cmake_src_install + + # remove some scripts we don't need at all + rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql} + rm -f "${D}"/usr/sbin/bareos + + # remove upstream init scripts and systemd units + rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service + + # remove misc stuff we do not need in production + rm -f "${D}"/etc/bareos/bareos-regress.conf + rm -f "${D}"/etc/logrotate.d/bareos-dir + + # get rid of py2 stuff + rm -rf "$D"/usr/lib64/python2.7 + rm -f "$D"/usr/lib64/bareos/plugin/python-fd.so + if ! use vmware; then + rm -f "$D"/usr/lib64/bareos/plugin/{BareosFdPluginVMware.py,bareos-fd-vmware.py} + fi + + # rename statically linked apps + if use clientonly && use static ; then + pushd "${D}"/usr/sbin || die + mv static-bareos-fd bareos-fd || die + mv static-bconsole bconsole || die + popd || die + fi + + # extra files which 'make install' doesn't cover + if ! use clientonly; then + # the logrotate configuration + # (now unconditional wrt bug #258187) + diropts -m0755 + insinto /etc/logrotate.d + insopts -m0644 + newins "${S}"/core/scripts/logrotate bareos + + # the logwatch scripts + if use logwatch; then + diropts -m0750 + dodir /etc/log.d/scripts/services + dodir /etc/log.d/scripts/shared + dodir /etc/log.d/conf/logfiles + dodir /etc/log.d/conf/services + pushd "${S}"/core/scripts/logwatch >&/dev/null || die + + into /etc/log.d/scripts/services + dobin bareos + + into /etc/log.d/scripts/shared + dobin applybareosdate + + insinto /etc/log.d/conf/logfiles + newins logfile.bareos.conf bareos.conf + + insinto /etc/log.d/conf/services + newins services.bareos.conf bareos.conf + + popd >&/dev/null || die + fi + fi + + rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* + if use clientonly || ! use director; then + rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* + rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* + rm -vf "${D}"/usr/share/man/man1/bsmtp.1* + rm -vf "${D}"/usr/share/man/man8/bwild.8* + rm -vf "${D}"/usr/share/man/man8/bregex.8* + rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* + rm -vf "${D}"/usr/libexec/bareos/create_*_database + rm -vf "${D}"/usr/libexec/bareos/drop_*_database + rm -vf "${D}"/usr/libexec/bareos/make_*_tables + rm -vf "${D}"/usr/libexec/bareos/update_*_tables + rm -vf "${D}"/usr/libexec/bareos/drop_*_tables + rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges + rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup + fi + if use clientonly || ! use storage-daemon; then + rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* + rm -vf "${D}"/usr/share/man/man8/bcopy.8* + rm -vf "${D}"/usr/share/man/man8/bextract.8* + rm -vf "${D}"/usr/share/man/man8/bls.8* + rm -vf "${D}"/usr/share/man/man8/bscan.8* + rm -vf "${D}"/usr/share/man/man8/btape.8* + rm -vf "${D}"/usr/libexec/bareos/disk-changer + rm -vf "${D}"/usr/libexec/bareos/mtx-changer + rm -vf "${D}"/usr/libexec/bareos/dvd-handler + rm -vf "${D}"/etc/bareos/mtx-changer.conf + fi + if ! use scsi-crypto; then + rm -vf "${D}"/usr/share/man/man8/bscrypto.8* + fi + + # documentation + dodoc README.md + dodoc core/README.configsubdirectories + use glusterfs dodoc core/README.glusterfs + use ndmp && dodoc core/README.NDMP + use scsi-crypto && dodoc core/README.scsicrypto + + # vim-files + if use vim-syntax; then + insinto /usr/share/vim/vimfiles/syntax + doins core/scripts/bareos.vim + insinto /usr/share/vim/vimfiles/ftdetect + newins core/scripts/filetype.vim bareos_ft.vim + fi + + # setup init scripts + myscripts="bareos-fd" + if ! use clientonly; then + if use director; then + myscripts+=" bareos-dir" + fi + if use storage-daemon; then + myscripts+=" bareos-sd" + fi + fi + for script in ${myscripts}; do + # copy over init script and config to a temporary location + # so we can modify them as needed + cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" + cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" + + # now set the database dependency for the director init script + case "${script}" in + bareos-dir) + sed -i -e "s:%databasetypes%:${mydbtypes[*]}:" "${T}/${script}".confd || die + ;; + *) + ;; + esac + + # install init script and config + newinitd "${T}/${script}".initd "${script}" + newconfd "${T}/${script}".confd "${script}" + done + + # install systemd unit files + if use systemd; then + if ! use clientonly; then + use director && systemd_dounit "${FILESDIR}"/bareos-dir.service + use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service + fi + systemd_dounit "${FILESDIR}"/bareos-fd.service + fi + + # make sure the working directory exists + diropts -m0750 + keepdir /var/lib/bareos + keepdir /var/lib/bareos/storage + + diropts -m0755 -o bareos -g bareos + keepdir /var/log/bareos + + newtmpfiles "${FILESDIR}"/tmpfiles.d-bareos.conf bareos.conf + + # make sure bareos group can execute bareos libexec scripts + fowners -R root:bareos /usr/libexec/bareos +} + +pkg_postinst() { + tmpfiles_process bareos.conf + + if use clientonly; then + fowners root:bareos /var/lib/bareos + else + fowners bareos:bareos /var/lib/bareos + fi + + if ! use clientonly && use director; then + einfo + einfo "If this is a new install, you must create the database:" + if use postgres; then + einfo + einfo "For postgresql:" + einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" + einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" + einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" + fi + if use mysql; then + einfo + einfo "For mysql:" + einfo + einfo " Make sure root has direct access to your mysql server. You may want to" + einfo " create a /root/.my.cnf file with" + einfo " [client]" + einfo " user=root" + einfo " password=YourPasswordForAccessingMysqlAsRoot" + einfo " before running:" + einfo " /usr/libexec/bareos/create_bareos_database mysql" + einfo " /usr/libexec/bareos/make_bareos_tables mysql" + einfo " /usr/libexec/bareos/grant_bareos_privileges mysql" + fi + einfo + fi + + if use sqlite; then + einfo + einfo "Be aware that Bareos does not officially support SQLite database." + einfo "Best use it only for a client-only installation. See Bug #445540." + einfo + einfo "It is strongly recommended to use either postgresql or mysql as" + einfo "catalog database backend." + fi +} diff --git a/app-backup/bareos/bareos-21.1.5-r1.ebuild b/app-backup/bareos/bareos-21.1.5-r1.ebuild new file mode 100644 index 000000000000..1652a021f7bc --- /dev/null +++ b/app-backup/bareos/bareos-21.1.5-r1.ebuild @@ -0,0 +1,401 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..11} ) +CMAKE_WARN_UNUSED_CLI=no +#CMAKE_REMOVE_MODULES=yes + +inherit python-any-r1 systemd cmake tmpfiles + +DESCRIPTION="Featureful client/server network backup suite" +HOMEPAGE="https://www.bareos.org/" +SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" + +# some tests still fail propably due to missing bits in src_test -> TODO +RESTRICT="mirror test" +#RESTRICT=" +# mirror +# !test? ( test ) +#" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="X acl ceph clientonly +director glusterfs ipv6 lmdb + logwatch ndmp readline scsi-crypto + static +storage-daemon systemd tcpd test vim-syntax vmware xattr" + +# get cmake variables from core/cmake/BareosSetVariableDefaults.cmake +DEPEND=" + !app-backup/bacula + acct-group/${PN} + !x86? ( + ceph? ( sys-cluster/ceph ) + ) + glusterfs? ( sys-cluster/glusterfs ) + lmdb? ( dev-db/lmdb ) + dev-libs/gmp:0 + !clientonly? ( + acct-user/${PN} + dev-db/postgresql:*[threads] + director? ( + virtual/mta + ) + ) + logwatch? ( sys-apps/logwatch ) + ndmp? ( net-libs/rpcsvc-proto ) + tcpd? ( sys-apps/tcp-wrappers ) + readline? ( sys-libs/readline:0 ) + static? ( + acl? ( virtual/acl[static-libs] ) + dev-libs/jansson:=[static-libs] + dev-libs/lzo[static-libs] + dev-libs/openssl:0=[static-libs] + sys-libs/ncurses:=[static-libs] + sys-libs/zlib[static-libs] + ) + !static? ( + acl? ( virtual/acl ) + dev-libs/jansson:= + dev-libs/lzo + dev-libs/openssl:0= + sys-libs/ncurses:= + sys-libs/zlib + ) + " +RDEPEND="${DEPEND} + !clientonly? ( + storage-daemon? ( + sys-block/mtx + app-arch/mt-st + ) + ) + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) + " + +BDEPEND=" + ${PYTHON_DEPS} + test? ( + dev-cpp/gtest + dev-db/postgresql:*[server,threads] + dev-db/mariadb:*[server] + ) +" + +REQUIRED_USE=" + static? ( clientonly ) + x86? ( !ceph ) +" + +S=${WORKDIR}/${PN}-Release-${PV} + +pkg_pretend() { + local active_removed_backend="" + if has_version "=21.0.0 you need to migrate to PostgreSQL" + ewarn "catalog backend using the 'bareos-dbcopy' tool of your current" + ewarn "installation first." + ewarn + die "current catalog backend not supported anymore" + fi +} + +src_test() { + # initialze catalog test database + initdb -D "${T}"/pgsql || die + pg_ctl -w -D "${T}"/pgsql start \ + -o "-h '' -k '${T}'" || die + createuser -h "${T}" bareos || die + createdb -h "${T}" --owner bareos bareos || die + export PGHOST="${T}" + + # initiale mariadb database for backup tests + # $USER must be set and != root + export USER=portage + + default + cmake_src_test + + pg_ctl -w -D "${T}"/pgsql stop || die + rm -rvf "${T}"/pgsql +} + +src_prepare() { + # fix gentoo platform support + eapply -p1 "${FILESDIR}/${PN}-21-cmake-gentoo.patch" + eapply "${FILESDIR}/${PN}-21.1.2-werror.patch" + eapply "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.patch" + + # fix missing DESTDIR in symlink creation + sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt" + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=() + + cmake_comment_add_subdirectory webui + + if use clientonly; then + mycmakeargs+=( + -Dclient-only=ON + -Dstatic-cons=$(usex static) + -Dstatic-fd=$(usex static) + ) + fi + + for useflag in acl ipv6 ndmp scsi-crypto \ + systemd lmdb; do + mycmakeargs+=( -D$useflag=$(usex $useflag) ) + done + + mycmakeargs+=( + -DHAVE_PYTHON=0 + -Darchivedir=/var/lib/bareos/storage + -Dbackenddir=/usr/$(get_libdir)/${PN}/backend + -Dbasename="`hostname -s`" + -Dbatch-insert=yes + -Dbsrdir=/var/lib/bareos/bsr + -Dconfdir=/etc/bareos + -Dcoverage=no + -Ddb_password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` + -Ddir-group=bareos + -Ddir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Ddir-user=bareos + -Ddocdir=/usr/share/doc/${PF} + -Ddynamic-cats-backends=yes + -Ddynamic-storage-backends=yes + -Dfd-group=bareos + -Dfd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dfd-user=root + -Dhost=${CHOST} + -Dhostname="`hostname -s`" + -Dhtmldir=/usr/share/doc/${PF}/html + -Dlibdir=/usr/$(get_libdir) + -Dlogdir=/var/log/bareos + -Dmandir=/usr/share/man + -Dmon-dir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dmon-fd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dmon-sd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dopenssl=yes + -Dpiddir=/run/bareos + -Dplugindir=/usr/$(get_libdir)/${PN}/plugin + -Dsbin-perm=0755 + -Dsbindir=/usr/sbin + -Dscriptdir=/usr/libexec/bareos + -Dsd-group=bareos + -Dsd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dsd-user=root + -Dsubsysdir=/run/lock/subsys + -Dsysconfdir=/etc + -Dworkingdir=/var/lib/bareos + -Dx=$(usex X) + ) + + # disable droplet support for now as it does not build with gcc 10 + # ... and this is a bundled lib, which should have its own package + cd core && cmake_comment_add_subdirectory "src/droplet" + + cmake_src_configure +} + +src_install() { + cmake_src_install + + # remove some scripts we don't need at all + rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd} + rm -f "${D}"/usr/sbin/bareos + + # remove upstream init scripts and systemd units + rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service + + # remove misc stuff we do not need in production + rm -f "${D}"/etc/bareos/bareos-regress.conf + rm -f "${D}"/etc/logrotate.d/bareos-dir + + # get rid of py2 stuff + rm -rf "$D"/usr/lib64/python2.7 || die + rm -f "$D"/usr/lib64/bareos/plugin/python-fd.so || die + if ! use vmware; then + rm -f "$D"/usr/lib64/bareos/plugin/{BareosFdPluginVMware.py,bareos-fd-vmware.py} + fi + + # rename statically linked apps + if use clientonly && use static ; then + pushd "${D}"/usr/sbin || die + mv static-bareos-fd bareos-fd || die + mv static-bconsole bconsole || die + popd || die + fi + + # extra files which 'make install' doesn't cover + if ! use clientonly; then + # the logrotate configuration + # (now unconditional wrt bug #258187) + diropts -m0755 + insinto /etc/logrotate.d + insopts -m0644 + newins "${S}"/core/scripts/logrotate bareos + + # the logwatch scripts + if use logwatch; then + diropts -m0750 + dodir /etc/log.d/scripts/services + dodir /etc/log.d/scripts/shared + dodir /etc/log.d/conf/logfiles + dodir /etc/log.d/conf/services + pushd "${S}"/core/scripts/logwatch >&/dev/null || die + + into /etc/log.d/scripts/services + dobin bareos + + into /etc/log.d/scripts/shared + dobin applybareosdate + + insinto /etc/log.d/conf/logfiles + newins logfile.bareos.conf bareos.conf + + insinto /etc/log.d/conf/services + newins services.bareos.conf bareos.conf + + popd >&/dev/null || die + fi + fi + + rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* + if use clientonly || ! use director; then + rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* + rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* + rm -vf "${D}"/usr/share/man/man1/bsmtp.1* + rm -vf "${D}"/usr/share/man/man8/bwild.8* + rm -vf "${D}"/usr/share/man/man8/bregex.8* + rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* + rm -vf "${D}"/usr/libexec/bareos/create_*_database + rm -vf "${D}"/usr/libexec/bareos/drop_*_database + rm -vf "${D}"/usr/libexec/bareos/make_*_tables + rm -vf "${D}"/usr/libexec/bareos/update_*_tables + rm -vf "${D}"/usr/libexec/bareos/drop_*_tables + rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges + rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup + fi + if use clientonly || ! use storage-daemon; then + rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* + rm -vf "${D}"/usr/share/man/man8/bcopy.8* + rm -vf "${D}"/usr/share/man/man8/bextract.8* + rm -vf "${D}"/usr/share/man/man8/bls.8* + rm -vf "${D}"/usr/share/man/man8/bscan.8* + rm -vf "${D}"/usr/share/man/man8/btape.8* + rm -vf "${D}"/usr/libexec/bareos/disk-changer + rm -vf "${D}"/usr/libexec/bareos/mtx-changer + rm -vf "${D}"/usr/libexec/bareos/dvd-handler + rm -vf "${D}"/etc/bareos/mtx-changer.conf + fi + if ! use scsi-crypto; then + rm -vf "${D}"/usr/share/man/man8/bscrypto.8* + fi + + # documentation + dodoc README.md + dodoc core/README.configsubdirectories + use glusterfs dodoc core/README.glusterfs + use ndmp && dodoc core/README.NDMP + use scsi-crypto && dodoc core/README.scsicrypto + + # vim-files + if use vim-syntax; then + insinto /usr/share/vim/vimfiles/syntax + doins core/scripts/bareos.vim + insinto /usr/share/vim/vimfiles/ftdetect + newins core/scripts/filetype.vim bareos_ft.vim + fi + + # setup init scripts + myscripts="bareos-fd" + if ! use clientonly; then + if use director; then + myscripts+=" bareos-dir" + fi + if use storage-daemon; then + myscripts+=" bareos-sd" + fi + fi + for script in ${myscripts}; do + # install init script and config + newinitd "${FILESDIR}/${script}-21-r1".initd "${script}" + newconfd "${FILESDIR}/${script}-21".confd "${script}" + done + + # install systemd unit files + if use systemd; then + if ! use clientonly; then + use director && systemd_newunit "${FILESDIR}"/bareos-dir-21.service bareos-dir.service + use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service + fi + systemd_dounit "${FILESDIR}"/bareos-fd.service + fi + + # make sure the working directory exists + diropts -m0750 + keepdir /var/lib/bareos + keepdir /var/lib/bareos/storage + + diropts -m0755 -o bareos -g bareos + keepdir /var/log/bareos + + newtmpfiles "${FILESDIR}"/tmpfiles.d-bareos.conf bareos.conf + + # make sure bareos group can execute bareos libexec scripts + fowners -R root:bareos /usr/libexec/bareos +} + +pkg_postinst() { + tmpfiles_process bareos.conf + + if use clientonly; then + fowners root:bareos /var/lib/bareos + else + fowners bareos:bareos /var/lib/bareos + fi + + if ! use clientonly && use director; then + einfo + einfo "If this is a new install, you must create the database:" + einfo + einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database'" + einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables'" + einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges'" + einfo + einfo "or run" + einfo + einfo " emerge --config app-backup/bareos" + einfo + einfo "to do this" + fi +} + +pkg_config() { + su postgres -c '/usr/libexec/bareos/create_bareos_database' || die "could not create bareos database" + su postgres -c '/usr/libexec/bareos/make_bareos_tables' || die "could not create bareos database tables" + su postgres -c '/usr/libexec/bareos/grant_bareos_privileges' || die "could not grant bareos database privileges" +} diff --git a/app-backup/bareos/bareos-21.1.5.ebuild b/app-backup/bareos/bareos-21.1.5.ebuild deleted file mode 100644 index 19bc1b11ce54..000000000000 --- a/app-backup/bareos/bareos-21.1.5.ebuild +++ /dev/null @@ -1,390 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8..11} ) -CMAKE_WARN_UNUSED_CLI=no -#CMAKE_REMOVE_MODULES=yes - -inherit python-any-r1 systemd cmake tmpfiles - -DESCRIPTION="Featureful client/server network backup suite" -HOMEPAGE="https://www.bareos.org/" -SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" - -# some tests still fail propably due to missing bits in src_test -> TODO -RESTRICT="mirror test" -#RESTRICT=" -# mirror -# !test? ( test ) -#" - -LICENSE="AGPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="X acl ceph clientonly +director glusterfs ipv6 lmdb - logwatch ndmp readline scsi-crypto - static +storage-daemon systemd tcpd test vim-syntax vmware xattr" - -# get cmake variables from core/cmake/BareosSetVariableDefaults.cmake -DEPEND=" - !app-backup/bacula - acct-group/${PN} - !x86? ( - ceph? ( sys-cluster/ceph ) - ) - glusterfs? ( sys-cluster/glusterfs ) - lmdb? ( dev-db/lmdb ) - dev-libs/gmp:0 - !clientonly? ( - acct-user/${PN} - dev-db/postgresql:*[threads] - director? ( - virtual/mta - ) - ) - logwatch? ( sys-apps/logwatch ) - ndmp? ( net-libs/rpcsvc-proto ) - tcpd? ( sys-apps/tcp-wrappers ) - readline? ( sys-libs/readline:0 ) - static? ( - acl? ( virtual/acl[static-libs] ) - dev-libs/jansson:=[static-libs] - dev-libs/lzo[static-libs] - dev-libs/openssl:0=[static-libs] - sys-libs/ncurses:=[static-libs] - sys-libs/zlib[static-libs] - ) - !static? ( - acl? ( virtual/acl ) - dev-libs/jansson:= - dev-libs/lzo - dev-libs/openssl:0= - sys-libs/ncurses:= - sys-libs/zlib - ) - " -RDEPEND="${DEPEND} - !clientonly? ( - storage-daemon? ( - sys-block/mtx - app-arch/mt-st - ) - ) - vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) - " - -BDEPEND=" - ${PYTHON_DEPS} - test? ( - dev-cpp/gtest - dev-db/postgresql:*[server,threads] - dev-db/mariadb:*[server] - ) -" - -REQUIRED_USE=" - static? ( clientonly ) - x86? ( !ceph ) -" - -S=${WORKDIR}/${PN}-Release-${PV} - -pkg_pretend() { - local active_removed_backend="" - if has_version "=21.0.0 you need to migrate to PostgreSQL" - ewarn "catalog backend using the 'bareos-dbcopy' tool of your current" - ewarn "installation first." - ewarn - die "current catalog backend not supported anymore" - fi -} - -src_test() { - # initialze catalog test database - initdb -D "${T}"/pgsql || die - pg_ctl -w -D "${T}"/pgsql start \ - -o "-h '' -k '${T}'" || die - createuser -h "${T}" bareos || die - createdb -h "${T}" --owner bareos bareos || die - export PGHOST="${T}" - - # initiale mariadb database for backup tests - # $USER must be set and != root - export USER=portage - - default - cmake_src_test - - pg_ctl -w -D "${T}"/pgsql stop || die - rm -rvf "${T}"/pgsql -} - -src_prepare() { - # fix gentoo platform support - eapply -p1 "${FILESDIR}/${PN}-21-cmake-gentoo.patch" - eapply "${FILESDIR}/${PN}-21.1.2-werror.patch" - eapply "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.patch" - - # fix missing DESTDIR in symlink creation - sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt" - - cmake_src_prepare -} - -src_configure() { - local mycmakeargs=() - - cmake_comment_add_subdirectory webui - - if use clientonly; then - mycmakeargs+=( - -Dclient-only=ON - -Dstatic-cons=$(usex static) - -Dstatic-fd=$(usex static) - ) - fi - - for useflag in acl ipv6 ndmp scsi-crypto \ - systemd lmdb; do - mycmakeargs+=( -D$useflag=$(usex $useflag) ) - done - - mycmakeargs+=( - -DHAVE_PYTHON=0 - -Darchivedir=/var/lib/bareos/storage - -Dbackenddir=/usr/$(get_libdir)/${PN}/backend - -Dbasename="`hostname -s`" - -Dbatch-insert=yes - -Dbsrdir=/var/lib/bareos/bsr - -Dconfdir=/etc/bareos - -Dcoverage=no - -Ddb_password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` - -Ddir-group=bareos - -Ddir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Ddir-user=bareos - -Ddocdir=/usr/share/doc/${PF} - -Ddynamic-cats-backends=yes - -Ddynamic-storage-backends=yes - -Dfd-group=bareos - -Dfd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dfd-user=root - -Dhost=${CHOST} - -Dhostname="`hostname -s`" - -Dhtmldir=/usr/share/doc/${PF}/html - -Dlibdir=/usr/$(get_libdir) - -Dlogdir=/var/log/bareos - -Dmandir=/usr/share/man - -Dmon-dir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dmon-fd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dmon-sd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dopenssl=yes - -Dpiddir=/run/bareos - -Dplugindir=/usr/$(get_libdir)/${PN}/plugin - -Dsbin-perm=0755 - -Dsbindir=/usr/sbin - -Dscriptdir=/usr/libexec/bareos - -Dsd-group=bareos - -Dsd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dsd-user=root - -Dsubsysdir=/run/lock/subsys - -Dsysconfdir=/etc - -Dworkingdir=/var/lib/bareos - -Dx=$(usex X) - ) - - # disable droplet support for now as it does not build with gcc 10 - # ... and this is a bundled lib, which should have its own package - cd core && cmake_comment_add_subdirectory "src/droplet" - - cmake_src_configure -} - -src_install() { - cmake_src_install - - # remove some scripts we don't need at all - rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd} - rm -f "${D}"/usr/sbin/bareos - - # remove upstream init scripts and systemd units - rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service - - # remove misc stuff we do not need in production - rm -f "${D}"/etc/bareos/bareos-regress.conf - rm -f "${D}"/etc/logrotate.d/bareos-dir - - # get rid of py2 stuff - rm -rf "$D"/usr/lib64/python2.7 || die - rm -f "$D"/usr/lib64/bareos/plugin/python-fd.so || die - if ! use vmware; then - rm -f "$D"/usr/lib64/bareos/plugin/{BareosFdPluginVMware.py,bareos-fd-vmware.py} - fi - - # rename statically linked apps - if use clientonly && use static ; then - pushd "${D}"/usr/sbin || die - mv static-bareos-fd bareos-fd || die - mv static-bconsole bconsole || die - popd || die - fi - - # extra files which 'make install' doesn't cover - if ! use clientonly; then - # the logrotate configuration - # (now unconditional wrt bug #258187) - diropts -m0755 - insinto /etc/logrotate.d - insopts -m0644 - newins "${S}"/core/scripts/logrotate bareos - - # the logwatch scripts - if use logwatch; then - diropts -m0750 - dodir /etc/log.d/scripts/services - dodir /etc/log.d/scripts/shared - dodir /etc/log.d/conf/logfiles - dodir /etc/log.d/conf/services - pushd "${S}"/core/scripts/logwatch >&/dev/null || die - - into /etc/log.d/scripts/services - dobin bareos - - into /etc/log.d/scripts/shared - dobin applybareosdate - - insinto /etc/log.d/conf/logfiles - newins logfile.bareos.conf bareos.conf - - insinto /etc/log.d/conf/services - newins services.bareos.conf bareos.conf - - popd >&/dev/null || die - fi - fi - - rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* - if use clientonly || ! use director; then - rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* - rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* - rm -vf "${D}"/usr/share/man/man1/bsmtp.1* - rm -vf "${D}"/usr/share/man/man8/bwild.8* - rm -vf "${D}"/usr/share/man/man8/bregex.8* - rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* - rm -vf "${D}"/usr/libexec/bareos/create_*_database - rm -vf "${D}"/usr/libexec/bareos/drop_*_database - rm -vf "${D}"/usr/libexec/bareos/make_*_tables - rm -vf "${D}"/usr/libexec/bareos/update_*_tables - rm -vf "${D}"/usr/libexec/bareos/drop_*_tables - rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges - rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup - fi - if use clientonly || ! use storage-daemon; then - rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* - rm -vf "${D}"/usr/share/man/man8/bcopy.8* - rm -vf "${D}"/usr/share/man/man8/bextract.8* - rm -vf "${D}"/usr/share/man/man8/bls.8* - rm -vf "${D}"/usr/share/man/man8/bscan.8* - rm -vf "${D}"/usr/share/man/man8/btape.8* - rm -vf "${D}"/usr/libexec/bareos/disk-changer - rm -vf "${D}"/usr/libexec/bareos/mtx-changer - rm -vf "${D}"/usr/libexec/bareos/dvd-handler - rm -vf "${D}"/etc/bareos/mtx-changer.conf - fi - if ! use scsi-crypto; then - rm -vf "${D}"/usr/share/man/man8/bscrypto.8* - fi - - # documentation - dodoc README.md - dodoc core/README.configsubdirectories - use glusterfs dodoc core/README.glusterfs - use ndmp && dodoc core/README.NDMP - use scsi-crypto && dodoc core/README.scsicrypto - - # vim-files - if use vim-syntax; then - insinto /usr/share/vim/vimfiles/syntax - doins core/scripts/bareos.vim - insinto /usr/share/vim/vimfiles/ftdetect - newins core/scripts/filetype.vim bareos_ft.vim - fi - - # setup init scripts - myscripts="bareos-fd" - if ! use clientonly; then - if use director; then - myscripts+=" bareos-dir" - fi - if use storage-daemon; then - myscripts+=" bareos-sd" - fi - fi - for script in ${myscripts}; do - # install init script and config - newinitd "${FILESDIR}/${script}-21".initd "${script}" - newconfd "${FILESDIR}/${script}-21".confd "${script}" - done - - # install systemd unit files - if use systemd; then - if ! use clientonly; then - use director && systemd_newunit "${FILESDIR}"/bareos-dir-21.service bareos-dir.service - use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service - fi - systemd_dounit "${FILESDIR}"/bareos-fd.service - fi - - # make sure the working directory exists - diropts -m0750 - keepdir /var/lib/bareos - keepdir /var/lib/bareos/storage - - diropts -m0755 - keepdir /var/log/bareos - - newtmpfiles "${FILESDIR}"/tmpfiles.d-bareos.conf bareos.conf - - # make sure bareos group can execute bareos libexec scripts - fowners -R root:bareos /usr/libexec/bareos -} - -pkg_postinst() { - tmpfiles_process bareos.conf - - if use clientonly; then - fowners root:bareos /var/lib/bareos - else - fowners bareos:bareos /var/lib/bareos - fi - - if ! use clientonly && use director; then - einfo - einfo "If this is a new install, you must create the database:" - einfo - einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" - einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" - einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" - einfo - fi -} diff --git a/app-backup/bareos/files/bareos-20.0.2-cmake-gentoo.patch b/app-backup/bareos/files/bareos-20.0.2-cmake-gentoo.patch new file mode 100644 index 000000000000..9d3cf8092e1c --- /dev/null +++ b/app-backup/bareos/files/bareos-20.0.2-cmake-gentoo.patch @@ -0,0 +1,24 @@ +diff -urw bareos-Release-20.0.2.orig/core/cmake/distname.sh bareos-Release-20.0.2/core/cmake/distname.sh +--- bareos-Release-20.0.2.orig/core/cmake/distname.sh 2021-06-10 06:07:18.000000000 -0930 ++++ bareos-Release-20.0.2/core/cmake/distname.sh 2021-08-15 17:07:37.168216517 -0930 +@@ -153,7 +153,7 @@ + elif test -f /etc/gentoo-release + then + PLATFORM=gentoo +- DISTVER=`awk '/version / { print $5 }' < /etc/gentoo-release` ++ DISTVER=`awk '/release / { print $5 }' < /etc/gentoo-release` + elif test -f /etc/debian_version + then + if `test -f /etc/apt/sources.list && grep -q ubuntu /etc/apt/sources.list`; then +diff -urw bareos-Release-20.0.2.orig/core/platforms/CMakeLists.txt bareos-Release-20.0.2/core/platforms/CMakeLists.txt +--- bareos-Release-20.0.2.orig/core/platforms/CMakeLists.txt 2021-06-10 06:07:18.000000000 -0930 ++++ bareos-Release-20.0.2/core/platforms/CMakeLists.txt 2021-08-15 17:07:37.549226558 -0930 +@@ -30,6 +30,8 @@ + message(STATUS "adding subdirectories debian and univention") + add_subdirectory(debian) + add_subdirectory(univention) ++ elseif(${PLATFORM} STREQUAL gentoo) ++ message(STATUS "PLATFORM: " ${PLATFORM}) + elseif(${PLATFORM} STREQUAL hpux) + message(STATUS "PLATFORM: " ${PLATFORM}) + elseif(${PLATFORM} STREQUAL archlinux) diff --git a/app-backup/bareos/files/bareos-dir-21-r1.initd b/app-backup/bareos/files/bareos-dir-21-r1.initd new file mode 100644 index 000000000000..1363833e8962 --- /dev/null +++ b/app-backup/bareos/files/bareos-dir-21-r1.initd @@ -0,0 +1,16 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use dns +} + +start_pre() { + checkpath --directory --owner root:root --mode 00755 /run/bareos +} + +command="/usr/sbin/bareos-dir" +command_args="-f ${DIR_OPTIONS}" +command_background="true" +pidfile="/run/bareos/bareos-dir.9101.pid" diff --git a/app-backup/bareos/files/bareos-dir.initd b/app-backup/bareos/files/bareos-dir.initd index 462ff07843a2..a2986d133cc3 100644 --- a/app-backup/bareos/files/bareos-dir.initd +++ b/app-backup/bareos/files/bareos-dir.initd @@ -1,30 +1,24 @@ #!/sbin/openrc-run -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 depend() { use dns bareos-fd bareos-sd } -start() { - ebegin "Starting bareos director" - # g+w until #631598 is resolved - checkpath -d -m 0770 -o root:bareos /run/bareos - start-stop-daemon --start --quiet --exec /usr/sbin/bareos-dir \ - -- ${DIR_OPTIONS} - # harden pid file until #631598 is resolved - ewaitfile 10 /run/bareos/bareos-dir.9101.pid - chown root:bareos /run/bareos/bareos-dir.9101.pid - eend $? +start_pre() { + checkpath --directory --owner root:bareos --mode 01775 /run/bareos + if [[ -e /run/bareos/bareos-dir.9101.pid && $(stat -c %U /run/bareos/bareos-dir.9101.pid) != "root" ]]; then + eerror "SECURITY ALERT: bareos owned pidfile found! (see #631598)" + exit 1 + fi } -stop() { - ebegin "Stopping bareos director" - # check pid file until #631598 is resolved - if [[ $(stat -c %U /run/bareos/bareos-dir.9101.pid) != "root" ]]; then - eerror "SECURITY ALERT: pid file is not root owned anymore?! (see #631598)" - else - start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-dir.9101.pid - fi - eend $? +start_post() { + ewaitfile 10 /run/bareos/bareos-dir.9101.pid + checkpath --file --owner root:bareos /run/bareos/bareos-dir.9101.pid } + +command="/usr/sbin/bareos-dir" +command_args="${DIR_OPTIONS}" +pidfile="/run/bareos/bareos-dir.9101.pid" diff --git a/app-backup/bareos/files/bareos-fd-21-r1.initd b/app-backup/bareos/files/bareos-fd-21-r1.initd new file mode 100644 index 000000000000..2b752085c764 --- /dev/null +++ b/app-backup/bareos/files/bareos-fd-21-r1.initd @@ -0,0 +1,12 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use dns +} + +command="/usr/sbin/bareos-fd" +command_args="-f ${DIR_OPTIONS}" +command_background="true" +pidfile="/run/bareos/bareos-fd.9102.pid" diff --git a/app-backup/bareos/files/bareos-fd.initd b/app-backup/bareos/files/bareos-fd.initd index e65e6c80f32b..31d9342c1f0e 100644 --- a/app-backup/bareos/files/bareos-fd.initd +++ b/app-backup/bareos/files/bareos-fd.initd @@ -6,16 +6,6 @@ depend() { use dns } -start() { - ebegin "Starting bareos file daemon" - checkpath -d -m 0750 -o root:bareos /run/bareos - start-stop-daemon --start --quiet --exec /usr/sbin/bareos-fd \ - -- ${FD_OPTIONS} - eend $? -} - -stop() { - ebegin "Stopping bareos file daemon" - start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-fd.*.pid - eend $? -} +command="/usr/sbin/bareos-fd" +command_args="${FD_OPTIONS}" +pidfile="/run/bareos/bareos-fd.9102.pid" diff --git a/app-backup/bareos/files/bareos-sd-21-r1.initd b/app-backup/bareos/files/bareos-sd-21-r1.initd new file mode 100644 index 000000000000..9eaed8025d0a --- /dev/null +++ b/app-backup/bareos/files/bareos-sd-21-r1.initd @@ -0,0 +1,16 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use dns +} + +start_pre() { + checkpath --directory --owner root:root --mode 00755 /run/bareos +} + +command="/usr/sbin/bareos-sd" +command_args="-f ${DIR_OPTIONS}" +command_background="true" +pidfile="/run/bareos/bareos-dir.9103.pid" diff --git a/app-backup/bareos/files/bareos-sd.initd b/app-backup/bareos/files/bareos-sd.initd index 97b9ccdc92f1..a4a45343d137 100644 --- a/app-backup/bareos/files/bareos-sd.initd +++ b/app-backup/bareos/files/bareos-sd.initd @@ -1,30 +1,24 @@ #!/sbin/openrc-run -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 depend() { use dns } -start() { - ebegin "Starting bareos storage daemon" - # g+w until #631598 is resolved - checkpath -d -m 0770 -o root:bareos /run/bareos - start-stop-daemon --start --quiet --exec /usr/sbin/bareos-sd \ - -- ${SD_OPTIONS} - # harden pid file until #631598 is resolved - ewaitfile 10 /run/bareos/bareos-sd.9103.pid - chown root:bareos /run/bareos/bareos-sd.9103.pid - eend $? +start_pre() { + checkpath --directory --owner root:bareos --mode 01775 /run/bareos + if [[ -e /run/bareos/bareos-sd.9103.pid && $(stat -c %U /run/bareos/bareos-sd.9103.pid) != "root" ]]; then + eerror "SECURITY ALERT: bareos owned pidfile found! (see #631598)" + exit 1 + fi } -stop() { - ebegin "Stopping bareos storage daemon" - # check pid file until #631598 is resolved - if [[ $(stat -c %U /run/bareos/bareos-sd.9103.pid) != "root" ]]; then - eerror "SECURITY ALERT: pid file is not root owned anymore?! (see #631598)" - else - start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-sd.9103.pid - fi - eend $? +start_post() { + ewaitfile 10 /run/bareos/bareos-sd.9103.pid + checkpath --file --owner root:bareos /run/bareos/bareos-sd.9103.pid } + +command="/usr/sbin/bareos-sd" +command_args="${SD_OPTIONS}" +pidfile="/run/bareos/bareos-sd.9103.pid" diff --git a/app-backup/bareos/metadata.xml b/app-backup/bareos/metadata.xml index b86860aeb86a..74fcd0331c3a 100644 --- a/app-backup/bareos/metadata.xml +++ b/app-backup/bareos/metadata.xml @@ -10,6 +10,7 @@ Only install file-daemon (client) Install director Enable glusterfs storage backend + JSON API support using JANSSON for director enable build of LMDB support for faster accurate backup Install support files for logwatch Enable support for NDMP (Network Data Management Protocol) -- cgit v1.2.3