About News Download Docs Forum Bugs Contact

Forum

Information

Tools

Resources

Fix for sorcery not detecting castfs

Submitted by SneakyThunder 19 Nov, 2022 10:18 #

For some reason sorcery (from master branch) fails to detect castfs support on my machine, in chroot. I simplified regex in libtrack that it uses to do so, and it worked...

Patch:

diff --git a/var/lib/sorcery/modules/libtrack b/var/lib/sorcery/modules/libtrack
index 60f19162..31f86bd0 100755
--- a/var/lib/sorcery/modules/libtrack
+++ b/var/lib/sorcery/modules/libtrack
@@ -181,7 +181,7 @@ is_castfs_installed()
   if type castfs >/dev/null 2>&1 &&
      (
        modprobe fuse > /dev/null 2>&1 ||
-       grep -q '^nodev[\t\v\f\r ]*fuse$' /proc/filesystems
+       grep -q '^nodev\s*fuse$' /proc/filesystems
      ) &&
      [ -c /dev/fuse ]
   then

P.S: I don't know about correct procedure for submitting patches, so let me know if I shouldn't just "dump" it on the forum

Submitted by public 20 Nov, 2022 02:53 #

I tried your patch. works great, but I had no problem with staging before your patch. what locale do you use? can you change it to C and check some spell without your patch?

Submitted by SneakyThunder 20 Nov, 2022 08:32 #

I tried your patch. works great, but I had no problem with staging before your patch. what locale do you use? can you change it to C and check some spell without your patch?

# locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

It seems like it uses "C" locale by default. Prepending LC_ALL=C to cast command doesn't solve this issue

Submitted by public 25 Nov, 2022 23:27 #

no idea why it works for me without the patch.

$ cat -A /proc/filesystems
...
nodev^Ifuse$
...

What's yours?

Submitted by SneakyThunder 28 Nov, 2022 18:34 #

Hmm... It looks the same: nodev^Ifuse$

Maybe its something with my version of grep?

Submitted by public 07 Dec, 2022 19:54 #
$ grep --version
grep (GNU grep) 3.8
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel and others; see
<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
Edited 08 Dec, 2022 14:42
Submitted by stealth 09 Dec, 2022 17:13 #

In order to get to grep modprobe fuse must fail.

It seems the grep check needs this change anyway as it's no longer applicable for modern kernels, but I wonder why modprobe failed in the first post.

Have a sourcerous day!

 
Register or login to post a reply.