CPAN and man page installation

V

Vincent Lefevre

With the cpan utility, what configuration option need to be modified
to install the man pages of modules at some place?

Installation currently fails with the following error:

mkdir /usr/local/man/man3: Permission denied at /usr/share/perl/5.8/ExtUtils/Install.pm line 112

So, I need to tell cpan to install the man pages in ~/man/man1
and ~/man/man3.
 
B

Ben Morrow

Quoth Vincent Lefevre said:
With the cpan utility, what configuration option need to be modified
to install the man pages of modules at some place?

Installation currently fails with the following error:

mkdir /usr/local/man/man3: Permission denied at
/usr/share/perl/5.8/ExtUtils/Install.pm line 112

So, I need to tell cpan to install the man pages in ~/man/man1
and ~/man/man3.

export PERL_MM_OPT="INSTALLMAN1DIR=$HOME/man/man1
INSTALLMAN3DIR=$HOME/man/man3"

See perldoc ExtUtils::MakeMaker for full details. For Module::Build
modules, you need to create a ~/.modulebuildrc file containing

* bindoc=~/man/man1 libdoc=~/man/man3

Ben
 
V

Vincent Lefevre

Ben Morrow said:
export PERL_MM_OPT="INSTALLMAN1DIR=$HOME/man/man1
INSTALLMAN3DIR=$HOME/man/man3"

I've added

$ENV{'PERL_MM_OPT'} = 'INSTALLMAN1DIR=~/man/man1 INSTALLMAN3DIR=~/man/man3';

to my .cpan/CPAN/MyConfig.pm file, but I still get the same error.
It seems that this environment variable isn't taken into account.

FYI, I already have the following:

cpan> o conf
CPAN::Config options and /home/vlefevre/.cpan/CPAN/MyConfig.pm:
commit Commit changes to disk
defaults Reload defaults from disk
init Interactive setting of all options

build_cache 10
build_dir /home/vlefevre/.cpan/build
bzip2 /bin/bzip2
cache_metadata 1
cpan_home /home/vlefevre/.cpan
curl /usr/bin/curl
dontload_hash
ftp /usr/bin/ftp
ftp_passive 1
ftp_proxy
getcwd cwd
gpg /usr/bin/gpg
gzip /bin/gzip
histfile /home/vlefevre/.cpan/histfile
histsize 100
http_proxy
inactivity_timeout 0
index_expire 1
inhibit_startup_message 0
installman1dir /home/vlefevre/man/man1
installman3dir /home/vlefevre/man/man3
keep_source_where /home/vlefevre/.cpan/sources
lynx /usr/bin/lynx
make /usr/bin/make
make_arg -j2
make_install_arg UNINST=1
make_install_make_command /usr/bin/make
makepl_arg LIB=~/lib/site_perl INSTALLMAN1DIR=~/man/man1 INSTALLMAN3DIR=~/man/man3
mbuild_arg
mbuild_install_arg --uninst 1
mbuild_install_build_command ./Build
mbuildpl_arg
ncftpget /usr/bin/ncftpget
no_proxy
pager less -is
prefer_installer EUMM
prerequisites_policy ask
scan_cache atstart
shell /usr/bin/zsh
show_upload_date 1
tar /bin/tar
term_is_latin 1
unzip /usr/bin/unzip
urllist
http://cpan.cict.fr/
http://cpan.mirrors.easynet.fr/
ftp://ftp.pasteur.fr/pub/computing/CPAN/
ftp://ftp.u-strasbg.fr/CPAN
wget /usr/bin/wget
 
V

Vincent Lefevre

Vincent Lefevre said:
With the cpan utility, what configuration option need to be modified
to install the man pages of modules at some place?
Installation currently fails with the following error:
mkdir /usr/local/man/man3: Permission denied at /usr/share/perl/5.8/ExtUtils/Install.pm line 112
So, I need to tell cpan to install the man pages in ~/man/man1
and ~/man/man3.

I've debugged this a bit. After the failure of Compress::Raw::Bzip2
installation, /home/vlefevre/.cpan/build/Compress-Raw-Bzip2-2.008/Makefile
contains:

INSTALLMAN1DIR = /home/vlefevre/man/man1
INSTALLMAN3DIR = /home/vlefevre/man/man3

as expected, but in fact, these variables are not taken into account,
probably because the Makefile also has:

INSTALLDIRS = site
DESTDIR =
PREFIX = /usr
PERLPREFIX = $(PREFIX)
SITEPREFIX = $(PREFIX)/local

The following is OK:

INSTALLSITELIB = /home/vlefevre/lib/site_perl

but why do I get the following values in the Makefile?

INSTALLSITEMAN1DIR = $(SITEPREFIX)/man/man1
INSTALLSITEMAN3DIR = $(SITEPREFIX)/man/man3

Then, the command

make install NOECHO=''

gives:

------------------------------------------------------------------------
/bin/sh -c true
/bin/sh -c true
/bin/sh -c true
/bin/sh -c true
/bin/sh -c true
/bin/sh -c true
/usr/bin/perl "-MExtUtils::Command::MM" -e pod2man "--" --section=3pm --perm_rw=644 \
lib/Compress/Raw/Bzip2.pm blib/man3/Compress::Raw::Bzip2.3pm
/bin/sh -c true
umask 02; /usr/bin/perl -MExtUtils::Install -e 'install({@ARGV}, '\''0'\'', 0, '\''0'\'');' \
read /usr/local/lib/perl/5.8.8/auto/Compress/Raw/Bzip2/.packlist \
write /home/vlefevre/lib/site_perl/x86_64-linux-gnu-thread-multi/auto/Compress/Raw/Bzip2/.packlist \
blib/lib /home/vlefevre/lib/site_perl \
blib/arch /home/vlefevre/lib/site_perl/x86_64-linux-gnu-thread-multi \
blib/bin /usr/local/bin \
blib/script /usr/local/bin \
blib/man1 /usr/local/man/man1 \
blib/man3 /usr/local/man/man3
mkdir /usr/local/man/man3: Permission denied at /usr/share/perl/5.8/ExtUtils/Install.pm line 112
make: *** [pure_site_install] Error 13
------------------------------------------------------------------------

If I add INSTALLDIRS=perl to makepl_arg in .cpan/CPAN/MyConfig.pm
(I recall I already had "LIB=~/lib/site_perl INSTALLMAN1DIR=~/man/man1
INSTALLMAN3DIR=~/man/man3"), then everything is OK. This is *really*
confusing and seems to be documented nowhere!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top