Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] refind: make loader and initrd entires bootable again
@ 2024-03-22 16:38 slymattz
  2024-03-22 16:55 ` ahesford
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: slymattz @ 2024-03-22 16:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]

There is a new pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages refind-rev4
https://github.com/void-linux/void-packages/pull/49458

refind: make loader and initrd entires bootable again
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**


#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**


<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: (x86_64-glibc)

#### Context
When using loader and initrd entries in refind.conf one needs to either avoid using quotation marks whatsoever or use backslashes to satisfy the EFI stub bootloader. Otherwise the manual stanzas won't boot. I tested revision 3 which had been merged yesterday and experienced this bug.

More on this issue here: https://wiki.archlinux.org/title/REFInd#For_manual_boot_stanzas

@sgn @ahesford ping

A patch file from https://github.com/void-linux/void-packages/pull/49458.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-refind-rev4-49458.patch --]
[-- Type: text/x-diff, Size: 2362 bytes --]

From 37e521536559c5bd5bd53b19f94b89112a657c1b Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Fri, 22 Mar 2024 16:57:23 +0100
Subject: [PATCH] refind: make loader and initrd entires bootable again

---
 srcpkgs/refind/files/kernel.post-install     | 4 ++--
 srcpkgs/refind/files/refind-kernel-hook.conf | 3 ++-
 srcpkgs/refind/template                      | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/refind/files/kernel.post-install b/srcpkgs/refind/files/kernel.post-install
index 92dc0b6fba7f85..a40c4cd713d334 100755
--- a/srcpkgs/refind/files/kernel.post-install
+++ b/srcpkgs/refind/files/kernel.post-install
@@ -28,8 +28,8 @@ zversion=$(echo "$VERSION" | sed 's/[.]/[.]/g')
 zentry=$(cat <<EOF
 menuentry "Void Linux $VERSION" {
         volume   "$REFIND_LABEL"
-        loader   "$REFIND_BOOT_PREFIX/vmlinuz-$VERSION"
-        initrd   "$REFIND_BOOT_PREFIX/initramfs-$VERSION.img"
+        loader   "$REFIND_BOOT_PREFIX\\\\vmlinuz-$VERSION"
+        initrd   "$REFIND_BOOT_PREFIX\\\\initramfs-$VERSION.img"
         options  "$OPTIONS"
 }
 EOF
diff --git a/srcpkgs/refind/files/refind-kernel-hook.conf b/srcpkgs/refind/files/refind-kernel-hook.conf
index bf4c8d2ac4655e..d0e7d92b0bfb44 100644
--- a/srcpkgs/refind/files/refind-kernel-hook.conf
+++ b/srcpkgs/refind/files/refind-kernel-hook.conf
@@ -16,12 +16,13 @@ UPDATE_REFIND_CONF=0
 # 	likewise, EFI mounted to /boot/efi
 # /efi/EFI/refind/refind.conf
 # /efi/EFI/BOOT/refind.conf
-REFIND_CONF=/boot/EFI/refind/refind.conf
+REFIND_CONF="/boot/EFI/refind/refind.conf"
 
 # Set a custom label for Void boot entries
 #REFIND_LABEL="Void Linux"
 
 # Prefix for kernel and initramfs paths in Void boot entries
+# Use escaped backslashes within the quotation marks below to satisfy EFI stub loader requirements (e.g. \\\\boot). Yes, you need to escape a single backslash with three preceding backslashes.
 #REFIND_BOOT_PREFIX=""
 
 # Additional kernel cmdline parameters
diff --git a/srcpkgs/refind/template b/srcpkgs/refind/template
index 54725bff299a9e..8f5c7ee76e04be 100644
--- a/srcpkgs/refind/template
+++ b/srcpkgs/refind/template
@@ -1,7 +1,7 @@
 # Template file for 'refind'
 pkgname=refind
 version=0.14.0.2
-revision=3
+revision=4
 archs="x86_64* i686* aarch64*"
 makedepends="gnu-efi-libs"
 depends="bash dosfstools efibootmgr"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: refind: make loader and initrd entires bootable again
  2024-03-22 16:38 [PR PATCH] refind: make loader and initrd entires bootable again slymattz
@ 2024-03-22 16:55 ` ahesford
  2024-03-22 16:59 ` [PR PATCH] [Updated] " slymattz
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ahesford @ 2024-03-22 16:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/49458#issuecomment-2015508966

Comment:
As noted offline, I think the better fix is to just drop quotes. Quoting (might) matter if the boot prefix has spaces in it, but people who need to handle spaces can manage their rEFInd configurations manually. For most people who might use the boot-prefix variable, they will be more surprised and inconvenienced by the need to replace slashes with backslashes and ensure that they are properly escaped.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] refind: make loader and initrd entires bootable again
  2024-03-22 16:38 [PR PATCH] refind: make loader and initrd entires bootable again slymattz
  2024-03-22 16:55 ` ahesford
