Github messages for voidlinux
 help / color / Atom feed
* [PR PATCH] refind: add hook to update refind.conf on changing kernel
@ 2019-11-09 10:13 voidlinux-github
  2019-11-10  9:21 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: voidlinux-github @ 2019-11-09 10:13 UTC (permalink / raw)
  To: ml

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

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

https://github.com/zdtcd/void-packages refind-kernel-hook
https://github.com/void-linux/void-packages/pull/16251

refind: add hook to update refind.conf on changing kernel
Someone asked in IRC, here is it

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

[-- Warning: decoded text below may be mangled --]
[-- Attachment #2: github-pr-refind-kernel-hook-16251.patch --]
[-- Type: text/x-diff, Size: 5028 bytes --]

From e25f9122b58b705d0eee4deb492f8b98d72b7329 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Sat, 9 Nov 2019 16:02:49 +0700
Subject: [PATCH] refind: add hook to update refind.conf on changing kernel

---
 srcpkgs/refind/files/kernel.post-install     | 54 ++++++++++++++++++++
 srcpkgs/refind/files/kernel.post-remove      | 28 ++++++++++
 srcpkgs/refind/files/refind-kernel-hook.conf | 22 ++++++++
 srcpkgs/refind/template                      | 10 +++-
 4 files changed, 112 insertions(+), 2 deletions(-)
 create mode 100755 srcpkgs/refind/files/kernel.post-install
 create mode 100755 srcpkgs/refind/files/kernel.post-remove
 create mode 100644 srcpkgs/refind/files/refind-kernel-hook.conf

diff --git a/srcpkgs/refind/files/kernel.post-install b/srcpkgs/refind/files/kernel.post-install
new file mode 100755
index 00000000000..2de729462d7
--- /dev/null
+++ b/srcpkgs/refind/files/kernel.post-install
@@ -0,0 +1,54 @@
+#!/bin/sh
+#
+# Kernel hook for refind.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+. "${ROOTDIR}/etc/default/refind-kernel-hook.conf"
+if [ "z$UPDATE_REFIND_CONF" != "z1" ]; then
+	exit 0;
+fi
+
+# Default refind.conf
+REFIND_CONF="${REFIND_CONF:-/boot/EFI/refind/refind.conf}"
+
+zrefind_dir="${REFIND_CONF%/*}"
+mkdir -p "$zrefind_dir"
+touch "$REFIND_CONF"
+
+zefi_mountpoint=$(df -P "$REFIND_CONF" | awk 'NR==2{print $6}')
+zicon="${zrefind_dir#$zefi_mountpoint}/icons/os_void.png"
+
+mkedscript() {
+	zversion=$(echo $VERSION | sed 's/[.]/[.]/g')
+	zexpr='^menuentry "Void Linux '"$zversion"'" {$'
+	if grep -q "$zexpr" "$REFIND_CONF"; then
+		printf '%s\n' "/$zexpr/" '.,/}/d'
+	fi
+
+	cat <<EOF
+1
+/^menuentry /
+i
+menuentry "Void Linux $VERSION" {
+	icon     $zicon
+	volume   "Void Linux"
+	loader   /vmlinuz-$VERSION
+	initrd   /initramfs-$VERSION.img
+	options  "$OPTIONS"
+}
+.
+EOF
+
+	if ! grep -q '^timeout ' "$REFIND_CONF"; then
+		# don't merge 1 i to 1i, the former works even if file is empty
+		printf '%s\n' 1 i "timeout 20" .
+	fi
+	echo wq
+}
+
+mkedscript | ed "$REFIND_CONF" >/dev/null
+exit 0
diff --git a/srcpkgs/refind/files/kernel.post-remove b/srcpkgs/refind/files/kernel.post-remove
new file mode 100755
index 00000000000..977bb820985
--- /dev/null
+++ b/srcpkgs/refind/files/kernel.post-remove
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# Kernel hook for refind.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+. "${ROOTDIR}/etc/default/refind-kernel-hook.conf"
+if [ "z$UPDATE_REFIND_CONF" != "z1" ]; then
+	exit 0;
+fi
+
+# Default refind.conf
+REFIND_CONF="${REFIND_CONF:-/boot/EFI/refind/refind.conf}"
+
+[ -f "$REFIND_CONF" ] || exit 0
+
+zversion=$(echo $VERSION | sed 's/[.]/[.]/g')
+zexpr="^menuentry \"Void Linux $zversion\" [{]\$"
+grep -q "$zexpr" "$REFIND_CONF" || exit 0
+
+ed "$REFIND_CONF" <<EOF >/dev/null
+/$zexpr/
+.,/[}]/d
+wq
+EOF
diff --git a/srcpkgs/refind/files/refind-kernel-hook.conf b/srcpkgs/refind/files/refind-kernel-hook.conf
new file mode 100644
index 00000000000..511c58a7114
--- /dev/null
+++ b/srcpkgs/refind/files/refind-kernel-hook.conf
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Change this line to 1 to update refind conf whenever new kernel is installed
+UPDATE_REFIND_CONF=0
+
+# refind.conf location
+# It usually stay in
+#
+# /boot/EFI/refind/refind.conf
+# 	if you use all default configuration and EFI partition mounted to /boot
+# /boot/efi/EFI/refind/refind.conf
+# 	if using default configuration and EFI partition mounted to /boot/efi
+# /boot/EFI/BOOT/refind.conf
+# 	if you run refind-install ==usedefault and EFI partition mounted to /boot
+# /boot/efi/EFI/BOOT/refind.conf
+# 	likewise, EFI mounted to /boot/efi
+# /efi/EFI/refind/refind.conf
+# /eif/EFI/BOOT/refind.conf
+REFIND_CONF=/boot/EFI/refind/refind.conf
+
+# addition kernel cmdline
+OPTIONS="quiet"
diff --git a/srcpkgs/refind/template b/srcpkgs/refind/template
index dd247174d5f..2765acd5b55 100644
--- a/srcpkgs/refind/template
+++ b/srcpkgs/refind/template
@@ -1,15 +1,16 @@
 # Template file for 'refind'
 pkgname=refind
 version=0.11.4
