From 4ee6493f72b83f674c0b647f456c59c21f263758 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 16 Feb 2016 16:29:38 -0600 Subject: [PATCH] Revert "kernel-install-grubby.patch: only copy files to /boot on "add"" The fix is worse than the bug it tries to fix This reverts commit 908de082ce0cd3c328cf17f682db743701ef6cea. --- kernel-install-grubby.patch | 59 ++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 31 deletions(-) diff --git a/kernel-install-grubby.patch b/kernel-install-grubby.patch index a49f07c..3069db0 100644 --- a/kernel-install-grubby.patch +++ b/kernel-install-grubby.patch @@ -1,54 +1,51 @@ -From 019766177baf70d5a4f688adb768b07f28fd90a9 Mon Sep 17 00:00:00 2001 +From 860be9427dff48efc5e486b039be932094572047 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 14 Jan 2014 17:48:08 -0500 Subject: [PATCH] kernel-install: add fedora specific callouts to new-kernel-pkg --- - src/kernel-install/kernel-install | 47 +++++++++++++++++++++++++++++++++++++++ - 1 file changed, 47 insertions(+) + src/kernel-install/kernel-install | 44 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 44 insertions(+) mode change 100644 => 100755 src/kernel-install/kernel-install diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install old mode 100644 new mode 100755 -index 3ae1d77..041f526 +index 3ae1d77..5c1e4fc --- a/src/kernel-install/kernel-install +++ b/src/kernel-install/kernel-install -@@ -71,6 +71,53 @@ fi +@@ -71,6 +71,50 @@ fi KERNEL_VERSION="$1" KERNEL_IMAGE="$2" +if [[ -x /sbin/new-kernel-pkg ]]; then + KERNEL_DIR="${KERNEL_IMAGE%/*}" ++ if [[ "${KERNEL_DIR}" != "/boot" ]]; then ++ for i in \ ++ "$KERNEL_IMAGE" \ ++ "$KERNEL_DIR"/System.map \ ++ "$KERNEL_DIR"/config \ ++ "$KERNEL_DIR"/zImage.stub \ ++ "$KERNEL_DIR"/dtb \ ++ ; do ++ [[ -e "$i" ]] || continue ++ cp -a "$i" "/boot/${i##*/}-${KERNEL_VERSION}" ++ command -v restorecon &>/dev/null && \ ++ restorecon "/boot/${i##*/}-${KERNEL_VERSION}" ++ done ++ # hmac is .vmlinuz-.hmac so needs a special treatment ++ i="$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac" ++ if [[ -e "$i" ]]; then ++ cp -a "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac" ++ command -v restorecon &>/dev/null && \ ++ restorecon "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac" ++ fi ++ fi ++ + [[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}" + case "$COMMAND" in + add) -+ if [[ "${KERNEL_DIR}" != "/boot" ]]; then -+ for i in \ -+ "$KERNEL_IMAGE" \ -+ "$KERNEL_DIR"/System.map \ -+ "$KERNEL_DIR"/config \ -+ "$KERNEL_DIR"/zImage.stub \ -+ "$KERNEL_DIR"/dtb \ -+ ; do -+ [[ -e "$i" ]] || continue -+ if [ -d "$i" ]; then -+ cp -a "$i" -t "/boot/${i##*/}-${KERNEL_VERSION}" -+ else -+ cp -a "$i" "/boot/${i##*/}-${KERNEL_VERSION}" -+ fi -+ command -v restorecon &>/dev/null && \ -+ restorecon -R "/boot/${i##*/}-${KERNEL_VERSION}" -+ done -+ # hmac is .vmlinuz-.hmac so needs a special treatment -+ i="$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac" -+ if [[ -e "$i" ]]; then -+ cp -a "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac" -+ command -v restorecon &>/dev/null && \ -+ restorecon "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac" -+ fi -+ fi + /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $? + /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" || exit $? + /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $? @@ -70,5 +67,5 @@ index 3ae1d77..041f526 read MACHINE_ID < /etc/machine-id fi -- -2.7.0 +2.6.0