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