From aa12a5202b43fa841a3f7e1d9a0c3a1b2f6a0aa0 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Thu, 29 Aug 2024 19:48:03 +0530 Subject: [PATCH] RPM: Fix wasm conditionals and misc spec cleanups 1. Wrongly mentioned conditionals were causing crun-wasm package creation on CentOS Stream 10 and ELN environments which don't have wasm support yet. 2. All environments that end up consuming rpm/crun.spec have rpmautospec enabled so we don't need these conditionals anymore. CentOS Stream 9 should soon get rpmautospec support as well, and the current lack of it is not really a blocker to removal of these conditionals. Signed-off-by: Lokesh Mandvekar --- rpm/crun.spec | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/rpm/crun.spec b/rpm/crun.spec index e90bc19f50..3464bbb76c 100644 --- a/rpm/crun.spec +++ b/rpm/crun.spec @@ -1,17 +1,17 @@ %global krun_opts %{nil} %global wasmedge_opts %{nil} -# krun and wasm[edge,time] support only on aarch64 and x86_64 -%ifarch aarch64 || x86_64 -%global wasm_support 1 - %if %{defined copr_username} %define copr_build 1 %endif +# krun and wasm support only on aarch64 and x86_64 +%ifarch aarch64 || x86_64 + # Disable wasmedge on rhel 10 until EPEL10 is in place, otherwise it causes # build issues on copr -%if %{defined fedora} || (%{defined %copr_build} && %{defined rhel} && 0%{?rhel} < 10) +%if %{defined fedora} || (%{defined copr_build} && %{defined rhel} && 0%{?rhel} < 10) +%global wasm_support 1 %global wasmedge_support 1 %global wasmedge_opts --with-wasmedge %endif @@ -112,10 +112,6 @@ Recommends: wasmedge %make_install prefix=%{_prefix} rm -rf %{buildroot}%{_prefix}/lib* -%if %{defined wasm_support} -ln -s %{name} %{buildroot}%{_bindir}/%{name}-wasm -%endif - %files %license COPYING %{_bindir}/%{name} @@ -135,12 +131,4 @@ ln -s %{name} %{buildroot}%{_bindir}/%{name}-wasm %endif %changelog -%if %{defined autochangelog} %autochangelog -%else -# NOTE: This changelog will be visible on CentOS 8 Stream builds -# Other envs are capable of handling autochangelog -* Tue Jun 13 2023 RH Container Bot -- Placeholder changelog for envs that are not autochangelog-ready. -- Contact upstream if you need to report an issue with the build. -%endif