diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2023-11-15 08:11:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-15 08:11:47 -0500 |
commit | b39300a5cbd21d9bac00bfac6e6aac5654a7ccd6 (patch) | |
tree | f6302fc39ce897373e377b8f39becf2a5b68df1c | |
parent | db86eb91b78fe584752afe44e2a362539b4d5ee2 (diff) |
Improve handling around EPEL requirement for RPM packages. (#16406)
- Explicitly pull in EPEL on all systems where it’s required in
kickstart.sh
- Explicitly depend on EPEL in our repository config packages for
systems where it’s required.
- Document the requirement to use EPEL on these systems.
-rwxr-xr-x | packaging/installer/kickstart.sh | 28 | ||||
-rw-r--r-- | packaging/installer/methods/packages.md | 11 | ||||
-rw-r--r-- | packaging/repoconfig/debian/changelog | 6 | ||||
-rw-r--r-- | packaging/repoconfig/netdata-repo.spec | 8 |
4 files changed, 35 insertions, 18 deletions
diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh index ef1e22c899..6d657e93ec 100755 --- a/packaging/installer/kickstart.sh +++ b/packaging/installer/kickstart.sh @@ -1321,24 +1321,20 @@ netdata_avail_check() { # Check for any distro-specific dependencies we know we need. check_special_native_deps() { - if [ "${DISTRO_COMPAT_NAME}" = "centos" ] && [ "${SYSVERSION}" = "7" ]; then - progress "Checking for libuv availability." - if ${pm_cmd} search --nogpgcheck -v libuv | grep -q "No matches found"; then - progress "libuv not found, checking for EPEL availability." - if ${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 - progress "EPEL is available, attempting to install so that required dependencies are available." + if [ "${DISTRO_COMPAT_NAME}" = "centos" ] && [ "${SYSVERSION}" -gt 6 ]; then + progress "EPEL is required on this system, checking if it’s available." - # shellcheck disable=SC2086 - if ! run_as_root env ${env} ${pm_cmd} ${install_subcmd} ${pkg_install_opts} epel-release; then - warning "Failed to install EPEL, even though it is required to install native packages on this system." - return 1 - fi - fi + if ${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 - return 0 + progress "EPEL is available, attempting to install so that required dependencies are available." + + # shellcheck disable=SC2086 + if ! run_as_root env ${env} ${pm_cmd} ${install_subcmd} ${pkg_install_opts} epel-release; then + warning "Failed to install EPEL, even though it is required to install native packages on this system." + return 1 + fi fi fi } diff --git a/packaging/installer/methods/packages.md b/packaging/installer/methods/packages.md index 8f21f99668..d49e213941 100644 --- a/packaging/installer/methods/packages.md +++ b/packaging/installer/methods/packages.md @@ -44,7 +44,9 @@ repositories at that top level: Within each top level group of repositories, there are directories for each supported group of distributions: -- `el`: Is for Red Hat Enterprise Linux and binary compatible distros, such as CentOS, Alma Linux, and Rocky Linux. +- `amazonlinux`: Is for Amazon Linux and binary compatible distros. +- `el`: Is for Red Hat Enterprise Linux and binary compatible distros that are not covered by other repos, such + as CentOS, Alma Linux, and Rocky Linux. - `fedora`: Is for Fedora and binary compatible distros. - `ol`: Is for Oracle Linux and binary compatible distros. - `opensuse`: Is for openSUSE and binary compatible distros. @@ -64,6 +66,13 @@ appropriate repository configuration package from https://repo.netdata.cloud/rep directly on the target system using the system package manager. This will ensure any packages needed to use the repository are also installed, and will help enable a seamless transition if we ever need to change our infrastructure. +> ### Note +> +> On RHEL and other systems that use the `el` repostiroies, some of the dependencies for Netdata can only be found +> in the EPEL repository, which is not enabled or installed by default on most of these systems. This additional +> repository _should_ be pulled in automatically by our repository config packages, but if it is not you may need +> to manually install `epel-release` to be able to successfully install the Netdata packages. + ## Manual setup of DEB packages. Netdata’s official DEB repositories are hosted at https://repo.netdata.cloud/repos. We provide four groups of diff --git a/packaging/repoconfig/debian/changelog b/packaging/repoconfig/debian/changelog index 02eedfc365..d056fa43ba 100644 --- a/packaging/repoconfig/debian/changelog +++ b/packaging/repoconfig/debian/changelog @@ -1,3 +1,9 @@ +netdata-repo (2-2) unstable; urgency=medium + + * Version bump to keep in sync with RPM repo packages + + -- Netdata Builder <bot@netdata.cloud> Mon, 13 Nov 2023 11:15:00 -0500 + netdata-repo (2-1) unstable; urgency=medium * Switched to new package hosting infrastructure diff --git a/packaging/repoconfig/netdata-repo.spec b/packaging/repoconfig/netdata-repo.spec index 6139e52bbd..242178ba71 100644 --- a/packaging/repoconfig/netdata-repo.spec +++ b/packaging/repoconfig/netdata-repo.spec @@ -2,7 +2,7 @@ Name: netdata-repo Version: 2 -Release: 1 +Release: 2 Summary: Netdata stable repositories configuration. Group: System Environment/Base @@ -25,6 +25,10 @@ BuildArch: noarch Requires: yum-plugin-priorities %endif +%if 0%{?centos_ver} && 0%{!?amazon_linux:1} && 0%{!?oraclelinux:1} +Requires: epel-release +%endif + # Overlapping file installs Conflicts: netdata-repo-edge @@ -104,6 +108,8 @@ This package contains the official Netdata package repository configuration for %endif %changelog +* Mon Nov 13 2023 Austin Hemmelgarn <austin@netdata.cloud> 2-2 +- Add EPEL requirement for RHEL packages. * Wed Dec 7 2022 Austin Hemmelgarn <austin@netdata.cloud> 2-1 - Switch to new hosting at repo.netdata.cloud. * Mon Jun 6 2022 Austin Hemmelgarn <austin@netdata.cloud> 1-2 |