From owner-freebsd-ports@FreeBSD.ORG Mon May 16 09:27:33 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0D38106566C for ; Mon, 16 May 2011 09:27:33 +0000 (UTC) (envelope-from roam@ringlet.net) Received: from praag.hoster.bg (praag.hoster.bg [77.77.142.10]) by mx1.freebsd.org (Postfix) with ESMTP id 28CA08FC13 for ; Mon, 16 May 2011 09:27:32 +0000 (UTC) Received: from middenheim.hoster.bg (middenheim.hoster.bg [77.77.142.11]) by praag.hoster.bg (Postfix) with ESMTP id 43D8894199 for ; Mon, 16 May 2011 12:00:34 +0300 (EEST) Received: from straylight.ringlet.net (unknown [95.111.66.80]) (Authenticated sender: roam@hoster.bg) by mail.hoster.bg (Postfix) with ESMTP id 3176E5C45B for ; Mon, 16 May 2011 12:00:18 +0300 (EEST) Received: from roam (uid 1000) (envelope-from roam@ringlet.net) id 4160b2 by straylight.ringlet.net (DragonFly Mail Agent) Mon, 16 May 2011 12:00:17 +0300 Date: Mon, 16 May 2011 12:00:17 +0300 From: Peter Pentchev To: David Demelier Message-ID: <20110516090017.GA3766@straylight.ringlet.net> Mail-Followup-To: David Demelier , freebsd-ports@freebsd.org References: <4DD0CC21.5050305@FreeBSD.org> <4DD0DCD3.4030906@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="AqsLC8rIMeq19msA" Content-Disposition: inline In-Reply-To: <4DD0DCD3.4030906@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-MailScanner-ID: 3176E5C45B.11EFE X-hoster-MailScanner: Found to be clean X-hoster-MailScanner-SpamCheck: not spam, SpamAssassin (cached, score=0.001, required 10, autolearn=disabled, UNPARSEABLE_RELAY 0.00) X-hoster-MailScanner-From: roam@ringlet.net X-hoster-MailScanner-To: freebsd-ports@freebsd.org X-Spam-Status: No Cc: freebsd-ports@freebsd.org Subject: Re: patch for force fetch X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2011 09:27:33 -0000 --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--