Gentoo Archives: gentoo-commits

From: Thomas Beierlein <tomjbe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-backup/bacula/
Date: Sun, 28 Oct 2018 10:17:07
Message-Id: 1540721799.d2b35fde10972efd81dfecff150b5bc2355b1b6f.tomjbe@gentoo
1 commit: d2b35fde10972efd81dfecff150b5bc2355b1b6f
2 Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 28 10:16:39 2018 +0000
4 Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 28 10:16:39 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2b35fde
7
8 app-backup/bacula: Drop old
9
10 Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>
11 Package-Manager: Portage-2.3.51, Repoman-2.3.11
12
13 app-backup/bacula/bacula-5.2.13-r6.ebuild | 397 ---------------------------
14 app-backup/bacula/bacula-9.0.6-r3.ebuild | 436 ------------------------------
15 app-backup/bacula/bacula-9.0.8.ebuild | 434 -----------------------------
16 3 files changed, 1267 deletions(-)
17
18 diff --git a/app-backup/bacula/bacula-5.2.13-r6.ebuild b/app-backup/bacula/bacula-5.2.13-r6.ebuild
19 deleted file mode 100644
20 index 463523e8d36..00000000000
21 --- a/app-backup/bacula/bacula-5.2.13-r6.ebuild
22 +++ /dev/null
23 @@ -1,397 +0,0 @@
24 -# Copyright 1999-2018 Gentoo Foundation
25 -# Distributed under the terms of the GNU General Public License v2
26 -
27 -EAPI="5"
28 -
29 -PYTHON_COMPAT=( python2_7 )
30 -PYTHON_REQ_USE="threads"
31 -
32 -inherit eutils multilib python-single-r1 systemd user libtool
33 -
34 -MY_PV=${PV/_beta/-b}
35 -MY_P=${PN}-${MY_PV}
36 -
37 -DESCRIPTION="Featureful client/server network backup suite"
38 -HOMEPAGE="http://www.bacula.org/"
39 -SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz"
40 -
41 -LICENSE="AGPL-3"
42 -SLOT="0"
43 -KEYWORDS="~amd64 ~ppc ~sparc ~x86"
44 -IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres python readline +sqlite ssl static tcpd vim-syntax X"
45 -
46 -DEPEND="
47 - dev-libs/gmp:0
48 - !bacula-clientonly? (
49 - postgres? ( dev-db/postgresql:=[threads] )
50 - mysql? ( virtual/mysql )
51 - sqlite? ( dev-db/sqlite:3 )
52 - !bacula-nodir? ( virtual/mta )
53 - )
54 - logwatch? ( sys-apps/logwatch )
55 - tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
56 - readline? ( sys-libs/readline:0 )
57 - static? (
58 - acl? ( virtual/acl[static-libs] )
59 - sys-libs/zlib[static-libs]
60 - dev-libs/lzo[static-libs]
61 - sys-libs/ncurses:=[static-libs]
62 - ssl? (
63 - !libressl? ( dev-libs/openssl:0=[static-libs] )
64 - libressl? ( dev-libs/libressl:0=[static-libs] )
65 - )
66 - )
67 - !static? (
68 - acl? ( virtual/acl )
69 - sys-libs/zlib
70 - dev-libs/lzo
71 - sys-libs/ncurses:=
72 - ssl? (
73 - !libressl? ( dev-libs/openssl:0= )
74 - libressl? ( dev-libs/libressl:0= )
75 - )
76 - )
77 - python? ( ${PYTHON_DEPS} )
78 - "
79 -RDEPEND="${DEPEND}
80 - !bacula-clientonly? (
81 - !bacula-nosd? (
82 - sys-block/mtx
83 - app-arch/mt-st
84 - )
85 - )
86 - vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
87 -
88 -REQUIRED_USE="!bacula-clientonly? ( ^^ ( mysql postgres sqlite ) )
89 - static? ( bacula-clientonly )
90 - python? ( ${PYTHON_REQUIRED_USE} )"
91 -
92 -S=${WORKDIR}/${MY_P}
93 -
94 -pkg_setup() {
95 - #XOR and !bacula-clientonly controlled by REQUIRED_USE
96 - use mysql && export mydbtype="mysql"
97 - use postgres && export mydbtype="postgresql"
98 - use sqlite && export mydbtype="sqlite3"
99 -
100 - # create the daemon group and user
101 - if [ -z "$(egetent group bacula 2>/dev/null)" ]; then
102 - enewgroup bacula
103 - einfo
104 - einfo "The group 'bacula' has been created. Any users you add to this"
105 - einfo "group have access to files created by the daemons."
106 - einfo
107 - fi
108 -
109 - if ! use bacula-clientonly; then
110 - if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then
111 - enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw
112 - einfo
113 - einfo "The user 'bacula' has been created. Please see the bacula manual"
114 - einfo "for information about running bacula as a non-root user."
115 - einfo
116 - fi
117 - fi
118 -
119 - use python && python-single-r1_pkg_setup
120 -}
121 -
122 -src_prepare() {
123 - # adjusts default configuration files for several binaries
124 - # to /etc/bacula/<config> instead of ./<config>
125 - pushd src >&/dev/null || die
126 - for f in console/console.c dird/dird.c filed/filed.c \
127 - stored/bcopy.c stored/bextract.c stored/bls.c \
128 - stored/bscan.c stored/btape.c stored/stored.c \
129 - qt-console/main.cpp; do
130 - sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \
131 - || die "sed on ${f} failed"
132 - done
133 - popd >&/dev/null || die
134 -
135 - # bug 466688 drop deprecated categories from Desktop file
136 - sed -i -e 's/Application;//' scripts/bat.desktop.in || die
137 -
138 - # bug 466690 Use CXXFLAGS instead of CFLAGS
139 - sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
140 -
141 - # drop automatic install of unneeded documentation (for bug 356499)
142 - epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-doc.patch
143 -
144 - # bug #310087
145 - epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch
146 -
147 - # bug #311161
148 - epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-lib-search-path.patch
149 -
150 - # stop build for errors in subdirs
151 - epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-Makefile.patch
152 -
153 - # bat needs to respect LDFLAGS
154 - epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-ldflags.patch
155 -
156 - # bug #328701
157 - epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch
158 -
159 - epatch "${FILESDIR}"/5.2.10/${PN}-5.2.10-fix-static.patch
160 -
161 - # do not strip binaries
162 - sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die
163 - sed -i -e "s/strip /# strip /" src/console/Makefile.in || die
164 -
165 - # fix file not found error during make depend
166 - epatch "${FILESDIR}"/5.2.12/${PN}-5.2.12-depend.patch
167 -
168 - # Fix systemd unit files:
169 - # bug 497748
170 - sed -i -e '/Requires/d' platforms/systemd/*.service.in || die
171 - sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die
172 - # bug 504370
173 - sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in || die
174 - # bug 584442 and 504368
175 - sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in || die
176 -
177 - # Fix tmpfiles config for client-only (no bacula user) install
178 - # NOTE: Change only first occurance (user) not second (group)
179 - # bug 528398 and 577486
180 - if use bacula-clientonly; then
181 - sed -i -e 's/bacula/root/' platforms/systemd/bacula.conf.in || die
182 - fi
183 -
184 - # fix bundled libtool (bug 466696)
185 - # But first move directory with M4 macros out of the way.
186 - # It is only needed by autoconf and gives errors during elibtoolize.
187 - mv autoconf/libtool autoconf/libtool1 || die
188 - elibtoolize
189 -}
190 -
191 -src_configure() {
192 - local myconf=''
193 -
194 - if use bacula-clientonly; then
195 - myconf="${myconf} \
196 - $(use_enable bacula-clientonly client-only) \
197 - $(use_enable !static libtool) \
198 - $(use_enable static static-cons) \
199 - $(use_enable static static-fd)"
200 - else
201 - myconf="${myconf} \
202 - $(use_enable !bacula-nodir build-dird) \
203 - $(use_enable !bacula-nosd build-stored)"
204 - # bug #311099
205 - # database support needed by dir-only *and* sd-only
206 - # build as well (for building bscan, btape, etc.)
207 - myconf="${myconf} \
208 - --with-${mydbtype} \
209 - --enable-batch-insert"
210 - fi
211 -
212 - myconf="${myconf} \
213 - --disable-tray-monitor \
214 - $(use_with X x) \
215 - $(use_with python) \
216 - $(use_enable !readline conio) \
217 - $(use_enable readline) \
218 - $(use_with readline readline /usr) \
219 - $(use_with ssl openssl) \
220 - $(use_enable ipv6) \
221 - $(use_enable acl) \
222 - $(use_with tcpd tcp-wrappers)"
223 -
224 - econf \
225 - --libdir=/usr/$(get_libdir) \
226 - --docdir=/usr/share/doc/${PF} \
227 - --htmldir=/usr/share/doc/${PF}/html \
228 - --with-pid-dir=/var/run \
229 - --sysconfdir=/etc/bacula \
230 - --with-subsys-dir=/var/lock/subsys \
231 - --with-working-dir=/var/lib/bacula \
232 - --with-logdir=/var/lib/bacula \
233 - --with-scriptdir=/usr/libexec/bacula \
234 - --with-systemd=$(systemd_get_unitdir) \
235 - --with-dir-user=bacula \
236 - --with-dir-group=bacula \
237 - --with-sd-user=root \
238 - --with-sd-group=bacula \
239 - --with-fd-user=root \
240 - --with-fd-group=bacula \
241 - --enable-smartalloc \
242 - --disable-afs \
243 - --host=${CHOST} \
244 - ${myconf}
245 -}
246 -
247 -src_compile() {
248 - # Make build log verbose (bug #447806)
249 - emake NO_ECHO=""
250 -}
251 -
252 -src_install() {
253 - emake DESTDIR="${D}" install
254 - doicon scripts/bacula.png
255 -
256 - # remove some scripts we don't need at all
257 - rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql}
258 -
259 - # rename statically linked apps
260 - if use bacula-clientonly && use static ; then
261 - pushd "${D}"/usr/sbin || die
262 - mv static-bacula-fd bacula-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 bacula-clientonly; then
269 - # the database update scripts
270 - diropts -m0750
271 - insinto /usr/libexec/bacula/updatedb
272 - insopts -m0754
273 - doins "${S}"/updatedb/*
274 - fperms 0640 /usr/libexec/bacula/updatedb/README
275 -
276 - # the logrotate configuration
277 - # (now unconditional wrt bug #258187)
278 - diropts -m0755
279 - insinto /etc/logrotate.d
280 - insopts -m0644
281 - newins "${S}"/scripts/logrotate bacula
282 -
283 - # the logwatch scripts
284 - if use logwatch; then
285 - diropts -m0750
286 - dodir /etc/log.d/scripts/services
287 - dodir /etc/log.d/scripts/shared
288 - dodir /etc/log.d/conf/logfiles
289 - dodir /etc/log.d/conf/services
290 - pushd "${S}"/scripts/logwatch >&/dev/null || die
291 - emake DESTDIR="${D}" install
292 - popd >&/dev/null || die
293 - fi
294 - fi
295 -
296 - rm -vf "${D}"/usr/share/man/man1/bacula-bwxconsole.1*
297 - rm -vf "${D}"/usr/share/man/man1/bat.1*
298 - rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1*
299 - if use bacula-clientonly || use bacula-nodir; then
300 - rm -vf "${D}"/usr/share/man/man8/bacula-dir.8*
301 - rm -vf "${D}"/usr/share/man/man8/dbcheck.8*
302 - rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
303 - rm -vf "${D}"/usr/libexec/bacula/create_*_database
304 - rm -vf "${D}"/usr/libexec/bacula/drop_*_database
305 - rm -vf "${D}"/usr/libexec/bacula/make_*_tables
306 - rm -vf "${D}"/usr/libexec/bacula/update_*_tables
307 - rm -vf "${D}"/usr/libexec/bacula/drop_*_tables
308 - rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges
309 - rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup
310 - fi
311 - if use bacula-clientonly || use bacula-nosd; then
312 - rm -vf "${D}"/usr/share/man/man8/bacula-sd.8*
313 - rm -vf "${D}"/usr/share/man/man8/bcopy.8*
314 - rm -vf "${D}"/usr/share/man/man8/bextract.8*
315 - rm -vf "${D}"/usr/share/man/man8/bls.8*
316 - rm -vf "${D}"/usr/share/man/man8/bscan.8*
317 - rm -vf "${D}"/usr/share/man/man8/btape.8*
318 - rm -vf "${D}"/usr/libexec/bacula/disk-changer
319 - rm -vf "${D}"/usr/libexec/bacula/mtx-changer
320 - rm -vf "${D}"/usr/libexec/bacula/dvd-handler
321 - fi
322 -
323 - # documentation
324 - dodoc ChangeLog ReleaseNotes SUPPORT technotes
325 -
326 - # install examples (bug #457504)
327 - if use examples; then
328 - docinto examples/
329 - dodoc -r examples/*
330 - fi
331 -
332 - # vim-files
333 - if use vim-syntax; then
334 - insinto /usr/share/vim/vimfiles/syntax
335 - doins scripts/bacula.vim
336 - insinto /usr/share/vim/vimfiles/ftdetect
337 - newins scripts/filetype.vim bacula_ft.vim
338 - fi
339 -
340 - # setup init scripts
341 - myscripts="bacula-fd"
342 - if ! use bacula-clientonly; then
343 - if ! use bacula-nodir; then
344 - myscripts="${myscripts} bacula-dir"
345 - fi
346 - if ! use bacula-nosd; then
347 - myscripts="${myscripts} bacula-sd"
348 - fi
349 - fi
350 - for script in ${myscripts}; do
351 - # copy over init script and config to a temporary location
352 - # so we can modify them as needed
353 - cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
354 - cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
355 -
356 - # now set the database dependancy for the director init script
357 - case "${script}" in
358 - bacula-dir)
359 - case "${mydbtype}" in
360 - sqlite3)
361 - # sqlite databases don't have a daemon
362 - sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die
363 - ;;
364 - *)
365 - # all other databases have daemons
366 - sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die
367 - ;;
368 - esac
369 - ;;
370 - *)
371 - ;;
372 - esac
373 -
374 - # install init script and config
375 - newinitd "${T}/${script}".initd "${script}"
376 - newconfd "${T}/${script}".confd "${script}"
377 - done
378 -
379 - systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service
380 - systemd_dotmpfilesd "${S}"/platforms/systemd/bacula.conf
381 -
382 - # make sure the working directory exists
383 - diropts -m0750
384 - keepdir /var/lib/bacula
385 -
386 - # make sure bacula group can execute bacula libexec scripts
387 - fowners -R root:bacula /usr/libexec/bacula
388 -}
389 -
390 -pkg_postinst() {
391 - if use bacula-clientonly; then
392 - fowners root:bacula /var/lib/bacula
393 - else
394 - fowners bacula:bacula /var/lib/bacula
395 - fi
396 -
397 - einfo
398 - einfo "This Revision 6 of bacula-5.2.13 dropped support for building 'bat' as"
399 - einfo "Qt4 is not longer supported by Gentoo. Please use it only for installations"
400 - einfo "requiring an old file demon."
401 - einfo
402 - if ! use bacula-clientonly && ! use bacula-nodir; then
403 - einfo
404 - einfo "If this is a new install, you must create the ${mydbtype} databases with:"
405 - einfo " /usr/libexec/bacula/create_${mydbtype}_database"
406 - einfo " /usr/libexec/bacula/make_${mydbtype}_tables"
407 - einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges"
408 - einfo
409 - fi
410 -
411 - if use sqlite; then
412 - einfo
413 - einfo "Be aware that Bacula does not officially support SQLite database anymore."
414 - einfo "Best use it only for a client-only installation. See Bug #445540."
415 - einfo
416 - fi
417 -
418 - einfo "Please note that 'bconsole' will always be installed."
419 - einfo
420 -}
421
422 diff --git a/app-backup/bacula/bacula-9.0.6-r3.ebuild b/app-backup/bacula/bacula-9.0.6-r3.ebuild
423 deleted file mode 100644
424 index 0c4d61e2a76..00000000000
425 --- a/app-backup/bacula/bacula-9.0.6-r3.ebuild
426 +++ /dev/null
427 @@ -1,436 +0,0 @@
428 -# Copyright 1999-2018 Gentoo Foundation
429 -# Distributed under the terms of the GNU General Public License v2
430 -
431 -EAPI="6"
432 -
433 -inherit qmake-utils desktop systemd user libtool
434 -
435 -MY_PV=${PV/_beta/-b}
436 -MY_P=${PN}-${MY_PV}
437 -
438 -DESCRIPTION="Featureful client/server network backup suite"
439 -HOMEPAGE="http://www.bacula.org/"
440 -SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz"
441 -
442 -LICENSE="AGPL-3"
443 -SLOT="0"
444 -KEYWORDS="~amd64 ~ppc ~sparc ~x86"
445 -IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres qt5 readline +sqlite ssl static tcpd vim-syntax X"
446 -
447 -DEPEND="
448 - dev-libs/gmp:0
449 - !bacula-clientonly? (
450 - postgres? ( dev-db/postgresql:=[threads] )
451 - mysql? ( virtual/mysql )
452 - sqlite? ( dev-db/sqlite:3 )
453 - !bacula-nodir? ( virtual/mta )
454 - )
455 - qt5? (
456 - dev-qt/qtsvg:5
457 - x11-libs/qwt:6
458 - )
459 - logwatch? ( sys-apps/logwatch )
460 - tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
461 - readline? ( sys-libs/readline:0 )
462 - static? (
463 - acl? ( virtual/acl[static-libs] )
464 - sys-libs/zlib[static-libs]
465 - dev-libs/lzo[static-libs]
466 - sys-libs/ncurses:=[static-libs]
467 - ssl? (
468 - !libressl? ( dev-libs/openssl:0=[static-libs] )
469 - libressl? ( dev-libs/libressl:0=[static-libs] )
470 - )
471 - )
472 - !static? (
473 - acl? ( virtual/acl )
474 - sys-libs/zlib
475 - dev-libs/lzo
476 - sys-libs/ncurses:=
477 - ssl? (
478 - !libressl? ( dev-libs/openssl:0= )
479 - libressl? ( dev-libs/libressl:0= )
480 - )
481 - )"
482 -RDEPEND="${DEPEND}
483 - !bacula-clientonly? (
484 - !bacula-nosd? (
485 - sys-block/mtx
486 - app-arch/mt-st
487 - )
488 - )
489 - vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
490 -
491 -REQUIRED_USE="!bacula-clientonly? ( ^^ ( mysql postgres sqlite ) )
492 - static? ( bacula-clientonly )"
493 -
494 -S=${WORKDIR}/${MY_P}
495 -
496 -pkg_setup() {
497 - #XOR and !bacula-clientonly controlled by REQUIRED_USE
498 - use mysql && export mydbtype="mysql"
499 - use postgres && export mydbtype="postgresql"
500 - use sqlite && export mydbtype="sqlite3"
501 -
502 - # create the daemon group and user
503 - if [ -z "$(egetent group bacula 2>/dev/null)" ]; then
504 - enewgroup bacula
505 - einfo
506 - einfo "The group 'bacula' has been created. Any users you add to this"
507 - einfo "group have access to files created by the daemons."
508 - einfo
509 - fi
510 -
511 - if use bacula-clientonly && use static && use qt5; then
512 - ewarn
513 - ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt5' useflag."
514 - ewarn
515 - fi
516 -
517 - if ! use bacula-clientonly; then
518 - if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then
519 - enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw
520 - einfo
521 - einfo "The user 'bacula' has been created. Please see the bacula manual"
522 - einfo "for information about running bacula as a non-root user."
523 - einfo
524 - fi
525 - fi
526 -}
527 -
528 -src_prepare() {
529 - # adjusts default configuration files for several binaries
530 - # to /etc/bacula/<config> instead of ./<config>
531 - pushd src >&/dev/null || die
532 - for f in console/console.c dird/dird.c filed/filed.c \
533 - stored/bcopy.c stored/bextract.c stored/bls.c \
534 - stored/bscan.c stored/btape.c stored/stored.c \
535 - qt-console/main.cpp; do
536 - sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \
537 - || die "sed on ${f} failed"
538 - done
539 - popd >&/dev/null || die
540 -
541 - # bug 466688 drop deprecated categories from Desktop file
542 - sed -i -e 's/Application;//' scripts/bat.desktop.in || die
543 -
544 - # bug 466690 Use CXXFLAGS instead of CFLAGS
545 - sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
546 -
547 - # drop automatic install of unneeded documentation (for bug 356499)
548 - eapply -p0 "${FILESDIR}"/7.2.0/${PN}-7.2.0-doc.patch
549 -
550 - # bug #310087
551 - eapply "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch
552 -
553 - # bug #311161
554 - eapply -p0 "${FILESDIR}"/9.0.2/${PN}-9.0.2-lib-search-path.patch
555 -
556 - # bat needs to respect LDFLAGS and CFLAGS
557 - eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-bat-pro.patch
558 -
559 - # bug #328701
560 - eapply -p0 "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch
561 -
562 - eapply -p0 "${FILESDIR}"/9.0.2/${PN}-9.0.2-fix-static.patch
563 -
564 - # fix soname in libbaccat.so bug #602952
565 - eapply -p0 "${FILESDIR}/bacula-fix-sonames.patch"
566 -
567 - # do not strip binaries
568 - sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die
569 - sed -i -e "s/strip /# strip /" src/console/Makefile.in || die
570 -
571 - # fix file not found error during make depend
572 - eapply -p0 "${FILESDIR}"/7.0.2/${PN}-7.0.2-depend.patch
573 -
574 - # fix missing QtGlobal include in src/qt-console/pages.h for Qt5
575 - eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-fix-pages-h-qt-includes.patch
576 - eapply_user
577 -
578 - # Fix systemd unit files:
579 - # bug 497748
580 - sed -i -e '/Requires/d' platforms/systemd/*.service.in || die
581 - sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die
582 - # bug 504370
583 - sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in || die
584 - # bug 584442 and 504368
585 - sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in || die
586 -
587 - # build 'bat' for Qt5
588 - export QMAKE="$(qt5_get_bindir)"/qmake
589 -
590 - # adapt to >=Qt-5.9 (see bug #644566)
591 - # qmake needs an existing target file to generate install instructions
592 - sed -i -e 's#bins.files = bat#bins.files = .libs/bat#g' \
593 - src/qt-console/bat.pro.in || die
594 - mkdir src/qt-console/.libs || die
595 - touch src/qt-console/.libs/bat || die
596 - chmod 755 src/qt-console/.libs/bat || die
597 -
598 - # fix wrong handling of libressl version
599 - # needs separate handling for <libressl-2.7 and >=libressl2.7
600 - # (see bug #655520)
601 - if has_version "<dev-libs/libressl-2.7"; then
602 - eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-libressl26.patch
603 - else
604 - eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-libressl27.patch
605 - fi
606 -
607 - # fix bundled libtool (bug 466696)
608 - # But first move directory with M4 macros out of the way.
609 - # It is only needed by autoconf and gives errors during elibtoolize.
610 - mv autoconf/libtool autoconf/libtool1 || die
611 - elibtoolize
612 -}
613 -
614 -src_configure() {
615 - local myconf=''
616 -
617 - if use bacula-clientonly; then
618 - myconf="${myconf} \
619 - $(use_enable bacula-clientonly client-only) \
620 - $(use_enable !static libtool) \
621 - $(use_enable static static-cons) \
622 - $(use_enable static static-fd)"
623 - else
624 - myconf="${myconf} \
625 - $(use_enable !bacula-nodir build-dird) \
626 - $(use_enable !bacula-nosd build-stored)"
627 - # bug #311099
628 - # database support needed by dir-only *and* sd-only
629 - # build as well (for building bscan, btape, etc.)
630 - myconf="${myconf}
631 - --with-${mydbtype}"
632 - if use mysql; then
633 - myconf="${myconf} \
634 - --disable-batch-insert"
635 - else
636 - myconf="${myconf} \
637 - --enable-batch-insert"
638 - fi
639 - fi
640 -
641 - # do not build bat if 'static' clientonly
642 - if ! use bacula-clientonly || ! use static; then
643 - myconf="${myconf} \
644 - $(use_enable qt5 bat)"
645 - fi
646 -
647 - myconf="${myconf} \
648 - $(use_with X x) \
649 - $(use_enable !readline conio) \
650 - $(use_enable readline) \
651 - $(use_with readline readline /usr) \
652 - $(use_with ssl openssl) \
653 - $(use_enable ipv6) \
654 - $(use_enable acl) \
655 - $(use_with tcpd tcp-wrappers)"
656 -
657 - econf \
658 - --libdir=/usr/$(get_libdir) \
659 - --docdir=/usr/share/doc/${PF} \
660 - --htmldir=/usr/share/doc/${PF}/html \
661 - --with-pid-dir=/var/run \
662 - --sysconfdir=/etc/bacula \
663 - --with-subsys-dir=/var/lock/subsys \
664 - --with-working-dir=/var/lib/bacula \
665 - --with-logdir=/var/lib/bacula \
666 - --with-scriptdir=/usr/libexec/bacula \
667 - --with-systemd=$(systemd_get_systemunitdir) \
668 - --with-dir-user=bacula \
669 - --with-dir-group=bacula \
670 - --with-sd-user=root \
671 - --with-sd-group=bacula \
672 - --with-fd-user=root \
673 - --with-fd-group=bacula \
674 - --enable-smartalloc \
675 - --disable-afs \
676 - --host=${CHOST} \
677 - ${myconf}
678 -}
679 -
680 -src_compile() {
681 - # Make build log verbose (bug #447806)
682 - emake NO_ECHO=""
683 -}
684 -
685 -src_install() {
686 - emake DESTDIR="${D}" install
687 - doicon scripts/bacula.png
688 -
689 - # install bat icon and desktop file when enabled
690 - # (for some reason ./configure doesn't pick this up)
691 - if use qt5 && ! use static ; then
692 - doicon src/qt-console/images/bat_icon.png
693 - domenu scripts/bat.desktop
694 - fi
695 -
696 - # remove some scripts we don't need at all
697 - rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql}
698 -
699 - # rename statically linked apps
700 - if use bacula-clientonly && use static ; then
701 - pushd "${D}"/usr/sbin || die
702 - mv static-bacula-fd bacula-fd || die
703 - mv static-bconsole bconsole || die
704 - popd || die
705 - fi
706 -
707 - # extra files which 'make install' doesn't cover
708 - if ! use bacula-clientonly; then
709 - # the database update scripts
710 - diropts -m0750
711 - insinto /usr/libexec/bacula/updatedb
712 - insopts -m0754
713 - doins "${S}"/updatedb/*
714 - fperms 0640 /usr/libexec/bacula/updatedb/README
715 -
716 - # the logrotate configuration
717 - # (now unconditional wrt bug #258187)
718 - diropts -m0755
719 - insinto /etc/logrotate.d
720 - insopts -m0644
721 - newins "${S}"/scripts/logrotate bacula
722 -
723 - # the logwatch scripts
724 - if use logwatch; then
725 - diropts -m0750
726 - dodir /usr/share/logwatch/scripts/services
727 - dodir /usr/share/logwatch/scripts/shared
728 - dodir /etc/logwatch/conf/logfiles
729 - dodir /etc/logwatch/conf/services
730 - pushd "${S}"/scripts/logwatch >&/dev/null || die
731 - emake DESTDIR="${D}" install
732 - popd >&/dev/null || die
733 - fi
734 - fi
735 -
736 - if ! use qt5; then
737 - rm -vf "${D}"/usr/share/man/man1/bat.1*
738 - fi
739 - rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1*
740 - if use bacula-clientonly || use bacula-nodir; then
741 - rm -vf "${D}"/usr/share/man/man8/bacula-dir.8*
742 - rm -vf "${D}"/usr/share/man/man8/dbcheck.8*
743 - rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
744 - rm -vf "${D}"/usr/libexec/bacula/create_*_database
745 - rm -vf "${D}"/usr/libexec/bacula/drop_*_database
746 - rm -vf "${D}"/usr/libexec/bacula/make_*_tables
747 - rm -vf "${D}"/usr/libexec/bacula/update_*_tables
748 - rm -vf "${D}"/usr/libexec/bacula/drop_*_tables
749 - rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges
750 - rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup
751 - fi
752 - if use bacula-clientonly || use bacula-nosd; then
753 - rm -vf "${D}"/usr/share/man/man8/bacula-sd.8*
754 - rm -vf "${D}"/usr/share/man/man8/bcopy.8*
755 - rm -vf "${D}"/usr/share/man/man8/bextract.8*
756 - rm -vf "${D}"/usr/share/man/man8/bls.8*
757 - rm -vf "${D}"/usr/share/man/man8/bscan.8*
758 - rm -vf "${D}"/usr/share/man/man8/btape.8*
759 - rm -vf "${D}"/usr/libexec/bacula/disk-changer
760 - rm -vf "${D}"/usr/libexec/bacula/mtx-changer
761 - rm -vf "${D}"/usr/libexec/bacula/dvd-handler
762 - fi
763 -
764 - # documentation
765 - dodoc ChangeLog ReleaseNotes SUPPORT
766 -
767 - # install examples (bug #457504)
768 - if use examples; then
769 - docinto examples/
770 - dodoc -r examples/*
771 - fi
772 -
773 - # vim-files
774 - if use vim-syntax; then
775 - insinto /usr/share/vim/vimfiles/syntax
776 - doins scripts/bacula.vim
777 - insinto /usr/share/vim/vimfiles/ftdetect
778 - newins scripts/filetype.vim bacula_ft.vim
779 - fi
780 -
781 - # setup init scripts
782 - myscripts="bacula-fd"
783 - if ! use bacula-clientonly; then
784 - if ! use bacula-nodir; then
785 - myscripts="${myscripts} bacula-dir"
786 - fi
787 - if ! use bacula-nosd; then
788 - myscripts="${myscripts} bacula-sd"
789 - fi
790 - fi
791 - for script in ${myscripts}; do
792 - # copy over init script and config to a temporary location
793 - # so we can modify them as needed
794 - cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
795 - cp "${FILESDIR}/newscripts/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
796 -
797 - # now set the database dependancy for the director init script
798 - case "${script}" in
799 - bacula-dir)
800 - case "${mydbtype}" in
801 - sqlite3)
802 - # sqlite databases don't have a daemon
803 - sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die
804 - ;;
805 - *)
806 - # all other databases have daemons
807 - sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die
808 - ;;
809 - esac
810 - ;;
811 - *)
812 - ;;
813 - esac
814 -
815 - # install init script and config
816 - newinitd "${T}/${script}".initd "${script}"
817 - newconfd "${T}/${script}".confd "${script}"
818 - done
819 -
820 - systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service
821 -
822 - # make sure the working directory exists
823 - diropts -m0750
824 - keepdir /var/lib/bacula
825 -
826 - # make sure bacula group can execute bacula libexec scripts
827 - fowners -R root:bacula /usr/libexec/bacula
828 -}
829 -
830 -pkg_postinst() {
831 - if use bacula-clientonly; then
832 - fowners root:bacula /var/lib/bacula
833 - else
834 - fowners bacula:bacula /var/lib/bacula
835 - fi
836 -
837 - if ! use bacula-clientonly && ! use bacula-nodir; then
838 - einfo
839 - einfo "If this is a new install, you must create the ${mydbtype} databases with:"
840 - einfo " /usr/libexec/bacula/create_${mydbtype}_database"
841 - einfo " /usr/libexec/bacula/make_${mydbtype}_tables"
842 - einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges"
843 - einfo
844 -
845 - ewarn "ATTENTION!"
846 - ewarn "The format of the database may have changed."
847 - ewarn "If you just upgraded from a version below 9.0.0 you must run"
848 - ewarn "'update_bacula_tables' now."
849 - ewarn "Make sure to have a backup of your catalog before."
850 - ewarn
851 - fi
852 -
853 - if use sqlite; then
854 - einfo
855 - einfo "Be aware that Bacula does not officially support SQLite database anymore."
856 - einfo "Best use it only for a client-only installation. See Bug #445540."
857 - einfo
858 - fi
859 -
860 - einfo "Please note that 'bconsole' will always be installed. To compile 'bat'"
861 - einfo "you have to enable 'USE=qt5'."
862 - einfo
863 -}
864
865 diff --git a/app-backup/bacula/bacula-9.0.8.ebuild b/app-backup/bacula/bacula-9.0.8.ebuild
866 deleted file mode 100644
867 index 7b76c7626f6..00000000000
868 --- a/app-backup/bacula/bacula-9.0.8.ebuild
869 +++ /dev/null
870 @@ -1,434 +0,0 @@
871 -# Copyright 1999-2018 Gentoo Foundation
872 -# Distributed under the terms of the GNU General Public License v2
873 -
874 -EAPI="6"
875 -
876 -inherit qmake-utils desktop systemd user libtool
877 -
878 -MY_PV=${PV/_beta/-b}
879 -MY_P=${PN}-${MY_PV}
880 -
881 -DESCRIPTION="Featureful client/server network backup suite"
882 -HOMEPAGE="http://www.bacula.org/"
883 -SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz"
884 -
885 -LICENSE="AGPL-3"
886 -SLOT="0"
887 -KEYWORDS="~amd64 ~ppc ~sparc ~x86"
888 -IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres qt5 readline +sqlite ssl static tcpd vim-syntax X"
889 -
890 -DEPEND="
891 - dev-libs/gmp:0
892 - !bacula-clientonly? (
893 - postgres? ( dev-db/postgresql:=[threads] )
894 - mysql? ( virtual/mysql )
895 - sqlite? ( dev-db/sqlite:3 )
896 - !bacula-nodir? ( virtual/mta )
897 - )
898 - qt5? (
899 - dev-qt/qtsvg:5
900 - x11-libs/qwt:6
901 - )
902 - logwatch? ( sys-apps/logwatch )
903 - tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
904 - readline? ( sys-libs/readline:0 )
905 - static? (
906 - acl? ( virtual/acl[static-libs] )
907 - sys-libs/zlib[static-libs]
908 - dev-libs/lzo[static-libs]
909 - sys-libs/ncurses:=[static-libs]
910 - ssl? (
911 - !libressl? ( dev-libs/openssl:0=[static-libs] )
912 - libressl? ( dev-libs/libressl:0=[static-libs] )
913 - )
914 - )
915 - !static? (
916 - acl? ( virtual/acl )
917 - sys-libs/zlib
918 - dev-libs/lzo
919 - sys-libs/ncurses:=
920 - ssl? (
921 - !libressl? ( dev-libs/openssl:0= )
922 - libressl? ( dev-libs/libressl:0= )
923 - )
924 - )"
925 -RDEPEND="${DEPEND}
926 - !bacula-clientonly? (
927 - !bacula-nosd? (
928 - sys-block/mtx
929 - app-arch/mt-st
930 - )
931 - )
932 - vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
933 -
934 -REQUIRED_USE="!bacula-clientonly? ( ^^ ( mysql postgres sqlite ) )
935 - static? ( bacula-clientonly )"
936 -
937 -S=${WORKDIR}/${MY_P}
938 -
939 -pkg_setup() {
940 - #XOR and !bacula-clientonly controlled by REQUIRED_USE
941 - use mysql && export mydbtype="mysql"
942 - use postgres && export mydbtype="postgresql"
943 - use sqlite && export mydbtype="sqlite3"
944 -
945 - # create the daemon group and user
946 - if [ -z "$(egetent group bacula 2>/dev/null)" ]; then
947 - enewgroup bacula
948 - einfo
949 - einfo "The group 'bacula' has been created. Any users you add to this"
950 - einfo "group have access to files created by the daemons."
951 - einfo
952 - fi
953 -
954 - if use bacula-clientonly && use static && use qt5; then
955 - ewarn
956 - ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt5' useflag."
957 - ewarn
958 - fi
959 -
960 - if ! use bacula-clientonly; then
961 - if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then
962 - enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw
963 - einfo
964 - einfo "The user 'bacula' has been created. Please see the bacula manual"
965 - einfo "for information about running bacula as a non-root user."
966 - einfo
967 - fi
968 - fi
969 -}
970 -
971 -src_prepare() {
972 - # adjusts default configuration files for several binaries
973 - # to /etc/bacula/<config> instead of ./<config>
974 - pushd src >&/dev/null || die
975 - for f in console/console.c dird/dird.c filed/filed.c \
976 - stored/bcopy.c stored/bextract.c stored/bls.c \
977 - stored/bscan.c stored/btape.c stored/stored.c \
978 - qt-console/main.cpp; do
979 - sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \
980 - || die "sed on ${f} failed"
981 - done
982 - popd >&/dev/null || die
983 -
984 - # bug 466688 drop deprecated categories from Desktop file
985 - sed -i -e 's/Application;//' scripts/bat.desktop.in || die
986 -
987 - # bug 466690 Use CXXFLAGS instead of CFLAGS
988 - sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
989 -
990 - # drop automatic install of unneeded documentation (for bug 356499)
991 - eapply -p0 "${FILESDIR}"/7.2.0/${PN}-7.2.0-doc.patch
992 -
993 - # bug #310087
994 - eapply "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch
995 -
996 - # bug #311161
997 - eapply -p0 "${FILESDIR}"/9.0.2/${PN}-9.0.2-lib-search-path.patch
998 -
999 - # bat needs to respect LDFLAGS and CFLAGS
1000 - eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-bat-pro.patch
1001 -
1002 - # bug #328701
1003 - eapply -p0 "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch
1004 -
1005 - eapply -p0 "${FILESDIR}"/9.0.8/${PN}-9.0.8-fix-static.patch
1006 -
1007 - # fix soname in libbaccat.so bug #602952
1008 - eapply -p0 "${FILESDIR}/bacula-fix-sonames.patch"
1009 -
1010 - # do not strip binaries
1011 - sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die
1012 - sed -i -e "s/strip /# strip /" src/console/Makefile.in || die
1013 -
1014 - # fix file not found error during make depend
1015 - eapply -p0 "${FILESDIR}"/7.0.2/${PN}-7.0.2-depend.patch
1016 -
1017 - eapply_user
1018 -
1019 - # Fix systemd unit files:
1020 - # bug 497748
1021 - sed -i -e '/Requires/d' platforms/systemd/*.service.in || die
1022 - sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die
1023 - # bug 504370
1024 - sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in || die
1025 - # bug 584442 and 504368
1026 - sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in || die
1027 -
1028 - # build 'bat' for Qt5
1029 - export QMAKE="$(qt5_get_bindir)"/qmake
1030 -
1031 - # adapt to >=Qt-5.9 (see bug #644566)
1032 - # qmake needs an existing target file to generate install instructions
1033 - sed -i -e 's#bins.files = bat#bins.files = .libs/bat#g' \
1034 - src/qt-console/bat.pro.in || die
1035 - mkdir src/qt-console/.libs || die
1036 - touch src/qt-console/.libs/bat || die
1037 - chmod 755 src/qt-console/.libs/bat || die
1038 -
1039 - # fix wrong handling of libressl version
1040 - # needs separate handling for <libressl-2.7 and >=libressl2.7
1041 - # (see bug #655520)
1042 - if has_version "<dev-libs/libressl-2.7"; then
1043 - eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-libressl26.patch
1044 - else
1045 - eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-libressl27.patch
1046 - fi
1047 -
1048 - # fix bundled libtool (bug 466696)
1049 - # But first move directory with M4 macros out of the way.
1050 - # It is only needed by autoconf and gives errors during elibtoolize.
1051 - mv autoconf/libtool autoconf/libtool1 || die
1052 - elibtoolize
1053 -}
1054 -
1055 -src_configure() {
1056 - local myconf=''
1057 -
1058 - if use bacula-clientonly; then
1059 - myconf="${myconf} \
1060 - $(use_enable bacula-clientonly client-only) \
1061 - $(use_enable !static libtool) \
1062 - $(use_enable static static-cons) \
1063 - $(use_enable static static-fd)"
1064 - else
1065 - myconf="${myconf} \
1066 - $(use_enable !bacula-nodir build-dird) \
1067 - $(use_enable !bacula-nosd build-stored)"
1068 - # bug #311099
1069 - # database support needed by dir-only *and* sd-only
1070 - # build as well (for building bscan, btape, etc.)
1071 - myconf="${myconf}
1072 - --with-${mydbtype}"
1073 - if use mysql; then
1074 - myconf="${myconf} \
1075 - --disable-batch-insert"
1076 - else
1077 - myconf="${myconf} \
1078 - --enable-batch-insert"
1079 - fi
1080 - fi
1081 -
1082 - # do not build bat if 'static' clientonly
1083 - if ! use bacula-clientonly || ! use static; then
1084 - myconf="${myconf} \
1085 - $(use_enable qt5 bat)"
1086 - fi
1087 -
1088 - myconf="${myconf} \
1089 - $(use_with X x) \
1090 - $(use_enable !readline conio) \
1091 - $(use_enable readline) \
1092 - $(use_with readline readline /usr) \
1093 - $(use_with ssl openssl) \
1094 - $(use_enable ipv6) \
1095 - $(use_enable acl) \
1096 - $(use_with tcpd tcp-wrappers)"
1097 -
1098 - econf \
1099 - --libdir=/usr/$(get_libdir) \
1100 - --docdir=/usr/share/doc/${PF} \
1101 - --htmldir=/usr/share/doc/${PF}/html \
1102 - --with-pid-dir=/var/run \
1103 - --sysconfdir=/etc/bacula \
1104 - --with-subsys-dir=/var/lock/subsys \
1105 - --with-working-dir=/var/lib/bacula \
1106 - --with-logdir=/var/lib/bacula \
1107 - --with-scriptdir=/usr/libexec/bacula \
1108 - --with-systemd=$(systemd_get_systemunitdir) \
1109 - --with-dir-user=bacula \
1110 - --with-dir-group=bacula \
1111 - --with-sd-user=root \
1112 - --with-sd-group=bacula \
1113 - --with-fd-user=root \
1114 - --with-fd-group=bacula \
1115 - --enable-smartalloc \
1116 - --disable-afs \
1117 - --host=${CHOST} \
1118 - ${myconf}
1119 -}
1120 -
1121 -src_compile() {
1122 - # Make build log verbose (bug #447806)
1123 - emake NO_ECHO=""
1124 -}
1125 -
1126 -src_install() {
1127 - emake DESTDIR="${D}" install
1128 - doicon scripts/bacula.png
1129 -
1130 - # install bat icon and desktop file when enabled
1131 - # (for some reason ./configure doesn't pick this up)
1132 - if use qt5 && ! use static ; then
1133 - doicon src/qt-console/images/bat_icon.png
1134 - domenu scripts/bat.desktop
1135 - fi
1136 -
1137 - # remove some scripts we don't need at all
1138 - rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql}
1139 -
1140 - # rename statically linked apps
1141 - if use bacula-clientonly && use static ; then
1142 - pushd "${D}"/usr/sbin || die
1143 - mv static-bacula-fd bacula-fd || die
1144 - mv static-bconsole bconsole || die
1145 - popd || die
1146 - fi
1147 -
1148 - # extra files which 'make install' doesn't cover
1149 - if ! use bacula-clientonly; then
1150 - # the database update scripts
1151 - diropts -m0750
1152 - insinto /usr/libexec/bacula/updatedb
1153 - insopts -m0754
1154 - doins "${S}"/updatedb/*
1155 - fperms 0640 /usr/libexec/bacula/updatedb/README
1156 -
1157 - # the logrotate configuration
1158 - # (now unconditional wrt bug #258187)
1159 - diropts -m0755
1160 - insinto /etc/logrotate.d
1161 - insopts -m0644
1162 - newins "${S}"/scripts/logrotate bacula
1163 -
1164 - # the logwatch scripts
1165 - if use logwatch; then
1166 - diropts -m0750
1167 - dodir /usr/share/logwatch/scripts/services
1168 - dodir /usr/share/logwatch/scripts/shared
1169 - dodir /etc/logwatch/conf/logfiles
1170 - dodir /etc/logwatch/conf/services
1171 - pushd "${S}"/scripts/logwatch >&/dev/null || die
1172 - emake DESTDIR="${D}" install
1173 - popd >&/dev/null || die
1174 - fi
1175 - fi
1176 -
1177 - if ! use qt5; then
1178 - rm -vf "${D}"/usr/share/man/man1/bat.1*
1179 - fi
1180 - rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1*
1181 - if use bacula-clientonly || use bacula-nodir; then
1182 - rm -vf "${D}"/usr/share/man/man8/bacula-dir.8*
1183 - rm -vf "${D}"/usr/share/man/man8/dbcheck.8*
1184 - rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
1185 - rm -vf "${D}"/usr/libexec/bacula/create_*_database
1186 - rm -vf "${D}"/usr/libexec/bacula/drop_*_database
1187 - rm -vf "${D}"/usr/libexec/bacula/make_*_tables
1188 - rm -vf "${D}"/usr/libexec/bacula/update_*_tables
1189 - rm -vf "${D}"/usr/libexec/bacula/drop_*_tables
1190 - rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges
1191 - rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup
1192 - fi
1193 - if use bacula-clientonly || use bacula-nosd; then
1194 - rm -vf "${D}"/usr/share/man/man8/bacula-sd.8*
1195 - rm -vf "${D}"/usr/share/man/man8/bcopy.8*
1196 - rm -vf "${D}"/usr/share/man/man8/bextract.8*
1197 - rm -vf "${D}"/usr/share/man/man8/bls.8*
1198 - rm -vf "${D}"/usr/share/man/man8/bscan.8*
1199 - rm -vf "${D}"/usr/share/man/man8/btape.8*
1200 - rm -vf "${D}"/usr/libexec/bacula/disk-changer
1201 - rm -vf "${D}"/usr/libexec/bacula/mtx-changer
1202 - rm -vf "${D}"/usr/libexec/bacula/dvd-handler
1203 - fi
1204 -
1205 - # documentation
1206 - dodoc ChangeLog ReleaseNotes SUPPORT
1207 -
1208 - # install examples (bug #457504)
1209 - if use examples; then
1210 - docinto examples/
1211 - dodoc -r examples/*
1212 - fi
1213 -
1214 - # vim-files
1215 - if use vim-syntax; then
1216 - insinto /usr/share/vim/vimfiles/syntax
1217 - doins scripts/bacula.vim
1218 - insinto /usr/share/vim/vimfiles/ftdetect
1219 - newins scripts/filetype.vim bacula_ft.vim
1220 - fi
1221 -
1222 - # setup init scripts
1223 - myscripts="bacula-fd"
1224 - if ! use bacula-clientonly; then
1225 - if ! use bacula-nodir; then
1226 - myscripts="${myscripts} bacula-dir"
1227 - fi
1228 - if ! use bacula-nosd; then
1229 - myscripts="${myscripts} bacula-sd"
1230 - fi
1231 - fi
1232 - for script in ${myscripts}; do
1233 - # copy over init script and config to a temporary location
1234 - # so we can modify them as needed
1235 - cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
1236 - cp "${FILESDIR}/newscripts/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
1237 -
1238 - # now set the database dependancy for the director init script
1239 - case "${script}" in
1240 - bacula-dir)
1241 - case "${mydbtype}" in
1242 - sqlite3)
1243 - # sqlite databases don't have a daemon
1244 - sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die
1245 - ;;
1246 - *)
1247 - # all other databases have daemons
1248 - sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die
1249 - ;;
1250 - esac
1251 - ;;
1252 - *)
1253 - ;;
1254 - esac
1255 -
1256 - # install init script and config
1257 - newinitd "${T}/${script}".initd "${script}"
1258 - newconfd "${T}/${script}".confd "${script}"
1259 - done
1260 -
1261 - systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service
1262 -
1263 - # make sure the working directory exists
1264 - diropts -m0750
1265 - keepdir /var/lib/bacula
1266 -
1267 - # make sure bacula group can execute bacula libexec scripts
1268 - fowners -R root:bacula /usr/libexec/bacula
1269 -}
1270 -
1271 -pkg_postinst() {
1272 - if use bacula-clientonly; then
1273 - fowners root:bacula /var/lib/bacula
1274 - else
1275 - fowners bacula:bacula /var/lib/bacula
1276 - fi
1277 -
1278 - if ! use bacula-clientonly && ! use bacula-nodir; then
1279 - einfo
1280 - einfo "If this is a new install, you must create the ${mydbtype} databases with:"
1281 - einfo " /usr/libexec/bacula/create_${mydbtype}_database"
1282 - einfo " /usr/libexec/bacula/make_${mydbtype}_tables"
1283 - einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges"
1284 - einfo
1285 -
1286 - ewarn "ATTENTION!"
1287 - ewarn "The format of the database may have changed."
1288 - ewarn "If you just upgraded from a version below 9.0.0 you must run"
1289 - ewarn "'update_bacula_tables' now."
1290 - ewarn "Make sure to have a backup of your catalog before."
1291 - ewarn
1292 - fi
1293 -
1294 - if use sqlite; then
1295 - einfo
1296 - einfo "Be aware that Bacula does not officially support SQLite database anymore."
1297 - einfo "Best use it only for a client-only installation. See Bug #445540."
1298 - einfo
1299 - fi
1300 -
1301 - einfo "Please note that 'bconsole' will always be installed. To compile 'bat'"
1302 - einfo "you have to enable 'USE=qt5'."
1303 - einfo
1304 -}