git: 6b0909f94099 - main - bsdinstall: Copy in all keys

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Sat, 15 Nov 2025 07:58:54 UTC
The branch main has been updated by cperciva:

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

commit 6b0909f94099f92992fbd58eee7ce0f9289cb05e
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2025-11-14 05:28:23 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-11-15 07:58:40 +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/*.
    
    With hat:       re
    MFC after:      8 hours (needed in 15.0-RC1)
    Differential Revision:  https://reviews.freebsd.org/D53753
---
 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