Gentoo Archives: gentoo-commits

From: Thomas Beierlein <tomjbe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-backup/bacula/
Date: Tue, 02 Feb 2016 21:00:21
Message-Id: 1454446788.8cb86c2b1f84c5f4734c9948f72a4c8a2f34802e.tomjbe@gentoo
1 commit: 8cb86c2b1f84c5f4734c9948f72a4c8a2f34802e
2 Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 2 20:59:48 2016 +0000
4 Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 2 20:59:48 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cb86c2b
7
8 app-backup/bacula: Version bump
9
10 Package-Manager: portage-2.2.27
11
12 app-backup/bacula/Manifest | 1 +
13 app-backup/bacula/bacula-7.4.0.ebuild | 402 ++++++++++++++++++++++++++++++++++
14 2 files changed, 403 insertions(+)
15
16 diff --git a/app-backup/bacula/Manifest b/app-backup/bacula/Manifest
17 index f88d16d..fb06b5b 100644
18 --- a/app-backup/bacula/Manifest
19 +++ b/app-backup/bacula/Manifest
20 @@ -1,3 +1,4 @@
21 DIST bacula-5.2.13.tar.gz 4243395 SHA256 a4bed458bf001889bd06bf31671b5d9908055a1d1e8113fd750ae4d326607ad8 SHA512 dfdff353f5b6ed4d85013dc292526706bbd67066f7057a114012172926c819c8df1eb8779166d5a90db3a49a5584f0a8daf7566cc93cf4fa3f1bdda245b55cf0 WHIRLPOOL f559a3650ae45e149a80cdc74ab84e32c94f492321c2222c18003bacfb6690615befc3a37826055f6c436a4af6ace4b81497181f2ec4f641b0ad3a13817488a7
22 DIST bacula-7.0.5.tar.gz 3216406 SHA256 1457849eb33011b43371801b62ffa13d29bebe51be8d5a36da563b87bb094a49 SHA512 df7908769fd13a1cb2e0491d3773577db40c0f1c010b887c6dc6d7e0bc0b408fbfc260e6d5a2a34975e5b424152c7f558b33aeedea45f366636739295641394b WHIRLPOOL 47642c52928d84a50c01adfb8afa49c0c9376cba3b0f709d0c5113cba3380e047ded04980ffad339deeb1ce6d3a8ec59f58cf1968223973def7074a446a09da5
23 DIST bacula-7.2.0.tar.gz 3301720 SHA256 818606fe69c50c3ca21b91e609d4ac6ca08e4189419b89d3ec2e81c8c0389e1c SHA512 ff50db48039c9040d4995f53a8d83ad6e5568da254527d07cfe450bf0e4a25717387b5e4aa9f29197c284f513240e714c48d8232d7d7edb9159afbc13cd0cd54 WHIRLPOOL 17f5b19a6fb9bf2a05e79663c7810358cf79aebad7f2709a01fadf15d5d494a243290e9c66e30c8b9bde6a627e238b77c1853a0d40891c5f5f4b390ae0ded1e5
24 +DIST bacula-7.4.0.tar.gz 3314218 SHA256 fe850b783523edb19fb4dbfa8c44752d20955121b71a52b0740a9e765bfd73cb SHA512 615cb4d9a4fd597bc794b6d4c901c777d544472f3f5b6e1cdc74d8e41279a3fd0bd6d2c30511095933a3a47a7f24da4372c538ab472eb48c0fb1db59c2a59e1a WHIRLPOOL 669d0e4de172fb1c35a3a5a91e371aa2b87cd90f664974de8dcdf1677f442ac269f66c430627c81ea8a17bf02dd54590158b8b09e0c110ac32e83e0a0d41861d
25
26 diff --git a/app-backup/bacula/bacula-7.4.0.ebuild b/app-backup/bacula/bacula-7.4.0.ebuild
27 new file mode 100644
28 index 0000000..3303bfb
29 --- /dev/null
30 +++ b/app-backup/bacula/bacula-7.4.0.ebuild
31 @@ -0,0 +1,402 @@
32 +# Copyright 1999-2016 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI="5"
37 +
38 +inherit eutils multilib qt4-r2 systemd user libtool
39 +
40 +MY_PV=${PV/_beta/-b}
41 +MY_P=${PN}-${MY_PV}
42 +
43 +DESCRIPTION="Featureful client/server network backup suite"
44 +HOMEPAGE="http://www.bacula.org/"
45 +SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz"
46 +
47 +LICENSE="AGPL-3"
48 +SLOT="0"
49 +KEYWORDS="~amd64 ~ppc ~sparc ~x86"
50 +IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 logwatch mysql postgres qt4 readline +sqlite ssl static tcpd vim-syntax X"
51 +
52 +DEPEND="
53 + dev-libs/gmp:0
54 + !bacula-clientonly? (
55 + postgres? ( dev-db/postgresql:*[threads] )
56 + mysql? ( virtual/mysql )
57 + sqlite? ( dev-db/sqlite:3 )
58 + !bacula-nodir? ( virtual/mta )
59 + )
60 + qt4? (
61 + dev-qt/qtsvg:4
62 + x11-libs/qwt:5
63 + )
64 + logwatch? ( sys-apps/logwatch )
65 + tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
66 + readline? ( sys-libs/readline:0 )
67 + static? (
68 + acl? ( virtual/acl[static-libs] )
69 + sys-libs/zlib[static-libs]
70 + dev-libs/lzo[static-libs]
71 + sys-libs/ncurses:=[static-libs]
72 + ssl? ( dev-libs/openssl:0[static-libs] )
73 + )
74 + !static? (
75 + acl? ( virtual/acl )
76 + sys-libs/zlib
77 + dev-libs/lzo
78 + sys-libs/ncurses:=
79 + ssl? ( dev-libs/openssl:0 )
80 + )"
81 +RDEPEND="${DEPEND}
82 + !bacula-clientonly? (
83 + !bacula-nosd? (
84 + sys-block/mtx
85 + app-arch/mt-st
86 + )
87 + )
88 + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
89 +
90 +REQUIRED_USE="|| ( ^^ ( mysql postgres sqlite ) bacula-clientonly )
91 + static? ( bacula-clientonly )"
92 +
93 +S=${WORKDIR}/${MY_P}
94 +
95 +pkg_setup() {
96 + #XOR and !bacula-clientonly controlled by REQUIRED_USE
97 + use mysql && export mydbtype="mysql"
98 + use postgres && export mydbtype="postgresql"
99 + use sqlite && export mydbtype="sqlite3"
100 +
101 + # create the daemon group and user
102 + if [ -z "$(egetent group bacula 2>/dev/null)" ]; then
103 + enewgroup bacula
104 + einfo
105 + einfo "The group 'bacula' has been created. Any users you add to this"
106 + einfo "group have access to files created by the daemons."
107 + einfo
108 + fi
109 +
110 + if use bacula-clientonly && use static && use qt4; then
111 + ewarn
112 + ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag."
113 + ewarn
114 + fi
115 +
116 + if ! use bacula-clientonly; then
117 + if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then
118 + enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw
119 + einfo
120 + einfo "The user 'bacula' has been created. Please see the bacula manual"
121 + einfo "for information about running bacula as a non-root user."
122 + einfo
123 + fi
124 + fi
125 +}
126 +
127 +src_prepare() {
128 + # adjusts default configuration files for several binaries
129 + # to /etc/bacula/<config> instead of ./<config>
130 + pushd src >&/dev/null || die
131 + for f in console/console.c dird/dird.c filed/filed.c \
132 + stored/bcopy.c stored/bextract.c stored/bls.c \
133 + stored/bscan.c stored/btape.c stored/stored.c \
134 + qt-console/main.cpp; do
135 + sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \
136 + || die "sed on ${f} failed"
137 + done
138 + popd >&/dev/null || die
139 +
140 + # bug 466688 drop deprecated categories from Desktop file
141 + sed -i -e 's/Application;//' scripts/bat.desktop.in || die
142 +
143 + # bug 466690 Use CXXFLAGS instead of CFLAGS
144 + sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
145 +
146 + # drop automatic install of unneeded documentation (for bug 356499)
147 + epatch "${FILESDIR}"/7.2.0/${PN}-7.2.0-doc.patch
148 +
149 + # bug #310087
150 + epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch
151 +
152 + # bug #311161
153 + epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-lib-search-path.patch
154 +
155 + # bat needs to respect LDFLAGS
156 + epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-ldflags.patch
157 +
158 + # bug #328701
159 + epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch
160 +
161 + epatch "${FILESDIR}"/7.2.0/${PN}-7.2.0-fix-static.patch
162 +
163 + # do not strip binaries
164 + sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die
165 + sed -i -e "s/strip /# strip /" src/console/Makefile.in || die
166 +
167 + # fix file not found error during make depend
168 + epatch "${FILESDIR}"/7.0.2/${PN}-7.0.2-depend.patch
169 +
170 + # Fix systemd unit files:
171 + # bug 497748
172 + sed -i -e '/Requires/d' platforms/systemd/*.service.in || die
173 + sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die
174 + # bug 504370
175 + sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in || die
176 +
177 + # fix bundled libtool (bug 466696)
178 + # But first move directory with M4 macros out of the way.
179 + # It is only needed by autoconf and gives errors during elibtoolize.
180 + mv autoconf/libtool autoconf/libtool1 || die
181 + elibtoolize
182 +}
183 +
184 +src_configure() {
185 + local myconf=''
186 +
187 + if use bacula-clientonly; then
188 + myconf="${myconf} \
189 + $(use_enable bacula-clientonly client-only) \
190 + $(use_enable !static libtool) \
191 + $(use_enable static static-cons) \
192 + $(use_enable static static-fd)"
193 + else
194 + myconf="${myconf} \
195 + $(use_enable !bacula-nodir build-dird) \
196 + $(use_enable !bacula-nosd build-stored)"
197 + # bug #311099
198 + # database support needed by dir-only *and* sd-only
199 + # build as well (for building bscan, btape, etc.)
200 + myconf="${myconf} \
201 + --with-${mydbtype} \
202 + --enable-batch-insert"
203 + fi
204 +
205 + # do not build bat if 'static' clientonly
206 + if ! use bacula-clientonly || ! use static; then
207 + myconf="${myconf} \
208 + $(use_enable qt4 bat)"
209 + fi
210 +
211 + myconf="${myconf} \
212 + $(use_with X x) \
213 + $(use_enable !readline conio) \
214 + $(use_enable readline) \
215 + $(use_with readline readline /usr) \
216 + $(use_with ssl openssl) \
217 + $(use_enable ipv6) \
218 + $(use_enable acl) \
219 + $(use_with tcpd tcp-wrappers)"
220 +
221 + econf \
222 + --libdir=/usr/$(get_libdir) \
223 + --docdir=/usr/share/doc/${PF} \
224 + --htmldir=/usr/share/doc/${PF}/html \
225 + --with-pid-dir=/var/run \
226 + --sysconfdir=/etc/bacula \
227 + --with-subsys-dir=/var/lock/subsys \
228 + --with-working-dir=/var/lib/bacula \
229 + --with-logdir=/var/lib/bacula \
230 + --with-scriptdir=/usr/libexec/bacula \
231 + --with-systemd=$(systemd_get_unitdir) \
232 + --with-dir-user=bacula \
233 + --with-dir-group=bacula \
234 + --with-sd-user=root \
235 + --with-sd-group=bacula \
236 + --with-fd-user=root \
237 + --with-fd-group=bacula \
238 + --enable-smartalloc \
239 + --disable-afs \
240 + --host=${CHOST} \
241 + ${myconf}
242 + # correct configuration for QT based bat
243 + if use qt4 ; then
244 + pushd src/qt-console
245 + eqmake4
246 + popd
247 + fi
248 +}
249 +
250 +src_compile() {
251 + # Make build log verbose (bug #447806)
252 + emake NO_ECHO=""
253 +}
254 +
255 +src_install() {
256 + emake DESTDIR="${D}" install
257 + doicon scripts/bacula.png
258 +
259 + # install bat icon and desktop file when enabled
260 + # (for some reason ./configure doesn't pick this up)
261 + if use qt4 && ! use static ; then
262 + doicon src/qt-console/images/bat_icon.png
263 + domenu scripts/bat.desktop
264 + fi
265 +
266 + # remove some scripts we don't need at all
267 + rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql}
268 +
269 + # rename statically linked apps
270 + if use bacula-clientonly && use static ; then
271 + pushd "${D}"/usr/sbin || die
272 + mv static-bacula-fd bacula-fd || die
273 + mv static-bconsole bconsole || die
274 + popd || die
275 + fi
276 +
277 + # extra files which 'make install' doesn't cover
278 + if ! use bacula-clientonly; then
279 + # the database update scripts
280 + diropts -m0750
281 + insinto /usr/libexec/bacula/updatedb
282 + insopts -m0754
283 + doins "${S}"/updatedb/*
284 + fperms 0640 /usr/libexec/bacula/updatedb/README
285 +
286 + # the logrotate configuration
287 + # (now unconditional wrt bug #258187)
288 + diropts -m0755
289 + insinto /etc/logrotate.d
290 + insopts -m0644
291 + newins "${S}"/scripts/logrotate bacula
292 +
293 + # the logwatch scripts
294 + if use logwatch; then
295 + diropts -m0750
296 + dodir /etc/log.d/scripts/services
297 + dodir /etc/log.d/scripts/shared
298 + dodir /etc/log.d/conf/logfiles
299 + dodir /etc/log.d/conf/services
300 + pushd "${S}"/scripts/logwatch >&/dev/null || die
301 + emake DESTDIR="${D}" install
302 + popd >&/dev/null || die
303 + fi
304 + fi
305 +
306 + if ! use qt4; then
307 + rm -vf "${D}"/usr/share/man/man1/bat.1*
308 + fi
309 + rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1*
310 + if use bacula-clientonly || use bacula-nodir; then
311 + rm -vf "${D}"/usr/share/man/man8/bacula-dir.8*
312 + rm -vf "${D}"/usr/share/man/man8/dbcheck.8*
313 + rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
314 + rm -vf "${D}"/usr/libexec/bacula/create_*_database
315 + rm -vf "${D}"/usr/libexec/bacula/drop_*_database
316 + rm -vf "${D}"/usr/libexec/bacula/make_*_tables
317 + rm -vf "${D}"/usr/libexec/bacula/update_*_tables
318 + rm -vf "${D}"/usr/libexec/bacula/drop_*_tables
319 + rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges
320 + rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup
321 + fi
322 + if use bacula-clientonly || use bacula-nosd; then
323 + rm -vf "${D}"/usr/share/man/man8/bacula-sd.8*
324 + rm -vf "${D}"/usr/share/man/man8/bcopy.8*
325 + rm -vf "${D}"/usr/share/man/man8/bextract.8*
326 + rm -vf "${D}"/usr/share/man/man8/bls.8*
327 + rm -vf "${D}"/usr/share/man/man8/bscan.8*
328 + rm -vf "${D}"/usr/share/man/man8/btape.8*
329 + rm -vf "${D}"/usr/libexec/bacula/disk-changer
330 + rm -vf "${D}"/usr/libexec/bacula/mtx-changer
331 + rm -vf "${D}"/usr/libexec/bacula/dvd-handler
332 + fi
333 +
334 + # documentation
335 + dodoc ChangeLog ReleaseNotes SUPPORT
336 +
337 + # install examples (bug #457504)
338 + if use examples; then
339 + docinto examples/
340 + dodoc -r examples/*
341 + fi
342 +
343 + # vim-files
344 + if use vim-syntax; then
345 + insinto /usr/share/vim/vimfiles/syntax
346 + doins scripts/bacula.vim
347 + insinto /usr/share/vim/vimfiles/ftdetect
348 + newins scripts/filetype.vim bacula_ft.vim
349 + fi
350 +
351 + # setup init scripts
352 + myscripts="bacula-fd"
353 + if ! use bacula-clientonly; then
354 + if ! use bacula-nodir; then
355 + myscripts="${myscripts} bacula-dir"
356 + fi
357 + if ! use bacula-nosd; then
358 + myscripts="${myscripts} bacula-sd"
359 + fi
360 + fi
361 + for script in ${myscripts}; do
362 + # copy over init script and config to a temporary location
363 + # so we can modify them as needed
364 + cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
365 + cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
366 +
367 + # now set the database dependancy for the director init script
368 + case "${script}" in
369 + bacula-dir)
370 + case "${mydbtype}" in
371 + sqlite3)
372 + # sqlite databases don't have a daemon
373 + sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die
374 + ;;
375 + *)
376 + # all other databases have daemons
377 + sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die
378 + ;;
379 + esac
380 + ;;
381 + *)
382 + ;;
383 + esac
384 +
385 + # install init script and config
386 + newinitd "${T}/${script}".initd "${script}"
387 + newconfd "${T}/${script}".confd "${script}"
388 + done
389 +
390 + systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service
391 +
392 + # make sure the working directory exists
393 + diropts -m0750
394 + keepdir /var/lib/bacula
395 +
396 + # make sure bacula group can execute bacula libexec scripts
397 + fowners -R root:bacula /usr/libexec/bacula
398 +}
399 +
400 +pkg_postinst() {
401 + if use bacula-clientonly; then
402 + fowners root:bacula /var/lib/bacula
403 + else
404 + fowners bacula:bacula /var/lib/bacula
405 + fi
406 +
407 + if ! use bacula-clientonly && ! use bacula-nodir; then
408 + einfo
409 + einfo "If this is a new install, you must create the ${mydbtype} databases with:"
410 + einfo " /usr/libexec/bacula/create_${mydbtype}_database"
411 + einfo " /usr/libexec/bacula/make_${mydbtype}_tables"
412 + einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges"
413 + einfo
414 +
415 + ewarn "ATTENTION!"
416 + ewarn "The format of the database may have changed."
417 + ewarn "If you just upgraded from a version below 7.2.0 you must run"
418 + ewarn "'update_bacula_tables' now."
419 + ewarn "Make sure to have a backup of your catalog before."
420 + ewarn
421 + fi
422 +
423 + if use sqlite; then
424 + einfo
425 + einfo "Be aware that Bacula does not officially support SQLite database anymore."
426 + einfo "Best use it only for a client-only installation. See Bug #445540."
427 + einfo
428 + fi
429 +
430 + einfo "Please note that 'bconsole' will always be installed. To compile 'bat'"
431 + einfo "you have to enable 'USE=qt4'."
432 + einfo
433 +}