Date: Wed, 8 Oct 2025 03:54:24 GMT From: Lexi Winter <ivy@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f7dc7d7af368 - main - Makefile: Force DISTDIR=/ for (update-)packages Message-ID: <202510080354.5983sORs078614@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=f7dc7d7af3683836fcca68018a678b242d2e2620 commit f7dc7d7af3683836fcca68018a678b242d2e2620 Author: Lexi Winter <ivy@FreeBSD.org> AuthorDate: 2025-10-08 03:22:32 +0000 Commit: Lexi Winter <ivy@FreeBSD.org> CommitDate: 2025-10-08 03:22:32 +0000 Makefile: Force DISTDIR=/ for (update-)packages The make(1) variable DISTDIR is used by both ports and src with a different meaning. Some users may set DISTDIR in /etc/make.conf for ports, which previously worked fine when building src since the src targets which used this variable were not very commonly used (mainly, make distributeworld). Unfortunately, with pkgbase becoming the default, this is no longer true since make (update-)packages invokes make stageworld, which is sensitive to DISTDIR, and these users find that their build now fails. A correct fix for this probably requires renaming one or both of the DISTDIR variables, but for now, work around the problem by setting DISTDIR=/ for the user-facing pkgbase targets, packages and update-package. Since setting DISTDIR doesn't work for these targets anyway, this should not break any existing configurations. MFC after: 1 week PR: 290010 Reported by: Oleh Vinichenko <moonlapse81@gmail.com> Reviewed by: imp, bapt Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52929 --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 664f31a48abf..5f27f22d7a3f 100644 --- a/Makefile +++ b/Makefile @@ -175,7 +175,7 @@ TGTS= all all-man buildenv buildenvvars buildetc buildkernel buildworld \ create-packages-world create-packages-kernel \ create-packages-kernel-repo create-packages-world-repo \ create-packages-source create-packages \ - update-packages packages installconfig real-packages real-update-packages \ + installconfig real-packages real-update-packages \ sign-packages package-pkg print-dir test-system-compiler test-system-linker \ test-includes @@ -521,6 +521,9 @@ kernels: .PHONY worlds: .PHONY @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=buildworld universe +packages update-packages: .PHONY + ${_+_}@cd ${.CURDIR}; ${_MAKE} DISTDIR=/ ${.TARGET} + # # universe #
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202510080354.5983sORs078614>