1 |
commit: ac9a37fdb8956439ecd00c68090e778c26904fbe |
2 |
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 30 13:53:03 2018 +0000 |
4 |
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 30 13:53:31 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac9a37fd |
7 |
|
8 |
app-backup/bareos: Add new version 17.2.7 |
9 |
|
10 |
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.49, Repoman-2.3.10 |
12 |
|
13 |
app-backup/bareos/Manifest | 1 + |
14 |
app-backup/bareos/bareos-17.2.7.ebuild | 388 +++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 389 insertions(+) |
16 |
|
17 |
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest |
18 |
index 5943022b495..74dba976b02 100644 |
19 |
--- a/app-backup/bareos/Manifest |
20 |
+++ b/app-backup/bareos/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST bareos-16.2.7.tar.gz 4282998 BLAKE2B 9101a49d1178e0bcc4843cc4472a2082827a7bd7595389c0fa3699d36651ca70fce674509eeaddc8f806a5df1dba6afc89c05be183e7561e013d23bd157ef294 SHA512 028f38dd77fed5e3af6ee50aa44cb2f82349bd38e40eadebc552a95100166291ae0c68073daa2513919da330c66bb54a3050f1d99cbf3b5354f2450a789f6c00 |
23 |
DIST bareos-17.2.6.tar.gz 4181984 BLAKE2B a1666b38626228ebf00f6a42f1a5b74c78c26a7178fa5333c9c8fb24ccfda146d20c35d35cbe43b6f53ba1b0ce1dd9b8ad30309997689c39493b51a0db9f5c9b SHA512 5f5ac8cfe028c97fa3120e149f1eb029406b74530517bf6e21574bd726e26c6b78740977635b45cbc2232fda0ee28f1b4338d91a8fa0a86ba05209cce82cd0b2 |
24 |
+DIST bareos-17.2.7.tar.gz 4184028 BLAKE2B dc817ca3b21ea13d9dbd1e3c5691e09bc3adff535e0032e1fbcfff8d07b96b2bf21976f020d778dd16137e51283c2a3dcab78dbe28f7fb6f3a60d43938f6b770 SHA512 254eddacb067ef7e82b7a54bdfcbffd5cfa033fa045f697c7e5b5c28dd064b5e1ce9f6aa946282c60f59972beae0b1b7901882b77c3f71cf16efdd73934135cc |
25 |
|
26 |
diff --git a/app-backup/bareos/bareos-17.2.7.ebuild b/app-backup/bareos/bareos-17.2.7.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..25469bc0f10 |
29 |
--- /dev/null |
30 |
+++ b/app-backup/bareos/bareos-17.2.7.ebuild |
31 |
@@ -0,0 +1,388 @@ |
32 |
+# Copyright 1999-2018 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI="6" |
36 |
+ |
37 |
+PYTHON_COMPAT=( python2_7 ) |
38 |
+PYTHON_REQ_USE="threads" |
39 |
+ |
40 |
+inherit eutils multilib python-single-r1 systemd user |
41 |
+ |
42 |
+DESCRIPTION="Featureful client/server network backup suite" |
43 |
+HOMEPAGE="http://www.bareos.org/" |
44 |
+SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" |
45 |
+RESTRICT="mirror" |
46 |
+ |
47 |
+LICENSE="AGPL-3" |
48 |
+SLOT="0" |
49 |
+KEYWORDS="~amd64 ~x86" |
50 |
+IUSE="X acl cephfs clientonly +director fastlz glusterfs gnutls ipv6 jansson lmdb libressl |
51 |
+ logwatch mysql ndmp +postgres python rados rados-striper readline scsi-crypto |
52 |
+ sql-pooling sqlite ssl static +storage-daemon tcpd vim-syntax" |
53 |
+REQUIRED_USE="!clientonly? ( || ( mysql postgres sqlite ) )" |
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 |
+ fastlz? ( dev-libs/bareos-fastlzlib ) |
73 |
+ logwatch? ( sys-apps/logwatch ) |
74 |
+ tcpd? ( sys-apps/tcp-wrappers ) |
75 |
+ readline? ( sys-libs/readline:0 ) |
76 |
+ static? ( |
77 |
+ acl? ( virtual/acl[static-libs] ) |
78 |
+ sys-libs/zlib[static-libs] |
79 |
+ dev-libs/lzo[static-libs] |
80 |
+ sys-libs/ncurses:=[static-libs] |
81 |
+ ssl? ( |
82 |
+ !gnutls? ( |
83 |
+ !libressl? ( dev-libs/openssl:0=[static-libs] ) |
84 |
+ libressl? ( dev-libs/libressl:0=[static-libs] ) |
85 |
+ ) |
86 |
+ gnutls? ( net-libs/gnutls[static-libs] ) |
87 |
+ ) |
88 |
+ ) |
89 |
+ !static? ( |
90 |
+ acl? ( virtual/acl ) |
91 |
+ dev-libs/lzo |
92 |
+ ssl? ( |
93 |
+ !gnutls? ( |
94 |
+ !libressl? ( dev-libs/openssl:0= ) |
95 |
+ libressl? ( dev-libs/libressl:0= ) |
96 |
+ ) |
97 |
+ gnutls? ( net-libs/gnutls ) |
98 |
+ ) |
99 |
+ sys-libs/ncurses:= |
100 |
+ sys-libs/zlib |
101 |
+ ) |
102 |
+ python? ( ${PYTHON_DEPS} ) |
103 |
+ " |
104 |
+RDEPEND="${DEPEND} |
105 |
+ !clientonly? ( |
106 |
+ storage-daemon? ( |
107 |
+ sys-block/mtx |
108 |
+ app-arch/mt-st |
109 |
+ ) |
110 |
+ ) |
111 |
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
112 |
+ |
113 |
+REQUIRED_USE="static? ( clientonly ) |
114 |
+ python? ( ${PYTHON_REQUIRED_USE} )" |
115 |
+ |
116 |
+S=${WORKDIR}/${PN}-Release-${PV} |
117 |
+ |
118 |
+pkg_setup() { |
119 |
+ use mysql && export mydbtypes+="mysql" |
120 |
+ use postgres && export mydbtypes+=" postgresql" |
121 |
+ use sqlite && export mydbtypes+=" sqlite" |
122 |
+ |
123 |
+ # create the daemon group and user |
124 |
+ if [ -z "$(egetent group bareos 2>/dev/null)" ]; then |
125 |
+ enewgroup bareos |
126 |
+ einfo |
127 |
+ einfo "The group 'bareos' has been created. Any users you add to this" |
128 |
+ einfo "group have access to files created by the daemons." |
129 |
+ einfo |
130 |
+ fi |
131 |
+ |
132 |
+ if ! use clientonly; then |
133 |
+ if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then |
134 |
+ enewuser bareos -1 -1 /var/lib/bareos bareos,disk,tape,cdrom,cdrw |
135 |
+ einfo |
136 |
+ einfo "The user 'bareos' has been created. Please see the bareos manual" |
137 |
+ einfo "for information about running bareos as a non-root user." |
138 |
+ einfo |
139 |
+ fi |
140 |
+ fi |
141 |
+ |
142 |
+ use python && python-single-r1_pkg_setup |
143 |
+} |
144 |
+ |
145 |
+src_prepare() { |
146 |
+ # adjusts default configuration files for several binaries |
147 |
+ # to /etc/bareos/<config> instead of ./<config> |
148 |
+ pushd src >&/dev/null || die |
149 |
+ for f in console/console.c dird/dird.c filed/filed.c \ |
150 |
+ stored/bcopy.c stored/bextract.c stored/bls.c \ |
151 |
+ stored/bscan.c stored/btape.c stored/stored.c; 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 |
+ # enables default database driver in catalog |
158 |
+ pushd src/defaultconfigs/bareos-dir.d/catalog >&/dev/null || die |
159 |
+ sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE/d' MyCatalog.conf.in \ |
160 |
+ || die "sed on MyCatalog.conf.in failed" |
161 |
+ popd >&/dev/null || die |
162 |
+ |
163 |
+ # bug 466690 Use CXXFLAGS instead of CFLAGS |
164 |
+ sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die |
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 |
+ eapply_user |
172 |
+} |
173 |
+ |
174 |
+src_configure() { |
175 |
+ local myconf='' |
176 |
+ |
177 |
+ addpredict /var/lib/logrotate.status |
178 |
+ |
179 |
+ if use clientonly; then |
180 |
+ myconf="${myconf} \ |
181 |
+ $(use_enable clientonly client-only) \ |
182 |
+ $(use_enable !static libtool) \ |
183 |
+ $(use_enable static static-cons) \ |
184 |
+ $(use_enable static static-fd)" |
185 |
+ fi |
186 |
+ |
187 |
+ myconf="${myconf} \ |
188 |
+ $(use_with X x) \ |
189 |
+ $(use_enable acl) \ |
190 |
+ $(use_enable ipv6) \ |
191 |
+ $(use_enable ndmp) \ |
192 |
+ $(use_enable readline) \ |
193 |
+ $(use_enable !readline conio) \ |
194 |
+ $(use_enable scsi-crypto) \ |
195 |
+ $(use_enable sql-pooling) \ |
196 |
+ $(use_with fastlz) \ |
197 |
+ $(use_with mysql) \ |
198 |
+ $(use_with postgres postgresql) \ |
199 |
+ $(use_with python) \ |
200 |
+ $(use_with readline) \ |
201 |
+ $(use_with sqlite sqlite3) \ |
202 |
+ $(use sqlite || echo "--without-sqlite3") \ |
203 |
+ $(use_with ssl openssl) \ |
204 |
+ $(use_with tcpd tcp-wrappers) \ |
205 |
+ $(use_enable lmdb) \ |
206 |
+ $(use_with glusterfs) \ |
207 |
+ $(use_with rados) \ |
208 |
+ $(use_with rados-striper) \ |
209 |
+ $(use_with cephfs) \ |
210 |
+ $(use_with jansson) \ |
211 |
+ " |
212 |
+ |
213 |
+ econf \ |
214 |
+ --libdir=/usr/$(get_libdir) \ |
215 |
+ --docdir=/usr/share/doc/${PF} \ |
216 |
+ --htmldir=/usr/share/doc/${PF}/html \ |
217 |
+ --with-pid-dir=/run/bareos \ |
218 |
+ --sysconfdir=/etc \ |
219 |
+ --with-subsys-dir=/run/lock/subsys \ |
220 |
+ --with-working-dir=/var/lib/bareos \ |
221 |
+ --with-logdir=/var/log/bareos \ |
222 |
+ --with-scriptdir=/usr/libexec/bareos \ |
223 |
+ --with-plugindir=/usr/$(get_libdir)/${PN}/plugin \ |
224 |
+ --with-backenddir=/usr/$(get_libdir)/${PN}/backend \ |
225 |
+ --with-dir-user=bareos \ |
226 |
+ --with-dir-group=bareos \ |
227 |
+ --with-sd-user=root \ |
228 |
+ --with-sd-group=bareos \ |
229 |
+ --with-fd-user=root \ |
230 |
+ --with-fd-group=bareos \ |
231 |
+ --with-sbin-perm=0755 \ |
232 |
+ --with-systemd \ |
233 |
+ --with-db-password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` \ |
234 |
+ --enable-dynamic-cats-backends \ |
235 |
+ --enable-dynamic-storage-backends \ |
236 |
+ --enable-batch-insert \ |
237 |
+ --disable-afs \ |
238 |
+ --host=${CHOST} \ |
239 |
+ ${myconf} |
240 |
+} |
241 |
+ |
242 |
+src_compile() { |
243 |
+ # Make build log verbose (bug #447806) |
244 |
+ emake NO_ECHO="" |
245 |
+} |
246 |
+ |
247 |
+src_install() { |
248 |
+ emake DESTDIR="${D}" install |
249 |
+ newicon src/images/bareos_logo_shadow.png bareos.png |
250 |
+ |
251 |
+ # remove some scripts we don't need at all |
252 |
+ rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql} |
253 |
+ rm -f "${D}"/usr/sbin/bareos |
254 |
+ |
255 |
+ # remove upstream init scripts |
256 |
+ rm -f "${D}"/etc/init.d/bareos-* |
257 |
+ |
258 |
+ # rename statically linked apps |
259 |
+ if use clientonly && use static ; then |
260 |
+ pushd "${D}"/usr/sbin || die |
261 |
+ mv static-bareos-fd bareos-fd || die |
262 |
+ mv static-bconsole bconsole || die |
263 |
+ popd || die |
264 |
+ fi |
265 |
+ |
266 |
+ # extra files which 'make install' doesn't cover |
267 |
+ if ! use clientonly; then |
268 |
+ # the logrotate configuration |
269 |
+ # (now unconditional wrt bug #258187) |
270 |
+ diropts -m0755 |
271 |
+ insinto /etc/logrotate.d |
272 |
+ insopts -m0644 |
273 |
+ newins "${S}"/scripts/logrotate bareos |
274 |
+ |
275 |
+ # the logwatch scripts |
276 |
+ if use logwatch; then |
277 |
+ diropts -m0750 |
278 |
+ dodir /etc/log.d/scripts/services |
279 |
+ dodir /etc/log.d/scripts/shared |
280 |
+ dodir /etc/log.d/conf/logfiles |
281 |
+ dodir /etc/log.d/conf/services |
282 |
+ pushd "${S}"/scripts/logwatch >&/dev/null || die |
283 |
+ emake DESTDIR="${D}" install |
284 |
+ popd >&/dev/null || die |
285 |
+ fi |
286 |
+ fi |
287 |
+ |
288 |
+ rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* |
289 |
+ if use clientonly || ! use director; then |
290 |
+ rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* |
291 |
+ rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* |
292 |
+ rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
293 |
+ rm -vf "${D}"/usr/share/man/man8/bwild.8* |
294 |
+ rm -vf "${D}"/usr/share/man/man8/bregex.8* |
295 |
+ rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* |
296 |
+ rm -vf "${D}"/usr/libexec/bareos/create_*_database |
297 |
+ rm -vf "${D}"/usr/libexec/bareos/drop_*_database |
298 |
+ rm -vf "${D}"/usr/libexec/bareos/make_*_tables |
299 |
+ rm -vf "${D}"/usr/libexec/bareos/update_*_tables |
300 |
+ rm -vf "${D}"/usr/libexec/bareos/drop_*_tables |
301 |
+ rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges |
302 |
+ rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup |
303 |
+ fi |
304 |
+ if use clientonly || ! use storage-daemon; then |
305 |
+ rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* |
306 |
+ rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
307 |
+ rm -vf "${D}"/usr/share/man/man8/bextract.8* |
308 |
+ rm -vf "${D}"/usr/share/man/man8/bls.8* |
309 |
+ rm -vf "${D}"/usr/share/man/man8/bscan.8* |
310 |
+ rm -vf "${D}"/usr/share/man/man8/btape.8* |
311 |
+ rm -vf "${D}"/usr/libexec/bareos/disk-changer |
312 |
+ rm -vf "${D}"/usr/libexec/bareos/mtx-changer |
313 |
+ rm -vf "${D}"/usr/libexec/bareos/dvd-handler |
314 |
+ rm -vf "${D}"/etc/bareos/mtx-changer.conf |
315 |
+ fi |
316 |
+ if ! use scsi-crypto; then |
317 |
+ rm -vf "${D}"/usr/share/man/man8/bscrypto.8* |
318 |
+ fi |
319 |
+ |
320 |
+ # documentation |
321 |
+ dodoc README.md |
322 |
+ use ndmp && dodoc README.NDMP |
323 |
+ use scsi-crypto && dodoc README.scsicrypto |
324 |
+ |
325 |
+ # vim-files |
326 |
+ if use vim-syntax; then |
327 |
+ insinto /usr/share/vim/vimfiles/syntax |
328 |
+ doins scripts/bareos.vim |
329 |
+ insinto /usr/share/vim/vimfiles/ftdetect |
330 |
+ newins scripts/filetype.vim bareos_ft.vim |
331 |
+ fi |
332 |
+ |
333 |
+ # setup init scripts |
334 |
+ myscripts="bareos-fd" |
335 |
+ if ! use clientonly; then |
336 |
+ if use director; then |
337 |
+ myscripts="${myscripts} bareos-dir" |
338 |
+ fi |
339 |
+ if use storage-daemon; then |
340 |
+ myscripts="${myscripts} bareos-sd" |
341 |
+ fi |
342 |
+ fi |
343 |
+ for script in ${myscripts}; do |
344 |
+ # copy over init script and config to a temporary location |
345 |
+ # so we can modify them as needed |
346 |
+ cp "${FILESDIR}/${script}".confd-16 "${T}/${script}".confd || die "failed to copy ${script}.confd" |
347 |
+ cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
348 |
+ |
349 |
+ # now set the database dependency for the director init script |
350 |
+ case "${script}" in |
351 |
+ bareos-dir) |
352 |
+ sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die |
353 |
+ ;; |
354 |
+ *) |
355 |
+ ;; |
356 |
+ esac |
357 |
+ |
358 |
+ # install init script and config |
359 |
+ newinitd "${T}/${script}".initd "${script}" |
360 |
+ newconfd "${T}/${script}".confd "${script}" |
361 |
+ done |
362 |
+ |
363 |
+ # install systemd unit files |
364 |
+ use director && systemd_dounit "${FILESDIR}"/bareos-dir.service |
365 |
+ use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service |
366 |
+ systemd_dounit "${FILESDIR}"/bareos-fd.service |
367 |
+ |
368 |
+ # make sure the working directory exists |
369 |
+ diropts -m0750 |
370 |
+ keepdir /var/lib/bareos |
371 |
+ |
372 |
+ # make sure bareos group can execute bareos libexec scripts |
373 |
+ fowners -R root:bareos /usr/libexec/bareos |
374 |
+} |
375 |
+ |
376 |
+pkg_postinst() { |
377 |
+ if use clientonly; then |
378 |
+ fowners root:bareos /var/lib/bareos |
379 |
+ else |
380 |
+ fowners bareos:bareos /var/lib/bareos |
381 |
+ fi |
382 |
+ |
383 |
+ if ! use clientonly && use director; then |
384 |
+ einfo |
385 |
+ einfo "If this is a new install, you must create the database:" |
386 |
+ if use postgres; then |
387 |
+ einfo |
388 |
+ einfo "For postgresql:" |
389 |
+ einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" |
390 |
+ einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" |
391 |
+ einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" |
392 |
+ fi |
393 |
+ if use mysql; then |
394 |
+ einfo |
395 |
+ einfo "For mysql:" |
396 |
+ einfo |
397 |
+ einfo " Make sure root has direct access to your mysql server. You may want to" |
398 |
+ einfo " create a /root/.my.cnf file with" |
399 |
+ einfo " [client]" |
400 |
+ einfo " user=root" |
401 |
+ einfo " password=YourPasswordForAccessingMysqlAsRoot" |
402 |
+ einfo " before running:" |
403 |
+ einfo " /usr/libexec/bareos/create_bareos_database mysql" |
404 |
+ einfo " /usr/libexec/bareos/make_bareos_tables mysql" |
405 |
+ einfo " /usr/libexec/bareos/grant_bareos_privileges mysql" |
406 |
+ fi |
407 |
+ einfo |
408 |
+ fi |
409 |
+ |
410 |
+ if use sqlite; then |
411 |
+ einfo |
412 |
+ einfo "Be aware that Bareos does not officially support SQLite database." |
413 |
+ einfo "Best use it only for a client-only installation. See Bug #445540." |
414 |
+ einfo |
415 |
+ einfo "It is strongly recommended to use either postgresql or mysql as" |
416 |
+ einfo "catalog database backend." |
417 |
+ einfo |
418 |
+ fi |
419 |
+} |