aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLexi Winter <ivy@FreeBSD.org>2025-10-02 11:45:09 +0000
committerLexi Winter <ivy@FreeBSD.org>2025-10-02 11:46:26 +0000
commit3b9d89e1c90fd3b2667c07d5a0bfd300bf635bb3 (patch)
tree6e9b311a15433d5041b7d82bf996355ff94d842c
parent244a5188e7681bf8d98a49c78439df61e6816c93 (diff)
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
-rw-r--r--release/Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/release/Makefile b/release/Makefile
index 82617c1f4dd7..f907bf985893 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
@@ -278,7 +278,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 \
@@ -297,7 +297,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