Skip to content

Commit e338520

Browse files
authored
Merge pull request #49 from openhpc/2026-03-05-docs
ci: download docs-ohpc from EL_10 for non-EL_10 Factory repos
2 parents 70bba3f + cbfa561 commit e338520

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

ansible/roles/test/files/support_functions.sh

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,31 @@ install_doc_rpm() {
616616
install_package perl-File-Copy perl-Log-Log4perl perl-Config-IniFiles
617617
fi
618618
fi
619-
install_package docs-ohpc
619+
620+
# Starting with OpenHPC 4.1, docs-ohpc is only built for EL_10.
621+
# When using the Factory repository on other distributions,
622+
# download the noarch RPM from the EL_10 Factory repository
623+
# and install it locally.
624+
if [[ "${Repo}" == "Factory" ]] && [[ "${os_repo}" != "EL_10" ]] &&
625+
{ [[ "${VERSION_MAJOR}" -eq 4 && "${VERSION_MINOR}" -ge 1 ]] ||
626+
[[ "${VERSION_MAJOR}" -gt 4 ]]; }; then
627+
local EL10_REPO_URL
628+
EL10_REPO_URL="http://obs.openhpc.community:82/OpenHPC${VERSION_MAJOR}:/${Version}:/Factory/EL_10/"
629+
echo "docs-ohpc is only built for EL_10, downloading from ${EL10_REPO_URL}"
630+
local DOCS_TMPDIR
631+
DOCS_TMPDIR=$(mktemp -d)
632+
loop_command dnf download -y \
633+
--repofrompath="ohpc-el10,${EL10_REPO_URL}" \
634+
--repo=ohpc-el10 --disablerepo='*' \
635+
--downloaddir="${DOCS_TMPDIR}" \
636+
--setopt="ohpc-el10.gpgcheck=0" \
637+
docs-ohpc
638+
"${PKG_MANAGER}" "${YES}" install "${DOCS_TMPDIR}"/docs-ohpc*.rpm ||
639+
ERROR "Unable to install docs-ohpc"
640+
rm -rf "${DOCS_TMPDIR}"
641+
else
642+
install_package docs-ohpc
643+
fi
620644

621645
if [ -n "${overwrite_rpm}" ]; then
622646
rpm -Uhv "${overwrite_rpm}" --force

0 commit comments

Comments
 (0)