git: 3b9d89e1c90f - main - release: Install pkg(8) from the release repo on bootonly
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 02 Oct 2025 11:46:38 UTC
The branch main has been updated by ivy:
URL: https://cgit.FreeBSD.org/src/commit/?id=3b9d89e1c90fd3b2667c07d5a0bfd300bf635bb3
commit 3b9d89e1c90fd3b2667c07d5a0bfd300bf635bb3
Author: Lexi Winter <ivy@FreeBSD.org>
AuthorDate: 2025-10-02 11:45:09 +0000
Commit: Lexi Winter <ivy@FreeBSD.org>
CommitDate: 2025-10-02 11:46:26 +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
---
release/Makefile | 11 ++++++++---
1 file 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