Colin Walters 2022-12-12 15:54:56 -05:00
parent c65b72f7b1
commit 55a684c5c8
4 changed files with 6 additions and 46 deletions

1
.gitignore vendored
View File

@ -126,3 +126,4 @@
/rpm-ostree-2022.14.tar.xz
/rpm-ostree-2022.15.tar.xz
/rpm-ostree-2022.16.tar.xz
/rpm-ostree-2022.17.tar.xz

View File

@ -1,42 +0,0 @@
From 37ae5546dad6df1897cc3d903add5cecd09bc47f Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Thu, 24 Nov 2022 12:56:37 -0500
Subject: [PATCH] composepost: Handle existing absolute symlinks
Regression from cap-std porting around absolute symlinks *again*.
The `try_exists()` API will follow symlinks, which is not what
we want here.
This was hit in the fedora-iot builds.
---
rust/src/composepost.rs | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/rust/src/composepost.rs b/rust/src/composepost.rs
index bbe49a2e..77dfcc07 100644
--- a/rust/src/composepost.rs
+++ b/rust/src/composepost.rs
@@ -344,13 +344,18 @@ fn compose_postprocess_units(rootfs_dfd: &Dir, treefile: &mut Treefile) -> Resul
for unit in units {
let dest = multiuser_wants.join(unit);
- if rootfs_dfd.try_exists(&dest)? {
+ if rootfs_dfd
+ .symlink_metadata_optional(&dest)
+ .with_context(|| format!("Querying {unit}"))?
+ .is_some()
+ {
continue;
}
println!("Adding {} to multi-user.target.wants", unit);
let target = format!("/usr/lib/systemd/system/{unit}");
- cap_primitives::fs::symlink_contents(target, &rootfs_dfd.as_filelike_view(), dest)?;
+ cap_primitives::fs::symlink_contents(target, &rootfs_dfd.as_filelike_view(), dest)
+ .with_context(|| format!("Linking {unit}"))?;
}
Ok(())
}
--
2.38.1

View File

@ -3,7 +3,7 @@
Summary: Hybrid image/package system
Name: rpm-ostree
Version: 2022.16
Version: 2022.17
Release: 2%{?dist}
License: LGPLv2+
URL: https://github.com/coreos/rpm-ostree
@ -11,8 +11,6 @@ URL: https://github.com/coreos/rpm-ostree
# in the upstream git. It also contains vendored Rust sources.
Source0: https://github.com/coreos/rpm-ostree/releases/download/v%{version}/rpm-ostree-%{version}.tar.xz
Patch0: 0001-composepost-Handle-existing-absolute-symlinks.patch
ExclusiveArch: %{rust_arches}
BuildRequires: make
@ -249,6 +247,9 @@ $PYTHON autofiles.py > files.devel \
%files devel -f files.devel
%changelog
* Mon Dec 12 2022 Colin Walters <walters@verbum.org> - 2022.17-2
- https://github.com/coreos/rpm-ostree/releases/tag/v2022.17
* Mon Nov 28 2022 Colin Walters <walters@verbum.org> - 2022.16-2
- Cherry pick https://github.com/coreos/rpm-ostree/pull/4166

View File

@ -1 +1 @@
SHA512 (rpm-ostree-2022.16.tar.xz) = eadfcb5e0f3ce97d5e4711e8a7db76d4470f528931cfd546657b11c47496154d25daad07bce6c33daeaa7f24e0e99972b41fc90a13133ac6f9facd8e53617325
SHA512 (rpm-ostree-2022.17.tar.xz) = ef32917cd5483c0eb17e5109269d7c9bb8e6a74a2631f035543c25668a46f318d718e2744f6e2e89014137b74e5702d42533af5e9a7ae0fc425c44e2a55210d6