Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Mar 2014 10:41:27 -0500
From:      Glen Barber <gjb@FreeBSD.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        svn-src-projects@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r262660 - projects/release-embedded/release
Message-ID:  <20140303154127.GF1697@glenbarber.us>
In-Reply-To: <201403030912.06379.jhb@freebsd.org>
References:  <201403011744.s21HifpG083123@svn.freebsd.org> <201403030912.06379.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140303154127.GF1697>