Gentoo Archives: gentoo-commits

From: Marc Schiffbauer <mschiff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/
Date: Wed, 25 Nov 2015 01:06:49
Message-Id: 1448413584.34ca9e54e509f497e6aae733cb362165b448de57.mschiff@gentoo
1 commit: 34ca9e54e509f497e6aae733cb362165b448de57
2 Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 25 01:05:33 2015 +0000
4 Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 25 01:06:24 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34ca9e54
7
8 app-backup/bareos: bump version
9
10 Package-Manager: portage-2.2.25
11
12 app-backup/bareos/Manifest | 1 +
13 app-backup/bareos/bareos-15.2.2.ebuild | 420 +++++++++++++++++++++++++++++++++
14 2 files changed, 421 insertions(+)
15
16 diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest
17 index 41b9bba..0b50252 100644
18 --- a/app-backup/bareos/Manifest
19 +++ b/app-backup/bareos/Manifest
20 @@ -2,3 +2,4 @@ DIST bareos-13.2.4.tar.gz 3467542 SHA256 def68891d074438e55d7a3e570cfaae1c1a8c94
21 DIST bareos-14.2.2.tar.gz 3811787 SHA256 8792fe79689f7a1053ecb493ba52258acb29d0998b71d65178a311d46b7cf2bf SHA512 be490ab2f8085975f164ac554cac7d6bbef1af01c8350b5816b2033a37827de4a81bead6ce1e699fe5cc44085dce2b6a0330b91239fb87907e22f9c8dc710156 WHIRLPOOL 384415d553d61e7aa1eaa22611cc9d9eacf8338df82d911409e52a774e756b0539810c60be3dade91eadcc679794ad7c3bb5a155d7d699171f6a4fdead5a5470
22 DIST bareos-14.2.5.tar.gz 3820963 SHA256 f42bc34afa913cfb4d6b7ef8856c7195d8b13b21c987da1039d46e6c60f06720 SHA512 600cdf8175b1199b73ddcf8a32df7bca446c294c4c830038f93fe3f053482916745675df3a51bc494cdab00b362d57657a34a94e78bac4bae3acced06347023d WHIRLPOOL 361c0edb411c824f128ccb5e27f4d637ecfdf4f2de7a428a8c4eace6d5c23a33a3868cc1b380dcbf6e06d6c7bb71ff222abad923ea9a0bfb74e78f0445c4058b
23 DIST bareos-15.2.1.tar.gz 3899227 SHA256 8c44496e19f1bfd3e06bb886967c06db5e9c9a991511d99eefb30deb8a8391d2 SHA512 5c03063ad27d3474431d39354a4dd217e90ad9a3c8c60742b544b33955667b62365e8b4ee5d2b773dfc11c7e154a2713bf8f7cf44d536d6a96288c9f007efb49 WHIRLPOOL 3498c584e8800692adfb92950124643f78bb237364fe7e00c9a4ae26083465ac01250a7fe20f98905db6080de35ec71f943739cea9f6d666e65afdf695f95871
24 +DIST bareos-15.2.2.tar.gz 3928079 SHA256 7c7e07c877956385870475382184d39df7232ecd9791c3a3942624473410da93 SHA512 5eb372da510e69fe75175cd6c28e1e2d65372eb0ea58193a6747fceccd4398a343a84abbb379f67849f96242d818f26f2dec3093be56c9f64ea59a1504339d6d WHIRLPOOL 0a79a88fbf6087536f8442fc413f7adbe03ad5affe6dc5550a8e05ded172e15357789637e8a5e606f172a1a0e319d2af20dfbd5144331e37693bbf0543de52e2
25
26 diff --git a/app-backup/bareos/bareos-15.2.2.ebuild b/app-backup/bareos/bareos-15.2.2.ebuild
27 new file mode 100644
28 index 0000000..49be43d
29 --- /dev/null
30 +++ b/app-backup/bareos/bareos-15.2.2.ebuild
31 @@ -0,0 +1,420 @@
32 +# Copyright 1999-2015 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI="5"
37 +
38 +PYTHON_COMPAT=( python2_7 )
39 +PYTHON_REQ_USE="threads"
40 +
41 +inherit eutils multilib python-single-r1 qt4-r2 user
42 +
43 +DESCRIPTION="Featureful client/server network backup suite"
44 +HOMEPAGE="http://www.bareos.org/"
45 +SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz"
46 +RESTRICT="mirror"
47 +
48 +LICENSE="AGPL-3"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~x86"
51 +IUSE="X acl cephfs clientonly +director fastlz glusterfs gnutls ipv6 jansson lmdb logwatch
52 + mysql ndmp postgres python qt4 rados rados-striper readline scsi-crypto sql-pooling
53 + +sqlite ssl static +storage-daemon tcpd vim-syntax"
54 +
55 +DEPEND="
56 + !app-backup/bacula
57 + cephfs? ( sys-cluster/ceph )
58 + rados? ( sys-cluster/ceph )
59 + rados-striper? ( >=sys-cluster/ceph-0.94.2 )
60 + glusterfs? ( sys-cluster/glusterfs )
61 + lmdb? ( dev-db/lmdb )
62 + dev-libs/gmp:0
63 + !clientonly? (
64 + postgres? ( dev-db/postgresql:*[threads] )
65 + mysql? ( virtual/mysql )
66 + sqlite? ( dev-db/sqlite:3 )
67 + director? (
68 + virtual/mta
69 + jansson? ( dev-libs/jansson )
70 + )
71 + )
72 + qt4? (
73 + dev-qt/qtsvg:4
74 + x11-libs/qwt:5
75 + )
76 + fastlz? ( dev-libs/bareos-fastlzlib )
77 + logwatch? ( sys-apps/logwatch )
78 + tcpd? ( sys-apps/tcp-wrappers )
79 + readline? ( sys-libs/readline:0 )
80 + static? (
81 + acl? ( virtual/acl[static-libs] )
82 + sys-libs/zlib[static-libs]
83 + dev-libs/lzo[static-libs]
84 + sys-libs/ncurses:=[static-libs]
85 + ssl? (
86 + !gnutls? ( dev-libs/openssl:0[static-libs] )
87 + gnutls? ( net-libs/gnutls[static-libs] )
88 + )
89 + )
90 + !static? (
91 + acl? ( virtual/acl )
92 + dev-libs/lzo
93 + ssl? (
94 + !gnutls? ( dev-libs/openssl:0 )
95 + gnutls? ( net-libs/gnutls )
96 + )
97 + sys-libs/ncurses:=
98 + sys-libs/zlib
99 + )
100 + python? ( ${PYTHON_DEPS} )
101 + "
102 +RDEPEND="${DEPEND}
103 + !clientonly? (
104 + storage-daemon? (
105 + sys-block/mtx
106 + app-arch/mt-st
107 + )
108 + )
109 + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
110 +
111 +REQUIRED_USE="static? ( clientonly )
112 + python? ( ${PYTHON_REQUIRED_USE} )"
113 +
114 +S=${WORKDIR}/${PN}-Release-${PV}
115 +
116 +pkg_setup() {
117 + use mysql && export mydbtypes+="mysql"
118 + use postgres && export mydbtypes+=" postgresql"
119 + use sqlite && export mydbtypes+=" sqlite"
120 +
121 + # create the daemon group and user
122 + if [ -z "$(egetent group bareos 2>/dev/null)" ]; then
123 + enewgroup bareos
124 + einfo
125 + einfo "The group 'bareos' has been created. Any users you add to this"
126 + einfo "group have access to files created by the daemons."
127 + einfo
128 + fi
129 +
130 + if use clientonly && use static && use qt4; then
131 + ewarn
132 + ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag."
133 + ewarn
134 + fi
135 +
136 + if ! use clientonly; then
137 + if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then
138 + enewuser bareos -1 -1 /var/lib/bareos bareos,disk,tape,cdrom,cdrw
139 + einfo
140 + einfo "The user 'bareos' has been created. Please see the bareos manual"
141 + einfo "for information about running bareos as a non-root user."
142 + einfo
143 + fi
144 + fi
145 +
146 + use python && python-single-r1_pkg_setup
147 +}
148 +
149 +src_prepare() {
150 + # adjusts default configuration files for several binaries
151 + # to /etc/bareos/<config> instead of ./<config>
152 + pushd src >&/dev/null || die
153 + for f in console/console.c dird/dird.c filed/filed.c \
154 + stored/bcopy.c stored/bextract.c stored/bls.c \
155 + stored/bscan.c stored/btape.c stored/stored.c \
156 + qt-console/main.cpp; do
157 + sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \
158 + || die "sed on ${f} failed"
159 + done
160 + popd >&/dev/null || die
161 +
162 + # bug 466690 Use CXXFLAGS instead of CFLAGS
163 + sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
164 +
165 + # stop build for errors in subdirs
166 + epatch "${FILESDIR}"/${PN}-12.4.5-Makefile.patch
167 +
168 + # bat needs to respect LDFLAGS
169 + epatch "${FILESDIR}"/${PN}-12.4.5-bat-ldflags.patch
170 +
171 + # do not strip binaries
172 + for d in filed console dird stored; do
173 + sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die
174 + done
175 +}
176 +
177 +src_configure() {
178 + local myconf=''
179 +
180 + if use clientonly; then
181 + myconf="${myconf} \
182 + $(use_enable clientonly client-only) \
183 + $(use_enable !static libtool) \
184 + $(use_enable static static-cons) \
185 + $(use_enable static static-fd)"
186 + fi
187 +
188 + # do not build bat and traymonitor if 'static' clientonly
189 + if ! use clientonly || ! use static; then
190 + myconf="${myconf} \
191 + $(use_enable qt4 bat) \
192 + $(use_enable qt4 traymonitor)"
193 + fi
194 +
195 + myconf="${myconf} \
196 + $(use_with X x) \
197 + $(use_enable acl) \
198 + $(use_enable ipv6) \
199 + $(use_enable ndmp) \
200 + $(use_enable readline) \
201 + $(use_enable !readline conio) \
202 + $(use_enable scsi-crypto) \
203 + $(use_enable sql-pooling) \
204 + $(use_with fastlz) \
205 + $(use_with mysql) \
206 + $(use_with postgres postgresql) \
207 + $(use_with python) \
208 + $(use_with readline) \
209 + $(use_with sqlite sqlite3) \
210 + $(use sqlite || echo "--without-sqlite3") \
211 + $(use_with ssl openssl) \
212 + $(use_with tcpd tcp-wrappers) \
213 + $(use_enable lmdb) \
214 + $(use_with glusterfs) \
215 + $(use_with rados) \
216 + $(use_with rados-striper) \
217 + $(use_with cephfs) \
218 + $(use_with jansson) \
219 + "
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=/run/bareos \
226 + --sysconfdir=/etc \
227 + --with-subsys-dir=/run/lock/subsys \
228 + --with-working-dir=/var/lib/bareos \
229 + --with-logdir=/var/log/bareos \
230 + --with-scriptdir=/usr/libexec/bareos \
231 + --with-plugindir=/usr/$(get_libdir)/${PN}/plugin \
232 + --with-backenddir=/usr/$(get_libdir)/${PN}/backend \
233 + --with-dir-user=bareos \
234 + --with-dir-group=bareos \
235 + --with-sd-user=root \
236 + --with-sd-group=bareos \
237 + --with-fd-user=root \
238 + --with-fd-group=bareos \
239 + --with-sbin-perm=0755 \
240 + --with-systemd \
241 + --enable-dynamic-cats-backends \
242 + --enable-dynamic-storage-backends \
243 + --enable-batch-insert \
244 + --disable-afs \
245 + --host=${CHOST} \
246 + ${myconf}
247 + # correct configuration for QT based bat
248 + if use qt4 ; then
249 + pushd src/qt-console
250 + eqmake4
251 + popd
252 + pushd src/qt-tray-monitor
253 + eqmake4
254 + popd
255 + fi
256 +}
257 +
258 +src_compile() {
259 + # workaround for build failing with high -j values
260 + # if ndmp is enabled
261 + use ndmp && MAKEOPTS="$MAKEOPTS -j1"
262 +
263 + # Make build log verbose (bug #447806)
264 + emake NO_ECHO=""
265 +}
266 +
267 +src_install() {
268 + emake DESTDIR="${D}" install
269 + newicon src/images/bareos_logo_shadow.png bareos.png
270 +
271 + # install bat icon and desktop file when enabled
272 + # (for some reason ./configure doesn't pick this up)
273 + if use qt4 && ! use static ; then
274 + doicon src/images/bat.png
275 + domenu scripts/bat.desktop
276 + fi
277 +
278 + # remove some scripts we don't need at all
279 + rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql}
280 + rm -f "${D}"/usr/sbin/bareos
281 +
282 + # remove upstream init scripts
283 + rm -f "${D}"/etc/init.d/bareos-*
284 +
285 + # rename statically linked apps
286 + if use clientonly && use static ; then
287 + pushd "${D}"/usr/sbin || die
288 + mv static-bareos-fd bareos-fd || die
289 + mv static-bconsole bconsole || die
290 + popd || die
291 + fi
292 +
293 + # extra files which 'make install' doesn't cover
294 + if ! use clientonly; then
295 + # the logrotate configuration
296 + # (now unconditional wrt bug #258187)
297 + diropts -m0755
298 + insinto /etc/logrotate.d
299 + insopts -m0644
300 + newins "${S}"/scripts/logrotate bareos
301 +
302 + # the logwatch scripts
303 + if use logwatch; then
304 + diropts -m0750
305 + dodir /etc/log.d/scripts/services
306 + dodir /etc/log.d/scripts/shared
307 + dodir /etc/log.d/conf/logfiles
308 + dodir /etc/log.d/conf/services
309 + pushd "${S}"/scripts/logwatch >&/dev/null || die
310 + emake DESTDIR="${D}" install
311 + popd >&/dev/null || die
312 + fi
313 + fi
314 +
315 + rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
316 + if ! use qt4; then
317 + rm -vf "${D}"/usr/share/man/man1/bat.1*
318 + fi
319 + if use clientonly || ! use director; then
320 + rm -vf "${D}"/usr/share/man/man8/bareos-dir.8*
321 + rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8*
322 + rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
323 + rm -vf "${D}"/usr/share/man/man8/bwild.8*
324 + rm -vf "${D}"/usr/share/man/man8/bregex.8*
325 + rm -vf "${D}"/usr/share/man/man8/bpluginfo.8*
326 + rm -vf "${D}"/usr/libexec/bareos/create_*_database
327 + rm -vf "${D}"/usr/libexec/bareos/drop_*_database
328 + rm -vf "${D}"/usr/libexec/bareos/make_*_tables
329 + rm -vf "${D}"/usr/libexec/bareos/update_*_tables
330 + rm -vf "${D}"/usr/libexec/bareos/drop_*_tables
331 + rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges
332 + rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup
333 + fi
334 + if use clientonly || ! use storage-daemon; then
335 + rm -vf "${D}"/usr/share/man/man8/bareos-sd.8*
336 + rm -vf "${D}"/usr/share/man/man8/bcopy.8*
337 + rm -vf "${D}"/usr/share/man/man8/bextract.8*
338 + rm -vf "${D}"/usr/share/man/man8/bls.8*
339 + rm -vf "${D}"/usr/share/man/man8/bscan.8*
340 + rm -vf "${D}"/usr/share/man/man8/btape.8*
341 + rm -vf "${D}"/usr/libexec/bareos/disk-changer
342 + rm -vf "${D}"/usr/libexec/bareos/mtx-changer
343 + rm -vf "${D}"/usr/libexec/bareos/dvd-handler
344 + rm -vf "${D}"/etc/bareos/mtx-changer.conf
345 + fi
346 + if ! use scsi-crypto; then
347 + rm -vf "${D}"/usr/share/man/man8/bscrypto.8*
348 + fi
349 + if ! use qt4; then
350 + rm -vf "${D}"/usr/share/man/man1/bareos-tray-monitor.1*
351 + fi
352 +
353 + # documentation
354 + dodoc README.md
355 + use ndmp && dodoc README.NDMP
356 + use scsi-crypto && dodoc README.scsicrypto
357 +
358 + # vim-files
359 + if use vim-syntax; then
360 + insinto /usr/share/vim/vimfiles/syntax
361 + doins scripts/bareos.vim
362 + insinto /usr/share/vim/vimfiles/ftdetect
363 + newins scripts/filetype.vim bareos_ft.vim
364 + fi
365 +
366 + # setup init scripts
367 + myscripts="bareos-fd"
368 + if ! use clientonly; then
369 + if use director; then
370 + myscripts="${myscripts} bareos-dir"
371 + fi
372 + if use storage-daemon; then
373 + myscripts="${myscripts} bareos-sd"
374 + fi
375 + fi
376 + for script in ${myscripts}; do
377 + # copy over init script and config to a temporary location
378 + # so we can modify them as needed
379 + cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
380 + cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
381 +
382 + # now set the database dependency for the director init script
383 + case "${script}" in
384 + bareos-dir)
385 + sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die
386 + ;;
387 + *)
388 + ;;
389 + esac
390 +
391 + # install init script and config
392 + newinitd "${T}/${script}".initd "${script}"
393 + newconfd "${T}/${script}".confd "${script}"
394 + done
395 +
396 + # make sure the working directory exists
397 + diropts -m0750
398 + keepdir /var/lib/bareos
399 +
400 + # make sure bareos group can execute bareos libexec scripts
401 + fowners -R root:bareos /usr/libexec/bareos
402 +}
403 +
404 +pkg_postinst() {
405 + if use clientonly; then
406 + fowners root:bareos /var/lib/bareos
407 + else
408 + fowners bareos:bareos /var/lib/bareos
409 + fi
410 +
411 + if ! use clientonly && use director; then
412 + einfo
413 + einfo "If this is a new install, you must create the databases with:"
414 + if use postgres; then
415 + einfo
416 + einfo "For postgresql:"
417 + einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'"
418 + einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'"
419 + einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'"
420 + fi
421 + if use mysql; then
422 + einfo
423 + einfo "For mysql:"
424 + einfo
425 + einfo " Make sure root has direct access to your mysql server. You may want to"
426 + einfo " create a /root/.my.cnf file with"
427 + einfo " [client]"
428 + einfo " user=root"
429 + einfo " password=YourPasswordForAccessingMysqlAsRoot"
430 + einfo " before running:"
431 + einfo " /usr/libexec/bareos/create_bareos_database mysql"
432 + einfo " /usr/libexec/bareos/make_bareos_tables mysql"
433 + einfo " /usr/libexec/bareos/grant_bareos_privileges mysql"
434 + fi
435 + einfo
436 + fi
437 +
438 + if use sqlite; then
439 + einfo
440 + einfo "Be aware that Bareos does not officially support SQLite database."
441 + einfo "Best use it only for a client-only installation. See Bug #445540."
442 + einfo
443 + einfo "It is strongly recommended to use either postgresql or mysql as"
444 + einfo "catalog database backend."
445 + einfo
446 + fi
447 +
448 + einfo "Please note that 'bconsole' will always be installed. To compile 'bat'"
449 + einfo "you have to enable 'USE=qt4'."
450 + einfo
451 +}