diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-01-29 12:57:49 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-01-29 12:57:49 +0000 |
commit | b2f1788f6f0365b76f55f257b2d170c1e68a8640 (patch) | |
tree | 508984ca9480c5d791a38bcd454c260752330cfb /app-backup/bareos | |
parent | 16fa78787149cbbd73549c6bcda0eec50293ea0e (diff) |
gentoo auto-resync : 29:01:2024 - 12:57:49
Diffstat (limited to 'app-backup/bareos')
-rw-r--r-- | app-backup/bareos/Manifest | 13 | ||||
-rw-r--r-- | app-backup/bareos/bareos-21.1.8-r1.ebuild (renamed from app-backup/bareos/bareos-21.1.8.ebuild) | 3 | ||||
-rw-r--r-- | app-backup/bareos/bareos-22.1.2-r1.ebuild | 15 | ||||
-rw-r--r-- | app-backup/bareos/bareos-23.0.1.ebuild (renamed from app-backup/bareos/bareos-20.0.9.ebuild) | 236 | ||||
-rw-r--r-- | app-backup/bareos/bareos-9999.ebuild | 20 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-22.1.2-include-algorithm.patch | 41 | ||||
-rw-r--r-- | app-backup/bareos/metadata.xml | 1 |
7 files changed, 210 insertions, 119 deletions
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest index afad15016db8..2c95ce276a41 100644 --- a/app-backup/bareos/Manifest +++ b/app-backup/bareos/Manifest @@ -3,6 +3,7 @@ AUX bareos-21-cmake-gentoo.patch 694 BLAKE2B a01f469c1f61a5887dd75779c96fdebf666 AUX bareos-21.1.2-no-automagic-ccache.patch 837 BLAKE2B 81eea4aa487c59e5514e64e26760d5eaee4b124a2a07e7dc4098adeb0d163dcaa2986c8044b5de9f681e35a8612c3e6a72e5843454e7565747daa536a3e55711 SHA512 1c3b2b9633e7436ce4f782956c9f1722057186a0537a3c4e1f8d78e1ffc8f1afa80c532a6f06ea45a301d4580bc695684a1281b544db376462b613bcb98b803b AUX bareos-21.1.2-werror.patch 785 BLAKE2B b29c00d57818a911251b1ca487372679140131eed7844188ea98b43f654901e88ea5a592bd77330160b2bf401bac8d9118c7989e2d44e8566e847e9625d9b0dc SHA512 b050b796e2f75192b39a7540f2d5a065b97899de2159d5fb9ca5eda19cc00cfeae392550267389c7f6f85ae9106e929117bb8a62be5106b16ad30184381cd4a6 AUX bareos-22.0.2-werror.patch 945 BLAKE2B 54234731ec69337b89ff23e6f613f0fe9fafec5ff2b3b5bf2b121a33a49fd462890c877eb9c96f1e4d26507cf22f1c3ba58c9d6dec740e8b8bd13c518a070308 SHA512 a18159d42cb464cb573a5b9b6f008f323ed45b489dd1db3f6fd22ae0fa6ef40779118834d8f3f640bc6301ee55060c7b86c2b6f2d08dd7cf141ae9e0206e9db8 +AUX bareos-22.1.2-include-algorithm.patch 1087 BLAKE2B 97938a34dd098e69c24e74a561ca191e184c1c9932b482596625ea96862446598c414420186ffd033d6541da3a0237d0a4600f1c303e4e37d4c4f5e8e4a00c3e SHA512 51c677684e14fd3d7f02d849faaa49d0ec85073789d1d34169a5b3d61115fa74ca8d5fe051cd414ed684d9187a308a4c8d22dcd0b4dfac17128fbfa4b28bf110 AUX bareos-dir-21-r1.initd 362 BLAKE2B ed28503db1f91f41f97cc0f9bf83c9f7686a79c6945e82577b7f290df516b6e7ac403023e3aab8c86ef67f67cb3a99bd699fb2d1d0534d53d164c0143cef0e2d SHA512 fc2f217020206ff43238444910555338133370fe423959ca1b5ed53704d371db9993b3a42fe5d9c2065b12ba5a853f6f216ee7418d446466c8f0175a54dc6210 AUX bareos-dir-21.confd 357 BLAKE2B 819a8c4bbf66a4a629128d3b23cc122fc340eb5672e406234d1a2960c30ed075989585e1e4801b2bde8f1edeca770d80b58e58bfcaeb45fa056afab4b610b013 SHA512 9858964a291ee9849e144f968a239758e3e6905bb5420717652114d8a583e3342e50f046efa41730f30cfc3f047b485251e93085fb13b327a6f2272d7c4c0309 AUX bareos-dir-21.service 884 BLAKE2B c0a4fb957588136cd043be2670a03e05bd5ffad4ae87275636642961e0e105ff07fb0614490a71771bb7eecfb551e6f860d8d41104e56ea8c5d434c84c5602a8 SHA512 187e331f8495d27d14434bd71baace7051d254e2886c3814493600973cd830cb01f27153321821e0a3bd2356d55f39cf0878488297079ed80bcfb2693cc77809 @@ -21,11 +22,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.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-r1.ebuild 12017 BLAKE2B 605c996712eba16ce5cbec962e27b51a05101f471ac1e722f428bf0a0b88a78e5f08778a75bcb28b97f95722afe6211eeb4e49ac6d990e9a0a4937dc072cb028 SHA512 742b0a4f7087e52a3f8e77e28cc658d10670228583d0d5668ab29ced1799fb902ad368330fb4669eb7d586114ab076622aaff40ba15ad926da4b37dc6566aa0e -EBUILD bareos-9999.ebuild 12017 BLAKE2B 605c996712eba16ce5cbec962e27b51a05101f471ac1e722f428bf0a0b88a78e5f08778a75bcb28b97f95722afe6211eeb4e49ac6d990e9a0a4937dc072cb028 SHA512 742b0a4f7087e52a3f8e77e28cc658d10670228583d0d5668ab29ced1799fb902ad368330fb4669eb7d586114ab076622aaff40ba15ad926da4b37dc6566aa0e -MISC metadata.xml 1221 BLAKE2B 190840f3e1003bd12c5d6b3b1904f37ea102982c5bb97de4c11adc128fcb86c3af17812b4ad886969bcade9b460753291bb4508321892f1b85e3e43f068a737e SHA512 bf55fff95a0bd8695fdea054b827453f7c8dd96caeee60af7755c25c88bab62548c57dcfb03cf09fbe23f32228878084b8fc3056d2c41b793c9b8ef024c20455 +DIST bareos-23.0.1.tar.gz 14728566 BLAKE2B e5fe93f0e412fcc4b4cb31f3e7d7dbcd44b3c0f76c387f17685d97880af88949998faae502531e937201c1622350d226c2cc9f432b0dfda7893a3fb03e905b5f SHA512 5e3902c33c08dedbdd8dc7c74c5a1258da22288a728ada283b541316a7bff2f7773d1875b11f8fe12368afda3fd1bb2780242ff57441ef8fd596f71ea1af1e75 +EBUILD bareos-21.1.8-r1.ebuild 11632 BLAKE2B f6061c7c734436520be5214cc1be9503f68fa1676eab2de762d25dc1c3adb12742c7f8d93fcec7580f223d3c56f9358e84e442f72502eb43b9362e69c6a264cf SHA512 1f3b6f93d27dff5caf7d6a09a0401269c889a85ecdf31f8c29fb9547985fd72d228855697f72b41718e82afb9ed6ea6d4bbc5092108b6ca065b5e9547c6f3ab6 +EBUILD bareos-22.1.2-r1.ebuild 12056 BLAKE2B febdc307ada813942bb9c22ee3552a95109e5e160e31e4466da5c6d6269e14116ab5b6c74020aa88ac19051de50bb81e12d44eb4123129cfe81e9400e913776f SHA512 3d874295dd34017853de37f8418c81dfbb5fcffa9df3be6f374edfa345ee2d670b551eef94562871845904663bfe4259da8c020b384d644f85c3fcbb2c521ffa +EBUILD bareos-23.0.1.ebuild 12127 BLAKE2B 52dc21837cd79151c362cdc40fd778b3e3bdda578c2c87eb562ec2c30edd7da7a6cfc4a17f907db95845248aef19eeb63e078c319ae26e59ebcdaa10af7f8410 SHA512 314156a3cafdae3051cf02372e39c8016e647fefa895052edcf4b4692cc27d1d127200d1c22e156ed1b91497233f4f90c02a82e0c774f2bb8e0833326c710062 +EBUILD bareos-9999.ebuild 12127 BLAKE2B 52dc21837cd79151c362cdc40fd778b3e3bdda578c2c87eb562ec2c30edd7da7a6cfc4a17f907db95845248aef19eeb63e078c319ae26e59ebcdaa10af7f8410 SHA512 314156a3cafdae3051cf02372e39c8016e647fefa895052edcf4b4692cc27d1d127200d1c22e156ed1b91497233f4f90c02a82e0c774f2bb8e0833326c710062 +MISC metadata.xml 1125 BLAKE2B 5a9eafa553c8eab9c1c7eaf885c588841ed919b97ad0e0e2ef1b9d1f54eb1ccccd33d4f437cb202315acfde472fc1dbbd9633d3d9e32cfbf566176279e1bb5c8 SHA512 5007401bad8f271317a2b9d8af26760df9a2f211d32719bd4a50597d2ae53c3e65cbdb0cdbfa611f638834a56acfc30754003c1c6555c8fe4f4fdf16b11b10df diff --git a/app-backup/bareos/bareos-21.1.8.ebuild b/app-backup/bareos/bareos-21.1.8-r1.ebuild index 1ccdbe824abd..c1553eece5eb 100644 --- a/app-backup/bareos/bareos-21.1.8.ebuild +++ b/app-backup/bareos/bareos-21.1.8-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -145,6 +145,7 @@ src_prepare() { 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" diff --git a/app-backup/bareos/bareos-22.1.2-r1.ebuild b/app-backup/bareos/bareos-22.1.2-r1.ebuild index 3ec758c53539..d61de65c0fc7 100644 --- a/app-backup/bareos/bareos-22.1.2-r1.ebuild +++ b/app-backup/bareos/bareos-22.1.2-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -99,6 +99,14 @@ REQUIRED_USE=" 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 "<app-backup/bareos-21[director,mysql]"; then @@ -149,11 +157,6 @@ src_test() { } 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" diff --git a/app-backup/bareos/bareos-20.0.9.ebuild b/app-backup/bareos/bareos-23.0.1.ebuild index be9f0830fc9f..24b7a4409e94 100644 --- a/app-backup/bareos/bareos-20.0.9.ebuild +++ b/app-backup/bareos/bareos-23.0.1.ebuild @@ -1,25 +1,38 @@ -# Copyright 1999-2023 Gentoo Authors +# 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 +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/" -SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz" -RESTRICT="mirror" + +# 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 jansson lmdb - logwatch mysql ndmp +postgres readline scsi-crypto - sqlite static +storage-daemon systemd tcpd vim-syntax vmware xattr" +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=" @@ -33,12 +46,9 @@ DEPEND=" dev-libs/gmp:0 !clientonly? ( acct-user/${PN} - postgres? ( dev-db/postgresql:*[threads(+)] ) - mysql? ( virtual/mysql ) - sqlite? ( dev-db/sqlite:3 ) + dev-db/postgresql:*[threads(+)] director? ( virtual/mta - jansson? ( dev-libs/jansson:= ) ) ) logwatch? ( sys-apps/logwatch ) @@ -47,18 +57,23 @@ DEPEND=" readline? ( sys-libs/readline:0 ) static? ( acl? ( virtual/acl[static-libs] ) - sys-libs/zlib[static-libs] + dev-libs/jansson:=[static-libs] dev-libs/lzo[static-libs] - sys-libs/ncurses:=[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? ( @@ -69,53 +84,88 @@ RDEPEND="${DEPEND} ) vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) " -BDEPEND="${PYTHON_DEPS}" + +BDEPEND=" + ${PYTHON_DEPS} + test? ( + dev-cpp/gtest + dev-db/postgresql:*[server,threads(+)] + dev-db/mariadb:*[server] + ) +" REQUIRED_USE=" - !clientonly? ( || ( mysql postgres sqlite ) ) static? ( clientonly ) x86? ( !ceph ) " -S=${WORKDIR}/${PN}-Release-${PV} +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 "<app-backup/bareos-21[director,mysql]"; then + if grep -qhriE "dbdriver.*=.*mysql" /etc/bareos/; then + active_removed_backend=MySQL + fi + elif has_version "<app-backup/bareos-21[director,sqlite]"; then + if grep -qhriE "dbdriver.*=.*sqlite" /etc/bareos/; then + active_removed_backend=SQLite + fi + fi + if [[ -n $active_removed_backend ]]; then + ewarn + ewarn "You are currently using bareos with the $active_removed_backend" + ewarn "catalog backend." + ewarn + ewarn "THIS IS NOT SUPPORTED ANYMORE" + ewarn + ewarn "Beginning with version 21.0.0 bareos has dropped support for" + ewarn "MySQL and SQLite catalog backends." + ewarn + ewarn "To upgrade to bareos >=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}" -src_prepare() { - use mysql && export mydbtypes+=( mysql ) - use postgres && export mydbtypes+=( postgresql ) - use sqlite && export mydbtypes+=( sqlite ) + # initiale mariadb database for backup tests + # $USER must be set and != root + export USER=portage - # 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 + default + cmake_src_test - # fix gentoo platform support - eapply -p1 "${FILESDIR}/${PN}-20.0.2-cmake-gentoo.patch" - eapply "${FILESDIR}/${PN}-gcc13-fixes.patch" + 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" - # 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 + cmake_comment_add_subdirectory webui if use clientonly; then mycmakeargs+=( @@ -126,13 +176,15 @@ src_configure() { fi for useflag in acl ipv6 ndmp scsi-crypto \ - systemd mysql lmdb; do + systemd lmdb; do mycmakeargs+=( -D$useflag=$(usex $useflag) ) done + if use X; then + mycmakeargs+=( -Dtraymonitor=yes ) + fi mycmakeargs+=( -DHAVE_PYTHON=0 - -DDEFAULT_DB_TYPE=${mydbtypes[0]} -Darchivedir=/var/lib/bareos/storage -Dbackenddir=/usr/$(get_libdir)/${PN}/backend -Dbasename="`hostname -s`" @@ -159,24 +211,23 @@ src_configure() { -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) ) + 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" @@ -188,7 +239,7 @@ 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/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 @@ -198,9 +249,18 @@ src_install() { 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 - rm -f "$D"/usr/lib64/bareos/plugin/python-fd.so + 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 @@ -305,29 +365,15 @@ src_install() { 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}" + 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_dounit "${FILESDIR}"/bareos-dir.service + 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 @@ -338,7 +384,10 @@ src_install() { keepdir /var/lib/bareos keepdir /var/lib/bareos/storage - diropts -m0755 -o bareos -g bareos + # 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 @@ -359,36 +408,29 @@ pkg_postinst() { 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 " 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 "Be aware that Bareos does not officially support SQLite database." - einfo "Best use it only for a client-only installation. See Bug #445540." + 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 - einfo "It is strongly recommended to use either postgresql or mysql as" - einfo "catalog database backend." 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 3ec758c53539..24b7a4409e94 100644 --- a/app-backup/bareos/bareos-9999.ebuild +++ b/app-backup/bareos/bareos-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -6,7 +6,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{9..12} ) CMAKE_WARN_UNUSED_CLI=no -inherit python-any-r1 systemd cmake tmpfiles +inherit python-any-r1 systemd cmake tmpfiles flag-o-matic if [[ ${PV} == *9999 ]] ; then inherit git-r3 @@ -30,7 +30,7 @@ RESTRICT="mirror test" LICENSE="AGPL-3" SLOT="0" -IUSE="X acl ceph clientonly +director glusterfs ipv6 lmdb +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" @@ -99,6 +99,13 @@ REQUIRED_USE=" 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 "<app-backup/bareos-21[director,mysql]"; then @@ -149,11 +156,6 @@ src_test() { } 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" @@ -224,6 +226,8 @@ src_configure() { -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" diff --git a/app-backup/bareos/files/bareos-22.1.2-include-algorithm.patch b/app-backup/bareos/files/bareos-22.1.2-include-algorithm.patch new file mode 100644 index 000000000000..5f71576bc001 --- /dev/null +++ b/app-backup/bareos/files/bareos-22.1.2-include-algorithm.patch @@ -0,0 +1,41 @@ +From https://github.com/bareos/bareos/pull/1687/commits/3907be7ff9700d0328198b47c58885f5ec56546c +https://bugs.gentoo.org/920489 + +diff --git a/core/src/cats/sql_get.cc b/core/src/cats/sql_get.cc +index b5d921c..150ebfc 100644 +--- a/core/src/cats/sql_get.cc ++++ b/core/src/cats/sql_get.cc +@@ -31,6 +31,7 @@ + */ + + #include "include/bareos.h" ++#include <algorithm> + + #if HAVE_SQLITE3 || HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_INGRES || HAVE_DBI + +diff --git a/core/src/stored/append.cc b/core/src/stored/append.cc +index 05f6784..32234d4 100644 +--- a/core/src/stored/append.cc ++++ b/core/src/stored/append.cc +@@ -41,6 +41,8 @@ + #include "lib/berrno.h" + #include "lib/berrno.h" + ++#include <algorithm> ++ + namespace storagedaemon { + + /* Responses sent to the daemon */ +diff --git a/core/src/dird/ua_prune.cc b/core/src/dird/ua_prune.cc +index 9a0770c..15a0a56 100644 +--- a/core/src/dird/ua_prune.cc ++++ b/core/src/dird/ua_prune.cc +@@ -40,6 +40,8 @@ + #include "lib/edit.h" + #include "lib/parse_conf.h" + ++#include <algorithm> ++ + namespace directordaemon { + + /* Forward referenced functions */ diff --git a/app-backup/bareos/metadata.xml b/app-backup/bareos/metadata.xml index 212e403a0114..bc08ba42ba52 100644 --- a/app-backup/bareos/metadata.xml +++ b/app-backup/bareos/metadata.xml @@ -10,7 +10,6 @@ <flag name="clientonly">Only install file-daemon (client)</flag> <flag name="director">Install director</flag> <flag name="glusterfs">Enable <pkg>sys-cluster/glusterfs</pkg> storage backend</flag> - <flag name="jansson">JSON API support using <pkg>dev-libs/jansson</pkg> for director</flag> <flag name="lmdb">enable build of <pkg>dev-db/lmdb</pkg> support for faster accurate backup</flag> <flag name="logwatch">Install support files for <pkg>sys-apps/logwatch</pkg></flag> <flag name="ndmp">Enable support for NDMP (Network Data Management Protocol)</flag> |