From 40860bd5d037b8b9751db737ab2e60b11ad7eec3 Mon Sep 17 00:00:00 2001 From: Piraty Date: Fri, 7 Aug 2020 20:23:17 +0200 Subject: [PATCH] Revert "dracut: improve consistency of relative paths in kernel hooks" This reverts commit f34677f4a671c90a61c5835fca67d853562bf300. Fixes #24128 --- srcpkgs/dracut/files/kernel-hook-postinst | 4 ++-- srcpkgs/dracut/files/kernel-hook-postrm | 4 +++- srcpkgs/dracut/files/kernel-uefi-hook-postinst | 5 ++--- srcpkgs/dracut/files/kernel-uefi-hook-postrm | 4 +++- srcpkgs/dracut/template | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/srcpkgs/dracut/files/kernel-hook-postinst b/srcpkgs/dracut/files/kernel-hook-postinst index 537af549796..a9d265b6ed6 100644 --- a/srcpkgs/dracut/files/kernel-hook-postinst +++ b/srcpkgs/dracut/files/kernel-hook-postinst @@ -7,9 +7,9 @@ PKGNAME="$1" VERSION="$2" -if [ ! -x usr/bin/dracut ]; then +if [ ! -x bin/dracut ]; then exit 0 fi -usr/bin/dracut -q --force --sysroot . boot/initramfs-${VERSION}.img ${VERSION} +dracut -q --force boot/initramfs-${VERSION}.img ${VERSION} exit $? diff --git a/srcpkgs/dracut/files/kernel-hook-postrm b/srcpkgs/dracut/files/kernel-hook-postrm index c338cf617a7..f99458a4bfa 100644 --- a/srcpkgs/dracut/files/kernel-hook-postrm +++ b/srcpkgs/dracut/files/kernel-hook-postrm @@ -7,5 +7,7 @@ PKGNAME="$1" VERSION="$2" -rm -f boot/initramfs-${VERSION}.img +if [ -f boot/initramfs-${VERSION}.img ]; then + rm -f boot/initramfs-${VERSION}.img +fi exit $? diff --git a/srcpkgs/dracut/files/kernel-uefi-hook-postinst b/srcpkgs/dracut/files/kernel-uefi-hook-postinst index f1098a48a81..d623c3f86df 100644 --- a/srcpkgs/dracut/files/kernel-uefi-hook-postinst +++ b/srcpkgs/dracut/files/kernel-uefi-hook-postinst @@ -12,13 +12,12 @@ if [ -z "${CREATE_UEFI_BUNDLES}" ]; then exit 0 fi -if [ ! -x usr/bin/dracut ]; then +if [ ! -x bin/dracut ]; then exit 0 fi mkdir -p ${UEFI_BUNDLE_DIR:=boot/efi/EFI/void} -usr/bin/dracut -q --force --sysroot . ${DRACUT_OPTIONS} \ - ${KERNEL_CMDLINE:+--kernel-cmdline="${KERNEL_CMDLINE}"} \ +dracut -q --force ${KERNEL_CMDLINE:+--kernel-cmdline="${KERNEL_CMDLINE}"} ${DRACUT_OPTIONS} \ --uefi ${UEFI_BUNDLE_DIR}/linux-${VERSION}.efi ${VERSION} exit $? diff --git a/srcpkgs/dracut/files/kernel-uefi-hook-postrm b/srcpkgs/dracut/files/kernel-uefi-hook-postrm index 120efb1bd6e..8183bb26f08 100644 --- a/srcpkgs/dracut/files/kernel-uefi-hook-postrm +++ b/srcpkgs/dracut/files/kernel-uefi-hook-postrm @@ -11,5 +11,7 @@ VERSION="$2" : "${UEFI_BUNDLE_DIR:=boot/efi/EFI/void}" -rm -f "${UEFI_BUNDLE_DIR}/linux-${VERSION}.efi" +if [ -f "${UEFI_BUNDLE_DIR}/linux-${VERSION}.efi" ]; then + rm -fv "${UEFI_BUNDLE_DIR}/linux-${VERSION}.efi" +fi exit $? diff --git a/srcpkgs/dracut/template b/srcpkgs/dracut/template index 232f70a0d4a..d08876b935f 100644 --- a/srcpkgs/dracut/template +++ b/srcpkgs/dracut/template @@ -1,7 +1,7 @@ # Template file for 'dracut' pkgname=dracut version=050 -revision=6 +revision=7 build_style=configure configure_args="--prefix=/usr --sysconfdir=/etc" conf_files="/etc/dracut.conf"