In gmane.os.openbsd.misc, matecocido <fire...@gmail.com> wrote: > Hi! > > I wont play a midi file, to do this i follow > http://www.openbsd.org/faq/faq13.html#playaudio... > > I have OpenBSD 4.5 release. > > when i try to install TiMidity port, i have a trouble, in particular : > > - before download the source in many places i have: > "Size does not match for /usr/ports/distfiles/TiMidity++-2.13.2.tar.gz" > > - and in some places (openbsd official mirrors) this file don't exist. > > this is mi log: > > ********************************* >>> TiMidity++-2.13.2.tar.gz doesn't seem to exist on this system. >>> Fetch >>> http://easynews.dl.sourceforge.net/sourceforge/timidity/TiMidity++-2.13.2.tar.gz. > 100% |**************************************************| 1806 KB 00:32 >>> Size does not match for /usr/ports/distfiles/TiMidity++-2.13.2.tar.gz
This happens in -current too. It looks like sourceforge have reorganised things a bit and are now doing redirects for many (all?) downloads. The "Location" header for the redirect is URL-encoded; ftp(1) is using the new URL-encoded filename to save to, so + gets changed to %2B. So in this case the file is actually being saved correctly (I've checked; the checksum does match) but with an unexpected name, so the "cksum -c" done by bsd.port.mk fails. Here's a quick workaround so you can build this port: you can fetch this file into /usr/ports/distfiles yourself, giving it the expected name (TiMidity++-2.13.2.tar.gz), then you can build the port. About fixing it, I think ftp should just use the filename part of the URL from the command line and not adjust it when there's a redirect. I think allowing the remote server to change file name is downright dangerous; "Location: http://blah/.profile", anyone?). The diff below changes to this behaviour; I think this is what's actually described in the last paragraph of "AUTO-FETCHING FILES" in ftp(1) so I don't think the manual needs to be changed (but it probably does warrant a mention in current.html). Any comments/OKs? Index: fetch.c =================================================================== RCS file: /cvs/src/usr.bin/ftp/fetch.c,v retrieving revision 1.95 diff -u -p -r1.95 fetch.c --- fetch.c 6 Aug 2009 23:33:35 -0000 1.95 +++ fetch.c 22 Aug 2009 22:01:37 -0000 @@ -732,7 +732,7 @@ again: free(proxyurl); free(newline); free(cookie); - rval = url_get(cp, proxyenv, outfile); + rval = url_get(cp, proxyenv, savefile); free(buf); return (rval); }