petdance/scratch — Issue #953: perldoc detection fails if build runs as root
Author: petdance
Created: 2011-11-01 05:38:38+00:00
State: open
Labels: bug, configure, Pri-normal, Sev-medium

If you build parrot as root, the detection of perldoc
will always fail. The reason is that perldoc for security
reasons runs as either 'nobody', 'nouser' or uid -2.
Therefore, it cannot write to a file given as the argument
to perldoc's -d option, when that file is created by File::Temp,
since it's owned by root and has mode 0600.

It also appears to me that the first part of the perldoc
test is ... a little sketchy in how it should behave?
capture_output doesn't collect STDERR output, it captures
STDOUT output.

I know, using > instead of perldoc's -d option is possibly
port unfriendly to non-Unix systems, so a better way of
testing should probably be found. In my case, I do this
for only Unix-y systems, so permit myself some leeway here.

Patch to be attached.

Regards,

- Håvard

Originally http://trac.parrot.org/parrot/ticket/555