[Bug 265289] Error building sysutils/fusefs-ext2 with read-only system root directory

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 18 Jul 2022 08:20:57 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265289

            Bug ID: 265289
           Summary: Error building sysutils/fusefs-ext2 with read-only
                    system root directory
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ehaupt@FreeBSD.org
          Reporter: mc@jscc.ru
             Flags: maintainer-feedback?(ehaupt@FreeBSD.org)
          Assignee: ehaupt@FreeBSD.org

Created attachment 235326
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=235326&action=edit
Using sysutils/e2fsprogs@nobootfsck as a dependency for sysutils/fusefs-ext2

-------------------------------------------------
#synth just-build sysutils/fusefs-ext2
===>   fusefs-ext2-0.0.10_3 depends on executable: mke2fs - not found
===>   Installing existing package /packages/All/e2fsprogs-1.46.5_1.pkg
Installing e2fsprogs-1.46.5_1...
`-- Installing e2fsprogs-libblkid-1.46.5...
|   `-- Installing e2fsprogs-libuuid-1.46.5...
|   `-- Extracting e2fsprogs-libuuid-1.46.5: .......... done
`-- Extracting e2fsprogs-libblkid-1.46.5: .......... done
`-- Installing gettext-runtime-0.21...
|   `-- Installing indexinfo-0.3.1...
|   `-- Extracting indexinfo-0.3.1: .... done
`-- Extracting gettext-runtime-0.21: .......... done
Extracting e2fsprogs-1.46.5_1: 
pkg-static: Fail to create temporary file:
/sbin/.pkgtemp.e2fsck.ihJYgaA5Q8MD:Read-only file system
Extracting e2fsprogs-1.46.5_1... done

Failed to install the following 1 package(s):
/packages/All/e2fsprogs-1.46.5_1.pkg
*** Error code 1

Stop.
-------------------------------------------------

sysutils/e2fsprogs tries to install e2fsck(8) to /sbin; it is a read-only
directory in synth(1) build environment. There is a flavor
sysutils/e2fsprogs@nobootfsck that doesn't put anything outside $LOCALBASE, but
sysutils/fusefs-ext2 tries to use sysutils/e2fsprogs@default and fails.

I don't think fusefs ext2 support (used mainly for mounting external drives)
needs boottime fsck in its default configuration. Why don't we use
sysutils/e2fsprogs@nobootfsck as default dependency to allow read-only system
root? And if you need boottime e2fsck, you know how to use
sysutils/e2fsprogs@default or sysutils/e2fsprogs@roothardlinks.

The attached patch was tested on my system, synth(1) building of
sysutils/fusefs-ext2 is OK; mke2fs, mounting, writing, unmounting, e2fsck,
remounting and reading external drive work correctly.

-- 
You are receiving this mail because:
You are the assignee for the bug.