Skip Menu |

This queue is for tickets about the Mail-SPF CPAN distribution.

Report information
The Basics
Id: 34768
Status: open
Priority: 0/
Queue: Mail-SPF

People
Owner: Nobody in particular
Requestors: HVDS [...] cpan.org
MSTEVENS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: v2.005
Fixed in: (no value)



Subject: Can't install as non-root
Mail::SPF installer doesn't respect the perl installation prefix. I have a test perl 5.10 install in /tmp/perl-5.10-install. CPAN modules should install under this prefix. When I try to install Mail::SPF, it complains it can't write to /usr/sbin: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ERROR: Can't create '/usr/sbin' Do not have write permissions on '/usr/sbin' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! at /tmp/perl-5.10.0-install/lib/5.10.0/Module/Build/Base.pm line 2804 JMEHNLE/mail-spf/Mail-SPF-v2.005.tar.gz ./Build install -- NOT OK I'm installing from CPAN.pm.
This also affects installing the old-fashioned way: % perl Makefile.PL PREFIX=/home/ed % make [ok] % make test [ok] % make install [...] Cannot forceunlink /usr/sbin/spfd: Permission denied at /usr/share/perl/5.8/File/Find.pm line 886 The location of the sbin directory should respect PREFIX.
Hi there. I am aware of the issue. Unfortunately neither Perl's hard-coded config variables nor Module::Build (nor ExtUtils::MakeMaker) provide an automatism for determining the proper "sbin" path -- only "bin". Consequently, module authors would have to implement all the PREFIX / install_base logic themselves for such custom paths. To date I haven't found the time to do so, and it isn't exactly high on my priority list, but I will gladly accept a clean patch. Sorry for not being able to give a more positive reaction.
I also have a need for this. I don't particularly need spfd though (as far as I know), so I applied the attached patch after building, which was enough to let the install go through. (It is unfortunate that this is the first thing Module::Build attempts to install, so failure here means nothing gets installed at all.) I would recommend talking to p5p about a better way to do this - I don't imagine it would be hard for perl to add support for this. Hugo
Download install-nonroot
application/octet-stream 693b

Message body not shown because it is not plain text.

I have decided to NOT fix this until the time when Perl's Config.pm provides the system's/user's "sbin" path and Module::Build uses that to support installing "sbin" executables (or Module::Build provides its own portable mechanism independent of Config.pm). For the time being, you can work around the current limitation by using the "--install_path" option during installation: $ ./Build install --install_path sbin=/desired/sbin/path I'm documenting this workaround in the INSTALL file.
Show quoted text
> $ ./Build install --install_path sbin=/desired/sbin/path > > I'm documenting this workaround in the INSTALL file.
Your workaround doesn't work for those of use using CPAN to build a large number of modules for older platforms using CPAN. Couldn't you at least take the given build directory and tack sbin onto it?
On Mon Apr 12 17:12:45 2010, MISHIKAL wrote: Show quoted text
> Your workaround doesn't work for those of use using CPAN to build a > large number of modules for older platforms using CPAN. Couldn't you at > least take the given build directory and tack sbin onto it?
Why does the workaround not work? What do you mean by "the given build directory"?
What's wrong with simply installing into the normal path like any other executable?
Most users of Mail::SPF only use the parsing parts of the Mail::SPF distribution. They don't need sbin/spfd and will never use it. It would be worth considering moving it in a separate CPAN distribution called Mail::SPF::Server. -- Olivier Mengué - http://perlresume.org/DOLMEN
On Tue Feb 25 07:08:20 2014, DOLMEN wrote: Show quoted text
> Most users of Mail::SPF only use the parsing parts of the Mail::SPF > distribution. > They don't need sbin/spfd and will never use it. > It would be worth considering moving it in a separate CPAN > distribution called Mail::SPF::Server.
+1 for this idea. I forget about this and have to manually mess with Mail::SPF every time I upgrade perl :(