mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
- Refuse (overridable) to build ports on unsupported system version
Unfortunately, it's not uncommon for FreeBSD users to not update their systems timely and thus end up using unsupported FreeBSD release. These users continue to update ports tree as usual and expect it to work, either unaware of the release EoL, or not clearly understanding the consequences, which results in unexpected build failures, bogus bug reports, attempts to bring back removed legacy support bits and general discontent. This change introduces system version check which makes ports refuse to build anything on unsupported system. This makes users aware of EoL of their system and makes it clear that no port is guaranteed to build. The error message tells how to override the check (by defining ALLOW_UNSUPPORTED_SYSTEM, in which case it's turned into a simple warning), additionally stressing that this configurartion is not supported. Currently outdated are OSVERSION < 1003000 (pre 10.3-RELEASE) and 1100000 <= OSVERSION < 1100122 (from 11-CURRENT'2013 to 11.0-PRERELEASE) I expect these to be kept up to date with base system lifetimes, be updated BEFORE removing any support for outdated release from the tree and also serve as a reference of which OSVERSION checks may be removed. Approved by: portmgr (swills, mat) Differential Revision: D9210
This commit is contained in:
parent
6733a64703
commit
2357d7357b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=431746
2 changed files with 30 additions and 1 deletions
|
@ -1144,6 +1144,24 @@ OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC
|
|||
.endif
|
||||
_EXPORTED_VARS+= OSVERSION
|
||||
|
||||
.if (${OPSYS} == FreeBSD && (${OSVERSION} < 1003000 || (${OSVERSION} >= 1100000 && ${OSVERSION} < 1100122))) || \
|
||||
(${OPSYS} == DragonFly && ${DFLYVERSION} < 400400)
|
||||
_UNSUPPORTED_SYSTEM_MESSAGE= Ports Collection support for your ${OPSYS} version has ended, and no ports\
|
||||
are guaranteed to build on this system. Please upgrade to a supported release.
|
||||
. if defined(ALLOW_UNSUPPORTED_SYSTEM)
|
||||
WARNING+= "${_UNSUPPORTED_SYSTEM_MESSAGE}"
|
||||
. else
|
||||
show-unsupported-system-error:
|
||||
@${ECHO_MSG} "/!\\ ERROR: /!\\"
|
||||
@${ECHO_MSG}
|
||||
@${ECHO_MSG} "${_UNSUPPORTED_SYSTEM_MESSAGE}" | ${FMT} 75 79
|
||||
@${ECHO_MSG}
|
||||
@${ECHO_MSG} "No support will be provided if you silence this message by defining ALLOW_UNSUPPORTED_SYSTEM." | ${FMT} 75 79
|
||||
@${ECHO_MSG}
|
||||
@${FALSE}
|
||||
. endif
|
||||
.endif
|
||||
|
||||
# Convert OSVERSION to major release number
|
||||
_OSVERSION_MAJOR= ${OSVERSION:C/([0-9]?[0-9])([0-9][0-9])[0-9]{3}/\1/}
|
||||
# Sanity checks for chroot/jail building.
|
||||
|
@ -5168,7 +5186,8 @@ _TARGETS_STAGES= SANITY PKG FETCH EXTRACT PATCH CONFIGURE BUILD INSTALL TEST PAC
|
|||
# If you change the pre-foo and post-foo values here, go and keep them in sync
|
||||
# in _OPTIONS_TARGETS in bsd.options.mk
|
||||
|
||||
_SANITY_SEQ= 050:post-chroot 100:pre-everything 150:check-makefile \
|
||||
_SANITY_SEQ= 050:post-chroot 100:pre-everything \
|
||||
125:show-unsupported-system-error 150:check-makefile \
|
||||
200:show-warnings 210:show-dev-warnings 220:show-dev-errors \
|
||||
250:check-categories 300:check-makevars \
|
||||
350:check-desktop-entries 400:check-depends \
|
||||
|
|
10
UPDATING
10
UPDATING
|
@ -5,6 +5,16 @@ they are unavoidable.
|
|||
You should get into the habit of checking this file for changes each time
|
||||
you update your ports collection, before attempting any port upgrades.
|
||||
|
||||
20170117:
|
||||
AFFECTS: users of EoL'ed FreeBSD versions (<10.3, 11 prior to 11.0)
|
||||
AUTHOR: amdmi3@FreeBSD.org
|
||||
|
||||
The ports system will now refuse to build anything if it's run on
|
||||
outdated system version. This protects users from unexpected build
|
||||
failures after code to support EoL'ed systems is removed from the
|
||||
tree. You may define ALLOW_UNSUPPORTED_SYSTEM to override this and
|
||||
allow builds, but no support will be provided in case of failures.
|
||||
|
||||
20170116:
|
||||
AFFECTS: users of java/wildfly10
|
||||
AUTHOR: olgeni@FreeBSD.org
|
||||
|
|
Loading…
Add table
Reference in a new issue