[MDEV-26119] RPM packages on RHEL-8 require the latest minor Created: 2021-07-07  Updated: 2023-11-22  Resolved: 2021-07-13

Status: Closed
Project: MariaDB Server
Component/s: Packaging
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6
Fix Version/s: 10.2.40, 10.3.31, 10.4.21, 10.5.12, 10.6.4

Type: Bug Priority: Major
Reporter: Assen Totin (Inactive) Assignee: Alexey Bychko (Inactive)
Resolution: Fixed Votes: 0
Labels: None


 Description   

RHEL is an LTS distribution in which each major version is comprised of multiple minor versions, supported in parallel for a given number of months. Users are free to choose when and how they switch from one minor to another. At the time of writing, supported minors in RHEL-8 are 8.1, 8.2, 8.3 and 8.4. The following document gives more details on exact support timelines for RHEL-8:

MariaDB Server packages are built on the latest version of RHEL, 8.4. A dependency on a particular system library, libsepol, is set up not only on its version but also on its release number. Release numbers for a package in RHEL typically change in every minor, so this means that our MariaDB Server package can only be installed on RHEL 8.4 and not on any previously supported minor. This creates issues with users who prefer to stay one or two minors back in their RHEL version in order to avoid bugs (to which RHEL is anything but immune).

To avoid this, MariaDB Server packages should only require a suitable version of the library and not include in the dependency (the "Requires:" line in the spec file) the release number for the library.

Example (from RHEL-7 to which this also applies);

[root@s4w3 assen.totin]# rpm -q --qf='%{version}' MariaDB-server
10.5.10_7
 
[root@s4w3 assen.totin]# rpm -q --requires MariaDB-server | grep libsepol
libsepol >= 2.5-10.el7

It is pretty hard to believe that we depend not only on libsepol-2.5 but on this exact RHEL build number 10.



 Comments   
Comment by Elena Stepanova [ 2021-07-08 ]

Hopefully it can be as simple as

diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt
index 038e7163901..810e0127202 100644
--- a/support-files/CMakeLists.txt
+++ b/support-files/CMakeLists.txt
@@ -88,7 +88,7 @@ IF(UNIX)
         INSTALL(FILES ${out} DESTINATION ${inst_location}/policy/selinux COMPONENT SupportFiles)
       ENDFOREACH()
       IF(RPM)
-        EXECUTE_PROCESS(COMMAND rpm -q --qf "%{VERSION}-%{RELEASE}" libsepol
+        EXECUTE_PROCESS(COMMAND rpm -q --qf "%{VERSION}" libsepol
                         OUTPUT_VARIABLE LIBSEPOL_VERSION RESULT_VARIABLE err)
         IF (NOT err)
           SET(CPACK_RPM_server_PACKAGE_REQUIRES

I don't see any other dependencies which use the same logic.

Comment by Alexey Bychko (Inactive) [ 2021-07-13 ]

the fix is done. could you please test fixed version(s) and report back if fix is ok or not? thank you

Generated at Thu Feb 08 09:42:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.