Skip to content

Commit 5e3159d

Browse files
committed
specfile: Handle updated macros in c9s rust-toolset
Closes: #1640 Signed-off-by: John Eckersberg <[email protected]>
1 parent b010983 commit 5e3159d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

contrib/packaging/bootc.spec

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
%bcond_with rhsm
1212
%endif
1313

14+
%global rust_minor %(rustc --version | cut -f2 -d" " | cut -f2 -d".")
15+
16+
%if 0%{?fedora} || 0%{?rhel} >= 10 || 0%{?rust_minor} >= 89
17+
%global new_cargo_macros 1
18+
%else
19+
%global new_cargo_macros 0
20+
%endif
21+
1422
Name: bootc
1523
Version: 1.1.5
1624
Release: 1%{?dist}
@@ -87,7 +95,7 @@ rm vendor-config.toml
8795

8896
%build
8997
# Build the main bootc binary
90-
%if 0%{?fedora} || 0%{?rhel} >= 10
98+
%if %new_cargo_macros
9199
%cargo_build %{?with_rhsm:-f rhsm}
92100
%else
93101
%cargo_build %{?with_rhsm:--features rhsm}
@@ -96,7 +104,7 @@ rm vendor-config.toml
96104
# Build the system reinstallation CLI binary
97105
%global cargo_args -p system-reinstall-bootc
98106
export SYSTEM_REINSTALL_BOOTC_INSTALL_PODMAN_PATH=%{system_reinstall_bootc_install_podman_path}
99-
%if 0%{?fedora} || 0%{?rhel} >= 10
107+
%if %new_cargo_macros
100108
# In cargo-rpm-macros, the cargo_build macro does flag processing,
101109
# so we need to pass '--' to signify that cargo_args is not part
102110
# of the macro args

0 commit comments

Comments
 (0)