e008bc975a
fully built and installed when the build is run as root. The reason this is problematical is that perldoc changes uid if run as root, to either 'nobody', 'nouser' or uid -2, for security reasons, and then cannot write files owned by root or create files in directories owned by root with 'normal' permissions. No revision bump as this should purely be a build fix.
29 lines
1.2 KiB
Text
29 lines
1.2 KiB
Text
$NetBSD: patch-ad,v 1.3 2009/04/14 23:50:20 he Exp $
|
|
|
|
Allow parrot to detect perldoc when run as root. Perldoc changes
|
|
uid to 'nobody', 'nouser' or uid -2 when run as root, so it won't
|
|
be able to write files created by root with mode 0600 (or create new
|
|
files in directories owned by root mode 0755).
|
|
|
|
--- config/auto/perldoc.pm.orig 2009-03-08 21:32:47.000000000 +0100
|
|
+++ config/auto/perldoc.pm
|
|
@@ -38,7 +38,9 @@ sub runstep {
|
|
|
|
my $cmd = $conf->data->get_p5('scriptdirexp') . q{/perldoc};
|
|
my ( $fh, $filename ) = tempfile( UNLINK => 1 );
|
|
- my $content = capture_output("$cmd -ud $filename perldoc") || undef;
|
|
+ my($stdout, $stderr, $retval) =
|
|
+ capture_output("$cmd -u perldoc > $filename");
|
|
+ my($content) = $retval ? undef : $stderr;
|
|
|
|
return 1 unless defined( $self->_initial_content_check($conf, $content) );
|
|
|
|
@@ -68,7 +70,7 @@ E_NOTE
|
|
if ( $new_perldoc ) {
|
|
$TEMP_pod_build .= <<"END"
|
|
ops$slash$pod: ..${slash}src${slash}ops${slash}$ops
|
|
-\t\$(PERLDOC) -ud ops${slash}$pod ..${slash}src${slash}ops${slash}$ops
|
|
+\t\$(PERLDOC) -u ..${slash}src${slash}ops${slash}$ops > ops${slash}$pod
|
|
\t\$(CHMOD) 0644 ops${slash}$pod
|
|
|
|
END
|