From 8e1ecfc50ebc3b661f08223b3be7978bef59f61c Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Jul 18 2023 10:01:02 +0000 Subject: Use 0%{?rhel} instead of 0%{rhel} --- diff --git a/systemd.spec b/systemd.spec index 10b19ed..a8a98fc 100644 --- a/systemd.spec +++ b/systemd.spec @@ -173,13 +173,13 @@ BuildRequires: python3dist(pillow) BuildRequires: python3dist(pytest-flakes) %endif BuildRequires: python3dist(pytest) -%if %{undefined rhel} || 0%{rhel} > 8 +%if %{undefined rhel} || 0%{?rhel} > 8 BuildRequires: python3dist(zstd) %endif # gzip and lzma are provided by the stdlib BuildRequires: firewalld-filesystem BuildRequires: libseccomp-devel -%if %{defined rhel} && 0%{rhel} < 9 +%if %{defined rhel} && 0%{?rhel} < 9 BuildRequires: meson >= 0.57 %else BuildRequires: meson >= 0.43 @@ -192,7 +192,7 @@ BuildRequires: perl BuildRequires: perl(IPC::SysV) # %generate_buildrequires doesn't work on c8s so we just add all of them as # BuildRequires instead. -%if %{defined rhel} && 0%{rhel} < 9 +%if %{defined rhel} && 0%{?rhel} < 9 BuildRequires: gnu-efi BuildRequires: gnu-efi-devel BuildRequires: python3dist(pyelftools) @@ -403,7 +403,7 @@ It also contains tools to manage encrypted home areas and secrets bound to the machine, and to create or grow partitions and make file systems automatically. %if 0%{?have_gnu_efi} -%if %{undefined rhel} || 0%{rhel} > 8 +%if %{undefined rhel} || 0%{?rhel} > 8 %package ukify Summary: Tool to build Unified Kernel Images Requires: %{name} = %{version}-%{release} @@ -602,7 +602,7 @@ sed -r 's|/system/|/user/|g' %{SOURCE16} >10-timeout-abort.conf.user mkdir selinux cp %SOURCE100 %SOURCE101 %SOURCE102 %SOURCE103 selinux -%if %{undefined rhel} || 0%{rhel} > 8 +%if %{undefined rhel} || 0%{?rhel} > 8 %generate_buildrequires %if 0%{?have_gnu_efi} if grep -q gnu-efi meson_options.txt; then @@ -887,7 +887,7 @@ install -Dm0644 -t %{buildroot}%{_prefix}/lib/systemd/network/ %{SOURCE25} # Split files in build root into rpms. See split-files.py for the # rules towards the end, anything which is an exception needs a line # here. -python3 %{SOURCE2} %buildroot "%{rhel}" < 8 +%if %{undefined rhel} || 0%{?rhel} > 8 %files ukify -f .file-list-ukify %endif %files boot-unsigned -f .file-list-boot @@ -1264,7 +1264,7 @@ fi %changelog * Tue Jul 18 2023 Daan De Meyer - 253.5-1.1 -- Use the %{rhel} macro for checks instead of explicitly checking against %{el8}. +- Use the %{?rhel} macro for checks instead of explicitly checking against %{?el8}. * Mon Jul 17 2023 Daan De Meyer - 253.5-1.1 - Add back python3-zstd on c9s now that it's been added to EPEL 9