Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions contrib/packaging/bootc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
%bcond_with rhsm
%endif

%global rust_minor %(rustc --version | cut -f2 -d" " | cut -f2 -d".")

# https://github.com/bootc-dev/bootc/issues/1640
%if 0%{?fedora} || 0%{?rhel} >= 10 || 0%{?rust_minor} >= 89
%global new_cargo_macros 1
%else
%global new_cargo_macros 0
%endif

Name: bootc
Version: 1.1.5
Release: 1%{?dist}
Expand Down Expand Up @@ -87,7 +96,7 @@ rm vendor-config.toml

%build
# Build the main bootc binary
%if 0%{?fedora} || 0%{?rhel} >= 10
%if %new_cargo_macros
%cargo_build %{?with_rhsm:-f rhsm}
%else
%cargo_build %{?with_rhsm:--features rhsm}
Expand All @@ -96,7 +105,7 @@ rm vendor-config.toml
# Build the system reinstallation CLI binary
%global cargo_args -p system-reinstall-bootc
export SYSTEM_REINSTALL_BOOTC_INSTALL_PODMAN_PATH=%{system_reinstall_bootc_install_podman_path}
%if 0%{?fedora} || 0%{?rhel} >= 10
%if %new_cargo_macros
# In cargo-rpm-macros, the cargo_build macro does flag processing,
# so we need to pass '--' to signify that cargo_args is not part
# of the macro args
Expand Down