git: 779b8a20e4d0 - stable/15 - release: Install pkg(8) from the release repo on bootonly
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 03 Oct 2025 16:53:44 UTC
The branch stable/15 has been updated by cperciva:
URL: https://cgit.FreeBSD.org/src/commit/?id=779b8a20e4d039433b5115773f664c6d56b1adf1
commit 779b8a20e4d039433b5115773f664c6d56b1adf1
Author: Lexi Winter <ivy@FreeBSD.org>
AuthorDate: 2025-10-02 11:45:09 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-10-03 16:50:11 +0000
release: Install pkg(8) from the release repo on bootonly
Although bootonly doesn't contain an offline package repository, we
still want pkg installed so the user can use it to repair an existing
system. Installing it from the release repository ensures it's always
available without depending on pkg.freebsd.org.
While here, fix a typo in PKGBASE_REPO_ARGS.
MFC after: 3 seconds
Reviewed by: cperciva
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D52848
(cherry picked from commit 3b9d89e1c90fd3b2667c07d5a0bfd300bf635bb3)
---
release/Makefile | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/release/Makefile b/release/Makefile
index 27a5d58c828d..169dc947c692 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -82,7 +82,7 @@ PKG_ENV+= ASSUME_ALWAYS_YES=yes
PKG_ARGS+= -o METALOG=METALOG
PKG_ARGS+= -r ${.TARGET}
PKG_REPO_ARGS= -o REPOS_DIR=${.CURDIR}/pkg_repos
-PKGBASE_REPO_ARGS=-o REPOS_DIR=${.OBJDIR}/pkgbase-repo-conf
+PKGBASE_REPO_ARGS=-o REPOS_DIR=${.OBJDIR}/pkgbase-repo-dir
# Pass -f to make sure pkg writes to the METALOG even if the package
# is already installed from a previous build
PKG_INSTALL= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} ${PKG_REPO_ARGS} install -f
@@ -277,7 +277,7 @@ disc1: ${PKGBASE_REPO_DIR}
echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
touch ${.TARGET}
-bootonly:
+bootonly: ${PKGBASE_REPO_DIR}
# Install system
mkdir -p ${.TARGET}
( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \
@@ -296,7 +296,12 @@ bootonly:
echo "./usr/freebsd-dist/MANIFEST type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
.endif
.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG))
- ${PKG_INSTALL} pkg || true
+.if !defined(NOPKGBASE) || empty(NOPKGBASE)
+ ${PKGBASE_INSTALL} pkg
+ ${PKGBASE_CLEAN}
+.else
+ ${PKG_INSTALL} pkg
+.endif
${PKG_INSTALL} wifi-firmware-iwlwifi-kmod wifi-firmware-rtw88-kmod || true
${PKG_CLEAN} || true
.endif