Subject: | CPAN install as root fails at make test |
(version actually 3.16. rt doesn't offer that one yet :-)
Thank you for rapid fix to #64926. However, now a CPAN install fails
differently when run as root:
--------------------------
$ sudo cpan -i Apache2::AuthCookie
CPAN: Storable loaded ok (v2.20)
Going to read '/home/sysadm/.cpan/Metadata'
Database was generated on Wed, 19 Jan 2011 19:36:18 GMT
Running install for module 'Apache2::AuthCookie'
CPAN: YAML loaded ok (v0.71)
Running make for M/MS/MSCHOUT/Apache-AuthCookie-3.16.tar.gz
CPAN: Digest::SHA loaded ok (v5.48)
CPAN: Compress::Zlib loaded ok (v2.02)
Checksum for /home/sysadm/.cpan/sources/authors/id/M/MS/MSCHOUT/Apache-
AuthCookie-3.16.tar.gz ok
CPAN: Archive::Tar loaded ok (v1.52)
Apache-AuthCookie-3.16
Apache-AuthCookie-3.16/README
Apache-AuthCookie-3.16/Changes
Apache-AuthCookie-3.16/LICENSE
Apache-AuthCookie-3.16/dist.ini
Apache-AuthCookie-3.16/t
Apache-AuthCookie-3.16/t/real.t
Apache-AuthCookie-3.16/META.yml
Apache-AuthCookie-3.16/MANIFEST
Apache-AuthCookie-3.16/t/TEST.PL
Apache-AuthCookie-3.16/SIGNATURE
Apache-AuthCookie-3.16/weaver.ini
Apache-AuthCookie-3.16/Makefile.PL
Apache-AuthCookie-3.16/t/startup.pl
Apache-AuthCookie-3.16/MANIFEST.SKIP
Apache-AuthCookie-3.16/t/signature.t
Apache-AuthCookie-3.16/README.modperl2
Apache-AuthCookie-3.16/t/conf
Apache-AuthCookie-3.16/t/conf/extra.conf.in
Apache-AuthCookie-3.16/t/htdocs/docs
Apache-AuthCookie-3.16/t/htdocs/docs/login.pl
Apache-AuthCookie-3.16/t/htdocs/docs/logout.pl
Apache-AuthCookie-3.16/t/htdocs/docs/index.html
Apache-AuthCookie-3.16/lib/Apache
Apache-AuthCookie-3.16/lib/Apache/AuthCookie.pm
Apache-AuthCookie-3.16/lib/Apache2
Apache-AuthCookie-3.16/lib/Apache2/AuthCookie.pm
Apache-AuthCookie-3.16/t/htdocs/docs/echo_cookie.pl
Apache-AuthCookie-3.16/lib/Apache/AuthCookie
Apache-AuthCookie-3.16/lib/Apache/AuthCookie/Util.pm
Apache-AuthCookie-3.16/lib/Apache/AuthCookie/FAQ.pod
Apache-AuthCookie-3.16/t/Skeleton
Apache-AuthCookie-3.16/t/Skeleton/AuthCookieHandler.pm
Apache-AuthCookie-3.16/t/htdocs/docs/authany
Apache-AuthCookie-3.16/t/htdocs/docs/authany/get_me.html
Apache-AuthCookie-3.16/t/htdocs/docs/authall
Apache-AuthCookie-3.16/t/htdocs/docs/authall/get_me.html
Apache-AuthCookie-3.16/t/htdocs/docs/stimeout
Apache-AuthCookie-3.16/t/htdocs/docs/stimeout/get_me.html
Apache-AuthCookie-3.16/t/htdocs/docs/protected
Apache-AuthCookie-3.16/t/htdocs/docs/protected/get_me.html
Apache-AuthCookie-3.16/t/htdocs/docs/cookiename
Apache-AuthCookie-3.16/t/htdocs/docs/cookiename/get_me.html
Apache-AuthCookie-3.16/t/htdocs/docs/protected/echo_user.pl
Apache-AuthCookie-3.16/t/lib/Sample
Apache-AuthCookie-3.16/t/lib/Sample/AuthCookieHandler.pm.mp2
Apache-AuthCookie-3.16/t/lib/Sample/AuthCookieHandler.pm.mp1
CPAN: File::Temp loaded ok (v0.22)
CPAN.pm: Going to build M/MS/MSCHOUT/Apache-AuthCookie-3.16.tar.gz
selected t/lib/Sample/AuthCookieHandler.pm.mp2
[ info] generating script t/TEST
Checking if your kit is complete...
Looks good
Writing Makefile for Apache::AuthCookie
cp lib/Apache/AuthCookie/Util.pm blib/lib/Apache/AuthCookie/Util.pm
cp lib/Apache2/AuthCookie.pm blib/lib/Apache2/AuthCookie.pm
cp lib/Apache/AuthCookie.pm blib/lib/Apache/AuthCookie.pm
cp lib/Apache/AuthCookie/FAQ.pod blib/lib/Apache/AuthCookie/FAQ.pod
Manifying blib/man3/Apache::AuthCookie::Util.3pm
Manifying blib/man3/Apache2::AuthCookie.3pm
Manifying blib/man3/Apache::AuthCookie.3pm
Manifying blib/man3/Apache::AuthCookie::FAQ.3pm
MSCHOUT/Apache-AuthCookie-3.16.tar.gz
/usr/bin/make -- OK
Running make test
/usr/bin/perl -Iblib/arch -Iblib/lib \
t/TEST -clean
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/bin/perl /home/sysadm/.cpan/build/Apache-
AuthCookie-3.16-bxAwjI/t/TEST -clean
APACHE_TEST_GROUP= APACHE_TEST_HTTPD= APACHE_TEST_PORT=
APACHE_TEST_USER= APACHE_TEST_APXS= \
/usr/bin/perl -Iblib/arch -Iblib/lib \
t/TEST -bugreport -verbose=0
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/bin/perl /home/sysadm/.cpan/build/Apache-
AuthCookie-3.16-bxAwjI/t/TEST -bugreport -verbose=0
[ error] Apache cannot spawn child processes as root, therefore the
test suite must be run as a non-privileged user.
make: *** [run_tests] Error 1
MSCHOUT/Apache-AuthCookie-3.16.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module,
try:
reports MSCHOUT/Apache-AuthCookie-3.16.tar.gz
Running make install
make test had returned bad status, won't install without force
--------------------------
This error is coming from /usr/local/lib/perl/5.10.1/Apache/TestRun.pm
if ($user eq 'root') {
error "Apache cannot spawn child processes as root, therefore
the test suite must be run as a non-privileged user.";
exit_perl(0);
}
This is different code to the one which comes with mod_perl2 in
/usr/lib/perl5/Apache/TestRun.pm
You are running the test suite under user 'root'.
Apache cannot spawn child processes as 'root', therefore
we attempt to run the test suite with user '$user' ($uid:$gid).
That code also skips the test suite if it finds the filesystem
permissions are unsuitable for running apache as that uid/gid. That
seems to be a reasonable thing to do, but it looks like the newer
Apache::TestRun is less forgiving.
If I run cpan as a non-root user instead, the tests are OK, but copying
the files to their final location fails:
--------------------------
...
/usr/bin/make test -- OK
Running make install
Prepending /home/sysadm/.cpan/build/Apache-AuthCookie-3.16-
3_lFW0/blib/arch /home/sysadm/.cpan/build/Apache-AuthCookie-3.16-
3_lFW0/blib/lib to PERL5LIB for 'install'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/usr/local/man/man3'
Do not have write permissions on '/usr/local/man/man3'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
at -e line 1
make: *** [pure_site_install] Error 13
MSCHOUT/Apache-AuthCookie-3.16.tar.gz
/usr/bin/make install -- NOT OK
----
You may have to su to root to install the package
(Or you may want to run something like
o conf make_install_make_command 'sudo make'
to raise your permissions.
--------------------------
The o conf option gives a potential workaround, but you have to remember
to run cpan as a non-root user.