0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-13 09:11:50 +00:00

Fix native package installation on RHEL. ()

- On all RHEL versions, correctly pull the EPEL release package from
  the Fedora project, since RHEL does not include it in their repos.
- On RHEL 9 and newer, as well as clones, enable the CodeReady Builder
  repo, which is apparently required there to make EPEL work at all,
  before installing EPEL.
This commit is contained in:
Austin S. Hemmelgarn 2025-02-19 10:11:27 -05:00 committed by GitHub
parent fb561f84ab
commit 1786e91e91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1515,7 +1515,22 @@ check_special_native_deps() {
if [ "${DISTRO_COMPAT_NAME}" = "centos" ] && [ "${SYSVERSION}" -gt 6 ]; then
progress "EPEL is required on this system, checking if its available."
if LC_ALL=C ${pm_cmd} search --nogpgcheck -v epel-release | grep -q "No matches found"; then
if [ "${SYSVERSION}" -ge 9 ]; then
progress "EPEL support requires CodeReady Builder repo on this system, attempting to enable it."
case "${DISTRO}" in
rhel) run_as_root subscription-manager repos --enable "codeready-builder-for-rhel-${SYSVERSION}-$(arch)-rpms" ;;
*) run_as_root dnf config-manager --set-enabled crb ;;
esac
fi
if [ "${DISTRO}" = "rhel" ]; then
# shellcheck disable=SC2086
if ! run_as_root env ${env} ${pm_cmd} ${install_subcmd} ${pkg_install_opts} "https://dl.fedoraproject.org/pub/epel/epel-release-latest-${SYSVERSION}.noarch.rpm"; then
warning "Failed to install EPEL, even though it is required to install native packages on this system."
return 1
fi
elif LC_ALL=C ${pm_cmd} search --nogpgcheck -v epel-release | grep -q "No matches found"; then
warning "Unable to find a suitable source for libuv, cannot install using native packages on this system."
return 1
else