@cryptotaxi247 / netdata-1 / commits / 78fe3a123

Switch to using a hard-coded release version for RHEL repo configs. (#21649)

'$releasever_major' is a newer thing than we initially realized, and thus broke compatibility with RHEL 9.0 through 9.6 (and equivalent platforms). We had only ever been using the `$releasever` variable to support clean handling of in-place distribution release upgrades (for example, upgrading from RHEL 9 to RHEL 10 without a clean reinstall of the whole system), but in reality that’s a relatively rare use-case on RHEL systems, so there’s not much advantage to continuing to support it there as doing so would make it significantly more complicated to make the repository configuration work with both older and newer versions of RHEL. Instead, just use the hardcoded major version of the release in the repository config for these platforms. Fedora, openSUSE, and Oracle Linux will continue to use `$releasever` as they had been, as it continues to work correctly there.

Austin S. Hemmelgarn committed Jan 27, 2026 at 14:14 UTC 78fe3a12358f02d5708ae69e8b7d892d5593cd9a
3 files changed +16 -5
packaging/repoconfig/CMakeLists.txt
+7 -4
@@ -2,7 +2,7 @@
2
3 cmake_minimum_required(VERSION 3.16.0...3.30)
4
5 -list(APPEND RHEL_DISTROS centos centos-stream rocky almalinux cloudlinux)
5 +list(APPEND RHEL_DISTROS centos centos-stream rhel rocky almalinux cloudlinux)
6 list(APPEND SUSE_DISTROS opensuse-leap opensuse-tumbleweed)
7 list(APPEND RPM_DISTROS rhel opensuse ol amzn fedora)
8 list(APPEND DEB_DISTROS debian ubuntu)
@@ -10,7 +10,7 @@ list(APPEND DEB_DISTROS debian ubuntu)
10 set(DEB_GPG_KEY_SOURCE "https://repo.netdata.cloud/netdatabot.gpg.key")
11
12 set(PACKAGE_VERSION 5)
13 -set(PACKAGE_RELEASE 4)
13 +set(PACKAGE_RELEASE 5)
14
15 set(CPACK_THREADS 0)
16 set(CPACK_STRIP_FILES NO)
@@ -96,6 +96,10 @@ endif()
96
97 if(${DISTRO} IN_LIST RHEL_DISTROS)
98 set(DISTRO "rhel")
99 + string(FIND "${DISTRO_VERSION}" "." DECIMAL_INDEX)
100 + if("${DECIMAL_INDEX}" GREATER 0)
101 + string(SUBSTRING "${DISTRO_VERSION}" 0 "${DECIMAL_INDEX}" DISTRO_VERSION)
102 + endif()
103 elseif(${DISTRO} STREQUAL "opensuse-leap")
104 set(DISTRO "opensuse")
105 elseif(${DISTRO} STREQUAL "opensuse-tumbleweed")
@@ -219,12 +223,11 @@ elseif(${DISTRO} IN_LIST RPM_DISTROS)
223 endif()
224 elseif(${DISTRO} STREQUAL "rhel")
225 set(DIST_NAME "el")
226 + set(DIST_VERSION "${DISTRO_VERSION}")
227 set(CPACK_RPM_PACKAGE_REQUIRES "epel-release")
228
229 if(${DISTRO_VERSION} VERSION_LESS 8)
230 set(CPACK_RPM_PACKAGE_REQUIRES "yum-plugin-priorities, epel-release")
226 - elseif(${DISTRO_VERSION} VERSION_GREATER_EQUAL 9)
227 - set(DIST_VERSION "$releasever_major")
231 endif()
232 endif()
233
packaging/repoconfig/deb.changelog
+6
@@ -1,3 +1,9 @@
1 +@PKG_NAME@ (5-5) unstable; urgency=medium
2 +
3 + * Version bump to keep in sync with RPM repo packages
4 +
5 + -- Austin Hemmelgarn <austin@netdata.cloud> Tue, 27 Jan 2026 11:39:00 -0500
6 +
7 @PKG_NAME@ (5-4) unstable; urgency=medium
8
9 * Version bump to keep in sync with RPM repo packages
packaging/repoconfig/rpm.changelog
+3 -1
@@ -1,5 +1,7 @@
1 +* Tue Jan 27 2026 Austin Hemmelgarn <austin@netdata.cloud> 5-5
2 +- Use hardcoded release version for RHEL systems
3 * Thu Jan 22 2026 Austin Hemmelgarn <austin@netdata.cloud> 5-4
2 -- Fix logic for usage of $releasever_major.
4 +- Fix logic for usage of $releasever_major
5 * Tue Jan 20 2026 Austin Hemmelgarn <austin@netdata.cloud> 5-3
6 - Use $releasever_major instead of $releasever in repo URLs when supported.
7 * Thu Nov 13 2025 Austin Hemmelgarn <austin@netdata.cloud> 5-2