curl -J breaks build
Installing Alien::xz (cpanm) used to work a couple of weeks ago.
Now it fails on the following make target:
bash-4.4# make _alien/mm/download
"/usr/bin/perl" -MAlien::Build::MM=cmd -e download
Alien::Build::Plugin::PkgConfig::Negotiate> Using PkgConfig plugin: PkgConfig::CommandLine
Alien::Build::Plugin::Fetch::CurlCommand> writeout: ab-filename :%{filename_effective}\n
Alien::Build::Plugin::Fetch::CurlCommand> writeout: ab-content_type :%{content_type}\n
Alien::Build::Plugin::Fetch::CurlCommand> writeout: ab-url :%{url_effective}\n
Alien::Build::Plugin::Fetch::CurlCommand> + /usr/bin/curl -L -f -O -J -w @writeout https://tukaani.org/xz/
Alien::Build::Plugin::Fetch::CurlCommand> % Total % Received % Xferd Average Speed Time Time Time Current
Alien::Build::Plugin::Fetch::CurlCommand> Dload Upload Total Spent Left Speed
100 204 100 204 0 0 584 0 --:--:-- --:--:-- --:--:-- 584
Alien::Build::Plugin::Fetch::CurlCommand> Warning: Remote filename has no length!
100 2748 100 2748 0 0 6346 0 --:--:-- --:--:-- --:--:-- 6346
Alien::Build::Plugin::Fetch::CurlCommand> curl: (23) Failed writing body (0 != 2748)
Alien::Build::Plugin::Fetch::CurlCommand> + /usr/bin/curl -L -f -o index.html -w @writeout https://tukaani.org/xz/
Alien::Build::Plugin::Core::Download> decoding html
Alien::Build::Plugin::Core::Download> These files were excluded by the filter stage:
Alien::Build::Plugin::Core::Download> excluded http://slackware.com/
Alien::Build::Plugin::Core::Download> excluded https://git.tukaani.org/
Alien::Build::Plugin::Core::Download> excluded https://tukaani.org/artwork.html
Alien::Build::Plugin::Core::Download> excluded https://tukaani.org/about.html
Alien::Build::Plugin::Core::Download> excluded https://tukaani.org/contact.html
Alien::Build::Plugin::Core::Download> excluded https://tukaani.org/xz/
Alien::Build::Plugin::Core::Download> excluded https://tukaani.org/xz/embedded.html
Alien::Build::Plugin::Core::Download> excluded https://tukaani.org/xz/java.html
Alien::Build::Plugin::Core::Download> excluded https://tukaani.org/xz/format.html
Alien::Build::Plugin::Core::Download> excluded https://sourceforge.net/p/lzmautils/discussion/708858
Alien::Build::Plugin::Core::Download> excluded https://tukaani.org/xz/lists.html
Alien::Build::Plugin::Core::Download> excluded https://tukaani.org/difmplay/
Alien::Build::Plugin::Core::Download> excluded https://tukaani.org/lzma/
Alien::Build::Plugin::Core::Download> excluded https://tukaani.org/pkgtools/
Alien::Build::Plugin::Core::Download> excluded ...
no matching files in listing at /usr/local/share/perl5/Alien/Build/Plugin/Core/Download.pm line 61.
make: *** [Makefile:997: _alien/mm/download] Error 255
Which makes sense:
bash-4.4# /usr/bin/curl -L -O https://tukaani.org/xz/
curl: Remote file name has no length!
curl: try 'curl --help' or 'curl --manual' for more information
bash-4.4# /usr/bin/curl -L -I https://tukaani.org/xz/
HTTP/2 200
server: nginx
date: Thu, 01 Dec 2022 12:47:57 GMT
content-type: text/html
content-length: 13864
last-modified: Thu, 01 Dec 2022 12:44:34 GMT
vary: Accept-Encoding
etag: "6388a1b2-3628"
x-proxy-cache: MISS
accept-ranges: bytes
I guess the quickest fix might be notifying tukaani.org about the breaking change ... !?
(Related work: #149).
Yes unfortunately I have run into this elsewhere too now, so I don't think we can rely on the use of -J. For now I am going to remove Fetch::CurlCommand #385 (except for with the bootstrap_ssl option, which is a corner case) until we can implement something like #149 which is going to take some work, but should ultimately be more reliable. The workaround of removing the Fetch::CurlCommand plugin from the negotiator doesn't long term address this issue so I would like to keep this open.