Initial check for bind-dyndb-ldap

Make it easier to indicate whether bind-devel allows bind-dyndb-ldap to
rebuild.
This commit is contained in:
Petr Menšík 2024-07-31 21:12:55 +02:00 committed by psklenar
commit a8e1a0c048
2 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,9 @@
summary: Tries whether bind-dyndb-ldap can be build with this bind-devel
test: ./test.sh
framework: beakerlib
require:
- bind-devel
recommend:
- fedpkg
- centpkg
- rhpkg

View file

@ -0,0 +1,42 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartSetup
rlAssertRpm bind-devel
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
rlRun "pushd $tmp"
rlRun "source /etc/os-release"
case "$ID"
centos)
PKG=centpkg
BRANCH=cs${VERSION}
;;
rhel)
PKG=rhpkg
BRANCH=rhel-${VERSION}-main
;;
fedora)
PKG=fedpkg
BRANCH=rawhide
;;
*)
rlFatal "Unsupported distribution $ID" ;;
esac
rlRun "$PKG clone -a bind-dyndb-ldap"
rlRun "pushd bind-dyndb-ldap"
rlPhaseEnd
rlPhaseStartTest
rlRun "git checkout $BRANCH"
rlRun "$PKG local"
rlRun "rpm -qpl $(arch)/bind-dyndb-ldap-*.$(arch).rpm"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "popd"
rlRun "rm -rf $tmp" 0 "Remove tmp directory"
rlPhaseEnd
rlJournalEnd