git: d347f4a2eea6 - releng/15.0 - bsdinstall: Copy in all keys

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Sun, 16 Nov 2025 03:11:56 UTC
The branch releng/15.0 has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=d347f4a2eea6ed1964bf3837c7938f6c95e3f06b

commit d347f4a2eea6ed1964bf3837c7938f6c95e3f06b
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2025-11-14 05:28:23 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-11-16 03:10:46 +0000

    bsdinstall: Copy in all keys
    
    The keys used for pkgbase signing are going to be placed in
    /usr/share/keys/pkgbase-N where N is the FreeBSD major version
    number; as such it's not sufficient to copy /usr/share/keys/pkg
    into the install chroot, but instead we need /usr/share/keys/*.
    
    Approved by:    re (cperciva)
    With hat:       re
    MFC after:      8 hours (needed in 15.0-RC1)
    Differential Revision:  https://reviews.freebsd.org/D53753
    
    (cherry picked from commit 6b0909f94099f92992fbd58eee7ce0f9289cb05e)
    (cherry picked from commit 7c98b725a785efd50e195b298ed279d55ca69860)
---
 usr.sbin/bsdinstall/scripts/pkgbase.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in
index 5299d34fcb71..744e0daac6f8 100755
--- a/usr.sbin/bsdinstall/scripts/pkgbase.in
+++ b/usr.sbin/bsdinstall/scripts/pkgbase.in
@@ -337,7 +337,7 @@ local function pkgbase()
 		-- Since pkg always interprets fingerprints paths as relative to
 		-- the --rootdir we must copy the key from the host.
 		assert(os.execute("mkdir -p " .. chroot .. "/usr/share/keys"))
-		assert(os.execute("cp -R /usr/share/keys/pkg " .. chroot .. "/usr/share/keys/"))
+		assert(os.execute("cp -R /usr/share/keys/* " .. chroot .. "/usr/share/keys/"))
 	end
 
 	-- We must use --repo-conf-dir rather than -o REPOS_DIR here as the latter