1 |
commit: 7c3ad668a4f0093af54847e2810a5948a99602d9 |
2 |
Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 11 17:44:43 2018 +0000 |
4 |
Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 11 17:46:04 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c3ad668 |
7 |
|
8 |
app-backup/bacula: Drop old versions depending on Qt4 |
9 |
|
10 |
ppc and sparc project gave ack for not having to wait for stabilization |
11 |
of bacula-9.0.6-r2 (bug #651078, comment 4) |
12 |
|
13 |
Bugs: https://bugs.gentoo.org/644566 |
14 |
Closes: https://bugs.gentoo.org/651078 |
15 |
Package-Manager: Portage-2.3.36, Repoman-2.3.9 |
16 |
|
17 |
app-backup/bacula/Manifest | 4 - |
18 |
app-backup/bacula/bacula-5.2.13-r5.ebuild | 424 ----------------------------- |
19 |
app-backup/bacula/bacula-7.4.4-r2.ebuild | 412 ----------------------------- |
20 |
app-backup/bacula/bacula-7.4.6.ebuild | 412 ----------------------------- |
21 |
app-backup/bacula/bacula-7.4.7.ebuild | 412 ----------------------------- |
22 |
app-backup/bacula/bacula-9.0.3.ebuild | 418 ----------------------------- |
23 |
app-backup/bacula/bacula-9.0.6-r1.ebuild | 426 ------------------------------ |
24 |
app-backup/bacula/bacula-9.0.6.ebuild | 418 ----------------------------- |
25 |
8 files changed, 2926 deletions(-) |
26 |
|
27 |
diff --git a/app-backup/bacula/Manifest b/app-backup/bacula/Manifest |
28 |
index 53d995e50e4..b7e56cf079d 100644 |
29 |
--- a/app-backup/bacula/Manifest |
30 |
+++ b/app-backup/bacula/Manifest |
31 |
@@ -1,6 +1,2 @@ |
32 |
DIST bacula-5.2.13.tar.gz 4243395 BLAKE2B 5cad5d2675f8a2dd28a76c1a4e4c649d1bf9b031e5e4febfb537a72a0481c2f7c3e80d39b84657238bc147b58174ce544749aed70882f66678edfaa2fb51ac2f SHA512 dfdff353f5b6ed4d85013dc292526706bbd67066f7057a114012172926c819c8df1eb8779166d5a90db3a49a5584f0a8daf7566cc93cf4fa3f1bdda245b55cf0 |
33 |
-DIST bacula-7.4.4.tar.gz 3312271 BLAKE2B 9c68a3e0d2b610bb65137d15533de272eda2ffc22ba6e73ff9b8631a5d8ca45fc5595928eeb28a577a8e055ccaf82d275424c756b7f4abf9690175b20c75d847 SHA512 37f1fd0d91f027fc12cd43b5e575abf0f8d9ccad805775bd308a06cff843b77cfc599e0d45eaf83536c1be669a5189c35744b5774adaefa606fed31d63888029 |
34 |
-DIST bacula-7.4.6.tar.gz 3312673 BLAKE2B d614b3b58970cfeda2de66108c8663a7f42da8302ac6b19c77a70a81830b5f93c13913dd930d3a35abfbc6910a7dd4757f4ed2a9a2ac70ea3bb5ec0ca986038a SHA512 2d8c47d184dd5d611bf3d209f0d39b0d2e60763bbb757a393c1ddb2fb361de855a4d53d4cbd76f4fda555cc7c069e79eefcb57fc01389a98dec6dc7815d0cde7 |
35 |
-DIST bacula-7.4.7.tar.gz 3312991 BLAKE2B 5ce6306613ac649e0e4fff97d967f174640c3c478a408f003e031a265c83a8b28b3212fa798d9724759c45f2efa5b7c3a5edc607f1be9e3e3d1bfb4d94bfe854 SHA512 2dcffe3f02de8e7dedc11f58aeca58fb95486757579065564753376d3fab7699d7577c189d0d34f8490706d773cd6a95d42ef1f35facb95e6fff10dad085c0d0 |
36 |
-DIST bacula-9.0.3.tar.gz 3951688 BLAKE2B ca7972ff6910f63ae4eb4b828322d9137534462b57fbbac9e110d02795a46d9186d1877e7a17b4c08d671e12ee35c7cf025fbe034c865e5eeeac10c01303a246 SHA512 025cdcc3d92f2674cda7ed2f7d050a8826daf71d0f435d2b34b2514d3f03ab09a299a1882d9d9d51134445f8ba71bb38dc3fabf12d28877604a1b88d92623f7f |
37 |
DIST bacula-9.0.6.tar.gz 3984215 BLAKE2B 89d0c83ae1ffd2c2677f5882eebc0feac12780a78f9fcf6d30e44981a09f29dd8bd3f0e55ba963a0ed03099117f2d645cf0402cf528fe939d88210ed547ea157 SHA512 a85b8e089951eb9949c9906af45f204a69cd4a7d2e0f29439b74a29ade20c05a49a8c38665189a46c0ad07af0c97380485e10da6aa53dfc47a22934f589f265e |
38 |
|
39 |
diff --git a/app-backup/bacula/bacula-5.2.13-r5.ebuild b/app-backup/bacula/bacula-5.2.13-r5.ebuild |
40 |
deleted file mode 100644 |
41 |
index f69c8982110..00000000000 |
42 |
--- a/app-backup/bacula/bacula-5.2.13-r5.ebuild |
43 |
+++ /dev/null |
44 |
@@ -1,424 +0,0 @@ |
45 |
-# Copyright 1999-2017 Gentoo Foundation |
46 |
-# Distributed under the terms of the GNU General Public License v2 |
47 |
- |
48 |
-EAPI="5" |
49 |
- |
50 |
-PYTHON_COMPAT=( python2_7 ) |
51 |
-PYTHON_REQ_USE="threads" |
52 |
- |
53 |
-inherit eutils multilib python-single-r1 qt4-r2 systemd user libtool |
54 |
- |
55 |
-MY_PV=${PV/_beta/-b} |
56 |
-MY_P=${PN}-${MY_PV} |
57 |
- |
58 |
-DESCRIPTION="Featureful client/server network backup suite" |
59 |
-HOMEPAGE="http://www.bacula.org/" |
60 |
-SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz" |
61 |
- |
62 |
-LICENSE="AGPL-3" |
63 |
-SLOT="0" |
64 |
-KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
65 |
-IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres python qt4 readline +sqlite ssl static tcpd vim-syntax X" |
66 |
- |
67 |
-DEPEND=" |
68 |
- dev-libs/gmp:0 |
69 |
- !bacula-clientonly? ( |
70 |
- postgres? ( dev-db/postgresql:*[threads] ) |
71 |
- mysql? ( virtual/mysql ) |
72 |
- sqlite? ( dev-db/sqlite:3 ) |
73 |
- !bacula-nodir? ( virtual/mta ) |
74 |
- ) |
75 |
- qt4? ( |
76 |
- dev-qt/qtsvg:4 |
77 |
- x11-libs/qwt:5 |
78 |
- ) |
79 |
- logwatch? ( sys-apps/logwatch ) |
80 |
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
81 |
- readline? ( sys-libs/readline:0 ) |
82 |
- static? ( |
83 |
- acl? ( virtual/acl[static-libs] ) |
84 |
- sys-libs/zlib[static-libs] |
85 |
- dev-libs/lzo[static-libs] |
86 |
- sys-libs/ncurses:=[static-libs] |
87 |
- ssl? ( |
88 |
- !libressl? ( dev-libs/openssl:0=[static-libs] ) |
89 |
- libressl? ( dev-libs/libressl:0=[static-libs] ) |
90 |
- ) |
91 |
- ) |
92 |
- !static? ( |
93 |
- acl? ( virtual/acl ) |
94 |
- sys-libs/zlib |
95 |
- dev-libs/lzo |
96 |
- sys-libs/ncurses:= |
97 |
- ssl? ( |
98 |
- !libressl? ( dev-libs/openssl:0= ) |
99 |
- libressl? ( dev-libs/libressl:0= ) |
100 |
- ) |
101 |
- ) |
102 |
- python? ( ${PYTHON_DEPS} ) |
103 |
- " |
104 |
-RDEPEND="${DEPEND} |
105 |
- !bacula-clientonly? ( |
106 |
- !bacula-nosd? ( |
107 |
- sys-block/mtx |
108 |
- app-arch/mt-st |
109 |
- ) |
110 |
- ) |
111 |
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
112 |
- |
113 |
-REQUIRED_USE="!bacula-clientonly? ( ^^ ( mysql postgres sqlite ) ) |
114 |
- static? ( bacula-clientonly ) |
115 |
- python? ( ${PYTHON_REQUIRED_USE} )" |
116 |
- |
117 |
-S=${WORKDIR}/${MY_P} |
118 |
- |
119 |
-pkg_setup() { |
120 |
- #XOR and !bacula-clientonly controlled by REQUIRED_USE |
121 |
- use mysql && export mydbtype="mysql" |
122 |
- use postgres && export mydbtype="postgresql" |
123 |
- use sqlite && export mydbtype="sqlite3" |
124 |
- |
125 |
- # create the daemon group and user |
126 |
- if [ -z "$(egetent group bacula 2>/dev/null)" ]; then |
127 |
- enewgroup bacula |
128 |
- einfo |
129 |
- einfo "The group 'bacula' has been created. Any users you add to this" |
130 |
- einfo "group have access to files created by the daemons." |
131 |
- einfo |
132 |
- fi |
133 |
- |
134 |
- if use bacula-clientonly && use static && use qt4; then |
135 |
- ewarn |
136 |
- ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag." |
137 |
- ewarn |
138 |
- fi |
139 |
- |
140 |
- if ! use bacula-clientonly; then |
141 |
- if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then |
142 |
- enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw |
143 |
- einfo |
144 |
- einfo "The user 'bacula' has been created. Please see the bacula manual" |
145 |
- einfo "for information about running bacula as a non-root user." |
146 |
- einfo |
147 |
- fi |
148 |
- fi |
149 |
- |
150 |
- use python && python-single-r1_pkg_setup |
151 |
-} |
152 |
- |
153 |
-src_prepare() { |
154 |
- # adjusts default configuration files for several binaries |
155 |
- # to /etc/bacula/<config> instead of ./<config> |
156 |
- pushd src >&/dev/null || die |
157 |
- for f in console/console.c dird/dird.c filed/filed.c \ |
158 |
- stored/bcopy.c stored/bextract.c stored/bls.c \ |
159 |
- stored/bscan.c stored/btape.c stored/stored.c \ |
160 |
- qt-console/main.cpp; do |
161 |
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \ |
162 |
- || die "sed on ${f} failed" |
163 |
- done |
164 |
- popd >&/dev/null || die |
165 |
- |
166 |
- # bug 466688 drop deprecated categories from Desktop file |
167 |
- sed -i -e 's/Application;//' scripts/bat.desktop.in || die |
168 |
- |
169 |
- # bug 466690 Use CXXFLAGS instead of CFLAGS |
170 |
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die |
171 |
- |
172 |
- # drop automatic install of unneeded documentation (for bug 356499) |
173 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-doc.patch |
174 |
- |
175 |
- # bug #310087 |
176 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch |
177 |
- |
178 |
- # bug #311161 |
179 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-lib-search-path.patch |
180 |
- |
181 |
- # stop build for errors in subdirs |
182 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-Makefile.patch |
183 |
- |
184 |
- # bat needs to respect LDFLAGS |
185 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-ldflags.patch |
186 |
- |
187 |
- # bug #328701 |
188 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch |
189 |
- |
190 |
- epatch "${FILESDIR}"/5.2.10/${PN}-5.2.10-fix-static.patch |
191 |
- |
192 |
- # do not strip binaries |
193 |
- sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die |
194 |
- sed -i -e "s/strip /# strip /" src/console/Makefile.in || die |
195 |
- |
196 |
- # fix file not found error during make depend |
197 |
- epatch "${FILESDIR}"/5.2.12/${PN}-5.2.12-depend.patch |
198 |
- |
199 |
- # Fix systemd unit files: |
200 |
- # bug 497748 |
201 |
- sed -i -e '/Requires/d' platforms/systemd/*.service.in || die |
202 |
- sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die |
203 |
- # bug 504370 |
204 |
- sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in || die |
205 |
- # bug 584442 and 504368 |
206 |
- sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in || die |
207 |
- |
208 |
- # Fix tmpfiles config for client-only (no bacula user) install |
209 |
- # NOTE: Change only first occurance (user) not second (group) |
210 |
- # bug 528398 and 577486 |
211 |
- if use bacula-clientonly; then |
212 |
- sed -i -e 's/bacula/root/' platforms/systemd/bacula.conf.in || die |
213 |
- fi |
214 |
- |
215 |
- # fix bundled libtool (bug 466696) |
216 |
- # But first move directory with M4 macros out of the way. |
217 |
- # It is only needed by i autoconf and gives errors during elibtoolize. |
218 |
- mv autoconf/libtool autoconf/libtool1 || die |
219 |
- elibtoolize |
220 |
-} |
221 |
- |
222 |
-src_configure() { |
223 |
- local myconf='' |
224 |
- |
225 |
- if use bacula-clientonly; then |
226 |
- myconf="${myconf} \ |
227 |
- $(use_enable bacula-clientonly client-only) \ |
228 |
- $(use_enable !static libtool) \ |
229 |
- $(use_enable static static-cons) \ |
230 |
- $(use_enable static static-fd)" |
231 |
- else |
232 |
- myconf="${myconf} \ |
233 |
- $(use_enable !bacula-nodir build-dird) \ |
234 |
- $(use_enable !bacula-nosd build-stored)" |
235 |
- # bug #311099 |
236 |
- # database support needed by dir-only *and* sd-only |
237 |
- # build as well (for building bscan, btape, etc.) |
238 |
- myconf="${myconf} \ |
239 |
- --with-${mydbtype} \ |
240 |
- --enable-batch-insert" |
241 |
- fi |
242 |
- |
243 |
- # do not build bat if 'static' clientonly |
244 |
- if ! use bacula-clientonly || ! use static; then |
245 |
- myconf="${myconf} \ |
246 |
- $(use_enable qt4 bat)" |
247 |
- fi |
248 |
- |
249 |
- myconf="${myconf} \ |
250 |
- --disable-tray-monitor \ |
251 |
- $(use_with X x) \ |
252 |
- $(use_with python) \ |
253 |
- $(use_enable !readline conio) \ |
254 |
- $(use_enable readline) \ |
255 |
- $(use_with readline readline /usr) \ |
256 |
- $(use_with ssl openssl) \ |
257 |
- $(use_enable ipv6) \ |
258 |
- $(use_enable acl) \ |
259 |
- $(use_with tcpd tcp-wrappers)" |
260 |
- |
261 |
- econf \ |
262 |
- --libdir=/usr/$(get_libdir) \ |
263 |
- --docdir=/usr/share/doc/${PF} \ |
264 |
- --htmldir=/usr/share/doc/${PF}/html \ |
265 |
- --with-pid-dir=/var/run \ |
266 |
- --sysconfdir=/etc/bacula \ |
267 |
- --with-subsys-dir=/var/lock/subsys \ |
268 |
- --with-working-dir=/var/lib/bacula \ |
269 |
- --with-logdir=/var/lib/bacula \ |
270 |
- --with-scriptdir=/usr/libexec/bacula \ |
271 |
- --with-systemd=$(systemd_get_unitdir) \ |
272 |
- --with-dir-user=bacula \ |
273 |
- --with-dir-group=bacula \ |
274 |
- --with-sd-user=root \ |
275 |
- --with-sd-group=bacula \ |
276 |
- --with-fd-user=root \ |
277 |
- --with-fd-group=bacula \ |
278 |
- --enable-smartalloc \ |
279 |
- --disable-afs \ |
280 |
- --host=${CHOST} \ |
281 |
- ${myconf} |
282 |
- # correct configuration for QT based bat |
283 |
- if use qt4 ; then |
284 |
- pushd src/qt-console |
285 |
- eqmake4 |
286 |
- popd |
287 |
- fi |
288 |
-} |
289 |
- |
290 |
-src_compile() { |
291 |
- # Make build log verbose (bug #447806) |
292 |
- emake NO_ECHO="" |
293 |
-} |
294 |
- |
295 |
-src_install() { |
296 |
- emake DESTDIR="${D}" install |
297 |
- doicon scripts/bacula.png |
298 |
- |
299 |
- # install bat icon and desktop file when enabled |
300 |
- # (for some reason ./configure doesn't pick this up) |
301 |
- if use qt4 && ! use static ; then |
302 |
- doicon src/qt-console/images/bat_icon.png |
303 |
- domenu scripts/bat.desktop |
304 |
- fi |
305 |
- |
306 |
- # remove some scripts we don't need at all |
307 |
- rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql} |
308 |
- |
309 |
- # rename statically linked apps |
310 |
- if use bacula-clientonly && use static ; then |
311 |
- pushd "${D}"/usr/sbin || die |
312 |
- mv static-bacula-fd bacula-fd || die |
313 |
- mv static-bconsole bconsole || die |
314 |
- popd || die |
315 |
- fi |
316 |
- |
317 |
- # extra files which 'make install' doesn't cover |
318 |
- if ! use bacula-clientonly; then |
319 |
- # the database update scripts |
320 |
- diropts -m0750 |
321 |
- insinto /usr/libexec/bacula/updatedb |
322 |
- insopts -m0754 |
323 |
- doins "${S}"/updatedb/* |
324 |
- fperms 0640 /usr/libexec/bacula/updatedb/README |
325 |
- |
326 |
- # the logrotate configuration |
327 |
- # (now unconditional wrt bug #258187) |
328 |
- diropts -m0755 |
329 |
- insinto /etc/logrotate.d |
330 |
- insopts -m0644 |
331 |
- newins "${S}"/scripts/logrotate bacula |
332 |
- |
333 |
- # the logwatch scripts |
334 |
- if use logwatch; then |
335 |
- diropts -m0750 |
336 |
- dodir /etc/log.d/scripts/services |
337 |
- dodir /etc/log.d/scripts/shared |
338 |
- dodir /etc/log.d/conf/logfiles |
339 |
- dodir /etc/log.d/conf/services |
340 |
- pushd "${S}"/scripts/logwatch >&/dev/null || die |
341 |
- emake DESTDIR="${D}" install |
342 |
- popd >&/dev/null || die |
343 |
- fi |
344 |
- fi |
345 |
- |
346 |
- rm -vf "${D}"/usr/share/man/man1/bacula-bwxconsole.1* |
347 |
- if ! use qt4; then |
348 |
- rm -vf "${D}"/usr/share/man/man1/bat.1* |
349 |
- fi |
350 |
- rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1* |
351 |
- if use bacula-clientonly || use bacula-nodir; then |
352 |
- rm -vf "${D}"/usr/share/man/man8/bacula-dir.8* |
353 |
- rm -vf "${D}"/usr/share/man/man8/dbcheck.8* |
354 |
- rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
355 |
- rm -vf "${D}"/usr/libexec/bacula/create_*_database |
356 |
- rm -vf "${D}"/usr/libexec/bacula/drop_*_database |
357 |
- rm -vf "${D}"/usr/libexec/bacula/make_*_tables |
358 |
- rm -vf "${D}"/usr/libexec/bacula/update_*_tables |
359 |
- rm -vf "${D}"/usr/libexec/bacula/drop_*_tables |
360 |
- rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges |
361 |
- rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup |
362 |
- fi |
363 |
- if use bacula-clientonly || use bacula-nosd; then |
364 |
- rm -vf "${D}"/usr/share/man/man8/bacula-sd.8* |
365 |
- rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
366 |
- rm -vf "${D}"/usr/share/man/man8/bextract.8* |
367 |
- rm -vf "${D}"/usr/share/man/man8/bls.8* |
368 |
- rm -vf "${D}"/usr/share/man/man8/bscan.8* |
369 |
- rm -vf "${D}"/usr/share/man/man8/btape.8* |
370 |
- rm -vf "${D}"/usr/libexec/bacula/disk-changer |
371 |
- rm -vf "${D}"/usr/libexec/bacula/mtx-changer |
372 |
- rm -vf "${D}"/usr/libexec/bacula/dvd-handler |
373 |
- fi |
374 |
- |
375 |
- # documentation |
376 |
- dodoc ChangeLog ReleaseNotes SUPPORT technotes |
377 |
- |
378 |
- # install examples (bug #457504) |
379 |
- if use examples; then |
380 |
- docinto examples/ |
381 |
- dodoc -r examples/* |
382 |
- fi |
383 |
- |
384 |
- # vim-files |
385 |
- if use vim-syntax; then |
386 |
- insinto /usr/share/vim/vimfiles/syntax |
387 |
- doins scripts/bacula.vim |
388 |
- insinto /usr/share/vim/vimfiles/ftdetect |
389 |
- newins scripts/filetype.vim bacula_ft.vim |
390 |
- fi |
391 |
- |
392 |
- # setup init scripts |
393 |
- myscripts="bacula-fd" |
394 |
- if ! use bacula-clientonly; then |
395 |
- if ! use bacula-nodir; then |
396 |
- myscripts="${myscripts} bacula-dir" |
397 |
- fi |
398 |
- if ! use bacula-nosd; then |
399 |
- myscripts="${myscripts} bacula-sd" |
400 |
- fi |
401 |
- fi |
402 |
- for script in ${myscripts}; do |
403 |
- # copy over init script and config to a temporary location |
404 |
- # so we can modify them as needed |
405 |
- cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" |
406 |
- cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
407 |
- |
408 |
- # now set the database dependancy for the director init script |
409 |
- case "${script}" in |
410 |
- bacula-dir) |
411 |
- case "${mydbtype}" in |
412 |
- sqlite3) |
413 |
- # sqlite databases don't have a daemon |
414 |
- sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die |
415 |
- ;; |
416 |
- *) |
417 |
- # all other databases have daemons |
418 |
- sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die |
419 |
- ;; |
420 |
- esac |
421 |
- ;; |
422 |
- *) |
423 |
- ;; |
424 |
- esac |
425 |
- |
426 |
- # install init script and config |
427 |
- newinitd "${T}/${script}".initd "${script}" |
428 |
- newconfd "${T}/${script}".confd "${script}" |
429 |
- done |
430 |
- |
431 |
- systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service |
432 |
- systemd_dotmpfilesd "${S}"/platforms/systemd/bacula.conf |
433 |
- |
434 |
- # make sure the working directory exists |
435 |
- diropts -m0750 |
436 |
- keepdir /var/lib/bacula |
437 |
- |
438 |
- # make sure bacula group can execute bacula libexec scripts |
439 |
- fowners -R root:bacula /usr/libexec/bacula |
440 |
-} |
441 |
- |
442 |
-pkg_postinst() { |
443 |
- if use bacula-clientonly; then |
444 |
- fowners root:bacula /var/lib/bacula |
445 |
- else |
446 |
- fowners bacula:bacula /var/lib/bacula |
447 |
- fi |
448 |
- |
449 |
- if ! use bacula-clientonly && ! use bacula-nodir; then |
450 |
- einfo |
451 |
- einfo "If this is a new install, you must create the ${mydbtype} databases with:" |
452 |
- einfo " /usr/libexec/bacula/create_${mydbtype}_database" |
453 |
- einfo " /usr/libexec/bacula/make_${mydbtype}_tables" |
454 |
- einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges" |
455 |
- einfo |
456 |
- fi |
457 |
- |
458 |
- if use sqlite; then |
459 |
- einfo |
460 |
- einfo "Be aware that Bacula does not officially support SQLite database anymore." |
461 |
- einfo "Best use it only for a client-only installation. See Bug #445540." |
462 |
- einfo |
463 |
- fi |
464 |
- |
465 |
- einfo "Please note that 'bconsole' will always be installed. To compile 'bat'" |
466 |
- einfo "you have to enable 'USE=qt4'." |
467 |
- einfo |
468 |
-} |
469 |
|
470 |
diff --git a/app-backup/bacula/bacula-7.4.4-r2.ebuild b/app-backup/bacula/bacula-7.4.4-r2.ebuild |
471 |
deleted file mode 100644 |
472 |
index d707c4c8d81..00000000000 |
473 |
--- a/app-backup/bacula/bacula-7.4.4-r2.ebuild |
474 |
+++ /dev/null |
475 |
@@ -1,412 +0,0 @@ |
476 |
-# Copyright 1999-2017 Gentoo Foundation |
477 |
-# Distributed under the terms of the GNU General Public License v2 |
478 |
- |
479 |
-EAPI="5" |
480 |
- |
481 |
-inherit eutils multilib qt4-r2 systemd user libtool |
482 |
- |
483 |
-MY_PV=${PV/_beta/-b} |
484 |
-MY_P=${PN}-${MY_PV} |
485 |
- |
486 |
-DESCRIPTION="Featureful client/server network backup suite" |
487 |
-HOMEPAGE="http://www.bacula.org/" |
488 |
-SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz" |
489 |
- |
490 |
-LICENSE="AGPL-3" |
491 |
-SLOT="0" |
492 |
-KEYWORDS="amd64 ppc sparc x86" |
493 |
-IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres qt4 readline +sqlite ssl static tcpd vim-syntax X" |
494 |
- |
495 |
-DEPEND=" |
496 |
- dev-libs/gmp:0 |
497 |
- !bacula-clientonly? ( |
498 |
- postgres? ( dev-db/postgresql:=[threads] ) |
499 |
- mysql? ( virtual/mysql ) |
500 |
- sqlite? ( dev-db/sqlite:3 ) |
501 |
- !bacula-nodir? ( virtual/mta ) |
502 |
- ) |
503 |
- qt4? ( |
504 |
- dev-qt/qtsvg:4 |
505 |
- x11-libs/qwt:5 |
506 |
- ) |
507 |
- logwatch? ( sys-apps/logwatch ) |
508 |
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
509 |
- readline? ( sys-libs/readline:0 ) |
510 |
- static? ( |
511 |
- acl? ( virtual/acl[static-libs] ) |
512 |
- sys-libs/zlib[static-libs] |
513 |
- dev-libs/lzo[static-libs] |
514 |
- sys-libs/ncurses:=[static-libs] |
515 |
- ssl? ( |
516 |
- !libressl? ( dev-libs/openssl:0=[static-libs] ) |
517 |
- libressl? ( dev-libs/libressl:0=[static-libs] ) |
518 |
- ) |
519 |
- ) |
520 |
- !static? ( |
521 |
- acl? ( virtual/acl ) |
522 |
- sys-libs/zlib |
523 |
- dev-libs/lzo |
524 |
- sys-libs/ncurses:= |
525 |
- ssl? ( |
526 |
- !libressl? ( dev-libs/openssl:0= ) |
527 |
- libressl? ( dev-libs/libressl:0= ) |
528 |
- ) |
529 |
- )" |
530 |
-RDEPEND="${DEPEND} |
531 |
- !bacula-clientonly? ( |
532 |
- !bacula-nosd? ( |
533 |
- sys-block/mtx |
534 |
- app-arch/mt-st |
535 |
- ) |
536 |
- ) |
537 |
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
538 |
- |
539 |
-REQUIRED_USE="!bacula-clientonly? ( ^^ ( mysql postgres sqlite ) ) |
540 |
- static? ( bacula-clientonly )" |
541 |
- |
542 |
-S=${WORKDIR}/${MY_P} |
543 |
- |
544 |
-pkg_setup() { |
545 |
- #XOR and !bacula-clientonly controlled by REQUIRED_USE |
546 |
- use mysql && export mydbtype="mysql" |
547 |
- use postgres && export mydbtype="postgresql" |
548 |
- use sqlite && export mydbtype="sqlite3" |
549 |
- |
550 |
- # create the daemon group and user |
551 |
- if [ -z "$(egetent group bacula 2>/dev/null)" ]; then |
552 |
- enewgroup bacula |
553 |
- einfo |
554 |
- einfo "The group 'bacula' has been created. Any users you add to this" |
555 |
- einfo "group have access to files created by the daemons." |
556 |
- einfo |
557 |
- fi |
558 |
- |
559 |
- if use bacula-clientonly && use static && use qt4; then |
560 |
- ewarn |
561 |
- ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag." |
562 |
- ewarn |
563 |
- fi |
564 |
- |
565 |
- if ! use bacula-clientonly; then |
566 |
- if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then |
567 |
- enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw |
568 |
- einfo |
569 |
- einfo "The user 'bacula' has been created. Please see the bacula manual" |
570 |
- einfo "for information about running bacula as a non-root user." |
571 |
- einfo |
572 |
- fi |
573 |
- fi |
574 |
-} |
575 |
- |
576 |
-src_prepare() { |
577 |
- # adjusts default configuration files for several binaries |
578 |
- # to /etc/bacula/<config> instead of ./<config> |
579 |
- pushd src >&/dev/null || die |
580 |
- for f in console/console.c dird/dird.c filed/filed.c \ |
581 |
- stored/bcopy.c stored/bextract.c stored/bls.c \ |
582 |
- stored/bscan.c stored/btape.c stored/stored.c \ |
583 |
- qt-console/main.cpp; do |
584 |
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \ |
585 |
- || die "sed on ${f} failed" |
586 |
- done |
587 |
- popd >&/dev/null || die |
588 |
- |
589 |
- # bug 466688 drop deprecated categories from Desktop file |
590 |
- sed -i -e 's/Application;//' scripts/bat.desktop.in || die |
591 |
- |
592 |
- # bug 466690 Use CXXFLAGS instead of CFLAGS |
593 |
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die |
594 |
- |
595 |
- # drop automatic install of unneeded documentation (for bug 356499) |
596 |
- epatch "${FILESDIR}"/7.2.0/${PN}-7.2.0-doc.patch |
597 |
- |
598 |
- # bug #310087 |
599 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch |
600 |
- |
601 |
- # bug #311161 |
602 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-lib-search-path.patch |
603 |
- |
604 |
- # bat needs to respect LDFLAGS |
605 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-ldflags.patch |
606 |
- |
607 |
- # bug #328701 |
608 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch |
609 |
- |
610 |
- epatch "${FILESDIR}"/7.2.0/${PN}-7.2.0-fix-static.patch |
611 |
- |
612 |
- # fix soname in libbaccat.so bug #602952 |
613 |
- epatch "${FILESDIR}/bacula-fix-sonames.patch" |
614 |
- |
615 |
- # do not strip binaries |
616 |
- sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die |
617 |
- sed -i -e "s/strip /# strip /" src/console/Makefile.in || die |
618 |
- |
619 |
- # fix file not found error during make depend |
620 |
- epatch "${FILESDIR}"/7.0.2/${PN}-7.0.2-depend.patch |
621 |
- |
622 |
- # Fix systemd unit files: |
623 |
- # bug 497748 |
624 |
- sed -i -e '/Requires/d' platforms/systemd/*.service.in || die |
625 |
- sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die |
626 |
- # bug 504370 |
627 |
- sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in || die |
628 |
- # bug 584442 and 504368 |
629 |
- sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in || die |
630 |
- |
631 |
- # fix bundled libtool (bug 466696) |
632 |
- # But first move directory with M4 macros out of the way. |
633 |
- # It is only needed by autoconf and gives errors during elibtoolize. |
634 |
- mv autoconf/libtool autoconf/libtool1 || die |
635 |
- elibtoolize |
636 |
-} |
637 |
- |
638 |
-src_configure() { |
639 |
- local myconf='' |
640 |
- |
641 |
- if use bacula-clientonly; then |
642 |
- myconf="${myconf} \ |
643 |
- $(use_enable bacula-clientonly client-only) \ |
644 |
- $(use_enable !static libtool) \ |
645 |
- $(use_enable static static-cons) \ |
646 |
- $(use_enable static static-fd)" |
647 |
- else |
648 |
- myconf="${myconf} \ |
649 |
- $(use_enable !bacula-nodir build-dird) \ |
650 |
- $(use_enable !bacula-nosd build-stored)" |
651 |
- # bug #311099 |
652 |
- # database support needed by dir-only *and* sd-only |
653 |
- # build as well (for building bscan, btape, etc.) |
654 |
- myconf="${myconf} \ |
655 |
- --with-${mydbtype} \ |
656 |
- --enable-batch-insert" |
657 |
- fi |
658 |
- |
659 |
- # do not build bat if 'static' clientonly |
660 |
- if ! use bacula-clientonly || ! use static; then |
661 |
- myconf="${myconf} \ |
662 |
- $(use_enable qt4 bat)" |
663 |
- fi |
664 |
- |
665 |
- myconf="${myconf} \ |
666 |
- $(use_with X x) \ |
667 |
- $(use_enable !readline conio) \ |
668 |
- $(use_enable readline) \ |
669 |
- $(use_with readline readline /usr) \ |
670 |
- $(use_with ssl openssl) \ |
671 |
- $(use_enable ipv6) \ |
672 |
- $(use_enable acl) \ |
673 |
- $(use_with tcpd tcp-wrappers)" |
674 |
- |
675 |
- econf \ |
676 |
- --libdir=/usr/$(get_libdir) \ |
677 |
- --docdir=/usr/share/doc/${PF} \ |
678 |
- --htmldir=/usr/share/doc/${PF}/html \ |
679 |
- --with-pid-dir=/var/run \ |
680 |
- --sysconfdir=/etc/bacula \ |
681 |
- --with-subsys-dir=/var/lock/subsys \ |
682 |
- --with-working-dir=/var/lib/bacula \ |
683 |
- --with-logdir=/var/lib/bacula \ |
684 |
- --with-scriptdir=/usr/libexec/bacula \ |
685 |
- --with-systemd=$(systemd_get_unitdir) \ |
686 |
- --with-dir-user=bacula \ |
687 |
- --with-dir-group=bacula \ |
688 |
- --with-sd-user=root \ |
689 |
- --with-sd-group=bacula \ |
690 |
- --with-fd-user=root \ |
691 |
- --with-fd-group=bacula \ |
692 |
- --enable-smartalloc \ |
693 |
- --disable-afs \ |
694 |
- --host=${CHOST} \ |
695 |
- ${myconf} |
696 |
- # correct configuration for QT based bat |
697 |
- if use qt4 ; then |
698 |
- pushd src/qt-console |
699 |
- eqmake4 |
700 |
- popd |
701 |
- fi |
702 |
-} |
703 |
- |
704 |
-src_compile() { |
705 |
- # Make build log verbose (bug #447806) |
706 |
- emake NO_ECHO="" |
707 |
-} |
708 |
- |
709 |
-src_install() { |
710 |
- emake DESTDIR="${D}" install |
711 |
- doicon scripts/bacula.png |
712 |
- |
713 |
- # install bat icon and desktop file when enabled |
714 |
- # (for some reason ./configure doesn't pick this up) |
715 |
- if use qt4 && ! use static ; then |
716 |
- doicon src/qt-console/images/bat_icon.png |
717 |
- domenu scripts/bat.desktop |
718 |
- fi |
719 |
- |
720 |
- # remove some scripts we don't need at all |
721 |
- rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql} |
722 |
- |
723 |
- # rename statically linked apps |
724 |
- if use bacula-clientonly && use static ; then |
725 |
- pushd "${D}"/usr/sbin || die |
726 |
- mv static-bacula-fd bacula-fd || die |
727 |
- mv static-bconsole bconsole || die |
728 |
- popd || die |
729 |
- fi |
730 |
- |
731 |
- # extra files which 'make install' doesn't cover |
732 |
- if ! use bacula-clientonly; then |
733 |
- # the database update scripts |
734 |
- diropts -m0750 |
735 |
- insinto /usr/libexec/bacula/updatedb |
736 |
- insopts -m0754 |
737 |
- doins "${S}"/updatedb/* |
738 |
- fperms 0640 /usr/libexec/bacula/updatedb/README |
739 |
- |
740 |
- # the logrotate configuration |
741 |
- # (now unconditional wrt bug #258187) |
742 |
- diropts -m0755 |
743 |
- insinto /etc/logrotate.d |
744 |
- insopts -m0644 |
745 |
- newins "${S}"/scripts/logrotate bacula |
746 |
- |
747 |
- # the logwatch scripts |
748 |
- if use logwatch; then |
749 |
- diropts -m0750 |
750 |
- dodir /etc/log.d/scripts/services |
751 |
- dodir /etc/log.d/scripts/shared |
752 |
- dodir /etc/log.d/conf/logfiles |
753 |
- dodir /etc/log.d/conf/services |
754 |
- pushd "${S}"/scripts/logwatch >&/dev/null || die |
755 |
- emake DESTDIR="${D}" install |
756 |
- popd >&/dev/null || die |
757 |
- fi |
758 |
- fi |
759 |
- |
760 |
- if ! use qt4; then |
761 |
- rm -vf "${D}"/usr/share/man/man1/bat.1* |
762 |
- fi |
763 |
- rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1* |
764 |
- if use bacula-clientonly || use bacula-nodir; then |
765 |
- rm -vf "${D}"/usr/share/man/man8/bacula-dir.8* |
766 |
- rm -vf "${D}"/usr/share/man/man8/dbcheck.8* |
767 |
- rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
768 |
- rm -vf "${D}"/usr/libexec/bacula/create_*_database |
769 |
- rm -vf "${D}"/usr/libexec/bacula/drop_*_database |
770 |
- rm -vf "${D}"/usr/libexec/bacula/make_*_tables |
771 |
- rm -vf "${D}"/usr/libexec/bacula/update_*_tables |
772 |
- rm -vf "${D}"/usr/libexec/bacula/drop_*_tables |
773 |
- rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges |
774 |
- rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup |
775 |
- fi |
776 |
- if use bacula-clientonly || use bacula-nosd; then |
777 |
- rm -vf "${D}"/usr/share/man/man8/bacula-sd.8* |
778 |
- rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
779 |
- rm -vf "${D}"/usr/share/man/man8/bextract.8* |
780 |
- rm -vf "${D}"/usr/share/man/man8/bls.8* |
781 |
- rm -vf "${D}"/usr/share/man/man8/bscan.8* |
782 |
- rm -vf "${D}"/usr/share/man/man8/btape.8* |
783 |
- rm -vf "${D}"/usr/libexec/bacula/disk-changer |
784 |
- rm -vf "${D}"/usr/libexec/bacula/mtx-changer |
785 |
- rm -vf "${D}"/usr/libexec/bacula/dvd-handler |
786 |
- fi |
787 |
- |
788 |
- # documentation |
789 |
- dodoc ChangeLog ReleaseNotes SUPPORT |
790 |
- |
791 |
- # install examples (bug #457504) |
792 |
- if use examples; then |
793 |
- docinto examples/ |
794 |
- dodoc -r examples/* |
795 |
- fi |
796 |
- |
797 |
- # vim-files |
798 |
- if use vim-syntax; then |
799 |
- insinto /usr/share/vim/vimfiles/syntax |
800 |
- doins scripts/bacula.vim |
801 |
- insinto /usr/share/vim/vimfiles/ftdetect |
802 |
- newins scripts/filetype.vim bacula_ft.vim |
803 |
- fi |
804 |
- |
805 |
- # setup init scripts |
806 |
- myscripts="bacula-fd" |
807 |
- if ! use bacula-clientonly; then |
808 |
- if ! use bacula-nodir; then |
809 |
- myscripts="${myscripts} bacula-dir" |
810 |
- fi |
811 |
- if ! use bacula-nosd; then |
812 |
- myscripts="${myscripts} bacula-sd" |
813 |
- fi |
814 |
- fi |
815 |
- for script in ${myscripts}; do |
816 |
- # copy over init script and config to a temporary location |
817 |
- # so we can modify them as needed |
818 |
- cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" |
819 |
- cp "${FILESDIR}/newscripts/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
820 |
- |
821 |
- # now set the database dependancy for the director init script |
822 |
- case "${script}" in |
823 |
- bacula-dir) |
824 |
- case "${mydbtype}" in |
825 |
- sqlite3) |
826 |
- # sqlite databases don't have a daemon |
827 |
- sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die |
828 |
- ;; |
829 |
- *) |
830 |
- # all other databases have daemons |
831 |
- sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die |
832 |
- ;; |
833 |
- esac |
834 |
- ;; |
835 |
- *) |
836 |
- ;; |
837 |
- esac |
838 |
- |
839 |
- # install init script and config |
840 |
- newinitd "${T}/${script}".initd "${script}" |
841 |
- newconfd "${T}/${script}".confd "${script}" |
842 |
- done |
843 |
- |
844 |
- systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service |
845 |
- |
846 |
- # make sure the working directory exists |
847 |
- diropts -m0750 |
848 |
- keepdir /var/lib/bacula |
849 |
- |
850 |
- # make sure bacula group can execute bacula libexec scripts |
851 |
- fowners -R root:bacula /usr/libexec/bacula |
852 |
-} |
853 |
- |
854 |
-pkg_postinst() { |
855 |
- if use bacula-clientonly; then |
856 |
- fowners root:bacula /var/lib/bacula |
857 |
- else |
858 |
- fowners bacula:bacula /var/lib/bacula |
859 |
- fi |
860 |
- |
861 |
- if ! use bacula-clientonly && ! use bacula-nodir; then |
862 |
- einfo |
863 |
- einfo "If this is a new install, you must create the ${mydbtype} databases with:" |
864 |
- einfo " /usr/libexec/bacula/create_${mydbtype}_database" |
865 |
- einfo " /usr/libexec/bacula/make_${mydbtype}_tables" |
866 |
- einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges" |
867 |
- einfo |
868 |
- |
869 |
- ewarn "ATTENTION!" |
870 |
- ewarn "The format of the database may have changed." |
871 |
- ewarn "If you just upgraded from a version below 7.2.0 you must run" |
872 |
- ewarn "'update_bacula_tables' now." |
873 |
- ewarn "Make sure to have a backup of your catalog before." |
874 |
- ewarn |
875 |
- fi |
876 |
- |
877 |
- if use sqlite; then |
878 |
- einfo |
879 |
- einfo "Be aware that Bacula does not officially support SQLite database anymore." |
880 |
- einfo "Best use it only for a client-only installation. See Bug #445540." |
881 |
- einfo |
882 |
- fi |
883 |
- |
884 |
- einfo "Please note that 'bconsole' will always be installed. To compile 'bat'" |
885 |
- einfo "you have to enable 'USE=qt4'." |
886 |
- einfo |
887 |
-} |
888 |
|
889 |
diff --git a/app-backup/bacula/bacula-7.4.6.ebuild b/app-backup/bacula/bacula-7.4.6.ebuild |
890 |
deleted file mode 100644 |
891 |
index 8b30c32e777..00000000000 |
892 |
--- a/app-backup/bacula/bacula-7.4.6.ebuild |
893 |
+++ /dev/null |
894 |
@@ -1,412 +0,0 @@ |
895 |
-# Copyright 1999-2017 Gentoo Foundation |
896 |
-# Distributed under the terms of the GNU General Public License v2 |
897 |
- |
898 |
-EAPI="5" |
899 |
- |
900 |
-inherit eutils multilib qt4-r2 systemd user libtool |
901 |
- |
902 |
-MY_PV=${PV/_beta/-b} |
903 |
-MY_P=${PN}-${MY_PV} |
904 |
- |
905 |
-DESCRIPTION="Featureful client/server network backup suite" |
906 |
-HOMEPAGE="http://www.bacula.org/" |
907 |
-SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz" |
908 |
- |
909 |
-LICENSE="AGPL-3" |
910 |
-SLOT="0" |
911 |
-KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
912 |
-IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres qt4 readline +sqlite ssl static tcpd vim-syntax X" |
913 |
- |
914 |
-DEPEND=" |
915 |
- dev-libs/gmp:0 |
916 |
- !bacula-clientonly? ( |
917 |
- postgres? ( dev-db/postgresql:=[threads] ) |
918 |
- mysql? ( virtual/mysql ) |
919 |
- sqlite? ( dev-db/sqlite:3 ) |
920 |
- !bacula-nodir? ( virtual/mta ) |
921 |
- ) |
922 |
- qt4? ( |
923 |
- dev-qt/qtsvg:4 |
924 |
- x11-libs/qwt:5 |
925 |
- ) |
926 |
- logwatch? ( sys-apps/logwatch ) |
927 |
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
928 |
- readline? ( sys-libs/readline:0 ) |
929 |
- static? ( |
930 |
- acl? ( virtual/acl[static-libs] ) |
931 |
- sys-libs/zlib[static-libs] |
932 |
- dev-libs/lzo[static-libs] |
933 |
- sys-libs/ncurses:=[static-libs] |
934 |
- ssl? ( |
935 |
- !libressl? ( dev-libs/openssl:0=[static-libs] ) |
936 |
- libressl? ( dev-libs/libressl:0=[static-libs] ) |
937 |
- ) |
938 |
- ) |
939 |
- !static? ( |
940 |
- acl? ( virtual/acl ) |
941 |
- sys-libs/zlib |
942 |
- dev-libs/lzo |
943 |
- sys-libs/ncurses:= |
944 |
- ssl? ( |
945 |
- !libressl? ( dev-libs/openssl:0= ) |
946 |
- libressl? ( dev-libs/libressl:0= ) |
947 |
- ) |
948 |
- )" |
949 |
-RDEPEND="${DEPEND} |
950 |
- !bacula-clientonly? ( |
951 |
- !bacula-nosd? ( |
952 |
- sys-block/mtx |
953 |
- app-arch/mt-st |
954 |
- ) |
955 |
- ) |
956 |
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
957 |
- |
958 |
-REQUIRED_USE="!bacula-clientonly? ( ^^ ( mysql postgres sqlite ) ) |
959 |
- static? ( bacula-clientonly )" |
960 |
- |
961 |
-S=${WORKDIR}/${MY_P} |
962 |
- |
963 |
-pkg_setup() { |
964 |
- #XOR and !bacula-clientonly controlled by REQUIRED_USE |
965 |
- use mysql && export mydbtype="mysql" |
966 |
- use postgres && export mydbtype="postgresql" |
967 |
- use sqlite && export mydbtype="sqlite3" |
968 |
- |
969 |
- # create the daemon group and user |
970 |
- if [ -z "$(egetent group bacula 2>/dev/null)" ]; then |
971 |
- enewgroup bacula |
972 |
- einfo |
973 |
- einfo "The group 'bacula' has been created. Any users you add to this" |
974 |
- einfo "group have access to files created by the daemons." |
975 |
- einfo |
976 |
- fi |
977 |
- |
978 |
- if use bacula-clientonly && use static && use qt4; then |
979 |
- ewarn |
980 |
- ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag." |
981 |
- ewarn |
982 |
- fi |
983 |
- |
984 |
- if ! use bacula-clientonly; then |
985 |
- if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then |
986 |
- enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw |
987 |
- einfo |
988 |
- einfo "The user 'bacula' has been created. Please see the bacula manual" |
989 |
- einfo "for information about running bacula as a non-root user." |
990 |
- einfo |
991 |
- fi |
992 |
- fi |
993 |
-} |
994 |
- |
995 |
-src_prepare() { |
996 |
- # adjusts default configuration files for several binaries |
997 |
- # to /etc/bacula/<config> instead of ./<config> |
998 |
- pushd src >&/dev/null || die |
999 |
- for f in console/console.c dird/dird.c filed/filed.c \ |
1000 |
- stored/bcopy.c stored/bextract.c stored/bls.c \ |
1001 |
- stored/bscan.c stored/btape.c stored/stored.c \ |
1002 |
- qt-console/main.cpp; do |
1003 |
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \ |
1004 |
- || die "sed on ${f} failed" |
1005 |
- done |
1006 |
- popd >&/dev/null || die |
1007 |
- |
1008 |
- # bug 466688 drop deprecated categories from Desktop file |
1009 |
- sed -i -e 's/Application;//' scripts/bat.desktop.in || die |
1010 |
- |
1011 |
- # bug 466690 Use CXXFLAGS instead of CFLAGS |
1012 |
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die |
1013 |
- |
1014 |
- # drop automatic install of unneeded documentation (for bug 356499) |
1015 |
- epatch "${FILESDIR}"/7.2.0/${PN}-7.2.0-doc.patch |
1016 |
- |
1017 |
- # bug #310087 |
1018 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch |
1019 |
- |
1020 |
- # bug #311161 |
1021 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-lib-search-path.patch |
1022 |
- |
1023 |
- # bat needs to respect LDFLAGS |
1024 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-ldflags.patch |
1025 |
- |
1026 |
- # bug #328701 |
1027 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch |
1028 |
- |
1029 |
- epatch "${FILESDIR}"/7.2.0/${PN}-7.2.0-fix-static.patch |
1030 |
- |
1031 |
- # fix soname in libbaccat.so bug #602952 |
1032 |
- epatch "${FILESDIR}/bacula-fix-sonames.patch" |
1033 |
- |
1034 |
- # do not strip binaries |
1035 |
- sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die |
1036 |
- sed -i -e "s/strip /# strip /" src/console/Makefile.in || die |
1037 |
- |
1038 |
- # fix file not found error during make depend |
1039 |
- epatch "${FILESDIR}"/7.0.2/${PN}-7.0.2-depend.patch |
1040 |
- |
1041 |
- # Fix systemd unit files: |
1042 |
- # bug 497748 |
1043 |
- sed -i -e '/Requires/d' platforms/systemd/*.service.in || die |
1044 |
- sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die |
1045 |
- # bug 504370 |
1046 |
- sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in || die |
1047 |
- # bug 584442 and 504368 |
1048 |
- sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in || die |
1049 |
- |
1050 |
- # fix bundled libtool (bug 466696) |
1051 |
- # But first move directory with M4 macros out of the way. |
1052 |
- # It is only needed by autoconf and gives errors during elibtoolize. |
1053 |
- mv autoconf/libtool autoconf/libtool1 || die |
1054 |
- elibtoolize |
1055 |
-} |
1056 |
- |
1057 |
-src_configure() { |
1058 |
- local myconf='' |
1059 |
- |
1060 |
- if use bacula-clientonly; then |
1061 |
- myconf="${myconf} \ |
1062 |
- $(use_enable bacula-clientonly client-only) \ |
1063 |
- $(use_enable !static libtool) \ |
1064 |
- $(use_enable static static-cons) \ |
1065 |
- $(use_enable static static-fd)" |
1066 |
- else |
1067 |
- myconf="${myconf} \ |
1068 |
- $(use_enable !bacula-nodir build-dird) \ |
1069 |
- $(use_enable !bacula-nosd build-stored)" |
1070 |
- # bug #311099 |
1071 |
- # database support needed by dir-only *and* sd-only |
1072 |
- # build as well (for building bscan, btape, etc.) |
1073 |
- myconf="${myconf} \ |
1074 |
- --with-${mydbtype} \ |
1075 |
- --enable-batch-insert" |
1076 |
- fi |
1077 |
- |
1078 |
- # do not build bat if 'static' clientonly |
1079 |
- if ! use bacula-clientonly || ! use static; then |
1080 |
- myconf="${myconf} \ |
1081 |
- $(use_enable qt4 bat)" |
1082 |
- fi |
1083 |
- |
1084 |
- myconf="${myconf} \ |
1085 |
- $(use_with X x) \ |
1086 |
- $(use_enable !readline conio) \ |
1087 |
- $(use_enable readline) \ |
1088 |
- $(use_with readline readline /usr) \ |
1089 |
- $(use_with ssl openssl) \ |
1090 |
- $(use_enable ipv6) \ |
1091 |
- $(use_enable acl) \ |
1092 |
- $(use_with tcpd tcp-wrappers)" |
1093 |
- |
1094 |
- econf \ |
1095 |
- --libdir=/usr/$(get_libdir) \ |
1096 |
- --docdir=/usr/share/doc/${PF} \ |
1097 |
- --htmldir=/usr/share/doc/${PF}/html \ |
1098 |
- --with-pid-dir=/var/run \ |
1099 |
- --sysconfdir=/etc/bacula \ |
1100 |
- --with-subsys-dir=/var/lock/subsys \ |
1101 |
- --with-working-dir=/var/lib/bacula \ |
1102 |
- --with-logdir=/var/lib/bacula \ |
1103 |
- --with-scriptdir=/usr/libexec/bacula \ |
1104 |
- --with-systemd=$(systemd_get_unitdir) \ |
1105 |
- --with-dir-user=bacula \ |
1106 |
- --with-dir-group=bacula \ |
1107 |
- --with-sd-user=root \ |
1108 |
- --with-sd-group=bacula \ |
1109 |
- --with-fd-user=root \ |
1110 |
- --with-fd-group=bacula \ |
1111 |
- --enable-smartalloc \ |
1112 |
- --disable-afs \ |
1113 |
- --host=${CHOST} \ |
1114 |
- ${myconf} |
1115 |
- # correct configuration for QT based bat |
1116 |
- if use qt4 ; then |
1117 |
- pushd src/qt-console |
1118 |
- eqmake4 |
1119 |
- popd |
1120 |
- fi |
1121 |
-} |
1122 |
- |
1123 |
-src_compile() { |
1124 |
- # Make build log verbose (bug #447806) |
1125 |
- emake NO_ECHO="" |
1126 |
-} |
1127 |
- |
1128 |
-src_install() { |
1129 |
- emake DESTDIR="${D}" install |
1130 |
- doicon scripts/bacula.png |
1131 |
- |
1132 |
- # install bat icon and desktop file when enabled |
1133 |
- # (for some reason ./configure doesn't pick this up) |
1134 |
- if use qt4 && ! use static ; then |
1135 |
- doicon src/qt-console/images/bat_icon.png |
1136 |
- domenu scripts/bat.desktop |
1137 |
- fi |
1138 |
- |
1139 |
- # remove some scripts we don't need at all |
1140 |
- rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql} |
1141 |
- |
1142 |
- # rename statically linked apps |
1143 |
- if use bacula-clientonly && use static ; then |
1144 |
- pushd "${D}"/usr/sbin || die |
1145 |
- mv static-bacula-fd bacula-fd || die |
1146 |
- mv static-bconsole bconsole || die |
1147 |
- popd || die |
1148 |
- fi |
1149 |
- |
1150 |
- # extra files which 'make install' doesn't cover |
1151 |
- if ! use bacula-clientonly; then |
1152 |
- # the database update scripts |
1153 |
- diropts -m0750 |
1154 |
- insinto /usr/libexec/bacula/updatedb |
1155 |
- insopts -m0754 |
1156 |
- doins "${S}"/updatedb/* |
1157 |
- fperms 0640 /usr/libexec/bacula/updatedb/README |
1158 |
- |
1159 |
- # the logrotate configuration |
1160 |
- # (now unconditional wrt bug #258187) |
1161 |
- diropts -m0755 |
1162 |
- insinto /etc/logrotate.d |
1163 |
- insopts -m0644 |
1164 |
- newins "${S}"/scripts/logrotate bacula |
1165 |
- |
1166 |
- # the logwatch scripts |
1167 |
- if use logwatch; then |
1168 |
- diropts -m0750 |
1169 |
- dodir /usr/share/logwatch/scripts/services |
1170 |
- dodir /usr/share/logwatch/scripts/shared |
1171 |
- dodir /etc/logwatch/conf/logfiles |
1172 |
- dodir /etc/logwatch/conf/services |
1173 |
- pushd "${S}"/scripts/logwatch >&/dev/null || die |
1174 |
- emake DESTDIR="${D}" install |
1175 |
- popd >&/dev/null || die |
1176 |
- fi |
1177 |
- fi |
1178 |
- |
1179 |
- if ! use qt4; then |
1180 |
- rm -vf "${D}"/usr/share/man/man1/bat.1* |
1181 |
- fi |
1182 |
- rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1* |
1183 |
- if use bacula-clientonly || use bacula-nodir; then |
1184 |
- rm -vf "${D}"/usr/share/man/man8/bacula-dir.8* |
1185 |
- rm -vf "${D}"/usr/share/man/man8/dbcheck.8* |
1186 |
- rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
1187 |
- rm -vf "${D}"/usr/libexec/bacula/create_*_database |
1188 |
- rm -vf "${D}"/usr/libexec/bacula/drop_*_database |
1189 |
- rm -vf "${D}"/usr/libexec/bacula/make_*_tables |
1190 |
- rm -vf "${D}"/usr/libexec/bacula/update_*_tables |
1191 |
- rm -vf "${D}"/usr/libexec/bacula/drop_*_tables |
1192 |
- rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges |
1193 |
- rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup |
1194 |
- fi |
1195 |
- if use bacula-clientonly || use bacula-nosd; then |
1196 |
- rm -vf "${D}"/usr/share/man/man8/bacula-sd.8* |
1197 |
- rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
1198 |
- rm -vf "${D}"/usr/share/man/man8/bextract.8* |
1199 |
- rm -vf "${D}"/usr/share/man/man8/bls.8* |
1200 |
- rm -vf "${D}"/usr/share/man/man8/bscan.8* |
1201 |
- rm -vf "${D}"/usr/share/man/man8/btape.8* |
1202 |
- rm -vf "${D}"/usr/libexec/bacula/disk-changer |
1203 |
- rm -vf "${D}"/usr/libexec/bacula/mtx-changer |
1204 |
- rm -vf "${D}"/usr/libexec/bacula/dvd-handler |
1205 |
- fi |
1206 |
- |
1207 |
- # documentation |
1208 |
- dodoc ChangeLog ReleaseNotes SUPPORT |
1209 |
- |
1210 |
- # install examples (bug #457504) |
1211 |
- if use examples; then |
1212 |
- docinto examples/ |
1213 |
- dodoc -r examples/* |
1214 |
- fi |
1215 |
- |
1216 |
- # vim-files |
1217 |
- if use vim-syntax; then |
1218 |
- insinto /usr/share/vim/vimfiles/syntax |
1219 |
- doins scripts/bacula.vim |
1220 |
- insinto /usr/share/vim/vimfiles/ftdetect |
1221 |
- newins scripts/filetype.vim bacula_ft.vim |
1222 |
- fi |
1223 |
- |
1224 |
- # setup init scripts |
1225 |
- myscripts="bacula-fd" |
1226 |
- if ! use bacula-clientonly; then |
1227 |
- if ! use bacula-nodir; then |
1228 |
- myscripts="${myscripts} bacula-dir" |
1229 |
- fi |
1230 |
- if ! use bacula-nosd; then |
1231 |
- myscripts="${myscripts} bacula-sd" |
1232 |
- fi |
1233 |
- fi |
1234 |
- for script in ${myscripts}; do |
1235 |
- # copy over init script and config to a temporary location |
1236 |
- # so we can modify them as needed |
1237 |
- cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" |
1238 |
- cp "${FILESDIR}/newscripts/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
1239 |
- |
1240 |
- # now set the database dependancy for the director init script |
1241 |
- case "${script}" in |
1242 |
- bacula-dir) |
1243 |
- case "${mydbtype}" in |
1244 |
- sqlite3) |
1245 |
- # sqlite databases don't have a daemon |
1246 |
- sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die |
1247 |
- ;; |
1248 |
- *) |
1249 |
- # all other databases have daemons |
1250 |
- sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die |
1251 |
- ;; |
1252 |
- esac |
1253 |
- ;; |
1254 |
- *) |
1255 |
- ;; |
1256 |
- esac |
1257 |
- |
1258 |
- # install init script and config |
1259 |
- newinitd "${T}/${script}".initd "${script}" |
1260 |
- newconfd "${T}/${script}".confd "${script}" |
1261 |
- done |
1262 |
- |
1263 |
- systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service |
1264 |
- |
1265 |
- # make sure the working directory exists |
1266 |
- diropts -m0750 |
1267 |
- keepdir /var/lib/bacula |
1268 |
- |
1269 |
- # make sure bacula group can execute bacula libexec scripts |
1270 |
- fowners -R root:bacula /usr/libexec/bacula |
1271 |
-} |
1272 |
- |
1273 |
-pkg_postinst() { |
1274 |
- if use bacula-clientonly; then |
1275 |
- fowners root:bacula /var/lib/bacula |
1276 |
- else |
1277 |
- fowners bacula:bacula /var/lib/bacula |
1278 |
- fi |
1279 |
- |
1280 |
- if ! use bacula-clientonly && ! use bacula-nodir; then |
1281 |
- einfo |
1282 |
- einfo "If this is a new install, you must create the ${mydbtype} databases with:" |
1283 |
- einfo " /usr/libexec/bacula/create_${mydbtype}_database" |
1284 |
- einfo " /usr/libexec/bacula/make_${mydbtype}_tables" |
1285 |
- einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges" |
1286 |
- einfo |
1287 |
- |
1288 |
- ewarn "ATTENTION!" |
1289 |
- ewarn "The format of the database may have changed." |
1290 |
- ewarn "If you just upgraded from a version below 7.2.0 you must run" |
1291 |
- ewarn "'update_bacula_tables' now." |
1292 |
- ewarn "Make sure to have a backup of your catalog before." |
1293 |
- ewarn |
1294 |
- fi |
1295 |
- |
1296 |
- if use sqlite; then |
1297 |
- einfo |
1298 |
- einfo "Be aware that Bacula does not officially support SQLite database anymore." |
1299 |
- einfo "Best use it only for a client-only installation. See Bug #445540." |
1300 |
- einfo |
1301 |
- fi |
1302 |
- |
1303 |
- einfo "Please note that 'bconsole' will always be installed. To compile 'bat'" |
1304 |
- einfo "you have to enable 'USE=qt4'." |
1305 |
- einfo |
1306 |
-} |
1307 |
|
1308 |
diff --git a/app-backup/bacula/bacula-7.4.7.ebuild b/app-backup/bacula/bacula-7.4.7.ebuild |
1309 |
deleted file mode 100644 |
1310 |
index 8b30c32e777..00000000000 |
1311 |
--- a/app-backup/bacula/bacula-7.4.7.ebuild |
1312 |
+++ /dev/null |
1313 |
@@ -1,412 +0,0 @@ |
1314 |
-# Copyright 1999-2017 Gentoo Foundation |
1315 |
-# Distributed under the terms of the GNU General Public License v2 |
1316 |
- |
1317 |
-EAPI="5" |
1318 |
- |
1319 |
-inherit eutils multilib qt4-r2 systemd user libtool |
1320 |
- |
1321 |
-MY_PV=${PV/_beta/-b} |
1322 |
-MY_P=${PN}-${MY_PV} |
1323 |
- |
1324 |
-DESCRIPTION="Featureful client/server network backup suite" |
1325 |
-HOMEPAGE="http://www.bacula.org/" |
1326 |
-SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz" |
1327 |
- |
1328 |
-LICENSE="AGPL-3" |
1329 |
-SLOT="0" |
1330 |
-KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
1331 |
-IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres qt4 readline +sqlite ssl static tcpd vim-syntax X" |
1332 |
- |
1333 |
-DEPEND=" |
1334 |
- dev-libs/gmp:0 |
1335 |
- !bacula-clientonly? ( |
1336 |
- postgres? ( dev-db/postgresql:=[threads] ) |
1337 |
- mysql? ( virtual/mysql ) |
1338 |
- sqlite? ( dev-db/sqlite:3 ) |
1339 |
- !bacula-nodir? ( virtual/mta ) |
1340 |
- ) |
1341 |
- qt4? ( |
1342 |
- dev-qt/qtsvg:4 |
1343 |
- x11-libs/qwt:5 |
1344 |
- ) |
1345 |
- logwatch? ( sys-apps/logwatch ) |
1346 |
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
1347 |
- readline? ( sys-libs/readline:0 ) |
1348 |
- static? ( |
1349 |
- acl? ( virtual/acl[static-libs] ) |
1350 |
- sys-libs/zlib[static-libs] |
1351 |
- dev-libs/lzo[static-libs] |
1352 |
- sys-libs/ncurses:=[static-libs] |
1353 |
- ssl? ( |
1354 |
- !libressl? ( dev-libs/openssl:0=[static-libs] ) |
1355 |
- libressl? ( dev-libs/libressl:0=[static-libs] ) |
1356 |
- ) |
1357 |
- ) |
1358 |
- !static? ( |
1359 |
- acl? ( virtual/acl ) |
1360 |
- sys-libs/zlib |
1361 |
- dev-libs/lzo |
1362 |
- sys-libs/ncurses:= |
1363 |
- ssl? ( |
1364 |
- !libressl? ( dev-libs/openssl:0= ) |
1365 |
- libressl? ( dev-libs/libressl:0= ) |
1366 |
- ) |
1367 |
- )" |
1368 |
-RDEPEND="${DEPEND} |
1369 |
- !bacula-clientonly? ( |
1370 |
- !bacula-nosd? ( |
1371 |
- sys-block/mtx |
1372 |
- app-arch/mt-st |
1373 |
- ) |
1374 |
- ) |
1375 |
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
1376 |
- |
1377 |
-REQUIRED_USE="!bacula-clientonly? ( ^^ ( mysql postgres sqlite ) ) |
1378 |
- static? ( bacula-clientonly )" |
1379 |
- |
1380 |
-S=${WORKDIR}/${MY_P} |
1381 |
- |
1382 |
-pkg_setup() { |
1383 |
- #XOR and !bacula-clientonly controlled by REQUIRED_USE |
1384 |
- use mysql && export mydbtype="mysql" |
1385 |
- use postgres && export mydbtype="postgresql" |
1386 |
- use sqlite && export mydbtype="sqlite3" |
1387 |
- |
1388 |
- # create the daemon group and user |
1389 |
- if [ -z "$(egetent group bacula 2>/dev/null)" ]; then |
1390 |
- enewgroup bacula |
1391 |
- einfo |
1392 |
- einfo "The group 'bacula' has been created. Any users you add to this" |
1393 |
- einfo "group have access to files created by the daemons." |
1394 |
- einfo |
1395 |
- fi |
1396 |
- |
1397 |
- if use bacula-clientonly && use static && use qt4; then |
1398 |
- ewarn |
1399 |
- ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag." |
1400 |
- ewarn |
1401 |
- fi |
1402 |
- |
1403 |
- if ! use bacula-clientonly; then |
1404 |
- if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then |
1405 |
- enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw |
1406 |
- einfo |
1407 |
- einfo "The user 'bacula' has been created. Please see the bacula manual" |
1408 |
- einfo "for information about running bacula as a non-root user." |
1409 |
- einfo |
1410 |
- fi |
1411 |
- fi |
1412 |
-} |
1413 |
- |
1414 |
-src_prepare() { |
1415 |
- # adjusts default configuration files for several binaries |
1416 |
- # to /etc/bacula/<config> instead of ./<config> |
1417 |
- pushd src >&/dev/null || die |
1418 |
- for f in console/console.c dird/dird.c filed/filed.c \ |
1419 |
- stored/bcopy.c stored/bextract.c stored/bls.c \ |
1420 |
- stored/bscan.c stored/btape.c stored/stored.c \ |
1421 |
- qt-console/main.cpp; do |
1422 |
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \ |
1423 |
- || die "sed on ${f} failed" |
1424 |
- done |
1425 |
- popd >&/dev/null || die |
1426 |
- |
1427 |
- # bug 466688 drop deprecated categories from Desktop file |
1428 |
- sed -i -e 's/Application;//' scripts/bat.desktop.in || die |
1429 |
- |
1430 |
- # bug 466690 Use CXXFLAGS instead of CFLAGS |
1431 |
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die |
1432 |
- |
1433 |
- # drop automatic install of unneeded documentation (for bug 356499) |
1434 |
- epatch "${FILESDIR}"/7.2.0/${PN}-7.2.0-doc.patch |
1435 |
- |
1436 |
- # bug #310087 |
1437 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch |
1438 |
- |
1439 |
- # bug #311161 |
1440 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-lib-search-path.patch |
1441 |
- |
1442 |
- # bat needs to respect LDFLAGS |
1443 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-ldflags.patch |
1444 |
- |
1445 |
- # bug #328701 |
1446 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch |
1447 |
- |
1448 |
- epatch "${FILESDIR}"/7.2.0/${PN}-7.2.0-fix-static.patch |
1449 |
- |
1450 |
- # fix soname in libbaccat.so bug #602952 |
1451 |
- epatch "${FILESDIR}/bacula-fix-sonames.patch" |
1452 |
- |
1453 |
- # do not strip binaries |
1454 |
- sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die |
1455 |
- sed -i -e "s/strip /# strip /" src/console/Makefile.in || die |
1456 |
- |
1457 |
- # fix file not found error during make depend |
1458 |
- epatch "${FILESDIR}"/7.0.2/${PN}-7.0.2-depend.patch |
1459 |
- |
1460 |
- # Fix systemd unit files: |
1461 |
- # bug 497748 |
1462 |
- sed -i -e '/Requires/d' platforms/systemd/*.service.in || die |
1463 |
- sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die |
1464 |
- # bug 504370 |
1465 |
- sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in || die |
1466 |
- # bug 584442 and 504368 |
1467 |
- sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in || die |
1468 |
- |
1469 |
- # fix bundled libtool (bug 466696) |
1470 |
- # But first move directory with M4 macros out of the way. |
1471 |
- # It is only needed by autoconf and gives errors during elibtoolize. |
1472 |
- mv autoconf/libtool autoconf/libtool1 || die |
1473 |
- elibtoolize |
1474 |
-} |
1475 |
- |
1476 |
-src_configure() { |
1477 |
- local myconf='' |
1478 |
- |
1479 |
- if use bacula-clientonly; then |
1480 |
- myconf="${myconf} \ |
1481 |
- $(use_enable bacula-clientonly client-only) \ |
1482 |
- $(use_enable !static libtool) \ |
1483 |
- $(use_enable static static-cons) \ |
1484 |
- $(use_enable static static-fd)" |
1485 |
- else |
1486 |
- myconf="${myconf} \ |
1487 |
- $(use_enable !bacula-nodir build-dird) \ |
1488 |
- $(use_enable !bacula-nosd build-stored)" |
1489 |
- # bug #311099 |
1490 |
- # database support needed by dir-only *and* sd-only |
1491 |
- # build as well (for building bscan, btape, etc.) |
1492 |
- myconf="${myconf} \ |
1493 |
- --with-${mydbtype} \ |
1494 |
- --enable-batch-insert" |
1495 |
- fi |
1496 |
- |
1497 |
- # do not build bat if 'static' clientonly |
1498 |
- if ! use bacula-clientonly || ! use static; then |
1499 |
- myconf="${myconf} \ |
1500 |
- $(use_enable qt4 bat)" |
1501 |
- fi |
1502 |
- |
1503 |
- myconf="${myconf} \ |
1504 |
- $(use_with X x) \ |
1505 |
- $(use_enable !readline conio) \ |
1506 |
- $(use_enable readline) \ |
1507 |
- $(use_with readline readline /usr) \ |
1508 |
- $(use_with ssl openssl) \ |
1509 |
- $(use_enable ipv6) \ |
1510 |
- $(use_enable acl) \ |
1511 |
- $(use_with tcpd tcp-wrappers)" |
1512 |
- |
1513 |
- econf \ |
1514 |
- --libdir=/usr/$(get_libdir) \ |
1515 |
- --docdir=/usr/share/doc/${PF} \ |
1516 |
- --htmldir=/usr/share/doc/${PF}/html \ |
1517 |
- --with-pid-dir=/var/run \ |
1518 |
- --sysconfdir=/etc/bacula \ |
1519 |
- --with-subsys-dir=/var/lock/subsys \ |
1520 |
- --with-working-dir=/var/lib/bacula \ |
1521 |
- --with-logdir=/var/lib/bacula \ |
1522 |
- --with-scriptdir=/usr/libexec/bacula \ |
1523 |
- --with-systemd=$(systemd_get_unitdir) \ |
1524 |
- --with-dir-user=bacula \ |
1525 |
- --with-dir-group=bacula \ |
1526 |
- --with-sd-user=root \ |
1527 |
- --with-sd-group=bacula \ |
1528 |
- --with-fd-user=root \ |
1529 |
- --with-fd-group=bacula \ |
1530 |
- --enable-smartalloc \ |
1531 |
- --disable-afs \ |
1532 |
- --host=${CHOST} \ |
1533 |
- ${myconf} |
1534 |
- # correct configuration for QT based bat |
1535 |
- if use qt4 ; then |
1536 |
- pushd src/qt-console |
1537 |
- eqmake4 |
1538 |
- popd |
1539 |
- fi |
1540 |
-} |
1541 |
- |
1542 |
-src_compile() { |
1543 |
- # Make build log verbose (bug #447806) |
1544 |
- emake NO_ECHO="" |
1545 |
-} |
1546 |
- |
1547 |
-src_install() { |
1548 |
- emake DESTDIR="${D}" install |
1549 |
- doicon scripts/bacula.png |
1550 |
- |
1551 |
- # install bat icon and desktop file when enabled |
1552 |
- # (for some reason ./configure doesn't pick this up) |
1553 |
- if use qt4 && ! use static ; then |
1554 |
- doicon src/qt-console/images/bat_icon.png |
1555 |
- domenu scripts/bat.desktop |
1556 |
- fi |
1557 |
- |
1558 |
- # remove some scripts we don't need at all |
1559 |
- rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql} |
1560 |
- |
1561 |
- # rename statically linked apps |
1562 |
- if use bacula-clientonly && use static ; then |
1563 |
- pushd "${D}"/usr/sbin || die |
1564 |
- mv static-bacula-fd bacula-fd || die |
1565 |
- mv static-bconsole bconsole || die |
1566 |
- popd || die |
1567 |
- fi |
1568 |
- |
1569 |
- # extra files which 'make install' doesn't cover |
1570 |
- if ! use bacula-clientonly; then |
1571 |
- # the database update scripts |
1572 |
- diropts -m0750 |
1573 |
- insinto /usr/libexec/bacula/updatedb |
1574 |
- insopts -m0754 |
1575 |
- doins "${S}"/updatedb/* |
1576 |
- fperms 0640 /usr/libexec/bacula/updatedb/README |
1577 |
- |
1578 |
- # the logrotate configuration |
1579 |
- # (now unconditional wrt bug #258187) |
1580 |
- diropts -m0755 |
1581 |
- insinto /etc/logrotate.d |
1582 |
- insopts -m0644 |
1583 |
- newins "${S}"/scripts/logrotate bacula |
1584 |
- |
1585 |
- # the logwatch scripts |
1586 |
- if use logwatch; then |
1587 |
- diropts -m0750 |
1588 |
- dodir /usr/share/logwatch/scripts/services |
1589 |
- dodir /usr/share/logwatch/scripts/shared |
1590 |
- dodir /etc/logwatch/conf/logfiles |
1591 |
- dodir /etc/logwatch/conf/services |
1592 |
- pushd "${S}"/scripts/logwatch >&/dev/null || die |
1593 |
- emake DESTDIR="${D}" install |
1594 |
- popd >&/dev/null || die |
1595 |
- fi |
1596 |
- fi |
1597 |
- |
1598 |
- if ! use qt4; then |
1599 |
- rm -vf "${D}"/usr/share/man/man1/bat.1* |
1600 |
- fi |
1601 |
- rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1* |
1602 |
- if use bacula-clientonly || use bacula-nodir; then |
1603 |
- rm -vf "${D}"/usr/share/man/man8/bacula-dir.8* |
1604 |
- rm -vf "${D}"/usr/share/man/man8/dbcheck.8* |
1605 |
- rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
1606 |
- rm -vf "${D}"/usr/libexec/bacula/create_*_database |
1607 |
- rm -vf "${D}"/usr/libexec/bacula/drop_*_database |
1608 |
- rm -vf "${D}"/usr/libexec/bacula/make_*_tables |
1609 |
- rm -vf "${D}"/usr/libexec/bacula/update_*_tables |
1610 |
- rm -vf "${D}"/usr/libexec/bacula/drop_*_tables |
1611 |
- rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges |
1612 |
- rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup |
1613 |
- fi |
1614 |
- if use bacula-clientonly || use bacula-nosd; then |
1615 |
- rm -vf "${D}"/usr/share/man/man8/bacula-sd.8* |
1616 |
- rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
1617 |
- rm -vf "${D}"/usr/share/man/man8/bextract.8* |
1618 |
- rm -vf "${D}"/usr/share/man/man8/bls.8* |
1619 |
- rm -vf "${D}"/usr/share/man/man8/bscan.8* |
1620 |
- rm -vf "${D}"/usr/share/man/man8/btape.8* |
1621 |
- rm -vf "${D}"/usr/libexec/bacula/disk-changer |
1622 |
- rm -vf "${D}"/usr/libexec/bacula/mtx-changer |
1623 |
- rm -vf "${D}"/usr/libexec/bacula/dvd-handler |
1624 |
- fi |
1625 |
- |
1626 |
- # documentation |
1627 |
- dodoc ChangeLog ReleaseNotes SUPPORT |
1628 |
- |
1629 |
- # install examples (bug #457504) |
1630 |
- if use examples; then |
1631 |
- docinto examples/ |
1632 |
- dodoc -r examples/* |
1633 |
- fi |
1634 |
- |
1635 |
- # vim-files |
1636 |
- if use vim-syntax; then |
1637 |
- insinto /usr/share/vim/vimfiles/syntax |
1638 |
- doins scripts/bacula.vim |
1639 |
- insinto /usr/share/vim/vimfiles/ftdetect |
1640 |
- newins scripts/filetype.vim bacula_ft.vim |
1641 |
- fi |
1642 |
- |
1643 |
- # setup init scripts |
1644 |
- myscripts="bacula-fd" |
1645 |
- if ! use bacula-clientonly; then |
1646 |
- if ! use bacula-nodir; then |
1647 |
- myscripts="${myscripts} bacula-dir" |
1648 |
- fi |
1649 |
- if ! use bacula-nosd; then |
1650 |
- myscripts="${myscripts} bacula-sd" |
1651 |
- fi |
1652 |
- fi |
1653 |
- for script in ${myscripts}; do |
1654 |
- # copy over init script and config to a temporary location |
1655 |
- # so we can modify them as needed |
1656 |
- cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" |
1657 |
- cp "${FILESDIR}/newscripts/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
1658 |
- |
1659 |
- # now set the database dependancy for the director init script |
1660 |
- case "${script}" in |
1661 |
- bacula-dir) |
1662 |
- case "${mydbtype}" in |
1663 |
- sqlite3) |
1664 |
- # sqlite databases don't have a daemon |
1665 |
- sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die |
1666 |
- ;; |
1667 |
- *) |
1668 |
- # all other databases have daemons |
1669 |
- sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die |
1670 |
- ;; |
1671 |
- esac |
1672 |
- ;; |
1673 |
- *) |
1674 |
- ;; |
1675 |
- esac |
1676 |
- |
1677 |
- # install init script and config |
1678 |
- newinitd "${T}/${script}".initd "${script}" |
1679 |
- newconfd "${T}/${script}".confd "${script}" |
1680 |
- done |
1681 |
- |
1682 |
- systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service |
1683 |
- |
1684 |
- # make sure the working directory exists |
1685 |
- diropts -m0750 |
1686 |
- keepdir /var/lib/bacula |
1687 |
- |
1688 |
- # make sure bacula group can execute bacula libexec scripts |
1689 |
- fowners -R root:bacula /usr/libexec/bacula |
1690 |
-} |
1691 |
- |
1692 |
-pkg_postinst() { |
1693 |
- if use bacula-clientonly; then |
1694 |
- fowners root:bacula /var/lib/bacula |
1695 |
- else |
1696 |
- fowners bacula:bacula /var/lib/bacula |
1697 |
- fi |
1698 |
- |
1699 |
- if ! use bacula-clientonly && ! use bacula-nodir; then |
1700 |
- einfo |
1701 |
- einfo "If this is a new install, you must create the ${mydbtype} databases with:" |
1702 |
- einfo " /usr/libexec/bacula/create_${mydbtype}_database" |
1703 |
- einfo " /usr/libexec/bacula/make_${mydbtype}_tables" |
1704 |
- einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges" |
1705 |
- einfo |
1706 |
- |
1707 |
- ewarn "ATTENTION!" |
1708 |
- ewarn "The format of the database may have changed." |
1709 |
- ewarn "If you just upgraded from a version below 7.2.0 you must run" |
1710 |
- ewarn "'update_bacula_tables' now." |
1711 |
- ewarn "Make sure to have a backup of your catalog before." |
1712 |
- ewarn |
1713 |
- fi |
1714 |
- |
1715 |
- if use sqlite; then |
1716 |
- einfo |
1717 |
- einfo "Be aware that Bacula does not officially support SQLite database anymore." |
1718 |
- einfo "Best use it only for a client-only installation. See Bug #445540." |
1719 |
- einfo |
1720 |
- fi |
1721 |
- |
1722 |
- einfo "Please note that 'bconsole' will always be installed. To compile 'bat'" |
1723 |
- einfo "you have to enable 'USE=qt4'." |
1724 |
- einfo |
1725 |
-} |
1726 |
|
1727 |
diff --git a/app-backup/bacula/bacula-9.0.3.ebuild b/app-backup/bacula/bacula-9.0.3.ebuild |
1728 |
deleted file mode 100644 |
1729 |
index 0d286e64589..00000000000 |
1730 |
--- a/app-backup/bacula/bacula-9.0.3.ebuild |
1731 |
+++ /dev/null |
1732 |
@@ -1,418 +0,0 @@ |
1733 |
-# Copyright 1999-2017 Gentoo Foundation |
1734 |
-# Distributed under the terms of the GNU General Public License v2 |
1735 |
- |
1736 |
-EAPI="5" |
1737 |
- |
1738 |
-inherit eutils multilib qt4-r2 systemd user libtool |
1739 |
- |
1740 |
-MY_PV=${PV/_beta/-b} |
1741 |
-MY_P=${PN}-${MY_PV} |
1742 |
- |
1743 |
-DESCRIPTION="Featureful client/server network backup suite" |
1744 |
-HOMEPAGE="http://www.bacula.org/" |
1745 |
-SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz" |
1746 |
- |
1747 |
-LICENSE="AGPL-3" |
1748 |
-SLOT="0" |
1749 |
-KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
1750 |
-IUSE="bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres qt4 readline +sqlite ssl static tcpd vim-syntax X" |
1751 |
- |
1752 |
-DEPEND=" |
1753 |
- dev-libs/gmp:0 |
1754 |
- !bacula-clientonly? ( |
1755 |
- postgres? ( dev-db/postgresql:=[threads] ) |
1756 |
- mysql? ( virtual/mysql ) |
1757 |
- sqlite? ( dev-db/sqlite:3 ) |
1758 |
- !bacula-nodir? ( virtual/mta ) |
1759 |
- ) |
1760 |
- qt4? ( |
1761 |
- dev-qt/qtsvg:4 |
1762 |
- x11-libs/qwt:5 |
1763 |
- ) |
1764 |
- logwatch? ( sys-apps/logwatch ) |
1765 |
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
1766 |
- readline? ( sys-libs/readline:0 ) |
1767 |
- static? ( |
1768 |
- virtual/acl[static-libs] |
1769 |
- sys-libs/zlib[static-libs] |
1770 |
- dev-libs/lzo[static-libs] |
1771 |
- sys-libs/ncurses:=[static-libs] |
1772 |
- ssl? ( |
1773 |
- !libressl? ( dev-libs/openssl:0=[static-libs] ) |
1774 |
- libressl? ( dev-libs/libressl:0=[static-libs] ) |
1775 |
- ) |
1776 |
- ) |
1777 |
- !static? ( |
1778 |
- virtual/acl |
1779 |
- sys-libs/zlib |
1780 |
- dev-libs/lzo |
1781 |
- sys-libs/ncurses:= |
1782 |
- ssl? ( |
1783 |
- !libressl? ( dev-libs/openssl:0= ) |
1784 |
- libressl? ( dev-libs/libressl:0= ) |
1785 |
- ) |
1786 |
- )" |
1787 |
-RDEPEND="${DEPEND} |
1788 |
- !bacula-clientonly? ( |
1789 |
- !bacula-nosd? ( |
1790 |
- sys-block/mtx |
1791 |
- app-arch/mt-st |
1792 |
- ) |
1793 |
- ) |
1794 |
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
1795 |
- |
1796 |
-REQUIRED_USE="!bacula-clientonly? ( ^^ ( mysql postgres sqlite ) ) |
1797 |
- static? ( bacula-clientonly )" |
1798 |
- |
1799 |
-S=${WORKDIR}/${MY_P} |
1800 |
- |
1801 |
-pkg_setup() { |
1802 |
- #XOR and !bacula-clientonly controlled by REQUIRED_USE |
1803 |
- use mysql && export mydbtype="mysql" |
1804 |
- use postgres && export mydbtype="postgresql" |
1805 |
- use sqlite && export mydbtype="sqlite3" |
1806 |
- |
1807 |
- # create the daemon group and user |
1808 |
- if [ -z "$(egetent group bacula 2>/dev/null)" ]; then |
1809 |
- enewgroup bacula |
1810 |
- einfo |
1811 |
- einfo "The group 'bacula' has been created. Any users you add to this" |
1812 |
- einfo "group have access to files created by the daemons." |
1813 |
- einfo |
1814 |
- fi |
1815 |
- |
1816 |
- if use bacula-clientonly && use static && use qt4; then |
1817 |
- ewarn |
1818 |
- ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag." |
1819 |
- ewarn |
1820 |
- fi |
1821 |
- |
1822 |
- if ! use bacula-clientonly; then |
1823 |
- if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then |
1824 |
- enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw |
1825 |
- einfo |
1826 |
- einfo "The user 'bacula' has been created. Please see the bacula manual" |
1827 |
- einfo "for information about running bacula as a non-root user." |
1828 |
- einfo |
1829 |
- fi |
1830 |
- fi |
1831 |
-} |
1832 |
- |
1833 |
-src_prepare() { |
1834 |
- # adjusts default configuration files for several binaries |
1835 |
- # to /etc/bacula/<config> instead of ./<config> |
1836 |
- pushd src >&/dev/null || die |
1837 |
- for f in console/console.c dird/dird.c filed/filed.c \ |
1838 |
- stored/bcopy.c stored/bextract.c stored/bls.c \ |
1839 |
- stored/bscan.c stored/btape.c stored/stored.c \ |
1840 |
- qt-console/main.cpp; do |
1841 |
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \ |
1842 |
- || die "sed on ${f} failed" |
1843 |
- done |
1844 |
- popd >&/dev/null || die |
1845 |
- |
1846 |
- # bug 466688 drop deprecated categories from Desktop file |
1847 |
- sed -i -e 's/Application;//' scripts/bat.desktop.in || die |
1848 |
- |
1849 |
- # bug 466690 Use CXXFLAGS instead of CFLAGS |
1850 |
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die |
1851 |
- |
1852 |
- # drop automatic install of unneeded documentation (for bug 356499) |
1853 |
- epatch "${FILESDIR}"/7.2.0/${PN}-7.2.0-doc.patch |
1854 |
- |
1855 |
- # bug #310087 |
1856 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch |
1857 |
- |
1858 |
- # bug #311161 |
1859 |
- epatch "${FILESDIR}"/9.0.2/${PN}-9.0.2-lib-search-path.patch |
1860 |
- |
1861 |
- # bat needs to respect LDFLAGS |
1862 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-ldflags.patch |
1863 |
- |
1864 |
- # bug #328701 |
1865 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch |
1866 |
- |
1867 |
- epatch "${FILESDIR}"/9.0.2/${PN}-9.0.2-fix-static.patch |
1868 |
- |
1869 |
- # fix soname in libbaccat.so bug #602952 |
1870 |
- epatch "${FILESDIR}/bacula-fix-sonames.patch" |
1871 |
- |
1872 |
- # do not strip binaries |
1873 |
- sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die |
1874 |
- sed -i -e "s/strip /# strip /" src/console/Makefile.in || die |
1875 |
- |
1876 |
- # fix file not found error during make depend |
1877 |
- epatch "${FILESDIR}"/7.0.2/${PN}-7.0.2-depend.patch |
1878 |
- |
1879 |
- # Fix systemd unit files: |
1880 |
- # bug 497748 |
1881 |
- sed -i -e '/Requires/d' platforms/systemd/*.service.in || die |
1882 |
- sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die |
1883 |
- # bug 504370 |
1884 |
- sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in || die |
1885 |
- # bug 584442 and 504368 |
1886 |
- sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in || die |
1887 |
- |
1888 |
- # fix bundled libtool (bug 466696) |
1889 |
- # But first move directory with M4 macros out of the way. |
1890 |
- # It is only needed by autoconf and gives errors during elibtoolize. |
1891 |
- mv autoconf/libtool autoconf/libtool1 || die |
1892 |
- elibtoolize |
1893 |
-} |
1894 |
- |
1895 |
-src_configure() { |
1896 |
- local myconf='' |
1897 |
- |
1898 |
- if use bacula-clientonly; then |
1899 |
- myconf="${myconf} \ |
1900 |
- $(use_enable bacula-clientonly client-only) \ |
1901 |
- $(use_enable !static libtool) \ |
1902 |
- $(use_enable static static-cons) \ |
1903 |
- $(use_enable static static-fd)" |
1904 |
- else |
1905 |
- myconf="${myconf} \ |
1906 |
- $(use_enable !bacula-nodir build-dird) \ |
1907 |
- $(use_enable !bacula-nosd build-stored)" |
1908 |
- # bug #311099 |
1909 |
- # database support needed by dir-only *and* sd-only |
1910 |
- # build as well (for building bscan, btape, etc.) |
1911 |
- myconf="${myconf} |
1912 |
- --with-${mydbtype}" |
1913 |
- if use mysql; then |
1914 |
- myconf="${myconf} \ |
1915 |
- --disable-batch-insert" |
1916 |
- else |
1917 |
- myconf="${myconf} \ |
1918 |
- --enable-batch-insert" |
1919 |
- fi |
1920 |
- fi |
1921 |
- |
1922 |
- # do not build bat if 'static' clientonly |
1923 |
- if ! use bacula-clientonly || ! use static; then |
1924 |
- myconf="${myconf} \ |
1925 |
- $(use_enable qt4 bat)" |
1926 |
- fi |
1927 |
- |
1928 |
- myconf="${myconf} \ |
1929 |
- $(use_with X x) \ |
1930 |
- $(use_enable !readline conio) \ |
1931 |
- $(use_enable readline) \ |
1932 |
- $(use_with readline readline /usr) \ |
1933 |
- $(use_with ssl openssl) \ |
1934 |
- $(use_enable ipv6) \ |
1935 |
- $(use_with tcpd tcp-wrappers)" |
1936 |
- |
1937 |
- econf \ |
1938 |
- --enable-acl \ |
1939 |
- --libdir=/usr/$(get_libdir) \ |
1940 |
- --docdir=/usr/share/doc/${PF} \ |
1941 |
- --htmldir=/usr/share/doc/${PF}/html \ |
1942 |
- --with-pid-dir=/var/run \ |
1943 |
- --sysconfdir=/etc/bacula \ |
1944 |
- --with-subsys-dir=/var/lock/subsys \ |
1945 |
- --with-working-dir=/var/lib/bacula \ |
1946 |
- --with-logdir=/var/lib/bacula \ |
1947 |
- --with-scriptdir=/usr/libexec/bacula \ |
1948 |
- --with-systemd=$(systemd_get_unitdir) \ |
1949 |
- --with-dir-user=bacula \ |
1950 |
- --with-dir-group=bacula \ |
1951 |
- --with-sd-user=root \ |
1952 |
- --with-sd-group=bacula \ |
1953 |
- --with-fd-user=root \ |
1954 |
- --with-fd-group=bacula \ |
1955 |
- --enable-smartalloc \ |
1956 |
- --disable-afs \ |
1957 |
- --host=${CHOST} \ |
1958 |
- ${myconf} |
1959 |
- # correct configuration for QT based bat |
1960 |
- if use qt4 ; then |
1961 |
- pushd src/qt-console |
1962 |
- eqmake4 |
1963 |
- popd |
1964 |
- fi |
1965 |
-} |
1966 |
- |
1967 |
-src_compile() { |
1968 |
- # Make build log verbose (bug #447806) |
1969 |
- emake NO_ECHO="" |
1970 |
-} |
1971 |
- |
1972 |
-src_install() { |
1973 |
- emake DESTDIR="${D}" install |
1974 |
- doicon scripts/bacula.png |
1975 |
- |
1976 |
- # install bat icon and desktop file when enabled |
1977 |
- # (for some reason ./configure doesn't pick this up) |
1978 |
- if use qt4 && ! use static ; then |
1979 |
- doicon src/qt-console/images/bat_icon.png |
1980 |
- domenu scripts/bat.desktop |
1981 |
- fi |
1982 |
- |
1983 |
- # remove some scripts we don't need at all |
1984 |
- rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql} |
1985 |
- |
1986 |
- # rename statically linked apps |
1987 |
- if use bacula-clientonly && use static ; then |
1988 |
- pushd "${D}"/usr/sbin || die |
1989 |
- mv static-bacula-fd bacula-fd || die |
1990 |
- mv static-bconsole bconsole || die |
1991 |
- popd || die |
1992 |
- fi |
1993 |
- |
1994 |
- # extra files which 'make install' doesn't cover |
1995 |
- if ! use bacula-clientonly; then |
1996 |
- # the database update scripts |
1997 |
- diropts -m0750 |
1998 |
- insinto /usr/libexec/bacula/updatedb |
1999 |
- insopts -m0754 |
2000 |
- doins "${S}"/updatedb/* |
2001 |
- fperms 0640 /usr/libexec/bacula/updatedb/README |
2002 |
- |
2003 |
- # the logrotate configuration |
2004 |
- # (now unconditional wrt bug #258187) |
2005 |
- diropts -m0755 |
2006 |
- insinto /etc/logrotate.d |
2007 |
- insopts -m0644 |
2008 |
- newins "${S}"/scripts/logrotate bacula |
2009 |
- |
2010 |
- # the logwatch scripts |
2011 |
- if use logwatch; then |
2012 |
- diropts -m0750 |
2013 |
- dodir /usr/share/logwatch/scripts/services |
2014 |
- dodir /usr/share/logwatch/scripts/shared |
2015 |
- dodir /etc/logwatch/conf/logfiles |
2016 |
- dodir /etc/logwatch/conf/services |
2017 |
- pushd "${S}"/scripts/logwatch >&/dev/null || die |
2018 |
- emake DESTDIR="${D}" install |
2019 |
- popd >&/dev/null || die |
2020 |
- fi |
2021 |
- fi |
2022 |
- |
2023 |
- if ! use qt4; then |
2024 |
- rm -vf "${D}"/usr/share/man/man1/bat.1* |
2025 |
- fi |
2026 |
- rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1* |
2027 |
- if use bacula-clientonly || use bacula-nodir; then |
2028 |
- rm -vf "${D}"/usr/share/man/man8/bacula-dir.8* |
2029 |
- rm -vf "${D}"/usr/share/man/man8/dbcheck.8* |
2030 |
- rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
2031 |
- rm -vf "${D}"/usr/libexec/bacula/create_*_database |
2032 |
- rm -vf "${D}"/usr/libexec/bacula/drop_*_database |
2033 |
- rm -vf "${D}"/usr/libexec/bacula/make_*_tables |
2034 |
- rm -vf "${D}"/usr/libexec/bacula/update_*_tables |
2035 |
- rm -vf "${D}"/usr/libexec/bacula/drop_*_tables |
2036 |
- rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges |
2037 |
- rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup |
2038 |
- fi |
2039 |
- if use bacula-clientonly || use bacula-nosd; then |
2040 |
- rm -vf "${D}"/usr/share/man/man8/bacula-sd.8* |
2041 |
- rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
2042 |
- rm -vf "${D}"/usr/share/man/man8/bextract.8* |
2043 |
- rm -vf "${D}"/usr/share/man/man8/bls.8* |
2044 |
- rm -vf "${D}"/usr/share/man/man8/bscan.8* |
2045 |
- rm -vf "${D}"/usr/share/man/man8/btape.8* |
2046 |
- rm -vf "${D}"/usr/libexec/bacula/disk-changer |
2047 |
- rm -vf "${D}"/usr/libexec/bacula/mtx-changer |
2048 |
- rm -vf "${D}"/usr/libexec/bacula/dvd-handler |
2049 |
- fi |
2050 |
- |
2051 |
- # documentation |
2052 |
- dodoc ChangeLog ReleaseNotes SUPPORT |
2053 |
- |
2054 |
- # install examples (bug #457504) |
2055 |
- if use examples; then |
2056 |
- docinto examples/ |
2057 |
- dodoc -r examples/* |
2058 |
- fi |
2059 |
- |
2060 |
- # vim-files |
2061 |
- if use vim-syntax; then |
2062 |
- insinto /usr/share/vim/vimfiles/syntax |
2063 |
- doins scripts/bacula.vim |
2064 |
- insinto /usr/share/vim/vimfiles/ftdetect |
2065 |
- newins scripts/filetype.vim bacula_ft.vim |
2066 |
- fi |
2067 |
- |
2068 |
- # setup init scripts |
2069 |
- myscripts="bacula-fd" |
2070 |
- if ! use bacula-clientonly; then |
2071 |
- if ! use bacula-nodir; then |
2072 |
- myscripts="${myscripts} bacula-dir" |
2073 |
- fi |
2074 |
- if ! use bacula-nosd; then |
2075 |
- myscripts="${myscripts} bacula-sd" |
2076 |
- fi |
2077 |
- fi |
2078 |
- for script in ${myscripts}; do |
2079 |
- # copy over init script and config to a temporary location |
2080 |
- # so we can modify them as needed |
2081 |
- cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" |
2082 |
- cp "${FILESDIR}/newscripts/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
2083 |
- |
2084 |
- # now set the database dependancy for the director init script |
2085 |
- case "${script}" in |
2086 |
- bacula-dir) |
2087 |
- case "${mydbtype}" in |
2088 |
- sqlite3) |
2089 |
- # sqlite databases don't have a daemon |
2090 |
- sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die |
2091 |
- ;; |
2092 |
- *) |
2093 |
- # all other databases have daemons |
2094 |
- sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die |
2095 |
- ;; |
2096 |
- esac |
2097 |
- ;; |
2098 |
- *) |
2099 |
- ;; |
2100 |
- esac |
2101 |
- |
2102 |
- # install init script and config |
2103 |
- newinitd "${T}/${script}".initd "${script}" |
2104 |
- newconfd "${T}/${script}".confd "${script}" |
2105 |
- done |
2106 |
- |
2107 |
- systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service |
2108 |
- |
2109 |
- # make sure the working directory exists |
2110 |
- diropts -m0750 |
2111 |
- keepdir /var/lib/bacula |
2112 |
- |
2113 |
- # make sure bacula group can execute bacula libexec scripts |
2114 |
- fowners -R root:bacula /usr/libexec/bacula |
2115 |
-} |
2116 |
- |
2117 |
-pkg_postinst() { |
2118 |
- if use bacula-clientonly; then |
2119 |
- fowners root:bacula /var/lib/bacula |
2120 |
- else |
2121 |
- fowners bacula:bacula /var/lib/bacula |
2122 |
- fi |
2123 |
- |
2124 |
- if ! use bacula-clientonly && ! use bacula-nodir; then |
2125 |
- einfo |
2126 |
- einfo "If this is a new install, you must create the ${mydbtype} databases with:" |
2127 |
- einfo " /usr/libexec/bacula/create_${mydbtype}_database" |
2128 |
- einfo " /usr/libexec/bacula/make_${mydbtype}_tables" |
2129 |
- einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges" |
2130 |
- einfo |
2131 |
- |
2132 |
- ewarn "ATTENTION!" |
2133 |
- ewarn "The format of the database may have changed." |
2134 |
- ewarn "If you just upgraded from a version below 9.0.0 you must run" |
2135 |
- ewarn "'update_bacula_tables' now." |
2136 |
- ewarn "Make sure to have a backup of your catalog before." |
2137 |
- ewarn |
2138 |
- fi |
2139 |
- |
2140 |
- if use sqlite; then |
2141 |
- einfo |
2142 |
- einfo "Be aware that Bacula does not officially support SQLite database anymore." |
2143 |
- einfo "Best use it only for a client-only installation. See Bug #445540." |
2144 |
- einfo |
2145 |
- fi |
2146 |
- |
2147 |
- einfo "Please note that 'bconsole' will always be installed. To compile 'bat'" |
2148 |
- einfo "you have to enable 'USE=qt4'." |
2149 |
- einfo |
2150 |
-} |
2151 |
|
2152 |
diff --git a/app-backup/bacula/bacula-9.0.6-r1.ebuild b/app-backup/bacula/bacula-9.0.6-r1.ebuild |
2153 |
deleted file mode 100644 |
2154 |
index df095b52d30..00000000000 |
2155 |
--- a/app-backup/bacula/bacula-9.0.6-r1.ebuild |
2156 |
+++ /dev/null |
2157 |
@@ -1,426 +0,0 @@ |
2158 |
-# Copyright 1999-2018 Gentoo Foundation |
2159 |
-# Distributed under the terms of the GNU General Public License v2 |
2160 |
- |
2161 |
-EAPI="6" |
2162 |
- |
2163 |
-inherit qmake-utils desktop systemd user libtool |
2164 |
- |
2165 |
-MY_PV=${PV/_beta/-b} |
2166 |
-MY_P=${PN}-${MY_PV} |
2167 |
- |
2168 |
-DESCRIPTION="Featureful client/server network backup suite" |
2169 |
-HOMEPAGE="http://www.bacula.org/" |
2170 |
-SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz" |
2171 |
- |
2172 |
-LICENSE="AGPL-3" |
2173 |
-SLOT="0" |
2174 |
-KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
2175 |
-IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres qt5 readline +sqlite ssl static tcpd vim-syntax X" |
2176 |
- |
2177 |
-DEPEND=" |
2178 |
- dev-libs/gmp:0 |
2179 |
- !bacula-clientonly? ( |
2180 |
- postgres? ( dev-db/postgresql:=[threads] ) |
2181 |
- mysql? ( virtual/mysql ) |
2182 |
- sqlite? ( dev-db/sqlite:3 ) |
2183 |
- !bacula-nodir? ( virtual/mta ) |
2184 |
- ) |
2185 |
- qt5? ( |
2186 |
- dev-qt/qtsvg:5 |
2187 |
- x11-libs/qwt:6 |
2188 |
- ) |
2189 |
- logwatch? ( sys-apps/logwatch ) |
2190 |
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
2191 |
- readline? ( sys-libs/readline:0 ) |
2192 |
- static? ( |
2193 |
- acl? ( virtual/acl[static-libs] ) |
2194 |
- sys-libs/zlib[static-libs] |
2195 |
- dev-libs/lzo[static-libs] |
2196 |
- sys-libs/ncurses:=[static-libs] |
2197 |
- ssl? ( |
2198 |
- !libressl? ( dev-libs/openssl:0=[static-libs] ) |
2199 |
- libressl? ( dev-libs/libressl:0=[static-libs] ) |
2200 |
- ) |
2201 |
- ) |
2202 |
- !static? ( |
2203 |
- acl? ( virtual/acl ) |
2204 |
- sys-libs/zlib |
2205 |
- dev-libs/lzo |
2206 |
- sys-libs/ncurses:= |
2207 |
- ssl? ( |
2208 |
- !libressl? ( dev-libs/openssl:0= ) |
2209 |
- libressl? ( dev-libs/libressl:0= ) |
2210 |
- ) |
2211 |
- )" |
2212 |
-RDEPEND="${DEPEND} |
2213 |
- !bacula-clientonly? ( |
2214 |
- !bacula-nosd? ( |
2215 |
- sys-block/mtx |
2216 |
- app-arch/mt-st |
2217 |
- ) |
2218 |
- ) |
2219 |
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
2220 |
- |
2221 |
-REQUIRED_USE="!bacula-clientonly? ( ^^ ( mysql postgres sqlite ) ) |
2222 |
- static? ( bacula-clientonly )" |
2223 |
- |
2224 |
-S=${WORKDIR}/${MY_P} |
2225 |
- |
2226 |
-pkg_setup() { |
2227 |
- #XOR and !bacula-clientonly controlled by REQUIRED_USE |
2228 |
- use mysql && export mydbtype="mysql" |
2229 |
- use postgres && export mydbtype="postgresql" |
2230 |
- use sqlite && export mydbtype="sqlite3" |
2231 |
- |
2232 |
- # create the daemon group and user |
2233 |
- if [ -z "$(egetent group bacula 2>/dev/null)" ]; then |
2234 |
- enewgroup bacula |
2235 |
- einfo |
2236 |
- einfo "The group 'bacula' has been created. Any users you add to this" |
2237 |
- einfo "group have access to files created by the daemons." |
2238 |
- einfo |
2239 |
- fi |
2240 |
- |
2241 |
- if use bacula-clientonly && use static && use qt5; then |
2242 |
- ewarn |
2243 |
- ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt5' useflag." |
2244 |
- ewarn |
2245 |
- fi |
2246 |
- |
2247 |
- if ! use bacula-clientonly; then |
2248 |
- if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then |
2249 |
- enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw |
2250 |
- einfo |
2251 |
- einfo "The user 'bacula' has been created. Please see the bacula manual" |
2252 |
- einfo "for information about running bacula as a non-root user." |
2253 |
- einfo |
2254 |
- fi |
2255 |
- fi |
2256 |
-} |
2257 |
- |
2258 |
-src_prepare() { |
2259 |
- # adjusts default configuration files for several binaries |
2260 |
- # to /etc/bacula/<config> instead of ./<config> |
2261 |
- pushd src >&/dev/null || die |
2262 |
- for f in console/console.c dird/dird.c filed/filed.c \ |
2263 |
- stored/bcopy.c stored/bextract.c stored/bls.c \ |
2264 |
- stored/bscan.c stored/btape.c stored/stored.c \ |
2265 |
- qt-console/main.cpp; do |
2266 |
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \ |
2267 |
- || die "sed on ${f} failed" |
2268 |
- done |
2269 |
- popd >&/dev/null || die |
2270 |
- |
2271 |
- # bug 466688 drop deprecated categories from Desktop file |
2272 |
- sed -i -e 's/Application;//' scripts/bat.desktop.in || die |
2273 |
- |
2274 |
- # bug 466690 Use CXXFLAGS instead of CFLAGS |
2275 |
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die |
2276 |
- |
2277 |
- # drop automatic install of unneeded documentation (for bug 356499) |
2278 |
- eapply -p0 "${FILESDIR}"/7.2.0/${PN}-7.2.0-doc.patch |
2279 |
- |
2280 |
- # bug #310087 |
2281 |
- eapply "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch |
2282 |
- |
2283 |
- # bug #311161 |
2284 |
- eapply -p0 "${FILESDIR}"/9.0.2/${PN}-9.0.2-lib-search-path.patch |
2285 |
- |
2286 |
- # bat needs to respect LDFLAGS |
2287 |
- eapply -p0 "${FILESDIR}"/5.2.3/${PN}-5.2.3-ldflags.patch |
2288 |
- |
2289 |
- # bug #328701 |
2290 |
- eapply -p0 "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch |
2291 |
- |
2292 |
- eapply -p0 "${FILESDIR}"/9.0.2/${PN}-9.0.2-fix-static.patch |
2293 |
- |
2294 |
- # fix soname in libbaccat.so bug #602952 |
2295 |
- eapply -p0 "${FILESDIR}/bacula-fix-sonames.patch" |
2296 |
- |
2297 |
- # do not strip binaries |
2298 |
- sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die |
2299 |
- sed -i -e "s/strip /# strip /" src/console/Makefile.in || die |
2300 |
- |
2301 |
- # fix file not found error during make depend |
2302 |
- eapply -p0 "${FILESDIR}"/7.0.2/${PN}-7.0.2-depend.patch |
2303 |
- |
2304 |
- # fix missing QtGlobal include in src/qt-console/pages.h for Qt5 |
2305 |
- eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-fix-pages-h-qt-includes.patch |
2306 |
- eapply_user |
2307 |
- |
2308 |
- # build 'bat' for Qt5 |
2309 |
- export QT_SELECT=qt5 |
2310 |
- |
2311 |
- # Fix systemd unit files: |
2312 |
- # bug 497748 |
2313 |
- sed -i -e '/Requires/d' platforms/systemd/*.service.in || die |
2314 |
- sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die |
2315 |
- # bug 504370 |
2316 |
- sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in || die |
2317 |
- # bug 584442 and 504368 |
2318 |
- sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in || die |
2319 |
- |
2320 |
- # fix bundled libtool (bug 466696) |
2321 |
- # But first move directory with M4 macros out of the way. |
2322 |
- # It is only needed by autoconf and gives errors during elibtoolize. |
2323 |
- mv autoconf/libtool autoconf/libtool1 || die |
2324 |
- elibtoolize |
2325 |
-} |
2326 |
- |
2327 |
-src_configure() { |
2328 |
- local myconf='' |
2329 |
- |
2330 |
- if use bacula-clientonly; then |
2331 |
- myconf="${myconf} \ |
2332 |
- $(use_enable bacula-clientonly client-only) \ |
2333 |
- $(use_enable !static libtool) \ |
2334 |
- $(use_enable static static-cons) \ |
2335 |
- $(use_enable static static-fd)" |
2336 |
- else |
2337 |
- myconf="${myconf} \ |
2338 |
- $(use_enable !bacula-nodir build-dird) \ |
2339 |
- $(use_enable !bacula-nosd build-stored)" |
2340 |
- # bug #311099 |
2341 |
- # database support needed by dir-only *and* sd-only |
2342 |
- # build as well (for building bscan, btape, etc.) |
2343 |
- myconf="${myconf} |
2344 |
- --with-${mydbtype}" |
2345 |
- if use mysql; then |
2346 |
- myconf="${myconf} \ |
2347 |
- --disable-batch-insert" |
2348 |
- else |
2349 |
- myconf="${myconf} \ |
2350 |
- --enable-batch-insert" |
2351 |
- fi |
2352 |
- fi |
2353 |
- |
2354 |
- # do not build bat if 'static' clientonly |
2355 |
- if ! use bacula-clientonly || ! use static; then |
2356 |
- myconf="${myconf} \ |
2357 |
- $(use_enable qt5 bat)" |
2358 |
- fi |
2359 |
- |
2360 |
- myconf="${myconf} \ |
2361 |
- $(use_with X x) \ |
2362 |
- $(use_enable !readline conio) \ |
2363 |
- $(use_enable readline) \ |
2364 |
- $(use_with readline readline /usr) \ |
2365 |
- $(use_with ssl openssl) \ |
2366 |
- $(use_enable ipv6) \ |
2367 |
- $(use_enable acl) \ |
2368 |
- $(use_with tcpd tcp-wrappers)" |
2369 |
- |
2370 |
- econf \ |
2371 |
- --libdir=/usr/$(get_libdir) \ |
2372 |
- --docdir=/usr/share/doc/${PF} \ |
2373 |
- --htmldir=/usr/share/doc/${PF}/html \ |
2374 |
- --with-pid-dir=/var/run \ |
2375 |
- --sysconfdir=/etc/bacula \ |
2376 |
- --with-subsys-dir=/var/lock/subsys \ |
2377 |
- --with-working-dir=/var/lib/bacula \ |
2378 |
- --with-logdir=/var/lib/bacula \ |
2379 |
- --with-scriptdir=/usr/libexec/bacula \ |
2380 |
- --with-systemd=$(systemd_get_systemunitdir) \ |
2381 |
- --with-dir-user=bacula \ |
2382 |
- --with-dir-group=bacula \ |
2383 |
- --with-sd-user=root \ |
2384 |
- --with-sd-group=bacula \ |
2385 |
- --with-fd-user=root \ |
2386 |
- --with-fd-group=bacula \ |
2387 |
- --enable-smartalloc \ |
2388 |
- --disable-afs \ |
2389 |
- --host=${CHOST} \ |
2390 |
- ${myconf} |
2391 |
- |
2392 |
- # correct configuration for QT based bat |
2393 |
- if use qt5 ; then |
2394 |
- pushd src/qt-console |
2395 |
- eqmake5 |
2396 |
- popd |
2397 |
- fi |
2398 |
-} |
2399 |
- |
2400 |
-src_compile() { |
2401 |
- # Make build log verbose (bug #447806) |
2402 |
- emake NO_ECHO="" |
2403 |
-} |
2404 |
- |
2405 |
-src_install() { |
2406 |
- emake DESTDIR="${D}" install |
2407 |
- doicon scripts/bacula.png |
2408 |
- |
2409 |
- # install bat icon and desktop file when enabled |
2410 |
- # (for some reason ./configure doesn't pick this up) |
2411 |
- if use qt5 && ! use static ; then |
2412 |
- doicon src/qt-console/images/bat_icon.png |
2413 |
- domenu scripts/bat.desktop |
2414 |
- fi |
2415 |
- |
2416 |
- # remove some scripts we don't need at all |
2417 |
- rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql} |
2418 |
- |
2419 |
- # rename statically linked apps |
2420 |
- if use bacula-clientonly && use static ; then |
2421 |
- pushd "${D}"/usr/sbin || die |
2422 |
- mv static-bacula-fd bacula-fd || die |
2423 |
- mv static-bconsole bconsole || die |
2424 |
- popd || die |
2425 |
- fi |
2426 |
- |
2427 |
- # extra files which 'make install' doesn't cover |
2428 |
- if ! use bacula-clientonly; then |
2429 |
- # the database update scripts |
2430 |
- diropts -m0750 |
2431 |
- insinto /usr/libexec/bacula/updatedb |
2432 |
- insopts -m0754 |
2433 |
- doins "${S}"/updatedb/* |
2434 |
- fperms 0640 /usr/libexec/bacula/updatedb/README |
2435 |
- |
2436 |
- # the logrotate configuration |
2437 |
- # (now unconditional wrt bug #258187) |
2438 |
- diropts -m0755 |
2439 |
- insinto /etc/logrotate.d |
2440 |
- insopts -m0644 |
2441 |
- newins "${S}"/scripts/logrotate bacula |
2442 |
- |
2443 |
- # the logwatch scripts |
2444 |
- if use logwatch; then |
2445 |
- diropts -m0750 |
2446 |
- dodir /usr/share/logwatch/scripts/services |
2447 |
- dodir /usr/share/logwatch/scripts/shared |
2448 |
- dodir /etc/logwatch/conf/logfiles |
2449 |
- dodir /etc/logwatch/conf/services |
2450 |
- pushd "${S}"/scripts/logwatch >&/dev/null || die |
2451 |
- emake DESTDIR="${D}" install |
2452 |
- popd >&/dev/null || die |
2453 |
- fi |
2454 |
- fi |
2455 |
- |
2456 |
- if ! use qt5; then |
2457 |
- rm -vf "${D}"/usr/share/man/man1/bat.1* |
2458 |
- fi |
2459 |
- rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1* |
2460 |
- if use bacula-clientonly || use bacula-nodir; then |
2461 |
- rm -vf "${D}"/usr/share/man/man8/bacula-dir.8* |
2462 |
- rm -vf "${D}"/usr/share/man/man8/dbcheck.8* |
2463 |
- rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
2464 |
- rm -vf "${D}"/usr/libexec/bacula/create_*_database |
2465 |
- rm -vf "${D}"/usr/libexec/bacula/drop_*_database |
2466 |
- rm -vf "${D}"/usr/libexec/bacula/make_*_tables |
2467 |
- rm -vf "${D}"/usr/libexec/bacula/update_*_tables |
2468 |
- rm -vf "${D}"/usr/libexec/bacula/drop_*_tables |
2469 |
- rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges |
2470 |
- rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup |
2471 |
- fi |
2472 |
- if use bacula-clientonly || use bacula-nosd; then |
2473 |
- rm -vf "${D}"/usr/share/man/man8/bacula-sd.8* |
2474 |
- rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
2475 |
- rm -vf "${D}"/usr/share/man/man8/bextract.8* |
2476 |
- rm -vf "${D}"/usr/share/man/man8/bls.8* |
2477 |
- rm -vf "${D}"/usr/share/man/man8/bscan.8* |
2478 |
- rm -vf "${D}"/usr/share/man/man8/btape.8* |
2479 |
- rm -vf "${D}"/usr/libexec/bacula/disk-changer |
2480 |
- rm -vf "${D}"/usr/libexec/bacula/mtx-changer |
2481 |
- rm -vf "${D}"/usr/libexec/bacula/dvd-handler |
2482 |
- fi |
2483 |
- |
2484 |
- # documentation |
2485 |
- dodoc ChangeLog ReleaseNotes SUPPORT |
2486 |
- |
2487 |
- # install examples (bug #457504) |
2488 |
- if use examples; then |
2489 |
- docinto examples/ |
2490 |
- dodoc -r examples/* |
2491 |
- fi |
2492 |
- |
2493 |
- # vim-files |
2494 |
- if use vim-syntax; then |
2495 |
- insinto /usr/share/vim/vimfiles/syntax |
2496 |
- doins scripts/bacula.vim |
2497 |
- insinto /usr/share/vim/vimfiles/ftdetect |
2498 |
- newins scripts/filetype.vim bacula_ft.vim |
2499 |
- fi |
2500 |
- |
2501 |
- # setup init scripts |
2502 |
- myscripts="bacula-fd" |
2503 |
- if ! use bacula-clientonly; then |
2504 |
- if ! use bacula-nodir; then |
2505 |
- myscripts="${myscripts} bacula-dir" |
2506 |
- fi |
2507 |
- if ! use bacula-nosd; then |
2508 |
- myscripts="${myscripts} bacula-sd" |
2509 |
- fi |
2510 |
- fi |
2511 |
- for script in ${myscripts}; do |
2512 |
- # copy over init script and config to a temporary location |
2513 |
- # so we can modify them as needed |
2514 |
- cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" |
2515 |
- cp "${FILESDIR}/newscripts/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
2516 |
- |
2517 |
- # now set the database dependancy for the director init script |
2518 |
- case "${script}" in |
2519 |
- bacula-dir) |
2520 |
- case "${mydbtype}" in |
2521 |
- sqlite3) |
2522 |
- # sqlite databases don't have a daemon |
2523 |
- sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die |
2524 |
- ;; |
2525 |
- *) |
2526 |
- # all other databases have daemons |
2527 |
- sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die |
2528 |
- ;; |
2529 |
- esac |
2530 |
- ;; |
2531 |
- *) |
2532 |
- ;; |
2533 |
- esac |
2534 |
- |
2535 |
- # install init script and config |
2536 |
- newinitd "${T}/${script}".initd "${script}" |
2537 |
- newconfd "${T}/${script}".confd "${script}" |
2538 |
- done |
2539 |
- |
2540 |
- systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service |
2541 |
- |
2542 |
- # make sure the working directory exists |
2543 |
- diropts -m0750 |
2544 |
- keepdir /var/lib/bacula |
2545 |
- |
2546 |
- # make sure bacula group can execute bacula libexec scripts |
2547 |
- fowners -R root:bacula /usr/libexec/bacula |
2548 |
-} |
2549 |
- |
2550 |
-pkg_postinst() { |
2551 |
- if use bacula-clientonly; then |
2552 |
- fowners root:bacula /var/lib/bacula |
2553 |
- else |
2554 |
- fowners bacula:bacula /var/lib/bacula |
2555 |
- fi |
2556 |
- |
2557 |
- if ! use bacula-clientonly && ! use bacula-nodir; then |
2558 |
- einfo |
2559 |
- einfo "If this is a new install, you must create the ${mydbtype} databases with:" |
2560 |
- einfo " /usr/libexec/bacula/create_${mydbtype}_database" |
2561 |
- einfo " /usr/libexec/bacula/make_${mydbtype}_tables" |
2562 |
- einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges" |
2563 |
- einfo |
2564 |
- |
2565 |
- ewarn "ATTENTION!" |
2566 |
- ewarn "The format of the database may have changed." |
2567 |
- ewarn "If you just upgraded from a version below 9.0.0 you must run" |
2568 |
- ewarn "'update_bacula_tables' now." |
2569 |
- ewarn "Make sure to have a backup of your catalog before." |
2570 |
- ewarn |
2571 |
- fi |
2572 |
- |
2573 |
- if use sqlite; then |
2574 |
- einfo |
2575 |
- einfo "Be aware that Bacula does not officially support SQLite database anymore." |
2576 |
- einfo "Best use it only for a client-only installation. See Bug #445540." |
2577 |
- einfo |
2578 |
- fi |
2579 |
- |
2580 |
- einfo "Please note that 'bconsole' will always be installed. To compile 'bat'" |
2581 |
- einfo "you have to enable 'USE=qt5'." |
2582 |
- einfo |
2583 |
-} |
2584 |
|
2585 |
diff --git a/app-backup/bacula/bacula-9.0.6.ebuild b/app-backup/bacula/bacula-9.0.6.ebuild |
2586 |
deleted file mode 100644 |
2587 |
index 4cbd1b5794b..00000000000 |
2588 |
--- a/app-backup/bacula/bacula-9.0.6.ebuild |
2589 |
+++ /dev/null |
2590 |
@@ -1,418 +0,0 @@ |
2591 |
-# Copyright 1999-2017 Gentoo Foundation |
2592 |
-# Distributed under the terms of the GNU General Public License v2 |
2593 |
- |
2594 |
-EAPI="5" |
2595 |
- |
2596 |
-inherit eutils multilib qt4-r2 systemd user libtool |
2597 |
- |
2598 |
-MY_PV=${PV/_beta/-b} |
2599 |
-MY_P=${PN}-${MY_PV} |
2600 |
- |
2601 |
-DESCRIPTION="Featureful client/server network backup suite" |
2602 |
-HOMEPAGE="http://www.bacula.org/" |
2603 |
-SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz" |
2604 |
- |
2605 |
-LICENSE="AGPL-3" |
2606 |
-SLOT="0" |
2607 |
-KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
2608 |
-IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres qt4 readline +sqlite ssl static tcpd vim-syntax X" |
2609 |
- |
2610 |
-DEPEND=" |
2611 |
- dev-libs/gmp:0 |
2612 |
- !bacula-clientonly? ( |
2613 |
- postgres? ( dev-db/postgresql:=[threads] ) |
2614 |
- mysql? ( virtual/mysql ) |
2615 |
- sqlite? ( dev-db/sqlite:3 ) |
2616 |
- !bacula-nodir? ( virtual/mta ) |
2617 |
- ) |
2618 |
- qt4? ( |
2619 |
- dev-qt/qtsvg:4 |
2620 |
- x11-libs/qwt:5 |
2621 |
- ) |
2622 |
- logwatch? ( sys-apps/logwatch ) |
2623 |
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
2624 |
- readline? ( sys-libs/readline:0 ) |
2625 |
- static? ( |
2626 |
- acl? ( virtual/acl[static-libs] ) |
2627 |
- sys-libs/zlib[static-libs] |
2628 |
- dev-libs/lzo[static-libs] |
2629 |
- sys-libs/ncurses:=[static-libs] |
2630 |
- ssl? ( |
2631 |
- !libressl? ( dev-libs/openssl:0=[static-libs] ) |
2632 |
- libressl? ( dev-libs/libressl:0=[static-libs] ) |
2633 |
- ) |
2634 |
- ) |
2635 |
- !static? ( |
2636 |
- acl? ( virtual/acl ) |
2637 |
- sys-libs/zlib |
2638 |
- dev-libs/lzo |
2639 |
- sys-libs/ncurses:= |
2640 |
- ssl? ( |
2641 |
- !libressl? ( dev-libs/openssl:0= ) |
2642 |
- libressl? ( dev-libs/libressl:0= ) |
2643 |
- ) |
2644 |
- )" |
2645 |
-RDEPEND="${DEPEND} |
2646 |
- !bacula-clientonly? ( |
2647 |
- !bacula-nosd? ( |
2648 |
- sys-block/mtx |
2649 |
- app-arch/mt-st |
2650 |
- ) |
2651 |
- ) |
2652 |
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
2653 |
- |
2654 |
-REQUIRED_USE="!bacula-clientonly? ( ^^ ( mysql postgres sqlite ) ) |
2655 |
- static? ( bacula-clientonly )" |
2656 |
- |
2657 |
-S=${WORKDIR}/${MY_P} |
2658 |
- |
2659 |
-pkg_setup() { |
2660 |
- #XOR and !bacula-clientonly controlled by REQUIRED_USE |
2661 |
- use mysql && export mydbtype="mysql" |
2662 |
- use postgres && export mydbtype="postgresql" |
2663 |
- use sqlite && export mydbtype="sqlite3" |
2664 |
- |
2665 |
- # create the daemon group and user |
2666 |
- if [ -z "$(egetent group bacula 2>/dev/null)" ]; then |
2667 |
- enewgroup bacula |
2668 |
- einfo |
2669 |
- einfo "The group 'bacula' has been created. Any users you add to this" |
2670 |
- einfo "group have access to files created by the daemons." |
2671 |
- einfo |
2672 |
- fi |
2673 |
- |
2674 |
- if use bacula-clientonly && use static && use qt4; then |
2675 |
- ewarn |
2676 |
- ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag." |
2677 |
- ewarn |
2678 |
- fi |
2679 |
- |
2680 |
- if ! use bacula-clientonly; then |
2681 |
- if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then |
2682 |
- enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw |
2683 |
- einfo |
2684 |
- einfo "The user 'bacula' has been created. Please see the bacula manual" |
2685 |
- einfo "for information about running bacula as a non-root user." |
2686 |
- einfo |
2687 |
- fi |
2688 |
- fi |
2689 |
-} |
2690 |
- |
2691 |
-src_prepare() { |
2692 |
- # adjusts default configuration files for several binaries |
2693 |
- # to /etc/bacula/<config> instead of ./<config> |
2694 |
- pushd src >&/dev/null || die |
2695 |
- for f in console/console.c dird/dird.c filed/filed.c \ |
2696 |
- stored/bcopy.c stored/bextract.c stored/bls.c \ |
2697 |
- stored/bscan.c stored/btape.c stored/stored.c \ |
2698 |
- qt-console/main.cpp; do |
2699 |
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \ |
2700 |
- || die "sed on ${f} failed" |
2701 |
- done |
2702 |
- popd >&/dev/null || die |
2703 |
- |
2704 |
- # bug 466688 drop deprecated categories from Desktop file |
2705 |
- sed -i -e 's/Application;//' scripts/bat.desktop.in || die |
2706 |
- |
2707 |
- # bug 466690 Use CXXFLAGS instead of CFLAGS |
2708 |
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die |
2709 |
- |
2710 |
- # drop automatic install of unneeded documentation (for bug 356499) |
2711 |
- epatch "${FILESDIR}"/7.2.0/${PN}-7.2.0-doc.patch |
2712 |
- |
2713 |
- # bug #310087 |
2714 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch |
2715 |
- |
2716 |
- # bug #311161 |
2717 |
- epatch "${FILESDIR}"/9.0.2/${PN}-9.0.2-lib-search-path.patch |
2718 |
- |
2719 |
- # bat needs to respect LDFLAGS |
2720 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-ldflags.patch |
2721 |
- |
2722 |
- # bug #328701 |
2723 |
- epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch |
2724 |
- |
2725 |
- epatch "${FILESDIR}"/9.0.2/${PN}-9.0.2-fix-static.patch |
2726 |
- |
2727 |
- # fix soname in libbaccat.so bug #602952 |
2728 |
- epatch "${FILESDIR}/bacula-fix-sonames.patch" |
2729 |
- |
2730 |
- # do not strip binaries |
2731 |
- sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die |
2732 |
- sed -i -e "s/strip /# strip /" src/console/Makefile.in || die |
2733 |
- |
2734 |
- # fix file not found error during make depend |
2735 |
- epatch "${FILESDIR}"/7.0.2/${PN}-7.0.2-depend.patch |
2736 |
- |
2737 |
- # Fix systemd unit files: |
2738 |
- # bug 497748 |
2739 |
- sed -i -e '/Requires/d' platforms/systemd/*.service.in || die |
2740 |
- sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die |
2741 |
- # bug 504370 |
2742 |
- sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in || die |
2743 |
- # bug 584442 and 504368 |
2744 |
- sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in || die |
2745 |
- |
2746 |
- # fix bundled libtool (bug 466696) |
2747 |
- # But first move directory with M4 macros out of the way. |
2748 |
- # It is only needed by autoconf and gives errors during elibtoolize. |
2749 |
- mv autoconf/libtool autoconf/libtool1 || die |
2750 |
- elibtoolize |
2751 |
-} |
2752 |
- |
2753 |
-src_configure() { |
2754 |
- local myconf='' |
2755 |
- |
2756 |
- if use bacula-clientonly; then |
2757 |
- myconf="${myconf} \ |
2758 |
- $(use_enable bacula-clientonly client-only) \ |
2759 |
- $(use_enable !static libtool) \ |
2760 |
- $(use_enable static static-cons) \ |
2761 |
- $(use_enable static static-fd)" |
2762 |
- else |
2763 |
- myconf="${myconf} \ |
2764 |
- $(use_enable !bacula-nodir build-dird) \ |
2765 |
- $(use_enable !bacula-nosd build-stored)" |
2766 |
- # bug #311099 |
2767 |
- # database support needed by dir-only *and* sd-only |
2768 |
- # build as well (for building bscan, btape, etc.) |
2769 |
- myconf="${myconf} |
2770 |
- --with-${mydbtype}" |
2771 |
- if use mysql; then |
2772 |
- myconf="${myconf} \ |
2773 |
- --disable-batch-insert" |
2774 |
- else |
2775 |
- myconf="${myconf} \ |
2776 |
- --enable-batch-insert" |
2777 |
- fi |
2778 |
- fi |
2779 |
- |
2780 |
- # do not build bat if 'static' clientonly |
2781 |
- if ! use bacula-clientonly || ! use static; then |
2782 |
- myconf="${myconf} \ |
2783 |
- $(use_enable qt4 bat)" |
2784 |
- fi |
2785 |
- |
2786 |
- myconf="${myconf} \ |
2787 |
- $(use_with X x) \ |
2788 |
- $(use_enable !readline conio) \ |
2789 |
- $(use_enable readline) \ |
2790 |
- $(use_with readline readline /usr) \ |
2791 |
- $(use_with ssl openssl) \ |
2792 |
- $(use_enable ipv6) \ |
2793 |
- $(use_enable acl) \ |
2794 |
- $(use_with tcpd tcp-wrappers)" |
2795 |
- |
2796 |
- econf \ |
2797 |
- --libdir=/usr/$(get_libdir) \ |
2798 |
- --docdir=/usr/share/doc/${PF} \ |
2799 |
- --htmldir=/usr/share/doc/${PF}/html \ |
2800 |
- --with-pid-dir=/var/run \ |
2801 |
- --sysconfdir=/etc/bacula \ |
2802 |
- --with-subsys-dir=/var/lock/subsys \ |
2803 |
- --with-working-dir=/var/lib/bacula \ |
2804 |
- --with-logdir=/var/lib/bacula \ |
2805 |
- --with-scriptdir=/usr/libexec/bacula \ |
2806 |
- --with-systemd=$(systemd_get_unitdir) \ |
2807 |
- --with-dir-user=bacula \ |
2808 |
- --with-dir-group=bacula \ |
2809 |
- --with-sd-user=root \ |
2810 |
- --with-sd-group=bacula \ |
2811 |
- --with-fd-user=root \ |
2812 |
- --with-fd-group=bacula \ |
2813 |
- --enable-smartalloc \ |
2814 |
- --disable-afs \ |
2815 |
- --host=${CHOST} \ |
2816 |
- ${myconf} |
2817 |
- # correct configuration for QT based bat |
2818 |
- if use qt4 ; then |
2819 |
- pushd src/qt-console |
2820 |
- eqmake4 |
2821 |
- popd |
2822 |
- fi |
2823 |
-} |
2824 |
- |
2825 |
-src_compile() { |
2826 |
- # Make build log verbose (bug #447806) |
2827 |
- emake NO_ECHO="" |
2828 |
-} |
2829 |
- |
2830 |
-src_install() { |
2831 |
- emake DESTDIR="${D}" install |
2832 |
- doicon scripts/bacula.png |
2833 |
- |
2834 |
- # install bat icon and desktop file when enabled |
2835 |
- # (for some reason ./configure doesn't pick this up) |
2836 |
- if use qt4 && ! use static ; then |
2837 |
- doicon src/qt-console/images/bat_icon.png |
2838 |
- domenu scripts/bat.desktop |
2839 |
- fi |
2840 |
- |
2841 |
- # remove some scripts we don't need at all |
2842 |
- rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql} |
2843 |
- |
2844 |
- # rename statically linked apps |
2845 |
- if use bacula-clientonly && use static ; then |
2846 |
- pushd "${D}"/usr/sbin || die |
2847 |
- mv static-bacula-fd bacula-fd || die |
2848 |
- mv static-bconsole bconsole || die |
2849 |
- popd || die |
2850 |
- fi |
2851 |
- |
2852 |
- # extra files which 'make install' doesn't cover |
2853 |
- if ! use bacula-clientonly; then |
2854 |
- # the database update scripts |
2855 |
- diropts -m0750 |
2856 |
- insinto /usr/libexec/bacula/updatedb |
2857 |
- insopts -m0754 |
2858 |
- doins "${S}"/updatedb/* |
2859 |
- fperms 0640 /usr/libexec/bacula/updatedb/README |
2860 |
- |
2861 |
- # the logrotate configuration |
2862 |
- # (now unconditional wrt bug #258187) |
2863 |
- diropts -m0755 |
2864 |
- insinto /etc/logrotate.d |
2865 |
- insopts -m0644 |
2866 |
- newins "${S}"/scripts/logrotate bacula |
2867 |
- |
2868 |
- # the logwatch scripts |
2869 |
- if use logwatch; then |
2870 |
- diropts -m0750 |
2871 |
- dodir /usr/share/logwatch/scripts/services |
2872 |
- dodir /usr/share/logwatch/scripts/shared |
2873 |
- dodir /etc/logwatch/conf/logfiles |
2874 |
- dodir /etc/logwatch/conf/services |
2875 |
- pushd "${S}"/scripts/logwatch >&/dev/null || die |
2876 |
- emake DESTDIR="${D}" install |
2877 |
- popd >&/dev/null || die |
2878 |
- fi |
2879 |
- fi |
2880 |
- |
2881 |
- if ! use qt4; then |
2882 |
- rm -vf "${D}"/usr/share/man/man1/bat.1* |
2883 |
- fi |
2884 |
- rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1* |
2885 |
- if use bacula-clientonly || use bacula-nodir; then |
2886 |
- rm -vf "${D}"/usr/share/man/man8/bacula-dir.8* |
2887 |
- rm -vf "${D}"/usr/share/man/man8/dbcheck.8* |
2888 |
- rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
2889 |
- rm -vf "${D}"/usr/libexec/bacula/create_*_database |
2890 |
- rm -vf "${D}"/usr/libexec/bacula/drop_*_database |
2891 |
- rm -vf "${D}"/usr/libexec/bacula/make_*_tables |
2892 |
- rm -vf "${D}"/usr/libexec/bacula/update_*_tables |
2893 |
- rm -vf "${D}"/usr/libexec/bacula/drop_*_tables |
2894 |
- rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges |
2895 |
- rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup |
2896 |
- fi |
2897 |
- if use bacula-clientonly || use bacula-nosd; then |
2898 |
- rm -vf "${D}"/usr/share/man/man8/bacula-sd.8* |
2899 |
- rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
2900 |
- rm -vf "${D}"/usr/share/man/man8/bextract.8* |
2901 |
- rm -vf "${D}"/usr/share/man/man8/bls.8* |
2902 |
- rm -vf "${D}"/usr/share/man/man8/bscan.8* |
2903 |
- rm -vf "${D}"/usr/share/man/man8/btape.8* |
2904 |
- rm -vf "${D}"/usr/libexec/bacula/disk-changer |
2905 |
- rm -vf "${D}"/usr/libexec/bacula/mtx-changer |
2906 |
- rm -vf "${D}"/usr/libexec/bacula/dvd-handler |
2907 |
- fi |
2908 |
- |
2909 |
- # documentation |
2910 |
- dodoc ChangeLog ReleaseNotes SUPPORT |
2911 |
- |
2912 |
- # install examples (bug #457504) |
2913 |
- if use examples; then |
2914 |
- docinto examples/ |
2915 |
- dodoc -r examples/* |
2916 |
- fi |
2917 |
- |
2918 |
- # vim-files |
2919 |
- if use vim-syntax; then |
2920 |
- insinto /usr/share/vim/vimfiles/syntax |
2921 |
- doins scripts/bacula.vim |
2922 |
- insinto /usr/share/vim/vimfiles/ftdetect |
2923 |
- newins scripts/filetype.vim bacula_ft.vim |
2924 |
- fi |
2925 |
- |
2926 |
- # setup init scripts |
2927 |
- myscripts="bacula-fd" |
2928 |
- if ! use bacula-clientonly; then |
2929 |
- if ! use bacula-nodir; then |
2930 |
- myscripts="${myscripts} bacula-dir" |
2931 |
- fi |
2932 |
- if ! use bacula-nosd; then |
2933 |
- myscripts="${myscripts} bacula-sd" |
2934 |
- fi |
2935 |
- fi |
2936 |
- for script in ${myscripts}; do |
2937 |
- # copy over init script and config to a temporary location |
2938 |
- # so we can modify them as needed |
2939 |
- cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" |
2940 |
- cp "${FILESDIR}/newscripts/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
2941 |
- |
2942 |
- # now set the database dependancy for the director init script |
2943 |
- case "${script}" in |
2944 |
- bacula-dir) |
2945 |
- case "${mydbtype}" in |
2946 |
- sqlite3) |
2947 |
- # sqlite databases don't have a daemon |
2948 |
- sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die |
2949 |
- ;; |
2950 |
- *) |
2951 |
- # all other databases have daemons |
2952 |
- sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die |
2953 |
- ;; |
2954 |
- esac |
2955 |
- ;; |
2956 |
- *) |
2957 |
- ;; |
2958 |
- esac |
2959 |
- |
2960 |
- # install init script and config |
2961 |
- newinitd "${T}/${script}".initd "${script}" |
2962 |
- newconfd "${T}/${script}".confd "${script}" |
2963 |
- done |
2964 |
- |
2965 |
- systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service |
2966 |
- |
2967 |
- # make sure the working directory exists |
2968 |
- diropts -m0750 |
2969 |
- keepdir /var/lib/bacula |
2970 |
- |
2971 |
- # make sure bacula group can execute bacula libexec scripts |
2972 |
- fowners -R root:bacula /usr/libexec/bacula |
2973 |
-} |
2974 |
- |
2975 |
-pkg_postinst() { |
2976 |
- if use bacula-clientonly; then |
2977 |
- fowners root:bacula /var/lib/bacula |
2978 |
- else |
2979 |
- fowners bacula:bacula /var/lib/bacula |
2980 |
- fi |
2981 |
- |
2982 |
- if ! use bacula-clientonly && ! use bacula-nodir; then |
2983 |
- einfo |
2984 |
- einfo "If this is a new install, you must create the ${mydbtype} databases with:" |
2985 |
- einfo " /usr/libexec/bacula/create_${mydbtype}_database" |
2986 |
- einfo " /usr/libexec/bacula/make_${mydbtype}_tables" |
2987 |
- einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges" |
2988 |
- einfo |
2989 |
- |
2990 |
- ewarn "ATTENTION!" |
2991 |
- ewarn "The format of the database may have changed." |
2992 |
- ewarn "If you just upgraded from a version below 9.0.0 you must run" |
2993 |
- ewarn "'update_bacula_tables' now." |
2994 |
- ewarn "Make sure to have a backup of your catalog before." |
2995 |
- ewarn |
2996 |
- fi |
2997 |
- |
2998 |
- if use sqlite; then |
2999 |
- einfo |
3000 |
- einfo "Be aware that Bacula does not officially support SQLite database anymore." |
3001 |
- einfo "Best use it only for a client-only installation. See Bug #445540." |
3002 |
- einfo |
3003 |
- fi |
3004 |
- |
3005 |
- einfo "Please note that 'bconsole' will always be installed. To compile 'bat'" |
3006 |
- einfo "you have to enable 'USE=qt4'." |
3007 |
- einfo |
3008 |
-} |