From 9b3a34a754a12cfa73921bf2a4f8aea32cdb5fba Mon Sep 17 00:00:00 2001 From: Mateusz Sylwestrzak <401237-mattz7@users.noreply.gitlab.com> Date: Sat, 24 Feb 2024 01:53:23 +0100 Subject: [PATCH 1/2] refind: account for btrfs setups when generating manual stanzas --- srcpkgs/refind/files/kernel.post-install | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/srcpkgs/refind/files/kernel.post-install b/srcpkgs/refind/files/kernel.post-install index fd18f9c45ffe0..3b416721222f3 100755 --- a/srcpkgs/refind/files/kernel.post-install +++ b/srcpkgs/refind/files/kernel.post-install @@ -22,12 +22,27 @@ tmpfile=$(mktemp /tmp/refind.XXXXXXX) zversion=$(echo "$VERSION" | sed 's/[.]/[.]/g') +# establish ESP mounting point +efipath=$(echo $REFIND_CONF | sed 's/\/EFI.*$//') +if [ $efipath = "/boot" ]; then # mounting ESP to /boot with vmlinuz- and intramfs- stored on the EFI partition + efiprefix="" +else + efiprefix="\/$(dirname $efipath)" # mounting ESP to /boot/efi or another path +fi +rootfslabel=$(blkid -s LABEL -o value $(df -P / | awk 'NR==2 {print $1}')) + +# account for the BTRFS setups including subvolumes +if df -T / | awk 'NR==2 && $2 == "btrfs" {print "Root filesystem is Btrfs"}'; then + rootfssubvol=$(btrfs subvolume show / | head -n1) + echo "Btrfs subvol for ROOT is: $rootfssubvol" +fi + zentry=$(cat < Date: Sun, 25 Feb 2024 15:58:55 +0100 Subject: [PATCH 2/2] refind: remove btrfs-progs from depends --- srcpkgs/refind/template | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/srcpkgs/refind/template b/srcpkgs/refind/template index 94eda5ffc1954..5e28116894571 100644 --- a/srcpkgs/refind/template +++ b/srcpkgs/refind/template @@ -73,10 +73,7 @@ do_install() { vinstall gptsync/gptsync_${_EFI_ARCH}.efi 644 \ usr/share/refind/tools_${_EFI_ARCH}/ - vinstall "${FILESDIR}/refind-kernel-hook.conf" 644 etc/default - vinstall ${FILESDIR}/kernel.post-install 744 \ - etc/kernel.d/post-install 50-refind - vinstall ${FILESDIR}/kernel.post-remove 744 \ - etc/kernel.d/post-remove 50-refind + vinstall "${FILESDIR}/kernel.post-install" 744 etc/kernel.d/post-install 50-refind + vinstall "${FILESDIR}/kernel.post-remove" 744 etc/kernel.d/post-remove 50-refind }