Mk/bsd.port.mk: Clarify UNAME_r failure.
An example of this happening is with recent Poudriere changes: - Poudriere <= 3.3 used to set UNAME_r in /etc/login.conf's environment during *jail creation*. - Poudriere >= 3.4 only sets it in the environment during *jail runtime*. Creating a jail with Poudriere 3.4 and then using Poudriere 3.3 on it would fail to have UNAME_r properly set. It would read OSVERSION from /usr/include/sys/param.h to find the installed files release. The ports framework, and builds, need `uname` to be correct for the *jail/chroot* and not be of the running kernel. Add a footshoot enabler while here which should not be used for any reason as it can create packages targetting the release of the running kernel rather than the chroot/jail's expected version.
This commit is contained in:
parent
497f7b9f16
commit
154492dd1f
1 changed files with 5 additions and 1 deletions
|
@ -1195,7 +1195,11 @@ _OSVERSION_MAJOR= ${OSVERSION:C/([0-9]?[0-9])([0-9][0-9])[0-9]{3}/\1/}
|
|||
# Skip if OSVERSION specified on cmdline for testing. Only works for bmake.
|
||||
.if !defined(.MAKEOVERRIDES) || !${.MAKEOVERRIDES:MOSVERSION}
|
||||
.if ${_OSVERSION_MAJOR} != ${_OSRELEASE:R}
|
||||
.error UNAME_r (${_OSRELEASE}) and OSVERSION (${OSVERSION}) do not agree on major version number.
|
||||
.if defined(I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE)
|
||||
WARNING+= "I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE set: Expect unexpected problems as the chroot/jail file versions do not match what `uname` returns. Thus buids will target the wrong release."
|
||||
.else
|
||||
.error UNAME_r (${_OSRELEASE}) and OSVERSION (${OSVERSION}) do not agree on major version number: This means your jail or chroot is misconfigured such that the installed files (OSVERION) do not match what `uname -r` (kernel) treturns. Likely setting UNAME_r will resolve the issue. OSVERSION should not be set as it will be read from /usr/include/sys/param.h.
|
||||
.endif
|
||||
.elif ${_OSVERSION_MAJOR} != ${OSREL:R}
|
||||
.error OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number.
|
||||
.endif
|
||||
|
|
Loading…
Reference in a new issue