Date: Tue, 17 Jan 2017 15:49:16 +0000 (UTC) From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r431746 - in head: . Mk Message-ID: <201701171549.v0HFnG0N014933@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: amdmi3 Date: Tue Jan 17 15:49:16 2017 New Revision: 431746 URL: https://svnweb.freebsd.org/changeset/ports/431746 Log: - 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 Modified: head/Mk/bsd.port.mk head/UPDATING Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Tue Jan 17 14:59:45 2017 (r431745) +++ head/Mk/bsd.port.mk Tue Jan 17 15:49:16 2017 (r431746) @@ -1144,6 +1144,24 @@ OSVERSION!= ${AWK} '/^\#define[[:blank:] .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 EXTRAC # 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 \ Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Jan 17 14:59:45 2017 (r431745) +++ head/UPDATING Tue Jan 17 15:49:16 2017 (r431746) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701171549.v0HFnG0N014933>