From owner-svn-src-projects@FreeBSD.ORG Mon Mar 3 15:41:30 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A536EC57; Mon, 3 Mar 2014 15:41:30 +0000 (UTC) Received: from mail0.glenbarber.us (mail0.glenbarber.us [208.86.227.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5E5FF6D4; Mon, 3 Mar 2014 15:41:30 +0000 (UTC) Received: from glenbarber.us (nucleus.glenbarber.us [IPv6:2001:470:8:1205:2:2:ff:100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 132E4983A; Mon, 3 Mar 2014 15:41:29 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 132E4983A Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Mon, 3 Mar 2014 10:41:27 -0500 From: Glen Barber To: John Baldwin Subject: Re: svn commit: r262660 - projects/release-embedded/release Message-ID: <20140303154127.GF1697@glenbarber.us> References: <201403011744.s21HifpG083123@svn.freebsd.org> <201403030912.06379.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8MD1ZCO3r6aZNHwn" Content-Disposition: inline In-Reply-To: <201403030912.06379.jhb@freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2014 15:41:30 -0000 --8MD1ZCO3r6aZNHwn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 03, 2014 at 09:12:06AM -0500, John Baldwin wrote: > On Saturday, March 01, 2014 12:44:41 pm Glen Barber wrote: > > Author: gjb > > Date: Sat Mar 1 17:44:40 2014 > > New Revision: 262660 > > URL: http://svnweb.freebsd.org/changeset/base/262660 > >=20 > > Log: > > If building i386/i386 on amd64/amd64, append TARGET=3Di386 and > > TARGET_ARCH=3Di386 to CHROOT_MAKEENV, ensuring the i386 build > > is done within a true i386 build environment. > > =20 > > Sponsored by: The FreeBSD Foundation > >=20 > > Modified: > > projects/release-embedded/release/release.sh > >=20 > > Modified: projects/release-embedded/release/release.sh > > =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 > > --- projects/release-embedded/release/release.sh Sat Mar 1 17:36:10 20= 14 (r262659) > > +++ projects/release-embedded/release/release.sh Sat Mar 1 17:44:40 20= 14 (r262660) > > @@ -147,6 +147,13 @@ else > > ARCH_FLAGS=3D > > fi > > CHROOT_MAKEENV=3D"MAKEOBJDIRPREFIX=3D${CHROOTDIR}/tmp/obj" > > +if [ ! -z ${TARGET} ] && [ ! -z ${TARGET_ARCH} ] && \ > > + [ ${TARGET} =3D "i386" ] && \ > > + [ ${TARGET_ARCH} =3D "i386" ] && \ > > + [ "$(sysctl -n hw.machine)" =3D "amd64" ] && \ > > + [ "$(sysctl -n hw.machine_arch)" =3D "amd64" ]; then > > + CHROOT_MAKEENV=3D"${CHROOT_MAKEENV} TARGET=3Di386 TARGET_ARCH=3Di386" > > +fi >=20 > You can remove the -z checks if you add some quotes: >=20 > if [ "$TARGET" =3D "i386" -a "$TARGET_ARCH" =3D "i386" ] >=20 > etc. >=20 Thanks, I'll fix it. > However, this seems a bit hackish to hardcode this only for i386. Wouldn= 't > this also apply to building powerpc on powerpc64? Or rather, does this m= ean > you don't trust cross-built releases? cross-built releases should work (= and > if they don't, they should be fixed) >=20 Yes, this would also apply to powerpc on powerpc64. I'm thinking of changing this to use kern.supported_archs, but have not yet had a chance to look if this has been merged to stable/10 or stable/9 yet. It isn't that I don't trust cross-built releases (in fact, all !x86 releases have been cross-built starting with 9.2-R). The idea here was really that because we can run the i386 binaries in the build chroot, it would be preferable to use i386 userland to build the i386 build. (The same can be said for powerpc on powerpc64.) The "problem" I'm really trying to solve with this is that I want to add the script that wrap around release.sh for the snapshot builds, but in order to do that, I needed to add special cases like this to eliminate any local patches to release.sh to provide truly reproducible builds. To be perfectly honest though, I really do not want to add this case for all possible combinations where it would work. Maybe it needs to go into the configuration file instead. Glen --8MD1ZCO3r6aZNHwn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJTFKKnAAoJELls3eqvi17Q468P/iGey+V3BpP13+TEb/ci2qPy jHiDH+FNNg3rwJzPl746FvY7iwX6lsgg0dxAuQDU9Ldwjxl58zqJdKfMU69o1Dvi 7g7PwXpi2p9KaQKoWveu7+gZ3CRpl/PbrLE0+dj0ePf/UTdYvHGDjkS75pNXTe4w 2mysGNhxvcGzeshpNv4rTUIKm+gstHef/WamQ+NQlOgp1H606Wl7crKBluvofASM 9wQAtnBPcB/ehxHnDBiJRG6hMs7N0UyJOhXJHQ3fbSC8auj+E78gsobeoOq4lgoN aQwV0bAVd3vIA0ZRRLyoH6gX7OJQCF8Yd1cyXtspTgyViY/fubkWnY2tX4d6yNie sIEW0gVWvByNqMwcj93YPBYTpO10gkqSBa0z7OclN4mK1Bd69aEeGTi7gNHH1Flo pxWSn39/DSS5Jpe+JYYZhWvxYqiQ1anJZV37YO6I+6ih6+GVae02uPBZcfU4buV8 BlisTYpugBoUrDlffBV4864JLlmvLNyko94tXswiRLCm8oqmATowXNxaZM/r1meh ZVarMbzEnOg6/09pmuBJnRfrQQjjzedg0Ma0egFi5VLPJ2HfQ+fc4AfXBInajSaB U7+wxTrllBkQ0K6IM3xA6BzVskKyYdhpUtG2qHcY5DvDMP86GPIBt3fwmFY97gL1 7pq+myXj7FO2zd8kUv38 =Xji8 -----END PGP SIGNATURE----- --8MD1ZCO3r6aZNHwn--