diff --git a/srcpkgs/runit-void/patches/util-linux-2.40.patch b/srcpkgs/runit-void/patches/util-linux-2.40.patch new file mode 100644 index 00000000000..0c75ad64e73 --- /dev/null +++ b/srcpkgs/runit-void/patches/util-linux-2.40.patch @@ -0,0 +1,59 @@ +From 4f745732b8b56a54dd2ce87157c00d44255eda3b Mon Sep 17 00:00:00 2001 +From: classabbyamp +Date: Sun, 2 Jun 2024 06:31:30 -0400 +Subject: [PATCH] core-services, shutdown.d: force legacy mount iface for + remount + +With util-linux>=2.40, filesystems that do not support remounting with +different options fail because the new kernel mount interface is used. +This breaks booting an overlayfs (like live ISOs). + +By setting `LIBMOUNT_FORCE_MOUNT2=always`, we force `mount(8)` to use +the old kernel mount interface, which ignores changed options. + +see also: +* https://github.com/util-linux/util-linux/issues/2576 +* https://github.com/void-linux/void-mklive/issues/369 +--- + core-services/03-filesystems.sh | 4 ++-- + shutdown.d/80-filesystems.sh | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/core-services/03-filesystems.sh b/core-services/03-filesystems.sh +index bb7eac0..6035cad 100644 +--- a/core-services/03-filesystems.sh ++++ b/core-services/03-filesystems.sh +@@ -3,7 +3,7 @@ + [ -n "$VIRTUALIZATION" ] && return 0 + + msg "Remounting rootfs read-only..." +-mount -o remount,ro / || emergency_shell ++LIBMOUNT_FORCE_MOUNT2=always mount -o remount,ro / || emergency_shell + + if [ -x /sbin/dmraid -o -x /bin/dmraid ]; then + msg "Activating dmraid devices..." +@@ -74,7 +74,7 @@ if [ -z "$FASTBOOT" ]; then + fi + + msg "Mounting rootfs read-write..." +-mount -o remount,rw / || emergency_shell ++LIBMOUNT_FORCE_MOUNT2=always mount -o remount,rw / || emergency_shell + + msg "Mounting all non-network filesystems..." + mount -a -t "nosysfs,nonfs,nonfs4,nosmbfs,nocifs" -O no_netdev || emergency_shell +diff --git a/shutdown.d/80-filesystems.sh b/shutdown.d/80-filesystems.sh +index 95dcce4..7a83de3 100644 +--- a/shutdown.d/80-filesystems.sh ++++ b/shutdown.d/80-filesystems.sh +@@ -3,7 +3,7 @@ if [ -z "$VIRTUALIZATION" ]; then + swapoff -a + umount -r -a -t nosysfs,noproc,nodevtmpfs,notmpfs + msg "Remounting rootfs read-only..." +- mount -o remount,ro / ++ LIBMOUNT_FORCE_MOUNT2=always mount -o remount,ro / + fi + + sync +-- +2.45.1 + diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template index 1858738a881..dc74a41785c 100644 --- a/srcpkgs/runit-void/template +++ b/srcpkgs/runit-void/template @@ -1,7 +1,7 @@ # Template file for 'runit-void' pkgname=runit-void version=20231124 -revision=4 +revision=5 build_style=gnu-makefile short_desc="Void Linux runit scripts" maintainer="Enno Boland "