[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231103-rpmpost-v1-1-9c18afab47f4@meta.com>
Date: Fri, 03 Nov 2023 23:33:42 +0000
From: Davide Cavalca via B4 Relay <devnull+dcavalca.meta.com@...nel.org>
To: Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Nicolas Schier <nicolas@...sle.eu>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
Davide Cavalca <dcavalca@...a.com>
Subject: [PATCH] rpm-pkg: simplify installkernel %post
From: Davide Cavalca <dcavalca@...a.com>
The %post currently does a shuffling dance before calling installkernel.
This isn't actually necessary afaict, and the current implementation
ends up triggering downstream issues such as
https://github.com/systemd/systemd/issues/29568
This commit simplifies the logic to remove the shuffling. For reference,
the original logic was added in commit 3c9c7a14b627("rpm-pkg: add %post
section to create initramfs and grub hooks").
Signed-off-by: Davide Cavalca <dcavalca@...a.com>
---
scripts/package/kernel.spec | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index 3eee0143e0c5..cc4292c03ea2 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -77,11 +77,7 @@ rm -rf %{buildroot}
%post
if [ -x /sbin/installkernel -a -r /boot/vmlinuz-%{KERNELRELEASE} -a -r /boot/System.map-%{KERNELRELEASE} ]; then
-cp /boot/vmlinuz-%{KERNELRELEASE} /boot/.vmlinuz-%{KERNELRELEASE}-rpm
-cp /boot/System.map-%{KERNELRELEASE} /boot/.System.map-%{KERNELRELEASE}-rpm
-rm -f /boot/vmlinuz-%{KERNELRELEASE} /boot/System.map-%{KERNELRELEASE}
-/sbin/installkernel %{KERNELRELEASE} /boot/.vmlinuz-%{KERNELRELEASE}-rpm /boot/.System.map-%{KERNELRELEASE}-rpm
-rm -f /boot/.vmlinuz-%{KERNELRELEASE}-rpm /boot/.System.map-%{KERNELRELEASE}-rpm
+/sbin/installkernel %{KERNELRELEASE} /boot/vmlinuz-%{KERNELRELEASE} /boot/System.map-%{KERNELRELEASE}
fi
%preun
---
base-commit: e392ea4d4d00880bf94550151b1ace4f88a4b17a
change-id: 20231103-rpmpost-f5c99552919f
Best regards,
--
Davide Cavalca <dcavalca@...a.com>
Powered by blists - more mailing lists