git: e4bc038ef806 - stable/15 - bsdinstall: Don't install FreeBSD-base.conf

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Sun, 16 Nov 2025 02:04:29 UTC
The branch stable/15 has been updated by cperciva:

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

commit e4bc038ef80607ad9ceedb52e059ebc061a2a8be
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2025-11-15 03:18:52 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-11-16 02:04:14 +0000

    bsdinstall: Don't install FreeBSD-base.conf
    
    When installing e.g. 15.0-RC1, we want to get files from the 15.0-RC1
    pkgbase repository; but running 'pkg upgrade' after installation should
    get the latest bits build from releng/15.0.
    
    With hat:       re
    MFC after:      8 hours (needed in 15.0-RC1)
    
    (cherry picked from commit bdfc223c7a64369ed133a179c40067435a9f2cb3)
---
 usr.sbin/bsdinstall/scripts/pkgbase.in | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in
index 744e0daac6f8..ddbf8eaf4f86 100755
--- a/usr.sbin/bsdinstall/scripts/pkgbase.in
+++ b/usr.sbin/bsdinstall/scripts/pkgbase.in
@@ -309,7 +309,7 @@ local function parse_options()
 end
 
 -- Fetch and install pkgbase packages to BSDINSTALL_CHROOT.
--- Respect BSDINSTALL_PKG_REPOS_DIR if set, otherwise use pkg.freebsd.org.
+-- Respect BSDINSTALL_PKG_REPOS_DIR if set, otherwise use pkgbase.freebsd.org.
 local function pkgbase()
 	local options = parse_options()
 
@@ -323,17 +323,9 @@ local function pkgbase()
 	local chroot = assert(os.getenv("BSDINSTALL_CHROOT"))
 	assert(os.execute("mkdir -p " .. chroot))
 
-	-- Always install the default FreeBSD-base.conf file to the chroot, even
-	-- if we don't actually fetch the packages from the repository specified
-	-- there (e.g. because we are performing an offline installation).
-	local chroot_repos_dir = chroot .. "/usr/local/etc/pkg/repos/"
-	assert(os.execute("mkdir -p " .. chroot_repos_dir))
-	assert(os.execute("cp /usr/share/bsdinstall/FreeBSD-base.conf " ..
-		chroot_repos_dir))
-
 	local repos_dir = os.getenv("BSDINSTALL_PKG_REPOS_DIR")
 	if not repos_dir then
-		repos_dir = chroot_repos_dir
+		repos_dir = "/usr/share/bsdinstall/"
 		-- 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"))