Gentoo Archives: gentoo-commits

From: Marc Schiffbauer <mschiff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/
Date: Tue, 16 Apr 2019 06:50:24
Message-Id: 1555397387.545ba8d1a52e4ac002812475805be6cc5f790cf2.mschiff@gentoo
1 commit: 545ba8d1a52e4ac002812475805be6cc5f790cf2
2 Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 16 06:49:13 2019 +0000
4 Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 16 06:49:47 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=545ba8d1
7
8 app-backup/bareos: add systemd USE-flag
9
10 This fixes build on non-systemd systems
11 Fixes #679466
12
13 Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
14 Package-Manager: Portage-2.3.51, Repoman-2.3.11
15
16 app-backup/bareos/bareos-18.2.6.ebuild | 23 ++++++++++++++---------
17 1 file changed, 14 insertions(+), 9 deletions(-)
18
19 diff --git a/app-backup/bareos/bareos-18.2.6.ebuild b/app-backup/bareos/bareos-18.2.6.ebuild
20 index 6a140c54f77..62f70274ab0 100644
21 --- a/app-backup/bareos/bareos-18.2.6.ebuild
22 +++ b/app-backup/bareos/bareos-18.2.6.ebuild
23 @@ -20,7 +20,7 @@ SLOT="0"
24 KEYWORDS="~amd64 ~x86"
25 IUSE="X acl cephfs clientonly +director fastlz glusterfs gnutls ipv6 jansson lmdb libressl
26 logwatch mysql ndmp +postgres python rados rados-striper readline scsi-crypto
27 - sql-pooling sqlite ssl static +storage-daemon tcpd vim-syntax"
28 + sql-pooling sqlite ssl static +storage-daemon systemd tcpd vim-syntax"
29 REQUIRED_USE="!clientonly? ( || ( mysql postgres sqlite ) )"
30
31 DEPEND="
32 @@ -152,7 +152,7 @@ src_configure() {
33 fi
34
35 for useflag in acl ipv6 ndmp readline scsi-crypto sql-pooling \
36 - fastlz mysql python lmdb glusterfs rados \
37 + systemd fastlz mysql python lmdb glusterfs rados \
38 rados-striper cephfs jansson; do
39
40 mycmakeargs+=( -D$useflag=$(usex $useflag) )
41 @@ -189,7 +189,6 @@ src_configure() {
42 -Dfd-user=root
43 -Dfd-group=bareos
44 -Dsbin-perm=0755
45 - -Dsystemd=yes
46 -Ddb_password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1`
47 -Ddynamic-cats-backends=yes
48 -Ddynamic-storage-backends=yes
49 @@ -267,7 +266,9 @@ src_install() {
50
51 rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
52 if use clientonly || ! use director; then
53 - rm -vf "${D}"/lib/systemd/system/bareos-dir.service
54 + if use systemd; then
55 + rm -vf "${D}"/lib/systemd/system/bareos-dir.service
56 + fi
57 rm -vf "${D}"/usr/share/man/man8/bareos-dir.8*
58 rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8*
59 rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
60 @@ -283,7 +284,9 @@ src_install() {
61 rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup
62 fi
63 if use clientonly || ! use storage-daemon; then
64 - rm -vf "${D}"/lib/systemd/system/bareos-sd.service
65 + if use systemd; then
66 + rm -vf "${D}"/lib/systemd/system/bareos-sd.service
67 + fi
68 rm -vf "${D}"/usr/share/man/man8/bareos-sd.8*
69 rm -vf "${D}"/usr/share/man/man8/bcopy.8*
70 rm -vf "${D}"/usr/share/man/man8/bextract.8*
71 @@ -345,11 +348,13 @@ src_install() {
72 done
73
74 # install systemd unit files
75 - if ! use clientonly; then
76 - use director && systemd_dounit core/platforms/systemd/bareos-dir.service
77 - use storage-daemon && systemd_dounit core/platforms/systemd/bareos-sd.service
78 + if use systemd; then
79 + if ! use clientonly; then
80 + use director && systemd_dounit core/platforms/systemd/bareos-dir.service
81 + use storage-daemon && systemd_dounit core/platforms/systemd/bareos-sd.service
82 + fi
83 + systemd_dounit core/platforms/systemd/bareos-fd.service
84 fi
85 - systemd_dounit core/platforms/systemd/bareos-fd.service
86
87 # make sure the working directory exists
88 diropts -m0750