diff options
| author | Ed Maste <emaste@FreeBSD.org> | 2024-12-11 13:50:55 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2025-10-01 18:07:55 +0000 |
| commit | 300aa267efaa08564337797e89590737a7cc6af0 (patch) | |
| tree | c42c09c45060bd51b4ac6a2347f3aab62acab34c | |
| parent | ebb60d47a5350e5d752b97cba8b3b0c3be8aa1eb (diff) | |
Makefile.inc1: Force NO_ROOT for distribute* and package*
These targets are used to produce legacy dist sets for install media and
now always use NO_ROOT mode. Extend existing logic that forces NO_ROOT
mode to these cases to ensure they do not run in the wrong mode.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50551
| -rw-r--r-- | Makefile.inc1 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index 92570d1d2fb9..dfd31456ad5a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -198,13 +198,18 @@ _GCC_BROKEN=boot code linker script issues. .endif .if ${.MAKE.OS} != "FreeBSD" -CROSSBUILD_HOST=${.MAKE.OS} +CROSSBUILD_HOST=${.MAKE.OS} # Unset for native FreeBSD builds .if ${.MAKE.OS} != "Linux" && ${.MAKE.OS} != "Darwin" .warning Unsupported crossbuild system: ${.MAKE.OS}. Build will probably fail! .endif +.endif # We need to force NO_ROOT/DB_FROM_SRC builds when building on other operating # systems since the BSD.foo.dist specs contain users and groups that do not -# exist by default on a Linux/MacOS system. +# exist by default on a Linux/MacOS system. The distribute* and package* +# targets used for install media legacy distribution sets also always use and +# require NO_ROOT mode. +.if defined(CROSSBUILD_HOST) || make(distributeworld) || make(packageworld) || \ + make(distributekernel) || make(packagekernel) NO_ROOT:= 1 DB_FROM_SRC:= 1 .export NO_ROOT |
