Skip to content

Commit 1518855

Browse files
authored
Merge pull request #1124 from jeckersb/fix-cargo-args
specfile: fix system-reinstall-bootc cargo build invocation
2 parents 6f016b7 + 19604b4 commit 1518855

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

contrib/packaging/bootc.spec

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,17 @@ rm vendor-config.toml
9292
# Build the system reinstallation CLI binary
9393
%global cargo_args -p system-reinstall-bootc
9494
export SYSTEM_REINSTALL_BOOTC_INSTALL_PODMAN_PATH=%{system_reinstall_bootc_install_podman_path}
95-
%cargo_build
95+
%if 0%{?fedora} || 0%{?rhel} >= 10
96+
# In cargo-rpm-macros, the cargo_build macro does flag processing,
97+
# so we need to pass '--' to signify that cargo_args is not part
98+
# of the macro args
99+
%cargo_build -- %cargo_args
100+
%else
101+
# Older macros from rust-toolset do *not* do flag processing, so
102+
# '--' would be passed through to cargo directly, which is not
103+
# what we want.
104+
%cargo_build %cargo_args
105+
%endif
96106

97107
%cargo_vendor_manifest
98108
# https://pagure.io/fedora-rust/rust-packaging/issue/33

0 commit comments

Comments
 (0)