summaryrefslogtreecommitdiff
path: root/app-backup/bareos
diff options
context:
space:
mode:
Diffstat (limited to 'app-backup/bareos')
-rw-r--r--app-backup/bareos/Manifest30
-rw-r--r--app-backup/bareos/bareos-18.2.10-r1.ebuild (renamed from app-backup/bareos/bareos-18.2.10.ebuild)18
-rw-r--r--app-backup/bareos/bareos-19.2.10-r1.ebuild (renamed from app-backup/bareos/bareos-19.2.9-r1.ebuild)22
-rw-r--r--app-backup/bareos/bareos-20.0.2-r1.ebuild (renamed from app-backup/bareos/bareos-17.2.10.ebuild)290
-rw-r--r--app-backup/bareos/files/bareos-20.0.2-cmake-gentoo.patch24
-rw-r--r--app-backup/bareos/files/bareos-dir.confd-1617
-rw-r--r--app-backup/bareos/files/bareos-dir.initd2
-rw-r--r--app-backup/bareos/files/bareos-dir.service34
-rw-r--r--app-backup/bareos/files/bareos-fd.confd-167
-rw-r--r--app-backup/bareos/files/bareos-fd.initd2
-rw-r--r--app-backup/bareos/files/bareos-fd.service32
-rw-r--r--app-backup/bareos/files/bareos-sd.confd-1610
-rw-r--r--app-backup/bareos/files/bareos-sd.initd2
-rw-r--r--app-backup/bareos/files/bareos-sd.service34
-rw-r--r--app-backup/bareos/files/tmpfiles.d-bareos.conf2
-rw-r--r--app-backup/bareos/metadata.xml3
16 files changed, 293 insertions, 236 deletions
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest
index 6b73333c311b..d84314d4489c 100644
--- a/app-backup/bareos/Manifest
+++ b/app-backup/bareos/Manifest
@@ -1,23 +1,21 @@
+AUX bareos-20.0.2-cmake-gentoo.patch 1332 BLAKE2B b84158913e0bf051013681f8583546add34d48ea56647beb057525a0da1fff57dcd06c20dd125f300e34a42adb450c3a00456077de914dedf50b5a68748ef1ae SHA512 61e2b119d12daa60bf1fa0bc1de81d4322df421c6c5d2de4e823686f8a8657f521d53256533b52b17a105a25ef8070058144620d71aa295b491d2a39bc7de2f4
AUX bareos-cmake-gentoo.patch 516 BLAKE2B 685734517fc166413250782ed35445761b19efd9b7ffedb8436a71f5aea84e38633c61318c914169d3ea40daf0c45e3fe229136cdb1a98dc087cd56b91a4b1d2 SHA512 c0d89844a66f851f556e00faf42e85157c744f1547b37d95f5dd0c58a0ab62fb60a8aead87546ea37f5f9d0eb247a3e1a715d042aafe9b422a3eefe37518b743
AUX bareos-cmake-rados.patch 718 BLAKE2B be3c5822a122fb9d6a5bdd6cb388e3edbb59c6e2aafb9e16991bf0c62ab2dbdf0757de88382318bbd9f6b0fb7d48de11c9d0cd6ab276b6fb6c4f61f8b756237a SHA512 46b6ced3bcdf7e6a72029803a60775cfc06b2313004214dfe7d7ffa64f954fb80cb93f7374b967b33b4035aac8fce4412f13833aa57a83e4ce98c503f147918e
AUX bareos-cmake-symlink-default-db-backend.patch 779 BLAKE2B edb161632215ed8bdc75cae27d54f603787d5f3cbfcf19e180cb7234f661c35527c24dfef38b7c455fd28a46539eae94d157c4777549381c0db64c5fe531d35d SHA512 f5c07d611b7e9f5dc85e0e1440b5bcf43f80a6a6a3b7aead0b88a7a924c9cc8c42bad016d81a0ad55baecc5888e850a516bc86b52a65ddf460c3059fe7f299ee
AUX bareos-dir.confd 640 BLAKE2B 0c80793f66ef9f3b46995a2dcf150b3d7a8a9f53ff97896887314ab31d6082949ac3db2c260b2fc7551c035183c31558cc853f768eca5b0bebdfa483280780b5 SHA512 af71699773ade63c98e2016f48b4d108f29a419a7533444245df4507a7ad7b807948986f9f850ce1f9af58fb445ecd44a5d880f68732b371a7a87dbc5a25ec7c
-AUX bareos-dir.confd-16 641 BLAKE2B d13945b9459a3900d1695815d4076f884b9269aa2ea0661aa9fb18345c6febff34154dce976fc467b60e339257d61e6d0403623fe44a2903b51cc44bfe0fb8a3 SHA512 f25d778958fc4081b54bd88a357cb8ba7bc3573c7e262e66996fdc9c05d184cb48e34941e7e1f5ee6c96605c7224ef475b72d6815d2ed5f72fd2ce0cf66c5776
-AUX bareos-dir.initd 491 BLAKE2B 8b937fedf288587f0180fd83ad4e13c383d476b62f9cc8a58cf1a75d8394de2ec2a1ff0314030577bc439ac1b7c1825a929c4d22df0599eccdd00b169d199d29 SHA512 044136eb9260001943d377f977ab913b7999374d9389c275744087cbd18d0a7311c87d96d05551e83a179dc82ab2d5151bf2c5945082eae4f9e6bf44cb5bf060
-AUX bareos-dir.service 263 BLAKE2B 4ee4fc9da7fb1deeb2f880e52c2fccd7f742c273b4a46b66dec04a8377c71e42a3054901d2381b255d2e4022a7b3967a7399359da13900143aef07b17a53cfa7 SHA512 628444c68e85c0540e4ef74ef283fa1cd70d718cdbf8e82eb6aedc44e737bfc47f8803e25ab1fce80c7084bfe1430cbab0cdd6c1adc7aa44219d0af574349f8f
+AUX bareos-dir.initd 489 BLAKE2B a7ea18e373794d0c6cea9bdb0ef597ebae801f7ededfe32fa607e5541632c7284895a4a53a5edf3f1d05f95a2b0dea98ca0c16d15f27dfd1bb5329083ab25fb4 SHA512 23bc9ae363aea681b93a1737f2d2f5ec38daef1498fd4e4eac191e86ee749064e3f340d41b5888855db883a045f1170801fc135f1149cece522f9c59103f9d23
+AUX bareos-dir.service 774 BLAKE2B 32edec8dc75e0bd982a03d1734579d01bec210fa1c3b18ad80edc69b7596d48c30cb2d5ece476b0bff446f115cfa6c02cf5a3de414de2c4851a79d42eb6ea95c SHA512 559e22d1744ddee59e75902d3f8f6956b1d98570c3d98d85efd38e3e50f8d2c2bc34fd6a8e85575ed3a207d42254c20d4faf59d9bf7c0436d868069916cb8d30
AUX bareos-fd.confd 208 BLAKE2B a2c4692fd2736604ebd1f12d84f300bac8df46a08859ce61cca8417d2645f75bb14f24b5f4fcad70175b11d28a4c052116a1fe99028d634a2fe1fa89cf2c4313 SHA512 8134d37f9d74ced01e769c1a04461e0141cc88cc305441079d9e672d29083ff4ab329a2c36dd2bdc9b7f07204233ff1b6ebd72af2dcbb15af63759be9d0878bc
-AUX bareos-fd.confd-16 211 BLAKE2B bc1a36f5f2c1c42d2dbe0ae5bb922d01d2d26beabf3a890e8b8cec48521b73a14904dd3faba3e681fc03a4bd8ccfb0520e0d0ae28bbba45c9082c7e985953153 SHA512 e1e2d8784a7309acc93c4028a88770e642fa69261d1798e4a763ddcf92995916d29f199fad31d6fbb09209c5967fcc2fe6602ac0d28693213878692c634d837c
-AUX bareos-fd.initd 457 BLAKE2B b02399e5112673c94afcbca67399b5a4627d3e0c863a7e9a61255598bf5b846a344b1eaf8a59665bc9abd091b68d67fe4bacfd796a1b97beebe66e28ee6a6fba SHA512 444802b07cff09feb931795869e7cb50f3406a9f895c3baf69a16607ea7ae2da6553d6f819f7fca2ec4c7c86ebffbc9ba925513325b547fb12aab411ac4d68eb
-AUX bareos-fd.service 219 BLAKE2B 741e82a3d1369b5e33642a80381e0d0604ef852552aba2501d632e0f56fbb8da376d0aa7b4ef5478ec0fdd45ed2bcfc91a30517da4022cfabadb671400eb05bb SHA512 3233ee11054ea1b4ab44f183f88614b55a5b6999bec5914c1ba69e98805df9d9515a0e57612ae66b00132bd776cbcca60f5daaf7647241f5c0faa0570c86859b
+AUX bareos-fd.initd 472 BLAKE2B d377348a0a68a31b821299c46a549e82954e7f694c1b78051b619477eb0453326c2f902f66732b88d1e6c1e6f8ff9bba944f53528512d7f8d5683b37d7f50804 SHA512 0fcbed2d1702738f30e09e8705720b84f6d098e9d4a46b7d23d397d7edc04d03c34f35519eac56f559ce5d3bf3ab185357370e6f8d66d986ca80d1ddcf7ccf30
+AUX bareos-fd.service 670 BLAKE2B b6a93c1ccc74d11c744783993ac68b31ec896e2bc7464fb7295677af86cd86a45c7bdae6c597c7eb2e9fb663a4757455b324260f96503e3d1632f9534b06048b SHA512 33304e148710f3ddb90d75e8803908646e43971e01ca590bb88f3ec03fd83c848123747a86c974ef4529eaadf77a31e24f833205bf810b0803cf0e46f846f5fa
AUX bareos-sd.confd 360 BLAKE2B d965bf4cf1db59982b57ee0b848f9f7156d695a37d2a3b4cb339ce5ac4b27717db6d609a71b8e318fb297a6065c6ce0c20d6e18180a9d47843de5299a43ce6cd SHA512 4077174b5b49f425d53ec36bde039cee0dc55204c1127467c01bb57c58e6495e000b032f060c5ae6d757472934127776667a78238bcc28fbbe7a713d3da18039
-AUX bareos-sd.confd-16 361 BLAKE2B 3c5feb7e6615db5395f2895ed4ea3e0745c4da0ca68cbdd6c899da0be63db0a7ee561aa44404490ef227a08fe5f339c337fd4eadf43a384741d3071ef4332772 SHA512 1cd7a0a6b16d95db4ac39a4858caf0df35b3cd68e6ed87dff687c48008e4f31597e8510ac6a2e1442a80dec7e5608341832b55d3e2ae96793f203fd95700da22
-AUX bareos-sd.initd 481 BLAKE2B c14f2640be1685aaa0304dcfff2c272e37cb55cce92c7e2808eeaa94b20d4cfb4a705b53d06880f5b5c50b96162ea4d6cb23160b6e31ec34889b867c3aad09e1 SHA512 e094df3f44ed39207129bb86020b223037acc7bda408a69711b68376d1044dbe67001370395dd4442df6b4e78e92dc5125dd14dad6c4826716df2084fbd45916
-AUX bareos-sd.service 243 BLAKE2B 198c1f93f63fc015989523bae1932637c9e25d9b02719dfaa8aa1900d0a408ff686bf25f3966645d5c09d6ec6c78f3326a70c5c53cae42f1dd5fdbd88a164541 SHA512 efd8ee4abfde37cf0c9c660ba714b22cf5bd7ce895af20deb80c1d2747b985e2a61ddfa76a557374d78feeec3c68f855976bd9af5f7d61c9588b8db41287211d
-AUX tmpfiles.d-bareos.conf 35 BLAKE2B b670a9951d736618456644aacb28fbd2784c640efdc8aadd85e78d091d6d1655fc93e7dbf7df72c563f07baaf3802a4fa9d836a56766030b86b103a6b4715c4b SHA512 dbda57d059cb9e2e12e1e0c50cf8e58ab63b4ee0eff7ab6330d1dd5226483eb5be6b15b92dc996c979c4cec5586b97084f0687cb43e1f3b0edf742ff072975f4
-DIST bareos-17.2.10.tar.gz 4190783 BLAKE2B d2deb9368438b5281ea36768b80cc15840135a77a19952daa895c4e30ee6ad231d9ecf28a6d860bd372eb08c1c34f9f827843745c87f465d3a59ab048aecc001 SHA512 3e145627a08927790deb8f75e5167e6e69710733eb1866a93adb34617c274c2b51145a6b1253388784f67bc4886fec7fbb423893a36d377bb96334a2dc7768f2
+AUX bareos-sd.initd 479 BLAKE2B 3354f51f7a4edbf05ad007dddf616a41cc46f27c5a7786e1cbfa261ae58b7cb28d8c66f4345addb9e40cb3dc4c319fdb106f75e38615cf14b33f0e59369ce0d8 SHA512 611fbd7b3cc8aa810eed17e45ba1a19696291a4a8057af3b7f8ba9e5c81c535074c80c399193a17804c45ae5975345dac19ddd74bc7d2cf708439611724d0eba
+AUX bareos-sd.service 746 BLAKE2B 14a68ae8c56fbaf4b1d4f0bb9ee774d227b80b43e7dd7062a91948176a9625c7a4b96531e01747b56883fdce289de4f67cc9649a714546ca7f8148488f65555e SHA512 e91e315dd250df996e41e1dd0b884815a28a461416e00f5ac281bd58c294788ba344343ce05f89d6d702abefa454bb70cadd04f4b00641331dac7e9fc9859583
+AUX tmpfiles.d-bareos.conf 33 BLAKE2B 68feed7629dde0dad019470851cea33140be3b17186fbbee7ad6c6a591978236ec09252d890117030d8706d22ea02f9971063aa80a393d3726510128527401d0 SHA512 65d3f72e57eb3afc557ab6b56a8ec1895a679b904114fefd1c9d0ceeb6b9fa8413575591ed81e1ce6963bdaf34dad227e781865b39bb237afc6bb5652306d2ef
DIST bareos-18.2.10.tar.gz 10558902 BLAKE2B ffeac4169131dfc28ec0c9cd9816962492a920b3309ba41a48eec37641fc35027e5f1d1f7d9bf3a7fc2ce2982899e991f4d846f42852e7fbf0643090cccf7096 SHA512 2c31029fdcabe26d36d5aab5ed91686bb0b497eef707ca8fbf82a72a62259651aae4a7516a8812141f6a8e0e2de97e16e5f008d11bb1e483f176f67397e5f69e
-DIST bareos-19.2.9.tar.gz 12886739 BLAKE2B 93b01a71e0824efc8a82c62107de03a0e6df23f600e005c9a98f5f0e541b13c4181dbb11b79fdd2a6f144e1cdbc25a95b1b310576bd3b79721f757c652881626 SHA512 b480a9a8dd459b8af3ab353bc5de2f8d1498d5754416972990add8cc6c8ea40462f6bde01ae92ca23f91c96d8ac2e6daf1dae085de80f021d52c5c87dc9a103e
-EBUILD bareos-17.2.10.ebuild 10243 BLAKE2B fd52bf443eab0b6b6f6610fced73f14f43ded6c13b5010b32a986129e20433b57bbdf33bbe1e365ad0cfd6dc2c9ec98ac15a065c83f66d17968464a9bce9f961 SHA512 a2c9dc80ae3894a22cc0c3c4769b8a4d680a807a2531c2807a25184f229661b2a6f5afcd87827966e239bfac78484275c0c95b4e1444d8aea2f90dc39458c569
-EBUILD bareos-18.2.10.ebuild 11298 BLAKE2B 4df50a376a19f744188b8742f2ee0c4d4e559b02392caea1b1de7c4c1180b06e4ea5ac93e2610538a803ba00c0092bdd04016f790000fd2f9bd92acf364ff0c6 SHA512 0809bb8ece48e8cbdd30a8145fba6474c3291f7aff4197a7e221c6b94f9f9e5d3ba3272f9e0c83da01562071ecc85b9cd6be012bc6e47409b21d6788cc1a0828
-EBUILD bareos-19.2.9-r1.ebuild 10940 BLAKE2B 2c541ca61ee7e44e00f3cbbef8f8dcac5723e13391575c76f320dfbe38c96840bb210ca349ad8ed159da81db91f9bf6a33217da6d3ae8ac1a62061fff8ae4741 SHA512 75efb6c3c295d5b01731bbba25d671b58938f5485e1f6672cc003ba2a282ecd876838e24ca59213fc657d7a1f04de387527088b94aac864d457719a223d96ff4
-MISC metadata.xml 1489 BLAKE2B 3ede9b0a6d7a72e455da20ee3c84e5e37afa8c935d1b7bc9c7048d469315cc73160fe4c9014563812a9bab361cad51bd31cc29d73d9e085b0e3606011b84a36b SHA512 29b3c02f4333ee70177b6e0205304fe6f7b785c2ac9684352f9e6464c6dec266fa0213ae198f146c907df0f2c3af1f7e0da2a8cd67c04299cac6df44443a8872
+DIST bareos-19.2.10.tar.gz 12893797 BLAKE2B 49493acab4fbd26a4ef9aa2f9c19df8a535460596d8206a4d15fedeaace420b7ba948505d7b74ef65aeb94bb8bfa77cf392babeb3e6509839ac418d935fa7070 SHA512 946b1dc5709696363d2ffa3d890fa662976690723ab8054d827c930f27757a22af44b83915ce2a4f198a7d0c2a71bb19b4597141afd31b9809bd6b214237d475
+DIST bareos-20.0.2.tar.gz 13333946 BLAKE2B f035fc8b98bf176bd675895b459ac78fa43575a686af11d5c43ff6b86451894d9aaa53600f87253da29dac06271c01bb269777284d903001821918405499e536 SHA512 f3a0f481a2c9b3a422f4db3e094587c97fe10e2ea5e7a8ba44e9971b0a11746ae4ad598ea469d5c8ec0dfb962e4104c00931397905aebbf3e22af49834043994
+EBUILD bareos-18.2.10-r1.ebuild 11166 BLAKE2B 0ea402d3feb5ee0d88d9b3743bedd1145c9a199b637f97144543ed60da5cb87a76e35be077002f323ab9dccbb79ee2978197fcba5d91bb067d2fd45eda7b1ff9 SHA512 ac89c1c9830743210c9a83fa6b7afbd67c8bfeec8a2002394fd4bd4f68695b75b21a64d96bf0ca91798b38612c339b9a4da0593c964310ea9ff5693256cd08e6
+EBUILD bareos-19.2.10-r1.ebuild 10913 BLAKE2B 53f53486f4a38da837dc2a611468bf4cc8539b6c98bfa4c8f7de35567a0e18e3e8aae666a44e094735ff7a1d41b7ebd27df97b7004a0b2489b6ac5d0d604c038 SHA512 4deece9d0a99038ae170f9a3187cbfd660ac87d61e48b062f249cba4ea3588569d5cbe8624ffde60f2f649b395d67595e25b69b7c5e207bad418cf40862bc648
+EBUILD bareos-20.0.2-r1.ebuild 11274 BLAKE2B f314f54fb790262fbe836d6ca2bdf36303981228eb22372dcb67c9822bee6c9eb519ea0cf849d5dbf01d6a4eee64d2ba183edf9fb2ec98a65608191b052fad2f SHA512 2121ef4f9d2b19a368e7d5b47b2895aa70c31b165abe08de1b047b5cbc7d88b6bb453c3e050815e2bd39dc6b080f5536ee765a3dc972ad58457d50e3bd5df7d3
+MISC metadata.xml 1551 BLAKE2B 0bcfa9e7cb3230427a0450befedddc11667eaea56aedd72d4c724e204493c16084db0096d1eb3740dfd06f0c8dee2dbb5f0c507e67e17487d6ad0d67efdef04f SHA512 2deb20bc5ea932ab2604bb40fac06f8d75256ff32b439c49ee242d6336bc76d8246ddeaefb11ed537871e06656204bef32f84d27e1de0ffd48084bed3b2f790c
diff --git a/app-backup/bareos/bareos-18.2.10.ebuild b/app-backup/bareos/bareos-18.2.10-r1.ebuild
index 9f8f8def1767..996c4c35ce13 100644
--- a/app-backup/bareos/bareos-18.2.10.ebuild
+++ b/app-backup/bareos/bareos-18.2.10-r1.ebuild
@@ -175,7 +175,7 @@ src_configure() {
-Ddynamic-storage-backends=yes
-Dbatch-insert=yes
-Dhost=${CHOST}
- -Dcoverage=yes
+ -Dcoverage=no
-Dpython=no
-Dsmartalloc=yes
-Ddir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
@@ -200,8 +200,8 @@ src_install() {
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
- rm -f "${D}"/etc/init.d/bareos-*
+ # remove upstream init scripts and systemd units
+ rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service
# rename statically linked apps
if use clientonly && use static ; then
@@ -247,9 +247,6 @@ src_install() {
rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
if use clientonly || ! use director; then
- if use systemd; then
- rm -vf "${D}"/lib/systemd/system/bareos-dir.service
- fi
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*
@@ -265,9 +262,6 @@ src_install() {
rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup
fi
if use clientonly || ! use storage-daemon; then
- if use systemd; then
- rm -vf "${D}"/lib/systemd/system/bareos-sd.service
- fi
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*
@@ -331,10 +325,10 @@ src_install() {
# install systemd unit files
if use systemd; then
if ! use clientonly; then
- use director && systemd_dounit core/platforms/systemd/bareos-dir.service
- use storage-daemon && systemd_dounit core/platforms/systemd/bareos-sd.service
+ use director && systemd_dounit "${FILESDIR}"/bareos-dir.service
+ use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service
fi
- systemd_dounit core/platforms/systemd/bareos-fd.service
+ systemd_dounit "${FILESDIR}"/bareos-fd.service
fi
# make sure the working directory exists
diff --git a/app-backup/bareos/bareos-19.2.9-r1.ebuild b/app-backup/bareos/bareos-19.2.10-r1.ebuild
index 1c9bdced2c67..a9e76afe1016 100644
--- a/app-backup/bareos/bareos-19.2.9-r1.ebuild
+++ b/app-backup/bareos/bareos-19.2.10-r1.ebuild
@@ -42,6 +42,7 @@ DEPEND="
)
)
logwatch? ( sys-apps/logwatch )
+ ndmp? ( net-libs/rpcsvc-proto )
tcpd? ( sys-apps/tcp-wrappers )
readline? ( sys-libs/readline:0 )
static? (
@@ -137,7 +138,7 @@ src_configure() {
-Dbatch-insert=yes
-Dbsrdir=/var/lib/bareos/bsr
-Dconfdir=/etc/bareos
- -Dcoverage=yes
+ -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`"
@@ -185,8 +186,11 @@ src_install() {
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
- rm -f "${D}"/etc/init.d/bareos-*
+ # remove timelimit to fix #778557
+ rm -f "${D}"/usr/{,s}bin/timelimit
+
+ # remove upstream init scripts and systemd units
+ rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service
# rename statically linked apps
if use clientonly && use static ; then
@@ -232,9 +236,6 @@ src_install() {
rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
if use clientonly || ! use director; then
- if use systemd; then
- rm -vf "${D}"/lib/systemd/system/bareos-dir.service
- fi
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*
@@ -250,9 +251,6 @@ src_install() {
rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup
fi
if use clientonly || ! use storage-daemon; then
- if use systemd; then
- rm -vf "${D}"/lib/systemd/system/bareos-sd.service
- fi
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*
@@ -316,10 +314,10 @@ src_install() {
# install systemd unit files
if use systemd; then
if ! use clientonly; then
- use director && systemd_dounit core/platforms/systemd/bareos-dir.service
- use storage-daemon && systemd_dounit core/platforms/systemd/bareos-sd.service
+ use director && systemd_dounit "${FILESDIR}"/bareos-dir.service
+ use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service
fi
- systemd_dounit core/platforms/systemd/bareos-fd.service
+ systemd_dounit "${FILESDIR}"/bareos-fd.service
fi
# make sure the working directory exists
diff --git a/app-backup/bareos/bareos-17.2.10.ebuild b/app-backup/bareos/bareos-20.0.2-r1.ebuild
index bcf92fecb1cb..edf65d1c2d93 100644
--- a/app-backup/bareos/bareos-17.2.10.ebuild
+++ b/app-backup/bareos/bareos-20.0.2-r1.ebuild
@@ -1,44 +1,48 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=7
-inherit desktop systemd
+PYTHON_COMPAT=( python3_{7..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="http://www.bareos.org/"
+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 cephfs clientonly +director fastlz glusterfs gnutls ipv6 jansson lmdb
- logwatch mysql ndmp +postgres rados rados-striper readline scsi-crypto
- sql-pooling sqlite ssl static +storage-daemon tcpd vim-syntax"
-REQUIRED_USE="!clientonly? ( || ( mysql postgres sqlite ) )"
+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}
- cephfs? ( sys-cluster/ceph )
- rados? ( sys-cluster/ceph )
- rados-striper? ( >=sys-cluster/ceph-0.94.2 )
+ !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? ( dev-db/mysql-connector-c:0= )
+ mysql? ( virtual/mysql )
sqlite? ( dev-db/sqlite:3 )
director? (
virtual/mta
jansson? ( dev-libs/jansson )
)
)
- fastlz? ( dev-libs/bareos-fastlzlib )
logwatch? ( sys-apps/logwatch )
+ ndmp? ( net-libs/rpcsvc-proto )
tcpd? ( sys-apps/tcp-wrappers )
readline? ( sys-libs/readline:0 )
static? (
@@ -46,25 +50,16 @@ DEPEND="
sys-libs/zlib[static-libs]
dev-libs/lzo[static-libs]
sys-libs/ncurses:=[static-libs]
- ssl? (
- !gnutls? (
- dev-libs/openssl:0=[static-libs]
- )
- gnutls? ( net-libs/gnutls[static-libs] )
- )
+ dev-libs/openssl:0=[static-libs]
)
!static? (
acl? ( virtual/acl )
dev-libs/lzo
- ssl? (
- !gnutls? (
- dev-libs/openssl:0=
- )
- gnutls? ( net-libs/gnutls )
- )
+ dev-libs/openssl:0=
sys-libs/ncurses:=
sys-libs/zlib
)
+ vmware? ( dev-lang/python:2.7 )
"
RDEPEND="${DEPEND}
!clientonly? (
@@ -73,126 +68,137 @@ RDEPEND="${DEPEND}
app-arch/mt-st
)
)
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
+ "
+BDEPEND="${PYTHON_DEPS}"
-REQUIRED_USE="static? ( clientonly )"
+REQUIRED_USE="
+ !clientonly? ( || ( mysql postgres sqlite ) )
+ static? ( clientonly )
+ x86? ( !ceph )
+"
S=${WORKDIR}/${PN}-Release-${PV}
-pkg_setup() {
- use mysql && export mydbtypes+="mysql"
- use postgres && export mydbtypes+=" postgresql"
- use sqlite && export mydbtypes+=" sqlite"
-}
-
src_prepare() {
- # adjusts default configuration files for several binaries
- # to /etc/bareos/<config> instead of ./<config>
- pushd src >&/dev/null || die
- for f in console/console.c dird/dird.c filed/filed.c \
- stored/bcopy.c stored/bextract.c stored/bls.c \
- stored/bscan.c stored/btape.c stored/stored.c; do
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \
- || die "sed on ${f} failed"
- done
- popd >&/dev/null || die
+ use mysql && export mydbtypes+=( mysql )
+ use postgres && export mydbtypes+=( postgresql )
+ use sqlite && export mydbtypes+=( sqlite )
# enables default database driver in catalog
- pushd src/defaultconfigs/bareos-dir.d/catalog >&/dev/null || die
- sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE/d' MyCatalog.conf.in \
+ 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
- # bug 466690 Use CXXFLAGS instead of CFLAGS
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
+ # fix gentoo platform support
+ eapply -p1 "${FILESDIR}/${P}-cmake-gentoo.patch"
- # do not strip binaries
- for d in filed console dird stored; do
- sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die
- done
+ # fix missing DESTDIR in symlink creation
+ sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt"
- eapply_user
+ # 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 myconf=''
+ local mycmakeargs=()
+
+ CMAKE_USE_DIR="$S/core"
- addpredict /var/lib/logrotate.status
+ pushd core/platforms >&/dev/null || die
+ cmake_comment_add_subdirectory '${DISTNAME}'
+ popd >&/dev/null || die
if use clientonly; then
- myconf="${myconf} \
- $(use_enable clientonly client-only) \
- $(use_enable !static libtool) \
- $(use_enable static static-cons) \
- $(use_enable static static-fd)"
+ mycmakeargs+=(
+ -Dclient-only=ON
+ -Dstatic-cons=$(usex static)
+ -Dstatic-fd=$(usex static)
+ )
fi
- myconf="${myconf} \
- $(use_with X x) \
- $(use_enable acl) \
- $(use_enable ipv6) \
- $(use_enable ndmp) \
- $(use_enable readline) \
- $(use_enable !readline conio) \
- $(use_enable scsi-crypto) \
- $(use_enable sql-pooling) \
- $(use_with fastlz) \
- $(use_with mysql) \
- $(use_with postgres postgresql) \
- $(use_with readline) \
- $(use_with sqlite sqlite3) \
- $(use sqlite || echo "--without-sqlite3") \
- $(use_with ssl openssl) \
- $(use_with tcpd tcp-wrappers) \
- $(use_enable lmdb) \
- $(use_with glusterfs) \
- $(use_with rados) \
- $(use_with rados-striper) \
- $(use_with cephfs) \
- $(use_with jansson) \
- "
-
- econf \
- --without-python \
- --with-pid-dir=/run/bareos \
- --with-subsys-dir=/run/lock/subsys \
- --with-working-dir=/var/lib/bareos \
- --with-logdir=/var/log/bareos \
- --with-scriptdir=/usr/libexec/bareos \
- --with-plugindir=/usr/$(get_libdir)/${PN}/plugin \
- --with-backenddir=/usr/$(get_libdir)/${PN}/backend \
- --with-dir-user=bareos \
- --with-dir-group=bareos \
- --with-sd-user=root \
- --with-sd-group=bareos \
- --with-fd-user=root \
- --with-fd-group=bareos \
- --with-sbin-perm=0755 \
- --with-systemd \
- --with-db-password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` \
- --enable-dynamic-cats-backends \
- --enable-dynamic-storage-backends \
- --enable-batch-insert \
- --disable-afs \
- --host=${CHOST} \
- ${myconf}
-}
+ for useflag in acl ipv6 ndmp scsi-crypto \
+ systemd mysql lmdb; do
+ mycmakeargs+=( -D$useflag=$(usex $useflag) )
+ done
-src_compile() {
- # Make build log verbose (bug #447806)
- emake NO_ECHO=""
+ 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() {
- emake DESTDIR="${D}" install
- newicon src/images/bareos_logo_shadow.png bareos.png
+ 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
- rm -f "${D}"/etc/init.d/bareos-*
+ # remove upstream init scripts and systemd units
+ rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service
+
+ # get rid of py2 stuff if USE=-vmware
+ if ! use vmware; then
+ rm -f "$D"/usr/lib64/bareos/plugin/{BareosFdPluginVMware.py,bareos-fd-vmware.py,python-fd.so}
+ rm -rf "$D"/usr/lib64/python2.7
+ fi
# rename statically linked apps
if use clientonly && use static ; then
@@ -209,7 +215,7 @@ src_install() {
diropts -m0755
insinto /etc/logrotate.d
insopts -m0644
- newins "${S}"/scripts/logrotate bareos
+ newins "${S}"/core/scripts/logrotate bareos
# the logwatch scripts
if use logwatch; then
@@ -218,8 +224,20 @@ src_install() {
dodir /etc/log.d/scripts/shared
dodir /etc/log.d/conf/logfiles
dodir /etc/log.d/conf/services
- pushd "${S}"/scripts/logwatch >&/dev/null || die
- emake DESTDIR="${D}" install
+ 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
@@ -258,37 +276,39 @@ src_install() {
# documentation
dodoc README.md
- use ndmp && dodoc README.NDMP
- use scsi-crypto && dodoc README.scsicrypto
+ 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 scripts/bareos.vim
+ doins core/scripts/bareos.vim
insinto /usr/share/vim/vimfiles/ftdetect
- newins scripts/filetype.vim bareos_ft.vim
+ newins core/scripts/filetype.vim bareos_ft.vim
fi
# setup init scripts
myscripts="bareos-fd"
if ! use clientonly; then
if use director; then
- myscripts="${myscripts} bareos-dir"
+ myscripts+=" bareos-dir"
fi
if use storage-daemon; then
- myscripts="${myscripts} bareos-sd"
+ 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-16 "${T}/${script}".confd || die "failed to copy ${script}.confd"
+ 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
+ sed -i -e "s:%databasetypes%:${mydbtypes[*]}:" "${T}/${script}".confd || die
;;
*)
;;
@@ -300,19 +320,31 @@ src_install() {
done
# install systemd unit files
- use director && systemd_dounit "${FILESDIR}"/bareos-dir.service
- use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service
- systemd_dounit "${FILESDIR}"/bareos-fd.service
+ 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
+ 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
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.confd-16 b/app-backup/bareos/files/bareos-dir.confd-16
deleted file mode 100644
index a11eba90a755..000000000000
--- a/app-backup/bareos/files/bareos-dir.confd-16
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# Config file for /etc/init.d/bareos-dir
-
-# Bareos can use more than one catalog database and each one can
-# be of any supported type.
-# If a database server where you store a bareos catalog
-# is on a different machine, you might want to remove the corresponding
-# type from the rc_need variable.
-rc_need="%databasetypes%"
-
-# Options for the director daemon.
-# The director can be run as a non-root user, however
-# please ensure that this user has proper permissions to
-# access your backup devices.
-DIR_OPTIONS="-u root -g bareos"
diff --git a/app-backup/bareos/files/bareos-dir.initd b/app-backup/bareos/files/bareos-dir.initd
index 826d27a829c9..9f17f212e4a4 100644
--- a/app-backup/bareos/files/bareos-dir.initd
+++ b/app-backup/bareos/files/bareos-dir.initd
@@ -8,7 +8,7 @@ depend() {
start() {
ebegin "Starting bareos director"
- checkpath -d -m 0750 -o bareos:bareos /run/bareos
+ checkpath -d -m 0750 -o root:bareos /run/bareos
start-stop-daemon --start --quiet --exec /usr/sbin/bareos-dir \
-- ${DIR_OPTIONS}
eend $?
diff --git a/app-backup/bareos/files/bareos-dir.service b/app-backup/bareos/files/bareos-dir.service
index 440d3c3be98d..a342671d0d00 100644
--- a/app-backup/bareos/files/bareos-dir.service
+++ b/app-backup/bareos/files/bareos-dir.service
@@ -1,13 +1,27 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+#
+# Bareos Director Daemon
+#
[Unit]
- Description=Bareos Director
- After=syslog.target network.target
- Requires=bareos-sd.service bareos-fd.service
-
-[Install]
- WantedBy=multi-user.target
+Description=Bareos Director Daemon
+Documentation=man:bareos-dir(8)
+Requires=nss-lookup.target network.target remote-fs.target time-sync.target
+After=nss-lookup.target network.target remote-fs.target time-sync.target postgresql.service mysql.service mariadb.service
+ConditionPathIsDirectory=/var/lib/bareos
[Service]
- Type=forking
- User=root
- ExecStartPre=-/bin/mkdir /run/bareos
- ExecStart=/usr/sbin/bareos-dir
+Type=forking
+User=bareos
+Group=bareos
+WorkingDirectory=/var/lib/bareos
+PIDFile=/run/bareos/bareos-dir.9101.pid
+StandardError=journal
+ExecStartPre=/usr/sbin/bareos-dir -t -f
+ExecStart=/usr/sbin/bareos-dir
+SuccessExitStatus=0 1 15
+#Restart=on-failure
+
+[Install]
+Alias=bareos-director.service
+WantedBy=multi-user.target
diff --git a/app-backup/bareos/files/bareos-fd.confd-16 b/app-backup/bareos/files/bareos-fd.confd-16
deleted file mode 100644
index e3b8a1f576fd..000000000000
--- a/app-backup/bareos/files/bareos-fd.confd-16
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# Config file for /etc/init.d/bareos-fd
-
-# Options for the file daemon.
-FD_OPTIONS="-u root -g bareos"
diff --git a/app-backup/bareos/files/bareos-fd.initd b/app-backup/bareos/files/bareos-fd.initd
index e272daa88ecd..e65e6c80f32b 100644
--- a/app-backup/bareos/files/bareos-fd.initd
+++ b/app-backup/bareos/files/bareos-fd.initd
@@ -8,7 +8,7 @@ depend() {
start() {
ebegin "Starting bareos file daemon"
- checkpath -d -m 0750 /run/bareos
+ checkpath -d -m 0750 -o root:bareos /run/bareos
start-stop-daemon --start --quiet --exec /usr/sbin/bareos-fd \
-- ${FD_OPTIONS}
eend $?
diff --git a/app-backup/bareos/files/bareos-fd.service b/app-backup/bareos/files/bareos-fd.service
index 103286094250..e9b4b832afb1 100644
--- a/app-backup/bareos/files/bareos-fd.service
+++ b/app-backup/bareos/files/bareos-fd.service
@@ -1,12 +1,26 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+#
+# Bareos File Daemon
+#
[Unit]
- Description=Bareos File Daemon
- After=syslog.target network.target
-
-[Install]
- WantedBy=multi-user.target
+Description=Bareos File Daemon
+Documentation=man:bareos-fd(8)
+Requires=nss-lookup.target network.target remote-fs.target time-sync.target
+After=nss-lookup.target network.target remote-fs.target time-sync.target
[Service]
- Type=forking
- User=root
- ExecStartPre=-/bin/mkdir /run/bareos
- ExecStart=/usr/sbin/bareos-fd
+Type=forking
+User=root
+Group=bareos
+WorkingDirectory=/var/lib/bareos
+PIDFile=/run/bareos/bareos-fd.9102.pid
+StandardError=journal
+ExecStartPre=/usr/sbin/bareos-fd -f -t
+ExecStart=/usr/sbin/bareos-fd
+SuccessExitStatus=0 15
+#Restart=on-failure
+
+[Install]
+Alias=bareos-filedaemon.service
+WantedBy=multi-user.target
diff --git a/app-backup/bareos/files/bareos-sd.confd-16 b/app-backup/bareos/files/bareos-sd.confd-16
deleted file mode 100644
index 5d377b978dd5..000000000000
--- a/app-backup/bareos/files/bareos-sd.confd-16
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# Config file for /etc/init.d/bareos-sd
-
-# Options for the storage daemon.
-# The storage daemon can be run as a non-root user, however
-# please ensure that this user has proper permissions to
-# access your backup devices.
-SD_OPTIONS="-u root -g bareos"
diff --git a/app-backup/bareos/files/bareos-sd.initd b/app-backup/bareos/files/bareos-sd.initd
index f20be4ecf56e..4f7fbcb52bf2 100644
--- a/app-backup/bareos/files/bareos-sd.initd
+++ b/app-backup/bareos/files/bareos-sd.initd
@@ -8,7 +8,7 @@ depend() {
start() {
ebegin "Starting bareos storage daemon"
- checkpath -d -m 0750 -o bareos:bareos /run/bareos
+ checkpath -d -m 0750 -o root:bareos /run/bareos
start-stop-daemon --start --quiet --exec /usr/sbin/bareos-sd \
-- ${SD_OPTIONS}
eend $?
diff --git a/app-backup/bareos/files/bareos-sd.service b/app-backup/bareos/files/bareos-sd.service
index 6c617ec6a37f..80d9edbc9734 100644
--- a/app-backup/bareos/files/bareos-sd.service
+++ b/app-backup/bareos/files/bareos-sd.service
@@ -1,12 +1,28 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+#
+# Bareos Storage Daemon
+#
[Unit]
- Description=Bareos Storage Daemon
- After=syslog.target network-online.target
-
-[Install]
- WantedBy=multi-user.target
+Description=Bareos Storage Daemon
+Documentation=man:bareos-sd(8)
+Requires=nss-lookup.target network.target remote-fs.target time-sync.target
+After=nss-lookup.target network.target remote-fs.target time-sync.target
[Service]
- Type=forking
- User=root
- ExecStartPre=-/bin/mkdir /run/bareos
- ExecStart=/usr/sbin/bareos-sd
+Type=forking
+User=root
+Group=bareos
+WorkingDirectory=/var/lib/bareos
+PIDFile=/run/bareos/bareos-sd.9103.pid
+StandardError=journal
+ExecStartPre=/usr/sbin/bareos-sd -t -f
+ExecStart=/usr/sbin/bareos-sd
+# enable this for scsicrypto-sd
+# CapabilityBoundingSet=cap_sys_rawio+ep
+SuccessExitStatus=0 15
+#Restart=on-failure
+
+[Install]
+Alias=bareos-storage.service
+WantedBy=multi-user.target
diff --git a/app-backup/bareos/files/tmpfiles.d-bareos.conf b/app-backup/bareos/files/tmpfiles.d-bareos.conf
index 6e2dacc41ad3..81c57569c455 100644
--- a/app-backup/bareos/files/tmpfiles.d-bareos.conf
+++ b/app-backup/bareos/files/tmpfiles.d-bareos.conf
@@ -1 +1 @@
-d /run/bareos 0770 bareos bareos -
+d /run/bareos 0750 root bareos -
diff --git a/app-backup/bareos/metadata.xml b/app-backup/bareos/metadata.xml
index bc44d44732b3..6723a102a3a8 100644
--- a/app-backup/bareos/metadata.xml
+++ b/app-backup/bareos/metadata.xml
@@ -6,8 +6,8 @@
<name>Marc Schiffbauer</name>
</maintainer>
<use>
- <flag name="cephfs">Enable cephfs storage backend</flag>
<flag name="ceph">Enable ceph support</flag>
+ <flag name="cephfs">Enable cephfs storage backend</flag>
<flag name="clientonly">Only install file-daemon (client)</flag>
<flag name="director">Install director</flag>
<flag name="fastlz">Enable support vor lz4, lz4hc and lzfast using dev-libs/bareos-fastlzlib</flag>
@@ -22,6 +22,7 @@
<flag name="scsi-crypto">Enable low level SCSI crypto support</flag>
<flag name="sql-pooling">Enable SQL pooling support</flag>
<flag name="storage-daemon">Install storage daemon (bareos-sd)</flag>
+ <flag name="vmware">Enable bareos-fd VMware plugin</flag>
</use>
<upstream>
<remote-id type="github">bareos/bareos</remote-id>