Gentoo Archives: gentoo-commits

From: "Thomas Beierlein (tomjbe)" <tomjbe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-backup/bacula: ChangeLog bacula-5.0.3.ebuild bacula-3.0.2.ebuild bacula-5.0.2.ebuild bacula-2.4.4.ebuild
Date: Sat, 21 Aug 2010 07:09:30
Message-Id: 20100821070925.872802004E@flycatcher.gentoo.org
1 tomjbe 10/08/21 07:09:25
2
3 Modified: ChangeLog
4 Added: bacula-5.0.3.ebuild
5 Removed: bacula-3.0.2.ebuild bacula-5.0.2.ebuild
6 bacula-2.4.4.ebuild
7 Log:
8 Version bump to 5.0.3. Cleanup of old versions.
9 (Portage version: 2.1.8.3/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.100 app-backup/bacula/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/bacula/ChangeLog?rev=1.100&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/bacula/ChangeLog?rev=1.100&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/bacula/ChangeLog?r1=1.99&r2=1.100
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/app-backup/bacula/ChangeLog,v
21 retrieving revision 1.99
22 retrieving revision 1.100
23 diff -u -r1.99 -r1.100
24 --- ChangeLog 23 Jul 2010 07:10:09 -0000 1.99
25 +++ ChangeLog 21 Aug 2010 07:09:25 -0000 1.100
26 @@ -1,6 +1,27 @@
27 # ChangeLog for app-backup/bacula
28 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/app-backup/bacula/ChangeLog,v 1.99 2010/07/23 07:10:09 tomjbe Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/app-backup/bacula/ChangeLog,v 1.100 2010/08/21 07:09:25 tomjbe Exp $
31 +
32 +*bacula-5.0.3 (21 Aug 2010)
33 +
34 + 21 Aug 2010; Thomas Beierlein <tomjbe@g.o>
35 + -files/2.4.4/bacula-default-configs.patch, -files/2.4.4/bacula-dir-conf,
36 + -files/2.4.4/bacula-dir-init, -files/2.4.4/bacula-fd-conf,
37 + -files/2.4.4/bacula-fd-init, -files/2.4.4/bacula-gnomesu2gksu.diff,
38 + -files/2.4.4/bacula-sd-conf, -files/2.4.4/bacula-sd-init,
39 + -files/3.0.2/bacula-default-configs.patch, -files/3.0.2/bacula-dir-conf,
40 + -files/3.0.2/bacula-dir-init, -files/3.0.2/bacula-fd-conf,
41 + -files/3.0.2/bacula-fd-init, -files/3.0.2/bacula-gnomesu2gksu.diff,
42 + -files/3.0.2/bacula-sd-conf, -files/3.0.2/bacula-sd-init,
43 + +files/5.0.3/bacula-5.0.3-Makefile.patch,
44 + +files/5.0.3/bacula-5.0.3-ldflags.patch,
45 + +files/5.0.3/bacula-5.0.3-lib-search-path.patch,
46 + +files/5.0.3/bacula-5.0.3-openssl-1.patch, +files/5.0.3/bacula-dir.confd,
47 + +files/5.0.3/bacula-dir.initd, +files/5.0.3/bacula-fd.confd,
48 + +files/5.0.3/bacula-fd.initd, +files/5.0.3/bacula-sd.confd,
49 + +files/5.0.3/bacula-sd.initd, -bacula-2.4.4.ebuild, -bacula-3.0.2.ebuild,
50 + -bacula-5.0.2.ebuild, +bacula-5.0.3.ebuild:
51 + Version bump to 5.0.3. Cleanup of old versions.
52
53 23 Jul 2010; Thomas Beierlein <tomjbe@g.o> bacula-5.0.2-r2.ebuild:
54 drop leftover comment
55
56
57
58 1.1 app-backup/bacula/bacula-5.0.3.ebuild
59
60 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/bacula/bacula-5.0.3.ebuild?rev=1.1&view=markup
61 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/bacula/bacula-5.0.3.ebuild?rev=1.1&content-type=text/plain
62
63 Index: bacula-5.0.3.ebuild
64 ===================================================================
65 # Copyright 1999-2010 Gentoo Foundation
66 # Distributed under the terms of the GNU General Public License v2
67 # $Header: /var/cvsroot/gentoo-x86/app-backup/bacula/bacula-5.0.3.ebuild,v 1.1 2010/08/21 07:09:25 tomjbe Exp $
68
69 EAPI="2"
70 inherit eutils multilib
71
72 MY_PV=${PV/_beta/-b}
73 MY_P=${PN}-${MY_PV}
74 #DOC_VER="${MY_PV}"
75
76 DESCRIPTION="Featureful client/server network backup suite"
77 HOMEPAGE="http://www.bacula.org/"
78
79 #DOC_SRC_URI="mirror://sourceforge/bacula/${PN}-docs-${DOC_VER}.tar.bz2"
80 SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz"
81 # doc? ( ${DOC_SRC_URI} )
82
83 LICENSE="AGPL-3"
84 SLOT="0"
85 KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
86 IUSE="bacula-clientonly bacula-nodir bacula-nosd ipv6 logwatch mysql postgres python qt4 readline +sqlite3 ssl static tcpd vim-syntax X"
87
88 # maintainer comment:
89 # postgresql-base should have USE=threads (see bug 326333) but fails to build
90 # atm with it (see bug #300964)
91 DEPEND="
92 >=sys-libs/zlib-1.1.4
93 dev-libs/gmp
94 !bacula-clientonly? (
95 postgres? ( dev-db/postgresql-base[threads] )
96 mysql? ( virtual/mysql )
97 sqlite3? ( dev-db/sqlite:3 )
98 !bacula-nodir? ( virtual/mta )
99 )
100 qt4? (
101 x11-libs/qt-svg:4
102 >=x11-libs/qwt-5
103 )
104 ssl? ( dev-libs/openssl )
105 logwatch? ( sys-apps/logwatch )
106 tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
107 readline? ( >=sys-libs/readline-4.1 )
108 sys-libs/ncurses
109 python? ( dev-lang/python[threads] )"
110 # doc? (
111 # app-text/ghostscript-gpl
112 # dev-tex/latex2html[png]
113 # app-text/dvipdfm
114 # )
115 RDEPEND="${DEPEND}
116 !bacula-clientonly? (
117 !bacula-nosd? (
118 sys-block/mtx
119 app-arch/mt-st
120 )
121 )
122 vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
123
124 S=${WORKDIR}/${MY_P}
125
126 pkg_setup() {
127 local -i dbnum=0
128 if ! use bacula-clientonly; then
129 if use mysql; then
130 export mydbtype=mysql
131 let dbnum++
132 fi
133 if use postgres; then
134 export mydbtype=postgresql
135 let dbnum++
136 fi
137 if use sqlite3; then
138 export mydbtype=sqlite3
139 let dbnum++
140 fi
141 if [[ "${dbnum}" -lt 1 ]]; then
142 ewarn
143 ewarn "No database backend selected, defaulting to sqlite3."
144 ewarn "Supported databases are mysql, postgresql, sqlite3"
145 ewarn
146 export mydbtype=sqlite3
147 elif [[ "${dbnum}" -gt 1 ]]; then
148 ewarn
149 ewarn "Too many database backends selected, defaulting to sqlite3."
150 ewarn "Supported databases are mysql, postgresql, sqlite3"
151 ewarn
152 export mydbtype=sqlite3
153 fi
154 fi
155
156 # create the daemon group and user
157 if [ -z "$(egetent group bacula 2>/dev/null)" ]; then
158 enewgroup bacula || die
159 einfo
160 einfo "The group 'bacula' has been created. Any users you add to this"
161 einfo "group have access to files created by the daemons."
162 einfo
163 fi
164 if ! use bacula-clientonly; then
165 if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then
166 enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw || die
167 einfo
168 einfo "The user 'bacula' has been created. Please see the bacula manual"
169 einfo "for information about running bacula as a non-root user."
170 einfo
171 fi
172 fi
173 }
174
175 src_prepare() {
176 # adjusts default configuration files for several binaries
177 # to /etc/bacula/<config> instead of ./<config>
178 pushd src >&/dev/null || die
179 for f in console/console.c dird/dird.c filed/filed.c \
180 stored/bcopy.c stored/bextract.c stored/bls.c \
181 stored/bscan.c stored/btape.c stored/stored.c \
182 qt-console/main.cpp; do
183 sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \
184 || die "sed on ${f} failed"
185 done
186 popd >&/dev/null || die
187
188 # bug #311161
189 epatch "${FILESDIR}"/${PV}/${P}-lib-search-path.patch
190
191 # stop build for errors in subdirs
192 epatch "${FILESDIR}"/${PV}/${P}-Makefile.patch
193
194 # bat needs to respect LDFLAGS
195 epatch "${FILESDIR}"/${PV}/${P}-ldflags.patch
196
197 # bug #328701
198 epatch "${FILESDIR}"/${PV}/${P}-openssl-1.patch
199 }
200
201 src_configure() {
202 local myconf=''
203
204 if use bacula-clientonly; then
205 myconf="${myconf} \
206 $(use_enable bacula-clientonly client-only) \
207 $(use_enable static static-fd)"
208 else
209 myconf="${myconf} \
210 $(use_enable static static-tools) \
211 $(use_enable static static-fd) \
212 $(use_enable !bacula-nodir build-dird) \
213 $(use_enable !bacula-nosd build-stored)"
214 # bug #311099
215 # database support needed by dir-only *and* sd-only
216 # build as well (for building bscan, btape, etc.)
217 myconf="${myconf} \
218 --with-${mydbtype} \
219 --enable-batch-insert"
220 if ! use bacula-nodir; then
221 myconf="${myconf} $(use_enable static static-dir)"
222 fi
223 if ! use bacula-nosd; then
224 myconf="${myconf} $(use_enable static static-sd)"
225 fi
226 fi
227
228 myconf="${myconf} \
229 --disable-tray-monitor \
230 $(use_with X x) \
231 $(use_enable qt4 bat) \
232 $(use_enable static static-cons)
233 $(use_with python) \
234 $(use_enable !readline conio) \
235 $(use_enable readline) \
236 $(use_with readline readline /usr) \
237 $(use_with ssl openssl) \
238 $(use_enable ipv6) \
239 $(use_with tcpd tcp-wrappers)"
240
241 econf \
242 --libdir=/usr/$(get_libdir) \
243 --docdir=/usr/share/doc/${PF} \
244 --htmldir=/usr/share/doc/${PF}/html \
245 --with-pid-dir=/var/run \
246 --sysconfdir=/etc/bacula \
247 --with-subsys-dir=/var/lock/subsys \
248 --with-working-dir=/var/lib/bacula \
249 --with-scriptdir=/usr/libexec/bacula \
250 --with-dir-user=bacula \
251 --with-dir-group=bacula \
252 --with-sd-user=root \
253 --with-sd-group=bacula \
254 --with-fd-user=root \
255 --with-fd-group=bacula \
256 --enable-smartalloc \
257 --host=${CHOST} \
258 ${myconf} \
259 || die "econf failed"
260 }
261
262 src_compile() {
263 emake || die "emake failed"
264
265 # build docs from bacula-docs tarball
266 # if use doc; then
267 # pushd "${WORKDIR}/${PN}-docs-${DOC_VER}"
268 # ./configure \
269 # --with-bacula="${S}" \
270 # || die "configure for bacula-docs failed"
271 # emake -j1 || die "emake for bacula-docs failed"
272 # popd
273 # fi
274 }
275
276 src_install() {
277 emake DESTDIR="${D}" install || die "emake install failed"
278 insinto /usr/share/pixmaps
279 doins scripts/bacula.png || die
280
281 # install bat when enabled (for some reason ./configure doesn't pick this up)
282 if use qt4; then
283 dosbin "${S}"/src/qt-console/.libs/bat || die
284 insinto /usr/share/pixmaps
285 doins src/qt-console/images/bat_icon.png || die
286 insinto /usr/share/applications
287 doins scripts/bat.desktop || die
288 fi
289
290 # remove some scripts we don't need at all
291 rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql}
292
293 # rename statically linked apps
294 if use static; then
295 pushd "${D}"/usr/sbin || die
296 mv static-bacula-fd bacula-fd || die
297 mv static-bconsole bconsole || die
298 if ! use bacula-clientonly; then
299 mv static-bacula-dir bacula-dir || die
300 mv static-bacula-sd bacula-sd || die
301 fi
302 if use qt4; then
303 mv static-bat bat || die
304 fi
305 popd || die
306 fi
307
308 # extra files which 'make install' doesn't cover
309 if ! use bacula-clientonly; then
310 # the database update scripts
311 diropts -m0750
312 insinto /usr/libexec/bacula/updatedb
313 insopts -m0754
314 doins "${S}"/updatedb/* || die
315 fperms 0640 /usr/libexec/bacula/updatedb/README || die
316
317 # the logrotate configuration
318 # (now unconditional wrt bug #258187)
319 diropts -m0755
320 insinto /etc/logrotate.d
321 insopts -m0644
322 newins "${S}"/scripts/logrotate bacula || die
323
324 # the logwatch scripts
325 if use logwatch; then
326 diropts -m0750
327 dodir /etc/log.d/scripts/services
328 dodir /etc/log.d/scripts/shared
329 dodir /etc/log.d/conf/logfiles
330 dodir /etc/log.d/conf/services
331 pushd "${S}"/scripts/logwatch >&/dev/null || die
332 emake DESTDIR="${D}" install || die "Failed to install logwatch scripts"
333 popd >&/dev/null || die
334 fi
335 fi
336
337 rm -vf "${D}"/usr/share/man/man1/bacula-bwxconsole.1*
338 if ! use qt4; then
339 rm -vf "${D}"/usr/share/man/man1/bat.1*
340 fi
341 rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1*
342 if use bacula-clientonly || use bacula-nodir; then
343 rm -vf "${D}"/usr/share/man/man8/bacula-dir.8*
344 rm -vf "${D}"/usr/share/man/man8/dbcheck.8*
345 rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
346 rm -vf "${D}"/usr/libexec/bacula/create_*_database
347 rm -vf "${D}"/usr/libexec/bacula/drop_*_database
348 rm -vf "${D}"/usr/libexec/bacula/make_*_tables
349 rm -vf "${D}"/usr/libexec/bacula/update_*_tables
350 rm -vf "${D}"/usr/libexec/bacula/drop_*_tables
351 rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges
352 rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup
353 fi
354 if use bacula-clientonly || use bacula-nosd; then
355 rm -vf "${D}"/usr/share/man/man8/bacula-sd.8*
356 rm -vf "${D}"/usr/share/man/man8/bcopy.8*
357 rm -vf "${D}"/usr/share/man/man8/bextract.8*
358 rm -vf "${D}"/usr/share/man/man8/bls.8*
359 rm -vf "${D}"/usr/share/man/man8/bscan.8*
360 rm -vf "${D}"/usr/share/man/man8/btape.8*
361 rm -vf "${D}"/usr/libexec/bacula/disk-changer
362 rm -vf "${D}"/usr/libexec/bacula/mtx-changer
363 rm -vf "${D}"/usr/libexec/bacula/dvd-handler
364 fi
365
366 # documentation
367 ecompress "${D}"/usr/share/doc/${PF}/*
368 # if use doc; then
369 # for i in catalog concepts console developers install problems utility; do
370 # dodoc "${WORKDIR}/${PN}-docs-${DOC_VER}"/manuals/en/${i}/${i}.pdf || die
371 # done
372 # fi
373
374 # vim-files
375 if use vim-syntax; then
376 insinto /usr/share/vim/vimfiles/syntax
377 doins scripts/bacula.vim || die
378 insinto /usr/share/vim/vimfiles/ftdetect
379 newins scripts/filetype.vim bacula_ft.vim || die
380 fi
381
382 # setup init scripts
383 myscripts="bacula-fd"
384 if ! use bacula-clientonly; then
385 if ! use bacula-nodir; then
386 myscripts="${myscripts} bacula-dir"
387 fi
388 if ! use bacula-nosd; then
389 myscripts="${myscripts} bacula-sd"
390 fi
391 fi
392 for script in ${myscripts}; do
393 # copy over init script and config to a temporary location
394 # so we can modify them as needed
395 cp "${FILESDIR}/${PV}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
396 cp "${FILESDIR}/${PV}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
397 # set database dependancy for the director init script
398 case "${script}" in
399 bacula-dir)
400 case "${mydbtype}" in
401 sqlite3)
402 # sqlite3 databases don't have a daemon
403 sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die
404 ;;
405 *)
406 # all other databases have daemons
407 sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die
408 ;;
409 esac
410 ;;
411 *)
412 ;;
413 esac
414 # install init script and config
415 newinitd "${T}/${script}".initd "${script}" || die
416 newconfd "${T}/${script}".confd "${script}" || die
417 done
418
419 # make sure the working directory exists
420 diropts -m0750
421 keepdir /var/lib/bacula
422
423 # make sure bacula group can execute bacula libexec scripts
424 fowners -R root:bacula /usr/libexec/bacula
425 }
426
427 pkg_postinst() {
428 if use bacula-clientonly; then
429 fowners root:bacula /var/lib/bacula
430 else
431 fowners bacula:bacula /var/lib/bacula
432 fi
433
434 if ! use bacula-clientonly && ! use bacula-nodir; then
435 einfo
436 einfo "If this is a new install, you must create the ${mydbtype} databases with:"
437 einfo " /usr/libexec/bacula/create_${mydbtype}_database"
438 einfo " /usr/libexec/bacula/make_${mydbtype}_tables"
439 einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges"
440 einfo
441
442 ewarn
443 ewarn "*** ATTENTION! IMPORTANT! ATTENTION! IMPORTANT! ATTENTION! IMPORTANT! ***"
444 ewarn
445 ewarn "If you're upgrading from a major release, you must upgrade your bacula catalog database."
446 ewarn "Please read the manual chapter for how to upgrade your database."
447 ewarn "You can find database upgrade scripts in /usr/libexec/bacula/updatedb/."
448 ewarn
449 ewarn "*** ATTENTION! IMPORTANT! ATTENTION! IMPORTANT! ATTENTION! IMPORTANT! ***"
450 ewarn
451 ebeep 5
452 epause 10
453 echo
454
455 ewarn
456 ewarn "*** ATTENTION! IMPORTANT! ATTENTION! IMPORTANT! ATTENTION! IMPORTANT! ***"
457 ewarn
458 ewarn "The bundled catalog backup script (/usr/libexec/bacula/make_catalog_backup)"
459 ewarn "is INSECURE. The script needs to be called with the database access password"
460 ewarn "as a command line parameter, thus, the password can be seen from any other"
461 ewarn "user on the system"
462 ewarn
463 ewarn "NOTICE:"
464 ewarn "Since version 5.0.0 Bacula bundles an alternative catalog backup script"
465 ewarn "installed as /usr/libexec/bacula/make_catalog_backup.pl that is not"
466 ewarn "subject to this issue as it parses the director daemon config to extract"
467 ewarn "the configured database connection parameters (including the password)."
468 ewarn
469 ewarn "See also:"
470 ewarn "http://www.bacula.org/5.0.x-manuals/en/main/main/Bacula_Security_Issues.html"
471 ewarn "http://www.bacula.org/5.0.x-manuals/en/main/main/Catalog_Maintenance.html#SECTION0043140000000000000000"
472 ewarn
473 ewarn "*** ATTENTION! IMPORTANT! ATTENTION! IMPORTANT! ATTENTION! IMPORTANT! ***"
474 ewarn
475 ebeep 5
476 epause 10
477 echo
478
479 einfo
480 einfo "Please note that SQLite v2 support as well as wxwindows (bwx-console)"
481 einfo "and gnome (gnome-console) support have been dropped."
482 einfo
483 fi
484
485 einfo "Please note that 'bconsole' will always be installed. To compile 'bat'"
486 einfo "you have to enable 'USE=qt4'."
487 einfo
488 }