Skip Menu |

This queue is for tickets about the Zoidberg CPAN distribution.

Report information
The Basics
Id: 8575
Status: resolved
Priority: 0/
Queue: Zoidberg

People
Owner: pardus [...] cpan.org
Requestors: merlyn [...] stonehenge.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.91
Fixed in: (no value)



Subject: zoidberg installation does not respect Perl's PREFIX setting
My Perl installation is designed to install into /opt/perl/snap (snapshot), yet the attempt to install Zoidberg tried to write into /etc. You must respect the Perl installation prefix to permit people to use Zoidberg when installed as non-root. localhost:..uild/Zoidberg-0.91 +% make install /usr/local/bin/perl Build --makefile_env_macros 1 install /usr/local/bin/perl b/zoid.PL /usr/local/bin/perl b/test.PL /usr/local/bin/perl b/Config.PL Manifying blib/lib/Zoidberg.pm -> blib/libdoc/Zoidberg.3 Warning: You do not have permissions to install into /etc at /opt/perl/snap/lib/5.8.6/ExtUtils/Install.pm line 114. Installing /opt/perl/snap/share/man/man1/zoiddevel.1 Installing /opt/perl/snap/share/man/man1/zoid.1 Installing /opt/perl/snap/share/man/man1/zoiduser.1 Installing /opt/perl/snap/share/man/man1/zoidfaq.1 Skipping /opt/perl/snap/doc/zoid/BUGS (unchanged) Installing /opt/perl/snap/doc/zoid/Changes Installing /opt/perl/snap/doc/zoid/README Installing /opt/perl/snap/doc/zoid/index.html Cannot forceunlink /etc/zoidrc: Permission denied at /opt/perl/snap/lib/5.8.6/File/Find.pm line 874 make: *** [install] Error 255
Date: Tue, 23 Nov 2004 15:07:45 +0100
From: Jaap Karssenberg <j.g.karssenberg [...] student.utwente.nl>
To: bug-Zoidberg [...] rt.cpan.org
Subject: Re: [cpan #8575] zoidberg installation does not respect Perl's PREFIX setting
RT-Send-Cc:
Randal_L_Schwartz via RT wrote on Tue, 23 Nov 2004 08:15:10 -0500 (EST): Show quoted text
> My Perl installation is designed to install into /opt/perl/snap > (snapshot), yet the attempt to install Zoidberg tried to write into > /etc. You must respect the Perl installation prefix to permit people > to use Zoidberg when installed as non-root.
mkdir /opt/perl/snap/etc Since Config.pm does not give a directory for global config files (and neither does Module::Build or MakeMaker), I've implemented a heuristic that searches for an existing "etc" directory relative to the "bin" directory specified by the configuration. Also you can specify a '--install_path etc=/my/etc' switch to Build.PL to use an alternative directory. -- ) ( Jaap Karssenberg || Pardus [Larus] | |0| | : : http://pardus-larus.student.utwente.nl/~pardus | | |0| ) \ / ( |0|0|0| ",.*'*.," Proud owner of "Perl6 Essentials" 1st edition :) wannabe
[merlyn@stonehenge.com - Tue Nov 23 10:14:26 2004]: Show quoted text
> >>>>> "Jaap" == Jaap Karssenberg via RT <comment-Zoidberg@rt.cpan.org>
> writes: >
> Jaap> mkdir /opt/perl/snap/etc
> > That's not where it was trying on the current install. It was > literally > trying /etc stuff.
I know, but the installer tries to make an educated guess by checking for _existing_ directories, so if you mkdir that directory it will be used. This was originally done to resolve the difference in heuristics between bsd and linux. Show quoted text
> Jaap> Since Config.pm does not give a directory for global config > Jaap> files (and neither does Module::Build or MakeMaker), I've > Jaap> implemented a heuristic that searches for an existing "etc" > Jaap> directory relative to the "bin" directory specified by the > Jaap> configuration.
> > Well, it should mkdir it if it can't find it. That's what everything > else does on install.
The problem is that there is no way of determining whether that is what you want. On the average linux distro that would mean that either /usr/etc or /usr/local/etc gets created, and thats not what most admins want. That why we check for existing 'etc' directories in the path. Show quoted text
> Jaap> Also you can specify a '--install_path etc=/my/etc' switch to > Jaap> Build.PL to use an alternative directory.
> > What is that in Makefile.PL syntax?
Not sure there is one, the Makefile.PL in the package is purely a frontend to Module::Build to make CPAN work.
As I have heard no other objections to zoidberg's installation heuristics I'm closing this ticket. I hope Module::Build will provide a mechanism for installing files outside 'lib' an 'bin' in the future, till that time it will be a bit messy, but it's the best we can do. Summary: Zoid seeks an _existing_ 'etc' dir relative to the 'bin' directory. If this is not found it cannot know for sure what you want and simply tries '/etc'. If you create the 'etc' directory manually in the PREFIX directory, it will be used.