1 |
commit: 7c7515ec6ff0723858ca0cbfb1839eea8ce815af |
2 |
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 14 03:15:24 2020 +0000 |
4 |
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 14 04:05:37 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c7515ec |
7 |
|
8 |
app-backup/bareos: add new version |
9 |
|
10 |
Package-Manager: Portage-2.3.89, Repoman-2.3.20 |
11 |
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org> |
12 |
|
13 |
app-backup/bareos/Manifest | 1 + |
14 |
app-backup/bareos/bareos-19.2.7.ebuild | 374 +++++++++++++++++++++++++++++++++ |
15 |
app-backup/bareos/metadata.xml | 1 + |
16 |
3 files changed, 376 insertions(+) |
17 |
|
18 |
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest |
19 |
index 9f023e65c07..d8fbb1e4950 100644 |
20 |
--- a/app-backup/bareos/Manifest |
21 |
+++ b/app-backup/bareos/Manifest |
22 |
@@ -1,3 +1,4 @@ |
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 |
DIST bareos-18.2.6.tar.gz 9991951 BLAKE2B 9fdaf852e748f0c01d06e2fd72351e7b9bf18e8fea92307fb85437441b4ce504f9c6ddbd42cd2185b6dc08158502a7db581bef662c2bd84c86c885d6b89eebba SHA512 b6618173a803db4cfc3fe7edfe8c9e4e4128195f44383cd7df5b9866da4290686ed7cb42499edec957a5d9ab8bbd92d26258ce58f13fba84fb569167956768c3 |
26 |
+DIST bareos-19.2.7.tar.gz 12602338 BLAKE2B 31fa9c9966b22913c2af6eaa6c6f704396d353341878817a574388925f35b437331b057b2a147a8217502f9198b39539d2fa68c4047e191dc918123c0f674a7d SHA512 cb467846a41d42a469704d48c3a1b03ebf5fdc71b9268c1e438e46b86073d55993dfd9bf26242db593db8b1814009c060fd65122d434bad2986c24613f6865c6 |
27 |
|
28 |
diff --git a/app-backup/bareos/bareos-19.2.7.ebuild b/app-backup/bareos/bareos-19.2.7.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..cb87707808e |
31 |
--- /dev/null |
32 |
+++ b/app-backup/bareos/bareos-19.2.7.ebuild |
33 |
@@ -0,0 +1,374 @@ |
34 |
+# Copyright 1999-2020 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python2_7 ) |
40 |
+CMAKE_WARN_UNUSED_CLI=no |
41 |
+#CMAKE_REMOVE_MODULES=yes |
42 |
+ |
43 |
+inherit python-any-r1 systemd cmake-utils |
44 |
+ |
45 |
+DESCRIPTION="Featureful client/server network backup suite" |
46 |
+HOMEPAGE="https://www.bareos.org/" |
47 |
+SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" |
48 |
+RESTRICT="mirror" |
49 |
+ |
50 |
+LICENSE="AGPL-3" |
51 |
+SLOT="0" |
52 |
+KEYWORDS="~amd64 ~x86" |
53 |
+IUSE="X acl ceph clientonly +director glusterfs ipv6 jansson lmdb libressl |
54 |
+ logwatch mysql ndmp +postgres readline scsi-crypto |
55 |
+ sqlite static +storage-daemon systemd tcpd vim-syntax xattr" |
56 |
+ |
57 |
+# get cmake variables from core/cmake/BareosSetVariableDefaults.cmake |
58 |
+DEPEND=" |
59 |
+ !app-backup/bacula |
60 |
+ acct-group/${PN} |
61 |
+ !x86? ( |
62 |
+ ceph? ( sys-cluster/ceph ) |
63 |
+ ) |
64 |
+ glusterfs? ( sys-cluster/glusterfs ) |
65 |
+ lmdb? ( dev-db/lmdb ) |
66 |
+ dev-libs/gmp:0 |
67 |
+ !clientonly? ( |
68 |
+ acct-user/${PN} |
69 |
+ postgres? ( dev-db/postgresql:*[threads] ) |
70 |
+ mysql? ( virtual/mysql ) |
71 |
+ sqlite? ( dev-db/sqlite:3 ) |
72 |
+ director? ( |
73 |
+ virtual/mta |
74 |
+ jansson? ( dev-libs/jansson ) |
75 |
+ ) |
76 |
+ ) |
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 |
+ !libressl? ( dev-libs/openssl:0=[static-libs] ) |
86 |
+ libressl? ( dev-libs/libressl:0=[static-libs] ) |
87 |
+ ) |
88 |
+ !static? ( |
89 |
+ acl? ( virtual/acl ) |
90 |
+ dev-libs/lzo |
91 |
+ !libressl? ( dev-libs/openssl:0= ) |
92 |
+ libressl? ( dev-libs/libressl:0= ) |
93 |
+ sys-libs/ncurses:= |
94 |
+ sys-libs/zlib |
95 |
+ ) |
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 |
+BDEPEND="${PYTHON_DEPS}" |
107 |
+ |
108 |
+REQUIRED_USE=" |
109 |
+ !clientonly? ( || ( mysql postgres sqlite ) ) |
110 |
+ static? ( clientonly ) |
111 |
+ x86? ( !ceph ) |
112 |
+" |
113 |
+ |
114 |
+S=${WORKDIR}/${PN}-Release-${PV} |
115 |
+ |
116 |
+src_prepare() { |
117 |
+ use mysql && export mydbtypes+=( mysql ) |
118 |
+ use postgres && export mydbtypes+=( postgresql ) |
119 |
+ use sqlite && export mydbtypes+=( sqlite ) |
120 |
+ |
121 |
+ # enables default database driver in catalog |
122 |
+ pushd core/src/defaultconfigs >&/dev/null || die |
123 |
+ sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE_WITH_DATABASE_DRIVER_XXX/d' $(grep -rl XXX_REPLACE_WITH_DATABASE_DRIVER_XXX) \ |
124 |
+ || die "sed on MyCatalog.conf.in failed" |
125 |
+ popd >&/dev/null || die |
126 |
+ |
127 |
+ # fix gentoo version detection |
128 |
+ eapply -p0 "${FILESDIR}/${PN}-cmake-gentoo.patch" |
129 |
+ |
130 |
+ # fix missing DESTDIR in symlink creation |
131 |
+ sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt" |
132 |
+ |
133 |
+ CMAKE_USE_DIR="$S/core" |
134 |
+ cmake-utils_src_prepare |
135 |
+} |
136 |
+ |
137 |
+src_configure() { |
138 |
+ local mycmakeargs=() |
139 |
+ |
140 |
+ CMAKE_USE_DIR="$S/core" |
141 |
+ |
142 |
+ pushd core/platforms >&/dev/null || die |
143 |
+ cmake_comment_add_subdirectory '${DISTNAME}' |
144 |
+ popd >&/dev/null || die |
145 |
+ |
146 |
+ if use clientonly; then |
147 |
+ mycmakeargs+=( |
148 |
+ -Dclient-only=ON |
149 |
+ -Dstatic-cons=$(usex static) |
150 |
+ -Dstatic-fd=$(usex static) |
151 |
+ ) |
152 |
+ fi |
153 |
+ |
154 |
+ for useflag in acl ipv6 ndmp scsi-crypto \ |
155 |
+ systemd mysql lmdb; do |
156 |
+ mycmakeargs+=( -D$useflag=$(usex $useflag) ) |
157 |
+ done |
158 |
+ |
159 |
+ mycmakeargs+=( |
160 |
+ -DDEFAULT_DB_TYPE=${mydbtypes[0]} |
161 |
+ -Darchivedir=/var/lib/bareos/storage |
162 |
+ -Dbackenddir=/usr/$(get_libdir)/${PN}/backend |
163 |
+ -Dbasename="`hostname -s`" |
164 |
+ -Dbatch-insert=yes |
165 |
+ -Dbsrdir=/var/lib/bareos/bsr |
166 |
+ -Dconfdir=/etc/bareos |
167 |
+ -Dcoverage=yes |
168 |
+ -Ddb_password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` |
169 |
+ -Ddir-group=bareos |
170 |
+ -Ddir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" |
171 |
+ -Ddir-user=bareos |
172 |
+ -Ddocdir=/usr/share/doc/${PF} |
173 |
+ -Ddynamic-cats-backends=yes |
174 |
+ -Ddynamic-storage-backends=yes |
175 |
+ -Dfd-group=bareos |
176 |
+ -Dfd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" |
177 |
+ -Dfd-user=root |
178 |
+ -Dhost=${CHOST} |
179 |
+ -Dhostname="`hostname -s`" |
180 |
+ -Dhtmldir=/usr/share/doc/${PF}/html |
181 |
+ -Dlibdir=/usr/$(get_libdir) |
182 |
+ -Dlogdir=/var/log/bareos |
183 |
+ -Dmandir=/usr/share/man |
184 |
+ -Dmon-dir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" |
185 |
+ -Dmon-fd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" |
186 |
+ -Dmon-sd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" |
187 |
+ -Dmysql=$(usex mysql) |
188 |
+ -Dopenssl=yes |
189 |
+ -Dpiddir=/run/bareos |
190 |
+ -Dplugindir=/usr/$(get_libdir)/${PN}/plugin |
191 |
+ -Dpostgresql=$(usex postgres) |
192 |
+ -Dsbin-perm=0755 |
193 |
+ -Dsbindir=/usr/sbin |
194 |
+ -Dscriptdir=/usr/libexec/bareos |
195 |
+ -Dsd-group=bareos |
196 |
+ -Dsd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" |
197 |
+ -Dsd-user=root |
198 |
+ -Dsqlite3=$(usex sqlite) |
199 |
+ -Dsubsysdir=/run/lock/subsys |
200 |
+ -Dsysconfdir=/etc |
201 |
+ -Dworkingdir=/var/lib/bareos |
202 |
+ -Dx=$(usex X) |
203 |
+ ) |
204 |
+ |
205 |
+ cmake-utils_src_configure |
206 |
+} |
207 |
+ |
208 |
+src_install() { |
209 |
+ cmake-utils_src_install |
210 |
+ |
211 |
+ # remove some scripts we don't need at all |
212 |
+ rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql} |
213 |
+ rm -f "${D}"/usr/sbin/bareos |
214 |
+ |
215 |
+ # remove upstream init scripts |
216 |
+ rm -f "${D}"/etc/init.d/bareos-* |
217 |
+ |
218 |
+ # rename statically linked apps |
219 |
+ if use clientonly && use static ; then |
220 |
+ pushd "${D}"/usr/sbin || die |
221 |
+ mv static-bareos-fd bareos-fd || die |
222 |
+ mv static-bconsole bconsole || die |
223 |
+ popd || die |
224 |
+ fi |
225 |
+ |
226 |
+ # extra files which 'make install' doesn't cover |
227 |
+ if ! use clientonly; then |
228 |
+ # the logrotate configuration |
229 |
+ # (now unconditional wrt bug #258187) |
230 |
+ diropts -m0755 |
231 |
+ insinto /etc/logrotate.d |
232 |
+ insopts -m0644 |
233 |
+ newins "${S}"/core/scripts/logrotate bareos |
234 |
+ |
235 |
+ # the logwatch scripts |
236 |
+ if use logwatch; then |
237 |
+ diropts -m0750 |
238 |
+ dodir /etc/log.d/scripts/services |
239 |
+ dodir /etc/log.d/scripts/shared |
240 |
+ dodir /etc/log.d/conf/logfiles |
241 |
+ dodir /etc/log.d/conf/services |
242 |
+ pushd "${S}"/core/scripts/logwatch >&/dev/null || die |
243 |
+ |
244 |
+ into /etc/log.d/scripts/services |
245 |
+ dobin bareos |
246 |
+ |
247 |
+ into /etc/log.d/scripts/shared |
248 |
+ dobin applybareosdate |
249 |
+ |
250 |
+ insinto /etc/log.d/conf/logfiles |
251 |
+ newins logfile.bareos.conf bareos.conf |
252 |
+ |
253 |
+ insinto /etc/log.d/conf/services |
254 |
+ newins services.bareos.conf bareos.conf |
255 |
+ |
256 |
+ popd >&/dev/null || die |
257 |
+ fi |
258 |
+ fi |
259 |
+ |
260 |
+ rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* |
261 |
+ if use clientonly || ! use director; then |
262 |
+ if use systemd; then |
263 |
+ rm -vf "${D}"/lib/systemd/system/bareos-dir.service |
264 |
+ fi |
265 |
+ rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* |
266 |
+ rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* |
267 |
+ rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
268 |
+ rm -vf "${D}"/usr/share/man/man8/bwild.8* |
269 |
+ rm -vf "${D}"/usr/share/man/man8/bregex.8* |
270 |
+ rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* |
271 |
+ rm -vf "${D}"/usr/libexec/bareos/create_*_database |
272 |
+ rm -vf "${D}"/usr/libexec/bareos/drop_*_database |
273 |
+ rm -vf "${D}"/usr/libexec/bareos/make_*_tables |
274 |
+ rm -vf "${D}"/usr/libexec/bareos/update_*_tables |
275 |
+ rm -vf "${D}"/usr/libexec/bareos/drop_*_tables |
276 |
+ rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges |
277 |
+ rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup |
278 |
+ fi |
279 |
+ if use clientonly || ! use storage-daemon; then |
280 |
+ if use systemd; then |
281 |
+ rm -vf "${D}"/lib/systemd/system/bareos-sd.service |
282 |
+ fi |
283 |
+ rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* |
284 |
+ rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
285 |
+ rm -vf "${D}"/usr/share/man/man8/bextract.8* |
286 |
+ rm -vf "${D}"/usr/share/man/man8/bls.8* |
287 |
+ rm -vf "${D}"/usr/share/man/man8/bscan.8* |
288 |
+ rm -vf "${D}"/usr/share/man/man8/btape.8* |
289 |
+ rm -vf "${D}"/usr/libexec/bareos/disk-changer |
290 |
+ rm -vf "${D}"/usr/libexec/bareos/mtx-changer |
291 |
+ rm -vf "${D}"/usr/libexec/bareos/dvd-handler |
292 |
+ rm -vf "${D}"/etc/bareos/mtx-changer.conf |
293 |
+ fi |
294 |
+ if ! use scsi-crypto; then |
295 |
+ rm -vf "${D}"/usr/share/man/man8/bscrypto.8* |
296 |
+ fi |
297 |
+ |
298 |
+ # documentation |
299 |
+ dodoc README.md |
300 |
+ dodoc core/README.configsubdirectories |
301 |
+ use glusterfs dodoc core/README.glusterfs |
302 |
+ use ndmp && dodoc core/README.NDMP |
303 |
+ use scsi-crypto && dodoc core/README.scsicrypto |
304 |
+ |
305 |
+ # vim-files |
306 |
+ if use vim-syntax; then |
307 |
+ insinto /usr/share/vim/vimfiles/syntax |
308 |
+ doins core/scripts/bareos.vim |
309 |
+ insinto /usr/share/vim/vimfiles/ftdetect |
310 |
+ newins core/scripts/filetype.vim bareos_ft.vim |
311 |
+ fi |
312 |
+ |
313 |
+ # setup init scripts |
314 |
+ myscripts="bareos-fd" |
315 |
+ if ! use clientonly; then |
316 |
+ if use director; then |
317 |
+ myscripts+=" bareos-dir" |
318 |
+ fi |
319 |
+ if use storage-daemon; then |
320 |
+ myscripts+=" bareos-sd" |
321 |
+ fi |
322 |
+ fi |
323 |
+ for script in ${myscripts}; do |
324 |
+ # copy over init script and config to a temporary location |
325 |
+ # so we can modify them as needed |
326 |
+ cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" |
327 |
+ cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" |
328 |
+ |
329 |
+ # now set the database dependency for the director init script |
330 |
+ case "${script}" in |
331 |
+ bareos-dir) |
332 |
+ sed -i -e "s:%databasetypes%:${mydbtypes[*]}:" "${T}/${script}".confd || die |
333 |
+ ;; |
334 |
+ *) |
335 |
+ ;; |
336 |
+ esac |
337 |
+ |
338 |
+ # install init script and config |
339 |
+ newinitd "${T}/${script}".initd "${script}" |
340 |
+ newconfd "${T}/${script}".confd "${script}" |
341 |
+ done |
342 |
+ |
343 |
+ # install systemd unit files |
344 |
+ if use systemd; then |
345 |
+ if ! use clientonly; then |
346 |
+ use director && systemd_dounit core/platforms/systemd/bareos-dir.service |
347 |
+ use storage-daemon && systemd_dounit core/platforms/systemd/bareos-sd.service |
348 |
+ fi |
349 |
+ systemd_dounit core/platforms/systemd/bareos-fd.service |
350 |
+ fi |
351 |
+ |
352 |
+ # make sure the working directory exists |
353 |
+ diropts -m0750 |
354 |
+ keepdir /var/lib/bareos |
355 |
+ keepdir /var/lib/bareos/storage |
356 |
+ |
357 |
+ diropts -m0755 |
358 |
+ keepdir /var/log/bareos |
359 |
+ |
360 |
+ # make sure bareos group can execute bareos libexec scripts |
361 |
+ fowners -R root:bareos /usr/libexec/bareos |
362 |
+} |
363 |
+ |
364 |
+pkg_postinst() { |
365 |
+ if use clientonly; then |
366 |
+ fowners root:bareos /var/lib/bareos |
367 |
+ else |
368 |
+ fowners bareos:bareos /var/lib/bareos |
369 |
+ fi |
370 |
+ |
371 |
+ if ! use clientonly && use director; then |
372 |
+ einfo |
373 |
+ einfo "If this is a new install, you must create the database:" |
374 |
+ if use postgres; then |
375 |
+ einfo |
376 |
+ einfo "For postgresql:" |
377 |
+ einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" |
378 |
+ einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" |
379 |
+ einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" |
380 |
+ fi |
381 |
+ if use mysql; then |
382 |
+ einfo |
383 |
+ einfo "For mysql:" |
384 |
+ einfo |
385 |
+ einfo " Make sure root has direct access to your mysql server. You may want to" |
386 |
+ einfo " create a /root/.my.cnf file with" |
387 |
+ einfo " [client]" |
388 |
+ einfo " user=root" |
389 |
+ einfo " password=YourPasswordForAccessingMysqlAsRoot" |
390 |
+ einfo " before running:" |
391 |
+ einfo " /usr/libexec/bareos/create_bareos_database mysql" |
392 |
+ einfo " /usr/libexec/bareos/make_bareos_tables mysql" |
393 |
+ einfo " /usr/libexec/bareos/grant_bareos_privileges mysql" |
394 |
+ fi |
395 |
+ einfo |
396 |
+ fi |
397 |
+ |
398 |
+ if use sqlite; then |
399 |
+ einfo |
400 |
+ einfo "Be aware that Bareos does not officially support SQLite database." |
401 |
+ einfo "Best use it only for a client-only installation. See Bug #445540." |
402 |
+ einfo |
403 |
+ einfo "It is strongly recommended to use either postgresql or mysql as" |
404 |
+ einfo "catalog database backend." |
405 |
+ einfo |
406 |
+ fi |
407 |
+} |
408 |
|
409 |
diff --git a/app-backup/bareos/metadata.xml b/app-backup/bareos/metadata.xml |
410 |
index 4f7694434a3..bc44d44732b 100644 |
411 |
--- a/app-backup/bareos/metadata.xml |
412 |
+++ b/app-backup/bareos/metadata.xml |
413 |
@@ -7,6 +7,7 @@ |
414 |
</maintainer> |
415 |
<use> |
416 |
<flag name="cephfs">Enable cephfs storage backend</flag> |
417 |
+ <flag name="ceph">Enable ceph support</flag> |
418 |
<flag name="clientonly">Only install file-daemon (client)</flag> |
419 |
<flag name="director">Install director</flag> |
420 |
<flag name="fastlz">Enable support vor lz4, lz4hc and lzfast using dev-libs/bareos-fastlzlib</flag> |