From 36fd4f38c2e34a562c760a8807bd9b4e3ee8461d Mon Sep 17 00:00:00 2001 From: eabdullin Date: Thu, 27 Nov 2025 12:00:15 +0000 Subject: [PATCH] import OL bootc-1.8.0-3.el9_7 --- .bootc.metadata | 4 +- .gitignore | 4 +- SOURCES/0000-bootc-inistall-provision.patch | 65 +++++++++ SOURCES/0001-bootc-inistall-provision.patch | 14 ++ SPECS/bootc.spec | 146 ++++++++++++++++++-- 5 files changed, 215 insertions(+), 18 deletions(-) create mode 100644 SOURCES/0000-bootc-inistall-provision.patch create mode 100644 SOURCES/0001-bootc-inistall-provision.patch diff --git a/.bootc.metadata b/.bootc.metadata index 5d308d8..e848a85 100644 --- a/.bootc.metadata +++ b/.bootc.metadata @@ -1,2 +1,2 @@ -3bd9bccb7e945b97fd37b82e12c49652d817dd8d SOURCES/bootc-1.1.2-vendor.tar.zstd -29ff83b445d7cabd8d1b1818a7f9cb5be056f0bf SOURCES/bootc-1.1.2.tar.zstd +9ca5bceee40bd840b691c0a8024b2b6a916c36e7 SOURCES/bootc-1.8.0-vendor.tar.zstd +b97adc7d411b192030dddea89366e2d6ebc5c7c2 SOURCES/bootc-1.8.0.tar.zstd diff --git a/.gitignore b/.gitignore index 3dea5c1..a539478 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/bootc-1.1.2-vendor.tar.zstd -SOURCES/bootc-1.1.2.tar.zstd +SOURCES/bootc-1.8.0-vendor.tar.zstd +SOURCES/bootc-1.8.0.tar.zstd diff --git a/SOURCES/0000-bootc-inistall-provision.patch b/SOURCES/0000-bootc-inistall-provision.patch new file mode 100644 index 0000000..e250bdf --- /dev/null +++ b/SOURCES/0000-bootc-inistall-provision.patch @@ -0,0 +1,65 @@ +diff --git i/tmt/tests/bootc-install-provision.sh w/tmt/tests/bootc-install-provision.sh +index c4c884b..29df30c 100755 +--- i/tmt/tests/bootc-install-provision.sh ++++ w/tmt/tests/bootc-install-provision.sh +@@ -4,6 +4,8 @@ set -exuo pipefail + BOOTC_TEMPDIR=$(mktemp -d) + trap 'rm -rf -- "$BOOTC_TEMPDIR"' EXIT + ++ARCH=$(uname -m) ++ + # LBI only enabled for test-22-logically-bound-install + LBI="${LBI:-disabled}" + +@@ -16,6 +18,28 @@ case "$ID" in + "fedora") + TIER1_IMAGE_URL="${TIER1_IMAGE_URL:-quay.io/fedora/fedora-bootc:${VERSION_ID}}" + ;; ++ "rhel") ++ TIER1_IMAGE_URL="${TIER1_IMAGE_URL:-images.paas.redhat.com/bootc/rhel-bootc:latest-${VERSION_ID}}" ++ ++ CURRENT_COMPOSE_ID=$(skopeo inspect --no-tags --retry-times=5 --tls-verify=false "docker://${TIER1_IMAGE_URL}" | jq -r '.Labels."redhat.compose-id"') ++ ++ if [[ -n ${CURRENT_COMPOSE_ID} ]]; then ++ if [[ ${CURRENT_COMPOSE_ID} == *-updates-* ]]; then ++ BATCH_COMPOSE="updates/" ++ else ++ BATCH_COMPOSE="" ++ fi ++ else ++ BATCH_COMPOSE="updates/" ++ CURRENT_COMPOSE_ID=latest-RHEL-$VERSION_ID ++ fi ++ ++ # use latest compose if specific compose is not accessible ++ RC=$(curl -skIw '%{http_code}' -o /dev/null "http://download.eng.bos.redhat.com/rhel-${VERSION_ID%%.*}/nightly/${BATCH_COMPOSE}RHEL-${VERSION_ID%%.*}/${CURRENT_COMPOSE_ID}/STATUS") ++ if [[ $RC != "200" ]]; then ++ CURRENT_COMPOSE_ID=latest-RHEL-${VERSION_ID%%} ++ fi ++ ;; + esac + + if [ "$TMT_REBOOT_COUNT" -eq 0 ]; then +@@ -93,6 +117,22 @@ COMMONEOF + tee "$FEDORA_CI_CONTAINERFILE" > /dev/null << FEDORACIEOF + FROM $TIER1_IMAGE_URL + ++RUN </dev/null <"$CONTAINERFILE" <= 9 || 0%{?fedora} > 41 + %bcond_without ostree_ext +%else + %bcond_with ostree_ext +%endif + +%if 0%{?rhel} + %bcond_without rhsm +%else + %bcond_with rhsm +%endif Name: bootc -Version: 1.1.2 -Release: 1%{?dist} +Version: 1.8.0 +Release: 3%{?dist} Summary: Bootable container system # Apache-2.0 @@ -18,6 +29,11 @@ URL: https://github.com/containers/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} @@ -25,42 +41,91 @@ BuildRequires: libzstd-devel BuildRequires: make BuildRequires: ostree-devel BuildRequires: openssl-devel -BuildRequires: libzstd-devel %if 0%{?rhel} BuildRequires: rust-toolset %else BuildRequires: cargo-rpm-macros >= 25 %endif BuildRequires: systemd +# For tests +BuildRequires: skopeo ostree # Backing storage tooling https://github.com/containers/composefs/issues/125 -Recommends: composefs +Requires: composefs # For OS updates +Requires: ostree Requires: skopeo +Requires: podman # For bootloader updates Recommends: bootupd +# A made up provides so that rpm-ostree can depend on it +%if %{with ostree_ext} +Provides: ostree-cli(ostree-container) +%endif + %description %{summary} +# (-n because we don't want the subpackage name to start with bootc-) +%package -n system-reinstall-bootc +Summary: Utility to reinstall the current system using bootc +Recommends: podman +# The reinstall subpackage intentionally does not require bootc, as it pulls in many unnecessary dependencies + +%description -n system-reinstall-bootc +This package provides a utility to simplify reinstalling the current system to a given bootc image. + +%global system_reinstall_bootc_install_podman_path %{_prefix}/lib/system-reinstall-bootc/install-podman + %prep %autosetup -p1 -a1 -%if 0%{?rhel} -%cargo_prep -V 1 -%else -%cargo_prep -v vendor -%endif +# 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 %build -%cargo_build -%if !0%{?rhel} +# Build the main bootc binary +%if 0%{?fedora} || 0%{?rhel} >= 10 + %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 0%{?fedora} || 0%{?rhel} >= 10 + # 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 + %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 +mkdir -p %{buildroot}/%{dirname:%{system_reinstall_bootc_install_podman_path}} +cat >%{?buildroot}/%{system_reinstall_bootc_install_podman_path} < - 1.8.0-3 +- Bump release as rhpkg needed an update to tag for 9.7.z + Resolves: #RHEL-113361 + +* Fri Sep 05 2025 Colin Walters - 1.8.0-2 +- Update to 1.8.0 + +* Thu Aug 21 2025 Joseph Marrero - 1.7.0-1 +- Update to 1.7.0 +- Resolves: #RHEL-109555 + +* Fri Jul 22 2025 Gursewak Mangat - 1.5.1-1 +- Update to 1.5.1 +- Resolves: #RHEL-104335 + +* Fri Jul 11 2025 Gursewak Mangat - 1.4.0-1 +- Update to 1.4.0 +- Resolves: #RHEL-103125 + +* Fri May 30 2025 Joseph Marrero - 1.3.0-1 +- Update to 1.3.0 +- Resolves: #RHEL-94597 + +* Tue Apr 15 2025 John Eckersberg - 1.1.7-1 +- Update to 1.1.7 +- Resolves: #RHEL-87207 + +* Thu Mar 06 2025 Joseph Marrero - 1.1.6-3 +- Backport https://github.com/containers/bootc/pull/1167 +- Resolves: #RHEL-82293 + +* Wed Feb 19 2025 John Eckersberg - 1.1.5-2 +- Sync specfile from upstream +- Resolves: #RHEL-80264 +- Resolves: #RHEL-81981 + +* Mon Feb 10 2025 Joseph Marrero - 1.1.5-1 +- Update to 1.1.5 +- Resolves: #RHEL-77733 + +* Thu Jan 23 2025 John Eckersberg - 1.1.4-2 +- Cherry pick patches for bootc-status-updated +- Resolves: #RHEL-72862 + +* Tue Jan 14 2025 Joseph Marrero - 1.1.4-1 +- Update to 1.1.4 + Resolves: #RHEL-72862 + * Thu Nov 07 2024 Joseph Marrero - 1.1.2-1 - Update to 1.1.2 Resolves: #RHEL-66258