Skip to content

Commit 7b361bf

Browse files
andrewschoenmergify[bot]
authored andcommitted
tests/container: add rhel support to rpm builds
Signed-off-by: Andrew Schoen <[email protected]>
1 parent 540fcf0 commit 7b361bf

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/container/build.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
python=python3
6-
url="https://github.com/samba-in-kubernetes/sambacc"
6+
url="${SAMBACC_REPO_URL:-https://github.com/samba-in-kubernetes/sambacc}"
77
bdir="${SAMBACC_BUILD_DIR:-/var/tmp/build/sambacc}"
88
distname="${SAMBACC_DISTNAME}"
99
# use SAMBACC_BUILD_TASKS to limit build tasks if needed
@@ -93,6 +93,11 @@ task_sys_deps() {
9393
info "detected centos (stream): ${OS_VER}"
9494
use_centos=true
9595
;;
96+
rhel*)
97+
info "detected rhel: ${OS_VER}"
98+
use_centos=
99+
use_rhel=true
100+
;;
96101
fedora*)
97102
info "detected fedora: ${OS_VER}"
98103
use_centos=
@@ -134,6 +139,9 @@ task_sys_deps() {
134139
yum_args=(--enablerepo=crb)
135140
pkgs+=(pyproject-rpm-macros)
136141
fi
142+
if [ "$use_rhel" ]; then
143+
pkgs+=(pyproject-rpm-macros)
144+
fi
137145
"${dnf_cmd}" "${yum_args[@]}" install -y "${pkgs[@]}"
138146
"${dnf_cmd}" clean all
139147
}

0 commit comments

Comments
 (0)