-revision=1
+revision=2
 makedepends="gnu-efi-libs git"
 depends="bash dosfstools efibootmgr"
-short_desc="An EFI boot manager utility"
+short_desc="EFI boot manager utility"
 maintainer="Julio Galvan <juliogalvan@protonmail.com>"
 license="GPL-3.0-only, BSD-3-Clause"
 homepage="https://sourceforge.net/projects/refind/"
 distfiles="${SOURCEFORGE_SITE}/refind/refind-src-${version}.tar.gz"
 checksum=39baf140603951da098238c1cbf4176fdd7d4a45fab0399e9985ad7368034dae
+conf_files="/etc/default/refind-kernel-hook.conf"
 
 case "$XBPS_TARGET_MACHINE" in
 	x86_64|i686|aarch64) ;;
@@ -85,4 +86,9 @@ do_install() {
 	vmkdir etc/refind.d
 	vcopy keys /etc/refind.d/
 
+	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
 }

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

* Re: [PR PATCH] [Updated] refind: add hook to update refind.conf on changing kernel
  2019-11-09 10:13 [PR PATCH] refind: add hook to update refind.conf on changing kernel voidlinux-github
@ 2019-11-10  9:21 ` " voidlinux-github
  2019-11-11 10:28 ` voidlinux-github
  2019-11-11 11:12 ` refind: add hook to update refind.conf on changing kernel, also unbroken musl voidlinux-github
  2 siblings, 0 replies; 4+ messages in thread
From: voidlinux-github @ 2019-11-10  9:21 UTC (permalink / raw)
  To: ml

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

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

https://github.com/zdtcd/void-packages refind-kernel-hook
https://github.com/void-linux/void-packages/pull/16251

refind: add hook to update refind.conf on changing kernel
Someone asked in IRC, here is it

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

[-- Warning: decoded text below may be mangled --]
[-- Attachment #2: github-pr-refind-kernel-hook-16251.patch --]
[-- Type: text/x-diff, Size: 5000 bytes --]

From 55b087f5e57aab092222a7e436f730b49e20fcc5 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Sat, 9 Nov 2019 16:02:49 +0700
Subject: [PATCH] refind: add hook to update refind.conf on changing kernel

---
 srcpkgs/refind/files/kernel.post-install     | 54 ++++++++++++++++++++
 srcpkgs/refind/files/kernel.post-remove      | 28 ++++++++++
 srcpkgs/refind/files/refind-kernel-hook.conf | 22 ++++++++
 srcpkgs/refind/template                      |  8 ++-
 4 files changed, 111 insertions(+), 1 deletion(-)
 create mode 100755 srcpkgs/refind/files/kernel.post-install
 create mode 100755 srcpkgs/refind/files/kernel.post-remove
 create mode 100644 srcpkgs/refind/files/refind-kernel-hook.conf

diff --git a/srcpkgs/refind/files/kernel.post-install b/srcpkgs/refind/files/kernel.post-install
new file mode 100755
index 00000000000..20dd149a807
--- /dev/null
+++ b/srcpkgs/refind/files/kernel.post-install
@@ -0,0 +1,54 @@
+#!/bin/sh
+#
+# Kernel hook for refind.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+. "${ROOTDIR}/etc/default/refind-kernel-hook.conf"
+if [ "z$UPDATE_REFIND_CONF" != "z1" ]; then
+	exit 0;
+fi
+
+# Default refind.conf
+REFIND_CONF="${REFIND_CONF:-/boot/EFI/refind/refind.conf}"
+
+zrefind_dir="${REFIND_CONF%/*}"
+mkdir -p "$zrefind_dir"
+touch "$REFIND_CONF"
+
+zefi_mountpoint=$(df -P "$REFIND_CONF" | awk 'NR==2{print $6}')
+zicon="${zrefind_dir#$zefi_mountpoint}/icons/os_void.png"
+
+mkedscript() {
+	zversion=$(echo $VERSION | sed 's/[.]/[.]/g')
+	zexpr='^menuentry "Void Linux '"$zversion"'" {$'
+	if grep -q "$zexpr" "$REFIND_CONF"; then
+		# Do not merge into /expr/,/}/d, it doesn't work
+		printf '%s\n' "/$zexpr/" '.,/}/d'
+	fi
+
+	cat <<EOF
+1
+/^menuentry /
+i
+menuentry "Void Linux $VERSION" {
+	icon     $zicon
+	volume   "Void Linux"
+	loader   /vmlinuz-$VERSION
+	initrd   /initramfs-$VERSION.img
+	options  "$OPTIONS"
+}
+.
+EOF
+
+	if ! grep -q '^timeout ' "$REFIND_CONF"; then
+		printf '%s\n' 1i "timeout 20" .
+	fi
+	echo wq
+}
+
+mkedscript | ed "$REFIND_CONF" >/dev/null
+exit 0
diff --git a/srcpkgs/refind/files/kernel.post-remove b/srcpkgs/refind/files/kernel.post-remove
new file mode 100755
index 00000000000..98ff754f570
--- /dev/null
+++ b/srcpkgs/refind/files/kernel.post-remove
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# Kernel hook for refind.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+. "${ROOTDIR}/etc/default/refind-kernel-hook.conf"
+if [ "z$UPDATE_REFIND_CONF" != "z1" ]; then
+	exit 0;
+fi
+
+# Default refind.conf
+REFIND_CONF="${REFIND_CONF:-/boot/EFI/refind/refind.conf}"
+
+[ -f "$REFIND_CONF" ] || exit 0
+
+tmpfile=$(mktemp /tmp/refind.XXXXXXX)
+zversion=$(echo $VERSION | sed 's/[.]/[.]/g')
+sed "/^menuentry \"Void Linux $zversion\" [{]\$/,/[}]/d" "$REFIND_CONF" >"$tmpfile"
+
+if ! cmp -s "$REFIND_CONF" "$tmpfile"; then
+	mv "$tmpfile" "$REFIND_CONF"
+else
+	rm -f "$tmpfile"
+fi
diff --git a/srcpkgs/refind/files/refind-kernel-hook.conf b/srcpkgs/refind/files/refind-kernel-hook.conf
new file mode 100644
index 00000000000..c674f477a22
--- /dev/null
+++ b/srcpkgs/refind/files/refind-kernel-hook.conf
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Change this line to 1 to update refind conf whenever new kernel is installed
+UPDATE_REFIND_CONF=1
+
+# refind.conf location
+# It usually stay in
+#
+# /boot/EFI/refind/refind.conf
+# 	if you use all default configuration and EFI partition mounted to /boot
+# /boot/efi/EFI/refind/refind.conf
+# 	if using default configuration and EFI partition mounted to /boot/efi
+# /boot/EFI/BOOT/refind.conf
+# 	if you run refind-install ==usedefault and EFI partition mounted to /boot
+# /boot/efi/EFI/BOOT/refind.conf
+# 	likewise, EFI mounted to /boot/efi
+# /efi/EFI/refind/refind.conf
+# /eif/EFI/BOOT/refind.conf
+REFIND_CONF=/boot/EFI/refind/refind.conf
+
+# addition kernel cmdline
+OPTIONS="quiet"
diff --git a/srcpkgs/refind/template b/srcpkgs/refind/template
index dd247174d5f..5417f03a46b 100644
--- a/srcpkgs/refind/template
+++ b/srcpkgs/refind/template
@@ -1,7 +1,7 @@
 # Template file for 'refind'
 pkgname=refind
 version=0.11.4
-revision=1
+revision=2
 makedepends="gnu-efi-libs git"
 depends="bash dosfstools efibootmgr"
 short_desc="An EFI boot manager utility"
@@ -10,6 +10,7 @@ license="GPL-3.0-only, BSD-3-Clause"
 homepage="https://sourceforge.net/projects/refind/"
 distfiles="${SOURCEFORGE_SITE}/refind/refind-src-${version}.tar.gz"
 checksum=39baf140603951da098238c1cbf4176fdd7d4a45fab0399e9985ad7368034dae
+conf_files="/etc/default/refind-kernel-hook.conf"
 
 case "$XBPS_TARGET_MACHINE" in
 	x86_64|i686|aarch64) ;;
@@ -85,4 +86,9 @@ do_install() {
 	vmkdir etc/refind.d
 	vcopy keys /etc/refind.d/
 
+	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
 }

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

* Re: [PR PATCH] [Updated] refind: add hook to update refind.conf on changing kernel
  2019-11-09 10:13 [PR PATCH] refind: add hook to update refind.conf on changing kernel voidlinux-github
  2019-11-10  9:21 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-11-11 10:28 ` voidlinux-github
  2019-11-11 11:12 ` refind: add hook to update refind.conf on changing kernel, also unbroken musl voidlinux-github
  2 siblings, 0 replies; 4+ messages in thread
From: voidlinux-github @ 2019-11-11 10:28 UTC (permalink / raw)
  To: ml

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

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

https://github.com/zdtcd/void-packages refind-kernel-hook
https://github.com/void-linux/void-packages/pull/16251

refind: add hook to update refind.conf on changing kernel
Someone asked in IRC, here is it

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

[-- Warning: decoded text below may be mangled --]
[-- Attachment #2: github-pr-refind-kernel-hook-16251.patch --]
[-- Type: text/x-diff, Size: 7850 bytes --]

From 76de439ba2a4d25e308e987677bc6a9f4e0cc360 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Sat, 9 Nov 2019 16:02:49 +0700
Subject: [PATCH 1/2] refind: add hook to update refind.conf on changing kernel

---
 srcpkgs/refind/files/kernel.post-install     | 54 ++++++++++++++++++++
 srcpkgs/refind/files/kernel.post-remove      | 28 ++++++++++
 srcpkgs/refind/files/refind-kernel-hook.conf | 22 ++++++++
 srcpkgs/refind/template                      | 10 +++-
 4 files changed, 112 insertions(+), 2 deletions(-)
 create mode 100755 srcpkgs/refind/files/kernel.post-install
 create mode 100755 srcpkgs/refind/files/kernel.post-remove
 create mode 100644 srcpkgs/refind/files/refind-kernel-hook.conf

diff --git a/srcpkgs/refind/files/kernel.post-install b/srcpkgs/refind/files/kernel.post-install
new file mode 100755
index 00000000000..2de729462d7
--- /dev/null
+++ b/srcpkgs/refind/files/kernel.post-install
@@ -0,0 +1,54 @@
+#!/bin/sh
+#
+# Kernel hook for refind.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+. "${ROOTDIR}/etc/default/refind-kernel-hook.conf"
+if [ "z$UPDATE_REFIND_CONF" != "z1" ]; then
+	exit 0;
+fi
+
+# Default refind.conf
+REFIND_CONF="${REFIND_CONF:-/boot/EFI/refind/refind.conf}"
+
+zrefind_dir="${REFIND_CONF%/*}"
+mkdir -p "$zrefind_dir"
+touch "$REFIND_CONF"
+
+zefi_mountpoint=$(df -P "$REFIND_CONF" | awk 'NR==2{print $6}')
+zicon="${zrefind_dir#$zefi_mountpoint}/icons/os_void.png"
+
+mkedscript() {
+	zversion=$(echo $VERSION | sed 's/[.]/[.]/g')
+	zexpr='^menuentry "Void Linux '"$zversion"'" {$'
+	if grep -q "$zexpr" "$REFIND_CONF"; then
+		printf '%s\n' "/$zexpr/" '.,/}/d'
+	fi
+
+	cat <<EOF
+1
+/^menuentry /
+i
+menuentry "Void Linux $VERSION" {
+	icon     $zicon
+	volume   "Void Linux"
+	loader   /vmlinuz-$VERSION
+	initrd   /initramfs-$VERSION.img
+	options  "$OPTIONS"
+}
+.
+EOF
+
+	if ! grep -q '^timeout ' "$REFIND_CONF"; then
+		# don't merge 1 i to 1i, the former works even if file is empty
+		printf '%s\n' 1 i "timeout 20" .
+	fi
+	echo wq
+}
+
+mkedscript | ed "$REFIND_CONF" >/dev/null
+exit 0
diff --git a/srcpkgs/refind/files/kernel.post-remove b/srcpkgs/refind/files/kernel.post-remove
new file mode 100755
index 00000000000..977bb820985
--- /dev/null
+++ b/srcpkgs/refind/files/kernel.post-remove
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# Kernel hook for refind.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+. "${ROOTDIR}/etc/default/refind-kernel-hook.conf"
+if [ "z$UPDATE_REFIND_CONF" != "z1" ]; then
+	exit 0;
+fi
+
+# Default refind.conf
+REFIND_CONF="${REFIND_CONF:-/boot/EFI/refind/refind.conf}"
+
+[ -f "$REFIND_CONF" ] || exit 0
+
+zversion=$(echo $VERSION | sed 's/[.]/[.]/g')
+zexpr="^menuentry \"Void Linux $zversion\" [{]\$"
+grep -q "$zexpr" "$REFIND_CONF" || exit 0
+
+ed "$REFIND_CONF" <<EOF >/dev/null
+/$zexpr/
+.,/[}]/d
+wq
+EOF
diff --git a/srcpkgs/refind/files/refind-kernel-hook.conf b/srcpkgs/refind/files/refind-kernel-hook.conf
new file mode 100644
index 00000000000..511c58a7114
--- /dev/null
+++ b/srcpkgs/refind/files/refind-kernel-hook.conf
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Change this line to 1 to update refind conf whenever new kernel is installed
+UPDATE_REFIND_CONF=0
+
+# refind.conf location
+# It usually stay in
+#
+# /boot/EFI/refind/refind.conf
+# 	if you use all default configuration and EFI partition mounted to /boot
+# /boot/efi/EFI/refind/refind.conf
+# 	if using default configuration and EFI partition mounted to /boot/efi
+# /boot/EFI/BOOT/refind.conf
+# 	if you run refind-install ==usedefault and EFI partition mounted to /boot
+# /boot/efi/EFI/BOOT/refind.conf
+# 	likewise, EFI mounted to /boot/efi
+# /efi/EFI/refind/refind.conf
+# /eif/EFI/BOOT/refind.conf
+REFIND_CONF=/boot/EFI/refind/refind.conf
+
+# addition kernel cmdline
+OPTIONS="quiet"
diff --git a/srcpkgs/refind/template b/srcpkgs/refind/template
index dd247174d5f..2765acd5b55 100644
--- a/srcpkgs/refind/template
+++ b/srcpkgs/refind/template
@@ -1,15 +1,16 @@
 # Template file for 'refind'
 pkgname=refind
 version=0.11.4
-revision=1
+revision=2
 makedepends="gnu-efi-libs git"
 depends="bash dosfstools efibootmgr"
-short_desc="An EFI boot manager utility"
+short_desc="EFI boot manager utility"
 maintainer="Julio Galvan <juliogalvan@protonmail.com>"
 license="GPL-3.0-only, BSD-3-Clause"
 homepage="https://sourceforge.net/projects/refind/"
 distfiles="${SOURCEFORGE_SITE}/refind/refind-src-${version}.tar.gz"
 checksum=39baf140603951da098238c1cbf4176fdd7d4a45fab0399e9985ad7368034dae
+conf_files="/etc/default/refind-kernel-hook.conf"
 
 case "$XBPS_TARGET_MACHINE" in
 	x86_64|i686|aarch64) ;;
@@ -85,4 +86,9 @@ do_install() {
 	vmkdir etc/refind.d
 	vcopy keys /etc/refind.d/
 
+	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
 }

From 9e4a7237743222d74e3d9290f978b5bd3057e790 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Mon, 11 Nov 2019 17:26:42 +0700
Subject: [PATCH 2/2] refind: support musl libc

---
 .../refind/patches/force-inline-musl.patch    | 33 +++++++++++++++++++
 srcpkgs/refind/template                       |  3 +-
 2 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/refind/patches/force-inline-musl.patch

diff --git a/srcpkgs/refind/patches/force-inline-musl.patch b/srcpkgs/refind/patches/force-inline-musl.patch
new file mode 100644
index 00000000000..98b985fc3a2
--- /dev/null
+++ b/srcpkgs/refind/patches/force-inline-musl.patch
@@ -0,0 +1,33 @@
+--- filesystems/zstd/fse_decompress.c.orig	2019-11-11 17:00:57.423347660 +0700
++++ filesystems/zstd/fse_decompress.c	2019-11-11 17:01:52.654692140 +0700
+@@ -40,7 +40,7 @@
+ /* **************************************************************
+ *  Compiler specifics
+ ****************************************************************/
+-#define FORCE_INLINE static __always_inline
++#define FORCE_INLINE static inline __attribute__((__always_inline__))
+ 
+ /* **************************************************************
+ *  Includes
+--- filesystems/zstd/zstd_internal.h.orig	2019-11-11 15:56:42.258217148 +0700
++++ filesystems/zstd/zstd_internal.h	2019-11-11 16:04:09.433867777 +0700
+@@ -20,7 +20,7 @@
+ /*-*******************************************************
+ *  Compiler specifics
+ *********************************************************/
+-#define FORCE_INLINE static __always_inline
++#define FORCE_INLINE static inline __attribute__((__always_inline__))
+ #define FORCE_NOINLINE static /*noinline*/
+ 
+ /*-*************************************
+--- filesystems/zstd/huf_decompress.c.orig	2019-11-11 17:00:46.487280468 +0700
++++ filesystems/zstd/huf_decompress.c	2019-11-11 17:01:20.095488026 +0700
+@@ -40,7 +40,7 @@
+ /* **************************************************************
+ *  Compiler specifics
+ ****************************************************************/
+-#define FORCE_INLINE static __always_inline
++#define FORCE_INLINE static inline __attribute__((__always_inline__))
+ 
+ /* **************************************************************
+ *  Dependencies
diff --git a/srcpkgs/refind/template b/srcpkgs/refind/template
index 2765acd5b55..55bda995204 100644
--- a/srcpkgs/refind/template
+++ b/srcpkgs/refind/template
@@ -13,8 +13,7 @@ checksum=39baf140603951da098238c1cbf4176fdd7d4a45fab0399e9985ad7368034dae
 conf_files="/etc/default/refind-kernel-hook.conf"
 
 case "$XBPS_TARGET_MACHINE" in
-	x86_64|i686|aarch64) ;;
-	*-musl) broken="requires patching on musl arches" ;;
+	x86_64*|i686*|aarch64*) ;;
 	*) broken="${XBPS_TARGET_MACHINE} is unsupported" ;;
 esac
 

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

* Re: refind: add hook to update refind.conf on changing kernel, also unbroken musl
  2019-11-09 10:13 [PR PATCH] refind: add hook to update refind.conf on changing kernel voidlinux-github
  2019-11-10  9:21 ` [PR PATCH] [Updated] " voidlinux-github
  2019-11-11 10:28 ` voidlinux-github
@ 2019-11-11 11:12 ` voidlinux-github
  2 siblings, 0 replies; 4+ messages in thread
From: voidlinux-github @ 2019-11-11 11:12 UTC (permalink / raw)
  To: ml

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

New comment by zdtcd on void-packages repository

https://github.com/void-linux/void-packages/pull/16251#issuecomment-552400441

Comment:
Tested with x86_64-musl on Lenovo Thinkpad T480.

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-09 10:13 [PR PATCH] refind: add hook to update refind.conf on changing kernel voidlinux-github
2019-11-10  9:21 ` [PR PATCH] [Updated] " voidlinux-github
2019-11-11 10:28 ` voidlinux-github
2019-11-11 11:12 ` refind: add hook to update refind.conf on changing kernel, also unbroken musl voidlinux-github

Github messages for voidlinux

Archives are clonable: git clone --mirror http://inbox.vuxu.org/voidlinux-github

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.github.voidlinux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git