summaryrefslogtreecommitdiff
path: root/app-backup/bareos
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /app-backup/bareos
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'app-backup/bareos')
-rw-r--r--app-backup/bareos/Manifest10
-rw-r--r--app-backup/bareos/bareos-21.0.0-r2.ebuild (renamed from app-backup/bareos/bareos-21.0.0.ebuild)51
-rw-r--r--app-backup/bareos/files/bareos-dir-21.confd2
-rw-r--r--app-backup/bareos/files/bareos-dir-21.initd17
-rw-r--r--app-backup/bareos/files/bareos-fd-21.confd7
-rw-r--r--app-backup/bareos/files/bareos-fd-21.initd21
-rw-r--r--app-backup/bareos/files/bareos-sd-21.confd10
-rw-r--r--app-backup/bareos/files/bareos-sd-21.initd21
8 files changed, 111 insertions, 28 deletions
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest
index 121a792257be..a6f9055e67dc 100644
--- a/app-backup/bareos/Manifest
+++ b/app-backup/bareos/Manifest
@@ -3,15 +3,19 @@ AUX bareos-21-cmake-gentoo.patch 694 BLAKE2B a01f469c1f61a5887dd75779c96fdebf666
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-21.confd 357 BLAKE2B d2cd8da7fea60011752d043b307d0df08c655201a384dbe9406ba491a1463412e1353239c6933b6cd44258f452393f92d80760c657c44cd92c613d6b5422e777 SHA512 4a4b3a2aac3d13f3ce9192652cbc2bbd6c5723e13cf4f602e4094c1df8ce646b3ccf2e56ef8125e2cc410ce885fe1a7b483f2aa167ddadcb25e7c781075b8356
-AUX bareos-dir-21.initd 886 BLAKE2B 6ea7ee1717c5ab5241cbd4427b5eef1c96eee8c2e297b8d1cf0cd77ee8564bcb69add8b29daa6676a31640b33c40df332a30a41e28abe559f531b30053a8de47 SHA512 c1a61e7c5c2c9cbafb3e599e357c598cc4e3c80d9cc79dc8c6d93c21188c1a7820d1f3c86b5b897cd5e3509a63dbbfaab50c0dc2965a21f13aaa8d7ede374561
+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.service 841 BLAKE2B e8c9508984f2823b334c3ef3c412f51e50666cd45aea1c5491a3ce6b1fadf09e7e0cb836d0658f5398209aa0a478c5a6b4fa1b67476e0fc317d6e25bc0fc54a8 SHA512 8f886d3c60959f009cf5f626f64071eb5d768ebf6c5ac0dd0c0c34d866d29563a2f0c68519363170ac35595cc743b432f46a54ce10bbfa530971f56b9914b0a9
+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.service 670 BLAKE2B b6a93c1ccc74d11c744783993ac68b31ec896e2bc7464fb7295677af86cd86a45c7bdae6c597c7eb2e9fb663a4757455b324260f96503e3d1632f9534b06048b SHA512 33304e148710f3ddb90d75e8803908646e43971e01ca590bb88f3ec03fd83c848123747a86c974ef4529eaadf77a31e24f833205bf810b0803cf0e46f846f5fa
+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.service 812 BLAKE2B 7ac9754d98ea177614450045fbbaf7406592b30a280646eacdf31271a0cafd63e88ac463b1d94143ccac96c289de3f88a177edab665f073e7c7692037ffedb68 SHA512 6a0fdb3af03e9f94e0d755a3286aff36b41ab1f00a82e9864f6d3de6931691f6aba79aeb7fc952cec039e4174b545f53c23e96fcfbaed71192877d201b3086ad
@@ -23,5 +27,5 @@ DIST bareos-21.0.0.tar.gz 11306618 BLAKE2B 0363465c40a8053bb5ec772c18ac0dc852f37
EBUILD bareos-18.2.12-r1.ebuild 11168 BLAKE2B 952379f3531292e6b20e0e81d9be6d8384b8a76b1747a340310032c1ed0cf5b38415e6b6fc4edafb46b4e836cebce2dc73532fcc7b5737b1464deecec3c1e3ca SHA512 f8878820c0eeb8fc178b65579fe55230b8534b9e37b69ccacb1818635066a8fca016dbd818394b9b1e5916b49c31cee24abb9591dcbc7ed2a094146bb18adb41
EBUILD bareos-19.2.11-r1.ebuild 10915 BLAKE2B c0101e1fd5a33994bb42b9a460fca12ed422eb4a99a23d6e7333c29b94bf117c39efb1cde61f82b9fda9a00ccc0452187ab8a74ccf6d4e3fdcd813fc9d219908 SHA512 0880c16abaad7ad94bdb75d77e4069994872bfb74b03f496127a936c46d21bb5bf2bbc5b8c078d9a0ecdd3aca40845d72b67bd475b006edabfd57657401979b4
EBUILD bareos-20.0.5.ebuild 11407 BLAKE2B 00a225c47f39abb02990a088a7b763c73f95aca2b98d3fd49015b7ab852b50c9a0b7455aa881f63071b4fd31676806e13ade6001d8465e41e8b88bbb83524167 SHA512 0924dd4387fcce3821dd039729e6395e142b5de067bee06219de5362fa1068238928c3e9dc243f8648e76717428d80b304acf5ad2719548dafe18b705800497d
-EBUILD bareos-21.0.0.ebuild 10262 BLAKE2B 59c69eea0e81ef4f9d0482a6c29a50806afe561ae4d01ba9b078c1f7d9e299435763b789ed4585701c01ac0ff12d23cf6e39e1e1f2a06b5b8d974aae31da7961 SHA512 5c10b93da2a95081d3a7a7304507c92c954e87b79be5b8ac86d3fddeb44c616cfe21e58f7833db8ca8448a84041897cb30e2db20ba5e1208fbaf98b4ead22f14
+EBUILD bareos-21.0.0-r2.ebuild 10641 BLAKE2B f35237f6ae0188ada30feb79cfb97c2647e46d3566c3b9be64c618c55dd2724a9096aa2c6692d94b11a4caa2c6a05804abbcc7023295bd217cbaf665d307c46c SHA512 05193fd2602274445c6dc9a428b56199f30f771ae9f5cb08629193014c0cbfee7959cdfb5432bf8799eb613f36ee55049dafcc95033fdbbd5ebdfdf9fe824b40
MISC metadata.xml 1552 BLAKE2B 27a6ee8fad25a63be91e5bc712ffb293174c6bfca8df772be3821932baafe510b1fa271b2e36a22a11296c7a7bd23049b86dc9cbcbe2f7f30409a1e7c7b55042 SHA512 40b549c30e36a495a434c607467efa914aec228d886ee8560e77b39e4d6d6396ebae5e4a5cbdfd01b6828011ee9922112ab0041d9a9aa944d68417114b14ef53
diff --git a/app-backup/bareos/bareos-21.0.0.ebuild b/app-backup/bareos/bareos-21.0.0-r2.ebuild
index ef360cdc5a34..4baeaaf6c0ec 100644
--- a/app-backup/bareos/bareos-21.0.0.ebuild
+++ b/app-backup/bareos/bareos-21.0.0-r2.ebuild
@@ -12,14 +12,20 @@ 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"
+
+# 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 vim-syntax vmware xattr"
+ static +storage-daemon systemd tcpd test vim-syntax vmware xattr"
# get cmake variables from core/cmake/BareosSetVariableDefaults.cmake
DEPEND="
@@ -68,7 +74,15 @@ RDEPEND="${DEPEND}
)
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
"
-BDEPEND="${PYTHON_DEPS}"
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ test? (
+ dev-cpp/gtest
+ dev-db/postgresql:*[server,threads]
+ dev-db/mariadb:*[server]
+ )
+"
REQUIRED_USE="
static? ( clientonly )
@@ -106,6 +120,26 @@ pkg_pretend() {
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"
@@ -298,21 +332,16 @@ src_install() {
myscripts="bareos-fd"
if ! use clientonly; then
if use director; then
- myscripts+=" bareos-dir-21"
+ 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"
-
# install init script and config
- newinitd "${T}/${script}".initd "${script/-21/}"
- newconfd "${T}/${script}".confd "${script/-21/}"
+ newinitd "${FILESDIR}/${script}-21".initd "${script}"
+ newconfd "${FILESDIR}/${script}-21".confd "${script}"
done
# install systemd unit files
diff --git a/app-backup/bareos/files/bareos-dir-21.confd b/app-backup/bareos/files/bareos-dir-21.confd
index 3ad4b7482f93..4e2ee55d8924 100644
--- a/app-backup/bareos/files/bareos-dir-21.confd
+++ b/app-backup/bareos/files/bareos-dir-21.confd
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Config file for /etc/init.d/bareos-dir
diff --git a/app-backup/bareos/files/bareos-dir-21.initd b/app-backup/bareos/files/bareos-dir-21.initd
index 7100b615105c..916ee13b36ce 100644
--- a/app-backup/bareos/files/bareos-dir-21.initd
+++ b/app-backup/bareos/files/bareos-dir-21.initd
@@ -1,5 +1,5 @@
#!/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() {
@@ -9,23 +9,14 @@ depend() {
start() {
ebegin "Starting bareos director"
- # g+w until #631598 is resolved
- checkpath -d -m 0770 -o root:bareos /run/bareos
+ checkpath -d -m 0750 -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
+ -- -p /run/bareos/bareos-dir.9101.pid ${DIR_OPTIONS}
eend $?
}
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
+ start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-dir.9101.pid
eend $?
}
diff --git a/app-backup/bareos/files/bareos-fd-21.confd b/app-backup/bareos/files/bareos-fd-21.confd
new file mode 100644
index 000000000000..407f2a8828eb
--- /dev/null
+++ b/app-backup/bareos/files/bareos-fd-21.confd
@@ -0,0 +1,7 @@
+# Copyright 1999-2022 Gentoo Authors
+# 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-21.initd b/app-backup/bareos/files/bareos-fd-21.initd
new file mode 100644
index 000000000000..f0632261a0c5
--- /dev/null
+++ b/app-backup/bareos/files/bareos-fd-21.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+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 \
+ -- -p /run/bareos/bareos-fd.9102.pid ${FD_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping bareos file daemon"
+ start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-fd.9102.pid
+ eend $?
+}
diff --git a/app-backup/bareos/files/bareos-sd-21.confd b/app-backup/bareos/files/bareos-sd-21.confd
new file mode 100644
index 000000000000..2a67ae2b5523
--- /dev/null
+++ b/app-backup/bareos/files/bareos-sd-21.confd
@@ -0,0 +1,10 @@
+# Copyright 1999-2022 Gentoo Authors
+# 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 bareos -g bareos"
diff --git a/app-backup/bareos/files/bareos-sd-21.initd b/app-backup/bareos/files/bareos-sd-21.initd
new file mode 100644
index 000000000000..07091dbd74c5
--- /dev/null
+++ b/app-backup/bareos/files/bareos-sd-21.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# 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"
+ checkpath -d -m 0750 -o root:bareos /run/bareos
+ start-stop-daemon --start --quiet --exec /usr/sbin/bareos-sd \
+ -- -p /run/bareos/bareos-sd.9103.pid ${SD_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping bareos storage daemon"
+ start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-sd.9103.pid
+ eend $?
+}