Rebase to bootc 1.1.5
Resolves: #RHEL-77733
This commit is contained in:
parent
e9a436eeb3
commit
7191e21c17
2
.gitignore
vendored
2
.gitignore
vendored
@ -30,3 +30,5 @@
|
|||||||
/bootc-1.1.2-vendor.tar.zstd
|
/bootc-1.1.2-vendor.tar.zstd
|
||||||
/bootc-1.1.4.tar.zstd
|
/bootc-1.1.4.tar.zstd
|
||||||
/bootc-1.1.4-vendor.tar.zstd
|
/bootc-1.1.4-vendor.tar.zstd
|
||||||
|
/bootc-1.1.5.tar.zstd
|
||||||
|
/bootc-1.1.5-vendor.tar.zstd
|
||||||
|
@ -1,77 +0,0 @@
|
|||||||
From 739904481e5fb33c5ce64597d55ed92346574f0b Mon Sep 17 00:00:00 2001
|
|
||||||
From: John Eckersberg <jeckersb@redhat.com>
|
|
||||||
Date: Wed, 22 Jan 2025 14:17:57 -0500
|
|
||||||
Subject: [PATCH] Add bootc-status-updated-onboot.target
|
|
||||||
|
|
||||||
The bootc-status-updated.target unit cannot directly be
|
|
||||||
WantedBy=multi-user.target, because we rely on StopWhenUnneeded=true
|
|
||||||
so the target will be activated each time bootc-status-updated.path
|
|
||||||
triggers it. Because multi-user.target remains active, this would
|
|
||||||
hold bootc-status-updated.target in an active state as well, and the
|
|
||||||
path unit activating would not have the desired effect of retriggering
|
|
||||||
the target unit.
|
|
||||||
|
|
||||||
The new bootc-status-updated-onboot.target is intended to serve the
|
|
||||||
same purpose as bootc-status-updated.target but will activate (and
|
|
||||||
remain active) on boot. Any interested units should be WantedBy both
|
|
||||||
targets. This updates bootc-publish-rhsm-facts.service to do just
|
|
||||||
that.
|
|
||||||
|
|
||||||
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
|
|
||||||
---
|
|
||||||
Makefile | 2 +-
|
|
||||||
systemd/bootc-publish-rhsm-facts.service | 1 +
|
|
||||||
systemd/bootc-status-updated-onboot.target | 7 +++++++
|
|
||||||
systemd/bootc-status-updated.target | 3 ---
|
|
||||||
4 files changed, 9 insertions(+), 4 deletions(-)
|
|
||||||
create mode 100644 systemd/bootc-status-updated-onboot.target
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index dbb1d7d7..1957b2cc 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -27,7 +27,7 @@ install:
|
|
||||||
install -D -m 0644 -t $(DESTDIR)/$(prefix)/lib/systemd/system systemd/*.service systemd/*.timer systemd/*.path systemd/*.target
|
|
||||||
install -d -m 0755 $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants
|
|
||||||
ln -s ../bootc-status-updated.path $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants/bootc-status-updated.path
|
|
||||||
- ln -s ../bootc-status-updated.target $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants/bootc-status-updated.target
|
|
||||||
+ ln -s ../bootc-status-updated-onboot.target $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants/bootc-status-updated-onboot.target
|
|
||||||
install -D -m 0644 -t $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/usr/lib/ostree/ baseimage/base/usr/lib/ostree/prepare-root.conf
|
|
||||||
install -d -m 755 $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/sysroot
|
|
||||||
cp -PfT baseimage/base/ostree $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/ostree
|
|
||||||
diff --git a/systemd/bootc-publish-rhsm-facts.service b/systemd/bootc-publish-rhsm-facts.service
|
|
||||||
index 6520ebd1..4dd8550e 100644
|
|
||||||
--- a/systemd/bootc-publish-rhsm-facts.service
|
|
||||||
+++ b/systemd/bootc-publish-rhsm-facts.service
|
|
||||||
@@ -9,3 +9,4 @@ ExecStart=/usr/bin/bootc internals publish-rhsm-facts
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=bootc-status-updated.target
|
|
||||||
+WantedBy=bootc-status-updated-onboot.target
|
|
||||||
diff --git a/systemd/bootc-status-updated-onboot.target b/systemd/bootc-status-updated-onboot.target
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..7b898fad
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/systemd/bootc-status-updated-onboot.target
|
|
||||||
@@ -0,0 +1,7 @@
|
|
||||||
+[Unit]
|
|
||||||
+Description=Target for bootc status changes on boot
|
|
||||||
+Documentation=man:bootc-status-updated.target(8)
|
|
||||||
+ConditionPathExists=/run/ostree-booted
|
|
||||||
+
|
|
||||||
+[Install]
|
|
||||||
+WantedBy=multi-user.target
|
|
||||||
diff --git a/systemd/bootc-status-updated.target b/systemd/bootc-status-updated.target
|
|
||||||
index 2c159468..afeb5568 100644
|
|
||||||
--- a/systemd/bootc-status-updated.target
|
|
||||||
+++ b/systemd/bootc-status-updated.target
|
|
||||||
@@ -3,6 +3,3 @@ Description=Target for bootc status changes
|
|
||||||
Documentation=man:bootc-status-updated.target(8)
|
|
||||||
StopWhenUnneeded=true
|
|
||||||
ConditionPathExists=/run/ostree-booted
|
|
||||||
-
|
|
||||||
-[Install]
|
|
||||||
-WantedBy=multi-user.target
|
|
||||||
--
|
|
||||||
2.48.1
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
|||||||
From edcdf9c8308653b865a9ebe276cd758da4a62f49 Mon Sep 17 00:00:00 2001
|
|
||||||
From: John Eckersberg <jeckersb@redhat.com>
|
|
||||||
Date: Fri, 17 Jan 2025 11:32:11 -0500
|
|
||||||
Subject: [PATCH] systemd: enable bootc-status-updated.target on startup
|
|
||||||
|
|
||||||
Any services that react to status changes should be idempotent, and
|
|
||||||
should run on boot. It is likely (but not guaranteed) that during
|
|
||||||
boot we are in the process of switching from a previous deployment to
|
|
||||||
a new one, and thus what was previously "staged" is now "booted" and
|
|
||||||
what was previously "booted" is now "rollback", so anything that cares
|
|
||||||
about status is going to want to handle that.
|
|
||||||
|
|
||||||
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
|
|
||||||
Signed-off-by: Colin Walters <walters@verbum.org>
|
|
||||||
---
|
|
||||||
Makefile | 1 +
|
|
||||||
systemd/bootc-status-updated.target | 4 ++++
|
|
||||||
2 files changed, 5 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index 3809c4b9..dbb1d7d7 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -27,6 +27,7 @@ install:
|
|
||||||
install -D -m 0644 -t $(DESTDIR)/$(prefix)/lib/systemd/system systemd/*.service systemd/*.timer systemd/*.path systemd/*.target
|
|
||||||
install -d -m 0755 $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants
|
|
||||||
ln -s ../bootc-status-updated.path $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants/bootc-status-updated.path
|
|
||||||
+ ln -s ../bootc-status-updated.target $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants/bootc-status-updated.target
|
|
||||||
install -D -m 0644 -t $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/usr/lib/ostree/ baseimage/base/usr/lib/ostree/prepare-root.conf
|
|
||||||
install -d -m 755 $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/sysroot
|
|
||||||
cp -PfT baseimage/base/ostree $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/ostree
|
|
||||||
diff --git a/systemd/bootc-status-updated.target b/systemd/bootc-status-updated.target
|
|
||||||
index a0c13417..2c159468 100644
|
|
||||||
--- a/systemd/bootc-status-updated.target
|
|
||||||
+++ b/systemd/bootc-status-updated.target
|
|
||||||
@@ -2,3 +2,7 @@
|
|
||||||
Description=Target for bootc status changes
|
|
||||||
Documentation=man:bootc-status-updated.target(8)
|
|
||||||
StopWhenUnneeded=true
|
|
||||||
+ConditionPathExists=/run/ostree-booted
|
|
||||||
+
|
|
||||||
+[Install]
|
|
||||||
+WantedBy=multi-user.target
|
|
||||||
--
|
|
||||||
2.47.0
|
|
||||||
|
|
39
bootc.spec
39
bootc.spec
@ -12,8 +12,8 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: bootc
|
Name: bootc
|
||||||
Version: 1.1.4
|
Version: 1.1.5
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Bootable container system
|
Summary: Bootable container system
|
||||||
|
|
||||||
# Apache-2.0
|
# Apache-2.0
|
||||||
@ -29,11 +29,6 @@ URL: https://github.com/containers/bootc
|
|||||||
Source0: %{url}/releases/download/v%{version}/bootc-%{version}.tar.zstd
|
Source0: %{url}/releases/download/v%{version}/bootc-%{version}.tar.zstd
|
||||||
Source1: %{url}/releases/download/v%{version}/bootc-%{version}-vendor.tar.zstd
|
Source1: %{url}/releases/download/v%{version}/bootc-%{version}-vendor.tar.zstd
|
||||||
|
|
||||||
# Cherry pick https://github.com/containers/bootc/pull/1041
|
|
||||||
Patch0: 0001-systemd-enable-bootc-status-updated.target-on-startu.patch
|
|
||||||
# Cherry pick https://github.com/containers/bootc/pull/1052
|
|
||||||
Patch1: 0001-Add-bootc-status-updated-onboot.target.patch
|
|
||||||
|
|
||||||
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
||||||
ExcludeArch: %{ix86}
|
ExcludeArch: %{ix86}
|
||||||
|
|
||||||
@ -67,18 +62,38 @@ Provides: ostree-cli(ostree-container)
|
|||||||
%description
|
%description
|
||||||
%{summary}
|
%{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
|
||||||
|
Requires: 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.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -a1
|
%autosetup -p1 -a1
|
||||||
%cargo_prep -v vendor
|
# 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
|
%build
|
||||||
%if 0%{?rhel} == 10
|
# Build the main bootc binary
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} >= 10
|
||||||
%cargo_build %{?with_rhsm:-f rhsm}
|
%cargo_build %{?with_rhsm:-f rhsm}
|
||||||
%else
|
%else
|
||||||
%cargo_build %{?with_rhsm:--features rhsm}
|
%cargo_build %{?with_rhsm:--features rhsm}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Build the system reinstallation CLI binary
|
||||||
|
%global cargo_args -p system-reinstall-bootc
|
||||||
|
%cargo_build
|
||||||
|
|
||||||
%cargo_vendor_manifest
|
%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_summary
|
||||||
%{cargo_license} > LICENSE.dependencies
|
%{cargo_license} > LICENSE.dependencies
|
||||||
|
|
||||||
@ -109,8 +124,14 @@ make install-ostree-hooks DESTDIR=%{?buildroot}
|
|||||||
%{_docdir}/bootc/*
|
%{_docdir}/bootc/*
|
||||||
%{_mandir}/man*/bootc*
|
%{_mandir}/man*/bootc*
|
||||||
|
|
||||||
|
%files -n system-reinstall-bootc
|
||||||
|
%{_bindir}/system-reinstall-bootc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 10 2025 Joseph Marrero <jmarrero@fedoraproject.org> - 1.1.5-1
|
||||||
|
- Update to 1.1.5
|
||||||
|
- Resolves: #RHEL-77733
|
||||||
|
|
||||||
* Thu Jan 23 2025 John Eckersberg <jeckersb@redhat.com> - 1.1.4-2
|
* Thu Jan 23 2025 John Eckersberg <jeckersb@redhat.com> - 1.1.4-2
|
||||||
- Cherry pick patches for bootc-status-updated
|
- Cherry pick patches for bootc-status-updated
|
||||||
- Resolves: #RHEL-72862
|
- Resolves: #RHEL-72862
|
||||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
|||||||
SHA512 (bootc-1.1.4.tar.zstd) = 9d349f0954eef26bfa0a4f97d48bb497b845b0ba00748dba07571d6149b6fe75bf6cfcada6851f3c3a3f7f8bc863fbac51386d3018812f5db762e1b8a5eb1035
|
SHA512 (bootc-1.1.5.tar.zstd) = 7242933c354316a545e1c9ba6b7a00067d15d36480a49cdd1e6ce87ab9e6aa0b42f0358ea52a83a7d572a4ae2659f76d1acfe5333b9769e8752800159b513e53
|
||||||
SHA512 (bootc-1.1.4-vendor.tar.zstd) = fd7a68ae2c1b9890865705afa81aed940a51d588a9c9d63439b5e639608d8f9d23294f7fa09ccfb27f43ff21c44db157865f36c5a60862736d9fcc1614c91862
|
SHA512 (bootc-1.1.5-vendor.tar.zstd) = b8cc878e1931292645d68d2603aa59a5875a21682bed2048ccee414e3407cd63cbf40aac921f33381dc5930fd14793d7f3fc35c801c28dbad3dfd05f6c80dd38
|
||||||
|
Loading…
Reference in New Issue
Block a user