Sourceforge and SF

I try to port re-alpine.

I set
Code:
MASTER_SITES=  SF
but can't get it downloaded

A working link would be
http://sourceforge.net/projects/re-alpine/files/re-alpine-2.03.tar.bz2

so I set
Code:
MASTER_SITES=   http://sourceforge.net/projects/${PORTNAME}/files/
and I get
Code:
fetch: http://sourceforge.net/projects/re-alpine/files/re-alpine-2.03.tar.bz2: Moved Temporarily

while I can manually fetch this URL without a problem.

How to handle Sourceforge downloads?
 
Simple. What is happening here is that you're being re-directed to one of the mirrors which SourceForge is using. So the solution should be obvious: use one of those mirrors.

When I use wget to grab this file this is what I get to see:

Code:
--2013-11-06 18:52:35--  http://sourceforge.net/projects/re-alpine/files/re-alpine-2.03.tar.bz2
Resolving sourceforge.net (sourceforge.net)... 216.34.181.60
Connecting to sourceforge.net (sourceforge.net)|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://sourceforge.net/projects/re-alpine/files/re-alpine-2.03.tar.bz2/download [following]
--2013-11-06 18:52:35--  http://sourceforge.net/projects/re-alpine/files/re-alpine-2.03.tar.bz2/download
Connecting to sourceforge.net (sourceforge.net)|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://downloads.sourceforge.net/project/re-alpine/re-alpine-2.03.tar.bz2?r=&ts=1383760356&use_mirror=garr [following]
--2013-11-06 18:52:36--  http://downloads.sourceforge.net/project/re-alpine/re-alpine-2.03.tar.bz2?r=&ts=1383760356&use_mirror=garr
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.34.181.59Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://garr.dl.sourceforge.net/project/re-alpine/re-alpine-2.03.tar.bz2 [following]
--2013-11-06 18:52:36--  http://garr.dl.sourceforge.net/project/re-alpine/re-alpine-2.03.tar.bz2
Resolving garr.dl.sourceforge.net (garr.dl.sourceforge.net)... 193.206.140.34, 2001:760:ffff:b0::34
Connecting to garr.dl.sourceforge.net (garr.dl.sourceforge.net)|193.206.140.34|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5335178 (5.1M) [application/octet-stream]
Saving to: 're-alpine-2.03.tar.bz2.1'
As you can see it starts with looking up sourceforge.net then moves to downloads.sourceforge.net. Another interesting option is the URL parameter use_mirror which is set to garr. This is just a hunch on my part, but that tells me that the host is being instructed to re-direct you to a mirror site.

And you can see that happening in the end, because the file is initially picked up from garr.dl.sourceforge.net.

So one option could be to use:

Code:
$ wget http://garr.dl.sourceforge.net/project/re-alpine/re-alpine-2.03.tar.bz2

If you do so then you'll notice that it won't redirect you:

Code:
--2013-11-06 18:58:20--  http://garr.dl.sourceforge.net/project/re-alpine/re-alpine-2.03.tar.bz2
Resolving garr.dl.sourceforge.net (garr.dl.sourceforge.net)... 193.206.140.34, 2001:760:ffff:b0::34
Connecting to garr.dl.sourceforge.net (garr.dl.sourceforge.net)|193.206.140.34|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5335178 (5.1M) [application/octet-stream]
Saving to: 're-alpine-2.03.tar.bz2'
However, although this works I'd also advice you to check out the SourceForge website to see if there are any policies regarding the direct download of archives. If so it is strongly advisable to follow those.

SO, summing up; wget is your friend ;)
 
I don't know, but I doubt it. Why would you want to do that? Just use one of the mirrors to download this file and it'll work.
 
You should manually adjust the URL, add these lines into your Makefile:


Code:
PORTNAME=       re-alpine
PORTVERSION=    2.03
MASTER_SITES=   SF/re-alpine/

USE_BZIP2=      yes

.include <bsd.port.mk>

Please read /usr/ports/Mk/bsd.sites.mk for more information.
 
laufdi said:
Is there a ports option to use wget instead of fetch?

To set up ports to use wget(1) to download, you need to add the following lines in /etc/make.conf:
Code:
FETCH_CMD=wget
FETCH_BEFORE_ARGS=-nc --progress=bar --read-timeout=60
DISABLE_SIZE=yes

Also see this related thread which on it is explained how to setup www/aria2 for the same purpose.
 
Hi,

is there anything new on this topic? I was trying to just compile alpine 2.11 the other day and I'm facing some compile errors. I would really like to have it as an official port.

Cheers,
Stefan
 
Ports are mostly community driven. So unless someone takes the time and effort to port something it's not going to happen. If you look at the port's maintainer you'll see it's set to ports@freebsd.org which means there's really nobody responsible for it. Other ports have a proper maintainer. It's somebody that has taken it upon their selves to keep the port up to date and fix any issues. It's usually somebody that benefits from, or depends on, a correctly working port themselves.

That said, post the changes you made to the original port and the problems you ran into and perhaps somebody in the community can come up with a solution. If we get it working the PR can be updated with a few patches and port management will apply them.
 
Back
Top