Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2011 12:00:17 +0300
From:      Peter Pentchev <roam@ringlet.net>
To:        David Demelier <demelier.david@gmail.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: patch for force fetch
Message-ID:  <20110516090017.GA3766@straylight.ringlet.net>
In-Reply-To: <4DD0DCD3.4030906@gmail.com>
References:  <4DD0CC21.5050305@FreeBSD.org> <4DD0DCD3.4030906@gmail.com>

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

--AqsLC8rIMeq19msA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, May 16, 2011 at 10:14:11AM +0200, David Demelier wrote:
> On 16/05/2011 09:02, Andriy Gapon wrote:
> >
> >I've noticed the following problem.
> >If a distfile is updated by a distributor without renaming it (so that c=
hecksum
> >and possibly size change), then more often than not the port build syste=
m would
> >fail to fetch the distfile.
> >An example:
> >...
> >  =3D>  SHA256 Checksum mismatch for eclipse/javax.servlet.jsp_2.0.0.v20=
0806031607.jar.
> >...
> >=3D>  javax.servlet.jsp_2.0.0.v200806031607.jar doesn't seem to exist in
> >/usr/ports/distfiles/eclipse.
> >=3D>  Attempting to fetch
> >http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/=
bundles/javax.servlet.jsp_2.0.0.v200806031607.jar
> >fetch:
> >http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/=
bundles/javax.servlet.jsp_2.0.0.v200806031607.jar:
> >Requested Range Not Satisfiable
> >=3D>  Attempting to fetch
> >ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/eclipse/javax.servlet.=
jsp_2.0.0.v200806031607.jar
> >fetch:
> >ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/eclipse/javax.servlet.=
jsp_2.0.0.v200806031607.jar:
> >size mismatch: expected 63889, actual 62707
> >=3D>  Couldn't fetch it - please try to retrieve this
> >=3D>  port manually into /usr/ports/distfiles/eclipse and try again.
> >*** Error code 1
> >
> >I think that this happens because the old version of the distfile is sti=
ll
> >present in download target location and fetch(1) thinks that it has a pa=
rtially
> >downloaded file and tries to be smart.
[snip simple patch]
>=20
> make -DNO_CHECKSUM=3Dyes ... is probably what you want, I guess.

I think that Andriy is referring to the following case which has bit me,
too, more than once:

1. Upstream releases a new version.
2. The port is updated to the new version.
3. The user fetches the new version, builds and installs the port.
4. Upstream makes a change without bumping the version.
5. The port maintainer curses a bit and updates the port, possibly
   bumping PORTREVISION if upstream changed something important
6. The user tries to fetch the new version of the upstream tarball
   and stumbles into fetch(1)'s outright refusal :)

In this case, NO_CHECKSUM would be quite... counterproductive, in case
the user really cares about security and integrity :)

G'luck,
Peter

--=20
Peter Pentchev	roam@ringlet.net roam@FreeBSD.org peter@packetscale.com
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
Nostalgia ain't what it used to be.

--AqsLC8rIMeq19msA
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJN0OeOAAoJEGUe77AlJ98TIiMQAI3KzPF77vlCv/Sofsmtu8WN
nbEZKFAX0m9cEnBpCJ65/amROVCNb2uSnV15dbDMYTCifAm/qL6oeU0D5B06CK+V
YWolxXIJtLQIy4jyNLQEyRVHKC3wCcbfMKcwJ9k7LAHzRfYcHfWDSC8z1AyLwIL9
sIGWZ+LY/VGuw64SAnoaQXa/AHmpjZJXzM1IKZIyma85klHiAdzECPAWmyQSygMH
+wkfdIrtf8LTDinKDBbKH6+fuR2v9GKg0sAoURTVcnp6muFYyFNrxAkzf7QEXHkx
C7zA1wK15tr8q4H+vuGfhDPFTTeHslfB5Laca6S4sEo+oJN6qb6TKhFhEDUWH0Yv
EK4FBXKCvFyiy4Vjgr4pNpDsXmxaiVHwlayhIuipObJvA4ebAKFCMI3Hi2ZK9REa
+rb2kaMLUQXK3RZq97TD/xPEDluaeEfnhrF9fxSi2MwTvHylTjtXQRnt81lq5NNL
5Tqx602Ni7VtCGtZ+5cP6jM9FoUWhmQGY4uKpc4NTrWDfqJxQCgZEESpvisygTjS
49sUcZgvzbTDKH2y3d5cMhIKHiBJUm3A/1dtNiJLMjcyRSRjPya9QNdyajDSoxpU
30gzvUVguirrCRVZpvh/J7W8PDjOl2m0QXATV9mqqb1BPMIdPGRNwKbjZZI3cUX8
Qgd4tubE9IRkRVVPs1Oz
=lwhH
-----END PGP SIGNATURE-----

--AqsLC8rIMeq19msA--



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