Skip Menu |

This queue is for tickets about the ExtUtils-Install CPAN distribution.

Report information
The Basics
Id: 25627
Status: resolved
Priority: 0/
Queue: ExtUtils-Install

People
Owner: yves [...] cpan.org
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 1.39_01
  • 1.40
  • 1.41
  • 1.41_01
  • 1.41_02
  • 1.41_03
Fixed in: (no value)



Subject: Bogus failure "Do not have write permissions on '/etc'"
PARDUS/Zoidberg-0.96.tar.gz uncovers the following bug in ExtUtils::Install introduced in 1.39_01: % ./Build install [...] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ERROR: Can't create '/etc' Do not have write permissions on '/etc' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ExtUtils::Install should not try to create existing directories and should not examine if I would be able to create it. It's there and this is what counts. Zoidberg would only install an /etc/zoidrc which I would be allowed to overwrite because the file belongs to me. So it does not count that I can neither write to / nor to /etc/ in general. All that should count is that I can overwrite /etc/zoidrc. I have verified this bug exists up to 1.41_03
CC: "List - Module-Build" <module-build [...] perl.org>
Subject: Re: [rt.cpan.org #25627] Bogus failure "Do not have write permissions on '/etc'"
Date: Fri, 23 Mar 2007 12:06:51 +0100
To: bug-ExtUtils-Install [...] rt.cpan.org
From: demerphq <demerphq [...] gmail.com>
On 3/22/07, Andreas Koenig via RT <bug-ExtUtils-Install@rt.cpan.org> wrote: Show quoted text
> > Thu Mar 22 00:20:27 2007: Request 25627 was acted upon. > Transaction: Ticket created by ANDK > Queue: ExtUtils-Install > Subject: Bogus failure "Do not have write permissions on '/etc'" > Broken in: 1.39_01, 1.40, 1.41, 1.41_01, 1.41_02, 1.41_03 > Severity: (no value) > Owner: Nobody > Requestors: ANDK@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=25627 > > > > PARDUS/Zoidberg-0.96.tar.gz uncovers the following bug in > ExtUtils::Install introduced in 1.39_01: > > % ./Build install > [...] > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > ERROR: Can't create '/etc' > Do not have write permissions on '/etc' > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > > ExtUtils::Install should not try to create existing directories and > should not examine if I would be able to create it.
Well, it only does that if it is told to install a directory. But it does have to do this type of logic for a fake install. Show quoted text
> It's there and this is what counts.
I agree in principle. I /think/ that this is actually a problem with Zoidberg and or Module::Build, (not sure which). Show quoted text
> Zoidberg would only install an /etc/zoidrc which I would > be allowed to overwrite because the file belongs to me. So it does not > count that I can neither write to / nor to /etc/ in general. All that > should count is that I can overwrite /etc/zoidrc. > > I have verified this bug exists up to 1.41_03
I cant say absolutely for sure, but im not sure if this really is an EU:I bug. Specifically, it would appear that Module::Build is including the directory /etc in its install list, and not just the file /etc/zoidrc. Its hard to say really what should be done about this. /etc/ is a special case that the install code hasnt been desgined to deal with. In short it assumes that if its installing a directory that the directory must be writable. Changing this would not be straightforward and im reluctant to do it because of this package alone. Im inlinced to think that MB / zoidberg should be passing in the exact file from the /etc/ directory and not trying to use the directory copy process. Anyway, further thoughts appreciated, and ive cc'ed the Module::Build folks to see what they think. Cheers, Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"
CC: <module-build [...] perl.org>
Subject: RE: [rt.cpan.org #25627] Bogus failure "Do not have write permissions on '/etc'"
Date: Fri, 23 Mar 2007 14:57:05 +0100
To: <demerphq [...] gmail.com>, <bug-ExtUtils-Install [...] rt.cpan.org>
From: <j.g.karssenberg [...] student.utwente.nl>
Hi, Be aware that Zoidberg contains some subclassing of M:B to get install in /etc, /usr/share, etc. My development on this code has been on non-active for about 1.5 year now, so I do not know of the way I subclassed M:B is still valid for new versions of M:B. Please double check this before you decide if it is an installer bug or a packaging bug. Regards, -- Jaap <pardus@cpan.org> Show quoted text
________________________________ From: demerphq [mailto:demerphq@gmail.com] Sent: Fri 3/23/2007 12:06 PM To: bug-ExtUtils-Install@rt.cpan.org Cc: List - Module-Build Subject: Re: [rt.cpan.org #25627] Bogus failure "Do not have write permissions on '/etc'" On 3/22/07, Andreas Koenig via RT <bug-ExtUtils-Install@rt.cpan.org> wrote:
> > Thu Mar 22 00:20:27 2007: Request 25627 was acted upon. > Transaction: Ticket created by ANDK > Queue: ExtUtils-Install > Subject: Bogus failure "Do not have write permissions on '/etc'" > Broken in: 1.39_01, 1.40, 1.41, 1.41_01, 1.41_02, 1.41_03 > Severity: (no value) > Owner: Nobody > Requestors: ANDK@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=25627 > > > > PARDUS/Zoidberg-0.96.tar.gz uncovers the following bug in > ExtUtils::Install introduced in 1.39_01: > > % ./Build install > [...] > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > ERROR: Can't create '/etc' > Do not have write permissions on '/etc' > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > > ExtUtils::Install should not try to create existing directories and > should not examine if I would be able to create it.
Well, it only does that if it is told to install a directory. But it does have to do this type of logic for a fake install.
> It's there and this is what counts.
I agree in principle. I /think/ that this is actually a problem with Zoidberg and or Module::Build, (not sure which).
> Zoidberg would only install an /etc/zoidrc which I would > be allowed to overwrite because the file belongs to me. So it does not > count that I can neither write to / nor to /etc/ in general. All that > should count is that I can overwrite /etc/zoidrc. > > I have verified this bug exists up to 1.41_03
I cant say absolutely for sure, but im not sure if this really is an EU:I bug. Specifically, it would appear that Module::Build is including the directory /etc in its install list, and not just the file /etc/zoidrc. Its hard to say really what should be done about this. /etc/ is a special case that the install code hasnt been desgined to deal with. In short it assumes that if its installing a directory that the directory must be writable. Changing this would not be straightforward and im reluctant to do it because of this package alone. Im inlinced to think that MB / zoidberg should be passing in the exact file from the /etc/ directory and not trying to use the directory copy process. Anyway, further thoughts appreciated, and ive cc'ed the Module::Build folks to see what they think. Cheers, Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"
CC: yves [...] cpan.org, pardus [...] cpan.org
Subject: Re: [rt.cpan.org #25627] Bogus failure "Do not have write permissions on '/etc'"
Date: Sat, 24 Mar 2007 10:38:23 +0100
To: bug-ExtUtils-Install [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Fri, 23 Mar 2007 10:01:00 -0400, "Jaap Karssenberg via RT" <bug-ExtUtils-Install@rt.cpan.org> said:
Show quoted text
> Be aware that Zoidberg contains some subclassing of M:B to get > install in /etc, /usr/share, etc. My development on this code has > been on non-active for about 1.5 year now, so I do not know of the > way I subclassed M:B is still valid for new versions of M:B. > Please double check this before you decide if it is an installer > bug or a packaging bug.
I try it in the debugger: DB<5> l 2696==>b ExtUtils::Install::install($self->install_map, !$self->quiet, 0, $self->{args}{uninst}||0); Now I step into ExtUtils::Install::install(). Module::Build and family will have finished its job when we reach the first line of install(): DB<8> ExtUtils::Install::install(/home/src/perl/repoperls/installed-perls/perl/pbN6H8H/perl-5.8.0@28100/lib/site_perl/5.9.4/ExtUtils/Install.pm:542): 542: my($from_to,$verbose,$nonono,$inc_uninstall,$skip) = @_; Here I ask the debugger what $from_to contains: ExtUtils::Install::install((eval 56)[/home/src/perl/repoperls/installed-perls/perl/pbN6H8H/perl-5.8.0@28100/lib/5.9.4/perl5db.pl:628]:2): 2: $from_to; 0 HASH(0x8d017f4) 'blib/arch' => '/home/src/perl/repoperls/installed-perls/perl/pbN6H8H/perl-5.8.0@28100/lib/site_perl/5.9.4/i686-linux-64int' 'blib/bindoc' => '/home/src/perl/repoperls/installed-perls/perl/pbN6H8H/perl-5.8.0@28100/man/man1' 'blib/doc' => '/home/src/perl/repoperls/installed-perls/perl/pbN6H8H/perl-5.8.0@28100/doc/zoid' 'blib/etc' => '/etc' 'blib/lib' => '/home/src/perl/repoperls/installed-perls/perl/pbN6H8H/perl-5.8.0@28100/lib/site_perl/5.9.4' 'blib/libdoc' => '/home/src/perl/repoperls/installed-perls/perl/pbN6H8H/perl-5.8.0@28100/man/man3' 'blib/script' => '/home/src/perl/repoperls/installed-perls/perl/pbN6H8H/perl-5.8.0@28100/bin' 'blib/share' => '/home/src/perl/repoperls/installed-perls/perl/pbN6H8H/perl-5.8.0@28100/share/zoid' 'read' => '' 'write' => '/home/src/perl/repoperls/installed-perls/perl/pbN6H8H/perl-5.8.0@28100/lib/site_perl/5.9.4/i686-linux-64int/auto/Zoidberg/.packlist' It is a map to install from/to pairs, all of them directories. After looping through them I soon reach 566==>b _mkpath( $targetdir, 0, 0755, $verbose, $nonono ); 567 } 568: closedir DIR; 569 } Within _mkpath I come to 475: my ($can,$root,@make)=_can_write_dir($dir); This sounds suspicious to me. 436: if ( _have_write_access($dir) ) { [...] 439: return 0,$dir,@make [...] 476: if (!$can) { DB<23> l 476==> if (!$can) { 477: my @msg=( 478 "Can't create '$dir'", 479 $root ? "Do not have write permissions on '$root'" 480 : "Unknown Error" 481 ); I'd say, this _have_write_access() or the _can_write_dir() should not be done, instead it should be tried if we can write each file, piece by piece and not fail earlier than necessary. Note that in the case I encountered the target file in /etc/ is writeable by me while the directory in general isn't. D'accord? -- andreas
From: KWILLIAMS [...] cpan.org
I ran "perl -d Build fakeinstall" and here's what gets passed to ExtUtils::Install::install(): DB<3> x \@_ 0 ARRAY(0xe4e4) 0 HASH(0x19dc804) 'blib/arch' => '/Library/Perl/5.8.6/darwin-thread-multi-2level' 'blib/bindoc' => '/usr/local/man/man1' 'blib/doc' => '/usr/local/doc/zoid' 'blib/etc' => '/etc' 'blib/lib' => '/Library/Perl/5.8.6' 'blib/libdoc' => '/usr/local/man/man3' 'blib/script' => '/usr/local/bin' 'blib/share' => '/usr/local/share/zoid' 'read' => '' 'write' => '/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/Zoidberg/.packlist' 1 1 2 1 3 0 That looks fine to me, and blib/etc/ looks fine (just contains the "zoidrc" file), so I think this is an ExtUtils::Install bug. In fact, you can reproduce it without M::B involved at all, by building Zoidberg and then doing: perl -MExtUtils::Install -e 'install({"blib/etc" => "/etc"}, 1, 1)' -Ken
Oops, Andreas beat me to it. That'll teach me not to leave the comments window open for 2 days before responding. =) -Ken
On Thu Mar 22 00:20:27 2007, ANDK wrote: Show quoted text
> PARDUS/Zoidberg-0.96.tar.gz uncovers the following bug in > ExtUtils::Install introduced in 1.39_01: > > % ./Build install > [...] > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > ERROR: Can't create '/etc' > Do not have write permissions on '/etc' > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > > ExtUtils::Install should not try to create existing directories and > should not examine if I would be able to create it. It's there and this > is what counts. Zoidberg would only install an /etc/zoidrc which I would > be allowed to overwrite because the file belongs to me. So it does not > count that I can neither write to / nor to /etc/ in general. All that > should count is that I can overwrite /etc/zoidrc. > > I have verified this bug exists up to 1.41_03
Ive uploaded 1.41_04 which should resolve this problem. Could you check it out for me please, even perhaps by doing a BBC check using it? Cheers, Yves ps: Sorry for the lag.
Subject: Re: [rt.cpan.org #25627] Bogus failure "Do not have write permissions on '/etc'"
Date: Sun, 08 Jul 2007 21:43:53 +0200
To: bug-ExtUtils-Install [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Sat, 07 Jul 2007 11:18:17 -0400, " via RT" <bug-ExtUtils-Install@rt.cpan.org> said:
Show quoted text
> Ive uploaded 1.41_04 which should resolve this problem. Could you check > it out for me please, even perhaps by doing a BBC check using it?
Zoidberg has some unrelated problems nowadays and fails tests. But 'make install' succeeds. I've equipped bleadperl@31566 with 1.41_04 and built and installed 1266 distributions that are in my regular testing/smoking sample, both succeeding and failing ones. All looks good, nothing peculiar. All failures are explicable and not related to ExtUtils::Install. Thanks! -- andreas
Closed as resolved in 1.41_04