Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] runit-void: fix issue with fsck on mounted partitions
Date: Sun, 05 May 2024 14:26:24 +0200	[thread overview]
Message-ID: <20240505122624.A16A5253BB@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-50192@inbox.vuxu.org>

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

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

https://github.com/classabbyamp/void-packages blkdev-write-mounted
https://github.com/void-linux/void-packages/pull/50192

runit-void: fix issue with fsck on mounted partitions
see #50124

backport of https://github.com/void-linux/void-runit/pull/115

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

@dkwo can you test this?


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-blkdev-write-mounted-50192.patch --]
[-- Type: text/x-diff, Size: 2732 bytes --]

From fd2a6b88f135271a65062b45db2bb69736d17462 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 4 May 2024 16:17:01 -0400
Subject: [PATCH] runit-void: fix issue with fsck on mounted partitions

---
 .../patches/blkdev-write-mounted.patch        | 44 +++++++++++++++++++
 srcpkgs/runit-void/template                   |  2 +-
 2 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/runit-void/patches/blkdev-write-mounted.patch

diff --git a/srcpkgs/runit-void/patches/blkdev-write-mounted.patch b/srcpkgs/runit-void/patches/blkdev-write-mounted.patch
new file mode 100644
index 00000000000000..564ed42d189d47
--- /dev/null
+++ b/srcpkgs/runit-void/patches/blkdev-write-mounted.patch
@@ -0,0 +1,44 @@
+From b54ab39243ebba0820e3a5001733487fc137ece7 Mon Sep 17 00:00:00 2001
+From: classabbyamp <void@placeviolette.net>
+Date: Sat, 4 May 2024 15:50:38 -0400
+Subject: [PATCH] core-services/03-filesystems.sh: fsck mounted filesystems
+ separately
+
+see also: void-linux/void-packages#50124
+---
+ core-services/03-filesystems.sh | 22 +++++++++++++++++++++-
+ 1 file changed, 21 insertions(+), 1 deletion(-)
+
+diff --git a/core-services/03-filesystems.sh b/core-services/03-filesystems.sh
+index bb7eac0..a246a49 100644
+--- a/core-services/03-filesystems.sh
++++ b/core-services/03-filesystems.sh
+@@ -67,7 +67,27 @@ done
+ 
+ if [ -z "$FASTBOOT" ]; then
+     msg "Checking filesystems:"
+-    fsck -A -T -a -t noopts=_netdev $FORCEFSCK
++    # check rootfs first
++    fsck -T -a $FORCEFSCK /
++    ret="$?"
++    # exit code of 8 indicates "operational error",
++    # which can happen if CONFIG_BLK_DEV_WRITE_MOUNTED
++    # is disabled on linux>=6.8
++    if [ "$ret" -ne 0 ] && [ "$ret" -ne 8 ]; then
++        emergency_shell
++    fi
++    # then check any mounted partitions
++    while read -r part mntpt rest; do
++        if [ "${part#/dev}" != "$part" ] && [ "$mntpt" != "/" ]; then
++            fsck -T -a $FORCEFSCK "$mntpt"
++            ret="$?"
++            if [ "$ret" -ne 0 ] && [ "$ret" -ne 8 ]; then
++                emergency_shell
++            fi
++        fi
++    done </etc/mtab
++    # finally, everything unmounted in fstab
++    fsck -M -A -T -a -t noopts=_netdev $FORCEFSCK
+     if [ $? -gt 1 ]; then
+         emergency_shell
+     fi
diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template
index 66dd4ac88832d3..9b99964752e809 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=1
+revision=2
 build_style=gnu-makefile
 short_desc="Void Linux runit scripts"
 maintainer="Enno Boland <gottox@voidlinux.org>"

  parent reply	other threads:[~2024-05-05 12:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-04 20:18 [PR PATCH] " classabbyamp
2024-05-04 20:18 ` [PR PATCH] [Updated] " classabbyamp
2024-05-04 20:21 ` classabbyamp
2024-05-05 12:26 ` classabbyamp [this message]
2024-05-05 14:19 ` classabbyamp
2024-05-05 14:44 ` dkwo
2024-05-05 14:46 ` dkwo
2024-05-05 15:48 ` classabbyamp
2024-05-05 16:04 ` [PR PATCH] [Merged]: " classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240505122624.A16A5253BB@inbox.vuxu.org \
    --to=classabbyamp@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).