From 32d046e0ede30a230bc6afd4e364b448df10d4e4 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Thu, 9 Jun 2022 10:48:16 -0400 Subject: [PATCH] Backport https://github.com/coreos/rpm-ostree/pull/3721 Resolves: rhbz#2094085 --- ...ore-kernel-automotive-core.posttrans.patch | 40 +++++++++++++++++++ rpm-ostree.spec | 7 +++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 0001-rust-scripts-Ignore-kernel-automotive-core.posttrans.patch diff --git a/0001-rust-scripts-Ignore-kernel-automotive-core.posttrans.patch b/0001-rust-scripts-Ignore-kernel-automotive-core.posttrans.patch new file mode 100644 index 0000000..904d6d2 --- /dev/null +++ b/0001-rust-scripts-Ignore-kernel-automotive-core.posttrans.patch @@ -0,0 +1,40 @@ +From 34cdfd6e055e79a659364c5c97ee300d1672379a Mon Sep 17 00:00:00 2001 +From: Jonathan Lebon +Date: Thu, 2 Jun 2022 11:39:55 -0400 +Subject: [PATCH] rust/scripts: Ignore `kernel-automotive-core.posttrans` + +Yet another kernel package variant whose %posttrans we want to ignore. + +As mentioned in there, I think we should change the strategy so that we +detect kernel packages like we do in the core based on its `Provides` to +know to ignore %posttrans. + +Alternatively/additionally, we should work with kernel and systemd teams +so that e.g. it short-circuits if it detects an "offline" system. That +would also benefit containers, which AFAIK even today runs dracut on +kernel installs. + +Closes: #3720 +--- + rust/src/scripts.rs | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/rust/src/scripts.rs b/rust/src/scripts.rs +index 3b15c629..1f59e390 100644 +--- a/rust/src/scripts.rs ++++ b/rust/src/scripts.rs +@@ -18,9 +18,11 @@ use phf::phf_set; + static IGNORED_PKG_SCRIPTS: phf::Set<&'static str> = phf_set! { + "glibc.prein", + // We take over depmod/dracut etc. It's `kernel` in C7 and kernel-core in F25+ ++ // XXX: we should probably change this to instead ignore based on the kernel virtual Provides + "kernel.posttrans", + "kernel-core.posttrans", + "kernel-debug-core.posttrans", ++ "kernel-automotive-core.posttrans", + // Additionally ignore posttrans scripts for the Oracle Linux `kernel-uek` package + "kernel-uek.posttrans", + // Legacy workaround +-- +2.36.1 + diff --git a/rpm-ostree.spec b/rpm-ostree.spec index 967815d..0535e36 100644 --- a/rpm-ostree.spec +++ b/rpm-ostree.spec @@ -4,12 +4,13 @@ Summary: Hybrid image/package system Name: rpm-ostree Version: 2022.8 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ URL: https://github.com/coreos/rpm-ostree # This tarball is generated via "cd packaging && make -f Makefile.dist-packaging dist-snapshot" # 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-rust-scripts-Ignore-kernel-automotive-core.posttrans.patch ExclusiveArch: %{rust_arches} @@ -236,6 +237,10 @@ $PYTHON autofiles.py > files.devel \ %files devel -f files.devel %changelog +* Thu Jun 09 2022 Jonathan Lebon - 2022.8-3 +- Backport https://github.com/coreos/rpm-ostree/pull/3721 + Resolves: rhbz#2094085 + * Thu Apr 21 2022 Colin Walters - 2022.8-2 - https://github.com/coreos/rpm-ostree/releases/tag/v2022.8 Resolves: rhbz#2077062