From 74e526c590f52d24a213e25f77858ae0b34ec2c8 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 17 Jun 2024 00:09:46 +0100 Subject: gentoo auto-resync : 17:06:2024 - 00:09:46 --- app-backup/bareos/Manifest | 14 +- app-backup/bareos/bareos-21.1.10.ebuild | 414 ++++++++++++++++++++++++++++ app-backup/bareos/bareos-21.1.8-r1.ebuild | 414 ---------------------------- app-backup/bareos/bareos-22.1.2-r1.ebuild | 435 ----------------------------- app-backup/bareos/bareos-22.1.5.ebuild | 434 +++++++++++++++++++++++++++++ app-backup/bareos/bareos-23.0.1.ebuild | 436 ------------------------------ app-backup/bareos/bareos-23.0.3.ebuild | 435 +++++++++++++++++++++++++++++ app-backup/bareos/bareos-9999.ebuild | 15 +- 8 files changed, 1297 insertions(+), 1300 deletions(-) create mode 100644 app-backup/bareos/bareos-21.1.10.ebuild delete mode 100644 app-backup/bareos/bareos-21.1.8-r1.ebuild delete mode 100644 app-backup/bareos/bareos-22.1.2-r1.ebuild create mode 100644 app-backup/bareos/bareos-22.1.5.ebuild delete mode 100644 app-backup/bareos/bareos-23.0.1.ebuild create mode 100644 app-backup/bareos/bareos-23.0.3.ebuild (limited to 'app-backup/bareos') diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest index 0267a1ba7a5b..fdf1758bc4cd 100644 --- a/app-backup/bareos/Manifest +++ b/app-backup/bareos/Manifest @@ -13,17 +13,17 @@ AUX bareos-sd-21-r1.initd 360 BLAKE2B 89fcefe6044205ec1302bb01ddf2650fe81746739a AUX bareos-sd-21.confd 360 BLAKE2B 36a73a27a635ec1a4c3d1592e896ba85c3c7d6e91c3c0a2e5057194b6fde8eff6576794c00c0838f27c8165fbc2c65c77f6e2e9cc684fa6c1f978b56701618a3 SHA512 eb5d942edb45d349804c90eb0379cfabca765d63277b21feb4f1937ef8b655b6ba9feb3b671b61f582996ff4f9740614c197ae990c00879731ec43d6da8f4286 AUX bareos-sd.service 812 BLAKE2B 7ac9754d98ea177614450045fbbaf7406592b30a280646eacdf31271a0cafd63e88ac463b1d94143ccac96c289de3f88a177edab665f073e7c7692037ffedb68 SHA512 6a0fdb3af03e9f94e0d755a3286aff36b41ab1f00a82e9864f6d3de6931691f6aba79aeb7fc952cec039e4174b545f53c23e96fcfbaed71192877d201b3086ad AUX tmpfiles.d-bareos.conf 33 BLAKE2B 68feed7629dde0dad019470851cea33140be3b17186fbbee7ad6c6a591978236ec09252d890117030d8706d22ea02f9971063aa80a393d3726510128527401d0 SHA512 65d3f72e57eb3afc557ab6b56a8ec1895a679b904114fefd1c9d0ceeb6b9fa8413575591ed81e1ce6963bdaf34dad227e781865b39bb237afc6bb5652306d2ef -DIST bareos-21.1.8.tar.gz 11663322 BLAKE2B 5f8c66d44c702b187f56434925417f3eff5f9f515f52d5707d5dce2edfcf566474bae52518adab1d6f87d479fd05cc906f48350eec4f21b858720a607f9b4311 SHA512 643561d4bd92989e0b9356dab500083073daa2717159b5b061f5680ab96e8532c13753e94480419239bcad9938818c203d43dc72b690404ae5a143fdd3cd0738 +DIST bareos-21.1.10.tar.gz 11671111 BLAKE2B 047901ee6de2f2ba086d7c0406b623d36514177dace7a9de324cc747a9587a80f4a88a033a5c0685998986b96c4d87779ed81950ecba5bf4b21078c8b031d1fd SHA512 8cccbf46d1149f5ea9820bfa15369777a29b41f2d15eb35a500a8637898c0ca374504bcced41962f345058f78e4d79bfcd94f47e4d5598a95e04a6911978843b DIST bareos-21.1.9.tar.gz 11670286 BLAKE2B 22486fdf2b80296fed4265afa8ea4f5c0708f7836172da6a0f081c3328eea84c2eaf7de62884c82aeb61ead38f5a872edc6718fce730c16d6e4e96ef520eff0e SHA512 337702bf5b38bdf6f96720748ec0ab154f698389d6ff535b59f0a9432783f021287b98ac446467a1da51614c6fd740b45b8a5363f56cb5bd855bfe333fc6cfac -DIST bareos-22.1.2.tar.gz 14746158 BLAKE2B 5d8c9c098f61bd35b11f907a3e215a7c08b504c3e529c67a4c8c5cbbf24775158966800e63efca260b4cc513417332cdf43a158d21684f09be3d89dd93258880 SHA512 76d53425b2a28f4f7887b323a70bf9b37df44302e0e25aff7156c1b3ee26ffa60bbfb45ed29a0f2fe763d5c38b8f7135ac2a3e405d8e2b10717f4893baf9c327 DIST bareos-22.1.4.tar.gz 14747141 BLAKE2B 1b155c35f22120b07151a54ef314c6f8f42ea14c3f194d787a58ece41f8de148f0b34d0cc6a54f578b1bb5c4d3ae2a7736829f6d2cd642d8e001f1797a18052a SHA512 4285f0f524c6f30ae8f7dd67e2a732cf983663f56b053968a7f10d753e38bc2ee1e2673d1fb6a9b516994b51b45215fac153e301b893c9cb31a164ebff0d4c85 -DIST bareos-23.0.1.tar.gz 14728566 BLAKE2B e5fe93f0e412fcc4b4cb31f3e7d7dbcd44b3c0f76c387f17685d97880af88949998faae502531e937201c1622350d226c2cc9f432b0dfda7893a3fb03e905b5f SHA512 5e3902c33c08dedbdd8dc7c74c5a1258da22288a728ada283b541316a7bff2f7773d1875b11f8fe12368afda3fd1bb2780242ff57441ef8fd596f71ea1af1e75 +DIST bareos-22.1.5.tar.gz 14747894 BLAKE2B 560bc1ceb34fccfb370e8643d24917e24b2440158dd267532c2cb7e4a543d29b81b033e7a34c46eda4c6d71165e48da9332605c3bcd073fbafa38f3ba8be69a2 SHA512 8138f2142f705e2448f8bc2e00f39fe4f734ce8fe687e3cf00c9ff9bda9a3df73ebd7fb86d850ba755588cdaca324e1ba9034987ecb975ce47dd279395ee03b4 DIST bareos-23.0.2.tar.gz 14724410 BLAKE2B 0fe86c10d62ad322dfbcd5ac972aec27d6f0ad31e156d359398739b2bfd784a02ce89b26b6bdfcf279265114a4e6e13efe21edab8b87cff15f1f9f3ad055c64b SHA512 a8d8270c8060480fe87da9252de86a75eea1cc427db63536f848d19a2c23c499ca294a9656d9a6aac73a756f84c96a2d72f13d1cede7948e18bf93efc2ecfc29 -EBUILD bareos-21.1.8-r1.ebuild 11632 BLAKE2B f6061c7c734436520be5214cc1be9503f68fa1676eab2de762d25dc1c3adb12742c7f8d93fcec7580f223d3c56f9358e84e442f72502eb43b9362e69c6a264cf SHA512 1f3b6f93d27dff5caf7d6a09a0401269c889a85ecdf31f8c29fb9547985fd72d228855697f72b41718e82afb9ed6ea6d4bbc5092108b6ca065b5e9547c6f3ab6 +DIST bareos-23.0.3.tar.gz 14744648 BLAKE2B be31a4284ff2ff97ace51f895637cfafac666d4e9d95524e5e03d22798427ff551419422fb41783d3fda7288a0cd982c8dde751a15428346c61e3fa64bfa80c0 SHA512 42ede6976c894f89836ae272598edce8b3dadbdceb3b429724ea4c01a980470c161f03e54b58b17bd3fa3a7f750b4a79e5f96070fee5aae4b4fe73e79b2d8b61 +EBUILD bareos-21.1.10.ebuild 11633 BLAKE2B d0394fc3ccd10ee5074b2de6066529b58f55c0c8260790c7aecbcf0b558ddd6918e96c768bca851a5d20009d36df25ebd8fbf6fdf383a9b3a70c7c6a8187fcb2 SHA512 4eb5a628e0be7f1e815599b2b8223569f881e161e58511d8b990adaae286b45682e5c0453dbd8db5b9b00c8322b6f616fa989ef1da9ee9d72776112179c34e7c EBUILD bareos-21.1.9.ebuild 11633 BLAKE2B d0394fc3ccd10ee5074b2de6066529b58f55c0c8260790c7aecbcf0b558ddd6918e96c768bca851a5d20009d36df25ebd8fbf6fdf383a9b3a70c7c6a8187fcb2 SHA512 4eb5a628e0be7f1e815599b2b8223569f881e161e58511d8b990adaae286b45682e5c0453dbd8db5b9b00c8322b6f616fa989ef1da9ee9d72776112179c34e7c -EBUILD bareos-22.1.2-r1.ebuild 12056 BLAKE2B febdc307ada813942bb9c22ee3552a95109e5e160e31e4466da5c6d6269e14116ab5b6c74020aa88ac19051de50bb81e12d44eb4123129cfe81e9400e913776f SHA512 3d874295dd34017853de37f8418c81dfbb5fcffa9df3be6f374edfa345ee2d670b551eef94562871845904663bfe4259da8c020b384d644f85c3fcbb2c521ffa EBUILD bareos-22.1.4.ebuild 12005 BLAKE2B 8a0491f51510f95b3038c5a316450c8e0f4d75cf73dede5c798659ca3da6efc772f4a58f66dc92205079e8d37aec6d209ff86d77bda019532b4f014a02449b0a SHA512 c6778b59413fa882b7dd25cdd7e46d2ecd4cbc15a9fe94a054659c7f25d74a44ee8a23cd25862be5fe5cb54d517a9396f85fd98ff48e01bec92f8b84d524522d -EBUILD bareos-23.0.1.ebuild 12127 BLAKE2B 52dc21837cd79151c362cdc40fd778b3e3bdda578c2c87eb562ec2c30edd7da7a6cfc4a17f907db95845248aef19eeb63e078c319ae26e59ebcdaa10af7f8410 SHA512 314156a3cafdae3051cf02372e39c8016e647fefa895052edcf4b4692cc27d1d127200d1c22e156ed1b91497233f4f90c02a82e0c774f2bb8e0833326c710062 +EBUILD bareos-22.1.5.ebuild 12005 BLAKE2B 3eef9af6b2fcd0f74608fd9c7f75c9bf61e526eb7d7636875c7c265c12e89a2beb8f0316ba26aad6182dd1656dff865d052acf3baa1e783b69d9e74cf742aad6 SHA512 61272e827db0c7d17a7a4f5be66cb7855e403dbbf4cfb3d367bd27a420526f58c50897a1baea7c63bb16da018cf5838c5002a4b992e2aef36c629e8188095171 EBUILD bareos-23.0.2.ebuild 12076 BLAKE2B 8f88d7515e3886cc17c40abef4b780ff741e5f3adf289724d5a9c8c7daa70db6dabb1697c1601da52f47fc207e77ad3d7b95d450842b793e0e516583b74cc6c1 SHA512 eea73586fe70baffb17520384302937f2fca94cefb3c84bf8a63f30cf66be3aec2694690497580a3be2d9dcb12f914c936a44675b273ec6b59d767de04834a80 -EBUILD bareos-9999.ebuild 12127 BLAKE2B 52dc21837cd79151c362cdc40fd778b3e3bdda578c2c87eb562ec2c30edd7da7a6cfc4a17f907db95845248aef19eeb63e078c319ae26e59ebcdaa10af7f8410 SHA512 314156a3cafdae3051cf02372e39c8016e647fefa895052edcf4b4692cc27d1d127200d1c22e156ed1b91497233f4f90c02a82e0c774f2bb8e0833326c710062 +EBUILD bareos-23.0.3.ebuild 12076 BLAKE2B 79225efaedacac0ba6721e45da5e91de20f87afe22d2c59f5418fd2a25445aff873025826128ad790f0c03622edb7727f41db55e5863f42a12273be0898dcf4e SHA512 cf6b598e14d3d4e32cdfcd8f75b216ad9222ecf74e67a5eb09fe4b611f17c464b6624adf8f71750d337f1c783a37ac49c00f69ef7cf8d68caa42528550f98777 +EBUILD bareos-9999.ebuild 12076 BLAKE2B 79225efaedacac0ba6721e45da5e91de20f87afe22d2c59f5418fd2a25445aff873025826128ad790f0c03622edb7727f41db55e5863f42a12273be0898dcf4e SHA512 cf6b598e14d3d4e32cdfcd8f75b216ad9222ecf74e67a5eb09fe4b611f17c464b6624adf8f71750d337f1c783a37ac49c00f69ef7cf8d68caa42528550f98777 MISC metadata.xml 1125 BLAKE2B 5a9eafa553c8eab9c1c7eaf885c588841ed919b97ad0e0e2ef1b9d1f54eb1ccccd33d4f437cb202315acfde472fc1dbbd9633d3d9e32cfbf566176279e1bb5c8 SHA512 5007401bad8f271317a2b9d8af26760df9a2f211d32719bd4a50597d2ae53c3e65cbdb0cdbfa611f638834a56acfc30754003c1c6555c8fe4f4fdf16b11b10df diff --git a/app-backup/bareos/bareos-21.1.10.ebuild b/app-backup/bareos/bareos-21.1.10.ebuild new file mode 100644 index 000000000000..ae6b1efd9be1 --- /dev/null +++ b/app-backup/bareos/bareos-21.1.10.ebuild @@ -0,0 +1,414 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..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" + eapply "${FILESDIR}/${PN}-21.1.8-gcc14-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-r1.ebuild b/app-backup/bareos/bareos-21.1.8-r1.ebuild deleted file mode 100644 index c1553eece5eb..000000000000 --- a/app-backup/bareos/bareos-21.1.8-r1.ebuild +++ /dev/null @@ -1,414 +0,0 @@ -# Copyright 1999-2024 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" - eapply "${FILESDIR}/${PN}-21.1.8-gcc14-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-22.1.2-r1.ebuild b/app-backup/bareos/bareos-22.1.2-r1.ebuild deleted file mode 100644 index d61de65c0fc7..000000000000 --- a/app-backup/bareos/bareos-22.1.2-r1.ebuild +++ /dev/null @@ -1,435 +0,0 @@ -# Copyright 1999-2024 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 - -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 - ) - X? ( - dev-qt/qtwidgets:5= - ) - " -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 ) -" - -PATCHES=( - # fix gentoo platform support - "${FILESDIR}/${PN}-21-cmake-gentoo.patch" - "${FILESDIR}/${PN}-22.0.2-werror.patch" - "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.patch" - "${FILESDIR}/${PN}-22.1.2-include-algorithm.patch" -) - -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 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 - if use X; then - mycmakeargs+=( -Dtraymonitor=yes ) - fi - - 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.5.ebuild b/app-backup/bareos/bareos-22.1.5.ebuild new file mode 100644 index 000000000000..2fd5f5097e09 --- /dev/null +++ b/app-backup/bareos/bareos-22.1.5.ebuild @@ -0,0 +1,434 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +CMAKE_WARN_UNUSED_CLI=no + +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/" + +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" + +# some tests still fail propably due to missing bits in src_test -> TODO +RESTRICT="mirror test" +#RESTRICT=" +# mirror +# !test? ( test ) +#" + +# 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 + ) + X? ( + dev-qt/qtwidgets:5= + ) + " +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 ) +" + +PATCHES=( + # fix gentoo platform support + "${FILESDIR}/${PN}-21-cmake-gentoo.patch" + "${FILESDIR}/${PN}-22.0.2-werror.patch" + "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.patch" +) + +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 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 + if use X; then + mycmakeargs+=( -Dtraymonitor=yes ) + fi + + 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-23.0.1.ebuild b/app-backup/bareos/bareos-23.0.1.ebuild deleted file mode 100644 index 24b7a4409e94..000000000000 --- a/app-backup/bareos/bareos-23.0.1.ebuild +++ /dev/null @@ -1,436 +0,0 @@ -# Copyright 1999-2024 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 - -inherit python-any-r1 systemd cmake tmpfiles flag-o-matic - -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 cpu_flags_x86_avx +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 - ) - X? ( - dev-qt/qtwidgets:5= - ) - " -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 ) -" - -PATCHES=( - "${FILESDIR}/${PN}-21-cmake-gentoo.patch" - "${FILESDIR}/${PN}-22.0.2-werror.patch" - "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.patch" - "${FILESDIR}/${PN}-22.1.2-include-algorithm.patch" -) - -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 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 - if use X; then - mycmakeargs+=( -Dtraymonitor=yes ) - fi - - 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) - ) - - use cpu_flags_x86_avx && append-flags "-DXXH_X86DISPATCH_ALLOW_AVX" - - # 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-23.0.3.ebuild b/app-backup/bareos/bareos-23.0.3.ebuild new file mode 100644 index 000000000000..7764737d6d5a --- /dev/null +++ b/app-backup/bareos/bareos-23.0.3.ebuild @@ -0,0 +1,435 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +CMAKE_WARN_UNUSED_CLI=no + +inherit python-any-r1 systemd cmake tmpfiles flag-o-matic + +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/" + +LICENSE="AGPL-3" +SLOT="0" +IUSE="X acl ceph clientonly cpu_flags_x86_avx +director glusterfs ipv6 lmdb + logwatch ndmp readline scsi-crypto split-usr + static +storage-daemon systemd tcpd test vim-syntax vmware xattr" + +# some tests still fail propably due to missing bits in src_test -> TODO +RESTRICT="mirror test" +#RESTRICT=" +# mirror +# !test? ( test ) +#" + +# 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 + ) + X? ( + dev-qt/qtwidgets:5= + ) + " +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 ) +" + +PATCHES=( + "${FILESDIR}/${PN}-21-cmake-gentoo.patch" + "${FILESDIR}/${PN}-22.0.2-werror.patch" + "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.patch" +) + +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 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 + if use X; then + mycmakeargs+=( -Dtraymonitor=yes ) + fi + + 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) + ) + + use cpu_flags_x86_avx && append-flags "-DXXH_X86DISPATCH_ALLOW_AVX" + + # 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 24b7a4409e94..7764737d6d5a 100644 --- a/app-backup/bareos/bareos-9999.ebuild +++ b/app-backup/bareos/bareos-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{9..12} ) +PYTHON_COMPAT=( python3_{10..13} ) CMAKE_WARN_UNUSED_CLI=no inherit python-any-r1 systemd cmake tmpfiles flag-o-matic @@ -21,6 +21,12 @@ fi DESCRIPTION="Featureful client/server network backup suite" HOMEPAGE="https://www.bareos.org/" +LICENSE="AGPL-3" +SLOT="0" +IUSE="X acl ceph clientonly cpu_flags_x86_avx +director glusterfs ipv6 lmdb + logwatch ndmp readline scsi-crypto split-usr + static +storage-daemon systemd tcpd test vim-syntax vmware xattr" + # some tests still fail propably due to missing bits in src_test -> TODO RESTRICT="mirror test" #RESTRICT=" @@ -28,12 +34,6 @@ RESTRICT="mirror test" # !test? ( test ) #" -LICENSE="AGPL-3" -SLOT="0" -IUSE="X acl ceph clientonly cpu_flags_x86_avx +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 @@ -103,7 +103,6 @@ PATCHES=( "${FILESDIR}/${PN}-21-cmake-gentoo.patch" "${FILESDIR}/${PN}-22.0.2-werror.patch" "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.patch" - "${FILESDIR}/${PN}-22.1.2-include-algorithm.patch" ) pkg_pretend() { -- cgit v1.2.3