develooper Front page | perl.perl5.porters | Postings from July 2019

Re: "Damaged tar archive" for perl-5.32.2 on ftp callsfromCPANmirrors

Thread Previous | Thread Next
From:
James E Keenan
Date:
July 22, 2019 12:14
Subject:
Re: "Damaged tar archive" for perl-5.32.2 on ftp callsfromCPANmirrors
Message ID:
20190722121359.5744.qmail@lists-nntp.develooper.com
On 7/22/19 2:07 AM, sisyphus wrote:
>  From mirrors.rit.edu <http://mirrors.rit.edu>, I can't get a valid file 
> via Net::FTP for either perl-5.31.2.tar.gz or perl-5.31.1.tar.gz.
> But, using the same perl script, I do get a valid perl-5.31.1.tar.gz 
> from ftp.funet.fi <http://ftp.funet.fi>.
> 

Up until now ftp.funet.fi has been very reliable.  But 
http://mirrors.cpan.org/#fi indicates it's 7.2 days out-of-date.  So 
5.31.2 hasn't even arrived there.

> Here's the script I used:
> 
> #######################
>   use Net::FTP;
>   $ftp = Net::FTP->new("ftp.funet.fi <http://ftp.funet.fi>", Debug => 1, 
> Passive => 1)
>     or die "Cannot connect: $@";
>   $ftp->binary();
>   $ftp->login("anonymous",'')
>     or die "Cannot login ", $ftp->message;
>   $ftp->cwd("pub/languages/perl/CPAN/src/5.0")
>     or die "Cannot change working directory ", $ftp->message;
>   $ftp->get("perl-5.31.1.tar.gz")
>     or die "get failed ", $ftp->message;
>   $ftp->quit;
> ########################
> 
> If I connect instead to "mirrors.ret.edu <http://mirrors.ret.edu>" and 
> cwd to "CPAN/src/5.0" I get a corrupted perl-5.31.1.tar.gz.
> Makes no difference if I switch to active mode, or if I turn off binary 
> - mirrors.rit.edu <http://mirrors.rit.edu> always returns the same 
> corrupted file.
> That corrupted file is actually bigger than the valid one.
> For perl-5.31.1.tar.gz, ftp.funet.fi <http://ftp.funet.fi> delivers a 
> file that is 17 593 158 bytes, whereas mirrors.rit.edu 
> <http://mirrors.rit.edu> delivers a file that is 17 659 694 bytes
> For perl 5.31.2.tar.gz, correct size is 17 631 507 bytes, but 
> mirrors.rit.edu <http://mirrors.rit.edu> delivers a file that is 
> 17 697 887 bytes.
> 
> I also found that there are no problems with files from mirrors.rit.edu 
> <http://mirrors.rit.edu> that were downloaded using wget.
> Nor was there a problem downloading by browsing to 
> ftp://mirrors.rit.edu/CPAN/src/5.0 and clicking on the tarball link.
> 
> Cheers,
> Rob
> 
> 

So we seem to be having a problem that is a combination of this month's 
tarball and Net::FTP.

> 
> 
> 
> 
> On Mon, Jul 22, 2019 at 3:07 PM Tony Cook <tony@develop-help.com 
> <mailto:tony@develop-help.com>> wrote:
> 
>     On Sun, Jul 21, 2019 at 09:49:04PM -0400, James E Keenan wrote:
>      > >
>      > > Does that sha256 match?
>      > >
>      > > tony@mars:~/src$ sha256sum perl-5.31.2.tar.gz
>      > >
>     4047199a79bf793e1f245e20fe7eb25f3c76969a475634613b152c5969826d01 
>     perl-5.31.2.tar.gz
>      > > tony@mars:~/src$ cat perl-5.31.2.tar.gz.sha256.txt
>      > > 4047199a79bf793e1f245e20fe7eb25f3c76969a475634613b152c5969826d01
>      >
>      > That looks like the problem:
>      >
>      > #####
>      > # In my FreeBSD-12 VM:
>      > $ sha256 perl-5.31.2.tar.gz
>      > SHA256 (perl-5.31.2.tar.gz) =
>      > a26478e09f7e3c9ad78c295cb0a4781132c56c200b208ac93291474f85fa21d3
>      >
>      > # ftp://mirrors.rit.edu/CPAN/src/5.0/perl-5.31.2.tar.gz.sha256.txt
>      >
>      > 4047199a79bf793e1f245e20fe7eb25f3c76969a475634613b152c5969826d01
>      > #####
>      >
>      > Also:
>      >
>      > #####
>      > # In my FreeBSD-12 VM:
>      > $ sha1 perl-5.31.2.tar.gz
>      > SHA1 (perl-5.31.2.tar.gz) = 306fcf528e33e2985fab954ccba73cd6397717a5
>      >
>      > # ftp://mirrors.rit.edu/CPAN/src/5.0/perl-5.31.2.tar.gz.sha1.txt
>      > 3a2e2beb54e6a44b4bb6c4bd2967ec0a0c9f5324
>      > #####
>      >
>      > How should we proceed?
>      >
> 
>     The sha256 mismatch isn't the "the problem" - it's just a diagnostic.
> 
>      > >
>      > > Otherwise, since you're using FTP, do you call binary() on the
>      > > Net::FTP object?
>      > >
>      >
>      > No, I don't.  But I've performed this call (inside
>     Perl::Download::FTP)
>      > hundreds of times with no problem -- and now dozens of times from
>     within
>      > this VM.
> 
>     Try it, I expect you've just been lucky in your choice of mirrors.
> 
>     If you're transferring binary files always use binary mode for FTP.
> 
>     You might want to check the checksums too.
> 
>     Tony
> 

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About