Skip to content

Commit

Permalink
RPM: Fix wasm conditionals and misc spec cleanups
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
lsm5 committed Aug 29, 2024
1 parent 7e36280 commit aa12a52
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions rpm/crun.spec
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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}
Expand All @@ -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 <[email protected]>
- Placeholder changelog for envs that are not autochangelog-ready.
- Contact upstream if you need to report an issue with the build.
%endif

0 comments on commit aa12a52

Please sign in to comment.