linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rpm-pkg: simplify installkernel %post
@ 2023-11-03 23:33 Davide Cavalca via B4 Relay
  2023-11-08  0:07 ` Nathan Chancellor
  0 siblings, 1 reply; 27+ messages in thread
From: Davide Cavalca via B4 Relay @ 2023-11-03 23:33 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Nick Desaulniers, Nicolas Schier
  Cc: linux-kbuild, linux-kernel, Davide Cavalca

From: Davide Cavalca <dcavalca@meta.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@meta.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@meta.com>


^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2024-01-31  1:49 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-03 23:33 [PATCH] rpm-pkg: simplify installkernel %post Davide Cavalca via B4 Relay
2023-11-08  0:07 ` Nathan Chancellor
2023-12-12 17:10   ` [PATCH v2] " Jose Ignacio Tornos Martinez
2023-12-12 19:19     ` Nathan Chancellor
2023-12-18 18:26     ` Masahiro Yamada
2023-12-19  8:43       ` Jose Ignacio Tornos Martinez
2023-12-19 15:56       ` [PATCH v3] " Jose Ignacio Tornos Martinez
2023-12-19 16:49         ` Masahiro Yamada
2023-12-19 20:17           ` [PATCH v4] " Jose Ignacio Tornos Martinez
2023-12-20 17:18             ` Nathan Chancellor
2023-12-26  4:02             ` Masahiro Yamada
2024-01-07 15:25               ` Jose Ignacio Tornos Martinez
2024-01-14  8:06               ` [PATCH V5 1/2] " Jose Ignacio Tornos Martinez
2024-01-17  1:29                 ` Masahiro Yamada
2024-01-18 14:12                   ` Jose Ignacio Tornos Martinez
2024-01-21 17:32                     ` Masahiro Yamada
2024-01-22 18:22                       ` Jose Ignacio Tornos Martinez
2024-01-22 18:22                       ` [PATCH] " Jose Ignacio Tornos Martinez
2024-01-28  7:32                         ` Masahiro Yamada
2024-01-29  9:27                           ` Jose Ignacio Tornos Martinez
2024-01-29  9:28                           ` [PATCH v7] " Jose Ignacio Tornos Martinez
2024-01-31  1:48                             ` Masahiro Yamada
2024-01-14  8:07               ` [PATCH V5 2/2] rpm-pkg: avoid install/remove the running kernel Jose Ignacio Tornos Martinez
2024-01-17  1:32                 ` Masahiro Yamada
2024-01-18 14:12                   ` Jose Ignacio Tornos Martinez
2024-01-21 17:33                     ` Masahiro Yamada
2024-01-22 15:53                       ` Jose Ignacio Tornos Martinez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).