Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sourceforge download links unreliable #59

Closed
trws opened this issue Jun 10, 2015 · 3 comments
Closed

Sourceforge download links unreliable #59

trws opened this issue Jun 10, 2015 · 3 comments

Comments

@trws
Copy link
Contributor

trws commented Jun 10, 2015

A number of packages, I noticed tmux but there are others, have sourceforge links of the form:

http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.9/tmux-1.9a.tar.gz

These used to work as download links with redirect handling, but now a timestamp appears to be required. This new form appears to work (on wget from a shell):

http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.9/tmux-1.9a.tar.gz?ts=$(date +%s)&use_mirror=autoselect

Not sure what the best way to address this is, but a url-handler for sourceforge might be in order.

@tgamblin
Copy link
Member

@scogland: there are some packages that use other source forge urls -- ones that end in /download. Did you look at those? For example, for tmux, you can navigate to here:

http://sourceforge.net/projects/tmux/files/tmux/tmux-1.9/

And you can copy a link that looks like this:

http://sourceforge.net/projects/tmux/files/tmux/tmux-1.9/tmux-1.9a.tar.gz/download

I think that URL will work with Spack and is also stable (and doesn't need their URL annotation crap). Can you see if this fixes things? I am hesitant to include a change for something that tacks weird parameters onto the end of URLs.

I wish there was some crowdsourced place I could go to pay for projects I like to get off of source forge...

@trws
Copy link
Contributor Author

trws commented Jun 18, 2015

Unfortunately, that's the problem. That used to work. Now I get an
html file named "download" or "download.html" depending on whether you
use curl -O or wget respectively. Does it still work for you?

Using the same URL in a browser or elinks will follow the delayed
redirect and get the actual file, but I don't know a way to get one of
the basic download programs to handle it. I have some python code
somewhere for invoking an external V8 javascript interpreter to follow
this kind of redirect, but that's a lot heavier and a lot more
invasive...

On 18 Jun 2015, at 0:43, Todd Gamblin wrote:

@scogland: there are some packages that use other source forge urls --
ones that end in /download. Did you look at those? For example, for
tmux, you can navigate to here:

http://sourceforge.net/projects/tmux/files/tmux/tmux-1.9/

And you can copy a link that looks like this:

http://sourceforge.net/projects/tmux/files/tmux/tmux-1.9/tmux-1.9a.tar.gz/download

I think that URL will work with Spack and is also stable (and doesn't
need their URL annotation crap). Can you see if this fixes things? I
am hesitant to include a change for something that tacks weird
parameters onto the end of URLs.

I wish there was some crowdsourced place I could go to pay for
projects I like to get off of source forge...


Reply to this email directly or view it on GitHub:
#59 (comment)

@trws
Copy link
Contributor Author

trws commented Jun 18, 2015

Closing, this is a configuration issue that needs a completely different solution. For anyone that finds this by searching, check to make sure your ~/.curlrc is not setting the user agent, it causes sourceforge to indirect out the direct-download link and inject adds.

@trws trws closed this as completed Jun 18, 2015
matz-e pushed a commit to matz-e/spack that referenced this issue Sep 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants