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

[perl #72028] ExtUtils::Install problem: execute permission missing from some utils

Thread Previous
From:
James E Keenan via RT
Date:
July 13, 2013 01:14
Subject:
[perl #72028] ExtUtils::Install problem: execute permission missing from some utils
Message ID:
rt-3.6.HEAD-2552-1373678078-298.72028-15-0@perl.org
On Tue Feb 19 18:44:44 2013, jkeenan wrote:
> On Wed Jan 13 16:38:48 2010, zefram@fysh.org wrote:
> > Turns out this isn't a problem with the original core install.
> > The permissions are getting broken by later module installs.  Take the
> > example of config_data.  The bare install yields
> > 
> > -rwxr-xr-x 1 zefram zefram   7361 Jan 13 22:33 config_data5.11.3
> > 
> > Immediately after installation, I routinely create symlinks for the
> > unversioned form of the name.  (The install has its own directory
> > tree,
> > so there's no issue of conflicting with another perl.)  So I have
> > 
> > lrwxrwxrwx 1 zefram zefram     17 Jan 13 22:42 config_data ->
> > config_data5.11.3
> > -rwxr-xr-x 1 zefram zefram   7361 Jan 13 22:33 config_data5.11.3
> > 
> > If I then do "cpan Module::Build", this installs a newer
> > Module::Build,
> > including the latest version of config_data.  I'm left with
> > 
> > -r-xr-xr-x 1 zefram zefram   7244 Jan 13 22:46 config_data
> > -rw-rw-rw- 1 zefram zefram   7361 Jan 13 22:33 config_data5.11.3
> > 
> > The culprit is ExtUtils::Install.  Needing to install something as
> > config_data, and finding that there's something already there, it's
> > doing
> > a chmod to 666 before unlinking it.  The chmod follows the symlink,
> > and so affects config_data5.11.3, but the unlink successfully removes
> > the symlink.  A hard link would have the same result as the symlink.
> > 
> > Here's the minimal demonstration:
> > 
> > $ mkdir from to
> > $ echo oldoldold > to/b
> > $ chmod 755 to/b
> > $ ln -s b to/a
> > $ echo new > from/a
> > $ chmod 755 from/a
> > $ ls -l to
> > total 4
> > lrwxrwxrwx 1 zefram zefram  1 Jan 14 00:36 a -> b
> > -rwxr-xr-x 1 zefram zefram 10 Jan 14 00:36 b
> > $ perl -MExtUtils::Install -e 'install({ "from" => "to" })'
> > Installing to/a
> > $ ls -l to
> > total 8
> > -r-xr-xr-x 1 zefram zefram  4 Jan 14 00:37 a
> > -rw-rw-rw- 1 zefram zefram 10 Jan 14 00:36 b
> > $
> > 
> > -zefram
> > 
> 
> I was able to reproduce Zefram's minimal case demonstration tonight. 
> Should we be patching ExtUtils::Install?
> 

Is there anyone who could take a look at ExtUtils::Install?

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=72028

Thread Previous


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