commit:     0a57b84a09f8f1842b4c6cef6238969a5aaffc9e
Author:     Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  2 09:45:10 2022 +0000
Commit:     Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Wed Feb  2 09:47:51 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a57b84a

app-backup/bareos: revbump for dep and test update

Closes: https://bugs.gentoo.org/832501
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>

 ...areos-21.0.0.ebuild => bareos-21.0.0-r1.ebuild} | 40 ++++++++++++++++++++--
 1 file changed, 37 insertions(+), 3 deletions(-)

diff --git a/app-backup/bareos/bareos-21.0.0.ebuild 
b/app-backup/bareos/bareos-21.0.0-r1.ebuild
similarity index 92%
rename from app-backup/bareos/bareos-21.0.0.ebuild
rename to app-backup/bareos/bareos-21.0.0-r1.ebuild
index ef360cdc5a34..787a7074b9fc 100644
--- a/app-backup/bareos/bareos-21.0.0.ebuild
+++ b/app-backup/bareos/bareos-21.0.0-r1.ebuild
@@ -12,14 +12,20 @@ inherit python-any-r1 systemd cmake tmpfiles
 DESCRIPTION="Featureful client/server network backup suite"
 HOMEPAGE="https://www.bareos.org/";
 SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> 
${P}.tar.gz"
-RESTRICT="mirror"
+
+# some tests still fail propably due to missing bits in src_test -> TODO
+RESTRICT="mirror test"
+#RESTRICT="
+#      mirror
+#      !test? ( test )
+#"
 
 LICENSE="AGPL-3"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE="X acl ceph clientonly +director glusterfs ipv6 lmdb
        logwatch ndmp readline scsi-crypto
-       static +storage-daemon systemd tcpd vim-syntax vmware xattr"
+       static +storage-daemon systemd tcpd test vim-syntax vmware xattr"
 
 # get cmake variables from core/cmake/BareosSetVariableDefaults.cmake
 DEPEND="
@@ -68,7 +74,15 @@ 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="
        static? ( clientonly )
@@ -106,6 +120,26 @@ pkg_pretend() {
        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"

Reply via email to