From 401101f9c8077911929d3f2b60a37098460a5d89 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 24 Mar 2022 23:59:54 +0000 Subject: gentoo resync : 25.03.2022 --- app-backup/Manifest.gz | Bin 8544 -> 8542 bytes app-backup/bareos/Manifest | 12 +- app-backup/bareos/bareos-19.2.11-r1.ebuild | 382 ---------------------------- app-backup/bareos/bareos-19.2.12.ebuild | 382 ++++++++++++++++++++++++++++ app-backup/bareos/bareos-20.0.5.ebuild | 394 ----------------------------- app-backup/bareos/bareos-20.0.6.ebuild | 394 +++++++++++++++++++++++++++++ app-backup/bareos/bareos-21.0.0-r2.ebuild | 388 ---------------------------- app-backup/bareos/bareos-21.1.2.ebuild | 388 ++++++++++++++++++++++++++++ 8 files changed, 1170 insertions(+), 1170 deletions(-) delete mode 100644 app-backup/bareos/bareos-19.2.11-r1.ebuild create mode 100644 app-backup/bareos/bareos-19.2.12.ebuild delete mode 100644 app-backup/bareos/bareos-20.0.5.ebuild create mode 100644 app-backup/bareos/bareos-20.0.6.ebuild delete mode 100644 app-backup/bareos/bareos-21.0.0-r2.ebuild create mode 100644 app-backup/bareos/bareos-21.1.2.ebuild (limited to 'app-backup') diff --git a/app-backup/Manifest.gz b/app-backup/Manifest.gz index e49bb4a140fa..c77e6c0597dd 100644 Binary files a/app-backup/Manifest.gz and b/app-backup/Manifest.gz differ diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest index a6f9055e67dc..495b45fa3fd9 100644 --- a/app-backup/bareos/Manifest +++ b/app-backup/bareos/Manifest @@ -21,11 +21,11 @@ AUX bareos-sd.initd 855 BLAKE2B 40ca8e89b63e67f6fa4a4f60e735bd101ce0b1ad46be07b6 AUX bareos-sd.service 812 BLAKE2B 7ac9754d98ea177614450045fbbaf7406592b30a280646eacdf31271a0cafd63e88ac463b1d94143ccac96c289de3f88a177edab665f073e7c7692037ffedb68 SHA512 6a0fdb3af03e9f94e0d755a3286aff36b41ab1f00a82e9864f6d3de6931691f6aba79aeb7fc952cec039e4174b545f53c23e96fcfbaed71192877d201b3086ad AUX tmpfiles.d-bareos.conf 33 BLAKE2B 68feed7629dde0dad019470851cea33140be3b17186fbbee7ad6c6a591978236ec09252d890117030d8706d22ea02f9971063aa80a393d3726510128527401d0 SHA512 65d3f72e57eb3afc557ab6b56a8ec1895a679b904114fefd1c9d0ceeb6b9fa8413575591ed81e1ce6963bdaf34dad227e781865b39bb237afc6bb5652306d2ef DIST bareos-18.2.12.tar.gz 10566403 BLAKE2B 765a5430c495b21edc0c22d6903e23d312b1dc2b94e0d2a4227c10a38be8fe638636cf32a58e8aaf83b389581bf1348b4d27be6886f61180c20496acbd0eb015 SHA512 1d308d3021e8277832ce933fbafdf514bc194a1a2a2d761e66fb26ec2af419d19ae38894a7cb56e036c5af003bf640117b5a11954d478b35e13a02007f99f4de -DIST bareos-19.2.11.tar.gz 12890679 BLAKE2B 2872e4eed8186f024211faeefcb5b38448f38d90a2c7c73ef8fa1e51d3a917344a7acbe09a01d0205ad312ec136161eb1b0aa28dcceabbf71d78206a724602b0 SHA512 46769f6e26068669c2656ed8afc73dbd6f07a88d65cf557193684c130bdb93567f3ab06374484be499e5edb7bdd32013edecb05ff19843d3d806a38ca1892749 -DIST bareos-20.0.5.tar.gz 13343612 BLAKE2B 78fc178b021165377cb912593f56c248fed68b44deab3626087c9fc10d2eeb866730b734e0ba5982424b4bbb875d734e62351c8114c947057478d4929df2ca2c SHA512 a61141944c24042f2b9f977672564923d4912756c821abe516f94a2c21f5b990236f22187c8567956edef09029f740552c3bc6c30f8c6d65c3f0b06b84ef00e7 -DIST bareos-21.0.0.tar.gz 11306618 BLAKE2B 0363465c40a8053bb5ec772c18ac0dc852f379979e3afc45dd29c79f8187238363c1f07e2f39d25613404b1b6e253700b33b274389ca2dc4655d201bc4888166 SHA512 0a57bccca0589f3ce8a5664afbeb1eb1b17ec7142722e2d0bb2a0bbd9007688725b39c6db59646c180ce096e55451c09934e6479a2b4deeb4d3ee738ab2c32cd +DIST bareos-19.2.12.tar.gz 12931615 BLAKE2B 258d826e8b0e7d9d7f5ebc0d5b701ea0c34e82674f14080ec0c758eb888cf845430dab870dbae85190957d570b8b9c551db00b08a002740a7c062f7741cf7338 SHA512 6a5d85bf1131cb4a97879410ad8d4d3069715d8fb070e45137bb80666c9907c6db0c65ff5aa3b50ae2f44f0a2f402bf79c6b3817e3d5fa25d1e7088b495aed74 +DIST bareos-20.0.6.tar.gz 13373519 BLAKE2B 5f75078cc9b82384e06ad2e4545ab26c045208829cb8cd001e6425961486d709b75979f2484e5a648e104f60973552916a49c271ce4024e5e152da13a9a9e72f SHA512 ec83fba412f22725ed440168e62d2876e18c6ddb2ca1837c6169fb0b690118a3380d4f6cf7f9d8e1a8b9601b320ce552a7b7cf74066afb906a09fc1c26208729 +DIST bareos-21.1.2.tar.gz 11582588 BLAKE2B e7e02b3897d7e377cc79d9d0880da821f1b81d1f54891d89e704e78f51471cdf94b5a02ffe2f4ed54dec38bf37ccc757bf1641c3b678a04e401f48484ed3c941 SHA512 acdc787ff828add93c81b2b7d293dec90f2aa22aa3aee3002662bd30e88dc0dc58b753bb63ca7c111fac6c7eeea888938236c1169f92ed6cec27941036c7b6b1 EBUILD bareos-18.2.12-r1.ebuild 11168 BLAKE2B 952379f3531292e6b20e0e81d9be6d8384b8a76b1747a340310032c1ed0cf5b38415e6b6fc4edafb46b4e836cebce2dc73532fcc7b5737b1464deecec3c1e3ca SHA512 f8878820c0eeb8fc178b65579fe55230b8534b9e37b69ccacb1818635066a8fca016dbd818394b9b1e5916b49c31cee24abb9591dcbc7ed2a094146bb18adb41 -EBUILD bareos-19.2.11-r1.ebuild 10915 BLAKE2B c0101e1fd5a33994bb42b9a460fca12ed422eb4a99a23d6e7333c29b94bf117c39efb1cde61f82b9fda9a00ccc0452187ab8a74ccf6d4e3fdcd813fc9d219908 SHA512 0880c16abaad7ad94bdb75d77e4069994872bfb74b03f496127a936c46d21bb5bf2bbc5b8c078d9a0ecdd3aca40845d72b67bd475b006edabfd57657401979b4 -EBUILD bareos-20.0.5.ebuild 11407 BLAKE2B 00a225c47f39abb02990a088a7b763c73f95aca2b98d3fd49015b7ab852b50c9a0b7455aa881f63071b4fd31676806e13ade6001d8465e41e8b88bbb83524167 SHA512 0924dd4387fcce3821dd039729e6395e142b5de067bee06219de5362fa1068238928c3e9dc243f8648e76717428d80b304acf5ad2719548dafe18b705800497d -EBUILD bareos-21.0.0-r2.ebuild 10641 BLAKE2B f35237f6ae0188ada30feb79cfb97c2647e46d3566c3b9be64c618c55dd2724a9096aa2c6692d94b11a4caa2c6a05804abbcc7023295bd217cbaf665d307c46c SHA512 05193fd2602274445c6dc9a428b56199f30f771ae9f5cb08629193014c0cbfee7959cdfb5432bf8799eb613f36ee55049dafcc95033fdbbd5ebdfdf9fe824b40 +EBUILD bareos-19.2.12.ebuild 10915 BLAKE2B a06c580993370a9a65b1669847bccad0f216f2c0b02a9d5f477292572d0ecc4162d9d1cbac1d3b6d4f24bdae0707bfeee8ec39f26fa2b71065b8da2105cca7c3 SHA512 d23bfc9efaf6ae0ed2a0fe8035083583533e23d8c20d2887b32867c8d40fb1b4a4abe03e936524de7a51a012b1941dd03a1542084b8bdb7d35c661ce73da8ad6 +EBUILD bareos-20.0.6.ebuild 11407 BLAKE2B 00a225c47f39abb02990a088a7b763c73f95aca2b98d3fd49015b7ab852b50c9a0b7455aa881f63071b4fd31676806e13ade6001d8465e41e8b88bbb83524167 SHA512 0924dd4387fcce3821dd039729e6395e142b5de067bee06219de5362fa1068238928c3e9dc243f8648e76717428d80b304acf5ad2719548dafe18b705800497d +EBUILD bareos-21.1.2.ebuild 10641 BLAKE2B f35237f6ae0188ada30feb79cfb97c2647e46d3566c3b9be64c618c55dd2724a9096aa2c6692d94b11a4caa2c6a05804abbcc7023295bd217cbaf665d307c46c SHA512 05193fd2602274445c6dc9a428b56199f30f771ae9f5cb08629193014c0cbfee7959cdfb5432bf8799eb613f36ee55049dafcc95033fdbbd5ebdfdf9fe824b40 MISC metadata.xml 1552 BLAKE2B 27a6ee8fad25a63be91e5bc712ffb293174c6bfca8df772be3821932baafe510b1fa271b2e36a22a11296c7a7bd23049b86dc9cbcbe2f7f30409a1e7c7b55042 SHA512 40b549c30e36a495a434c607467efa914aec228d886ee8560e77b39e4d6d6396ebae5e4a5cbdfd01b6828011ee9922112ab0041d9a9aa944d68417114b14ef53 diff --git a/app-backup/bareos/bareos-19.2.11-r1.ebuild b/app-backup/bareos/bareos-19.2.11-r1.ebuild deleted file mode 100644 index f2b7fc690b8d..000000000000 --- a/app-backup/bareos/bareos-19.2.11-r1.ebuild +++ /dev/null @@ -1,382 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8,9} ) -CMAKE_WARN_UNUSED_CLI=no -#CMAKE_REMOVE_MODULES=yes - -inherit python-any-r1 systemd cmake tmpfiles - -DESCRIPTION="Featureful client/server network backup suite" -HOMEPAGE="https://www.bareos.org/" -SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" -RESTRICT="mirror" - -LICENSE="AGPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="X acl ceph clientonly +director glusterfs ipv6 jansson lmdb - logwatch mysql ndmp +postgres readline scsi-crypto - sqlite static +storage-daemon systemd tcpd vim-syntax xattr" - -# get cmake variables from core/cmake/BareosSetVariableDefaults.cmake -DEPEND=" - !app-backup/bacula - acct-group/${PN} - !x86? ( - ceph? ( sys-cluster/ceph ) - ) - glusterfs? ( sys-cluster/glusterfs ) - lmdb? ( dev-db/lmdb ) - dev-libs/gmp:0 - !clientonly? ( - acct-user/${PN} - postgres? ( dev-db/postgresql:*[threads] ) - mysql? ( virtual/mysql ) - sqlite? ( dev-db/sqlite:3 ) - director? ( - virtual/mta - jansson? ( dev-libs/jansson:= ) - ) - ) - logwatch? ( sys-apps/logwatch ) - ndmp? ( net-libs/rpcsvc-proto ) - tcpd? ( sys-apps/tcp-wrappers ) - readline? ( sys-libs/readline:0 ) - static? ( - acl? ( virtual/acl[static-libs] ) - sys-libs/zlib[static-libs] - dev-libs/lzo[static-libs] - sys-libs/ncurses:=[static-libs] - dev-libs/openssl:0=[static-libs] - ) - !static? ( - acl? ( virtual/acl ) - dev-libs/lzo - dev-libs/openssl:0= - sys-libs/ncurses:= - sys-libs/zlib - ) - " -RDEPEND="${DEPEND} - !clientonly? ( - storage-daemon? ( - sys-block/mtx - app-arch/mt-st - ) - ) - vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) - " -BDEPEND="${PYTHON_DEPS}" - -REQUIRED_USE=" - !clientonly? ( || ( mysql postgres sqlite ) ) - static? ( clientonly ) - x86? ( !ceph ) -" - -S=${WORKDIR}/${PN}-Release-${PV} - -src_prepare() { - use mysql && export mydbtypes+=( mysql ) - use postgres && export mydbtypes+=( postgresql ) - use sqlite && export mydbtypes+=( sqlite ) - - # enables default database driver in catalog - pushd core/src/defaultconfigs >&/dev/null || die - sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE_WITH_DATABASE_DRIVER_XXX/d' $(grep -rl XXX_REPLACE_WITH_DATABASE_DRIVER_XXX) \ - || die "sed on MyCatalog.conf.in failed" - popd >&/dev/null || die - - # fix gentoo version detection - eapply -p0 "${FILESDIR}/${PN}-cmake-gentoo.patch" - - # fix missing DESTDIR in symlink creation - sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt" - - # disable dird and stored plugins, because of - # py2 dependency - cd "${S}/core/src/plugins" - cmake_comment_add_subdirectory dird - cmake_comment_add_subdirectory stored - cd - - - CMAKE_USE_DIR="$S/core" - cmake_src_prepare -} - -src_configure() { - local mycmakeargs=() - - CMAKE_USE_DIR="$S/core" - - pushd core/platforms >&/dev/null || die - cmake_comment_add_subdirectory '${DISTNAME}' - popd >&/dev/null || die - - if use clientonly; then - mycmakeargs+=( - -Dclient-only=ON - -Dstatic-cons=$(usex static) - -Dstatic-fd=$(usex static) - ) - fi - - for useflag in acl ipv6 ndmp scsi-crypto \ - systemd mysql lmdb; do - mycmakeargs+=( -D$useflag=$(usex $useflag) ) - done - - mycmakeargs+=( - -DHAVE_PYTHON=0 - -DDEFAULT_DB_TYPE=${mydbtypes[0]} - -Darchivedir=/var/lib/bareos/storage - -Dbackenddir=/usr/$(get_libdir)/${PN}/backend - -Dbasename="`hostname -s`" - -Dbatch-insert=yes - -Dbsrdir=/var/lib/bareos/bsr - -Dconfdir=/etc/bareos - -Dcoverage=no - -Ddb_password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` - -Ddir-group=bareos - -Ddir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Ddir-user=bareos - -Ddocdir=/usr/share/doc/${PF} - -Ddynamic-cats-backends=yes - -Ddynamic-storage-backends=yes - -Dfd-group=bareos - -Dfd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dfd-user=root - -Dhost=${CHOST} - -Dhostname="`hostname -s`" - -Dhtmldir=/usr/share/doc/${PF}/html - -Dlibdir=/usr/$(get_libdir) - -Dlogdir=/var/log/bareos - -Dmandir=/usr/share/man - -Dmon-dir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dmon-fd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dmon-sd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dmysql=$(usex mysql) - -Dopenssl=yes - -Dpiddir=/run/bareos - -Dplugindir=/usr/$(get_libdir)/${PN}/plugin - -Dpostgresql=$(usex postgres) - -Dsbin-perm=0755 - -Dsbindir=/usr/sbin - -Dscriptdir=/usr/libexec/bareos - -Dsd-group=bareos - -Dsd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dsd-user=root - -Dsqlite3=$(usex sqlite) - -Dsubsysdir=/run/lock/subsys - -Dsysconfdir=/etc - -Dworkingdir=/var/lib/bareos - -Dx=$(usex X) - ) - - cmake_src_configure -} - -src_install() { - cmake_src_install - - # remove some scripts we don't need at all - rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql} - rm -f "${D}"/usr/sbin/bareos - - # remove timelimit to fix #778557 - rm -f "${D}"/usr/{,s}bin/timelimit - - # remove upstream init scripts and systemd units - rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service - - # rename statically linked apps - if use clientonly && use static ; then - pushd "${D}"/usr/sbin || die - mv static-bareos-fd bareos-fd || die - mv static-bconsole bconsole || die - popd || die - fi - - # extra files which 'make install' doesn't cover - if ! use clientonly; then - # the logrotate configuration - # (now unconditional wrt bug #258187) - diropts -m0755 - insinto /etc/logrotate.d - insopts -m0644 - newins "${S}"/core/scripts/logrotate bareos - - # the logwatch scripts - if use logwatch; then - diropts -m0750 - dodir /etc/log.d/scripts/services - dodir /etc/log.d/scripts/shared - dodir /etc/log.d/conf/logfiles - dodir /etc/log.d/conf/services - pushd "${S}"/core/scripts/logwatch >&/dev/null || die - - into /etc/log.d/scripts/services - dobin bareos - - into /etc/log.d/scripts/shared - dobin applybareosdate - - insinto /etc/log.d/conf/logfiles - newins logfile.bareos.conf bareos.conf - - insinto /etc/log.d/conf/services - newins services.bareos.conf bareos.conf - - popd >&/dev/null || die - fi - fi - - rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* - if use clientonly || ! use director; then - rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* - rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* - rm -vf "${D}"/usr/share/man/man1/bsmtp.1* - rm -vf "${D}"/usr/share/man/man8/bwild.8* - rm -vf "${D}"/usr/share/man/man8/bregex.8* - rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* - rm -vf "${D}"/usr/libexec/bareos/create_*_database - rm -vf "${D}"/usr/libexec/bareos/drop_*_database - rm -vf "${D}"/usr/libexec/bareos/make_*_tables - rm -vf "${D}"/usr/libexec/bareos/update_*_tables - rm -vf "${D}"/usr/libexec/bareos/drop_*_tables - rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges - rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup - fi - if use clientonly || ! use storage-daemon; then - rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* - rm -vf "${D}"/usr/share/man/man8/bcopy.8* - rm -vf "${D}"/usr/share/man/man8/bextract.8* - rm -vf "${D}"/usr/share/man/man8/bls.8* - rm -vf "${D}"/usr/share/man/man8/bscan.8* - rm -vf "${D}"/usr/share/man/man8/btape.8* - rm -vf "${D}"/usr/libexec/bareos/disk-changer - rm -vf "${D}"/usr/libexec/bareos/mtx-changer - rm -vf "${D}"/usr/libexec/bareos/dvd-handler - rm -vf "${D}"/etc/bareos/mtx-changer.conf - fi - if ! use scsi-crypto; then - rm -vf "${D}"/usr/share/man/man8/bscrypto.8* - fi - - # documentation - dodoc README.md - dodoc core/README.configsubdirectories - use glusterfs dodoc core/README.glusterfs - use ndmp && dodoc core/README.NDMP - use scsi-crypto && dodoc core/README.scsicrypto - - # vim-files - if use vim-syntax; then - insinto /usr/share/vim/vimfiles/syntax - doins core/scripts/bareos.vim - insinto /usr/share/vim/vimfiles/ftdetect - newins core/scripts/filetype.vim bareos_ft.vim - fi - - # setup init scripts - myscripts="bareos-fd" - if ! use clientonly; then - if use director; then - myscripts+=" bareos-dir" - fi - if use storage-daemon; then - myscripts+=" bareos-sd" - fi - fi - for script in ${myscripts}; do - # copy over init script and config to a temporary location - # so we can modify them as needed - cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" - cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" - - # now set the database dependency for the director init script - case "${script}" in - bareos-dir) - sed -i -e "s:%databasetypes%:${mydbtypes[*]}:" "${T}/${script}".confd || die - ;; - *) - ;; - esac - - # install init script and config - newinitd "${T}/${script}".initd "${script}" - newconfd "${T}/${script}".confd "${script}" - done - - # install systemd unit files - if use systemd; then - if ! use clientonly; then - use director && systemd_dounit "${FILESDIR}"/bareos-dir.service - use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service - fi - systemd_dounit "${FILESDIR}"/bareos-fd.service - fi - - # make sure the working directory exists - diropts -m0750 - keepdir /var/lib/bareos - keepdir /var/lib/bareos/storage - - diropts -m0755 - keepdir /var/log/bareos - - newtmpfiles "${FILESDIR}"/tmpfiles.d-bareos.conf bareos.conf - - # make sure bareos group can execute bareos libexec scripts - fowners -R root:bareos /usr/libexec/bareos -} - -pkg_postinst() { - tmpfiles_process bareos.conf - - if use clientonly; then - fowners root:bareos /var/lib/bareos - else - fowners bareos:bareos /var/lib/bareos - fi - - if ! use clientonly && use director; then - einfo - einfo "If this is a new install, you must create the database:" - if use postgres; then - einfo - einfo "For postgresql:" - einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" - einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" - einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" - fi - if use mysql; then - einfo - einfo "For mysql:" - einfo - einfo " Make sure root has direct access to your mysql server. You may want to" - einfo " create a /root/.my.cnf file with" - einfo " [client]" - einfo " user=root" - einfo " password=YourPasswordForAccessingMysqlAsRoot" - einfo " before running:" - einfo " /usr/libexec/bareos/create_bareos_database mysql" - einfo " /usr/libexec/bareos/make_bareos_tables mysql" - einfo " /usr/libexec/bareos/grant_bareos_privileges mysql" - fi - einfo - fi - - if use sqlite; then - einfo - einfo "Be aware that Bareos does not officially support SQLite database." - einfo "Best use it only for a client-only installation. See Bug #445540." - einfo - einfo "It is strongly recommended to use either postgresql or mysql as" - einfo "catalog database backend." - einfo - fi -} diff --git a/app-backup/bareos/bareos-19.2.12.ebuild b/app-backup/bareos/bareos-19.2.12.ebuild new file mode 100644 index 000000000000..d722ad0369d4 --- /dev/null +++ b/app-backup/bareos/bareos-19.2.12.ebuild @@ -0,0 +1,382 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} ) +CMAKE_WARN_UNUSED_CLI=no +#CMAKE_REMOVE_MODULES=yes + +inherit python-any-r1 systemd cmake tmpfiles + +DESCRIPTION="Featureful client/server network backup suite" +HOMEPAGE="https://www.bareos.org/" +SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" +RESTRICT="mirror" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="X acl ceph clientonly +director glusterfs ipv6 jansson lmdb + logwatch mysql ndmp +postgres readline scsi-crypto + sqlite static +storage-daemon systemd tcpd vim-syntax xattr" + +# get cmake variables from core/cmake/BareosSetVariableDefaults.cmake +DEPEND=" + !app-backup/bacula + acct-group/${PN} + !x86? ( + ceph? ( sys-cluster/ceph ) + ) + glusterfs? ( sys-cluster/glusterfs ) + lmdb? ( dev-db/lmdb ) + dev-libs/gmp:0 + !clientonly? ( + acct-user/${PN} + postgres? ( dev-db/postgresql:*[threads] ) + mysql? ( virtual/mysql ) + sqlite? ( dev-db/sqlite:3 ) + director? ( + virtual/mta + jansson? ( dev-libs/jansson:= ) + ) + ) + logwatch? ( sys-apps/logwatch ) + ndmp? ( net-libs/rpcsvc-proto ) + tcpd? ( sys-apps/tcp-wrappers ) + readline? ( sys-libs/readline:0 ) + static? ( + acl? ( virtual/acl[static-libs] ) + sys-libs/zlib[static-libs] + dev-libs/lzo[static-libs] + sys-libs/ncurses:=[static-libs] + dev-libs/openssl:0=[static-libs] + ) + !static? ( + acl? ( virtual/acl ) + dev-libs/lzo + dev-libs/openssl:0= + sys-libs/ncurses:= + sys-libs/zlib + ) + " +RDEPEND="${DEPEND} + !clientonly? ( + storage-daemon? ( + sys-block/mtx + app-arch/mt-st + ) + ) + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) + " +BDEPEND="${PYTHON_DEPS}" + +REQUIRED_USE=" + !clientonly? ( || ( mysql postgres sqlite ) ) + static? ( clientonly ) + x86? ( !ceph ) +" + +S=${WORKDIR}/${PN}-Release-${PV} + +src_prepare() { + use mysql && export mydbtypes+=( mysql ) + use postgres && export mydbtypes+=( postgresql ) + use sqlite && export mydbtypes+=( sqlite ) + + # enables default database driver in catalog + pushd core/src/defaultconfigs >&/dev/null || die + sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE_WITH_DATABASE_DRIVER_XXX/d' $(grep -rl XXX_REPLACE_WITH_DATABASE_DRIVER_XXX) \ + || die "sed on MyCatalog.conf.in failed" + popd >&/dev/null || die + + # fix gentoo version detection + eapply -p0 "${FILESDIR}/${PN}-cmake-gentoo.patch" + + # fix missing DESTDIR in symlink creation + sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt" + + # disable dird and stored plugins, because of + # py2 dependency + cd "${S}/core/src/plugins" + cmake_comment_add_subdirectory dird + cmake_comment_add_subdirectory stored + cd - + + CMAKE_USE_DIR="$S/core" + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=() + + CMAKE_USE_DIR="$S/core" + + pushd core/platforms >&/dev/null || die + cmake_comment_add_subdirectory '${DISTNAME}' + popd >&/dev/null || die + + if use clientonly; then + mycmakeargs+=( + -Dclient-only=ON + -Dstatic-cons=$(usex static) + -Dstatic-fd=$(usex static) + ) + fi + + for useflag in acl ipv6 ndmp scsi-crypto \ + systemd mysql lmdb; do + mycmakeargs+=( -D$useflag=$(usex $useflag) ) + done + + mycmakeargs+=( + -DHAVE_PYTHON=0 + -DDEFAULT_DB_TYPE=${mydbtypes[0]} + -Darchivedir=/var/lib/bareos/storage + -Dbackenddir=/usr/$(get_libdir)/${PN}/backend + -Dbasename="`hostname -s`" + -Dbatch-insert=yes + -Dbsrdir=/var/lib/bareos/bsr + -Dconfdir=/etc/bareos + -Dcoverage=no + -Ddb_password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` + -Ddir-group=bareos + -Ddir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Ddir-user=bareos + -Ddocdir=/usr/share/doc/${PF} + -Ddynamic-cats-backends=yes + -Ddynamic-storage-backends=yes + -Dfd-group=bareos + -Dfd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dfd-user=root + -Dhost=${CHOST} + -Dhostname="`hostname -s`" + -Dhtmldir=/usr/share/doc/${PF}/html + -Dlibdir=/usr/$(get_libdir) + -Dlogdir=/var/log/bareos + -Dmandir=/usr/share/man + -Dmon-dir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dmon-fd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dmon-sd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dmysql=$(usex mysql) + -Dopenssl=yes + -Dpiddir=/run/bareos + -Dplugindir=/usr/$(get_libdir)/${PN}/plugin + -Dpostgresql=$(usex postgres) + -Dsbin-perm=0755 + -Dsbindir=/usr/sbin + -Dscriptdir=/usr/libexec/bareos + -Dsd-group=bareos + -Dsd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dsd-user=root + -Dsqlite3=$(usex sqlite) + -Dsubsysdir=/run/lock/subsys + -Dsysconfdir=/etc + -Dworkingdir=/var/lib/bareos + -Dx=$(usex X) + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + # remove some scripts we don't need at all + rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql} + rm -f "${D}"/usr/sbin/bareos + + # remove timelimit to fix #778557 + rm -f "${D}"/usr/{,s}bin/timelimit + + # remove upstream init scripts and systemd units + rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service + + # rename statically linked apps + if use clientonly && use static ; then + pushd "${D}"/usr/sbin || die + mv static-bareos-fd bareos-fd || die + mv static-bconsole bconsole || die + popd || die + fi + + # extra files which 'make install' doesn't cover + if ! use clientonly; then + # the logrotate configuration + # (now unconditional wrt bug #258187) + diropts -m0755 + insinto /etc/logrotate.d + insopts -m0644 + newins "${S}"/core/scripts/logrotate bareos + + # the logwatch scripts + if use logwatch; then + diropts -m0750 + dodir /etc/log.d/scripts/services + dodir /etc/log.d/scripts/shared + dodir /etc/log.d/conf/logfiles + dodir /etc/log.d/conf/services + pushd "${S}"/core/scripts/logwatch >&/dev/null || die + + into /etc/log.d/scripts/services + dobin bareos + + into /etc/log.d/scripts/shared + dobin applybareosdate + + insinto /etc/log.d/conf/logfiles + newins logfile.bareos.conf bareos.conf + + insinto /etc/log.d/conf/services + newins services.bareos.conf bareos.conf + + popd >&/dev/null || die + fi + fi + + rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* + if use clientonly || ! use director; then + rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* + rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* + rm -vf "${D}"/usr/share/man/man1/bsmtp.1* + rm -vf "${D}"/usr/share/man/man8/bwild.8* + rm -vf "${D}"/usr/share/man/man8/bregex.8* + rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* + rm -vf "${D}"/usr/libexec/bareos/create_*_database + rm -vf "${D}"/usr/libexec/bareos/drop_*_database + rm -vf "${D}"/usr/libexec/bareos/make_*_tables + rm -vf "${D}"/usr/libexec/bareos/update_*_tables + rm -vf "${D}"/usr/libexec/bareos/drop_*_tables + rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges + rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup + fi + if use clientonly || ! use storage-daemon; then + rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* + rm -vf "${D}"/usr/share/man/man8/bcopy.8* + rm -vf "${D}"/usr/share/man/man8/bextract.8* + rm -vf "${D}"/usr/share/man/man8/bls.8* + rm -vf "${D}"/usr/share/man/man8/bscan.8* + rm -vf "${D}"/usr/share/man/man8/btape.8* + rm -vf "${D}"/usr/libexec/bareos/disk-changer + rm -vf "${D}"/usr/libexec/bareos/mtx-changer + rm -vf "${D}"/usr/libexec/bareos/dvd-handler + rm -vf "${D}"/etc/bareos/mtx-changer.conf + fi + if ! use scsi-crypto; then + rm -vf "${D}"/usr/share/man/man8/bscrypto.8* + fi + + # documentation + dodoc README.md + dodoc core/README.configsubdirectories + use glusterfs dodoc core/README.glusterfs + use ndmp && dodoc core/README.NDMP + use scsi-crypto && dodoc core/README.scsicrypto + + # vim-files + if use vim-syntax; then + insinto /usr/share/vim/vimfiles/syntax + doins core/scripts/bareos.vim + insinto /usr/share/vim/vimfiles/ftdetect + newins core/scripts/filetype.vim bareos_ft.vim + fi + + # setup init scripts + myscripts="bareos-fd" + if ! use clientonly; then + if use director; then + myscripts+=" bareos-dir" + fi + if use storage-daemon; then + myscripts+=" bareos-sd" + fi + fi + for script in ${myscripts}; do + # copy over init script and config to a temporary location + # so we can modify them as needed + cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" + cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" + + # now set the database dependency for the director init script + case "${script}" in + bareos-dir) + sed -i -e "s:%databasetypes%:${mydbtypes[*]}:" "${T}/${script}".confd || die + ;; + *) + ;; + esac + + # install init script and config + newinitd "${T}/${script}".initd "${script}" + newconfd "${T}/${script}".confd "${script}" + done + + # install systemd unit files + if use systemd; then + if ! use clientonly; then + use director && systemd_dounit "${FILESDIR}"/bareos-dir.service + use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service + fi + systemd_dounit "${FILESDIR}"/bareos-fd.service + fi + + # make sure the working directory exists + diropts -m0750 + keepdir /var/lib/bareos + keepdir /var/lib/bareos/storage + + diropts -m0755 + keepdir /var/log/bareos + + newtmpfiles "${FILESDIR}"/tmpfiles.d-bareos.conf bareos.conf + + # make sure bareos group can execute bareos libexec scripts + fowners -R root:bareos /usr/libexec/bareos +} + +pkg_postinst() { + tmpfiles_process bareos.conf + + if use clientonly; then + fowners root:bareos /var/lib/bareos + else + fowners bareos:bareos /var/lib/bareos + fi + + if ! use clientonly && use director; then + einfo + einfo "If this is a new install, you must create the database:" + if use postgres; then + einfo + einfo "For postgresql:" + einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" + einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" + einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" + fi + if use mysql; then + einfo + einfo "For mysql:" + einfo + einfo " Make sure root has direct access to your mysql server. You may want to" + einfo " create a /root/.my.cnf file with" + einfo " [client]" + einfo " user=root" + einfo " password=YourPasswordForAccessingMysqlAsRoot" + einfo " before running:" + einfo " /usr/libexec/bareos/create_bareos_database mysql" + einfo " /usr/libexec/bareos/make_bareos_tables mysql" + einfo " /usr/libexec/bareos/grant_bareos_privileges mysql" + fi + einfo + fi + + if use sqlite; then + einfo + einfo "Be aware that Bareos does not officially support SQLite database." + einfo "Best use it only for a client-only installation. See Bug #445540." + einfo + einfo "It is strongly recommended to use either postgresql or mysql as" + einfo "catalog database backend." + einfo + fi +} diff --git a/app-backup/bareos/bareos-20.0.5.ebuild b/app-backup/bareos/bareos-20.0.5.ebuild deleted file mode 100644 index a678aef69a5f..000000000000 --- a/app-backup/bareos/bareos-20.0.5.ebuild +++ /dev/null @@ -1,394 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8..10} ) -CMAKE_WARN_UNUSED_CLI=no -#CMAKE_REMOVE_MODULES=yes - -inherit python-any-r1 systemd cmake tmpfiles - -DESCRIPTION="Featureful client/server network backup suite" -HOMEPAGE="https://www.bareos.org/" -SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" -RESTRICT="mirror" - -LICENSE="AGPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="X acl ceph clientonly +director glusterfs ipv6 jansson lmdb - logwatch mysql ndmp +postgres readline scsi-crypto - sqlite static +storage-daemon systemd tcpd vim-syntax vmware xattr" - -# get cmake variables from core/cmake/BareosSetVariableDefaults.cmake -DEPEND=" - !app-backup/bacula - acct-group/${PN} - !x86? ( - ceph? ( sys-cluster/ceph ) - ) - glusterfs? ( sys-cluster/glusterfs ) - lmdb? ( dev-db/lmdb ) - dev-libs/gmp:0 - !clientonly? ( - acct-user/${PN} - postgres? ( dev-db/postgresql:*[threads] ) - mysql? ( virtual/mysql ) - sqlite? ( dev-db/sqlite:3 ) - director? ( - virtual/mta - jansson? ( dev-libs/jansson:= ) - ) - ) - logwatch? ( sys-apps/logwatch ) - ndmp? ( net-libs/rpcsvc-proto ) - tcpd? ( sys-apps/tcp-wrappers ) - readline? ( sys-libs/readline:0 ) - static? ( - acl? ( virtual/acl[static-libs] ) - sys-libs/zlib[static-libs] - dev-libs/lzo[static-libs] - sys-libs/ncurses:=[static-libs] - dev-libs/openssl:0=[static-libs] - ) - !static? ( - acl? ( virtual/acl ) - dev-libs/lzo - dev-libs/openssl:0= - sys-libs/ncurses:= - sys-libs/zlib - ) - " -RDEPEND="${DEPEND} - !clientonly? ( - storage-daemon? ( - sys-block/mtx - app-arch/mt-st - ) - ) - vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) - " -BDEPEND="${PYTHON_DEPS}" - -REQUIRED_USE=" - !clientonly? ( || ( mysql postgres sqlite ) ) - static? ( clientonly ) - x86? ( !ceph ) -" - -S=${WORKDIR}/${PN}-Release-${PV} - -src_prepare() { - use mysql && export mydbtypes+=( mysql ) - use postgres && export mydbtypes+=( postgresql ) - use sqlite && export mydbtypes+=( sqlite ) - - # enables default database driver in catalog - pushd core/src/defaultconfigs >&/dev/null || die - sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE_WITH_DATABASE_DRIVER_XXX/d' $(grep -rl XXX_REPLACE_WITH_DATABASE_DRIVER_XXX) \ - || die "sed on MyCatalog.conf.in failed" - popd >&/dev/null || die - - # fix gentoo platform support - eapply -p1 "${FILESDIR}/${PN}-20.0.2-cmake-gentoo.patch" - - # fix missing DESTDIR in symlink creation - sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt" - - # disable dird and stored plugins, because of - # py2 dependency - cd "${S}/core/src/plugins" - cmake_comment_add_subdirectory dird - cmake_comment_add_subdirectory stored - cd - - - CMAKE_USE_DIR="$S/core" - cmake_src_prepare -} - -src_configure() { - local mycmakeargs=() - - CMAKE_USE_DIR="$S/core" - - pushd core/platforms >&/dev/null || die - cmake_comment_add_subdirectory '${DISTNAME}' - popd >&/dev/null || die - - if use clientonly; then - mycmakeargs+=( - -Dclient-only=ON - -Dstatic-cons=$(usex static) - -Dstatic-fd=$(usex static) - ) - fi - - for useflag in acl ipv6 ndmp scsi-crypto \ - systemd mysql lmdb; do - mycmakeargs+=( -D$useflag=$(usex $useflag) ) - done - - mycmakeargs+=( - -DHAVE_PYTHON=0 - -DDEFAULT_DB_TYPE=${mydbtypes[0]} - -Darchivedir=/var/lib/bareos/storage - -Dbackenddir=/usr/$(get_libdir)/${PN}/backend - -Dbasename="`hostname -s`" - -Dbatch-insert=yes - -Dbsrdir=/var/lib/bareos/bsr - -Dconfdir=/etc/bareos - -Dcoverage=no - -Ddb_password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` - -Ddir-group=bareos - -Ddir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Ddir-user=bareos - -Ddocdir=/usr/share/doc/${PF} - -Ddynamic-cats-backends=yes - -Ddynamic-storage-backends=yes - -Dfd-group=bareos - -Dfd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dfd-user=root - -Dhost=${CHOST} - -Dhostname="`hostname -s`" - -Dhtmldir=/usr/share/doc/${PF}/html - -Dlibdir=/usr/$(get_libdir) - -Dlogdir=/var/log/bareos - -Dmandir=/usr/share/man - -Dmon-dir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dmon-fd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dmon-sd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dmysql=$(usex mysql) - -Dopenssl=yes - -Dpiddir=/run/bareos - -Dplugindir=/usr/$(get_libdir)/${PN}/plugin - -Dpostgresql=$(usex postgres) - -Dsbin-perm=0755 - -Dsbindir=/usr/sbin - -Dscriptdir=/usr/libexec/bareos - -Dsd-group=bareos - -Dsd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dsd-user=root - -Dsqlite3=$(usex sqlite) - -Dsubsysdir=/run/lock/subsys - -Dsysconfdir=/etc - -Dworkingdir=/var/lib/bareos - -Dx=$(usex X) - ) - - # disable droplet support for now as it does not build with gcc 10 - # ... and this is a bundled lib, which should have its own package - cd core && cmake_comment_add_subdirectory "src/droplet" - - cmake_src_configure -} - -src_install() { - cmake_src_install - - # remove some scripts we don't need at all - rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql} - rm -f "${D}"/usr/sbin/bareos - - # remove upstream init scripts and systemd units - rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service - - # remove misc stuff we do not need in production - rm -f "${D}"/etc/bareos/bareos-regress.conf - rm -f "${D}"/etc/logrotate.d/bareos-dir - - # get rid of py2 stuff - rm -rf "$D"/usr/lib64/python2.7 - rm -f "$D"/usr/lib64/bareos/plugin/python-fd.so - if ! use vmware; then - rm -f "$D"/usr/lib64/bareos/plugin/{BareosFdPluginVMware.py,bareos-fd-vmware.py} - fi - - # rename statically linked apps - if use clientonly && use static ; then - pushd "${D}"/usr/sbin || die - mv static-bareos-fd bareos-fd || die - mv static-bconsole bconsole || die - popd || die - fi - - # extra files which 'make install' doesn't cover - if ! use clientonly; then - # the logrotate configuration - # (now unconditional wrt bug #258187) - diropts -m0755 - insinto /etc/logrotate.d - insopts -m0644 - newins "${S}"/core/scripts/logrotate bareos - - # the logwatch scripts - if use logwatch; then - diropts -m0750 - dodir /etc/log.d/scripts/services - dodir /etc/log.d/scripts/shared - dodir /etc/log.d/conf/logfiles - dodir /etc/log.d/conf/services - pushd "${S}"/core/scripts/logwatch >&/dev/null || die - - into /etc/log.d/scripts/services - dobin bareos - - into /etc/log.d/scripts/shared - dobin applybareosdate - - insinto /etc/log.d/conf/logfiles - newins logfile.bareos.conf bareos.conf - - insinto /etc/log.d/conf/services - newins services.bareos.conf bareos.conf - - popd >&/dev/null || die - fi - fi - - rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* - if use clientonly || ! use director; then - rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* - rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* - rm -vf "${D}"/usr/share/man/man1/bsmtp.1* - rm -vf "${D}"/usr/share/man/man8/bwild.8* - rm -vf "${D}"/usr/share/man/man8/bregex.8* - rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* - rm -vf "${D}"/usr/libexec/bareos/create_*_database - rm -vf "${D}"/usr/libexec/bareos/drop_*_database - rm -vf "${D}"/usr/libexec/bareos/make_*_tables - rm -vf "${D}"/usr/libexec/bareos/update_*_tables - rm -vf "${D}"/usr/libexec/bareos/drop_*_tables - rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges - rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup - fi - if use clientonly || ! use storage-daemon; then - rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* - rm -vf "${D}"/usr/share/man/man8/bcopy.8* - rm -vf "${D}"/usr/share/man/man8/bextract.8* - rm -vf "${D}"/usr/share/man/man8/bls.8* - rm -vf "${D}"/usr/share/man/man8/bscan.8* - rm -vf "${D}"/usr/share/man/man8/btape.8* - rm -vf "${D}"/usr/libexec/bareos/disk-changer - rm -vf "${D}"/usr/libexec/bareos/mtx-changer - rm -vf "${D}"/usr/libexec/bareos/dvd-handler - rm -vf "${D}"/etc/bareos/mtx-changer.conf - fi - if ! use scsi-crypto; then - rm -vf "${D}"/usr/share/man/man8/bscrypto.8* - fi - - # documentation - dodoc README.md - dodoc core/README.configsubdirectories - use glusterfs dodoc core/README.glusterfs - use ndmp && dodoc core/README.NDMP - use scsi-crypto && dodoc core/README.scsicrypto - - # vim-files - if use vim-syntax; then - insinto /usr/share/vim/vimfiles/syntax - doins core/scripts/bareos.vim - insinto /usr/share/vim/vimfiles/ftdetect - newins core/scripts/filetype.vim bareos_ft.vim - fi - - # setup init scripts - myscripts="bareos-fd" - if ! use clientonly; then - if use director; then - myscripts+=" bareos-dir" - fi - if use storage-daemon; then - myscripts+=" bareos-sd" - fi - fi - for script in ${myscripts}; do - # copy over init script and config to a temporary location - # so we can modify them as needed - cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" - cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" - - # now set the database dependency for the director init script - case "${script}" in - bareos-dir) - sed -i -e "s:%databasetypes%:${mydbtypes[*]}:" "${T}/${script}".confd || die - ;; - *) - ;; - esac - - # install init script and config - newinitd "${T}/${script}".initd "${script}" - newconfd "${T}/${script}".confd "${script}" - done - - # install systemd unit files - if use systemd; then - if ! use clientonly; then - use director && systemd_dounit "${FILESDIR}"/bareos-dir.service - use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service - fi - systemd_dounit "${FILESDIR}"/bareos-fd.service - fi - - # make sure the working directory exists - diropts -m0750 - keepdir /var/lib/bareos - keepdir /var/lib/bareos/storage - - diropts -m0755 - keepdir /var/log/bareos - - newtmpfiles "${FILESDIR}"/tmpfiles.d-bareos.conf bareos.conf - - # make sure bareos group can execute bareos libexec scripts - fowners -R root:bareos /usr/libexec/bareos -} - -pkg_postinst() { - tmpfiles_process bareos.conf - - if use clientonly; then - fowners root:bareos /var/lib/bareos - else - fowners bareos:bareos /var/lib/bareos - fi - - if ! use clientonly && use director; then - einfo - einfo "If this is a new install, you must create the database:" - if use postgres; then - einfo - einfo "For postgresql:" - einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" - einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" - einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" - fi - if use mysql; then - einfo - einfo "For mysql:" - einfo - einfo " Make sure root has direct access to your mysql server. You may want to" - einfo " create a /root/.my.cnf file with" - einfo " [client]" - einfo " user=root" - einfo " password=YourPasswordForAccessingMysqlAsRoot" - einfo " before running:" - einfo " /usr/libexec/bareos/create_bareos_database mysql" - einfo " /usr/libexec/bareos/make_bareos_tables mysql" - einfo " /usr/libexec/bareos/grant_bareos_privileges mysql" - fi - einfo - fi - - if use sqlite; then - einfo - einfo "Be aware that Bareos does not officially support SQLite database." - einfo "Best use it only for a client-only installation. See Bug #445540." - einfo - einfo "It is strongly recommended to use either postgresql or mysql as" - einfo "catalog database backend." - einfo - fi -} diff --git a/app-backup/bareos/bareos-20.0.6.ebuild b/app-backup/bareos/bareos-20.0.6.ebuild new file mode 100644 index 000000000000..a678aef69a5f --- /dev/null +++ b/app-backup/bareos/bareos-20.0.6.ebuild @@ -0,0 +1,394 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} ) +CMAKE_WARN_UNUSED_CLI=no +#CMAKE_REMOVE_MODULES=yes + +inherit python-any-r1 systemd cmake tmpfiles + +DESCRIPTION="Featureful client/server network backup suite" +HOMEPAGE="https://www.bareos.org/" +SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" +RESTRICT="mirror" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="X acl ceph clientonly +director glusterfs ipv6 jansson lmdb + logwatch mysql ndmp +postgres readline scsi-crypto + sqlite static +storage-daemon systemd tcpd vim-syntax vmware xattr" + +# get cmake variables from core/cmake/BareosSetVariableDefaults.cmake +DEPEND=" + !app-backup/bacula + acct-group/${PN} + !x86? ( + ceph? ( sys-cluster/ceph ) + ) + glusterfs? ( sys-cluster/glusterfs ) + lmdb? ( dev-db/lmdb ) + dev-libs/gmp:0 + !clientonly? ( + acct-user/${PN} + postgres? ( dev-db/postgresql:*[threads] ) + mysql? ( virtual/mysql ) + sqlite? ( dev-db/sqlite:3 ) + director? ( + virtual/mta + jansson? ( dev-libs/jansson:= ) + ) + ) + logwatch? ( sys-apps/logwatch ) + ndmp? ( net-libs/rpcsvc-proto ) + tcpd? ( sys-apps/tcp-wrappers ) + readline? ( sys-libs/readline:0 ) + static? ( + acl? ( virtual/acl[static-libs] ) + sys-libs/zlib[static-libs] + dev-libs/lzo[static-libs] + sys-libs/ncurses:=[static-libs] + dev-libs/openssl:0=[static-libs] + ) + !static? ( + acl? ( virtual/acl ) + dev-libs/lzo + dev-libs/openssl:0= + sys-libs/ncurses:= + sys-libs/zlib + ) + " +RDEPEND="${DEPEND} + !clientonly? ( + storage-daemon? ( + sys-block/mtx + app-arch/mt-st + ) + ) + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) + " +BDEPEND="${PYTHON_DEPS}" + +REQUIRED_USE=" + !clientonly? ( || ( mysql postgres sqlite ) ) + static? ( clientonly ) + x86? ( !ceph ) +" + +S=${WORKDIR}/${PN}-Release-${PV} + +src_prepare() { + use mysql && export mydbtypes+=( mysql ) + use postgres && export mydbtypes+=( postgresql ) + use sqlite && export mydbtypes+=( sqlite ) + + # enables default database driver in catalog + pushd core/src/defaultconfigs >&/dev/null || die + sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE_WITH_DATABASE_DRIVER_XXX/d' $(grep -rl XXX_REPLACE_WITH_DATABASE_DRIVER_XXX) \ + || die "sed on MyCatalog.conf.in failed" + popd >&/dev/null || die + + # fix gentoo platform support + eapply -p1 "${FILESDIR}/${PN}-20.0.2-cmake-gentoo.patch" + + # fix missing DESTDIR in symlink creation + sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt" + + # disable dird and stored plugins, because of + # py2 dependency + cd "${S}/core/src/plugins" + cmake_comment_add_subdirectory dird + cmake_comment_add_subdirectory stored + cd - + + CMAKE_USE_DIR="$S/core" + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=() + + CMAKE_USE_DIR="$S/core" + + pushd core/platforms >&/dev/null || die + cmake_comment_add_subdirectory '${DISTNAME}' + popd >&/dev/null || die + + if use clientonly; then + mycmakeargs+=( + -Dclient-only=ON + -Dstatic-cons=$(usex static) + -Dstatic-fd=$(usex static) + ) + fi + + for useflag in acl ipv6 ndmp scsi-crypto \ + systemd mysql lmdb; do + mycmakeargs+=( -D$useflag=$(usex $useflag) ) + done + + mycmakeargs+=( + -DHAVE_PYTHON=0 + -DDEFAULT_DB_TYPE=${mydbtypes[0]} + -Darchivedir=/var/lib/bareos/storage + -Dbackenddir=/usr/$(get_libdir)/${PN}/backend + -Dbasename="`hostname -s`" + -Dbatch-insert=yes + -Dbsrdir=/var/lib/bareos/bsr + -Dconfdir=/etc/bareos + -Dcoverage=no + -Ddb_password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` + -Ddir-group=bareos + -Ddir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Ddir-user=bareos + -Ddocdir=/usr/share/doc/${PF} + -Ddynamic-cats-backends=yes + -Ddynamic-storage-backends=yes + -Dfd-group=bareos + -Dfd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dfd-user=root + -Dhost=${CHOST} + -Dhostname="`hostname -s`" + -Dhtmldir=/usr/share/doc/${PF}/html + -Dlibdir=/usr/$(get_libdir) + -Dlogdir=/var/log/bareos + -Dmandir=/usr/share/man + -Dmon-dir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dmon-fd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dmon-sd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dmysql=$(usex mysql) + -Dopenssl=yes + -Dpiddir=/run/bareos + -Dplugindir=/usr/$(get_libdir)/${PN}/plugin + -Dpostgresql=$(usex postgres) + -Dsbin-perm=0755 + -Dsbindir=/usr/sbin + -Dscriptdir=/usr/libexec/bareos + -Dsd-group=bareos + -Dsd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dsd-user=root + -Dsqlite3=$(usex sqlite) + -Dsubsysdir=/run/lock/subsys + -Dsysconfdir=/etc + -Dworkingdir=/var/lib/bareos + -Dx=$(usex X) + ) + + # disable droplet support for now as it does not build with gcc 10 + # ... and this is a bundled lib, which should have its own package + cd core && cmake_comment_add_subdirectory "src/droplet" + + cmake_src_configure +} + +src_install() { + cmake_src_install + + # remove some scripts we don't need at all + rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql} + rm -f "${D}"/usr/sbin/bareos + + # remove upstream init scripts and systemd units + rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service + + # remove misc stuff we do not need in production + rm -f "${D}"/etc/bareos/bareos-regress.conf + rm -f "${D}"/etc/logrotate.d/bareos-dir + + # get rid of py2 stuff + rm -rf "$D"/usr/lib64/python2.7 + rm -f "$D"/usr/lib64/bareos/plugin/python-fd.so + if ! use vmware; then + rm -f "$D"/usr/lib64/bareos/plugin/{BareosFdPluginVMware.py,bareos-fd-vmware.py} + fi + + # rename statically linked apps + if use clientonly && use static ; then + pushd "${D}"/usr/sbin || die + mv static-bareos-fd bareos-fd || die + mv static-bconsole bconsole || die + popd || die + fi + + # extra files which 'make install' doesn't cover + if ! use clientonly; then + # the logrotate configuration + # (now unconditional wrt bug #258187) + diropts -m0755 + insinto /etc/logrotate.d + insopts -m0644 + newins "${S}"/core/scripts/logrotate bareos + + # the logwatch scripts + if use logwatch; then + diropts -m0750 + dodir /etc/log.d/scripts/services + dodir /etc/log.d/scripts/shared + dodir /etc/log.d/conf/logfiles + dodir /etc/log.d/conf/services + pushd "${S}"/core/scripts/logwatch >&/dev/null || die + + into /etc/log.d/scripts/services + dobin bareos + + into /etc/log.d/scripts/shared + dobin applybareosdate + + insinto /etc/log.d/conf/logfiles + newins logfile.bareos.conf bareos.conf + + insinto /etc/log.d/conf/services + newins services.bareos.conf bareos.conf + + popd >&/dev/null || die + fi + fi + + rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* + if use clientonly || ! use director; then + rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* + rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* + rm -vf "${D}"/usr/share/man/man1/bsmtp.1* + rm -vf "${D}"/usr/share/man/man8/bwild.8* + rm -vf "${D}"/usr/share/man/man8/bregex.8* + rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* + rm -vf "${D}"/usr/libexec/bareos/create_*_database + rm -vf "${D}"/usr/libexec/bareos/drop_*_database + rm -vf "${D}"/usr/libexec/bareos/make_*_tables + rm -vf "${D}"/usr/libexec/bareos/update_*_tables + rm -vf "${D}"/usr/libexec/bareos/drop_*_tables + rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges + rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup + fi + if use clientonly || ! use storage-daemon; then + rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* + rm -vf "${D}"/usr/share/man/man8/bcopy.8* + rm -vf "${D}"/usr/share/man/man8/bextract.8* + rm -vf "${D}"/usr/share/man/man8/bls.8* + rm -vf "${D}"/usr/share/man/man8/bscan.8* + rm -vf "${D}"/usr/share/man/man8/btape.8* + rm -vf "${D}"/usr/libexec/bareos/disk-changer + rm -vf "${D}"/usr/libexec/bareos/mtx-changer + rm -vf "${D}"/usr/libexec/bareos/dvd-handler + rm -vf "${D}"/etc/bareos/mtx-changer.conf + fi + if ! use scsi-crypto; then + rm -vf "${D}"/usr/share/man/man8/bscrypto.8* + fi + + # documentation + dodoc README.md + dodoc core/README.configsubdirectories + use glusterfs dodoc core/README.glusterfs + use ndmp && dodoc core/README.NDMP + use scsi-crypto && dodoc core/README.scsicrypto + + # vim-files + if use vim-syntax; then + insinto /usr/share/vim/vimfiles/syntax + doins core/scripts/bareos.vim + insinto /usr/share/vim/vimfiles/ftdetect + newins core/scripts/filetype.vim bareos_ft.vim + fi + + # setup init scripts + myscripts="bareos-fd" + if ! use clientonly; then + if use director; then + myscripts+=" bareos-dir" + fi + if use storage-daemon; then + myscripts+=" bareos-sd" + fi + fi + for script in ${myscripts}; do + # copy over init script and config to a temporary location + # so we can modify them as needed + cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd" + cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" + + # now set the database dependency for the director init script + case "${script}" in + bareos-dir) + sed -i -e "s:%databasetypes%:${mydbtypes[*]}:" "${T}/${script}".confd || die + ;; + *) + ;; + esac + + # install init script and config + newinitd "${T}/${script}".initd "${script}" + newconfd "${T}/${script}".confd "${script}" + done + + # install systemd unit files + if use systemd; then + if ! use clientonly; then + use director && systemd_dounit "${FILESDIR}"/bareos-dir.service + use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service + fi + systemd_dounit "${FILESDIR}"/bareos-fd.service + fi + + # make sure the working directory exists + diropts -m0750 + keepdir /var/lib/bareos + keepdir /var/lib/bareos/storage + + diropts -m0755 + keepdir /var/log/bareos + + newtmpfiles "${FILESDIR}"/tmpfiles.d-bareos.conf bareos.conf + + # make sure bareos group can execute bareos libexec scripts + fowners -R root:bareos /usr/libexec/bareos +} + +pkg_postinst() { + tmpfiles_process bareos.conf + + if use clientonly; then + fowners root:bareos /var/lib/bareos + else + fowners bareos:bareos /var/lib/bareos + fi + + if ! use clientonly && use director; then + einfo + einfo "If this is a new install, you must create the database:" + if use postgres; then + einfo + einfo "For postgresql:" + einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" + einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" + einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" + fi + if use mysql; then + einfo + einfo "For mysql:" + einfo + einfo " Make sure root has direct access to your mysql server. You may want to" + einfo " create a /root/.my.cnf file with" + einfo " [client]" + einfo " user=root" + einfo " password=YourPasswordForAccessingMysqlAsRoot" + einfo " before running:" + einfo " /usr/libexec/bareos/create_bareos_database mysql" + einfo " /usr/libexec/bareos/make_bareos_tables mysql" + einfo " /usr/libexec/bareos/grant_bareos_privileges mysql" + fi + einfo + fi + + if use sqlite; then + einfo + einfo "Be aware that Bareos does not officially support SQLite database." + einfo "Best use it only for a client-only installation. See Bug #445540." + einfo + einfo "It is strongly recommended to use either postgresql or mysql as" + einfo "catalog database backend." + einfo + fi +} diff --git a/app-backup/bareos/bareos-21.0.0-r2.ebuild b/app-backup/bareos/bareos-21.0.0-r2.ebuild deleted file mode 100644 index 4baeaaf6c0ec..000000000000 --- a/app-backup/bareos/bareos-21.0.0-r2.ebuild +++ /dev/null @@ -1,388 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8..10} ) -CMAKE_WARN_UNUSED_CLI=no -#CMAKE_REMOVE_MODULES=yes - -inherit python-any-r1 systemd cmake tmpfiles - -DESCRIPTION="Featureful client/server network backup suite" -HOMEPAGE="https://www.bareos.org/" -SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" - -# some tests still fail propably due to missing bits in src_test -> TODO -RESTRICT="mirror test" -#RESTRICT=" -# mirror -# !test? ( test ) -#" - -LICENSE="AGPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="X acl ceph clientonly +director glusterfs ipv6 lmdb - logwatch ndmp readline scsi-crypto - static +storage-daemon systemd tcpd test vim-syntax vmware xattr" - -# get cmake variables from core/cmake/BareosSetVariableDefaults.cmake -DEPEND=" - !app-backup/bacula - acct-group/${PN} - !x86? ( - ceph? ( sys-cluster/ceph ) - ) - glusterfs? ( sys-cluster/glusterfs ) - lmdb? ( dev-db/lmdb ) - dev-libs/gmp:0 - !clientonly? ( - acct-user/${PN} - dev-db/postgresql:*[threads] - director? ( - virtual/mta - ) - ) - logwatch? ( sys-apps/logwatch ) - ndmp? ( net-libs/rpcsvc-proto ) - tcpd? ( sys-apps/tcp-wrappers ) - readline? ( sys-libs/readline:0 ) - static? ( - acl? ( virtual/acl[static-libs] ) - dev-libs/jansson:=[static-libs] - dev-libs/lzo[static-libs] - dev-libs/openssl:0=[static-libs] - sys-libs/ncurses:=[static-libs] - sys-libs/zlib[static-libs] - ) - !static? ( - acl? ( virtual/acl ) - dev-libs/jansson:= - dev-libs/lzo - dev-libs/openssl:0= - sys-libs/ncurses:= - sys-libs/zlib - ) - " -RDEPEND="${DEPEND} - !clientonly? ( - storage-daemon? ( - sys-block/mtx - app-arch/mt-st - ) - ) - vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) - " - -BDEPEND=" - ${PYTHON_DEPS} - test? ( - dev-cpp/gtest - dev-db/postgresql:*[server,threads] - dev-db/mariadb:*[server] - ) -" - -REQUIRED_USE=" - static? ( clientonly ) - x86? ( !ceph ) -" - -S=${WORKDIR}/${PN}-Release-${PV} - -pkg_pretend() { - local active_removed_backend="" - if has_version "=21.0.0 you need to migrate to PostgreSQL" - ewarn "catalog backend using the 'bareos-dbcopy' tool of your current" - ewarn "installation first." - ewarn - die "current catalog backend not supported anymore" - fi -} - -src_test() { - # initialze catalog test database - initdb -D "${T}"/pgsql || die - pg_ctl -w -D "${T}"/pgsql start \ - -o "-h '' -k '${T}'" || die - createuser -h "${T}" bareos || die - createdb -h "${T}" --owner bareos bareos || die - export PGHOST="${T}" - - # initiale mariadb database for backup tests - # $USER must be set and != root - export USER=portage - - default - cmake_src_test - - pg_ctl -w -D "${T}"/pgsql stop || die - rm -rvf "${T}"/pgsql -} - -src_prepare() { - # fix gentoo platform support - eapply -p1 "${FILESDIR}/${PN}-21-cmake-gentoo.patch" - - # fix missing DESTDIR in symlink creation - sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt" - - cmake_src_prepare -} - -src_configure() { - local mycmakeargs=() - - cmake_comment_add_subdirectory webui - - if use clientonly; then - mycmakeargs+=( - -Dclient-only=ON - -Dstatic-cons=$(usex static) - -Dstatic-fd=$(usex static) - ) - fi - - for useflag in acl ipv6 ndmp scsi-crypto \ - systemd lmdb; do - mycmakeargs+=( -D$useflag=$(usex $useflag) ) - done - - mycmakeargs+=( - -DHAVE_PYTHON=0 - -Darchivedir=/var/lib/bareos/storage - -Dbackenddir=/usr/$(get_libdir)/${PN}/backend - -Dbasename="`hostname -s`" - -Dbatch-insert=yes - -Dbsrdir=/var/lib/bareos/bsr - -Dconfdir=/etc/bareos - -Dcoverage=no - -Ddb_password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` - -Ddir-group=bareos - -Ddir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Ddir-user=bareos - -Ddocdir=/usr/share/doc/${PF} - -Ddynamic-cats-backends=yes - -Ddynamic-storage-backends=yes - -Dfd-group=bareos - -Dfd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dfd-user=root - -Dhost=${CHOST} - -Dhostname="`hostname -s`" - -Dhtmldir=/usr/share/doc/${PF}/html - -Dlibdir=/usr/$(get_libdir) - -Dlogdir=/var/log/bareos - -Dmandir=/usr/share/man - -Dmon-dir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dmon-fd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dmon-sd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dopenssl=yes - -Dpiddir=/run/bareos - -Dplugindir=/usr/$(get_libdir)/${PN}/plugin - -Dsbin-perm=0755 - -Dsbindir=/usr/sbin - -Dscriptdir=/usr/libexec/bareos - -Dsd-group=bareos - -Dsd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" - -Dsd-user=root - -Dsubsysdir=/run/lock/subsys - -Dsysconfdir=/etc - -Dworkingdir=/var/lib/bareos - -Dx=$(usex X) - ) - - # disable droplet support for now as it does not build with gcc 10 - # ... and this is a bundled lib, which should have its own package - cd core && cmake_comment_add_subdirectory "src/droplet" - - cmake_src_configure -} - -src_install() { - cmake_src_install - - # remove some scripts we don't need at all - rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd} - rm -f "${D}"/usr/sbin/bareos - - # remove upstream init scripts and systemd units - rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service - - # remove misc stuff we do not need in production - rm -f "${D}"/etc/bareos/bareos-regress.conf - rm -f "${D}"/etc/logrotate.d/bareos-dir - - # get rid of py2 stuff - rm -rf "$D"/usr/lib64/python2.7 || die - rm -f "$D"/usr/lib64/bareos/plugin/python-fd.so || die - if ! use vmware; then - rm -f "$D"/usr/lib64/bareos/plugin/{BareosFdPluginVMware.py,bareos-fd-vmware.py} - fi - - # rename statically linked apps - if use clientonly && use static ; then - pushd "${D}"/usr/sbin || die - mv static-bareos-fd bareos-fd || die - mv static-bconsole bconsole || die - popd || die - fi - - # extra files which 'make install' doesn't cover - if ! use clientonly; then - # the logrotate configuration - # (now unconditional wrt bug #258187) - diropts -m0755 - insinto /etc/logrotate.d - insopts -m0644 - newins "${S}"/core/scripts/logrotate bareos - - # the logwatch scripts - if use logwatch; then - diropts -m0750 - dodir /etc/log.d/scripts/services - dodir /etc/log.d/scripts/shared - dodir /etc/log.d/conf/logfiles - dodir /etc/log.d/conf/services - pushd "${S}"/core/scripts/logwatch >&/dev/null || die - - into /etc/log.d/scripts/services - dobin bareos - - into /etc/log.d/scripts/shared - dobin applybareosdate - - insinto /etc/log.d/conf/logfiles - newins logfile.bareos.conf bareos.conf - - insinto /etc/log.d/conf/services - newins services.bareos.conf bareos.conf - - popd >&/dev/null || die - fi - fi - - rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* - if use clientonly || ! use director; then - rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* - rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* - rm -vf "${D}"/usr/share/man/man1/bsmtp.1* - rm -vf "${D}"/usr/share/man/man8/bwild.8* - rm -vf "${D}"/usr/share/man/man8/bregex.8* - rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* - rm -vf "${D}"/usr/libexec/bareos/create_*_database - rm -vf "${D}"/usr/libexec/bareos/drop_*_database - rm -vf "${D}"/usr/libexec/bareos/make_*_tables - rm -vf "${D}"/usr/libexec/bareos/update_*_tables - rm -vf "${D}"/usr/libexec/bareos/drop_*_tables - rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges - rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup - fi - if use clientonly || ! use storage-daemon; then - rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* - rm -vf "${D}"/usr/share/man/man8/bcopy.8* - rm -vf "${D}"/usr/share/man/man8/bextract.8* - rm -vf "${D}"/usr/share/man/man8/bls.8* - rm -vf "${D}"/usr/share/man/man8/bscan.8* - rm -vf "${D}"/usr/share/man/man8/btape.8* - rm -vf "${D}"/usr/libexec/bareos/disk-changer - rm -vf "${D}"/usr/libexec/bareos/mtx-changer - rm -vf "${D}"/usr/libexec/bareos/dvd-handler - rm -vf "${D}"/etc/bareos/mtx-changer.conf - fi - if ! use scsi-crypto; then - rm -vf "${D}"/usr/share/man/man8/bscrypto.8* - fi - - # documentation - dodoc README.md - dodoc core/README.configsubdirectories - use glusterfs dodoc core/README.glusterfs - use ndmp && dodoc core/README.NDMP - use scsi-crypto && dodoc core/README.scsicrypto - - # vim-files - if use vim-syntax; then - insinto /usr/share/vim/vimfiles/syntax - doins core/scripts/bareos.vim - insinto /usr/share/vim/vimfiles/ftdetect - newins core/scripts/filetype.vim bareos_ft.vim - fi - - # setup init scripts - myscripts="bareos-fd" - if ! use clientonly; then - if use director; then - myscripts+=" bareos-dir" - fi - if use storage-daemon; then - myscripts+=" bareos-sd" - fi - fi - for script in ${myscripts}; do - # install init script and config - newinitd "${FILESDIR}/${script}-21".initd "${script}" - newconfd "${FILESDIR}/${script}-21".confd "${script}" - done - - # install systemd unit files - if use systemd; then - if ! use clientonly; then - use director && systemd_dounit "${FILESDIR}"/bareos-dir.service - use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service - fi - systemd_dounit "${FILESDIR}"/bareos-fd.service - fi - - # make sure the working directory exists - diropts -m0750 - keepdir /var/lib/bareos - keepdir /var/lib/bareos/storage - - diropts -m0755 - keepdir /var/log/bareos - - newtmpfiles "${FILESDIR}"/tmpfiles.d-bareos.conf bareos.conf - - # make sure bareos group can execute bareos libexec scripts - fowners -R root:bareos /usr/libexec/bareos -} - -pkg_postinst() { - tmpfiles_process bareos.conf - - if use clientonly; then - fowners root:bareos /var/lib/bareos - else - fowners bareos:bareos /var/lib/bareos - fi - - if ! use clientonly && use director; then - einfo - einfo "If this is a new install, you must create the database:" - einfo - einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" - einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" - einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" - einfo - fi -} diff --git a/app-backup/bareos/bareos-21.1.2.ebuild b/app-backup/bareos/bareos-21.1.2.ebuild new file mode 100644 index 000000000000..4baeaaf6c0ec --- /dev/null +++ b/app-backup/bareos/bareos-21.1.2.ebuild @@ -0,0 +1,388 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} ) +CMAKE_WARN_UNUSED_CLI=no +#CMAKE_REMOVE_MODULES=yes + +inherit python-any-r1 systemd cmake tmpfiles + +DESCRIPTION="Featureful client/server network backup suite" +HOMEPAGE="https://www.bareos.org/" +SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" + +# some tests still fail propably due to missing bits in src_test -> TODO +RESTRICT="mirror test" +#RESTRICT=" +# mirror +# !test? ( test ) +#" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="X acl ceph clientonly +director glusterfs ipv6 lmdb + logwatch ndmp readline scsi-crypto + static +storage-daemon systemd tcpd test vim-syntax vmware xattr" + +# get cmake variables from core/cmake/BareosSetVariableDefaults.cmake +DEPEND=" + !app-backup/bacula + acct-group/${PN} + !x86? ( + ceph? ( sys-cluster/ceph ) + ) + glusterfs? ( sys-cluster/glusterfs ) + lmdb? ( dev-db/lmdb ) + dev-libs/gmp:0 + !clientonly? ( + acct-user/${PN} + dev-db/postgresql:*[threads] + director? ( + virtual/mta + ) + ) + logwatch? ( sys-apps/logwatch ) + ndmp? ( net-libs/rpcsvc-proto ) + tcpd? ( sys-apps/tcp-wrappers ) + readline? ( sys-libs/readline:0 ) + static? ( + acl? ( virtual/acl[static-libs] ) + dev-libs/jansson:=[static-libs] + dev-libs/lzo[static-libs] + dev-libs/openssl:0=[static-libs] + sys-libs/ncurses:=[static-libs] + sys-libs/zlib[static-libs] + ) + !static? ( + acl? ( virtual/acl ) + dev-libs/jansson:= + dev-libs/lzo + dev-libs/openssl:0= + sys-libs/ncurses:= + sys-libs/zlib + ) + " +RDEPEND="${DEPEND} + !clientonly? ( + storage-daemon? ( + sys-block/mtx + app-arch/mt-st + ) + ) + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) + " + +BDEPEND=" + ${PYTHON_DEPS} + test? ( + dev-cpp/gtest + dev-db/postgresql:*[server,threads] + dev-db/mariadb:*[server] + ) +" + +REQUIRED_USE=" + static? ( clientonly ) + x86? ( !ceph ) +" + +S=${WORKDIR}/${PN}-Release-${PV} + +pkg_pretend() { + local active_removed_backend="" + if has_version "=21.0.0 you need to migrate to PostgreSQL" + ewarn "catalog backend using the 'bareos-dbcopy' tool of your current" + ewarn "installation first." + ewarn + die "current catalog backend not supported anymore" + fi +} + +src_test() { + # initialze catalog test database + initdb -D "${T}"/pgsql || die + pg_ctl -w -D "${T}"/pgsql start \ + -o "-h '' -k '${T}'" || die + createuser -h "${T}" bareos || die + createdb -h "${T}" --owner bareos bareos || die + export PGHOST="${T}" + + # initiale mariadb database for backup tests + # $USER must be set and != root + export USER=portage + + default + cmake_src_test + + pg_ctl -w -D "${T}"/pgsql stop || die + rm -rvf "${T}"/pgsql +} + +src_prepare() { + # fix gentoo platform support + eapply -p1 "${FILESDIR}/${PN}-21-cmake-gentoo.patch" + + # fix missing DESTDIR in symlink creation + sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt" + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=() + + cmake_comment_add_subdirectory webui + + if use clientonly; then + mycmakeargs+=( + -Dclient-only=ON + -Dstatic-cons=$(usex static) + -Dstatic-fd=$(usex static) + ) + fi + + for useflag in acl ipv6 ndmp scsi-crypto \ + systemd lmdb; do + mycmakeargs+=( -D$useflag=$(usex $useflag) ) + done + + mycmakeargs+=( + -DHAVE_PYTHON=0 + -Darchivedir=/var/lib/bareos/storage + -Dbackenddir=/usr/$(get_libdir)/${PN}/backend + -Dbasename="`hostname -s`" + -Dbatch-insert=yes + -Dbsrdir=/var/lib/bareos/bsr + -Dconfdir=/etc/bareos + -Dcoverage=no + -Ddb_password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` + -Ddir-group=bareos + -Ddir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Ddir-user=bareos + -Ddocdir=/usr/share/doc/${PF} + -Ddynamic-cats-backends=yes + -Ddynamic-storage-backends=yes + -Dfd-group=bareos + -Dfd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dfd-user=root + -Dhost=${CHOST} + -Dhostname="`hostname -s`" + -Dhtmldir=/usr/share/doc/${PF}/html + -Dlibdir=/usr/$(get_libdir) + -Dlogdir=/var/log/bareos + -Dmandir=/usr/share/man + -Dmon-dir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dmon-fd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dmon-sd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dopenssl=yes + -Dpiddir=/run/bareos + -Dplugindir=/usr/$(get_libdir)/${PN}/plugin + -Dsbin-perm=0755 + -Dsbindir=/usr/sbin + -Dscriptdir=/usr/libexec/bareos + -Dsd-group=bareos + -Dsd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`" + -Dsd-user=root + -Dsubsysdir=/run/lock/subsys + -Dsysconfdir=/etc + -Dworkingdir=/var/lib/bareos + -Dx=$(usex X) + ) + + # disable droplet support for now as it does not build with gcc 10 + # ... and this is a bundled lib, which should have its own package + cd core && cmake_comment_add_subdirectory "src/droplet" + + cmake_src_configure +} + +src_install() { + cmake_src_install + + # remove some scripts we don't need at all + rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd} + rm -f "${D}"/usr/sbin/bareos + + # remove upstream init scripts and systemd units + rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service + + # remove misc stuff we do not need in production + rm -f "${D}"/etc/bareos/bareos-regress.conf + rm -f "${D}"/etc/logrotate.d/bareos-dir + + # get rid of py2 stuff + rm -rf "$D"/usr/lib64/python2.7 || die + rm -f "$D"/usr/lib64/bareos/plugin/python-fd.so || die + if ! use vmware; then + rm -f "$D"/usr/lib64/bareos/plugin/{BareosFdPluginVMware.py,bareos-fd-vmware.py} + fi + + # rename statically linked apps + if use clientonly && use static ; then + pushd "${D}"/usr/sbin || die + mv static-bareos-fd bareos-fd || die + mv static-bconsole bconsole || die + popd || die + fi + + # extra files which 'make install' doesn't cover + if ! use clientonly; then + # the logrotate configuration + # (now unconditional wrt bug #258187) + diropts -m0755 + insinto /etc/logrotate.d + insopts -m0644 + newins "${S}"/core/scripts/logrotate bareos + + # the logwatch scripts + if use logwatch; then + diropts -m0750 + dodir /etc/log.d/scripts/services + dodir /etc/log.d/scripts/shared + dodir /etc/log.d/conf/logfiles + dodir /etc/log.d/conf/services + pushd "${S}"/core/scripts/logwatch >&/dev/null || die + + into /etc/log.d/scripts/services + dobin bareos + + into /etc/log.d/scripts/shared + dobin applybareosdate + + insinto /etc/log.d/conf/logfiles + newins logfile.bareos.conf bareos.conf + + insinto /etc/log.d/conf/services + newins services.bareos.conf bareos.conf + + popd >&/dev/null || die + fi + fi + + rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* + if use clientonly || ! use director; then + rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* + rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* + rm -vf "${D}"/usr/share/man/man1/bsmtp.1* + rm -vf "${D}"/usr/share/man/man8/bwild.8* + rm -vf "${D}"/usr/share/man/man8/bregex.8* + rm -vf "${D}"/usr/share/man/man8/bpluginfo.8* + rm -vf "${D}"/usr/libexec/bareos/create_*_database + rm -vf "${D}"/usr/libexec/bareos/drop_*_database + rm -vf "${D}"/usr/libexec/bareos/make_*_tables + rm -vf "${D}"/usr/libexec/bareos/update_*_tables + rm -vf "${D}"/usr/libexec/bareos/drop_*_tables + rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges + rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup + fi + if use clientonly || ! use storage-daemon; then + rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* + rm -vf "${D}"/usr/share/man/man8/bcopy.8* + rm -vf "${D}"/usr/share/man/man8/bextract.8* + rm -vf "${D}"/usr/share/man/man8/bls.8* + rm -vf "${D}"/usr/share/man/man8/bscan.8* + rm -vf "${D}"/usr/share/man/man8/btape.8* + rm -vf "${D}"/usr/libexec/bareos/disk-changer + rm -vf "${D}"/usr/libexec/bareos/mtx-changer + rm -vf "${D}"/usr/libexec/bareos/dvd-handler + rm -vf "${D}"/etc/bareos/mtx-changer.conf + fi + if ! use scsi-crypto; then + rm -vf "${D}"/usr/share/man/man8/bscrypto.8* + fi + + # documentation + dodoc README.md + dodoc core/README.configsubdirectories + use glusterfs dodoc core/README.glusterfs + use ndmp && dodoc core/README.NDMP + use scsi-crypto && dodoc core/README.scsicrypto + + # vim-files + if use vim-syntax; then + insinto /usr/share/vim/vimfiles/syntax + doins core/scripts/bareos.vim + insinto /usr/share/vim/vimfiles/ftdetect + newins core/scripts/filetype.vim bareos_ft.vim + fi + + # setup init scripts + myscripts="bareos-fd" + if ! use clientonly; then + if use director; then + myscripts+=" bareos-dir" + fi + if use storage-daemon; then + myscripts+=" bareos-sd" + fi + fi + for script in ${myscripts}; do + # install init script and config + newinitd "${FILESDIR}/${script}-21".initd "${script}" + newconfd "${FILESDIR}/${script}-21".confd "${script}" + done + + # install systemd unit files + if use systemd; then + if ! use clientonly; then + use director && systemd_dounit "${FILESDIR}"/bareos-dir.service + use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service + fi + systemd_dounit "${FILESDIR}"/bareos-fd.service + fi + + # make sure the working directory exists + diropts -m0750 + keepdir /var/lib/bareos + keepdir /var/lib/bareos/storage + + diropts -m0755 + keepdir /var/log/bareos + + newtmpfiles "${FILESDIR}"/tmpfiles.d-bareos.conf bareos.conf + + # make sure bareos group can execute bareos libexec scripts + fowners -R root:bareos /usr/libexec/bareos +} + +pkg_postinst() { + tmpfiles_process bareos.conf + + if use clientonly; then + fowners root:bareos /var/lib/bareos + else + fowners bareos:bareos /var/lib/bareos + fi + + if ! use clientonly && use director; then + einfo + einfo "If this is a new install, you must create the database:" + einfo + einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'" + einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'" + einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'" + einfo + fi +} -- cgit v1.2.3