1 |
pacho 14/02/01 19:32:55 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: bacula-5.2.13-r2.ebuild |
5 |
Removed: bacula-5.2.13-r1.ebuild |
6 |
Log: |
7 |
Fix systemd unit files, bug #497748 |
8 |
|
9 |
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key A188FBD4) |
10 |
|
11 |
Revision Changes Path |
12 |
1.163 app-backup/bacula/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/bacula/ChangeLog?rev=1.163&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/bacula/ChangeLog?rev=1.163&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/bacula/ChangeLog?r1=1.162&r2=1.163 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/app-backup/bacula/ChangeLog,v |
21 |
retrieving revision 1.162 |
22 |
retrieving revision 1.163 |
23 |
diff -u -r1.162 -r1.163 |
24 |
--- ChangeLog 11 Jan 2014 12:14:39 -0000 1.162 |
25 |
+++ ChangeLog 1 Feb 2014 19:32:54 -0000 1.163 |
26 |
@@ -1,6 +1,12 @@ |
27 |
# ChangeLog for app-backup/bacula |
28 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/app-backup/bacula/ChangeLog,v 1.162 2014/01/11 12:14:39 pacho Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/app-backup/bacula/ChangeLog,v 1.163 2014/02/01 19:32:54 pacho Exp $ |
31 |
+ |
32 |
+*bacula-5.2.13-r2 (01 Feb 2014) |
33 |
+ |
34 |
+ 01 Feb 2014; Pacho Ramos <pacho@g.o> +bacula-5.2.13-r2.ebuild, |
35 |
+ -bacula-5.2.13-r1.ebuild: |
36 |
+ Fix systemd unit files, bug #497748 |
37 |
|
38 |
*bacula-5.2.13-r1 (11 Jan 2014) |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.1 app-backup/bacula/bacula-5.2.13-r2.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/bacula/bacula-5.2.13-r2.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/bacula/bacula-5.2.13-r2.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: bacula-5.2.13-r2.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2014 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/app-backup/bacula/bacula-5.2.13-r2.ebuild,v 1.1 2014/02/01 19:32:54 pacho Exp $ |
53 |
|
54 |
EAPI="4" |
55 |
PYTHON_DEPEND="python? 2" |
56 |
PYTHON_USE_WITH="threads" |
57 |
PYTHON_USE_WITH_OPT="python" |
58 |
|
59 |
inherit eutils multilib python qt4-r2 systemd user |
60 |
|
61 |
MY_PV=${PV/_beta/-b} |
62 |
MY_P=${PN}-${MY_PV} |
63 |
|
64 |
DESCRIPTION="Featureful client/server network backup suite" |
65 |
HOMEPAGE="http://www.bacula.org/" |
66 |
SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz" |
67 |
|
68 |
LICENSE="AGPL-3" |
69 |
SLOT="0" |
70 |
KEYWORDS=" ~amd64 ~ppc ~sparc ~x86" |
71 |
IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 logwatch mysql postgres python qt4 readline +sqlite3 ssl static tcpd vim-syntax X" |
72 |
|
73 |
DEPEND=" |
74 |
dev-libs/gmp |
75 |
!bacula-clientonly? ( |
76 |
postgres? ( dev-db/postgresql-base[threads] ) |
77 |
mysql? ( virtual/mysql ) |
78 |
sqlite3? ( dev-db/sqlite:3 ) |
79 |
!bacula-nodir? ( virtual/mta ) |
80 |
) |
81 |
qt4? ( |
82 |
dev-qt/qtsvg:4 |
83 |
x11-libs/qwt:5 |
84 |
) |
85 |
logwatch? ( sys-apps/logwatch ) |
86 |
tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
87 |
readline? ( >=sys-libs/readline-4.1 ) |
88 |
static? ( |
89 |
acl? ( virtual/acl[static-libs] ) |
90 |
sys-libs/zlib[static-libs] |
91 |
dev-libs/lzo[static-libs] |
92 |
sys-libs/ncurses[static-libs] |
93 |
ssl? ( dev-libs/openssl[static-libs] ) |
94 |
) |
95 |
!static? ( |
96 |
acl? ( virtual/acl ) |
97 |
sys-libs/zlib |
98 |
dev-libs/lzo |
99 |
sys-libs/ncurses |
100 |
ssl? ( dev-libs/openssl ) |
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 |
REQUIRED_USE="|| ( ^^ ( mysql postgres sqlite3 ) bacula-clientonly ) |
112 |
static? ( bacula-clientonly )" |
113 |
|
114 |
S=${WORKDIR}/${MY_P} |
115 |
|
116 |
pkg_setup() { |
117 |
#XOR and !bacula-clientonly controlled by REQUIRED_USE |
118 |
use mysql && export mydbtype="mysql" |
119 |
use postgres && export mydbtype="postgresql" |
120 |
use sqlite3 && export mydbtype="sqlite3" |
121 |
|
122 |
# create the daemon group and user |
123 |
if [ -z "$(egetent group bacula 2>/dev/null)" ]; then |
124 |
enewgroup bacula |
125 |
einfo |
126 |
einfo "The group 'bacula' has been created. Any users you add to this" |
127 |
einfo "group have access to files created by the daemons." |
128 |
einfo |
129 |
fi |
130 |
|
131 |
if use bacula-clientonly && use static && use qt4; then |
132 |
ewarn |
133 |
ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag." |
134 |
ewarn |
135 |
fi |
136 |
|
137 |
if ! use bacula-clientonly; then |
138 |
if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then |
139 |
enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw |
140 |
einfo |
141 |
einfo "The user 'bacula' has been created. Please see the bacula manual" |
142 |
einfo "for information about running bacula as a non-root user." |
143 |
einfo |
144 |
fi |
145 |
fi |
146 |
|
147 |
if use python; then |
148 |
python_set_active_version 2 |
149 |
python_pkg_setup |
150 |
fi |
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, bug #497748 |
200 |
sed -i -e '/Requires/d' platforms/systemd/*.service.in || die |
201 |
sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die |
202 |
} |
203 |
|
204 |
src_configure() { |
205 |
local myconf='' |
206 |
|
207 |
if use bacula-clientonly; then |
208 |
myconf="${myconf} \ |
209 |
$(use_enable bacula-clientonly client-only) \ |
210 |
$(use_enable !static libtool) \ |
211 |
$(use_enable static static-cons) \ |
212 |
$(use_enable static static-fd)" |
213 |
else |
214 |
myconf="${myconf} \ |
215 |
$(use_enable !bacula-nodir build-dird) \ |
216 |
$(use_enable !bacula-nosd build-stored)" |
217 |
# bug #311099 |
218 |
# database support needed by dir-only *and* sd-only |
219 |
# build as well (for building bscan, btape, etc.) |
220 |
myconf="${myconf} \ |
221 |
--with-${mydbtype} \ |
222 |
--enable-batch-insert" |
223 |
fi |
224 |
|
225 |
# do not build bat if 'static' clientonly |
226 |
if ! use bacula-clientonly || ! use static; then |
227 |
myconf="${myconf} \ |
228 |
$(use_enable qt4 bat)" |
229 |
fi |
230 |
|
231 |
myconf="${myconf} \ |
232 |
--disable-tray-monitor \ |
233 |
$(use_with X x) \ |
234 |
$(use_with python) \ |
235 |
$(use_enable !readline conio) \ |
236 |
$(use_enable readline) \ |
237 |
$(use_with readline readline /usr) \ |
238 |
$(use_with ssl openssl) \ |
239 |
$(use_enable ipv6) \ |
240 |
$(use_enable acl) \ |
241 |
$(use_with tcpd tcp-wrappers)" |
242 |
|
243 |
econf \ |
244 |
--libdir=/usr/$(get_libdir) \ |
245 |
--docdir=/usr/share/doc/${PF} \ |
246 |
--htmldir=/usr/share/doc/${PF}/html \ |
247 |
--with-pid-dir=/var/run \ |
248 |
--sysconfdir=/etc/bacula \ |
249 |
--with-subsys-dir=/var/lock/subsys \ |
250 |
--with-working-dir=/var/lib/bacula \ |
251 |
--with-logdir=/var/lib/bacula \ |
252 |
--with-scriptdir=/usr/libexec/bacula \ |
253 |
--with-systemd=$(systemd_get_unitdir) \ |
254 |
--with-dir-user=bacula \ |
255 |
--with-dir-group=bacula \ |
256 |
--with-sd-user=root \ |
257 |
--with-sd-group=bacula \ |
258 |
--with-fd-user=root \ |
259 |
--with-fd-group=bacula \ |
260 |
--enable-smartalloc \ |
261 |
--disable-afs \ |
262 |
--host=${CHOST} \ |
263 |
${myconf} |
264 |
# correct configuration for QT based bat |
265 |
if use qt4 ; then |
266 |
pushd src/qt-console |
267 |
eqmake4 |
268 |
popd |
269 |
fi |
270 |
} |
271 |
|
272 |
src_compile() { |
273 |
# Make build log verbose (bug #447806) |
274 |
emake NO_ECHO="" |
275 |
} |
276 |
|
277 |
src_install() { |
278 |
emake DESTDIR="${D}" install |
279 |
doicon scripts/bacula.png |
280 |
|
281 |
# install bat icon and desktop file when enabled |
282 |
# (for some reason ./configure doesn't pick this up) |
283 |
if use qt4 && ! use static ; then |
284 |
doicon src/qt-console/images/bat_icon.png |
285 |
domenu scripts/bat.desktop |
286 |
fi |
287 |
|
288 |
# remove some scripts we don't need at all |
289 |
rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql} |
290 |
|
291 |
# rename statically linked apps |
292 |
if use bacula-clientonly && use static ; then |
293 |
pushd "${D}"/usr/sbin || die |
294 |
mv static-bacula-fd bacula-fd || die |
295 |
mv static-bconsole bconsole || die |
296 |
popd || die |
297 |
fi |
298 |
|
299 |
# extra files which 'make install' doesn't cover |
300 |
if ! use bacula-clientonly; then |
301 |
# the database update scripts |
302 |
diropts -m0750 |
303 |
insinto /usr/libexec/bacula/updatedb |
304 |
insopts -m0754 |
305 |
doins "${S}"/updatedb/* |
306 |
fperms 0640 /usr/libexec/bacula/updatedb/README |
307 |
|
308 |
# the logrotate configuration |
309 |
# (now unconditional wrt bug #258187) |
310 |
diropts -m0755 |
311 |
insinto /etc/logrotate.d |
312 |
insopts -m0644 |
313 |
newins "${S}"/scripts/logrotate bacula |
314 |
|
315 |
# the logwatch scripts |
316 |
if use logwatch; then |
317 |
diropts -m0750 |
318 |
dodir /etc/log.d/scripts/services |
319 |
dodir /etc/log.d/scripts/shared |
320 |
dodir /etc/log.d/conf/logfiles |
321 |
dodir /etc/log.d/conf/services |
322 |
pushd "${S}"/scripts/logwatch >&/dev/null || die |
323 |
emake DESTDIR="${D}" install |
324 |
popd >&/dev/null || die |
325 |
fi |
326 |
fi |
327 |
|
328 |
rm -vf "${D}"/usr/share/man/man1/bacula-bwxconsole.1* |
329 |
if ! use qt4; then |
330 |
rm -vf "${D}"/usr/share/man/man1/bat.1* |
331 |
fi |
332 |
rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1* |
333 |
if use bacula-clientonly || use bacula-nodir; then |
334 |
rm -vf "${D}"/usr/share/man/man8/bacula-dir.8* |
335 |
rm -vf "${D}"/usr/share/man/man8/dbcheck.8* |
336 |
rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
337 |
rm -vf "${D}"/usr/libexec/bacula/create_*_database |
338 |
rm -vf "${D}"/usr/libexec/bacula/drop_*_database |
339 |
rm -vf "${D}"/usr/libexec/bacula/make_*_tables |
340 |
rm -vf "${D}"/usr/libexec/bacula/update_*_tables |
341 |
rm -vf "${D}"/usr/libexec/bacula/drop_*_tables |
342 |
rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges |
343 |
rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup |
344 |
fi |
345 |
if use bacula-clientonly || use bacula-nosd; then |
346 |
rm -vf "${D}"/usr/share/man/man8/bacula-sd.8* |
347 |
rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
348 |
rm -vf "${D}"/usr/share/man/man8/bextract.8* |
349 |
rm -vf "${D}"/usr/share/man/man8/bls.8* |
350 |
rm -vf "${D}"/usr/share/man/man8/bscan.8* |
351 |
rm -vf "${D}"/usr/share/man/man8/btape.8* |
352 |
rm -vf "${D}"/usr/libexec/bacula/disk-changer |
353 |
rm -vf "${D}"/usr/libexec/bacula/mtx-changer |
354 |
rm -vf "${D}"/usr/libexec/bacula/dvd-handler |
355 |
fi |
356 |
|
357 |
# documentation |
358 |
dodoc ChangeLog ReleaseNotes SUPPORT technotes |
359 |
|
360 |
# install examples (bug #457504) |
361 |
if use examples; then |
362 |
docinto examples/ |
363 |
dodoc -r examples/* |
364 |
fi |
365 |
|
366 |
# vim-files |
367 |
if use vim-syntax; then |
368 |
insinto /usr/share/vim/vimfiles/syntax |
369 |
doins scripts/bacula.vim |
370 |
insinto /usr/share/vim/vimfiles/ftdetect |
371 |
newins scripts/filetype.vim bacula_ft.vim |
372 |
fi |
373 |
|
374 |
# setup init scripts |
375 |
myscripts="bacula-fd" |
376 |
if ! use bacula-clientonly; then |
377 |
if ! use bacula-nodir; then |
378 |
myscripts="${myscripts} bacula-dir" |
379 |
fi |
380 |
if ! use bacula-nosd; then |
381 |
myscripts="${myscripts} bacula-sd" |
382 |
fi |
383 |
fi |
384 |
for script in ${myscripts}; do |
385 |
# copy over init script and config to a temporary location |
386 |
# so we can modify them as needed |
387 |
cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" |
388 |
cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
389 |
|
390 |
# now set the database dependancy for the director init script |
391 |
case "${script}" in |
392 |
bacula-dir) |
393 |
case "${mydbtype}" in |
394 |
sqlite3) |
395 |
# sqlite3 databases don't have a daemon |
396 |
sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die |
397 |
;; |
398 |
*) |
399 |
# all other databases have daemons |
400 |
sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die |
401 |
;; |
402 |
esac |
403 |
;; |
404 |
*) |
405 |
;; |
406 |
esac |
407 |
|
408 |
# install init script and config |
409 |
newinitd "${T}/${script}".initd "${script}" |
410 |
newconfd "${T}/${script}".confd "${script}" |
411 |
done |
412 |
|
413 |
systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service |
414 |
systemd_dotmpfilesd "${S}"/platforms/systemd/bacula.conf |
415 |
|
416 |
# make sure the working directory exists |
417 |
diropts -m0750 |
418 |
keepdir /var/lib/bacula |
419 |
|
420 |
# make sure bacula group can execute bacula libexec scripts |
421 |
fowners -R root:bacula /usr/libexec/bacula |
422 |
} |
423 |
|
424 |
pkg_postinst() { |
425 |
if use bacula-clientonly; then |
426 |
fowners root:bacula /var/lib/bacula |
427 |
else |
428 |
fowners bacula:bacula /var/lib/bacula |
429 |
fi |
430 |
|
431 |
if ! use bacula-clientonly && ! use bacula-nodir; then |
432 |
einfo |
433 |
einfo "If this is a new install, you must create the ${mydbtype} databases with:" |
434 |
einfo " /usr/libexec/bacula/create_${mydbtype}_database" |
435 |
einfo " /usr/libexec/bacula/make_${mydbtype}_tables" |
436 |
einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges" |
437 |
einfo |
438 |
fi |
439 |
|
440 |
if use sqlite3; then |
441 |
einfo |
442 |
einfo "Be aware that Bacula does not officially support SQLite database anymore." |
443 |
einfo "Best use it only for a client-only installation. See Bug #445540." |
444 |
einfo |
445 |
fi |
446 |
|
447 |
einfo "Please note that 'bconsole' will always be installed. To compile 'bat'" |
448 |
einfo "you have to enable 'USE=qt4'." |
449 |
einfo |
450 |
} |