diff --git a/.gitignore b/.gitignore index 40acb27..c0e07ff 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,5 @@ /bootc-1.8.0.tar.zstd /bootc-1.10.0.tar.zstd /bootc-1.10.0-vendor.tar.zstd +/bootc-1.11.0.tar.zstd +/bootc-1.11.0-vendor.tar.zstd diff --git a/bootc.spec b/bootc.spec index 6929927..3b6997d 100644 --- a/bootc.spec +++ b/bootc.spec @@ -1,4 +1,5 @@ %bcond_without check +%bcond_with tests %if 0%{?rhel} >= 9 || 0%{?fedora} > 41 %bcond_without ostree_ext %else @@ -21,7 +22,7 @@ %endif Name: bootc -Version: 1.10.0 +Version: 1.11.0 Release: 1%{?dist} Summary: Bootable container system @@ -38,11 +39,6 @@ URL: https://github.com/bootc-dev/bootc Source0: %{url}/releases/download/v%{version}/bootc-%{version}.tar.zstd Source1: %{url}/releases/download/v%{version}/bootc-%{version}-vendor.tar.zstd -# Don't remove, downstream patch only -# Patch for integration test RHEL 9.x and 10.x support -#Patch0: 0000-bootc-inistall-provision.patch -#Patch1: 0001-bootc-inistall-provision.patch - # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -89,52 +85,73 @@ Recommends: podman %description -n system-reinstall-bootc This package provides a utility to simplify reinstalling the current system to a given bootc image. +%if %{with tests} +%package tests +Summary: Integration tests for bootc +Requires: %{name} = %{version}-%{release} + +%description tests +This package contains the integration test suite for bootc. +%endif + %global system_reinstall_bootc_install_podman_path %{_prefix}/lib/system-reinstall-bootc/install-podman +%if 0%{?container_build} +# Source is already at /src, no subdirectory +%global _buildsubdir . +%endif + %prep +%if ! 0%{?container_build} %autosetup -p1 -a1 # Default -v vendor config doesn't support non-crates.io deps (i.e. git) cp .cargo/vendor-config.toml . %cargo_prep -N cat vendor-config.toml >> .cargo/config.toml rm vendor-config.toml +%else +# Container build: source already at _builddir (/src), nothing to extract +# RPM's %mkbuilddir creates a subdirectory; symlink it back to the source +cd .. +rm -rf %{name}-%{version}-build +ln -s . %{name}-%{version}-build +cd %{name}-%{version}-build +%endif %build -# Build the main bootc binary -%if %new_cargo_macros - %cargo_build %{?with_rhsm:-f rhsm} -%else - %cargo_build %{?with_rhsm:--features rhsm} -%endif - -# 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 %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 - %cargo_build -- %cargo_args -%else - # Older macros from rust-toolset do *not* do flag processing, so - # '--' would be passed through to cargo directly, which is not - # what we want. - %cargo_build %cargo_args -%endif - +# Build this first to avoid feature skew make manpages +# Build all binaries +%if 0%{?container_build} +# Container build: use cargo directly with cached dependencies to avoid RPM macro overhead +cargo build -j%{_smp_build_ncpus} --release %{?with_rhsm:--features rhsm} --bins +%else +# Non-container build: use RPM macros for proper dependency tracking +%if %new_cargo_macros + %cargo_build %{?with_rhsm:-f rhsm} -- --bins +%else + %cargo_build %{?with_rhsm:--features rhsm} -- --bins +%endif +%endif + +%if ! 0%{?container_build} %cargo_vendor_manifest # https://pagure.io/fedora-rust/rust-packaging/issue/33 sed -i -e '/https:\/\//d' cargo-vendor.txt %cargo_license_summary %{cargo_license} > LICENSE.dependencies +%endif %install %make_install INSTALL="install -p -c" %if %{with ostree_ext} make install-ostree-hooks DESTDIR=%{?buildroot} %endif +%if %{with tests} +install -D -m 0755 target/release/tests-integration %{buildroot}%{_bindir}/bootc-integration-tests +%endif mkdir -p %{buildroot}/%{dirname:%{system_reinstall_bootc_install_podman_path}} cat >%{?buildroot}/%{system_reinstall_bootc_install_podman_path} < - 1.10.0-1 - Update to 1.10.0 diff --git a/sources b/sources index ab97ea1..d52f683 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (bootc-1.10.0.tar.zstd) = bf091786d6dd68ceb4741533a95261b3035c65d0d536d3fa5e6eee2b7ebda0b25efbf6aedf651b2cade8bdd93d39490bb2f3fab2f380a9422458e23e9b918051 -SHA512 (bootc-1.10.0-vendor.tar.zstd) = 7e291d34ef83b69d801828b99a9645d98f750c90c563774f601fd4bf84c9236e2f0964dfae2d4c46243f9b1d891d21cd8a8b5418e26a8282a1ca553bb5575aa3 +SHA512 (bootc-1.11.0.tar.zstd) = f3bc4ca8d99abe5154fbccf84694bd5aebdb819d90a83ad119aee7ae4469b2e4f5313e6ce65831c007d88ddabe144bc9757793d16963a9d52ff66912057049f0 +SHA512 (bootc-1.11.0-vendor.tar.zstd) = 2198d4cf9e9e44e30f1f3e998e8d640afa5fa7d2b0904a6d1ea972ff637e2a55e37fbf2b2e18454736208cec6541b98c0bd685bc8fd959346aa2be1b4aaa1729