From 6bf575618cf9022e99cbfcc64036fd9db79a749c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 5 Dec 2023 17:02:59 +0000 Subject: gentoo auto-resync : 05:12:2023 - 17:02:58 --- app-backup/Manifest.gz | Bin 7870 -> 7871 bytes app-backup/bareos/Manifest | 14 +- app-backup/bareos/bareos-20.0.8-r2.ebuild | 394 ------------------- app-backup/bareos/bareos-20.0.9.ebuild | 394 +++++++++++++++++++ app-backup/bareos/bareos-21.1.7-r2.ebuild | 414 -------------------- app-backup/bareos/bareos-21.1.8.ebuild | 413 ++++++++++++++++++++ app-backup/bareos/bareos-22.1.0-r1.ebuild | 427 --------------------- app-backup/bareos/bareos-22.1.2.ebuild | 427 +++++++++++++++++++++ app-backup/bareos/bareos-9999.ebuild | 2 +- app-backup/snapper/Manifest | 5 - .../snapper/files/snapper-0.10.3-boost-1.81.patch | 19 - app-backup/snapper/snapper-0.10.3.ebuild | 90 ----- app-backup/snapper/snapper-0.10.5-r1.ebuild | 89 ----- 13 files changed, 1242 insertions(+), 1446 deletions(-) delete mode 100644 app-backup/bareos/bareos-20.0.8-r2.ebuild create mode 100644 app-backup/bareos/bareos-20.0.9.ebuild delete mode 100644 app-backup/bareos/bareos-21.1.7-r2.ebuild create mode 100644 app-backup/bareos/bareos-21.1.8.ebuild delete mode 100644 app-backup/bareos/bareos-22.1.0-r1.ebuild create mode 100644 app-backup/bareos/bareos-22.1.2.ebuild delete mode 100644 app-backup/snapper/files/snapper-0.10.3-boost-1.81.patch delete mode 100644 app-backup/snapper/snapper-0.10.3.ebuild delete mode 100644 app-backup/snapper/snapper-0.10.5-r1.ebuild (limited to 'app-backup') diff --git a/app-backup/Manifest.gz b/app-backup/Manifest.gz index 060370493cc5..787c1ac205d4 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 4e1f5ddd237d..5aff7c83d032 100644 --- a/app-backup/bareos/Manifest +++ b/app-backup/bareos/Manifest @@ -21,11 +21,11 @@ AUX bareos-sd.confd 360 BLAKE2B d965bf4cf1db59982b57ee0b848f9f7156d695a37d2a3b4c AUX bareos-sd.initd 654 BLAKE2B 9cec4086c4ee0a5bbb2643a2e9179d09094281f6f93c99d1a3feeae5fff8a9ce1fdd259e09dce5f32c487209c87291d995d10b365d4f56dfbf1eb1aa245f919f SHA512 afb360c071118f72581d45c3db66a49e65c412d9aeb68e6b7d1dedc63b1b9cee4a81f9176d1ebfe800e284ba844d1f74bcfad69eec25d3dd41dcfc51832a7171 AUX bareos-sd.service 812 BLAKE2B 7ac9754d98ea177614450045fbbaf7406592b30a280646eacdf31271a0cafd63e88ac463b1d94143ccac96c289de3f88a177edab665f073e7c7692037ffedb68 SHA512 6a0fdb3af03e9f94e0d755a3286aff36b41ab1f00a82e9864f6d3de6931691f6aba79aeb7fc952cec039e4174b545f53c23e96fcfbaed71192877d201b3086ad AUX tmpfiles.d-bareos.conf 33 BLAKE2B 68feed7629dde0dad019470851cea33140be3b17186fbbee7ad6c6a591978236ec09252d890117030d8706d22ea02f9971063aa80a393d3726510128527401d0 SHA512 65d3f72e57eb3afc557ab6b56a8ec1895a679b904114fefd1c9d0ceeb6b9fa8413575591ed81e1ce6963bdaf34dad227e781865b39bb237afc6bb5652306d2ef -DIST bareos-20.0.8.tar.gz 13429247 BLAKE2B 5576cf738fccad0ac39f7c92e8da01f4925d58e4373c8bc19f68ddb8cc8d6a07bf73dfd39bd2111766ccd20ce2da224680b8ab9adf7b84421874ae916e633f75 SHA512 1da30d0ff2f1fda2c4a41ec6d41ec60e3212b1bdb153c7f397931580894f31e36ab84f655d263aed47b9eb21e68ef7e59ec3b7bbd4f2c8981ae04b84733ffb68 -DIST bareos-21.1.7.tar.gz 11666508 BLAKE2B 8b5efffb987b53d1bc289aa104c10827c6bed630ffee16c26e8ab428ee20aa63a9e1e2fc03a7656d26f5905443b06c6a6f6d4860be413776874917e2c1cd0ef2 SHA512 2b7dfb16b74aa912449269efb92c85b6720f08526122c7dc9bfb648aed70b2ca81df41eacb60c53e2a154793c6ed209dd1571ecec7913a357e491064b1faab41 -DIST bareos-22.1.0.tar.gz 14719993 BLAKE2B 38e354d3227d401c69ffb003c83ae90c2067720490af089d529da636bc300e2fb5042451ab439b8b102f6850aeadbe8dedc4311dba13f800eab0bc77d89f809d SHA512 dea64c6eb34a93f1a93eb6b0ac628a75101ac8873e06800a256f226e8f3a556fe39ce4e500246f9c51de30a2b0907732f789c6394f29b7bb9d983a64c709ad2c -EBUILD bareos-20.0.8-r2.ebuild 11468 BLAKE2B 3387def2689f5e9f606c39a6843184cd80ad95073b83aed3c8f885771b23a5dcf63d007fa4972077914768e9b66d370ee5088c9329163e1a052dd24189bd9e0e SHA512 f14fc44bd3a7731875d6b6b78285ed59f36aab13d1c80b2aa04c2734ad93c8d2ac4f3e6b9c85546f83e3d0aa696e6d3820fced7bdd07dd29d1fc324c39eb304d -EBUILD bareos-21.1.7-r2.ebuild 11625 BLAKE2B db0a93a08d8026dd453f54f278ccba0c55e5df3e718dea0e53cb87864e896e1e735c1d940d785b894969083cfd89f8fae8159f055c2b8e68924e2f29406487c4 SHA512 b54e8978902fdc82162b6c5238ce720465e0150d3af44cb136ae068032418ccb57760ae5ad9e3f8f3664d837da8f353e423e251d65483158a9a5f8c1548ffa47 -EBUILD bareos-22.1.0-r1.ebuild 11955 BLAKE2B 08f5375811c332153dc59b4949f96c2042e0b39b20e4c794e85a0abeb4849b20c6e5bf06c5f16fde19ec8280cc75fe72ee2aa102de9dd13be1f02ec544bb8d3c SHA512 5f8a65fa1d3d3b24a9e43b79e6b4ebed978a83b2d9e8627cf507a6ec8295e87e2186125665757aa9a2807e68a83059057e87354396a99ef0bcb20199d4768246 -EBUILD bareos-9999.ebuild 11955 BLAKE2B 08f5375811c332153dc59b4949f96c2042e0b39b20e4c794e85a0abeb4849b20c6e5bf06c5f16fde19ec8280cc75fe72ee2aa102de9dd13be1f02ec544bb8d3c SHA512 5f8a65fa1d3d3b24a9e43b79e6b4ebed978a83b2d9e8627cf507a6ec8295e87e2186125665757aa9a2807e68a83059057e87354396a99ef0bcb20199d4768246 +DIST bareos-20.0.9.tar.gz 13432902 BLAKE2B c92b7b2a3d8a78d2119cef21ea5f13ae4898d750ac15f5b91fc143b0ab057a7537d3a190ef7f910810190c275f5cf885f07d819c6165f49ded25d11a329b02c0 SHA512 04386ef9a6f83bc9569f42d9567951a0e06c2dcda9409d1a17a07ccafaf55ff4a22e2b49ec9cd93c0d8bad244469aa87ad8ef4f27b7c6ae6820fd2b9c98d5d22 +DIST bareos-21.1.8.tar.gz 11663322 BLAKE2B 5f8c66d44c702b187f56434925417f3eff5f9f515f52d5707d5dce2edfcf566474bae52518adab1d6f87d479fd05cc906f48350eec4f21b858720a607f9b4311 SHA512 643561d4bd92989e0b9356dab500083073daa2717159b5b061f5680ab96e8532c13753e94480419239bcad9938818c203d43dc72b690404ae5a143fdd3cd0738 +DIST bareos-22.1.2.tar.gz 14746158 BLAKE2B 5d8c9c098f61bd35b11f907a3e215a7c08b504c3e529c67a4c8c5cbbf24775158966800e63efca260b4cc513417332cdf43a158d21684f09be3d89dd93258880 SHA512 76d53425b2a28f4f7887b323a70bf9b37df44302e0e25aff7156c1b3ee26ffa60bbfb45ed29a0f2fe763d5c38b8f7135ac2a3e405d8e2b10717f4893baf9c327 +EBUILD bareos-20.0.9.ebuild 11468 BLAKE2B 5b1ac16695f2d37ca9700abf6426d98ae4f8d045fedcac845634db4a9069b182dda4303c6a7d644f54221ff374357b9a311c9a4906735b70fcb0ebad60c902eb SHA512 8979ce9afbc7063d1af9b82aa52aad91bcf3a9dd4205f413204da78279118c0e3da897125469ea0512ebb9c89a0bc881829ebaa4ff5c9687ec82ae7d908a26d6 +EBUILD bareos-21.1.8.ebuild 11579 BLAKE2B d86564e2d285572fd989764e44834e0092a726417ebe7e1b05eee6bbff97934378d0985dd47435a5922c793535f980060239c04c0520c53217f5ba738067935d SHA512 8ab6f64e6aa44b777bfa3d2f88eb0e0a065577b070bbf3f1e0f518fac1b34b23eaa63f80d36e12b603c37c3bd6551a12c80d27a76579d2b58e70ac31541e926f +EBUILD bareos-22.1.2.ebuild 11955 BLAKE2B 91450391ba3f8e6aa81ce36ef1d9c818ec4cce7c1addb7d85be04320a08cc21117060f8a7e890676d6668598a619c692edb74f5adcfb0289de58cdcac295f30b SHA512 988301bb78774d546eedb22591543417f0dea71745f5b1b82c94ab3eaa3ea646fbad4e7b3bec4559a14cf7e89eb669088e862611a04a9e5cd3d516f119cb4b16 +EBUILD bareos-9999.ebuild 11955 BLAKE2B 91450391ba3f8e6aa81ce36ef1d9c818ec4cce7c1addb7d85be04320a08cc21117060f8a7e890676d6668598a619c692edb74f5adcfb0289de58cdcac295f30b SHA512 988301bb78774d546eedb22591543417f0dea71745f5b1b82c94ab3eaa3ea646fbad4e7b3bec4559a14cf7e89eb669088e862611a04a9e5cd3d516f119cb4b16 MISC metadata.xml 1221 BLAKE2B 190840f3e1003bd12c5d6b3b1904f37ea102982c5bb97de4c11adc128fcb86c3af17812b4ad886969bcade9b460753291bb4508321892f1b85e3e43f068a737e SHA512 bf55fff95a0bd8695fdea054b827453f7c8dd96caeee60af7755c25c88bab62548c57dcfb03cf09fbe23f32228878084b8fc3056d2c41b793c9b8ef024c20455 diff --git a/app-backup/bareos/bareos-20.0.8-r2.ebuild b/app-backup/bareos/bareos-20.0.8-r2.ebuild deleted file mode 100644 index 42660fdd510b..000000000000 --- a/app-backup/bareos/bareos-20.0.8-r2.ebuild +++ /dev/null @@ -1,394 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{9..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" - eapply "${FILESDIR}/${PN}-gcc13-fixes.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 -o bareos -g bareos - 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." - fi -} diff --git a/app-backup/bareos/bareos-20.0.9.ebuild b/app-backup/bareos/bareos-20.0.9.ebuild new file mode 100644 index 000000000000..be9f0830fc9f --- /dev/null +++ b/app-backup/bareos/bareos-20.0.9.ebuild @@ -0,0 +1,394 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..12} ) +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" + eapply "${FILESDIR}/${PN}-gcc13-fixes.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 -o bareos -g bareos + 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." + fi +} diff --git a/app-backup/bareos/bareos-21.1.7-r2.ebuild b/app-backup/bareos/bareos-21.1.7-r2.ebuild deleted file mode 100644 index eb14b02e9c5f..000000000000 --- a/app-backup/bareos/bareos-21.1.7-r2.ebuild +++ /dev/null @@ -1,414 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{9..11} ) -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 split-usr - 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" - eapply "${FILESDIR}/${PN}-21.1.2-werror.patch" - eapply "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.patch" - eapply "${FILESDIR}/${PN}-gcc13-fixes.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 - - # remove duplicate binaries being installed in /usr/sbin and replace - # them by symlinks to not break systems that still use split-usr - if use split-usr; then - for f in bwild bregex bsmtp bconsole; do - rm -f "${D}/usr/sbin/$f" || die - ln -s "../bin/$f" "${D}/usr/sbin/$f" || die - done - fi - - # 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-r1".initd "${script}" - newconfd "${FILESDIR}/${script}-21".confd "${script}" - done - - # install systemd unit files - if use systemd; then - if ! use clientonly; then - use director && systemd_newunit "${FILESDIR}"/bareos-dir-21.service 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 - - # set log directory ownership - if ! use clientonly; then - diropts -m0755 -o bareos -g bareos - fi - 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'" - einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables'" - einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges'" - einfo - einfo "or run" - einfo - einfo " emerge --config app-backup/bareos" - einfo - einfo "to do this" - fi -} - -pkg_config() { - su postgres -c '/usr/libexec/bareos/create_bareos_database' || die "could not create bareos database" - su postgres -c '/usr/libexec/bareos/make_bareos_tables' || die "could not create bareos database tables" - su postgres -c '/usr/libexec/bareos/grant_bareos_privileges' || die "could not grant bareos database privileges" -} diff --git a/app-backup/bareos/bareos-21.1.8.ebuild b/app-backup/bareos/bareos-21.1.8.ebuild new file mode 100644 index 000000000000..1ccdbe824abd --- /dev/null +++ b/app-backup/bareos/bareos-21.1.8.ebuild @@ -0,0 +1,413 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..12} ) +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 split-usr + 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" + eapply "${FILESDIR}/${PN}-21.1.2-werror.patch" + eapply "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.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 + + # remove duplicate binaries being installed in /usr/sbin and replace + # them by symlinks to not break systems that still use split-usr + if use split-usr; then + for f in bwild bregex bsmtp bconsole; do + rm -f "${D}/usr/sbin/$f" || die + ln -s "../bin/$f" "${D}/usr/sbin/$f" || die + done + fi + + # 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-r1".initd "${script}" + newconfd "${FILESDIR}/${script}-21".confd "${script}" + done + + # install systemd unit files + if use systemd; then + if ! use clientonly; then + use director && systemd_newunit "${FILESDIR}"/bareos-dir-21.service 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 + + # set log directory ownership + if ! use clientonly; then + diropts -m0755 -o bareos -g bareos + fi + 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'" + einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables'" + einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges'" + einfo + einfo "or run" + einfo + einfo " emerge --config app-backup/bareos" + einfo + einfo "to do this" + fi +} + +pkg_config() { + su postgres -c '/usr/libexec/bareos/create_bareos_database' || die "could not create bareos database" + su postgres -c '/usr/libexec/bareos/make_bareos_tables' || die "could not create bareos database tables" + su postgres -c '/usr/libexec/bareos/grant_bareos_privileges' || die "could not grant bareos database privileges" +} diff --git a/app-backup/bareos/bareos-22.1.0-r1.ebuild b/app-backup/bareos/bareos-22.1.0-r1.ebuild deleted file mode 100644 index 7489d84210a7..000000000000 --- a/app-backup/bareos/bareos-22.1.0-r1.ebuild +++ /dev/null @@ -1,427 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{9..12} ) -CMAKE_WARN_UNUSED_CLI=no -#CMAKE_REMOVE_MODULES=yes - -inherit python-any-r1 systemd cmake tmpfiles - -if [[ ${PV} == *9999 ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" -else - SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" - - KEYWORDS="~amd64 ~x86" - S=${WORKDIR}/${PN}-Release-${PV} -fi - -DESCRIPTION="Featureful client/server network backup suite" -HOMEPAGE="https://www.bareos.org/" - -# 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" -IUSE="X acl ceph clientonly +director glusterfs ipv6 lmdb - logwatch ndmp readline scsi-crypto split-usr - 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 ) -" - -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" - eapply "${FILESDIR}/${PN}-22.0.2-werror.patch" - eapply "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.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 - - # remove duplicate binaries being installed in /usr/sbin and replace - # them by symlinks to not break systems that still use split-usr - if use split-usr; then - for f in bwild bregex bsmtp bconsole; do - rm -f "${D}/usr/sbin/$f" || die - ln -s "../bin/$f" "${D}/usr/sbin/$f" || die - done - fi - - # 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-r1".initd "${script}" - newconfd "${FILESDIR}/${script}-21".confd "${script}" - done - - # install systemd unit files - if use systemd; then - if ! use clientonly; then - use director && systemd_newunit "${FILESDIR}"/bareos-dir-21.service 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 - - # set log directory ownership - if ! use clientonly; then - diropts -m0755 -o bareos -g bareos - fi - 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'" - einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables'" - einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges'" - einfo - einfo "or run" - einfo - einfo " emerge --config app-backup/bareos" - einfo - einfo "to do this" - einfo - einfo "For major upgrades you may need to run:" - einfo - einfo " su postgres -c '/usr/libexec/bareos/update_bareos_tables'" - einfo - einfo "Please see release notes for details." - einfo "( https://docs.bareos.org/Appendix/ReleaseNotes.html )" - einfo - fi -} - -pkg_config() { - su postgres -c '/usr/libexec/bareos/create_bareos_database' || die "could not create bareos database" - su postgres -c '/usr/libexec/bareos/make_bareos_tables' || die "could not create bareos database tables" - su postgres -c '/usr/libexec/bareos/grant_bareos_privileges' || die "could not grant bareos database privileges" -} diff --git a/app-backup/bareos/bareos-22.1.2.ebuild b/app-backup/bareos/bareos-22.1.2.ebuild new file mode 100644 index 000000000000..e00ae9693bca --- /dev/null +++ b/app-backup/bareos/bareos-22.1.2.ebuild @@ -0,0 +1,427 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..12} ) +CMAKE_WARN_UNUSED_CLI=no +#CMAKE_REMOVE_MODULES=yes + +inherit python-any-r1 systemd cmake tmpfiles + +if [[ ${PV} == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" +else + SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" + + KEYWORDS="~amd64 ~x86" + S=${WORKDIR}/${PN}-Release-${PV} +fi + +DESCRIPTION="Featureful client/server network backup suite" +HOMEPAGE="https://www.bareos.org/" + +# 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" +IUSE="X acl ceph clientonly +director glusterfs ipv6 lmdb + logwatch ndmp readline scsi-crypto split-usr + 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 ) +" + +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" + eapply "${FILESDIR}/${PN}-22.0.2-werror.patch" + eapply "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.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 + + # remove duplicate binaries being installed in /usr/sbin and replace + # them by symlinks to not break systems that still use split-usr + if use split-usr; then + for f in bwild bregex bsmtp bconsole; do + rm -f "${D}/usr/sbin/$f" || die + ln -s "../bin/$f" "${D}/usr/sbin/$f" || die + done + fi + + # 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-r1".initd "${script}" + newconfd "${FILESDIR}/${script}-21".confd "${script}" + done + + # install systemd unit files + if use systemd; then + if ! use clientonly; then + use director && systemd_newunit "${FILESDIR}"/bareos-dir-21.service 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 + + # set log directory ownership + if ! use clientonly; then + diropts -m0755 -o bareos -g bareos + fi + 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'" + einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables'" + einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges'" + einfo + einfo "or run" + einfo + einfo " emerge --config app-backup/bareos" + einfo + einfo "to do this" + einfo + einfo "For major upgrades you may need to run:" + einfo + einfo " su postgres -c '/usr/libexec/bareos/update_bareos_tables'" + einfo + einfo "Please see release notes for details." + einfo "( https://docs.bareos.org/Appendix/ReleaseNotes.html )" + einfo + fi +} + +pkg_config() { + su postgres -c '/usr/libexec/bareos/create_bareos_database' || die "could not create bareos database" + su postgres -c '/usr/libexec/bareos/make_bareos_tables' || die "could not create bareos database tables" + su postgres -c '/usr/libexec/bareos/grant_bareos_privileges' || die "could not grant bareos database privileges" +} diff --git a/app-backup/bareos/bareos-9999.ebuild b/app-backup/bareos/bareos-9999.ebuild index 7489d84210a7..e00ae9693bca 100644 --- a/app-backup/bareos/bareos-9999.ebuild +++ b/app-backup/bareos/bareos-9999.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 PYTHON_COMPAT=( python3_{9..12} ) CMAKE_WARN_UNUSED_CLI=no diff --git a/app-backup/snapper/Manifest b/app-backup/snapper/Manifest index 8e4e5ba27f31..26535e58d133 100644 --- a/app-backup/snapper/Manifest +++ b/app-backup/snapper/Manifest @@ -1,12 +1,7 @@ AUX cron-confd.patch 916 BLAKE2B 52672e59ebbfde9dd120516d9c0fb80443b8bfe38d08ec943956005a3d07aa1ed3e9273c572730722a02d3b841859dbc8d3fa81e89e87d6958251abec016716c SHA512 7f0872b14f1fa6b3c7990a9b219a0b2c0b941b1376fb89eda6e4fdf4b3b37818d0114febdb21d2432f5b1c08f1ba4354936d556c1c26953a0fe0f3196d699aa7 AUX snapper-0.10.1-testsuite.patch 2525 BLAKE2B 0ece146356113d456ef0a56e46e76eae1f9509e3b454459499fa457119c75a9e5fecb85d5530caaab340cea7f4deba0f155ac9e31706ab3899372c45e381cf77 SHA512 e0e1a4ed7c9ef069bc0bc5449f784c2deda1ce6851e98ca6d04c03988361f00e06b6a4f347671ee905f496dba19f8dffa64e5bdcba89f547292fc9c8d276ecd7 -AUX snapper-0.10.3-boost-1.81.patch 505 BLAKE2B 51111b4a6738efd7b9604c54dbb5754d3bef45ce5559d47902ea11cc4e550e5d14b41f5a65db19e631f0a3911fcba4149f153b527c2056cbf7186d41cd44bbc6 SHA512 b9d98ba08aef66b9ecefb4c9781569c71d198116e035307f96b02feb94a5284cf4aa963a11459e3f7d1c2519bc91f6214eac363d32ee129730f971f12ad0662e -DIST snapper-0.10.3.tar.gz 409277 BLAKE2B bc4963081a24572015ff888b5cb85f3afa071e487a89e89f1a72d5b96391be69ad982c79ddfd71f020203d0c50ca07d67cbeb535cd6e57bc3d6ee269ef5c788e SHA512 74cb04d045304021564a0452769fdcde1764595a52e30947396c37fe4c36b3fba08d10505734bc0bd631986e933ee2bfaf67c871cba93a96e498fbfe5e2c6985 -DIST snapper-0.10.5.tar.gz 422114 BLAKE2B 35c4772fc84920755d5fe87cad4a73792692ab7a55bcbcae65f20bf2e0cbcfb79429a423a5b55a89dbfeba1ff0474741c884bc632daa997fbb86cec52b68e3ef SHA512 e710069374b805394d691f8060d2852e35960a965fd49bb59768ebcc53a615af1f36269adac2d916b5e3f1b3e42fb2a53049d8f1b8a6a8430e992fa0de49c235 DIST snapper-0.10.6.tar.gz 423867 BLAKE2B a7d0f8c62c60c0d03bf108a8c0692dd209f170cf8227512cbc3b80eb9f58ecca845aa585859032bc6582d67e4c6ff15b75443a9ee9291d1b970efec15513571f SHA512 6eedfb9408260331f042f0a429a1104136cb88dac450f320641b0941cd06faf52f67cad2397cf4122f919876bb994455da0cfd3bb099f82217050e07b4c77d2e DIST snapper-0.10.7.tar.gz 428482 BLAKE2B 43c48d978296901f6584cef258ec3723de97b1d6b4b4a5b6bc39649f28b3300919616c65b8fcdb97b3ebcab08d04e4583713eef146721367de24513e80113b45 SHA512 bf098c941735b60554ff0711fa43b30ef3634e01178f5ee8ad44c65b757c3366bd5bf568cef3a787b2ddcc2fc63090056109250480e6bd360ebf27a8343373b8 -EBUILD snapper-0.10.3.ebuild 2083 BLAKE2B 78d21c76ce6f1cc5e2e852a4c9d0ec89d7f408e508abe0822614980b3407c9cd6cdd4f584e71e1009a3fc3b7e8f65195188a068672b443d8912e4b137879aca7 SHA512 994e79d4db8a382919a22088bfb7c79a2793d73a62be1bd12c6dcd1c30fe68149a054306cc002fdad356005d50bd5865700122f27ede96d4df5bdd5d269b0a85 -EBUILD snapper-0.10.5-r1.ebuild 2039 BLAKE2B f86263297ef14cd8a0ff5ab243dbf6c9ed8488ce3909863b7f918faf8ec8d94aefe94b701c374d24d6f8a168e14c06159b457467e440008525fd3b9e927a11a7 SHA512 39c725b5937065d0a2e846ae5113cb5bfd65dd5ddf3c6e1201561c7fbf2015271589d07940d10aec63ed329dcba567813e28c1a74e5580bbf2e9daf7ccf6669f EBUILD snapper-0.10.6.ebuild 2047 BLAKE2B 2edd21d85fbc8d3a750ae08a9961dcb8b6470d46095208dfd0b1c1b024b05db281118fd60697305b3f449ad4967e199acb8862faa8f84eb649cd196fd569c971 SHA512 c71f9432028a102fbfc5d0dc47194f3714e5834514bf3a7c0a2e2a9452824c5ae751de5b777bf6c6840edf73b63331f1f850b67f84283cf5241cef9abf16b45b EBUILD snapper-0.10.7.ebuild 2049 BLAKE2B 795e6947da7d2d2c68d24e612ce442fdec03c22584c1d4b85a8d36413b2e555ca4719c6223591cf92e441c15b6069cd29bd869519c99b2f23d54fd0fbb4225e0 SHA512 101ad55fd0be1fa87923bb57114280e626cf84ac22c0a7056f002276b71061e2ad0b3573e9d56dd500bff4b419a180a6c9c70b6be7d44340953f863249dfe93b MISC metadata.xml 1331 BLAKE2B 891a27fbae2ed364a26952def66b3e9e62be7025580d7b89f559f284888efed53476f4a8f5bcd7209c3c4de8494913a05354059004ef6c3aa6c1829a3e093efb SHA512 add8dffdf453f079d09f06608cae732ce61e04a5fac1988afb0733c8d60a943efe054a4973e54ca1cf304ad3d3778fd8aa6b01fc16815a1f42f83048d58adb63 diff --git a/app-backup/snapper/files/snapper-0.10.3-boost-1.81.patch b/app-backup/snapper/files/snapper-0.10.3-boost-1.81.patch deleted file mode 100644 index 80896f02e46e..000000000000 --- a/app-backup/snapper/files/snapper-0.10.3-boost-1.81.patch +++ /dev/null @@ -1,19 +0,0 @@ -https://bugs.gentoo.org/886505 -https://github.com/openSUSE/snapper/commit/0f8a3dff903eeb30072b9b9809cf072d3c84d1fc - -From 0f8a3dff903eeb30072b9b9809cf072d3c84d1fc Mon Sep 17 00:00:00 2001 -From: Arvin Schnell -Date: Tue, 15 Nov 2022 14:39:29 +0100 -Subject: [PATCH] - fix build with boost 1.81 - ---- a/zypp-plugin/snapper-zypp-plugin.cc -+++ b/zypp-plugin/snapper-zypp-plugin.cc -@@ -30,6 +30,7 @@ - - #include - #include -+#include - #include - #include - - diff --git a/app-backup/snapper/snapper-0.10.3.ebuild b/app-backup/snapper/snapper-0.10.3.ebuild deleted file mode 100644 index b58714c373f4..000000000000 --- a/app-backup/snapper/snapper-0.10.3.ebuild +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools systemd - -DESCRIPTION="Command-line program for btrfs and lvm snapshot management" -HOMEPAGE="http://snapper.io/" -SRC_URI="https://github.com/openSUSE/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ~arm64 ~riscv x86" -IUSE="doc lvm pam test systemd xattr" -RESTRICT="test" - -RDEPEND="dev-libs/boost:= - dev-libs/json-c:= - dev-libs/libxml2 - dev-libs/icu:= - sys-apps/acl - sys-apps/dbus - sys-apps/util-linux - >=sys-fs/btrfs-progs-3.17.1 - sys-libs/zlib - virtual/libintl - lvm? ( sys-fs/lvm2 ) - pam? ( sys-libs/pam ) - xattr? ( sys-apps/attr )" - -DEPEND="${RDEPEND} - app-text/docbook-xsl-stylesheets - dev-libs/libxslt - sys-devel/gettext - virtual/pkgconfig" - -PATCHES=( - "${FILESDIR}"/cron-confd.patch - "${FILESDIR}"/${PN}-0.10.1-testsuite.patch - "${FILESDIR}"/${P}-boost-1.81.patch -) - -src_prepare() { - default - - sed -e "s,/usr/lib/systemd/system,$(systemd_get_systemunitdir),g" \ - -i data/Makefile.* \ - || die "Failed to fix systemd services and timers installation path" - eautoreconf -} - -src_configure() { - # ext4 code does not work anymore - # snapper does not build without btrfs - local myeconfargs=( - --disable-silent-rules - --with-conf="/etc/conf.d" - --enable-zypp - --enable-rollback - --enable-btrfs-quota - --disable-ext4 - --enable-btrfs - $(use_enable doc) - $(use_enable lvm) - $(use_enable pam) - $(use_enable test tests) - $(use_enable systemd) - $(use_enable xattr xattrs) - ) - - econf "${myeconfargs[@]}" -} - -src_install() { - default - # Existing configuration file required to function - keepdir /etc/snapper/configs - newconfd data/sysconfig.snapper snapper - find "${D}" -name '*.la' -delete || die -} - -pkg_postinst() { - elog "In order to use Snapper, you need to set up" - elog "at least one config first. To do this, run:" - elog "snapper create-config " - elog "For more information, see man (8) snapper or" - elog "http://snapper.io/documentation.html and" - elog "https://wiki.gentoo.org/wiki/Snapper" -} diff --git a/app-backup/snapper/snapper-0.10.5-r1.ebuild b/app-backup/snapper/snapper-0.10.5-r1.ebuild deleted file mode 100644 index 26ef6e9e6c1e..000000000000 --- a/app-backup/snapper/snapper-0.10.5-r1.ebuild +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools systemd - -DESCRIPTION="Command-line program for btrfs and lvm snapshot management" -HOMEPAGE="http://snapper.io/" -SRC_URI="https://github.com/openSUSE/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~riscv ~x86" -IUSE="lvm pam test systemd xattr" -RESTRICT="test" - -RDEPEND="dev-libs/boost:= - dev-libs/json-c:= - dev-libs/libxml2 - dev-libs/icu:= - sys-apps/acl - sys-apps/dbus - sys-apps/util-linux - >=sys-fs/btrfs-progs-3.17.1 - sys-libs/zlib - virtual/libintl - lvm? ( sys-fs/lvm2 ) - pam? ( sys-libs/pam ) - xattr? ( sys-apps/attr )" - -DEPEND="${RDEPEND} - app-text/docbook-xsl-stylesheets - dev-libs/libxslt - sys-devel/gettext - virtual/pkgconfig" - -PATCHES=( - "${FILESDIR}"/cron-confd.patch - "${FILESDIR}"/${PN}-0.10.1-testsuite.patch -) - -src_prepare() { - default - - sed -e "s,/usr/lib/systemd/system,$(systemd_get_systemunitdir),g" \ - -i data/Makefile.* \ - || die "Failed to fix systemd services and timers installation path" - eautoreconf -} - -src_configure() { - # ext4 code does not work anymore - # snapper does not build without btrfs - local myeconfargs=( - --disable-silent-rules - --with-conf="/etc/conf.d" - --enable-zypp - --enable-rollback - --enable-btrfs-quota - --disable-ext4 - --enable-btrfs - --enable-doc - $(use_enable lvm) - $(use_enable pam) - $(use_enable test tests) - $(use_enable systemd) - $(use_enable xattr xattrs) - ) - - econf "${myeconfargs[@]}" -} - -src_install() { - default - # Existing configuration file required to function - keepdir /etc/snapper/configs - newconfd data/sysconfig.snapper snapper - find "${D}" -name '*.la' -delete || die -} - -pkg_postinst() { - elog "In order to use Snapper, you need to set up" - elog "at least one config first. To do this, run:" - elog "snapper create-config " - elog "For more information, see man (8) snapper or" - elog "http://snapper.io/documentation.html and" - elog "https://wiki.gentoo.org/wiki/Snapper" -} -- cgit v1.2.3