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)
This commit is contained in:
Colin Percival
2025-11-14 19:18:52 -08:00
parent 51184e38c9
commit bdfc223c7a
+2 -10
View File
@@ -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"))