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