[Bug 277828] 15-CURRENT installation fails when /usr is on seperate UFS volume

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 24 Mar 2024 23:28:15 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277828

Mark Peek <mp@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mp@FreeBSD.org

--- Comment #2 from Mark Peek <mp@FreeBSD.org> ---
The issue is base.txz having hard links across filesystems (/ for /etc and
/usr). This looks to have been introduced via the below commit where the
install flags were changed from "-lrs" to "-lm". As "make distributeworld"
creates the base directory on a single filesystem when certctl is run, "-lm"
creates hard links which requires /etc and /usr/ to be on the same filesystem.

https://github.com/freebsd/freebsd-src/commit/a401c8cb26b22688087ad7c5ee527718459df15a

This patch should fix this specific issue.

diff --git a/usr.sbin/certctl/certctl.sh b/usr.sbin/certctl/certctl.sh
index 997a7d835d53..f95b4561d852 100755
--- a/usr.sbin/certctl/certctl.sh
+++ b/usr.sbin/certctl/certctl.sh
@@ -110,7 +110,7 @@ create_trusted()
 {
        local hash certhash otherfile otherhash
        local suffix
-       local link=${2:+-lm}
+       local link=${2:+-lrs}

        hash=$(do_hash "$1") || return
        certhash=$(openssl x509 -sha1 -in "$1" -noout -fingerprint)
@@ -159,7 +159,7 @@ resolve_certname()
 create_untrusted()
 {
        local srcfile filename
-       local link=${2:+-lm}
+       local link=${2:+-lrs}

        set -- $(resolve_certname "$1")
        srcfile=$1

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