Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jan 2006 07:18:41 +0100
From:      Jean-Yves Lefort <jylefort@FreeBSD.org>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        ports@freebsd.org, Alexander@Leidinger.net, mezz@freebsd.org, ru@freebsd.org, kris@obsecurity.org
Subject:   Re: Flaw in print/acroread7 (was: Re: [ru@FreeBSD.org: [patch] mixed i386/amd64 ports semi-broken])
Message-ID:  <20060130071841.4aed92a2.jylefort@FreeBSD.org>
In-Reply-To: <20060130055838.GA24139@xor.obsecurity.org>
References:  <20060129185239.GC83362@ip.net.ua> <20060129221019.1c0a5d10@Magellan.Leidinger.net> <20060130040847.2ee8891f.jylefort@FreeBSD.org> <20060130031719.GA22430@xor.obsecurity.org> <20060130050239.485d2547.jylefort@FreeBSD.org> <20060130055838.GA24139@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Mon__30_Jan_2006_07_18_41_+0100_02Flv6NDseJo8gRu
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, 30 Jan 2006 00:58:39 -0500
Kris Kennaway <kris@obsecurity.org> wrote:

> On Mon, Jan 30, 2006 at 05:02:39AM +0100, Jean-Yves Lefort wrote:
> > On Sun, 29 Jan 2006 22:17:19 -0500
> > Kris Kennaway <kris@obsecurity.org> wrote:
> >=20
> > > On Mon, Jan 30, 2006 at 04:08:47AM +0100, Jean-Yves Lefort wrote:
> > > > On Sun, 29 Jan 2006 22:10:19 +0100
> > > > Alexander Leidinger <Alexander@Leidinger.net> wrote:
> > > >=20
> > > > > On Sun, 29 Jan 2006 20:52:40 +0200
> > > > > Ruslan Ermilov <ru@freebsd.org> wrote:
> > > > >=20
> > > > > > I hit this problem attempting to install print/acroread7 on amd=
64.
> > > > > > It depends on emulators/linux_base-8, which rewrites ${ARCH} fr=
om
> > > > > > "amd64" to "i386".  Unfortunately, when linux_base-8 is process=
ed
> > > > > > in a submake, e.g., when I run "make fetch-recursive" in
> > > > > > print/acroread7, no rewrite of ${ARCH} actually happens because
> > > > > > bsd.port.mk mistakenly thinks that ${ARCH} can never change, so
> > > > > > it's getting passed ARCH already set to "amd64", and as a highe=
st
> > > > > > priority command-line type make(1) variable.  This results in
> > > > > > ${MD5_FILE} improperly set to distinfo.amd64 which doesn't exis=
t.
> > > > > > Here's a fix:
> > > > > >=20
> > > > > > %%%
> > > > > > Index: bsd.port.mk
> > > > >=20
> > > > > For this particular problem: acroread7 should set ARCH like every=
 other
> > > > > linux port does (better: every other tested linux port should do)=
 to
> > > > > i386. But there are more flaws in Trevor's ports and I decided to=
 let
> > > > > other people "handle" it (e.g. mezz has some patches for acroread7
> > > > > which would let the port behave more to the rules of the porters
> > > > > handbook).
> > > >=20
> > > > Any reason to not consider (cluster test) Ruslan's solution?
> > >=20
> > > Before I put it on the cluster I'd want reasonable evidence that the
> > > patch isn't going to break more ports than it fixes (which seems
> > > likely to me).
> >=20
> > # Get the architecture
> > .if !defined(ARCH)
> > ARCH!=3D  ${UNAME} -p
> > .endif
>=20
> I don't see your point.  The line Ruslan is removing clearly must do
> something, otherwise it can't "fix" the affected ports.  If it does
> something, it needs to be shown that it doesn't do something bad.

The line Ruslan is removing is a performance improvement; its purpose
is to remove the need to execute uname -p in submakes. But since it
passes ARCH as a make argument, it breaks things such as:

.if (${ARCH} =3D=3D "amd64")
ARCH=3D           i386
RPMFLAGS+=3D      --ignorearch
.endif

because the ARCH=3Di386 assignment is overriden by the ARCH passed on
the submake command line. Removing ARCH from .MAKEFLAGS should fix the
issue without breaking ports.

--=20
Jean-Yves Lefort

jylefort@FreeBSD.org
http://lefort.be.eu.org/

--Signature=_Mon__30_Jan_2006_07_18_41_+0100_02Flv6NDseJo8gRu
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFD3a/ByzD7UaO4AGoRAqxoAJ0bx95h0fOzqktelG7diVSVlk1P8ACfdbLk
ZherD3NtyLiq/gd1G3vO+mE=
=dqoI
-----END PGP SIGNATURE-----

--Signature=_Mon__30_Jan_2006_07_18_41_+0100_02Flv6NDseJo8gRu--



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