Skip to contentSkip to conversation

Patch "kbuild/mkspec: fix grub2 installkernel issue" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Apr 10, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

kbuild/mkspec: fix grub2 installkernel issue

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
kbuild-mkspec-fix-grub2-installkernel-issue.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From c8b08ca558c0067bc9e15ce3f1e70af260410bb2 Mon Sep 17 00:00:00 2001

From: Jiri Kosina <[email protected]>
Date: Fri, 26 Feb 2016 16:15:17 +0100
Subject: kbuild/mkspec: fix grub2 installkernel issue

From: Jiri Kosina <[email protected]>

commit c8b08ca558c0067bc9e15ce3f1e70af260410bb2 upstream.

mkspec is copying built kernel to temporrary location

/boot/vmlinuz-$KERNELRELEASE-rpm

and runs installkernel on it. This however directly leads to grub2 menuentry for this suffixed binary being generated as well during the run of installkernel script.

Later in the process the temporary -rpm suffixed files are removed, and therefore we end up with spurious (and non-functional) grub2 menu entries for each installed kernel RPM.

Fix that by using a different temporary name (prefixed by '.'), so that the binary is not recognized as an actual kernel binary and no menuentry is created for it.

Fixes 3c9c7a14b627 ("rpm-pkg: add %post section to create initramfs and grub hooks")
---
 scripts/package/mkspec |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
scripts/package/mkspec +4 -4
@@ -131,11 +131,11 @@ echo 'rm -rf $RPM_BUILD_ROOT'
 echo ""
 echo "%post"
 echo "if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then"
-echo "cp /boot/vmlinuz-$KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm"
-echo "cp /boot/System.map-$KERNELRELEASE /boot/System.map-$KERNELRELEASE-rpm"
+echo "cp /boot/vmlinuz-$KERNELRELEASE /boot/.vmlinuz-$KERNELRELEASE-rpm"
+echo "cp /boot/System.map-$KERNELRELEASE /boot/.System.map-$KERNELRELEASE-rpm"
 echo "rm -f /boot/vmlinuz-$KERNELRELEASE /boot/System.map-$KERNELRELEASE"
-echo "/sbin/installkernel $KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm"
-echo "rm -f /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm"
+echo "/sbin/installkernel $KERNELRELEASE /boot/.vmlinuz-$KERNELRELEASE-rpm /boot/.System.map-$KERNELRELEASE-rpm"
+echo "rm -f /boot/.vmlinuz-$KERNELRELEASE-rpm /boot/.System.map-$KERNELRELEASE-rpm"
 echo "fi"
 echo ""
 echo "%files"

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/hid-multitouch-force-retrieving-of-win8-signature-blob.patch queue-4.4/scripts-gdb-account-for-changes-in-module-data-structure.patch queue-4.4/hid-fix-hid_ignore_special_drivers-module-parameter.patch queue-4.4/kbuild-mkspec-fix-grub2-installkernel-issue.patch queue-4.4/hid-logitech-fix-dual-action-gamepad-support.patch queue-4.4/hid-i2c-hid-fix-oob-write-in-i2c_hid_set_or_send_report.patch