From owner-svn-ports-all@FreeBSD.ORG Tue Sep 30 21:50:04 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D64EE31; Tue, 30 Sep 2014 21:50:04 +0000 (UTC) Received: from nyi.unixathome.org (nyi.unixathome.org [64.147.113.42]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "nyi.unixathome.org", Issuer "StartCom Class 2 Primary Intermediate Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 69CC282B; Tue, 30 Sep 2014 21:50:04 +0000 (UTC) Received: from nyi.unixathome.org (localhost [127.0.0.1]) by nyi.unixathome.org (Postfix) with ESMTP id 097735084A; Tue, 30 Sep 2014 21:49:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at unixathome.org Received: from nyi.unixathome.org ([127.0.0.1]) by nyi.unixathome.org (nyi.unixathome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ic45dIG0AS3S; Tue, 30 Sep 2014 21:49:45 +0000 (UTC) Received: from smtp-auth.unixathome.org (smtp-auth.unixathome.org [10.4.7.7]) (Authenticated sender: hidden) by nyi.unixathome.org (Postfix) with ESMTPSA id AFBC850847 ; Tue, 30 Sep 2014 21:49:44 +0000 (UTC) Content-Type: multipart/signed; boundary="Apple-Mail=_2AC98CAC-1FF0-49A6-A936-DD1546938681"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r369644 - in head: . Mk From: Dan Langille In-Reply-To: <542AF3F6.1010502@FreeBSD.org> Date: Tue, 30 Sep 2014 17:49:44 -0400 Message-Id: References: <201409301622.s8UGM5lB082567@svn.freebsd.org> <542AF3F6.1010502@FreeBSD.org> To: Bryan Drewery X-Mailer: Apple Mail (2.1878.6) Cc: svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, dvl@FreeBSD.org, Colin Percival , ports-committers@freebsd.org X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 21:50:04 -0000 --Apple-Mail=_2AC98CAC-1FF0-49A6-A936-DD1546938681 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 FreshPorts is good to go. I have manually reprocessed all the commits = which failed sanity testing. On Sep 30, 2014, at 2:18 PM, Bryan Drewery wrote: > This broke portsnap INDEX and FreshPorts. Please update their > configuration. I've partially reverted for now. >=20 > Portsnap needs to decide which release it is using: >=20 > "/usr/ports/Mk/bsd.port.mk", line 1209: UNAME_r (10.0-RELEASE) and > OSVERSION (899999) do not agree on major version number. >=20 > FreshPorts needs OSVERSION defined for its env: >=20 > Error message is: "/usr/local/PORTS-head/Mk/bsd.port.mk", line 1201: > Unable to determine OS version. Either define OSVERSION, install > /usr/include/sys/param.h or define SRC_BASE. >=20 >=20 > On 9/30/2014 11:22 AM, Bryan Drewery wrote: >> Author: bdrewery >> Date: Tue Sep 30 16:22:05 2014 >> New Revision: 369644 >> URL: http://svnweb.freebsd.org/changeset/ports/369644 >> QAT: https://qat.redports.org/buildarchive/r369644/ >>=20 >> Log: >> If either of OSVERSION or UNAME_r is improperly set when building in = a >> jail/chroot, a number of unexpected errors can occur. >>=20 >> 1. autotools fixup may not run when needed. This could be avoided = by always >> running it [PR 177980, 177403]. >> 2. Not having UNAME_r set will cause many unknown >> errors. Many ports use OSREL (derived from UNAME_r) to = determine the name >> of files. This is usually also due to the port build itself = using uname -r >> to derive filenames or 'built for' messages. [PR 192449, = 191943] Without >> having these sanity checks it is very easy for users to get = into >> situations where "everything worked" until they touch a certain = port that >> reads uname(1) output or OSVERSION. It has always been = necessary to define >> all of the UNAME_ vars and OSVERSION (or have a proper = sys/param.h >> present), but many users do not know this. >>=20 >> Remove the fallback on the kernel for kern.osreldate as it easily = gets the >> answer wrong. >>=20 >> I have added sanity checks to ensure OSVERSION=3D=3DOSREL=3D=3DUNAME_r= as these are the >> most critical vars to have set properly. >>=20 >> Differential Revision: https://reviews.freebsd.org/D869 >> PR: 177980, 177403, 192449, 191943 >> Reviewed by: antoine, bapt, gjb >> With hat: portmgr >>=20 >> Modified: >> head/CHANGES >> head/Mk/bsd.port.mk >>=20 >> Modified: head/CHANGES >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/CHANGES Tue Sep 30 16:19:41 2014 (r369643) >> +++ head/CHANGES Tue Sep 30 16:22:05 2014 (r369644) >> @@ -10,6 +10,36 @@ in the release notes and/or placed into=20 >>=20 >> All ports committers are allowed to commit to this file. >>=20 >> +20140930: >> +AUTHOR: bdrewery@FreeBSD.org >> + >> + Building ports in a chroot or jail have always required a = particular >> + environment be setup. This was not clear though and the ports = framework >> + did not enforce it. These requirements are: >> + 1. Either a SRC_BASE/sys/sys/param.h, or = /usr/include/sys/param.h be >> + present with the __FreeBSD_version_ number of the target = system, >> + or OSVERSION be set in the environment. Lack of these would = fallback >> + on kern.osreldate before, which is no longer the case. >> + 2. UNAME_r,UNAME_v,UNAME_s all must be set for the target = system. >> + >> + Not having these values in sync will now cause the build to error = until it is >> + resolved. >> + >> + Setting these in the environment can be done via your own wrapper = scripts, >> + or /etc/login.conf (along with cap_mkdb /etc/login.conf) or >> + via /etc/make.conf using appropriate values. Note that OSVERSION = is redundant >> + if a proper param.h is in the environment: >> + >> + OSVERSION+=3D 1100036 >> + UNAME_ENV+=3D OSVERSION=3D${OSVERSION} >> + UNAME_ENV+=3D UNAME_s=3DFreeBSD >> + UNAME_ENV+=3D UNAME_r=3D11.0-CURRENT >> + UNAME_ENV+=3D UNAME_v=3D"${UNAME_s} ${UNAME_r}" >> + .MAKEFLAGS: ${UNAME_ENV} >> + MAKE_ENV+=3D ${UNAME_ENV} >> + CONFIGURE_ENV+=3D ${UNAME_ENV} >> + SCRIPTS_ENV+=3D ${UNAME_ENV} >> + >> 20140922: >> AUTHOR: bapt@FreeBSD.org >>=20 >>=20 >> Modified: head/Mk/bsd.port.mk >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/Mk/bsd.port.mk Tue Sep 30 16:19:41 2014 = (r369643) >> +++ head/Mk/bsd.port.mk Tue Sep 30 16:22:05 2014 = (r369644) >> @@ -1186,10 +1186,10 @@ ARCH!=3D ${UNAME} -p >> OPSYS!=3D ${UNAME} -s >> .endif >>=20 >> +UNAMER!=3D${UNAME} -r >> + >> # Get the operating system revision >> -.if !defined(OSREL) >> -OSREL!=3D ${UNAME} -r | ${SED} -e 's/[-(].*//' >> -.endif >> +OSREL?=3D ${UNAMER:C/-.*//} >>=20 >> # Get __FreeBSD_version >> .if !defined(OSVERSION) >> @@ -1198,10 +1198,19 @@ OSVERSION!=3D ${AWK} = '/^\#define[[:blank:] >> .elif exists(${SRC_BASE}/sys/sys/param.h) >> OSVERSION!=3D ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ = {print $$3}' < ${SRC_BASE}/sys/sys/param.h >> .else >> -OSVERSION!=3D ${SYSCTL} -n kern.osreldate >> +.error Unable to determine OS version. Either define OSVERSION, = install /usr/include/sys/param.h or define SRC_BASE. >> .endif >> .endif >>=20 >> +# Convert OSVERSION to major release number >> +_OSVERSION_MAJOR=3D = ${OSVERSION:C/([0-9]?[0-9])([0-9][0-9])[0-9]{3}/\1/} >> +# Sanity checks for chroot/jail building. >> +.if ${_OSVERSION_MAJOR} !=3D ${UNAMER:R} >> +.error UNAME_r (${UNAMER}) and OSVERSION (${OSVERSION}) do not agree = on major version number. >> +.elif ${_OSVERSION_MAJOR} !=3D ${OSREL:R} >> +.error OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on = major version number. >> +.endif >> + >> # Enable new xorg for FreeBSD versions after Radeon KMS was imported = unless >> # WITHOUT_NEW_XORG is set. >> .if (${OSVERSION} >=3D 902510 && ${OSVERSION} < 1000000) || = ${OSVERSION} >=3D 1000704 >>=20 >=20 >=20 > --=20 > Regards, > Bryan Drewery >=20 =97=20 Dan Langille --Apple-Mail=_2AC98CAC-1FF0-49A6-A936-DD1546938681 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iKYEARECAGYFAlQrJXhfFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3Bl bnBncC5maWZ0aGhvcnNlbWFuLm5ldDA3REZBQjJGRUQ3NEE5QkE0NTNGOUJCNzBB MEIxNzE0Q0ZGQjlEM0MACgkQCgsXFM/7nTxjOQCeJKOuOMscR259nyCVwNIErDMz 94sAoIe2Fo9R08B2SPVs3sdKsF80Kf8n =AKSD -----END PGP SIGNATURE----- --Apple-Mail=_2AC98CAC-1FF0-49A6-A936-DD1546938681--