#288 Download does not cope with HTTP redirects
Closed: Invalid Opened by daniels.

SSIA, fedpkg does not follow HTTP redirects. I'm assuming whatever tools Fedora developers and the distribution build infrastructure uses does respect redirects, otherwise the package could never have been built.

Is there another tool I should be using instead of fedpkg? I want to get the source for packages currently in Fedora, modify them (in my case, patch isync), install them locally, and in some cases also make them available via a COPR.

~/src/misc/fedora-isync f29 * % curl -v http://downloads.sourceforge.net/isync/isync-1.3.0.tar.gz
*   Trying 216.105.38.13...
* TCP_NODELAY set
* Connected to downloads.sourceforge.net (216.105.38.13) port 80 (#0)
> GET /isync/isync-1.3.0.tar.gz HTTP/1.1
> Host: downloads.sourceforge.net
> User-Agent: curl/7.61.1
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
< Server: nginx/1.13.12
< Date: Mon, 08 Oct 2018 10:48:23 GMT
< Content-Type: text/html; charset=UTF-8
< Content-Length: 366
< Connection: keep-alive
< Location: http://downloads.sourceforge.net/project/isync/isync/1.3.0/isync-1.3.0.tar.gz
< 
<html>
 <head>
  <title>301 Moved Permanently</title>
 </head>
 <body>
  <h1>301 Moved Permanently</h1>
  The resource has been moved to <a href="http://downloads.sourceforge.net/project/isync/isync/1.3.0/isync-1.3.0.tar.gz">http://downloads.sourceforge.net/project/isync/isync/1.3.0/isync-1.3.0.tar.gz</a>;
you should be redirected automatically.
 </body>
* Connection #0 to host downloads.sourceforge.net left intact
</html>% 
~/src/misc/fedora-isync f29 * % fedpkg local
Deprecation warning: kojiconfig is deprecated. Instead, kojiprofile should be used.
Format argument module is deprecated in gitbaseurl. Please use "repo" instead.
Format argument module is deprecated in anongiturl. Please use "repo" instead.
Format argument module is deprecated in clone config. Please use "ns_repo" instead.
Downloading isync-1.3.0.tar.gz
######################################################################## 100.0%
Remove downloaded invalid file /home/daniels/src/misc/fedora-isync/isync-1.3.0.tar.gz
Could not execute local: Server returned status code 302
[1]    23397 exit 1     fedpkg local

This is quite possibly the same problem as #287. If you run fedpkg -v -d sources, it will print the URL it's downloading from. It should be https://src.fedoraproject.org/repo/pkgs/rpms/isync/isync-1.3.0.tar.gz/sha512/b5186f2afe97cab58ce55d3ec19ae7371676ae614448614a9e3e02d09662c34b74e559f0926661fa0300ab22dab9e2e9089b78ee38b94141ff3f8b4d75578ffa/isync-1.3.0.tar.gz. There should be no redirects.

Please note that fedpkg sources is downloading only from dist-git lookaside cache. If you want to download the sources from upstream, consider using spectool.

If this is still happening even with up-to-date configuration, please reopen this ticket and add output of fedpkg -v -d sources.

Metadata Update from @lsedlar:
- Issue close_status updated to: Invalid
- Issue status updated to: Closed (was: Open)

Metadata