lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1604071459520.27368@cbobk.fhfr.pm>
Date:	Thu, 7 Apr 2016 15:00:54 +0200 (CEST)
From:	Jiri Kosina <jikos@...nel.org>
To:	Michal Marek <mmarek@...e.com>
cc:	linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] kbuild/mkspec: support 'update-bootloader'-based systems

From: Jiri Kosina <jkosina@...e.cz>

When uninstalling kernel RPM, we're unconditionally calling 
"new-kernel-pkg --remove". This is useless on systems which are based on 
'update-bootloader' script instead.

Support update-bootloader removal method as well in case the script is 
present; contrary to new-kernel-pkg, this needs to be done in %postun, 
otherwise update-bootloader will refuse to remove entry for kernel for 
which the binary still exists.

Signed-off-by: Jiri Kosina <jkosina@...e.cz>
---
 scripts/package/mkspec | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index b6de63c..857c37d 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -143,6 +143,11 @@ echo "if [ -x /sbin/new-kernel-pkg ]; then"
 echo "new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img"
 echo "fi"
 echo ""
+echo "%postun"
+echo "if [ -x /sbin/update-bootloader ]; then"
+echo "/sbin/update-bootloader --remove $KERNELRELEASE"
+echo "fi"
+echo ""
 echo "%files"
 echo '%defattr (-, root, root)'
 echo "/lib/modules/$KERNELRELEASE"

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