diff options
| author | Colin Percival <cperciva@FreeBSD.org> | 2025-09-19 16:46:21 +0000 |
|---|---|---|
| committer | Colin Percival <cperciva@FreeBSD.org> | 2025-09-19 17:07:33 +0000 |
| commit | e87b75a8bfc8fb7fda8225e55255d9ad99cdefb2 (patch) | |
| tree | fd40a3a6549f8c2e4dd85f1d8836942866a0b165 | |
| parent | b3468202994f6856c5c49f3365e05f4f8017d680 (diff) | |
pkgbootstrap: Gate building from ports
In release builds we want to build pkg from the ports tree for reasons
mentioned in a previous commit; but non-release pkgbase builds may be
just fine with installing pkg from pkg.freebsd.org.
Gate it behind BOOTSTRAP_PKG_FROM_PORTS rather than building form ports
any time we have a ports tree available.
While I'm here, make the pkgbase-repo target in release/Makefile
create the temporary directories we need for building.
Reviewed by: ivy
MFC after: 6 hours
Sponsored by: https://www.patreon.com/cperciva
Fixes: 2c06b824436d ("pkgbootstrap: Build pkg if PORTSDIR exists")
| -rw-r--r-- | Makefile.inc1 | 2 | ||||
| -rw-r--r-- | release/Makefile | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index 65149beb9eb6..6744a25965c6 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1992,7 +1992,7 @@ PKG_ABI!= ${PKG_CMD} -o ABI_FILE=${PKG_ABI_FILE} config ABI _pkgbootstrap: .PHONY .if make(*package*) && !exists(${LOCALBASE}/sbin/pkg) -.if exists(${PORTSDIR}/ports-mgmt/pkg/Makefile) +.if defined(BOOTSTRAP_PKG_FROM_PORTS) env - UNAME_r=${UNAME_r} PATH=$$PATH \ make -C ${PORTSDIR}/ports-mgmt/pkg \ I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=1 \ diff --git a/release/Makefile b/release/Makefile index 40eea0e24a70..b4da9c68eca1 100644 --- a/release/Makefile +++ b/release/Makefile @@ -195,8 +195,9 @@ PKG_ABI= $$(${PKG_CMD} -o ABI_FILE=${.TARGET}/usr/bin/uname config ABI) pkgbase-repo: mkdir -p pkgbase-repo + mkdir -p /tmp/ports /tmp/distfiles ( ${IMAKE} -C ${WORLDDIR} packages REPODIR=${.OBJDIR}/pkgbase-repo \ - INCLUDE_PKG_IN_PKGBASE_REPO=YES ) + INCLUDE_PKG_IN_PKGBASE_REPO=YES BOOTSTRAP_PKG_FROM_PORTS=YES ) disc1: ${PKGBASE_REPO} # Install system |
