Skip Menu |

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 2239
Status: resolved
Priority: 0/
Queue: CPAN

People
Owner: ANDK [...] cpan.org
Requestors: john [...] cs.york.ac.uk
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.70
Fixed in: (no value)



Subject: CPAN 1.70 fails if any file of module being installed is unwriteable
If CPAN 1.70 is used to install a module which has one or more files which are unwriteable by the owner (e.g. SOAP-Lite-0.55) it fails (ignore the line numbers; I'd added - harmless - debugging code by this time): Couldn't rename SOAP-Lite-0.55 to /usr/local/pkg/perl-5.8.0/lib/.cpan/build/SOAP-Lite-0.55: Permission denied at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 3877 CPAN::Distribution::get('CPAN::Distribution=HASH(0x944b8cc)') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 4391 CPAN::Distribution::make('CPAN::Distribution=HASH(0x944b8cc)') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 4630 CPAN::Distribution::test('CPAN::Distribution=HASH(0x944b8cc)') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 4735 CPAN::Distribution::install('CPAN::Distribution=HASH(0x944b8cc)') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 5427 CPAN::Module::rematein('CPAN::Module=HASH(0x402f9600)','install') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 5484 CPAN::Module::install('CPAN::Module=HASH(0x402f9600)') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 2075 CPAN::Shell::rematein('CPAN::Shell','install','SOAP::Lite') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 2102 CPAN::Shell::install('CPAN::Shell','SOAP::Lite') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 186 eval {...} called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 186 CPAN::shell() called at -e line 1 One possible fix is: 3770a3771,3779 Show quoted text
> use Cwd; > use File::Find; > > sub makewriteable { > my $mode; > $mode = (stat($File::Find::name))[2] or die "can't stat \"$File::Find::name\" ($!)"; > chmod $mode | 0200, $File::Find::name; > } >
3867a3877 Show quoted text
> find(\&makewriteable, cwd()."/".$distdir);
John A. Murdie Department of Computer Science University of York England
To: bug-CPAN [...] rt.cpan.org
CC: KULCHENKO [...] cpan.org
Subject: Re: [cpan #2239] CPAN 1.70 fails if any file of module being installed is unwriteable
From: andreas.koenig [...] anima.de (Andreas J. Koenig)
Date: Mon, 17 Mar 2003 17:26:22 +0100
RT-Send-Cc:
Show quoted text
>>>>> On Sun, 16 Mar 2003 16:45:37 -0500 (EST), "Guest via RT" <bug-CPAN@rt.cpan.org> said:
Show quoted text
> This message about CPAN was sent to you by guest <> via rt.cpan.org
Show quoted text
> Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=2239 >
Show quoted text
> If CPAN 1.70 is used to install a module which has one or more files which are unwriteable by the owner (e.g. SOAP-Lite-0.55) it fails (ignore > the line numbers; I'd added - harmless - debugging code by this time):
Show quoted text
> Couldn't rename SOAP-Lite-0.55 to /usr/local/pkg/perl-5.8.0/lib/.cpan/build/SOAP-Lite-0.55: Permission denied at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 3877 > CPAN::Distribution::get('CPAN::Distribution=HASH(0x944b8cc)') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 4391 > CPAN::Distribution::make('CPAN::Distribution=HASH(0x944b8cc)') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 4630 > CPAN::Distribution::test('CPAN::Distribution=HASH(0x944b8cc)') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 4735 > CPAN::Distribution::install('CPAN::Distribution=HASH(0x944b8cc)') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 5427 > CPAN::Module::rematein('CPAN::Module=HASH(0x402f9600)','install') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 5484 > CPAN::Module::install('CPAN::Module=HASH(0x402f9600)') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 2075 > CPAN::Shell::rematein('CPAN::Shell','install','SOAP::Lite') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 2102 > CPAN::Shell::install('CPAN::Shell','SOAP::Lite') called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 186 > eval {...} called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 186 > CPAN::shell() called at -e line 1
Show quoted text
> One possible fix is:
Show quoted text
> 3770a3771,3779
>> use Cwd; >> use File::Find; >> >> sub makewriteable { >> my $mode; >> $mode = (stat($File::Find::name))[2] or die "can't stat \"$File::Find::name\" ($!)"; >> chmod $mode | 0200, $File::Find::name; >> } >>
> 3867a3877
>> find(\&makewriteable, cwd()."/".$distdir);
Thanks for the report and suggestion, but I believe, this is not the right fix. We should go to the root of the cause, and that's the distribution itself. Other installation methods will just have the same sort of problem and any fixes that correct permissions without the user's control are scary. SOAP-Lite-0.55.tar.gz doesn't have the problem, so maybe we should remove the ZIP file from CPAN. Paul, what's your take on that? -- andreas
Date: Mon, 17 Mar 2003 10:36:27 -0800 (PST)
From: Paul Kulchenko <paulclinger [...] yahoo.com>
Subject: Re: [cpan #2239] CPAN 1.70 fails if any file of module being installed is unwriteable
To: "Andreas J. Koenig" <andreas.koenig [...] anima.de>, bug-CPAN [...] rt.cpan.org
RT-Send-Cc:
Andreas, Show quoted text
> We should go to the root of the cause, and that's the distribution > itself. Other installation methods will just have the same sort of > problem and any fixes that correct permissions without the user's > control are scary.
Agreed Show quoted text
> SOAP-Lite-0.55.tar.gz doesn't have the problem, so maybe we should > remove the ZIP file from CPAN. Paul, what's your take on that?
I'm not sure what happened with .zip archive this time, but several users reported wrong permissions on files in it. I will use a different archiver to compress the files next time; meanwhile, would it be possible to make .tar.gz available by default, so CPAN installation won't have this problem? What's the procedure to select between .zip and .tar.gz file when both are available? Is it possible to change/customize it? I would prefer to fix the problem without removing the .zip version if possible, but won't object if that's the only way to fix it. Recommendations regarding the best way to upload installations with .zip/.tar.gz archives are appreciated. Best wishes, Paul. --- "Andreas J. Koenig" <andreas.koenig@anima.de> wrote: Show quoted text
> >>>>> On Sun, 16 Mar 2003 16:45:37 -0500 (EST), "Guest via RT"
> <bug-CPAN@rt.cpan.org> said: >
> > This message about CPAN was sent to you by guest <> via
> rt.cpan.org >
> > Full context and any attached attachments can be found at: > > <URL: https://rt.cpan.org/Ticket/Display.html?id=2239 >
>
> > If CPAN 1.70 is used to install a module which has one or more
> files which are unwriteable by the owner (e.g. SOAP-Lite-0.55) it > fails (ignore
> > the line numbers; I'd added - harmless - debugging code by this
> time): >
> > Couldn't rename SOAP-Lite-0.55 to
> /usr/local/pkg/perl-5.8.0/lib/.cpan/build/SOAP-Lite-0.55: > Permission denied at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm > line 3877
> > CPAN::Distribution::get('CPAN::Distribution=HASH(0x944b8cc)')
> called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 4391
> > CPAN::Distribution::make('CPAN::Distribution=HASH(0x944b8cc)')
> called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 4630
> > CPAN::Distribution::test('CPAN::Distribution=HASH(0x944b8cc)')
> called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 4735
> >
> CPAN::Distribution::install('CPAN::Distribution=HASH(0x944b8cc)') > called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 5427
> >
> CPAN::Module::rematein('CPAN::Module=HASH(0x402f9600)','install') > called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 5484
> > CPAN::Module::install('CPAN::Module=HASH(0x402f9600)') called
> at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 2075
> > CPAN::Shell::rematein('CPAN::Shell','install','SOAP::Lite')
> called at /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 2102
> > CPAN::Shell::install('CPAN::Shell','SOAP::Lite') called at
> /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 186
> > eval {...} called at
> /usr/local/pkg/perl-5.8.0/lib/5.8.0/CPAN.pm line 186
> > CPAN::shell() called at -e line 1
>
> > One possible fix is:
>
> > 3770a3771,3779
> >> use Cwd; > >> use File::Find; > >> > >> sub makewriteable { > >> my $mode; > >> $mode = (stat($File::Find::name))[2] or die "can't stat
> \"$File::Find::name\" ($!)";
> >> chmod $mode | 0200, $File::Find::name; > >> } > >>
> > 3867a3877
> >> find(\&makewriteable, cwd()."/".$distdir);
> > Thanks for the report and suggestion, but I believe, this is not > the > right fix. > > We should go to the root of the cause, and that's the distribution > itself. Other installation methods will just have the same sort of > problem and any fixes that correct permissions without the user's > control are scary. > > SOAP-Lite-0.55.tar.gz doesn't have the problem, so maybe we should > remove the ZIP file from CPAN. Paul, what's your take on that? > > > -- > andreas
Show quoted text
__________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com
To: Paul Kulchenko <paulclinger [...] yahoo.com>
CC: "Andreas J. Koenig" <andreas.koenig [...] anima.de>, bug-CPAN [...] rt.cpan.org
Subject: Re: [cpan #2239] CPAN 1.70 fails if any file of module being installed is unwriteable
From: andreas.koenig [...] anima.de (Andreas J. Koenig)
Date: Tue, 18 Mar 2003 01:45:45 +0100
RT-Send-Cc:
Show quoted text
>>>>> On Mon, 17 Mar 2003 10:36:27 -0800 (PST), Paul Kulchenko <paulclinger@yahoo.com> said:
Show quoted text
> I'm not sure what happened with .zip archive this time, but several > users reported wrong permissions on files in it. I will use a > different archiver to compress the files next time; meanwhile, would > it be possible to make .tar.gz available by default, so CPAN > installation won't have this problem? What's the procedure to select > between .zip and .tar.gz file when both are available? Is it possible > to change/customize it?
The one that's uploaded later wins for equal version numbers. Show quoted text
> I would prefer to fix the problem without removing the .zip version > if possible, but won't object if that's the only way to fix it.
It was the only way to fix it. I've express-deleted SOAP-Lite-0.55.zip and reindexed immediately afterwards, so it's unlikely that people will get inconsistent indexes. Show quoted text
> Recommendations regarding the best way to upload installations with > .zip/.tar.gz archives are appreciated.
Imho, it makes no sense to have both .zip and .tar.gz in the archive. The overwhelming majority of distros is using .tar.gz mostly because they compress so much better: Show quoted text
mysql> select count(*) from packages where dist like '%.zip';
+----------+ | count(*) | +----------+ | 302 | +----------+ 1 row in set (0.14 sec) Show quoted text
mysql> select count(*) from packages where dist like '%.tar.gz';
+----------+ | count(*) | +----------+ | 22854 | +----------+ 1 row in set (2.37 sec) If I reduce the above numbers to only reflect distinct distribution names, the ratio is 86/4877, i.e. less than 2%. CPAN does seem to be able to live well without .zip files. -- andreas