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, 01 Mar 2023 17:43:50
Message-Id: 1677692614.8008c09e73257b78a3b6ce5c357f4952cbc7ca86.mschiff@gentoo
1 commit: 8008c09e73257b78a3b6ce5c357f4952cbc7ca86
2 Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 1 17:21:13 2023 +0000
4 Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 1 17:43:34 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8008c09e
7
8 app-backup/bareos: drop 21.1.2
9
10 Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
11
12 app-backup/bareos/Manifest | 1 -
13 app-backup/bareos/bareos-21.1.2.ebuild | 390 ---------------------------------
14 2 files changed, 391 deletions(-)
15
16 diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest
17 index 07d5acc73621..b05f4c5d56fd 100644
18 --- a/app-backup/bareos/Manifest
19 +++ b/app-backup/bareos/Manifest
20 @@ -1,3 +1,2 @@
21 DIST bareos-20.0.8.tar.gz 13429247 BLAKE2B 5576cf738fccad0ac39f7c92e8da01f4925d58e4373c8bc19f68ddb8cc8d6a07bf73dfd39bd2111766ccd20ce2da224680b8ab9adf7b84421874ae916e633f75 SHA512 1da30d0ff2f1fda2c4a41ec6d41ec60e3212b1bdb153c7f397931580894f31e36ab84f655d263aed47b9eb21e68ef7e59ec3b7bbd4f2c8981ae04b84733ffb68
22 -DIST bareos-21.1.2.tar.gz 11582588 BLAKE2B e7e02b3897d7e377cc79d9d0880da821f1b81d1f54891d89e704e78f51471cdf94b5a02ffe2f4ed54dec38bf37ccc757bf1641c3b678a04e401f48484ed3c941 SHA512 acdc787ff828add93c81b2b7d293dec90f2aa22aa3aee3002662bd30e88dc0dc58b753bb63ca7c111fac6c7eeea888938236c1169f92ed6cec27941036c7b6b1
23 DIST bareos-21.1.6.tar.gz 11654525 BLAKE2B 9b023a07e28098fd93aca57aead5b2bf993b85c52dc8f76870dc53ee88ec5995bcc908397173c7d3504c78214e37311442dd96bb563fa4382ae35904fef69e0a SHA512 e9ccafd379ea2a7ede2b6852fa544e7d4b63b23e9d91e8b747c1aecf5d764b06991a57f658842d48fbbe49335a92f29eea90e56b613a3123246a9cd9e8273f36
24
25 diff --git a/app-backup/bareos/bareos-21.1.2.ebuild b/app-backup/bareos/bareos-21.1.2.ebuild
26 deleted file mode 100644
27 index 7005e562111e..000000000000
28 --- a/app-backup/bareos/bareos-21.1.2.ebuild
29 +++ /dev/null
30 @@ -1,390 +0,0 @@
31 -# Copyright 1999-2023 Gentoo Authors
32 -# Distributed under the terms of the GNU General Public License v2
33 -
34 -EAPI=7
35 -
36 -PYTHON_COMPAT=( python3_{9..10} )
37 -CMAKE_WARN_UNUSED_CLI=no
38 -#CMAKE_REMOVE_MODULES=yes
39 -
40 -inherit python-any-r1 systemd cmake tmpfiles
41 -
42 -DESCRIPTION="Featureful client/server network backup suite"
43 -HOMEPAGE="https://www.bareos.org/"
44 -SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz"
45 -
46 -# some tests still fail propably due to missing bits in src_test -> TODO
47 -RESTRICT="mirror test"
48 -#RESTRICT="
49 -# mirror
50 -# !test? ( test )
51 -#"
52 -
53 -LICENSE="AGPL-3"
54 -SLOT="0"
55 -KEYWORDS="~amd64 ~x86"
56 -IUSE="X acl ceph clientonly +director glusterfs ipv6 lmdb
57 - logwatch ndmp readline scsi-crypto
58 - static +storage-daemon systemd tcpd test vim-syntax vmware xattr"
59 -
60 -# get cmake variables from core/cmake/BareosSetVariableDefaults.cmake
61 -DEPEND="
62 - !app-backup/bacula
63 - acct-group/${PN}
64 - !x86? (
65 - ceph? ( sys-cluster/ceph )
66 - )
67 - glusterfs? ( sys-cluster/glusterfs )
68 - lmdb? ( dev-db/lmdb )
69 - dev-libs/gmp:0
70 - !clientonly? (
71 - acct-user/${PN}
72 - dev-db/postgresql:*[threads]
73 - director? (
74 - virtual/mta
75 - )
76 - )
77 - logwatch? ( sys-apps/logwatch )
78 - ndmp? ( net-libs/rpcsvc-proto )
79 - tcpd? ( sys-apps/tcp-wrappers )
80 - readline? ( sys-libs/readline:0 )
81 - static? (
82 - acl? ( virtual/acl[static-libs] )
83 - dev-libs/jansson:=[static-libs]
84 - dev-libs/lzo[static-libs]
85 - dev-libs/openssl:0=[static-libs]
86 - sys-libs/ncurses:=[static-libs]
87 - sys-libs/zlib[static-libs]
88 - )
89 - !static? (
90 - acl? ( virtual/acl )
91 - dev-libs/jansson:=
92 - dev-libs/lzo
93 - dev-libs/openssl:0=
94 - sys-libs/ncurses:=
95 - sys-libs/zlib
96 - )
97 - "
98 -RDEPEND="${DEPEND}
99 - !clientonly? (
100 - storage-daemon? (
101 - sys-block/mtx
102 - app-arch/mt-st
103 - )
104 - )
105 - vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
106 - "
107 -
108 -BDEPEND="
109 - ${PYTHON_DEPS}
110 - test? (
111 - dev-cpp/gtest
112 - dev-db/postgresql:*[server,threads]
113 - dev-db/mariadb:*[server]
114 - )
115 -"
116 -
117 -REQUIRED_USE="
118 - static? ( clientonly )
119 - x86? ( !ceph )
120 -"
121 -
122 -S=${WORKDIR}/${PN}-Release-${PV}
123 -
124 -pkg_pretend() {
125 - local active_removed_backend=""
126 - if has_version "<app-backup/bareos-21[director,mysql]"; then
127 - if grep -qhriE "dbdriver.*=.*mysql" /etc/bareos/; then
128 - active_removed_backend=MySQL
129 - fi
130 - elif has_version "<app-backup/bareos-21[director,sqlite]"; then
131 - if grep -qhriE "dbdriver.*=.*sqlite" /etc/bareos/; then
132 - active_removed_backend=SQLite
133 - fi
134 - fi
135 - if [[ -n $active_removed_backend ]]; then
136 - ewarn
137 - ewarn "You are currently using bareos with the $active_removed_backend"
138 - ewarn "catalog backend."
139 - ewarn
140 - ewarn "THIS IS NOT SUPPORTED ANYMORE"
141 - ewarn
142 - ewarn "Beginning with version 21.0.0 bareos has dropped support for"
143 - ewarn "MySQL and SQLite catalog backends."
144 - ewarn
145 - ewarn "To upgrade to bareos >=21.0.0 you need to migrate to PostgreSQL"
146 - ewarn "catalog backend using the 'bareos-dbcopy' tool of your current"
147 - ewarn "installation first."
148 - ewarn
149 - die "current catalog backend not supported anymore"
150 - fi
151 -}
152 -
153 -src_test() {
154 - # initialze catalog test database
155 - initdb -D "${T}"/pgsql || die
156 - pg_ctl -w -D "${T}"/pgsql start \
157 - -o "-h '' -k '${T}'" || die
158 - createuser -h "${T}" bareos || die
159 - createdb -h "${T}" --owner bareos bareos || die
160 - export PGHOST="${T}"
161 -
162 - # initiale mariadb database for backup tests
163 - # $USER must be set and != root
164 - export USER=portage
165 -
166 - default
167 - cmake_src_test
168 -
169 - pg_ctl -w -D "${T}"/pgsql stop || die
170 - rm -rvf "${T}"/pgsql
171 -}
172 -
173 -src_prepare() {
174 - # fix gentoo platform support
175 - eapply -p1 "${FILESDIR}/${PN}-21-cmake-gentoo.patch"
176 - eapply "${FILESDIR}/${PN}-21.1.2-werror.patch"
177 - eapply "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.patch"
178 -
179 - # fix missing DESTDIR in symlink creation
180 - sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt"
181 -
182 - cmake_src_prepare
183 -}
184 -
185 -src_configure() {
186 - local mycmakeargs=()
187 -
188 - cmake_comment_add_subdirectory webui
189 -
190 - if use clientonly; then
191 - mycmakeargs+=(
192 - -Dclient-only=ON
193 - -Dstatic-cons=$(usex static)
194 - -Dstatic-fd=$(usex static)
195 - )
196 - fi
197 -
198 - for useflag in acl ipv6 ndmp scsi-crypto \
199 - systemd lmdb; do
200 - mycmakeargs+=( -D$useflag=$(usex $useflag) )
201 - done
202 -
203 - mycmakeargs+=(
204 - -DHAVE_PYTHON=0
205 - -Darchivedir=/var/lib/bareos/storage
206 - -Dbackenddir=/usr/$(get_libdir)/${PN}/backend
207 - -Dbasename="`hostname -s`"
208 - -Dbatch-insert=yes
209 - -Dbsrdir=/var/lib/bareos/bsr
210 - -Dconfdir=/etc/bareos
211 - -Dcoverage=no
212 - -Ddb_password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1`
213 - -Ddir-group=bareos
214 - -Ddir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
215 - -Ddir-user=bareos
216 - -Ddocdir=/usr/share/doc/${PF}
217 - -Ddynamic-cats-backends=yes
218 - -Ddynamic-storage-backends=yes
219 - -Dfd-group=bareos
220 - -Dfd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
221 - -Dfd-user=root
222 - -Dhost=${CHOST}
223 - -Dhostname="`hostname -s`"
224 - -Dhtmldir=/usr/share/doc/${PF}/html
225 - -Dlibdir=/usr/$(get_libdir)
226 - -Dlogdir=/var/log/bareos
227 - -Dmandir=/usr/share/man
228 - -Dmon-dir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
229 - -Dmon-fd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
230 - -Dmon-sd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
231 - -Dopenssl=yes
232 - -Dpiddir=/run/bareos
233 - -Dplugindir=/usr/$(get_libdir)/${PN}/plugin
234 - -Dsbin-perm=0755
235 - -Dsbindir=/usr/sbin
236 - -Dscriptdir=/usr/libexec/bareos
237 - -Dsd-group=bareos
238 - -Dsd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
239 - -Dsd-user=root
240 - -Dsubsysdir=/run/lock/subsys
241 - -Dsysconfdir=/etc
242 - -Dworkingdir=/var/lib/bareos
243 - -Dx=$(usex X)
244 - )
245 -
246 - # disable droplet support for now as it does not build with gcc 10
247 - # ... and this is a bundled lib, which should have its own package
248 - cd core && cmake_comment_add_subdirectory "src/droplet"
249 -
250 - cmake_src_configure
251 -}
252 -
253 -src_install() {
254 - cmake_src_install
255 -
256 - # remove some scripts we don't need at all
257 - rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd}
258 - rm -f "${D}"/usr/sbin/bareos
259 -
260 - # remove upstream init scripts and systemd units
261 - rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service
262 -
263 - # remove misc stuff we do not need in production
264 - rm -f "${D}"/etc/bareos/bareos-regress.conf
265 - rm -f "${D}"/etc/logrotate.d/bareos-dir
266 -
267 - # get rid of py2 stuff
268 - rm -rf "$D"/usr/lib64/python2.7 || die
269 - rm -f "$D"/usr/lib64/bareos/plugin/python-fd.so || die
270 - if ! use vmware; then
271 - rm -f "$D"/usr/lib64/bareos/plugin/{BareosFdPluginVMware.py,bareos-fd-vmware.py}
272 - fi
273 -
274 - # rename statically linked apps
275 - if use clientonly && use static ; then
276 - pushd "${D}"/usr/sbin || die
277 - mv static-bareos-fd bareos-fd || die
278 - mv static-bconsole bconsole || die
279 - popd || die
280 - fi
281 -
282 - # extra files which 'make install' doesn't cover
283 - if ! use clientonly; then
284 - # the logrotate configuration
285 - # (now unconditional wrt bug #258187)
286 - diropts -m0755
287 - insinto /etc/logrotate.d
288 - insopts -m0644
289 - newins "${S}"/core/scripts/logrotate bareos
290 -
291 - # the logwatch scripts
292 - if use logwatch; then
293 - diropts -m0750
294 - dodir /etc/log.d/scripts/services
295 - dodir /etc/log.d/scripts/shared
296 - dodir /etc/log.d/conf/logfiles
297 - dodir /etc/log.d/conf/services
298 - pushd "${S}"/core/scripts/logwatch >&/dev/null || die
299 -
300 - into /etc/log.d/scripts/services
301 - dobin bareos
302 -
303 - into /etc/log.d/scripts/shared
304 - dobin applybareosdate
305 -
306 - insinto /etc/log.d/conf/logfiles
307 - newins logfile.bareos.conf bareos.conf
308 -
309 - insinto /etc/log.d/conf/services
310 - newins services.bareos.conf bareos.conf
311 -
312 - popd >&/dev/null || die
313 - fi
314 - fi
315 -
316 - rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
317 - if use clientonly || ! use director; then
318 - rm -vf "${D}"/usr/share/man/man8/bareos-dir.8*
319 - rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8*
320 - rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
321 - rm -vf "${D}"/usr/share/man/man8/bwild.8*
322 - rm -vf "${D}"/usr/share/man/man8/bregex.8*
323 - rm -vf "${D}"/usr/share/man/man8/bpluginfo.8*
324 - rm -vf "${D}"/usr/libexec/bareos/create_*_database
325 - rm -vf "${D}"/usr/libexec/bareos/drop_*_database
326 - rm -vf "${D}"/usr/libexec/bareos/make_*_tables
327 - rm -vf "${D}"/usr/libexec/bareos/update_*_tables
328 - rm -vf "${D}"/usr/libexec/bareos/drop_*_tables
329 - rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges
330 - rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup
331 - fi
332 - if use clientonly || ! use storage-daemon; then
333 - rm -vf "${D}"/usr/share/man/man8/bareos-sd.8*
334 - rm -vf "${D}"/usr/share/man/man8/bcopy.8*
335 - rm -vf "${D}"/usr/share/man/man8/bextract.8*
336 - rm -vf "${D}"/usr/share/man/man8/bls.8*
337 - rm -vf "${D}"/usr/share/man/man8/bscan.8*
338 - rm -vf "${D}"/usr/share/man/man8/btape.8*
339 - rm -vf "${D}"/usr/libexec/bareos/disk-changer
340 - rm -vf "${D}"/usr/libexec/bareos/mtx-changer
341 - rm -vf "${D}"/usr/libexec/bareos/dvd-handler
342 - rm -vf "${D}"/etc/bareos/mtx-changer.conf
343 - fi
344 - if ! use scsi-crypto; then
345 - rm -vf "${D}"/usr/share/man/man8/bscrypto.8*
346 - fi
347 -
348 - # documentation
349 - dodoc README.md
350 - dodoc core/README.configsubdirectories
351 - use glusterfs dodoc core/README.glusterfs
352 - use ndmp && dodoc core/README.NDMP
353 - use scsi-crypto && dodoc core/README.scsicrypto
354 -
355 - # vim-files
356 - if use vim-syntax; then
357 - insinto /usr/share/vim/vimfiles/syntax
358 - doins core/scripts/bareos.vim
359 - insinto /usr/share/vim/vimfiles/ftdetect
360 - newins core/scripts/filetype.vim bareos_ft.vim
361 - fi
362 -
363 - # setup init scripts
364 - myscripts="bareos-fd"
365 - if ! use clientonly; then
366 - if use director; then
367 - myscripts+=" bareos-dir"
368 - fi
369 - if use storage-daemon; then
370 - myscripts+=" bareos-sd"
371 - fi
372 - fi
373 - for script in ${myscripts}; do
374 - # install init script and config
375 - newinitd "${FILESDIR}/${script}-21".initd "${script}"
376 - newconfd "${FILESDIR}/${script}-21".confd "${script}"
377 - done
378 -
379 - # install systemd unit files
380 - if use systemd; then
381 - if ! use clientonly; then
382 - use director && systemd_dounit "${FILESDIR}"/bareos-dir.service
383 - use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service
384 - fi
385 - systemd_dounit "${FILESDIR}"/bareos-fd.service
386 - fi
387 -
388 - # make sure the working directory exists
389 - diropts -m0750
390 - keepdir /var/lib/bareos
391 - keepdir /var/lib/bareos/storage
392 -
393 - diropts -m0755
394 - keepdir /var/log/bareos
395 -
396 - newtmpfiles "${FILESDIR}"/tmpfiles.d-bareos.conf bareos.conf
397 -
398 - # make sure bareos group can execute bareos libexec scripts
399 - fowners -R root:bareos /usr/libexec/bareos
400 -}
401 -
402 -pkg_postinst() {
403 - tmpfiles_process bareos.conf
404 -
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 database:"
414 - einfo
415 - einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'"
416 - einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'"
417 - einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'"
418 - einfo
419 - fi
420 -}