1 |
commit: f85a9a00c28484b35503d666f2630a4efe85545a |
2 |
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 10 22:51:38 2017 +0000 |
4 |
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 10 22:51:52 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f85a9a00 |
7 |
|
8 |
app-backup/bareos: remove old version |
9 |
|
10 |
Package-Manager: Portage-2.3.17, Repoman-2.3.6 |
11 |
|
12 |
app-backup/bareos/Manifest | 3 - |
13 |
app-backup/bareos/bareos-13.2.4-r1.ebuild | 403 ----------------------------- |
14 |
app-backup/bareos/bareos-14.2.2.ebuild | 414 ------------------------------ |
15 |
app-backup/bareos/bareos-14.2.5.ebuild | 414 ------------------------------ |
16 |
4 files changed, 1234 deletions(-) |
17 |
|
18 |
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest |
19 |
index 70de9426eea..4cabd451436 100644 |
20 |
--- a/app-backup/bareos/Manifest |
21 |
+++ b/app-backup/bareos/Manifest |
22 |
@@ -1,6 +1,3 @@ |
23 |
-DIST bareos-13.2.4.tar.gz 3467542 BLAKE2B 7e9ef15ad3ec86af8e60d90d27660b1e10a18eb928e76af319cc59ce6a39805874fc27dc8e62b81fb9fccfbd0b6b2e73583e54f5c9580db96469b85e48736ce6 SHA512 d7e4bc016993f68521f4438b56adf51e88685195693d00d34103259c3c24d1d7c03cc2b7aecbb55ff88a00d5f169e9e42accd23b17bcd3c837ca78079a9f394f |
24 |
-DIST bareos-14.2.2.tar.gz 3811787 BLAKE2B ace5a3d25c98df852308cef0ff603e416aff2f4a437c0621732288c792fef1fb4e89f413b022586f7adf018fdae1dbe33b4124b942ed5fce24088f1caea99c4f SHA512 be490ab2f8085975f164ac554cac7d6bbef1af01c8350b5816b2033a37827de4a81bead6ce1e699fe5cc44085dce2b6a0330b91239fb87907e22f9c8dc710156 |
25 |
-DIST bareos-14.2.5.tar.gz 3820963 BLAKE2B 7f9736be72fbf03f277e8d8460e4343e9340c7c9fb50722566f16a09e97dcf921f54eee528e0b453e4f0251a4e91ec983006cbda027597ae98beb70265b1f22b SHA512 600cdf8175b1199b73ddcf8a32df7bca446c294c4c830038f93fe3f053482916745675df3a51bc494cdab00b362d57657a34a94e78bac4bae3acced06347023d |
26 |
DIST bareos-15.2.2.tar.gz 3928036 BLAKE2B ac331008e45c029bb3320a9a40264d350aedbb5550d65a606a95372241f5ec9c8a7e73f365f8b0c3972e59fa907764995b0173dcd762971cd2fdce1e025c75e2 SHA512 07b11c51695a6ff348317965625e5cdb8e296d4f3a4037718a98e266d94650ed1fb905c220ac791123d8ed92d0aed24854a6ab52887249849dbc00697d3300c3 |
27 |
DIST bareos-16.2.4.tar.gz 4275141 BLAKE2B e7b8a5658a697436401659ecd24148f4f1ad982cbd6dd46c39f3d29ba461b54737950d6fe6ec2c36e7892d414306c7038af5221c28652109e047f66f2d9daa2e SHA512 91f7f2b3d9889f4faa9834dc414e2250015d3d26bf8bd0c04c1f3fd882a50a4066ced145f7c8609c070e8f74b53574953e3fef344726c6863cd7bbc73c76a88c |
28 |
DIST bareos-16.2.7.tar.gz 4282998 BLAKE2B 9101a49d1178e0bcc4843cc4472a2082827a7bd7595389c0fa3699d36651ca70fce674509eeaddc8f806a5df1dba6afc89c05be183e7561e013d23bd157ef294 SHA512 028f38dd77fed5e3af6ee50aa44cb2f82349bd38e40eadebc552a95100166291ae0c68073daa2513919da330c66bb54a3050f1d99cbf3b5354f2450a789f6c00 |
29 |
|
30 |
diff --git a/app-backup/bareos/bareos-13.2.4-r1.ebuild b/app-backup/bareos/bareos-13.2.4-r1.ebuild |
31 |
deleted file mode 100644 |
32 |
index 1890fd8e3bd..00000000000 |
33 |
--- a/app-backup/bareos/bareos-13.2.4-r1.ebuild |
34 |
+++ /dev/null |
35 |
@@ -1,403 +0,0 @@ |
36 |
-# Copyright 1999-2016 Gentoo Foundation |
37 |
-# Distributed under the terms of the GNU General Public License v2 |
38 |
- |
39 |
-EAPI="5" |
40 |
- |
41 |
-PYTHON_COMPAT=( python2_7 ) |
42 |
-PYTHON_REQ_USE="threads" |
43 |
- |
44 |
-inherit eutils multilib python-single-r1 qt4-r2 user |
45 |
- |
46 |
-DESCRIPTION="Featureful client/server network backup suite" |
47 |
-HOMEPAGE="http://www.bareos.org/" |
48 |
-SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" |
49 |
-RESTRICT="mirror" |
50 |
- |
51 |
-LICENSE="AGPL-3" |
52 |
-SLOT="0" |
53 |
-KEYWORDS="~amd64 ~x86" |
54 |
-IUSE="acl clientonly +director fastlz ipv6 libressl logwatch mysql ndmp postgres |
55 |
- python qt4 readline scsi-crypto sql-pooling +sqlite ssl static +storage-daemon |
56 |
- tcpd vim-syntax X" |
57 |
- |
58 |
-DEPEND=" |
59 |
- !app-backup/bacula |
60 |
- dev-libs/gmp:0 |
61 |
- !clientonly? ( |
62 |
- postgres? ( dev-db/postgresql:*[threads] ) |
63 |
- mysql? ( virtual/mysql ) |
64 |
- sqlite? ( dev-db/sqlite:3 ) |
65 |
- director? ( virtual/mta ) |
66 |
- ) |
67 |
- qt4? ( |
68 |
- dev-qt/qtsvg:4 |
69 |
- x11-libs/qwt:5 |
70 |
- ) |
71 |
- fastlz? ( dev-libs/bareos-fastlzlib ) |
72 |
- logwatch? ( sys-apps/logwatch ) |
73 |
- tcpd? ( sys-apps/tcp-wrappers ) |
74 |
- readline? ( sys-libs/readline:0 ) |
75 |
- static? ( |
76 |
- acl? ( virtual/acl[static-libs] ) |
77 |
- sys-libs/zlib[static-libs] |
78 |
- dev-libs/lzo[static-libs] |
79 |
- sys-libs/ncurses:=[static-libs] |
80 |
- ssl? ( |
81 |
- !libressl? ( dev-libs/openssl:0=[static-libs] ) |
82 |
- libressl? ( dev-libs/libressl:0=[static-libs] ) |
83 |
- ) |
84 |
- ) |
85 |
- !static? ( |
86 |
- acl? ( virtual/acl ) |
87 |
- dev-libs/lzo |
88 |
- ssl? ( |
89 |
- !libressl? ( dev-libs/openssl:0= ) |
90 |
- libressl? ( dev-libs/libressl:0= ) |
91 |
- ) |
92 |
- sys-libs/ncurses:= |
93 |
- sys-libs/zlib |
94 |
- ) |
95 |
- python? ( ${PYTHON_DEPS} ) |
96 |
- " |
97 |
-RDEPEND="${DEPEND} |
98 |
- !clientonly? ( |
99 |
- storage-daemon? ( |
100 |
- sys-block/mtx |
101 |
- app-arch/mt-st |
102 |
- ) |
103 |
- ) |
104 |
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
105 |
- |
106 |
-REQUIRED_USE="static? ( clientonly ) |
107 |
- python? ( ${PYTHON_REQUIRED_USE} )" |
108 |
- |
109 |
-S=${WORKDIR}/${PN}-Release-${PV} |
110 |
- |
111 |
-pkg_setup() { |
112 |
- use mysql && export mydbtypes+="mysql" |
113 |
- use postgres && export mydbtypes+=" postgresql" |
114 |
- use sqlite && export mydbtypes+=" sqlite" |
115 |
- |
116 |
- # create the daemon group and user |
117 |
- if [ -z "$(egetent group bareos 2>/dev/null)" ]; then |
118 |
- enewgroup bareos |
119 |
- einfo |
120 |
- einfo "The group 'bareos' has been created. Any users you add to this" |
121 |
- einfo "group have access to files created by the daemons." |
122 |
- einfo |
123 |
- fi |
124 |
- |
125 |
- if use clientonly && use static && use qt4; then |
126 |
- ewarn |
127 |
- ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag." |
128 |
- ewarn |
129 |
- fi |
130 |
- |
131 |
- if ! use clientonly; then |
132 |
- if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then |
133 |
- enewuser bareos -1 -1 /var/lib/bareos bareos,disk,tape,cdrom,cdrw |
134 |
- einfo |
135 |
- einfo "The user 'bareos' has been created. Please see the bareos manual" |
136 |
- einfo "for information about running bareos as a non-root user." |
137 |
- einfo |
138 |
- fi |
139 |
- fi |
140 |
- |
141 |
- use python && python-single-r1_pkg_setup |
142 |
-} |
143 |
- |
144 |
-src_prepare() { |
145 |
- # adjusts default configuration files for several binaries |
146 |
- # to /etc/bareos/<config> instead of ./<config> |
147 |
- pushd src >&/dev/null || die |
148 |
- for f in console/console.c dird/dird.c filed/filed.c \ |
149 |
- stored/bcopy.c stored/bextract.c stored/bls.c \ |
150 |
- stored/bscan.c stored/btape.c stored/stored.c \ |
151 |
- qt-console/main.cpp; do |
152 |
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \ |
153 |
- || die "sed on ${f} failed" |
154 |
- done |
155 |
- popd >&/dev/null || die |
156 |
- |
157 |
- # bug 466690 Use CXXFLAGS instead of CFLAGS |
158 |
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die |
159 |
- |
160 |
- # stop build for errors in subdirs |
161 |
- epatch "${FILESDIR}"/${PN}-12.4.5-Makefile.patch |
162 |
- |
163 |
- # bat needs to respect LDFLAGS |
164 |
- epatch "${FILESDIR}"/${PN}-12.4.5-bat-ldflags.patch |
165 |
- |
166 |
- # do not strip binaries |
167 |
- for d in filed console dird stored; do |
168 |
- sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die |
169 |
- done |
170 |
-} |
171 |
- |
172 |
-src_configure() { |
173 |
- local myconf='' |
174 |
- |
175 |
- if use clientonly; then |
176 |
- myconf="${myconf} \ |
177 |
- $(use_enable clientonly client-only) \ |
178 |
- $(use_enable !static libtool) \ |
179 |
- $(use_enable static static-cons) \ |
180 |
- $(use_enable static static-fd)" |
181 |
- fi |
182 |
- |
183 |
- # do not build bat and traymonitor if 'static' clientonly |
184 |
- if ! use clientonly || ! use static; then |
185 |
- myconf="${myconf} \ |
186 |
- $(use_enable qt4 bat) \ |
187 |
- $(use_enable qt4 traymonitor)" |
188 |
- fi |
189 |
- |
190 |
- myconf="${myconf} \ |
191 |
- $(use_with X x) \ |
192 |
- $(use_enable acl) \ |
193 |
- $(use_enable ipv6) \ |
194 |
- $(use_enable ndmp) \ |
195 |
- $(use_enable readline) \ |
196 |
- $(use_enable !readline conio) \ |
197 |
- $(use_enable scsi-crypto) \ |
198 |
- $(use_enable sql-pooling) \ |
199 |
- $(use_with fastlz) \ |
200 |
- $(use_with mysql) \ |
201 |
- $(use_with postgres postgresql) \ |
202 |
- $(use_with python) \ |
203 |
- $(use_with readline) \ |
204 |
- $(use_with sqlite sqlite3) \ |
205 |
- $(use sqlite || echo "--without-sqlite3") \ |
206 |
- $(use_with ssl openssl) \ |
207 |
- $(use_with tcpd tcp-wrappers) \ |
208 |
- " |
209 |
- |
210 |
- econf \ |
211 |
- --libdir=/usr/$(get_libdir) \ |
212 |
- --docdir=/usr/share/doc/${PF} \ |
213 |
- --htmldir=/usr/share/doc/${PF}/html \ |
214 |
- --with-pid-dir=/run/bareos \ |
215 |
- --sysconfdir=/etc/bareos \ |
216 |
- --with-subsys-dir=/run/lock/subsys \ |
217 |
- --with-working-dir=/var/lib/bareos \ |
218 |
- --with-logdir=/var/log/bareos \ |
219 |
- --with-scriptdir=/usr/libexec/bareos \ |
220 |
- --with-plugindir=/usr/$(get_libdir)/${PN}/plugin \ |
221 |
- --with-dir-user=bareos \ |
222 |
- --with-dir-group=bareos \ |
223 |
- --with-sd-user=root \ |
224 |
- --with-sd-group=bareos \ |
225 |
- --with-fd-user=root \ |
226 |
- --with-fd-group=bareos \ |
227 |
- --with-sbin-perm=0755 \ |
228 |
- --enable-smartalloc \ |
229 |
- --enable-dynamic-cats-backends \ |
230 |
- --enable-batch-insert \ |
231 |
- --disable-afs \ |
232 |
- --host=${CHOST} \ |
233 |
- ${myconf} |
234 |
- # correct configuration for QT based bat |
235 |
- if use qt4 ; then |
236 |
- pushd src/qt-console |
237 |
- eqmake4 |
238 |
- popd |
239 |
- pushd src/qt-tray-monitor |
240 |
- eqmake4 |
241 |
- popd |
242 |
- fi |
243 |
-} |
244 |
- |
245 |
-src_compile() { |
246 |
- # workaround for build failing with high -j values |
247 |
- # if ndmp is enabled |
248 |
- use ndmp && MAKEOPTS="$MAKEOPTS -j1" |
249 |
- |
250 |
- # Make build log verbose (bug #447806) |
251 |
- emake NO_ECHO="" |
252 |
-} |
253 |
- |
254 |
-src_install() { |
255 |
- emake DESTDIR="${D}" install |
256 |
- doicon scripts/bareos.png |
257 |
- |
258 |
- # install bat icon and desktop file when enabled |
259 |
- # (for some reason ./configure doesn't pick this up) |
260 |
- if use qt4 && ! use static ; then |
261 |
- doicon src/images/bat.png |
262 |
- domenu scripts/bat.desktop |
263 |
- fi |
264 |
- |
265 |
- # remove some scripts we don't need at all |
266 |
- rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql} |
267 |
- rm -f "${D}"/usr/sbin/bareos |
268 |
- |
269 |
- # remove upstream init scripts |
270 |
- rm -f "${D}"/etc/init.d/bareos-* |
271 |
- |
272 |
- # rename statically linked apps |
273 |
- if use clientonly && use static ; then |
274 |
- pushd "${D}"/usr/sbin || die |
275 |
- mv static-bareos-fd bareos-fd || die |
276 |
- mv static-bconsole bconsole || die |
277 |
- popd || die |
278 |
- fi |
279 |
- |
280 |
- # extra files which 'make install' doesn't cover |
281 |
- if ! use clientonly; then |
282 |
- # the logrotate configuration |
283 |
- # (now unconditional wrt bug #258187) |
284 |
- diropts -m0755 |
285 |
- insinto /etc/logrotate.d |
286 |
- insopts -m0644 |
287 |
- newins "${S}"/scripts/logrotate bareos |
288 |
- |
289 |
- # the logwatch scripts |
290 |
- if use logwatch; then |
291 |
- diropts -m0750 |
292 |
- dodir /etc/log.d/scripts/services |
293 |
- dodir /etc/log.d/scripts/shared |
294 |
- dodir /etc/log.d/conf/logfiles |
295 |
- dodir /etc/log.d/conf/services |
296 |
- pushd "${S}"/scripts/logwatch >&/dev/null || die |
297 |
- emake DESTDIR="${D}" install |
298 |
- popd >&/dev/null || die |
299 |
- fi |
300 |
- fi |
301 |
- |
302 |
- rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* |
303 |
- if ! use qt4; then |
304 |
- rm -vf "${D}"/usr/share/man/man1/bat.1* |
305 |
- fi |
306 |
- if use clientonly || ! use director; then |
307 |
- rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* |
308 |
- rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* |
309 |
- rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
310 |
- rm -vf "${D}"/usr/share/man/man8/bwild.8* |
311 |
- rm -vf "${D}"/usr/share/man/man8/bregex.8* |
312 |
- rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* |
313 |
- rm -vf "${D}"/usr/libexec/bareos/create_*_database |
314 |
- rm -vf "${D}"/usr/libexec/bareos/drop_*_database |
315 |
- rm -vf "${D}"/usr/libexec/bareos/make_*_tables |
316 |
- rm -vf "${D}"/usr/libexec/bareos/update_*_tables |
317 |
- rm -vf "${D}"/usr/libexec/bareos/drop_*_tables |
318 |
- rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges |
319 |
- rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup |
320 |
- fi |
321 |
- if use clientonly || ! use storage-daemon; then |
322 |
- rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* |
323 |
- rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
324 |
- rm -vf "${D}"/usr/share/man/man8/bextract.8* |
325 |
- rm -vf "${D}"/usr/share/man/man8/bls.8* |
326 |
- rm -vf "${D}"/usr/share/man/man8/bscan.8* |
327 |
- rm -vf "${D}"/usr/share/man/man8/btape.8* |
328 |
- rm -vf "${D}"/usr/libexec/bareos/disk-changer |
329 |
- rm -vf "${D}"/usr/libexec/bareos/mtx-changer |
330 |
- rm -vf "${D}"/usr/libexec/bareos/dvd-handler |
331 |
- rm -vf "${D}"/etc/bareos/mtx-changer.conf |
332 |
- fi |
333 |
- if ! use scsi-crypto; then |
334 |
- rm -vf "${D}"/usr/share/man/man8/bscrypto.8* |
335 |
- fi |
336 |
- if ! use qt4; then |
337 |
- rm -vf "${D}"/usr/share/man/man1/bareos-tray-monitor.1* |
338 |
- fi |
339 |
- |
340 |
- # documentation |
341 |
- dodoc README.md |
342 |
- use ndmp && dodoc README.NDMP |
343 |
- use scsi-crypto && dodoc README.scsicrypto |
344 |
- |
345 |
- # vim-files |
346 |
- if use vim-syntax; then |
347 |
- insinto /usr/share/vim/vimfiles/syntax |
348 |
- doins scripts/bareos.vim |
349 |
- insinto /usr/share/vim/vimfiles/ftdetect |
350 |
- newins scripts/filetype.vim bareos_ft.vim |
351 |
- fi |
352 |
- |
353 |
- # setup init scripts |
354 |
- myscripts="bareos-fd" |
355 |
- if ! use clientonly; then |
356 |
- if use director; then |
357 |
- myscripts="${myscripts} bareos-dir" |
358 |
- fi |
359 |
- if use storage-daemon; then |
360 |
- myscripts="${myscripts} bareos-sd" |
361 |
- fi |
362 |
- fi |
363 |
- for script in ${myscripts}; do |
364 |
- # copy over init script and config to a temporary location |
365 |
- # so we can modify them as needed |
366 |
- cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" |
367 |
- cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
368 |
- |
369 |
- # now set the database dependency for the director init script |
370 |
- case "${script}" in |
371 |
- bareos-dir) |
372 |
- sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die |
373 |
- ;; |
374 |
- *) |
375 |
- ;; |
376 |
- esac |
377 |
- |
378 |
- # install init script and config |
379 |
- newinitd "${T}/${script}".initd "${script}" |
380 |
- newconfd "${T}/${script}".confd "${script}" |
381 |
- done |
382 |
- |
383 |
- # make sure the working directory exists |
384 |
- diropts -m0750 |
385 |
- keepdir /var/lib/bareos |
386 |
- |
387 |
- # make sure bareos group can execute bareos libexec scripts |
388 |
- fowners -R root:bareos /usr/libexec/bareos |
389 |
-} |
390 |
- |
391 |
-pkg_postinst() { |
392 |
- if use clientonly; then |
393 |
- fowners root:bareos /var/lib/bareos |
394 |
- else |
395 |
- fowners bareos:bareos /var/lib/bareos |
396 |
- fi |
397 |
- |
398 |
- if ! use clientonly && use director; then |
399 |
- einfo |
400 |
- einfo "If this is a new install, you must create the databases with:" |
401 |
- if use postgres; then |
402 |
- einfo |
403 |
- einfo "For postgresql:" |
404 |
- einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" |
405 |
- einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" |
406 |
- einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" |
407 |
- fi |
408 |
- if use mysql; then |
409 |
- einfo |
410 |
- einfo "For mysql:" |
411 |
- einfo |
412 |
- einfo " Make sure root has direct access to your mysql server. You may want to" |
413 |
- einfo " create a /root/.my.cnf file with" |
414 |
- einfo " [client]" |
415 |
- einfo " user=root" |
416 |
- einfo " password=YourPasswordForAccessingMysqlAsRoot" |
417 |
- einfo " before running:" |
418 |
- einfo " /usr/libexec/bareos/create_bareos_database mysql" |
419 |
- einfo " /usr/libexec/bareos/make_bareos_tables mysql" |
420 |
- einfo " /usr/libexec/bareos/grant_bareos_privileges mysql" |
421 |
- fi |
422 |
- einfo |
423 |
- fi |
424 |
- |
425 |
- if use sqlite; then |
426 |
- einfo |
427 |
- einfo "Be aware that Bareos does not officially support SQLite database." |
428 |
- einfo "Best use it only for a client-only installation. See Bug #445540." |
429 |
- einfo |
430 |
- einfo "It is strongly recommended to use either postgresql or mysql as" |
431 |
- einfo "catalog database backend." |
432 |
- einfo |
433 |
- fi |
434 |
- |
435 |
- einfo "Please note that 'bconsole' will always be installed. To compile 'bat'" |
436 |
- einfo "you have to enable 'USE=qt4'." |
437 |
- einfo |
438 |
-} |
439 |
|
440 |
diff --git a/app-backup/bareos/bareos-14.2.2.ebuild b/app-backup/bareos/bareos-14.2.2.ebuild |
441 |
deleted file mode 100644 |
442 |
index e9e440269f5..00000000000 |
443 |
--- a/app-backup/bareos/bareos-14.2.2.ebuild |
444 |
+++ /dev/null |
445 |
@@ -1,414 +0,0 @@ |
446 |
-# Copyright 1999-2016 Gentoo Foundation |
447 |
-# Distributed under the terms of the GNU General Public License v2 |
448 |
- |
449 |
-EAPI="5" |
450 |
- |
451 |
-PYTHON_COMPAT=( python2_7 ) |
452 |
-PYTHON_REQ_USE="threads" |
453 |
- |
454 |
-inherit eutils multilib python-single-r1 qt4-r2 user |
455 |
- |
456 |
-DESCRIPTION="Featureful client/server network backup suite" |
457 |
-HOMEPAGE="http://www.bareos.org/" |
458 |
-SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" |
459 |
-RESTRICT="mirror" |
460 |
- |
461 |
-LICENSE="AGPL-3" |
462 |
-SLOT="0" |
463 |
-KEYWORDS="~amd64 ~x86" |
464 |
-IUSE="acl clientonly +director fastlz ipv6 libressl logwatch mysql ndmp postgres |
465 |
- python qt4 readline scsi-crypto sql-pooling +sqlite ssl static +storage-daemon |
466 |
- tcpd vim-syntax X cephfs glusterfs lmdb rados" |
467 |
- |
468 |
-DEPEND=" |
469 |
- !app-backup/bacula |
470 |
- cephfs? ( sys-cluster/ceph ) |
471 |
- rados? ( sys-cluster/ceph ) |
472 |
- glusterfs? ( sys-cluster/glusterfs ) |
473 |
- lmdb? ( dev-db/lmdb ) |
474 |
- dev-libs/gmp:0 |
475 |
- !clientonly? ( |
476 |
- postgres? ( dev-db/postgresql:*[threads] ) |
477 |
- mysql? ( virtual/mysql ) |
478 |
- sqlite? ( dev-db/sqlite:3 ) |
479 |
- director? ( virtual/mta ) |
480 |
- ) |
481 |
- qt4? ( |
482 |
- dev-qt/qtsvg:4 |
483 |
- x11-libs/qwt:5 |
484 |
- ) |
485 |
- fastlz? ( dev-libs/bareos-fastlzlib ) |
486 |
- logwatch? ( sys-apps/logwatch ) |
487 |
- tcpd? ( sys-apps/tcp-wrappers ) |
488 |
- readline? ( sys-libs/readline:0 ) |
489 |
- static? ( |
490 |
- acl? ( virtual/acl[static-libs] ) |
491 |
- sys-libs/zlib[static-libs] |
492 |
- dev-libs/lzo[static-libs] |
493 |
- sys-libs/ncurses:=[static-libs] |
494 |
- ssl? ( |
495 |
- !libressl? ( dev-libs/openssl:0=[static-libs] ) |
496 |
- libressl? ( dev-libs/libressl:0=[static-libs] ) |
497 |
- ) |
498 |
- ) |
499 |
- !static? ( |
500 |
- acl? ( virtual/acl ) |
501 |
- dev-libs/lzo |
502 |
- ssl? ( |
503 |
- !libressl? ( dev-libs/openssl:0= ) |
504 |
- libressl? ( dev-libs/libressl:0= ) |
505 |
- ) |
506 |
- sys-libs/ncurses:= |
507 |
- sys-libs/zlib |
508 |
- ) |
509 |
- python? ( ${PYTHON_DEPS} ) |
510 |
- " |
511 |
-RDEPEND="${DEPEND} |
512 |
- !clientonly? ( |
513 |
- storage-daemon? ( |
514 |
- sys-block/mtx |
515 |
- app-arch/mt-st |
516 |
- ) |
517 |
- ) |
518 |
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
519 |
- |
520 |
-REQUIRED_USE="static? ( clientonly ) |
521 |
- python? ( ${PYTHON_REQUIRED_USE} )" |
522 |
- |
523 |
-S=${WORKDIR}/${PN}-Release-${PV} |
524 |
- |
525 |
-pkg_setup() { |
526 |
- use mysql && export mydbtypes+="mysql" |
527 |
- use postgres && export mydbtypes+=" postgresql" |
528 |
- use sqlite && export mydbtypes+=" sqlite" |
529 |
- |
530 |
- # create the daemon group and user |
531 |
- if [ -z "$(egetent group bareos 2>/dev/null)" ]; then |
532 |
- enewgroup bareos |
533 |
- einfo |
534 |
- einfo "The group 'bareos' has been created. Any users you add to this" |
535 |
- einfo "group have access to files created by the daemons." |
536 |
- einfo |
537 |
- fi |
538 |
- |
539 |
- if use clientonly && use static && use qt4; then |
540 |
- ewarn |
541 |
- ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag." |
542 |
- ewarn |
543 |
- fi |
544 |
- |
545 |
- if ! use clientonly; then |
546 |
- if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then |
547 |
- enewuser bareos -1 -1 /var/lib/bareos bareos,disk,tape,cdrom,cdrw |
548 |
- einfo |
549 |
- einfo "The user 'bareos' has been created. Please see the bareos manual" |
550 |
- einfo "for information about running bareos as a non-root user." |
551 |
- einfo |
552 |
- fi |
553 |
- fi |
554 |
- |
555 |
- use python && python-single-r1_pkg_setup |
556 |
-} |
557 |
- |
558 |
-src_prepare() { |
559 |
- # adjusts default configuration files for several binaries |
560 |
- # to /etc/bareos/<config> instead of ./<config> |
561 |
- pushd src >&/dev/null || die |
562 |
- for f in console/console.c dird/dird.c filed/filed.c \ |
563 |
- stored/bcopy.c stored/bextract.c stored/bls.c \ |
564 |
- stored/bscan.c stored/btape.c stored/stored.c \ |
565 |
- qt-console/main.cpp; do |
566 |
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \ |
567 |
- || die "sed on ${f} failed" |
568 |
- done |
569 |
- popd >&/dev/null || die |
570 |
- |
571 |
- # bug 466690 Use CXXFLAGS instead of CFLAGS |
572 |
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die |
573 |
- |
574 |
- # stop build for errors in subdirs |
575 |
- epatch "${FILESDIR}"/${PN}-12.4.5-Makefile.patch |
576 |
- |
577 |
- # bat needs to respect LDFLAGS |
578 |
- epatch "${FILESDIR}"/${PN}-12.4.5-bat-ldflags.patch |
579 |
- |
580 |
- # do not strip binaries |
581 |
- for d in filed console dird stored; do |
582 |
- sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die |
583 |
- done |
584 |
-} |
585 |
- |
586 |
-src_configure() { |
587 |
- local myconf='' |
588 |
- |
589 |
- if use clientonly; then |
590 |
- myconf="${myconf} \ |
591 |
- $(use_enable clientonly client-only) \ |
592 |
- $(use_enable !static libtool) \ |
593 |
- $(use_enable static static-cons) \ |
594 |
- $(use_enable static static-fd)" |
595 |
- fi |
596 |
- |
597 |
- # do not build bat and traymonitor if 'static' clientonly |
598 |
- if ! use clientonly || ! use static; then |
599 |
- myconf="${myconf} \ |
600 |
- $(use_enable qt4 bat) \ |
601 |
- $(use_enable qt4 traymonitor)" |
602 |
- fi |
603 |
- |
604 |
- myconf="${myconf} \ |
605 |
- $(use_with X x) \ |
606 |
- $(use_enable acl) \ |
607 |
- $(use_enable ipv6) \ |
608 |
- $(use_enable ndmp) \ |
609 |
- $(use_enable readline) \ |
610 |
- $(use_enable !readline conio) \ |
611 |
- $(use_enable scsi-crypto) \ |
612 |
- $(use_enable sql-pooling) \ |
613 |
- $(use_with fastlz) \ |
614 |
- $(use_with mysql) \ |
615 |
- $(use_with postgres postgresql) \ |
616 |
- $(use_with python) \ |
617 |
- $(use_with readline) \ |
618 |
- $(use_with sqlite sqlite3) \ |
619 |
- $(use sqlite || echo "--without-sqlite3") \ |
620 |
- $(use_with ssl openssl) \ |
621 |
- $(use_with tcpd tcp-wrappers) \ |
622 |
- $(use_enable lmdb) \ |
623 |
- $(use_with glusterfs) \ |
624 |
- $(use_with rados) \ |
625 |
- $(use_with cephfs) \ |
626 |
- " |
627 |
- |
628 |
- econf \ |
629 |
- --libdir=/usr/$(get_libdir) \ |
630 |
- --docdir=/usr/share/doc/${PF} \ |
631 |
- --htmldir=/usr/share/doc/${PF}/html \ |
632 |
- --with-pid-dir=/run/bareos \ |
633 |
- --sysconfdir=/etc/bareos \ |
634 |
- --with-subsys-dir=/run/lock/subsys \ |
635 |
- --with-working-dir=/var/lib/bareos \ |
636 |
- --with-logdir=/var/log/bareos \ |
637 |
- --with-scriptdir=/usr/libexec/bareos \ |
638 |
- --with-plugindir=/usr/$(get_libdir)/${PN}/plugin \ |
639 |
- --with-backenddir=/usr/$(get_libdir)/${PN}/backend \ |
640 |
- --with-dir-user=bareos \ |
641 |
- --with-dir-group=bareos \ |
642 |
- --with-sd-user=root \ |
643 |
- --with-sd-group=bareos \ |
644 |
- --with-fd-user=root \ |
645 |
- --with-fd-group=bareos \ |
646 |
- --with-sbin-perm=0755 \ |
647 |
- --with-systemd \ |
648 |
- --enable-smartalloc \ |
649 |
- --enable-dynamic-cats-backends \ |
650 |
- --enable-dynamic-storage-backends \ |
651 |
- --enable-batch-insert \ |
652 |
- --disable-afs \ |
653 |
- --host=${CHOST} \ |
654 |
- ${myconf} |
655 |
- # correct configuration for QT based bat |
656 |
- if use qt4 ; then |
657 |
- pushd src/qt-console |
658 |
- eqmake4 |
659 |
- popd |
660 |
- pushd src/qt-tray-monitor |
661 |
- eqmake4 |
662 |
- popd |
663 |
- fi |
664 |
-} |
665 |
- |
666 |
-src_compile() { |
667 |
- # workaround for build failing with high -j values |
668 |
- # if ndmp is enabled |
669 |
- use ndmp && MAKEOPTS="$MAKEOPTS -j1" |
670 |
- |
671 |
- # Make build log verbose (bug #447806) |
672 |
- emake NO_ECHO="" |
673 |
-} |
674 |
- |
675 |
-src_install() { |
676 |
- emake DESTDIR="${D}" install |
677 |
- doicon scripts/bareos.png |
678 |
- |
679 |
- # install bat icon and desktop file when enabled |
680 |
- # (for some reason ./configure doesn't pick this up) |
681 |
- if use qt4 && ! use static ; then |
682 |
- doicon src/images/bat.png |
683 |
- domenu scripts/bat.desktop |
684 |
- fi |
685 |
- |
686 |
- # remove some scripts we don't need at all |
687 |
- rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql} |
688 |
- rm -f "${D}"/usr/sbin/bareos |
689 |
- |
690 |
- # remove upstream init scripts |
691 |
- rm -f "${D}"/etc/init.d/bareos-* |
692 |
- |
693 |
- # rename statically linked apps |
694 |
- if use clientonly && use static ; then |
695 |
- pushd "${D}"/usr/sbin || die |
696 |
- mv static-bareos-fd bareos-fd || die |
697 |
- mv static-bconsole bconsole || die |
698 |
- popd || die |
699 |
- fi |
700 |
- |
701 |
- # extra files which 'make install' doesn't cover |
702 |
- if ! use clientonly; then |
703 |
- # the logrotate configuration |
704 |
- # (now unconditional wrt bug #258187) |
705 |
- diropts -m0755 |
706 |
- insinto /etc/logrotate.d |
707 |
- insopts -m0644 |
708 |
- newins "${S}"/scripts/logrotate bareos |
709 |
- |
710 |
- # the logwatch scripts |
711 |
- if use logwatch; then |
712 |
- diropts -m0750 |
713 |
- dodir /etc/log.d/scripts/services |
714 |
- dodir /etc/log.d/scripts/shared |
715 |
- dodir /etc/log.d/conf/logfiles |
716 |
- dodir /etc/log.d/conf/services |
717 |
- pushd "${S}"/scripts/logwatch >&/dev/null || die |
718 |
- emake DESTDIR="${D}" install |
719 |
- popd >&/dev/null || die |
720 |
- fi |
721 |
- fi |
722 |
- |
723 |
- rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* |
724 |
- if ! use qt4; then |
725 |
- rm -vf "${D}"/usr/share/man/man1/bat.1* |
726 |
- fi |
727 |
- if use clientonly || ! use director; then |
728 |
- rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* |
729 |
- rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* |
730 |
- rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
731 |
- rm -vf "${D}"/usr/share/man/man8/bwild.8* |
732 |
- rm -vf "${D}"/usr/share/man/man8/bregex.8* |
733 |
- rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* |
734 |
- rm -vf "${D}"/usr/libexec/bareos/create_*_database |
735 |
- rm -vf "${D}"/usr/libexec/bareos/drop_*_database |
736 |
- rm -vf "${D}"/usr/libexec/bareos/make_*_tables |
737 |
- rm -vf "${D}"/usr/libexec/bareos/update_*_tables |
738 |
- rm -vf "${D}"/usr/libexec/bareos/drop_*_tables |
739 |
- rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges |
740 |
- rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup |
741 |
- fi |
742 |
- if use clientonly || ! use storage-daemon; then |
743 |
- rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* |
744 |
- rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
745 |
- rm -vf "${D}"/usr/share/man/man8/bextract.8* |
746 |
- rm -vf "${D}"/usr/share/man/man8/bls.8* |
747 |
- rm -vf "${D}"/usr/share/man/man8/bscan.8* |
748 |
- rm -vf "${D}"/usr/share/man/man8/btape.8* |
749 |
- rm -vf "${D}"/usr/libexec/bareos/disk-changer |
750 |
- rm -vf "${D}"/usr/libexec/bareos/mtx-changer |
751 |
- rm -vf "${D}"/usr/libexec/bareos/dvd-handler |
752 |
- rm -vf "${D}"/etc/bareos/mtx-changer.conf |
753 |
- fi |
754 |
- if ! use scsi-crypto; then |
755 |
- rm -vf "${D}"/usr/share/man/man8/bscrypto.8* |
756 |
- fi |
757 |
- if ! use qt4; then |
758 |
- rm -vf "${D}"/usr/share/man/man1/bareos-tray-monitor.1* |
759 |
- fi |
760 |
- |
761 |
- # documentation |
762 |
- dodoc README.md |
763 |
- use ndmp && dodoc README.NDMP |
764 |
- use scsi-crypto && dodoc README.scsicrypto |
765 |
- |
766 |
- # vim-files |
767 |
- if use vim-syntax; then |
768 |
- insinto /usr/share/vim/vimfiles/syntax |
769 |
- doins scripts/bareos.vim |
770 |
- insinto /usr/share/vim/vimfiles/ftdetect |
771 |
- newins scripts/filetype.vim bareos_ft.vim |
772 |
- fi |
773 |
- |
774 |
- # setup init scripts |
775 |
- myscripts="bareos-fd" |
776 |
- if ! use clientonly; then |
777 |
- if use director; then |
778 |
- myscripts="${myscripts} bareos-dir" |
779 |
- fi |
780 |
- if use storage-daemon; then |
781 |
- myscripts="${myscripts} bareos-sd" |
782 |
- fi |
783 |
- fi |
784 |
- for script in ${myscripts}; do |
785 |
- # copy over init script and config to a temporary location |
786 |
- # so we can modify them as needed |
787 |
- cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" |
788 |
- cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
789 |
- |
790 |
- # now set the database dependency for the director init script |
791 |
- case "${script}" in |
792 |
- bareos-dir) |
793 |
- sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die |
794 |
- ;; |
795 |
- *) |
796 |
- ;; |
797 |
- esac |
798 |
- |
799 |
- # install init script and config |
800 |
- newinitd "${T}/${script}".initd "${script}" |
801 |
- newconfd "${T}/${script}".confd "${script}" |
802 |
- done |
803 |
- |
804 |
- # make sure the working directory exists |
805 |
- diropts -m0750 |
806 |
- keepdir /var/lib/bareos |
807 |
- |
808 |
- # make sure bareos group can execute bareos libexec scripts |
809 |
- fowners -R root:bareos /usr/libexec/bareos |
810 |
-} |
811 |
- |
812 |
-pkg_postinst() { |
813 |
- if use clientonly; then |
814 |
- fowners root:bareos /var/lib/bareos |
815 |
- else |
816 |
- fowners bareos:bareos /var/lib/bareos |
817 |
- fi |
818 |
- |
819 |
- if ! use clientonly && use director; then |
820 |
- einfo |
821 |
- einfo "If this is a new install, you must create the databases with:" |
822 |
- if use postgres; then |
823 |
- einfo |
824 |
- einfo "For postgresql:" |
825 |
- einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" |
826 |
- einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" |
827 |
- einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" |
828 |
- fi |
829 |
- if use mysql; then |
830 |
- einfo |
831 |
- einfo "For mysql:" |
832 |
- einfo |
833 |
- einfo " Make sure root has direct access to your mysql server. You may want to" |
834 |
- einfo " create a /root/.my.cnf file with" |
835 |
- einfo " [client]" |
836 |
- einfo " user=root" |
837 |
- einfo " password=YourPasswordForAccessingMysqlAsRoot" |
838 |
- einfo " before running:" |
839 |
- einfo " /usr/libexec/bareos/create_bareos_database mysql" |
840 |
- einfo " /usr/libexec/bareos/make_bareos_tables mysql" |
841 |
- einfo " /usr/libexec/bareos/grant_bareos_privileges mysql" |
842 |
- fi |
843 |
- einfo |
844 |
- fi |
845 |
- |
846 |
- if use sqlite; then |
847 |
- einfo |
848 |
- einfo "Be aware that Bareos does not officially support SQLite database." |
849 |
- einfo "Best use it only for a client-only installation. See Bug #445540." |
850 |
- einfo |
851 |
- einfo "It is strongly recommended to use either postgresql or mysql as" |
852 |
- einfo "catalog database backend." |
853 |
- einfo |
854 |
- fi |
855 |
- |
856 |
- einfo "Please note that 'bconsole' will always be installed. To compile 'bat'" |
857 |
- einfo "you have to enable 'USE=qt4'." |
858 |
- einfo |
859 |
-} |
860 |
|
861 |
diff --git a/app-backup/bareos/bareos-14.2.5.ebuild b/app-backup/bareos/bareos-14.2.5.ebuild |
862 |
deleted file mode 100644 |
863 |
index e9e440269f5..00000000000 |
864 |
--- a/app-backup/bareos/bareos-14.2.5.ebuild |
865 |
+++ /dev/null |
866 |
@@ -1,414 +0,0 @@ |
867 |
-# Copyright 1999-2016 Gentoo Foundation |
868 |
-# Distributed under the terms of the GNU General Public License v2 |
869 |
- |
870 |
-EAPI="5" |
871 |
- |
872 |
-PYTHON_COMPAT=( python2_7 ) |
873 |
-PYTHON_REQ_USE="threads" |
874 |
- |
875 |
-inherit eutils multilib python-single-r1 qt4-r2 user |
876 |
- |
877 |
-DESCRIPTION="Featureful client/server network backup suite" |
878 |
-HOMEPAGE="http://www.bareos.org/" |
879 |
-SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" |
880 |
-RESTRICT="mirror" |
881 |
- |
882 |
-LICENSE="AGPL-3" |
883 |
-SLOT="0" |
884 |
-KEYWORDS="~amd64 ~x86" |
885 |
-IUSE="acl clientonly +director fastlz ipv6 libressl logwatch mysql ndmp postgres |
886 |
- python qt4 readline scsi-crypto sql-pooling +sqlite ssl static +storage-daemon |
887 |
- tcpd vim-syntax X cephfs glusterfs lmdb rados" |
888 |
- |
889 |
-DEPEND=" |
890 |
- !app-backup/bacula |
891 |
- cephfs? ( sys-cluster/ceph ) |
892 |
- rados? ( sys-cluster/ceph ) |
893 |
- glusterfs? ( sys-cluster/glusterfs ) |
894 |
- lmdb? ( dev-db/lmdb ) |
895 |
- dev-libs/gmp:0 |
896 |
- !clientonly? ( |
897 |
- postgres? ( dev-db/postgresql:*[threads] ) |
898 |
- mysql? ( virtual/mysql ) |
899 |
- sqlite? ( dev-db/sqlite:3 ) |
900 |
- director? ( virtual/mta ) |
901 |
- ) |
902 |
- qt4? ( |
903 |
- dev-qt/qtsvg:4 |
904 |
- x11-libs/qwt:5 |
905 |
- ) |
906 |
- fastlz? ( dev-libs/bareos-fastlzlib ) |
907 |
- logwatch? ( sys-apps/logwatch ) |
908 |
- tcpd? ( sys-apps/tcp-wrappers ) |
909 |
- readline? ( sys-libs/readline:0 ) |
910 |
- static? ( |
911 |
- acl? ( virtual/acl[static-libs] ) |
912 |
- sys-libs/zlib[static-libs] |
913 |
- dev-libs/lzo[static-libs] |
914 |
- sys-libs/ncurses:=[static-libs] |
915 |
- ssl? ( |
916 |
- !libressl? ( dev-libs/openssl:0=[static-libs] ) |
917 |
- libressl? ( dev-libs/libressl:0=[static-libs] ) |
918 |
- ) |
919 |
- ) |
920 |
- !static? ( |
921 |
- acl? ( virtual/acl ) |
922 |
- dev-libs/lzo |
923 |
- ssl? ( |
924 |
- !libressl? ( dev-libs/openssl:0= ) |
925 |
- libressl? ( dev-libs/libressl:0= ) |
926 |
- ) |
927 |
- sys-libs/ncurses:= |
928 |
- sys-libs/zlib |
929 |
- ) |
930 |
- python? ( ${PYTHON_DEPS} ) |
931 |
- " |
932 |
-RDEPEND="${DEPEND} |
933 |
- !clientonly? ( |
934 |
- storage-daemon? ( |
935 |
- sys-block/mtx |
936 |
- app-arch/mt-st |
937 |
- ) |
938 |
- ) |
939 |
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
940 |
- |
941 |
-REQUIRED_USE="static? ( clientonly ) |
942 |
- python? ( ${PYTHON_REQUIRED_USE} )" |
943 |
- |
944 |
-S=${WORKDIR}/${PN}-Release-${PV} |
945 |
- |
946 |
-pkg_setup() { |
947 |
- use mysql && export mydbtypes+="mysql" |
948 |
- use postgres && export mydbtypes+=" postgresql" |
949 |
- use sqlite && export mydbtypes+=" sqlite" |
950 |
- |
951 |
- # create the daemon group and user |
952 |
- if [ -z "$(egetent group bareos 2>/dev/null)" ]; then |
953 |
- enewgroup bareos |
954 |
- einfo |
955 |
- einfo "The group 'bareos' has been created. Any users you add to this" |
956 |
- einfo "group have access to files created by the daemons." |
957 |
- einfo |
958 |
- fi |
959 |
- |
960 |
- if use clientonly && use static && use qt4; then |
961 |
- ewarn |
962 |
- ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag." |
963 |
- ewarn |
964 |
- fi |
965 |
- |
966 |
- if ! use clientonly; then |
967 |
- if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then |
968 |
- enewuser bareos -1 -1 /var/lib/bareos bareos,disk,tape,cdrom,cdrw |
969 |
- einfo |
970 |
- einfo "The user 'bareos' has been created. Please see the bareos manual" |
971 |
- einfo "for information about running bareos as a non-root user." |
972 |
- einfo |
973 |
- fi |
974 |
- fi |
975 |
- |
976 |
- use python && python-single-r1_pkg_setup |
977 |
-} |
978 |
- |
979 |
-src_prepare() { |
980 |
- # adjusts default configuration files for several binaries |
981 |
- # to /etc/bareos/<config> instead of ./<config> |
982 |
- pushd src >&/dev/null || die |
983 |
- for f in console/console.c dird/dird.c filed/filed.c \ |
984 |
- stored/bcopy.c stored/bextract.c stored/bls.c \ |
985 |
- stored/bscan.c stored/btape.c stored/stored.c \ |
986 |
- qt-console/main.cpp; do |
987 |
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \ |
988 |
- || die "sed on ${f} failed" |
989 |
- done |
990 |
- popd >&/dev/null || die |
991 |
- |
992 |
- # bug 466690 Use CXXFLAGS instead of CFLAGS |
993 |
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die |
994 |
- |
995 |
- # stop build for errors in subdirs |
996 |
- epatch "${FILESDIR}"/${PN}-12.4.5-Makefile.patch |
997 |
- |
998 |
- # bat needs to respect LDFLAGS |
999 |
- epatch "${FILESDIR}"/${PN}-12.4.5-bat-ldflags.patch |
1000 |
- |
1001 |
- # do not strip binaries |
1002 |
- for d in filed console dird stored; do |
1003 |
- sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die |
1004 |
- done |
1005 |
-} |
1006 |
- |
1007 |
-src_configure() { |
1008 |
- local myconf='' |
1009 |
- |
1010 |
- if use clientonly; then |
1011 |
- myconf="${myconf} \ |
1012 |
- $(use_enable clientonly client-only) \ |
1013 |
- $(use_enable !static libtool) \ |
1014 |
- $(use_enable static static-cons) \ |
1015 |
- $(use_enable static static-fd)" |
1016 |
- fi |
1017 |
- |
1018 |
- # do not build bat and traymonitor if 'static' clientonly |
1019 |
- if ! use clientonly || ! use static; then |
1020 |
- myconf="${myconf} \ |
1021 |
- $(use_enable qt4 bat) \ |
1022 |
- $(use_enable qt4 traymonitor)" |
1023 |
- fi |
1024 |
- |
1025 |
- myconf="${myconf} \ |
1026 |
- $(use_with X x) \ |
1027 |
- $(use_enable acl) \ |
1028 |
- $(use_enable ipv6) \ |
1029 |
- $(use_enable ndmp) \ |
1030 |
- $(use_enable readline) \ |
1031 |
- $(use_enable !readline conio) \ |
1032 |
- $(use_enable scsi-crypto) \ |
1033 |
- $(use_enable sql-pooling) \ |
1034 |
- $(use_with fastlz) \ |
1035 |
- $(use_with mysql) \ |
1036 |
- $(use_with postgres postgresql) \ |
1037 |
- $(use_with python) \ |
1038 |
- $(use_with readline) \ |
1039 |
- $(use_with sqlite sqlite3) \ |
1040 |
- $(use sqlite || echo "--without-sqlite3") \ |
1041 |
- $(use_with ssl openssl) \ |
1042 |
- $(use_with tcpd tcp-wrappers) \ |
1043 |
- $(use_enable lmdb) \ |
1044 |
- $(use_with glusterfs) \ |
1045 |
- $(use_with rados) \ |
1046 |
- $(use_with cephfs) \ |
1047 |
- " |
1048 |
- |
1049 |
- econf \ |
1050 |
- --libdir=/usr/$(get_libdir) \ |
1051 |
- --docdir=/usr/share/doc/${PF} \ |
1052 |
- --htmldir=/usr/share/doc/${PF}/html \ |
1053 |
- --with-pid-dir=/run/bareos \ |
1054 |
- --sysconfdir=/etc/bareos \ |
1055 |
- --with-subsys-dir=/run/lock/subsys \ |
1056 |
- --with-working-dir=/var/lib/bareos \ |
1057 |
- --with-logdir=/var/log/bareos \ |
1058 |
- --with-scriptdir=/usr/libexec/bareos \ |
1059 |
- --with-plugindir=/usr/$(get_libdir)/${PN}/plugin \ |
1060 |
- --with-backenddir=/usr/$(get_libdir)/${PN}/backend \ |
1061 |
- --with-dir-user=bareos \ |
1062 |
- --with-dir-group=bareos \ |
1063 |
- --with-sd-user=root \ |
1064 |
- --with-sd-group=bareos \ |
1065 |
- --with-fd-user=root \ |
1066 |
- --with-fd-group=bareos \ |
1067 |
- --with-sbin-perm=0755 \ |
1068 |
- --with-systemd \ |
1069 |
- --enable-smartalloc \ |
1070 |
- --enable-dynamic-cats-backends \ |
1071 |
- --enable-dynamic-storage-backends \ |
1072 |
- --enable-batch-insert \ |
1073 |
- --disable-afs \ |
1074 |
- --host=${CHOST} \ |
1075 |
- ${myconf} |
1076 |
- # correct configuration for QT based bat |
1077 |
- if use qt4 ; then |
1078 |
- pushd src/qt-console |
1079 |
- eqmake4 |
1080 |
- popd |
1081 |
- pushd src/qt-tray-monitor |
1082 |
- eqmake4 |
1083 |
- popd |
1084 |
- fi |
1085 |
-} |
1086 |
- |
1087 |
-src_compile() { |
1088 |
- # workaround for build failing with high -j values |
1089 |
- # if ndmp is enabled |
1090 |
- use ndmp && MAKEOPTS="$MAKEOPTS -j1" |
1091 |
- |
1092 |
- # Make build log verbose (bug #447806) |
1093 |
- emake NO_ECHO="" |
1094 |
-} |
1095 |
- |
1096 |
-src_install() { |
1097 |
- emake DESTDIR="${D}" install |
1098 |
- doicon scripts/bareos.png |
1099 |
- |
1100 |
- # install bat icon and desktop file when enabled |
1101 |
- # (for some reason ./configure doesn't pick this up) |
1102 |
- if use qt4 && ! use static ; then |
1103 |
- doicon src/images/bat.png |
1104 |
- domenu scripts/bat.desktop |
1105 |
- fi |
1106 |
- |
1107 |
- # remove some scripts we don't need at all |
1108 |
- rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql} |
1109 |
- rm -f "${D}"/usr/sbin/bareos |
1110 |
- |
1111 |
- # remove upstream init scripts |
1112 |
- rm -f "${D}"/etc/init.d/bareos-* |
1113 |
- |
1114 |
- # rename statically linked apps |
1115 |
- if use clientonly && use static ; then |
1116 |
- pushd "${D}"/usr/sbin || die |
1117 |
- mv static-bareos-fd bareos-fd || die |
1118 |
- mv static-bconsole bconsole || die |
1119 |
- popd || die |
1120 |
- fi |
1121 |
- |
1122 |
- # extra files which 'make install' doesn't cover |
1123 |
- if ! use clientonly; then |
1124 |
- # the logrotate configuration |
1125 |
- # (now unconditional wrt bug #258187) |
1126 |
- diropts -m0755 |
1127 |
- insinto /etc/logrotate.d |
1128 |
- insopts -m0644 |
1129 |
- newins "${S}"/scripts/logrotate bareos |
1130 |
- |
1131 |
- # the logwatch scripts |
1132 |
- if use logwatch; then |
1133 |
- diropts -m0750 |
1134 |
- dodir /etc/log.d/scripts/services |
1135 |
- dodir /etc/log.d/scripts/shared |
1136 |
- dodir /etc/log.d/conf/logfiles |
1137 |
- dodir /etc/log.d/conf/services |
1138 |
- pushd "${S}"/scripts/logwatch >&/dev/null || die |
1139 |
- emake DESTDIR="${D}" install |
1140 |
- popd >&/dev/null || die |
1141 |
- fi |
1142 |
- fi |
1143 |
- |
1144 |
- rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* |
1145 |
- if ! use qt4; then |
1146 |
- rm -vf "${D}"/usr/share/man/man1/bat.1* |
1147 |
- fi |
1148 |
- if use clientonly || ! use director; then |
1149 |
- rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* |
1150 |
- rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* |
1151 |
- rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
1152 |
- rm -vf "${D}"/usr/share/man/man8/bwild.8* |
1153 |
- rm -vf "${D}"/usr/share/man/man8/bregex.8* |
1154 |
- rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* |
1155 |
- rm -vf "${D}"/usr/libexec/bareos/create_*_database |
1156 |
- rm -vf "${D}"/usr/libexec/bareos/drop_*_database |
1157 |
- rm -vf "${D}"/usr/libexec/bareos/make_*_tables |
1158 |
- rm -vf "${D}"/usr/libexec/bareos/update_*_tables |
1159 |
- rm -vf "${D}"/usr/libexec/bareos/drop_*_tables |
1160 |
- rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges |
1161 |
- rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup |
1162 |
- fi |
1163 |
- if use clientonly || ! use storage-daemon; then |
1164 |
- rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* |
1165 |
- rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
1166 |
- rm -vf "${D}"/usr/share/man/man8/bextract.8* |
1167 |
- rm -vf "${D}"/usr/share/man/man8/bls.8* |
1168 |
- rm -vf "${D}"/usr/share/man/man8/bscan.8* |
1169 |
- rm -vf "${D}"/usr/share/man/man8/btape.8* |
1170 |
- rm -vf "${D}"/usr/libexec/bareos/disk-changer |
1171 |
- rm -vf "${D}"/usr/libexec/bareos/mtx-changer |
1172 |
- rm -vf "${D}"/usr/libexec/bareos/dvd-handler |
1173 |
- rm -vf "${D}"/etc/bareos/mtx-changer.conf |
1174 |
- fi |
1175 |
- if ! use scsi-crypto; then |
1176 |
- rm -vf "${D}"/usr/share/man/man8/bscrypto.8* |
1177 |
- fi |
1178 |
- if ! use qt4; then |
1179 |
- rm -vf "${D}"/usr/share/man/man1/bareos-tray-monitor.1* |
1180 |
- fi |
1181 |
- |
1182 |
- # documentation |
1183 |
- dodoc README.md |
1184 |
- use ndmp && dodoc README.NDMP |
1185 |
- use scsi-crypto && dodoc README.scsicrypto |
1186 |
- |
1187 |
- # vim-files |
1188 |
- if use vim-syntax; then |
1189 |
- insinto /usr/share/vim/vimfiles/syntax |
1190 |
- doins scripts/bareos.vim |
1191 |
- insinto /usr/share/vim/vimfiles/ftdetect |
1192 |
- newins scripts/filetype.vim bareos_ft.vim |
1193 |
- fi |
1194 |
- |
1195 |
- # setup init scripts |
1196 |
- myscripts="bareos-fd" |
1197 |
- if ! use clientonly; then |
1198 |
- if use director; then |
1199 |
- myscripts="${myscripts} bareos-dir" |
1200 |
- fi |
1201 |
- if use storage-daemon; then |
1202 |
- myscripts="${myscripts} bareos-sd" |
1203 |
- fi |
1204 |
- fi |
1205 |
- for script in ${myscripts}; do |
1206 |
- # copy over init script and config to a temporary location |
1207 |
- # so we can modify them as needed |
1208 |
- cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" |
1209 |
- cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
1210 |
- |
1211 |
- # now set the database dependency for the director init script |
1212 |
- case "${script}" in |
1213 |
- bareos-dir) |
1214 |
- sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die |
1215 |
- ;; |
1216 |
- *) |
1217 |
- ;; |
1218 |
- esac |
1219 |
- |
1220 |
- # install init script and config |
1221 |
- newinitd "${T}/${script}".initd "${script}" |
1222 |
- newconfd "${T}/${script}".confd "${script}" |
1223 |
- done |
1224 |
- |
1225 |
- # make sure the working directory exists |
1226 |
- diropts -m0750 |
1227 |
- keepdir /var/lib/bareos |
1228 |
- |
1229 |
- # make sure bareos group can execute bareos libexec scripts |
1230 |
- fowners -R root:bareos /usr/libexec/bareos |
1231 |
-} |
1232 |
- |
1233 |
-pkg_postinst() { |
1234 |
- if use clientonly; then |
1235 |
- fowners root:bareos /var/lib/bareos |
1236 |
- else |
1237 |
- fowners bareos:bareos /var/lib/bareos |
1238 |
- fi |
1239 |
- |
1240 |
- if ! use clientonly && use director; then |
1241 |
- einfo |
1242 |
- einfo "If this is a new install, you must create the databases with:" |
1243 |
- if use postgres; then |
1244 |
- einfo |
1245 |
- einfo "For postgresql:" |
1246 |
- einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" |
1247 |
- einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" |
1248 |
- einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" |
1249 |
- fi |
1250 |
- if use mysql; then |
1251 |
- einfo |
1252 |
- einfo "For mysql:" |
1253 |
- einfo |
1254 |
- einfo " Make sure root has direct access to your mysql server. You may want to" |
1255 |
- einfo " create a /root/.my.cnf file with" |
1256 |
- einfo " [client]" |
1257 |
- einfo " user=root" |
1258 |
- einfo " password=YourPasswordForAccessingMysqlAsRoot" |
1259 |
- einfo " before running:" |
1260 |
- einfo " /usr/libexec/bareos/create_bareos_database mysql" |
1261 |
- einfo " /usr/libexec/bareos/make_bareos_tables mysql" |
1262 |
- einfo " /usr/libexec/bareos/grant_bareos_privileges mysql" |
1263 |
- fi |
1264 |
- einfo |
1265 |
- fi |
1266 |
- |
1267 |
- if use sqlite; then |
1268 |
- einfo |
1269 |
- einfo "Be aware that Bareos does not officially support SQLite database." |
1270 |
- einfo "Best use it only for a client-only installation. See Bug #445540." |
1271 |
- einfo |
1272 |
- einfo "It is strongly recommended to use either postgresql or mysql as" |
1273 |
- einfo "catalog database backend." |
1274 |
- einfo |
1275 |
- fi |
1276 |
- |
1277 |
- einfo "Please note that 'bconsole' will always be installed. To compile 'bat'" |
1278 |
- einfo "you have to enable 'USE=qt4'." |
1279 |
- einfo |
1280 |
-} |