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.
Austin S. Hemmelgarn committed
Nov 15, 2023 at 08:11 UTC
b39300a5cbd21d9bac00bfac6e6aac5654a7ccd6
4 files changed
+35
-18
packaging/installer/kickstart.sh
+12
-16
@@ -1321,24 +1321,20 @@ netdata_avail_check() {
1321
1322
# Check for any distro-specific dependencies we know we need.
1323
check_special_native_deps() {
1324
- if [ "${DISTRO_COMPAT_NAME}" = "centos" ] && [ "${SYSVERSION}" = "7" ]; then
1325
- progress "Checking for libuv availability."
1326
- if ${pm_cmd} search --nogpgcheck -v libuv | grep -q "No matches found"; then
1327
- progress "libuv not found, checking for EPEL availability."
1328
- if ${pm_cmd} search --nogpgcheck -v epel-release | grep -q "No matches found"; then
1329
- warning "Unable to find a suitable source for libuv, cannot install using native packages on this system."
1330
- return 1
1331
- else
1332
- progress "EPEL is available, attempting to install so that required dependencies are available."
1324
+ if [ "${DISTRO_COMPAT_NAME}" = "centos" ] && [ "${SYSVERSION}" -gt 6 ]; then
1325
+ progress "EPEL is required on this system, checking if it’s available."
1326
1334
- # shellcheck disable=SC2086
1335
- if ! run_as_root env ${env} ${pm_cmd} ${install_subcmd} ${pkg_install_opts} epel-release; then
1336
- warning "Failed to install EPEL, even though it is required to install native packages on this system."
1337
- return 1
1338
- fi
1339
- fi
1327
+ if ${pm_cmd} search --nogpgcheck -v epel-release | grep -q "No matches found"; then
1328
+ warning "Unable to find a suitable source for libuv, cannot install using native packages on this system."
1329
+ return 1
1330
else
1341
- return 0
1331
+ progress "EPEL is available, attempting to install so that required dependencies are available."
1332
+
1333
+ # shellcheck disable=SC2086
1334
+ if ! run_as_root env ${env} ${pm_cmd} ${install_subcmd} ${pkg_install_opts} epel-release; then
1335
+ warning "Failed to install EPEL, even though it is required to install native packages on this system."
1336
+ return 1
1337
+ fi
1338
fi
1339
fi
1340
}
packaging/installer/methods/packages.md
+10
-1
@@ -44,7 +44,9 @@ repositories at that top level:
44
45
Within each top level group of repositories, there are directories for each supported group of distributions:
46
47
-- `el`: Is for Red Hat Enterprise Linux and binary compatible distros, such as CentOS, Alma Linux, and Rocky Linux.
47
+- `amazonlinux`: Is for Amazon Linux and binary compatible distros.
48
+- `el`: Is for Red Hat Enterprise Linux and binary compatible distros that are not covered by other repos, such
49
+ as CentOS, Alma Linux, and Rocky Linux.
50
- `fedora`: Is for Fedora and binary compatible distros.
51
- `ol`: Is for Oracle Linux and binary compatible distros.
52
- `opensuse`: Is for openSUSE and binary compatible distros.
@@ -64,6 +66,13 @@ appropriate repository configuration package from https://repo.netdata.cloud/rep
66
directly on the target system using the system package manager. This will ensure any packages needed to use the
67
repository are also installed, and will help enable a seamless transition if we ever need to change our infrastructure.
68
69
+> ### Note
70
+>
71
+> On RHEL and other systems that use the `el` repostiroies, some of the dependencies for Netdata can only be found
72
+> in the EPEL repository, which is not enabled or installed by default on most of these systems. This additional
73
+> repository _should_ be pulled in automatically by our repository config packages, but if it is not you may need
74
+> to manually install `epel-release` to be able to successfully install the Netdata packages.
75
+
76
## Manual setup of DEB packages.
77
78
Netdata’s official DEB repositories are hosted at https://repo.netdata.cloud/repos. We provide four groups of
packaging/repoconfig/debian/changelog
+6
@@ -1,3 +1,9 @@
1
+netdata-repo (2-2) unstable; urgency=medium
2
+
3
+ * Version bump to keep in sync with RPM repo packages
4
+
5
+ -- Netdata Builder <bot@netdata.cloud> Mon, 13 Nov 2023 11:15:00 -0500
6
+
7
netdata-repo (2-1) unstable; urgency=medium
8
9
* Switched to new package hosting infrastructure
packaging/repoconfig/netdata-repo.spec
+7
-1
@@ -2,7 +2,7 @@
2
3
Name: netdata-repo
4
Version: 2
5
-Release: 1
5
+Release: 2
6
Summary: Netdata stable repositories configuration.
7
8
Group: System Environment/Base
@@ -25,6 +25,10 @@ BuildArch: noarch
25
Requires: yum-plugin-priorities
26
%endif
27
28
+%if 0%{?centos_ver} && 0%{!?amazon_linux:1} && 0%{!?oraclelinux:1}
29
+Requires: epel-release
30
+%endif
31
+
32
# Overlapping file installs
33
Conflicts: netdata-repo-edge
34
@@ -104,6 +108,8 @@ This package contains the official Netdata package repository configuration for
108
%endif
109
110
%changelog
111
+* Mon Nov 13 2023 Austin Hemmelgarn <austin@netdata.cloud> 2-2
112
+- Add EPEL requirement for RHEL packages.
113
* Wed Dec 7 2022 Austin Hemmelgarn <austin@netdata.cloud> 2-1
114
- Switch to new hosting at repo.netdata.cloud.
115
* Mon Jun 6 2022 Austin Hemmelgarn <austin@netdata.cloud> 1-2