@ 2024-03-22 16:59 ` slymattz
  2024-04-03 15:22 ` slymattz
  2024-04-03 16:39 ` [PR PATCH] [Merged]: " ahesford
  3 siblings, 0 replies; 5+ messages in thread
From: slymattz @ 2024-03-22 16:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1543 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages refind-rev4
https://github.com/void-linux/void-packages/pull/49458

refind: make loader and initrd entires bootable again
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**


#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**


<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: (x86_64-glibc)

#### Context
When using loader and initrd entries in refind.conf one needs to either avoid using quotation marks whatsoever or use backslashes to satisfy the EFI stub bootloader. Otherwise the manual stanzas won't boot. I tested revision 3 which had been merged yesterday and experienced this bug.

More on this issue here: https://wiki.archlinux.org/title/REFInd#For_manual_boot_stanzas

@sgn @ahesford ping

A patch file from https://github.com/void-linux/void-packages/pull/49458.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-refind-rev4-49458.patch --]
[-- Type: text/x-diff, Size: 2025 bytes --]

From e912306b3c7f1c75ca11b6eac443925e927d547b Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Fri, 22 Mar 2024 16:57:23 +0100
Subject: [PATCH] refind: make loader and initrd entires bootable again

---
 srcpkgs/refind/files/kernel.post-install     | 4 ++--
 srcpkgs/refind/files/refind-kernel-hook.conf | 2 +-
 srcpkgs/refind/template                      | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/refind/files/kernel.post-install b/srcpkgs/refind/files/kernel.post-install
index 92dc0b6fba7f85..a6014f14e3c5da 100755
--- a/srcpkgs/refind/files/kernel.post-install
+++ b/srcpkgs/refind/files/kernel.post-install
@@ -28,8 +28,8 @@ zversion=$(echo "$VERSION" | sed 's/[.]/[.]/g')
 zentry=$(cat <<EOF
 menuentry "Void Linux $VERSION" {
         volume   "$REFIND_LABEL"
-        loader   "$REFIND_BOOT_PREFIX/vmlinuz-$VERSION"
-        initrd   "$REFIND_BOOT_PREFIX/initramfs-$VERSION.img"
+        loader   $REFIND_BOOT_PREFIX/vmlinuz-$VERSION
+        initrd   $REFIND_BOOT_PREFIX/initramfs-$VERSION.img
         options  "$OPTIONS"
 }
 EOF
diff --git a/srcpkgs/refind/files/refind-kernel-hook.conf b/srcpkgs/refind/files/refind-kernel-hook.conf
index bf4c8d2ac4655e..eada36d5579afa 100644
--- a/srcpkgs/refind/files/refind-kernel-hook.conf
+++ b/srcpkgs/refind/files/refind-kernel-hook.conf
@@ -16,7 +16,7 @@ UPDATE_REFIND_CONF=0
 # 	likewise, EFI mounted to /boot/efi
 # /efi/EFI/refind/refind.conf
 # /efi/EFI/BOOT/refind.conf
-REFIND_CONF=/boot/EFI/refind/refind.conf
+REFIND_CONF="/boot/EFI/refind/refind.conf"
 
 # Set a custom label for Void boot entries
 #REFIND_LABEL="Void Linux"
diff --git a/srcpkgs/refind/template b/srcpkgs/refind/template
index 54725bff299a9e..8f5c7ee76e04be 100644
--- a/srcpkgs/refind/template
+++ b/srcpkgs/refind/template
@@ -1,7 +1,7 @@
 # Template file for 'refind'
 pkgname=refind
 version=0.14.0.2
-revision=3
+revision=4
 archs="x86_64* i686* aarch64*"
 makedepends="gnu-efi-libs"
 depends="bash dosfstools efibootmgr"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: refind: make loader and initrd entires bootable again
  2024-03-22 16:38 [PR PATCH] refind: make loader and initrd entires bootable again slymattz
  2024-03-22 16:55 ` ahesford
  2024-03-22 16:59 ` [PR PATCH] [Updated] " slymattz
@ 2024-04-03 15:22 ` slymattz
  2024-04-03 16:39 ` [PR PATCH] [Merged]: " ahesford
  3 siblings, 0 replies; 5+ messages in thread
From: slymattz @ 2024-04-03 15:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

New comment by slymattz on void-packages repository

https://github.com/void-linux/void-packages/pull/49458#issuecomment-2034913734

Comment:
May I ask either of you to review the simple fix and if everything seems fine to get it merged? I realize not every user of rEFInd uses the post-install hook but it basically renders manual stanzas non-bootable, which may create confusion among those users who are unaware of the whole "do not use double quotation marks around loader and initrd entries" thing.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Merged]: refind: make loader and initrd entires bootable again
  2024-03-22 16:38 [PR PATCH] refind: make loader and initrd entires bootable again slymattz
                   ` (2 preceding siblings ...)
  2024-04-03 15:22 ` slymattz
@ 2024-04-03 16:39 ` ahesford
  3 siblings, 0 replies; 5+ messages in thread
From: ahesford @ 2024-04-03 16:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]

There's a merged pull request on the void-packages repository

refind: make loader and initrd entires bootable again
https://github.com/void-linux/void-packages/pull/49458

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**


#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**


<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: (x86_64-glibc)

#### Context
When using loader and initrd entries in refind.conf one needs to either avoid using quotation marks whatsoever or use backslashes to satisfy the EFI stub bootloader. Otherwise the manual stanzas won't boot. I tested revision 3 which had been merged yesterday and experienced this bug.

More on this issue here: https://wiki.archlinux.org/title/REFInd#For_manual_boot_stanzas

@sgn @ahesford ping

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-03 16:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-22 16:38 [PR PATCH] refind: make loader and initrd entires bootable again slymattz
2024-03-22 16:55 ` ahesford
2024-03-22 16:59 ` [PR PATCH] [Updated] " slymattz
2024-04-03 15:22 ` slymattz
2024-04-03 16:39 ` [PR PATCH] [Merged]: " ahesford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).