]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
scripts/build/ceph.spec.in: fix rhel version checks 66772/head
authorRonen Friedman <rfriedma@redhat.com>
Thu, 1 Jan 2026 14:35:33 +0000 (14:35 +0000)
committerRonen Friedman <rfriedma@redhat.com>
Tue, 6 Jan 2026 16:27:32 +0000 (16:27 +0000)
Fixing multiple instances in this file where
the RHEL version is checked - without properly
ensuring that the OS is indeed RHEL.

0%{?rhel} is only defined on RHEL systems, and
is '0' otherwise. That resulted, for example, in
Fedora 43 having 'gts_version' incorrectly
set to '13'.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ceph.spec.in

index 45435898907e72a6c51b17662e3e3b81003e940a..9b154a72a9a8988ace80c38ca4c6fb97d15069b8 100644 (file)
@@ -35,7 +35,7 @@
 %bcond_with rbd_rwl_cache
 %endif
 %if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
-%if 0%{?rhel} < 9 || 0%{?openEuler}
+%if (0%{?rhel} && 0%{?rhel} < 9) || 0%{?openEuler}
 %bcond_with system_pmdk
 %else
 %ifarch s390x aarch64
 %{!?python3_pkgversion: %global python3_pkgversion 3}
 %{!?python3_version_nodots: %global python3_version_nodots 3}
 %{!?python3_version: %global python3_version 3}
-%if 0%{?rhel} < 10
+%if 0%{?rhel} && 0%{?rhel} < 10
 %{!?gts_version: %global gts_version 13}
 %endif
 
@@ -674,7 +674,7 @@ Requires:       python%{python3_pkgversion}-cherrypy
 Requires:       python%{python3_pkgversion}-routes
 %if 0%{?weak_deps}
 Recommends:     python%{python3_pkgversion}-saml
-%if 0%{?fedora} || 0%{?rhel} <= 8
+%if 0%{?fedora} || (0%{?rhel} && 0%{?rhel} <= 8)
 Recommends:     python%{python3_pkgversion}-grpcio
 Recommends:     python%{python3_pkgversion}-grpcio-tools
 %endif
@@ -729,7 +729,7 @@ Requires:       python%{python3_pkgversion}-PyYAML
 %endif
 # RHEL8 has python 3.6 and that lacks dataclasses in the stdlib, so pull in the
 # backport dataclasses module instead.
-%if 0%{?rhel} <= 8
+%if 0%{?rhel} && 0%{?rhel} <= 8
 Requires:       python%{python3_pkgversion}-dataclasses
 %endif
 %if 0%{?weak_deps}