1 |
commit: 8d3beddf67cfa9c92d84ef185a5fc694c4690b6c |
2 |
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 14 03:56:12 2020 +0000 |
4 |
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 14 04:05:38 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d3beddf |
7 |
|
8 |
app-backup/bareos: remove old version |
9 |
|
10 |
Package-Manager: Portage-2.3.89, Repoman-2.3.20 |
11 |
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org> |
12 |
|
13 |
app-backup/bareos/Manifest | 3 - |
14 |
app-backup/bareos/bareos-17.2.6.ebuild | 384 --------------------------- |
15 |
app-backup/bareos/bareos-17.2.7-r1.ebuild | 384 --------------------------- |
16 |
app-backup/bareos/bareos-18.2.6.ebuild | 414 ------------------------------ |
17 |
4 files changed, 1185 deletions(-) |
18 |
|
19 |
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest |
20 |
index 3a1954fb9cd..bd2570916a2 100644 |
21 |
--- a/app-backup/bareos/Manifest |
22 |
+++ b/app-backup/bareos/Manifest |
23 |
@@ -1,6 +1,3 @@ |
24 |
-DIST bareos-17.2.6.tar.gz 4181984 BLAKE2B a1666b38626228ebf00f6a42f1a5b74c78c26a7178fa5333c9c8fb24ccfda146d20c35d35cbe43b6f53ba1b0ce1dd9b8ad30309997689c39493b51a0db9f5c9b SHA512 5f5ac8cfe028c97fa3120e149f1eb029406b74530517bf6e21574bd726e26c6b78740977635b45cbc2232fda0ee28f1b4338d91a8fa0a86ba05209cce82cd0b2 |
25 |
-DIST bareos-17.2.7.tar.gz 4184028 BLAKE2B dc817ca3b21ea13d9dbd1e3c5691e09bc3adff535e0032e1fbcfff8d07b96b2bf21976f020d778dd16137e51283c2a3dcab78dbe28f7fb6f3a60d43938f6b770 SHA512 254eddacb067ef7e82b7a54bdfcbffd5cfa033fa045f697c7e5b5c28dd064b5e1ce9f6aa946282c60f59972beae0b1b7901882b77c3f71cf16efdd73934135cc |
26 |
DIST bareos-17.2.9.tar.gz 4190637 BLAKE2B 266627ac023695971acc5d730765c08ddde673ba75398547687d5f2ccbfb7c440221b8c0a617bc6a3b0d2089cd22604ebe838decc65ce3c1f7ae5cdb99833118 SHA512 ac40f867d495aa64693a209dbfceb55f22425a2079dc000dabd8c6ffce79b1a2578bc0110970a6aace7c3e039c7110d1d395c31b372c0d3e5f18b43e682a70a9 |
27 |
-DIST bareos-18.2.6.tar.gz 9991951 BLAKE2B 9fdaf852e748f0c01d06e2fd72351e7b9bf18e8fea92307fb85437441b4ce504f9c6ddbd42cd2185b6dc08158502a7db581bef662c2bd84c86c885d6b89eebba SHA512 b6618173a803db4cfc3fe7edfe8c9e4e4128195f44383cd7df5b9866da4290686ed7cb42499edec957a5d9ab8bbd92d26258ce58f13fba84fb569167956768c3 |
28 |
DIST bareos-18.2.8.tar.gz 10552800 BLAKE2B c13aabbb7f450c1c9c02f39b130d34057cfc4cec590c68acde5d3592d0f238c0e52bf3acbb55e697610252b3f6bd528c2e87ea09c83aba02f303d144a62b44b2 SHA512 61c9155a02ec0f3a21e06db4f5701dabb25411219d98940b50912c16ac38ec007584a7ef9728f2f12acf2823339a25eba3c9b34a6fa9e625a1d2d0778653b860 |
29 |
DIST bareos-19.2.7.tar.gz 12602338 BLAKE2B 31fa9c9966b22913c2af6eaa6c6f704396d353341878817a574388925f35b437331b057b2a147a8217502f9198b39539d2fa68c4047e191dc918123c0f674a7d SHA512 cb467846a41d42a469704d48c3a1b03ebf5fdc71b9268c1e438e46b86073d55993dfd9bf26242db593db8b1814009c060fd65122d434bad2986c24613f6865c6 |
30 |
|
31 |
diff --git a/app-backup/bareos/bareos-17.2.6.ebuild b/app-backup/bareos/bareos-17.2.6.ebuild |
32 |
deleted file mode 100644 |
33 |
index 487c29eb98e..00000000000 |
34 |
--- a/app-backup/bareos/bareos-17.2.6.ebuild |
35 |
+++ /dev/null |
36 |
@@ -1,384 +0,0 @@ |
37 |
-# Copyright 1999-2020 Gentoo Authors |
38 |
-# Distributed under the terms of the GNU General Public License v2 |
39 |
- |
40 |
-EAPI="6" |
41 |
- |
42 |
-PYTHON_COMPAT=( python2_7 ) |
43 |
-PYTHON_REQ_USE="threads" |
44 |
- |
45 |
-inherit eutils multilib python-single-r1 systemd user |
46 |
- |
47 |
-DESCRIPTION="Featureful client/server network backup suite" |
48 |
-HOMEPAGE="http://www.bareos.org/" |
49 |
-SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" |
50 |
-RESTRICT="mirror" |
51 |
- |
52 |
-LICENSE="AGPL-3" |
53 |
-SLOT="0" |
54 |
-KEYWORDS="~amd64 ~x86" |
55 |
-IUSE="X acl cephfs clientonly +director fastlz glusterfs gnutls ipv6 jansson lmdb libressl |
56 |
- logwatch mysql ndmp +postgres python rados rados-striper readline scsi-crypto |
57 |
- sql-pooling sqlite ssl static +storage-daemon tcpd vim-syntax" |
58 |
-REQUIRED_USE="!clientonly? ( || ( mysql postgres sqlite ) )" |
59 |
- |
60 |
-DEPEND=" |
61 |
- !app-backup/bacula |
62 |
- cephfs? ( sys-cluster/ceph ) |
63 |
- rados? ( sys-cluster/ceph ) |
64 |
- rados-striper? ( >=sys-cluster/ceph-0.94.2 ) |
65 |
- glusterfs? ( sys-cluster/glusterfs ) |
66 |
- lmdb? ( dev-db/lmdb ) |
67 |
- dev-libs/gmp:0 |
68 |
- !clientonly? ( |
69 |
- postgres? ( dev-db/postgresql:*[threads] ) |
70 |
- mysql? ( virtual/mysql ) |
71 |
- sqlite? ( dev-db/sqlite:3 ) |
72 |
- director? ( |
73 |
- virtual/mta |
74 |
- jansson? ( dev-libs/jansson ) |
75 |
- ) |
76 |
- ) |
77 |
- fastlz? ( dev-libs/bareos-fastlzlib ) |
78 |
- logwatch? ( sys-apps/logwatch ) |
79 |
- tcpd? ( sys-apps/tcp-wrappers ) |
80 |
- readline? ( sys-libs/readline:0 ) |
81 |
- static? ( |
82 |
- acl? ( virtual/acl[static-libs] ) |
83 |
- sys-libs/zlib[static-libs] |
84 |
- dev-libs/lzo[static-libs] |
85 |
- sys-libs/ncurses:=[static-libs] |
86 |
- ssl? ( |
87 |
- !gnutls? ( |
88 |
- !libressl? ( dev-libs/openssl:0=[static-libs] ) |
89 |
- libressl? ( dev-libs/libressl:0=[static-libs] ) |
90 |
- ) |
91 |
- gnutls? ( net-libs/gnutls[static-libs] ) |
92 |
- ) |
93 |
- ) |
94 |
- !static? ( |
95 |
- acl? ( virtual/acl ) |
96 |
- dev-libs/lzo |
97 |
- ssl? ( |
98 |
- !gnutls? ( |
99 |
- !libressl? ( dev-libs/openssl:0= ) |
100 |
- libressl? ( dev-libs/libressl:0= ) |
101 |
- ) |
102 |
- gnutls? ( net-libs/gnutls ) |
103 |
- ) |
104 |
- sys-libs/ncurses:= |
105 |
- sys-libs/zlib |
106 |
- ) |
107 |
- python? ( ${PYTHON_DEPS} ) |
108 |
- " |
109 |
-RDEPEND="${DEPEND} |
110 |
- !clientonly? ( |
111 |
- storage-daemon? ( |
112 |
- sys-block/mtx |
113 |
- app-arch/mt-st |
114 |
- ) |
115 |
- ) |
116 |
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
117 |
- |
118 |
-REQUIRED_USE="static? ( clientonly ) |
119 |
- python? ( ${PYTHON_REQUIRED_USE} )" |
120 |
- |
121 |
-S=${WORKDIR}/${PN}-Release-${PV} |
122 |
- |
123 |
-pkg_setup() { |
124 |
- use mysql && export mydbtypes+="mysql" |
125 |
- use postgres && export mydbtypes+=" postgresql" |
126 |
- use sqlite && export mydbtypes+=" sqlite" |
127 |
- |
128 |
- # create the daemon group and user |
129 |
- if [ -z "$(egetent group bareos 2>/dev/null)" ]; then |
130 |
- enewgroup bareos |
131 |
- einfo |
132 |
- einfo "The group 'bareos' has been created. Any users you add to this" |
133 |
- einfo "group have access to files created by the daemons." |
134 |
- einfo |
135 |
- fi |
136 |
- |
137 |
- if ! use clientonly; then |
138 |
- if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then |
139 |
- enewuser bareos -1 -1 /var/lib/bareos bareos,disk,tape,cdrom,cdrw |
140 |
- einfo |
141 |
- einfo "The user 'bareos' has been created. Please see the bareos manual" |
142 |
- einfo "for information about running bareos as a non-root user." |
143 |
- einfo |
144 |
- fi |
145 |
- fi |
146 |
- |
147 |
- use python && python-single-r1_pkg_setup |
148 |
-} |
149 |
- |
150 |
-src_prepare() { |
151 |
- # adjusts default configuration files for several binaries |
152 |
- # to /etc/bareos/<config> instead of ./<config> |
153 |
- pushd src >&/dev/null || die |
154 |
- for f in console/console.c dird/dird.c filed/filed.c \ |
155 |
- stored/bcopy.c stored/bextract.c stored/bls.c \ |
156 |
- stored/bscan.c stored/btape.c stored/stored.c; do |
157 |
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \ |
158 |
- || die "sed on ${f} failed" |
159 |
- done |
160 |
- popd >&/dev/null || die |
161 |
- |
162 |
- # enables default database driver in catalog |
163 |
- pushd src/defaultconfigs/bareos-dir.d/catalog >&/dev/null || die |
164 |
- sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE/d' MyCatalog.conf.in \ |
165 |
- || die "sed on MyCatalog.conf.in failed" |
166 |
- popd >&/dev/null || die |
167 |
- |
168 |
- # bug 466690 Use CXXFLAGS instead of CFLAGS |
169 |
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die |
170 |
- |
171 |
- # do not strip binaries |
172 |
- for d in filed console dird stored; do |
173 |
- sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die |
174 |
- done |
175 |
- |
176 |
- eapply_user |
177 |
-} |
178 |
- |
179 |
-src_configure() { |
180 |
- local myconf='' |
181 |
- |
182 |
- addpredict /var/lib/logrotate.status |
183 |
- |
184 |
- if use clientonly; then |
185 |
- myconf="${myconf} \ |
186 |
- $(use_enable clientonly client-only) \ |
187 |
- $(use_enable !static libtool) \ |
188 |
- $(use_enable static static-cons) \ |
189 |
- $(use_enable static static-fd)" |
190 |
- fi |
191 |
- |
192 |
- myconf="${myconf} \ |
193 |
- $(use_with X x) \ |
194 |
- $(use_enable acl) \ |
195 |
- $(use_enable ipv6) \ |
196 |
- $(use_enable ndmp) \ |
197 |
- $(use_enable readline) \ |
198 |
- $(use_enable !readline conio) \ |
199 |
- $(use_enable scsi-crypto) \ |
200 |
- $(use_enable sql-pooling) \ |
201 |
- $(use_with fastlz) \ |
202 |
- $(use_with mysql) \ |
203 |
- $(use_with postgres postgresql) \ |
204 |
- $(use_with python) \ |
205 |
- $(use_with readline) \ |
206 |
- $(use_with sqlite sqlite3) \ |
207 |
- $(use sqlite || echo "--without-sqlite3") \ |
208 |
- $(use_with ssl openssl) \ |
209 |
- $(use_with tcpd tcp-wrappers) \ |
210 |
- $(use_enable lmdb) \ |
211 |
- $(use_with glusterfs) \ |
212 |
- $(use_with rados) \ |
213 |
- $(use_with rados-striper) \ |
214 |
- $(use_with cephfs) \ |
215 |
- $(use_with jansson) \ |
216 |
- " |
217 |
- |
218 |
- econf \ |
219 |
- --with-pid-dir=/run/bareos \ |
220 |
- --with-subsys-dir=/run/lock/subsys \ |
221 |
- --with-working-dir=/var/lib/bareos \ |
222 |
- --with-logdir=/var/log/bareos \ |
223 |
- --with-scriptdir=/usr/libexec/bareos \ |
224 |
- --with-plugindir=/usr/$(get_libdir)/${PN}/plugin \ |
225 |
- --with-backenddir=/usr/$(get_libdir)/${PN}/backend \ |
226 |
- --with-dir-user=bareos \ |
227 |
- --with-dir-group=bareos \ |
228 |
- --with-sd-user=root \ |
229 |
- --with-sd-group=bareos \ |
230 |
- --with-fd-user=root \ |
231 |
- --with-fd-group=bareos \ |
232 |
- --with-sbin-perm=0755 \ |
233 |
- --with-systemd \ |
234 |
- --with-db-password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` \ |
235 |
- --enable-dynamic-cats-backends \ |
236 |
- --enable-dynamic-storage-backends \ |
237 |
- --enable-batch-insert \ |
238 |
- --disable-afs \ |
239 |
- --host=${CHOST} \ |
240 |
- ${myconf} |
241 |
-} |
242 |
- |
243 |
-src_compile() { |
244 |
- # Make build log verbose (bug #447806) |
245 |
- emake NO_ECHO="" |
246 |
-} |
247 |
- |
248 |
-src_install() { |
249 |
- emake DESTDIR="${D}" install |
250 |
- newicon src/images/bareos_logo_shadow.png bareos.png |
251 |
- |
252 |
- # remove some scripts we don't need at all |
253 |
- rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql} |
254 |
- rm -f "${D}"/usr/sbin/bareos |
255 |
- |
256 |
- # remove upstream init scripts |
257 |
- rm -f "${D}"/etc/init.d/bareos-* |
258 |
- |
259 |
- # rename statically linked apps |
260 |
- if use clientonly && use static ; then |
261 |
- pushd "${D}"/usr/sbin || die |
262 |
- mv static-bareos-fd bareos-fd || die |
263 |
- mv static-bconsole bconsole || die |
264 |
- popd || die |
265 |
- fi |
266 |
- |
267 |
- # extra files which 'make install' doesn't cover |
268 |
- if ! use clientonly; then |
269 |
- # the logrotate configuration |
270 |
- # (now unconditional wrt bug #258187) |
271 |
- diropts -m0755 |
272 |
- insinto /etc/logrotate.d |
273 |
- insopts -m0644 |
274 |
- newins "${S}"/scripts/logrotate bareos |
275 |
- |
276 |
- # the logwatch scripts |
277 |
- if use logwatch; then |
278 |
- diropts -m0750 |
279 |
- dodir /etc/log.d/scripts/services |
280 |
- dodir /etc/log.d/scripts/shared |
281 |
- dodir /etc/log.d/conf/logfiles |
282 |
- dodir /etc/log.d/conf/services |
283 |
- pushd "${S}"/scripts/logwatch >&/dev/null || die |
284 |
- emake DESTDIR="${D}" install |
285 |
- popd >&/dev/null || die |
286 |
- fi |
287 |
- fi |
288 |
- |
289 |
- rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* |
290 |
- if use clientonly || ! use director; then |
291 |
- rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* |
292 |
- rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* |
293 |
- rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
294 |
- rm -vf "${D}"/usr/share/man/man8/bwild.8* |
295 |
- rm -vf "${D}"/usr/share/man/man8/bregex.8* |
296 |
- rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* |
297 |
- rm -vf "${D}"/usr/libexec/bareos/create_*_database |
298 |
- rm -vf "${D}"/usr/libexec/bareos/drop_*_database |
299 |
- rm -vf "${D}"/usr/libexec/bareos/make_*_tables |
300 |
- rm -vf "${D}"/usr/libexec/bareos/update_*_tables |
301 |
- rm -vf "${D}"/usr/libexec/bareos/drop_*_tables |
302 |
- rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges |
303 |
- rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup |
304 |
- fi |
305 |
- if use clientonly || ! use storage-daemon; then |
306 |
- rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* |
307 |
- rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
308 |
- rm -vf "${D}"/usr/share/man/man8/bextract.8* |
309 |
- rm -vf "${D}"/usr/share/man/man8/bls.8* |
310 |
- rm -vf "${D}"/usr/share/man/man8/bscan.8* |
311 |
- rm -vf "${D}"/usr/share/man/man8/btape.8* |
312 |
- rm -vf "${D}"/usr/libexec/bareos/disk-changer |
313 |
- rm -vf "${D}"/usr/libexec/bareos/mtx-changer |
314 |
- rm -vf "${D}"/usr/libexec/bareos/dvd-handler |
315 |
- rm -vf "${D}"/etc/bareos/mtx-changer.conf |
316 |
- fi |
317 |
- if ! use scsi-crypto; then |
318 |
- rm -vf "${D}"/usr/share/man/man8/bscrypto.8* |
319 |
- fi |
320 |
- |
321 |
- # documentation |
322 |
- dodoc README.md |
323 |
- use ndmp && dodoc README.NDMP |
324 |
- use scsi-crypto && dodoc README.scsicrypto |
325 |
- |
326 |
- # vim-files |
327 |
- if use vim-syntax; then |
328 |
- insinto /usr/share/vim/vimfiles/syntax |
329 |
- doins scripts/bareos.vim |
330 |
- insinto /usr/share/vim/vimfiles/ftdetect |
331 |
- newins scripts/filetype.vim bareos_ft.vim |
332 |
- fi |
333 |
- |
334 |
- # setup init scripts |
335 |
- myscripts="bareos-fd" |
336 |
- if ! use clientonly; then |
337 |
- if use director; then |
338 |
- myscripts="${myscripts} bareos-dir" |
339 |
- fi |
340 |
- if use storage-daemon; then |
341 |
- myscripts="${myscripts} bareos-sd" |
342 |
- fi |
343 |
- fi |
344 |
- for script in ${myscripts}; do |
345 |
- # copy over init script and config to a temporary location |
346 |
- # so we can modify them as needed |
347 |
- cp "${FILESDIR}/${script}".confd-16 "${T}/${script}".confd || die "failed to copy ${script}.confd" |
348 |
- cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
349 |
- |
350 |
- # now set the database dependency for the director init script |
351 |
- case "${script}" in |
352 |
- bareos-dir) |
353 |
- sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die |
354 |
- ;; |
355 |
- *) |
356 |
- ;; |
357 |
- esac |
358 |
- |
359 |
- # install init script and config |
360 |
- newinitd "${T}/${script}".initd "${script}" |
361 |
- newconfd "${T}/${script}".confd "${script}" |
362 |
- done |
363 |
- |
364 |
- # install systemd unit files |
365 |
- use director && systemd_dounit "${FILESDIR}"/bareos-dir.service |
366 |
- use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service |
367 |
- systemd_dounit "${FILESDIR}"/bareos-fd.service |
368 |
- |
369 |
- # make sure the working directory exists |
370 |
- diropts -m0750 |
371 |
- keepdir /var/lib/bareos |
372 |
- |
373 |
- # make sure bareos group can execute bareos libexec scripts |
374 |
- fowners -R root:bareos /usr/libexec/bareos |
375 |
-} |
376 |
- |
377 |
-pkg_postinst() { |
378 |
- if use clientonly; then |
379 |
- fowners root:bareos /var/lib/bareos |
380 |
- else |
381 |
- fowners bareos:bareos /var/lib/bareos |
382 |
- fi |
383 |
- |
384 |
- if ! use clientonly && use director; then |
385 |
- einfo |
386 |
- einfo "If this is a new install, you must create the database:" |
387 |
- if use postgres; then |
388 |
- einfo |
389 |
- einfo "For postgresql:" |
390 |
- einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" |
391 |
- einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" |
392 |
- einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" |
393 |
- fi |
394 |
- if use mysql; then |
395 |
- einfo |
396 |
- einfo "For mysql:" |
397 |
- einfo |
398 |
- einfo " Make sure root has direct access to your mysql server. You may want to" |
399 |
- einfo " create a /root/.my.cnf file with" |
400 |
- einfo " [client]" |
401 |
- einfo " user=root" |
402 |
- einfo " password=YourPasswordForAccessingMysqlAsRoot" |
403 |
- einfo " before running:" |
404 |
- einfo " /usr/libexec/bareos/create_bareos_database mysql" |
405 |
- einfo " /usr/libexec/bareos/make_bareos_tables mysql" |
406 |
- einfo " /usr/libexec/bareos/grant_bareos_privileges mysql" |
407 |
- fi |
408 |
- einfo |
409 |
- fi |
410 |
- |
411 |
- if use sqlite; then |
412 |
- einfo |
413 |
- einfo "Be aware that Bareos does not officially support SQLite database." |
414 |
- einfo "Best use it only for a client-only installation. See Bug #445540." |
415 |
- einfo |
416 |
- einfo "It is strongly recommended to use either postgresql or mysql as" |
417 |
- einfo "catalog database backend." |
418 |
- einfo |
419 |
- fi |
420 |
-} |
421 |
|
422 |
diff --git a/app-backup/bareos/bareos-17.2.7-r1.ebuild b/app-backup/bareos/bareos-17.2.7-r1.ebuild |
423 |
deleted file mode 100644 |
424 |
index 625e9459f11..00000000000 |
425 |
--- a/app-backup/bareos/bareos-17.2.7-r1.ebuild |
426 |
+++ /dev/null |
427 |
@@ -1,384 +0,0 @@ |
428 |
-# Copyright 1999-2020 Gentoo Authors |
429 |
-# Distributed under the terms of the GNU General Public License v2 |
430 |
- |
431 |
-EAPI="6" |
432 |
- |
433 |
-PYTHON_COMPAT=( python2_7 ) |
434 |
-PYTHON_REQ_USE="threads" |
435 |
- |
436 |
-inherit eutils multilib python-single-r1 systemd user |
437 |
- |
438 |
-DESCRIPTION="Featureful client/server network backup suite" |
439 |
-HOMEPAGE="http://www.bareos.org/" |
440 |
-SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" |
441 |
-RESTRICT="mirror" |
442 |
- |
443 |
-LICENSE="AGPL-3" |
444 |
-SLOT="0" |
445 |
-KEYWORDS="~amd64 ~x86" |
446 |
-IUSE="X acl cephfs clientonly +director fastlz glusterfs gnutls ipv6 jansson lmdb libressl |
447 |
- logwatch mysql ndmp +postgres python rados rados-striper readline scsi-crypto |
448 |
- sql-pooling sqlite ssl static +storage-daemon tcpd vim-syntax" |
449 |
-REQUIRED_USE="!clientonly? ( || ( mysql postgres sqlite ) )" |
450 |
- |
451 |
-DEPEND=" |
452 |
- !app-backup/bacula |
453 |
- cephfs? ( sys-cluster/ceph ) |
454 |
- rados? ( sys-cluster/ceph ) |
455 |
- rados-striper? ( >=sys-cluster/ceph-0.94.2 ) |
456 |
- glusterfs? ( sys-cluster/glusterfs ) |
457 |
- lmdb? ( dev-db/lmdb ) |
458 |
- dev-libs/gmp:0 |
459 |
- !clientonly? ( |
460 |
- postgres? ( dev-db/postgresql:*[threads] ) |
461 |
- mysql? ( dev-db/mysql-connector-c:0= ) |
462 |
- sqlite? ( dev-db/sqlite:3 ) |
463 |
- director? ( |
464 |
- virtual/mta |
465 |
- jansson? ( dev-libs/jansson ) |
466 |
- ) |
467 |
- ) |
468 |
- fastlz? ( dev-libs/bareos-fastlzlib ) |
469 |
- logwatch? ( sys-apps/logwatch ) |
470 |
- tcpd? ( sys-apps/tcp-wrappers ) |
471 |
- readline? ( sys-libs/readline:0 ) |
472 |
- static? ( |
473 |
- acl? ( virtual/acl[static-libs] ) |
474 |
- sys-libs/zlib[static-libs] |
475 |
- dev-libs/lzo[static-libs] |
476 |
- sys-libs/ncurses:=[static-libs] |
477 |
- ssl? ( |
478 |
- !gnutls? ( |
479 |
- !libressl? ( dev-libs/openssl:0=[static-libs] ) |
480 |
- libressl? ( dev-libs/libressl:0=[static-libs] ) |
481 |
- ) |
482 |
- gnutls? ( net-libs/gnutls[static-libs] ) |
483 |
- ) |
484 |
- ) |
485 |
- !static? ( |
486 |
- acl? ( virtual/acl ) |
487 |
- dev-libs/lzo |
488 |
- ssl? ( |
489 |
- !gnutls? ( |
490 |
- !libressl? ( dev-libs/openssl:0= ) |
491 |
- libressl? ( dev-libs/libressl:0= ) |
492 |
- ) |
493 |
- gnutls? ( net-libs/gnutls ) |
494 |
- ) |
495 |
- sys-libs/ncurses:= |
496 |
- sys-libs/zlib |
497 |
- ) |
498 |
- python? ( ${PYTHON_DEPS} ) |
499 |
- " |
500 |
-RDEPEND="${DEPEND} |
501 |
- !clientonly? ( |
502 |
- storage-daemon? ( |
503 |
- sys-block/mtx |
504 |
- app-arch/mt-st |
505 |
- ) |
506 |
- ) |
507 |
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
508 |
- |
509 |
-REQUIRED_USE="static? ( clientonly ) |
510 |
- python? ( ${PYTHON_REQUIRED_USE} )" |
511 |
- |
512 |
-S=${WORKDIR}/${PN}-Release-${PV} |
513 |
- |
514 |
-pkg_setup() { |
515 |
- use mysql && export mydbtypes+="mysql" |
516 |
- use postgres && export mydbtypes+=" postgresql" |
517 |
- use sqlite && export mydbtypes+=" sqlite" |
518 |
- |
519 |
- # create the daemon group and user |
520 |
- if [ -z "$(egetent group bareos 2>/dev/null)" ]; then |
521 |
- enewgroup bareos |
522 |
- einfo |
523 |
- einfo "The group 'bareos' has been created. Any users you add to this" |
524 |
- einfo "group have access to files created by the daemons." |
525 |
- einfo |
526 |
- fi |
527 |
- |
528 |
- if ! use clientonly; then |
529 |
- if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then |
530 |
- enewuser bareos -1 -1 /var/lib/bareos bareos,disk,tape,cdrom,cdrw |
531 |
- einfo |
532 |
- einfo "The user 'bareos' has been created. Please see the bareos manual" |
533 |
- einfo "for information about running bareos as a non-root user." |
534 |
- einfo |
535 |
- fi |
536 |
- fi |
537 |
- |
538 |
- use python && python-single-r1_pkg_setup |
539 |
-} |
540 |
- |
541 |
-src_prepare() { |
542 |
- # adjusts default configuration files for several binaries |
543 |
- # to /etc/bareos/<config> instead of ./<config> |
544 |
- pushd src >&/dev/null || die |
545 |
- for f in console/console.c dird/dird.c filed/filed.c \ |
546 |
- stored/bcopy.c stored/bextract.c stored/bls.c \ |
547 |
- stored/bscan.c stored/btape.c stored/stored.c; do |
548 |
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \ |
549 |
- || die "sed on ${f} failed" |
550 |
- done |
551 |
- popd >&/dev/null || die |
552 |
- |
553 |
- # enables default database driver in catalog |
554 |
- pushd src/defaultconfigs/bareos-dir.d/catalog >&/dev/null || die |
555 |
- sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE/d' MyCatalog.conf.in \ |
556 |
- || die "sed on MyCatalog.conf.in failed" |
557 |
- popd >&/dev/null || die |
558 |
- |
559 |
- # bug 466690 Use CXXFLAGS instead of CFLAGS |
560 |
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die |
561 |
- |
562 |
- # do not strip binaries |
563 |
- for d in filed console dird stored; do |
564 |
- sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die |
565 |
- done |
566 |
- |
567 |
- eapply_user |
568 |
-} |
569 |
- |
570 |
-src_configure() { |
571 |
- local myconf='' |
572 |
- |
573 |
- addpredict /var/lib/logrotate.status |
574 |
- |
575 |
- if use clientonly; then |
576 |
- myconf="${myconf} \ |
577 |
- $(use_enable clientonly client-only) \ |
578 |
- $(use_enable !static libtool) \ |
579 |
- $(use_enable static static-cons) \ |
580 |
- $(use_enable static static-fd)" |
581 |
- fi |
582 |
- |
583 |
- myconf="${myconf} \ |
584 |
- $(use_with X x) \ |
585 |
- $(use_enable acl) \ |
586 |
- $(use_enable ipv6) \ |
587 |
- $(use_enable ndmp) \ |
588 |
- $(use_enable readline) \ |
589 |
- $(use_enable !readline conio) \ |
590 |
- $(use_enable scsi-crypto) \ |
591 |
- $(use_enable sql-pooling) \ |
592 |
- $(use_with fastlz) \ |
593 |
- $(use_with mysql) \ |
594 |
- $(use_with postgres postgresql) \ |
595 |
- $(use_with python) \ |
596 |
- $(use_with readline) \ |
597 |
- $(use_with sqlite sqlite3) \ |
598 |
- $(use sqlite || echo "--without-sqlite3") \ |
599 |
- $(use_with ssl openssl) \ |
600 |
- $(use_with tcpd tcp-wrappers) \ |
601 |
- $(use_enable lmdb) \ |
602 |
- $(use_with glusterfs) \ |
603 |
- $(use_with rados) \ |
604 |
- $(use_with rados-striper) \ |
605 |
- $(use_with cephfs) \ |
606 |
- $(use_with jansson) \ |
607 |
- " |
608 |
- |
609 |
- econf \ |
610 |
- --with-pid-dir=/run/bareos \ |
611 |
- --with-subsys-dir=/run/lock/subsys \ |
612 |
- --with-working-dir=/var/lib/bareos \ |
613 |
- --with-logdir=/var/log/bareos \ |
614 |
- --with-scriptdir=/usr/libexec/bareos \ |
615 |
- --with-plugindir=/usr/$(get_libdir)/${PN}/plugin \ |
616 |
- --with-backenddir=/usr/$(get_libdir)/${PN}/backend \ |
617 |
- --with-dir-user=bareos \ |
618 |
- --with-dir-group=bareos \ |
619 |
- --with-sd-user=root \ |
620 |
- --with-sd-group=bareos \ |
621 |
- --with-fd-user=root \ |
622 |
- --with-fd-group=bareos \ |
623 |
- --with-sbin-perm=0755 \ |
624 |
- --with-systemd \ |
625 |
- --with-db-password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` \ |
626 |
- --enable-dynamic-cats-backends \ |
627 |
- --enable-dynamic-storage-backends \ |
628 |
- --enable-batch-insert \ |
629 |
- --disable-afs \ |
630 |
- --host=${CHOST} \ |
631 |
- ${myconf} |
632 |
-} |
633 |
- |
634 |
-src_compile() { |
635 |
- # Make build log verbose (bug #447806) |
636 |
- emake NO_ECHO="" |
637 |
-} |
638 |
- |
639 |
-src_install() { |
640 |
- emake DESTDIR="${D}" install |
641 |
- newicon src/images/bareos_logo_shadow.png bareos.png |
642 |
- |
643 |
- # remove some scripts we don't need at all |
644 |
- rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql} |
645 |
- rm -f "${D}"/usr/sbin/bareos |
646 |
- |
647 |
- # remove upstream init scripts |
648 |
- rm -f "${D}"/etc/init.d/bareos-* |
649 |
- |
650 |
- # rename statically linked apps |
651 |
- if use clientonly && use static ; then |
652 |
- pushd "${D}"/usr/sbin || die |
653 |
- mv static-bareos-fd bareos-fd || die |
654 |
- mv static-bconsole bconsole || die |
655 |
- popd || die |
656 |
- fi |
657 |
- |
658 |
- # extra files which 'make install' doesn't cover |
659 |
- if ! use clientonly; then |
660 |
- # the logrotate configuration |
661 |
- # (now unconditional wrt bug #258187) |
662 |
- diropts -m0755 |
663 |
- insinto /etc/logrotate.d |
664 |
- insopts -m0644 |
665 |
- newins "${S}"/scripts/logrotate bareos |
666 |
- |
667 |
- # the logwatch scripts |
668 |
- if use logwatch; then |
669 |
- diropts -m0750 |
670 |
- dodir /etc/log.d/scripts/services |
671 |
- dodir /etc/log.d/scripts/shared |
672 |
- dodir /etc/log.d/conf/logfiles |
673 |
- dodir /etc/log.d/conf/services |
674 |
- pushd "${S}"/scripts/logwatch >&/dev/null || die |
675 |
- emake DESTDIR="${D}" install |
676 |
- popd >&/dev/null || die |
677 |
- fi |
678 |
- fi |
679 |
- |
680 |
- rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* |
681 |
- if use clientonly || ! use director; then |
682 |
- rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* |
683 |
- rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* |
684 |
- rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
685 |
- rm -vf "${D}"/usr/share/man/man8/bwild.8* |
686 |
- rm -vf "${D}"/usr/share/man/man8/bregex.8* |
687 |
- rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* |
688 |
- rm -vf "${D}"/usr/libexec/bareos/create_*_database |
689 |
- rm -vf "${D}"/usr/libexec/bareos/drop_*_database |
690 |
- rm -vf "${D}"/usr/libexec/bareos/make_*_tables |
691 |
- rm -vf "${D}"/usr/libexec/bareos/update_*_tables |
692 |
- rm -vf "${D}"/usr/libexec/bareos/drop_*_tables |
693 |
- rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges |
694 |
- rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup |
695 |
- fi |
696 |
- if use clientonly || ! use storage-daemon; then |
697 |
- rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* |
698 |
- rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
699 |
- rm -vf "${D}"/usr/share/man/man8/bextract.8* |
700 |
- rm -vf "${D}"/usr/share/man/man8/bls.8* |
701 |
- rm -vf "${D}"/usr/share/man/man8/bscan.8* |
702 |
- rm -vf "${D}"/usr/share/man/man8/btape.8* |
703 |
- rm -vf "${D}"/usr/libexec/bareos/disk-changer |
704 |
- rm -vf "${D}"/usr/libexec/bareos/mtx-changer |
705 |
- rm -vf "${D}"/usr/libexec/bareos/dvd-handler |
706 |
- rm -vf "${D}"/etc/bareos/mtx-changer.conf |
707 |
- fi |
708 |
- if ! use scsi-crypto; then |
709 |
- rm -vf "${D}"/usr/share/man/man8/bscrypto.8* |
710 |
- fi |
711 |
- |
712 |
- # documentation |
713 |
- dodoc README.md |
714 |
- use ndmp && dodoc README.NDMP |
715 |
- use scsi-crypto && dodoc README.scsicrypto |
716 |
- |
717 |
- # vim-files |
718 |
- if use vim-syntax; then |
719 |
- insinto /usr/share/vim/vimfiles/syntax |
720 |
- doins scripts/bareos.vim |
721 |
- insinto /usr/share/vim/vimfiles/ftdetect |
722 |
- newins scripts/filetype.vim bareos_ft.vim |
723 |
- fi |
724 |
- |
725 |
- # setup init scripts |
726 |
- myscripts="bareos-fd" |
727 |
- if ! use clientonly; then |
728 |
- if use director; then |
729 |
- myscripts="${myscripts} bareos-dir" |
730 |
- fi |
731 |
- if use storage-daemon; then |
732 |
- myscripts="${myscripts} bareos-sd" |
733 |
- fi |
734 |
- fi |
735 |
- for script in ${myscripts}; do |
736 |
- # copy over init script and config to a temporary location |
737 |
- # so we can modify them as needed |
738 |
- cp "${FILESDIR}/${script}".confd-16 "${T}/${script}".confd || die "failed to copy ${script}.confd" |
739 |
- cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
740 |
- |
741 |
- # now set the database dependency for the director init script |
742 |
- case "${script}" in |
743 |
- bareos-dir) |
744 |
- sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die |
745 |
- ;; |
746 |
- *) |
747 |
- ;; |
748 |
- esac |
749 |
- |
750 |
- # install init script and config |
751 |
- newinitd "${T}/${script}".initd "${script}" |
752 |
- newconfd "${T}/${script}".confd "${script}" |
753 |
- done |
754 |
- |
755 |
- # install systemd unit files |
756 |
- use director && systemd_dounit "${FILESDIR}"/bareos-dir.service |
757 |
- use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service |
758 |
- systemd_dounit "${FILESDIR}"/bareos-fd.service |
759 |
- |
760 |
- # make sure the working directory exists |
761 |
- diropts -m0750 |
762 |
- keepdir /var/lib/bareos |
763 |
- |
764 |
- # make sure bareos group can execute bareos libexec scripts |
765 |
- fowners -R root:bareos /usr/libexec/bareos |
766 |
-} |
767 |
- |
768 |
-pkg_postinst() { |
769 |
- if use clientonly; then |
770 |
- fowners root:bareos /var/lib/bareos |
771 |
- else |
772 |
- fowners bareos:bareos /var/lib/bareos |
773 |
- fi |
774 |
- |
775 |
- if ! use clientonly && use director; then |
776 |
- einfo |
777 |
- einfo "If this is a new install, you must create the database:" |
778 |
- if use postgres; then |
779 |
- einfo |
780 |
- einfo "For postgresql:" |
781 |
- einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" |
782 |
- einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" |
783 |
- einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" |
784 |
- fi |
785 |
- if use mysql; then |
786 |
- einfo |
787 |
- einfo "For mysql:" |
788 |
- einfo |
789 |
- einfo " Make sure root has direct access to your mysql server. You may want to" |
790 |
- einfo " create a /root/.my.cnf file with" |
791 |
- einfo " [client]" |
792 |
- einfo " user=root" |
793 |
- einfo " password=YourPasswordForAccessingMysqlAsRoot" |
794 |
- einfo " before running:" |
795 |
- einfo " /usr/libexec/bareos/create_bareos_database mysql" |
796 |
- einfo " /usr/libexec/bareos/make_bareos_tables mysql" |
797 |
- einfo " /usr/libexec/bareos/grant_bareos_privileges mysql" |
798 |
- fi |
799 |
- einfo |
800 |
- fi |
801 |
- |
802 |
- if use sqlite; then |
803 |
- einfo |
804 |
- einfo "Be aware that Bareos does not officially support SQLite database." |
805 |
- einfo "Best use it only for a client-only installation. See Bug #445540." |
806 |
- einfo |
807 |
- einfo "It is strongly recommended to use either postgresql or mysql as" |
808 |
- einfo "catalog database backend." |
809 |
- einfo |
810 |
- fi |
811 |
-} |
812 |
|
813 |
diff --git a/app-backup/bareos/bareos-18.2.6.ebuild b/app-backup/bareos/bareos-18.2.6.ebuild |
814 |
deleted file mode 100644 |
815 |
index 62f70274ab0..00000000000 |
816 |
--- a/app-backup/bareos/bareos-18.2.6.ebuild |
817 |
+++ /dev/null |
818 |
@@ -1,414 +0,0 @@ |
819 |
-# Copyright 1999-2019 Gentoo Authors |
820 |
-# Distributed under the terms of the GNU General Public License v2 |
821 |
- |
822 |
-EAPI="6" |
823 |
- |
824 |
-PYTHON_COMPAT=( python2_7 ) |
825 |
-PYTHON_REQ_USE="threads" |
826 |
-CMAKE_WARN_UNUSED_CLI=yes |
827 |
-#CMAKE_REMOVE_MODULES=yes |
828 |
- |
829 |
-inherit eutils multilib python-single-r1 systemd user cmake-utils |
830 |
- |
831 |
-DESCRIPTION="Featureful client/server network backup suite" |
832 |
-HOMEPAGE="http://www.bareos.org/" |
833 |
-SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" |
834 |
-RESTRICT="mirror" |
835 |
- |
836 |
-LICENSE="AGPL-3" |
837 |
-SLOT="0" |
838 |
-KEYWORDS="~amd64 ~x86" |
839 |
-IUSE="X acl cephfs clientonly +director fastlz glusterfs gnutls ipv6 jansson lmdb libressl |
840 |
- logwatch mysql ndmp +postgres python rados rados-striper readline scsi-crypto |
841 |
- sql-pooling sqlite ssl static +storage-daemon systemd tcpd vim-syntax" |
842 |
-REQUIRED_USE="!clientonly? ( || ( mysql postgres sqlite ) )" |
843 |
- |
844 |
-DEPEND=" |
845 |
- !app-backup/bacula |
846 |
- cephfs? ( sys-cluster/ceph ) |
847 |
- rados? ( sys-cluster/ceph ) |
848 |
- rados-striper? ( >=sys-cluster/ceph-0.94.2 ) |
849 |
- glusterfs? ( sys-cluster/glusterfs ) |
850 |
- lmdb? ( dev-db/lmdb ) |
851 |
- dev-libs/gmp:0 |
852 |
- !clientonly? ( |
853 |
- postgres? ( dev-db/postgresql:*[threads] ) |
854 |
- mysql? ( virtual/mysql ) |
855 |
- sqlite? ( dev-db/sqlite:3 ) |
856 |
- director? ( |
857 |
- virtual/mta |
858 |
- jansson? ( dev-libs/jansson ) |
859 |
- ) |
860 |
- ) |
861 |
- fastlz? ( dev-libs/bareos-fastlzlib ) |
862 |
- logwatch? ( sys-apps/logwatch ) |
863 |
- tcpd? ( sys-apps/tcp-wrappers ) |
864 |
- readline? ( sys-libs/readline:0 ) |
865 |
- static? ( |
866 |
- acl? ( virtual/acl[static-libs] ) |
867 |
- sys-libs/zlib[static-libs] |
868 |
- dev-libs/lzo[static-libs] |
869 |
- sys-libs/ncurses:=[static-libs] |
870 |
- ssl? ( |
871 |
- !gnutls? ( |
872 |
- !libressl? ( dev-libs/openssl:0=[static-libs] ) |
873 |
- libressl? ( dev-libs/libressl:0=[static-libs] ) |
874 |
- ) |
875 |
- gnutls? ( net-libs/gnutls[static-libs] ) |
876 |
- ) |
877 |
- ) |
878 |
- !static? ( |
879 |
- acl? ( virtual/acl ) |
880 |
- dev-libs/lzo |
881 |
- ssl? ( |
882 |
- !gnutls? ( |
883 |
- !libressl? ( dev-libs/openssl:0= ) |
884 |
- libressl? ( dev-libs/libressl:0= ) |
885 |
- ) |
886 |
- gnutls? ( net-libs/gnutls ) |
887 |
- ) |
888 |
- sys-libs/ncurses:= |
889 |
- sys-libs/zlib |
890 |
- ) |
891 |
- python? ( ${PYTHON_DEPS} ) |
892 |
- " |
893 |
-RDEPEND="${DEPEND} |
894 |
- !clientonly? ( |
895 |
- storage-daemon? ( |
896 |
- sys-block/mtx |
897 |
- app-arch/mt-st |
898 |
- ) |
899 |
- ) |
900 |
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
901 |
- |
902 |
-REQUIRED_USE="static? ( clientonly ) |
903 |
- python? ( ${PYTHON_REQUIRED_USE} )" |
904 |
- |
905 |
-S=${WORKDIR}/${PN}-Release-${PV} |
906 |
- |
907 |
-pkg_setup() { |
908 |
- # create the daemon group and user |
909 |
- if [ -z "$(egetent group bareos 2>/dev/null)" ]; then |
910 |
- enewgroup bareos |
911 |
- einfo |
912 |
- einfo "The group 'bareos' has been created. Any users you add to this" |
913 |
- einfo "group have access to files created by the daemons." |
914 |
- einfo |
915 |
- fi |
916 |
- |
917 |
- if ! use clientonly; then |
918 |
- if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then |
919 |
- enewuser bareos -1 -1 /var/lib/bareos bareos,tape,cdrom,cdrw |
920 |
- einfo |
921 |
- einfo "The user 'bareos' has been created. Please see the bareos manual" |
922 |
- einfo "for information about running bareos as a non-root user." |
923 |
- einfo |
924 |
- fi |
925 |
- fi |
926 |
- |
927 |
- use python && python-single-r1_pkg_setup |
928 |
-} |
929 |
- |
930 |
-src_prepare() { |
931 |
- use mysql && export mydbtypes+=( mysql ) |
932 |
- use postgres && export mydbtypes+=( postgresql ) |
933 |
- use sqlite && export mydbtypes+=( sqlite ) |
934 |
- |
935 |
- # enables default database driver in catalog |
936 |
- pushd core/src/defaultconfigs >&/dev/null || die |
937 |
- sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE_WITH_DATABASE_DRIVER_XXX/d' $(grep -rl XXX_REPLACE_WITH_DATABASE_DRIVER_XXX) \ |
938 |
- || die "sed on MyCatalog.conf.in failed" |
939 |
- popd >&/dev/null || die |
940 |
- |
941 |
- epatch "${FILESDIR}/bareos-cmake-rados.patch" |
942 |
- |
943 |
- # fix gentoo version detection |
944 |
- epatch "${FILESDIR}/bareos-cmake-gentoo.patch" |
945 |
- |
946 |
- # fix missing DESTDIR in symlink creation |
947 |
- epatch "${FILESDIR}/bareos-cmake-symlink-default-db-backend.patch" |
948 |
- |
949 |
- eapply_user |
950 |
- |
951 |
- CMAKE_USE_DIR="$S/core" |
952 |
- cmake-utils_src_prepare |
953 |
-} |
954 |
- |
955 |
-src_configure() { |
956 |
- local mycmakeargs=() |
957 |
- |
958 |
- CMAKE_USE_DIR="$S/core" |
959 |
- |
960 |
- pushd core/platforms >&/dev/null || die |
961 |
- cmake_comment_add_subdirectory '${DISTNAME}' |
962 |
- popd >&/dev/null || die |
963 |
- |
964 |
- if use clientonly; then |
965 |
- mycmakeargs+=( |
966 |
- -Dclient-only=YES |
967 |
- -Dstatic-cons=$(usex static) |
968 |
- -Dstatic-fd=$(usex static) |
969 |
- ) |
970 |
- fi |
971 |
- |
972 |
- for useflag in acl ipv6 ndmp readline scsi-crypto sql-pooling \ |
973 |
- systemd fastlz mysql python lmdb glusterfs rados \ |
974 |
- rados-striper cephfs jansson; do |
975 |
- |
976 |
- mycmakeargs+=( -D$useflag=$(usex $useflag) ) |
977 |
- done |
978 |
- |
979 |
- mycmakeargs+=( |
980 |
- -DDEFAULT_DB_TYPE=${mydbtypes[0]} |
981 |
- -Dx=$(usex X) |
982 |
- -Dpostgresql=$(usex postgres) |
983 |
- -Dmysql=$(usex mysql) |
984 |
- -Dsqlite3=$(usex sqlite) |
985 |
- -Dopenssl=$(usex ssl) |
986 |
- -Dtcp-wrapper=$(usex tcpd) |
987 |
- -Dlibdir=/usr/$(get_libdir) |
988 |
- -Dsbindir=/usr/sbin |
989 |
- -Dmandir=/usr/share/man |
990 |
- -Ddocdir=/usr/share/doc/${PF} |
991 |
- -Dhtmldir=/usr/share/doc/${PF}/html |
992 |
- -Darchivedir=/var/lib/bareos/storage |
993 |
- -Dbsrdir=/var/lib/bareos/bsr |
994 |
- -Dpiddir=/run/bareos |
995 |
- -Dsysconfdir=/etc |
996 |
- -Dconfdir=/etc/bareos |
997 |
- -Dsubsys-dir=/run/lock/subsys |
998 |
- -Dworkingdir=/var/lib/bareos |
999 |
- -Dlogdir=/var/log/bareos |
1000 |
- -Dscriptdir=/usr/libexec/bareos |
1001 |
- -Dplugindir=/usr/$(get_libdir)/${PN}/plugin |
1002 |
- -Dbackenddir=/usr/$(get_libdir)/${PN}/backend |
1003 |
- -Ddir-user=bareos |
1004 |
- -Ddir-group=bareos |
1005 |
- -Dsd-user=root |
1006 |
- -Dsd-group=bareos |
1007 |
- -Dfd-user=root |
1008 |
- -Dfd-group=bareos |
1009 |
- -Dsbin-perm=0755 |
1010 |
- -Ddb_password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` |
1011 |
- -Ddynamic-cats-backends=yes |
1012 |
- -Ddynamic-storage-backends=yes |
1013 |
- -Dbatch-insert=yes |
1014 |
- -Dhost=${CHOST} |
1015 |
- -Dcoverage=yes |
1016 |
- -Dpython=yes |
1017 |
- -Dsmartalloc=yes |
1018 |
- -Ddir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" |
1019 |
- -Dfd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" |
1020 |
- -Dsd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" |
1021 |
- -Dmon-dir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" |
1022 |
- -Dmon-fd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" |
1023 |
- -Dmon-sd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" |
1024 |
- -Dbasename="`hostname -s`" |
1025 |
- -Dhostname="`hostname -s`" |
1026 |
- ) |
1027 |
- |
1028 |
- cmake-utils_src_configure |
1029 |
-} |
1030 |
- |
1031 |
-src_install() { |
1032 |
- #emake DESTDIR="${D}" install |
1033 |
- cmake-utils_src_install |
1034 |
- newicon core/src/images/bareos_logo_shadow.png bareos.png |
1035 |
- |
1036 |
- # remove some scripts we don't need at all |
1037 |
- rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql} |
1038 |
- rm -f "${D}"/usr/sbin/bareos |
1039 |
- |
1040 |
- # remove upstream init scripts |
1041 |
- rm -f "${D}"/etc/init.d/bareos-* |
1042 |
- |
1043 |
- # rename statically linked apps |
1044 |
- if use clientonly && use static ; then |
1045 |
- pushd "${D}"/usr/sbin || die |
1046 |
- mv static-bareos-fd bareos-fd || die |
1047 |
- mv static-bconsole bconsole || die |
1048 |
- popd || die |
1049 |
- fi |
1050 |
- |
1051 |
- # extra files which 'make install' doesn't cover |
1052 |
- if ! use clientonly; then |
1053 |
- # the logrotate configuration |
1054 |
- # (now unconditional wrt bug #258187) |
1055 |
- diropts -m0755 |
1056 |
- insinto /etc/logrotate.d |
1057 |
- insopts -m0644 |
1058 |
- newins "${S}"/core/scripts/logrotate bareos |
1059 |
- |
1060 |
- # the logwatch scripts |
1061 |
- if use logwatch; then |
1062 |
- diropts -m0750 |
1063 |
- dodir /etc/log.d/scripts/services |
1064 |
- dodir /etc/log.d/scripts/shared |
1065 |
- dodir /etc/log.d/conf/logfiles |
1066 |
- dodir /etc/log.d/conf/services |
1067 |
- pushd "${S}"/core/scripts/logwatch >&/dev/null || die |
1068 |
- |
1069 |
- into /etc/log.d/scripts/services |
1070 |
- dobin bareos |
1071 |
- |
1072 |
- into /etc/log.d/scripts/shared |
1073 |
- dobin applybareosdate |
1074 |
- |
1075 |
- insinto /etc/log.d/conf/logfiles |
1076 |
- newins logfile.bareos.conf bareos.conf |
1077 |
- |
1078 |
- insinto /etc/log.d/conf/services |
1079 |
- newins services.bareos.conf bareos.conf |
1080 |
- |
1081 |
- popd >&/dev/null || die |
1082 |
- fi |
1083 |
- fi |
1084 |
- |
1085 |
- rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* |
1086 |
- if use clientonly || ! use director; then |
1087 |
- if use systemd; then |
1088 |
- rm -vf "${D}"/lib/systemd/system/bareos-dir.service |
1089 |
- fi |
1090 |
- rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* |
1091 |
- rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* |
1092 |
- rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
1093 |
- rm -vf "${D}"/usr/share/man/man8/bwild.8* |
1094 |
- rm -vf "${D}"/usr/share/man/man8/bregex.8* |
1095 |
- rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* |
1096 |
- rm -vf "${D}"/usr/libexec/bareos/create_*_database |
1097 |
- rm -vf "${D}"/usr/libexec/bareos/drop_*_database |
1098 |
- rm -vf "${D}"/usr/libexec/bareos/make_*_tables |
1099 |
- rm -vf "${D}"/usr/libexec/bareos/update_*_tables |
1100 |
- rm -vf "${D}"/usr/libexec/bareos/drop_*_tables |
1101 |
- rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges |
1102 |
- rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup |
1103 |
- fi |
1104 |
- if use clientonly || ! use storage-daemon; then |
1105 |
- if use systemd; then |
1106 |
- rm -vf "${D}"/lib/systemd/system/bareos-sd.service |
1107 |
- fi |
1108 |
- rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* |
1109 |
- rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
1110 |
- rm -vf "${D}"/usr/share/man/man8/bextract.8* |
1111 |
- rm -vf "${D}"/usr/share/man/man8/bls.8* |
1112 |
- rm -vf "${D}"/usr/share/man/man8/bscan.8* |
1113 |
- rm -vf "${D}"/usr/share/man/man8/btape.8* |
1114 |
- rm -vf "${D}"/usr/libexec/bareos/disk-changer |
1115 |
- rm -vf "${D}"/usr/libexec/bareos/mtx-changer |
1116 |
- rm -vf "${D}"/usr/libexec/bareos/dvd-handler |
1117 |
- rm -vf "${D}"/etc/bareos/mtx-changer.conf |
1118 |
- fi |
1119 |
- if ! use scsi-crypto; then |
1120 |
- rm -vf "${D}"/usr/share/man/man8/bscrypto.8* |
1121 |
- fi |
1122 |
- |
1123 |
- # documentation |
1124 |
- dodoc README.md |
1125 |
- dodoc core/README.configsubdirectories |
1126 |
- use glusterfs dodoc core/README.glusterfs |
1127 |
- use ndmp && dodoc core/README.NDMP |
1128 |
- use scsi-crypto && dodoc core/README.scsicrypto |
1129 |
- |
1130 |
- # vim-files |
1131 |
- if use vim-syntax; then |
1132 |
- insinto /usr/share/vim/vimfiles/syntax |
1133 |
- doins core/scripts/bareos.vim |
1134 |
- insinto /usr/share/vim/vimfiles/ftdetect |
1135 |
- newins core/scripts/filetype.vim bareos_ft.vim |
1136 |
- fi |
1137 |
- |
1138 |
- # setup init scripts |
1139 |
- myscripts="bareos-fd" |
1140 |
- if ! use clientonly; then |
1141 |
- if use director; then |
1142 |
- myscripts+=" bareos-dir" |
1143 |
- fi |
1144 |
- if use storage-daemon; then |
1145 |
- myscripts+=" bareos-sd" |
1146 |
- fi |
1147 |
- fi |
1148 |
- for script in ${myscripts}; do |
1149 |
- # copy over init script and config to a temporary location |
1150 |
- # so we can modify them as needed |
1151 |
- cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" |
1152 |
- cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
1153 |
- |
1154 |
- # now set the database dependency for the director init script |
1155 |
- case "${script}" in |
1156 |
- bareos-dir) |
1157 |
- sed -i -e "s:%databasetypes%:${mydbtypes[*]}:" "${T}/${script}".confd || die |
1158 |
- ;; |
1159 |
- *) |
1160 |
- ;; |
1161 |
- esac |
1162 |
- |
1163 |
- # install init script and config |
1164 |
- newinitd "${T}/${script}".initd "${script}" |
1165 |
- newconfd "${T}/${script}".confd "${script}" |
1166 |
- done |
1167 |
- |
1168 |
- # install systemd unit files |
1169 |
- if use systemd; then |
1170 |
- if ! use clientonly; then |
1171 |
- use director && systemd_dounit core/platforms/systemd/bareos-dir.service |
1172 |
- use storage-daemon && systemd_dounit core/platforms/systemd/bareos-sd.service |
1173 |
- fi |
1174 |
- systemd_dounit core/platforms/systemd/bareos-fd.service |
1175 |
- fi |
1176 |
- |
1177 |
- # make sure the working directory exists |
1178 |
- diropts -m0750 |
1179 |
- keepdir /var/lib/bareos |
1180 |
- keepdir /var/lib/bareos/storage |
1181 |
- |
1182 |
- diropts -m0755 |
1183 |
- keepdir /var/log/bareos |
1184 |
- |
1185 |
- # make sure bareos group can execute bareos libexec scripts |
1186 |
- fowners -R root:bareos /usr/libexec/bareos |
1187 |
-} |
1188 |
- |
1189 |
-pkg_postinst() { |
1190 |
- if use clientonly; then |
1191 |
- fowners root:bareos /var/lib/bareos |
1192 |
- else |
1193 |
- fowners bareos:bareos /var/lib/bareos |
1194 |
- fi |
1195 |
- |
1196 |
- if ! use clientonly && use director; then |
1197 |
- einfo |
1198 |
- einfo "If this is a new install, you must create the database:" |
1199 |
- if use postgres; then |
1200 |
- einfo |
1201 |
- einfo "For postgresql:" |
1202 |
- einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" |
1203 |
- einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" |
1204 |
- einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" |
1205 |
- fi |
1206 |
- if use mysql; then |
1207 |
- einfo |
1208 |
- einfo "For mysql:" |
1209 |
- einfo |
1210 |
- einfo " Make sure root has direct access to your mysql server. You may want to" |
1211 |
- einfo " create a /root/.my.cnf file with" |
1212 |
- einfo " [client]" |
1213 |
- einfo " user=root" |
1214 |
- einfo " password=YourPasswordForAccessingMysqlAsRoot" |
1215 |
- einfo " before running:" |
1216 |
- einfo " /usr/libexec/bareos/create_bareos_database mysql" |
1217 |
- einfo " /usr/libexec/bareos/make_bareos_tables mysql" |
1218 |
- einfo " /usr/libexec/bareos/grant_bareos_privileges mysql" |
1219 |
- fi |
1220 |
- einfo |
1221 |
- fi |
1222 |
- |
1223 |
- if use sqlite; then |
1224 |
- einfo |
1225 |
- einfo "Be aware that Bareos does not officially support SQLite database." |
1226 |
- einfo "Best use it only for a client-only installation. See Bug #445540." |
1227 |
- einfo |
1228 |
- einfo "It is strongly recommended to use either postgresql or mysql as" |
1229 |
- einfo "catalog database backend." |
1230 |
- einfo |
1231 |
- fi |
1232 |
-} |