From 8fd7877f42414e425edd55ad01b50ea96e2a7e94 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Tue, 5 Dec 2023 15:14:49 +0100 Subject: [PATCH] Fix the conditionals for 'if RHEL <= 9' '%if 0%{?rhel} <= 9' is the wrong way to express 'if RHEL <= 9'. On Fedora, %rhel won't be defined. So, %{?rhel} will expand to nothing, and leave only a 0 on the left hand side, making the condition TRUE on Fedora. Note, that conditions like '%if 0%{?rhel}', and other relational operators like ==, > and >= work as expected. The problem is only with < and <=. Fallout from 1d18729e66267b6a267b362af06d0a130cdb967f and d437e836048bc5eecc1fc1b111cfe74d70c5c67e --- toolbox.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/toolbox.spec b/toolbox.spec index da85168..40769bf 100644 --- a/toolbox.spec +++ b/toolbox.spec @@ -5,13 +5,19 @@ Version: 0.0.99.4 %global goipath github.com/containers/%{name} +%if 0%{?fedora} +%gometa -f +%endif + +%if 0%{?rhel} %if 0%{?rhel} <= 9 %gometa %else %gometa -f %endif +%endif -Release: 7%{?dist} +Release: 8%{?dist} Summary: Tool for containerized command line environments on Linux License: ASL 2.0 @@ -224,9 +230,11 @@ export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_ %install %meson_install +%if 0%{?rhel} %if 0%{?rhel} <= 9 install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/containers/%{name}.conf %endif +%endif %files @@ -256,6 +264,9 @@ install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/containers/%{name}.conf %changelog +* Tue Dec 05 2023 Debarshi Ray - 0.0.99.4-8 +- Fix the conditionals for 'if RHEL <= 9' + * Thu Nov 30 2023 Debarshi Ray - 0.0.99.4-7 - Track the active container on Fedora Linux Asahi Remix