Bug#822834: FTBFS as root because of perldoc

Uli Martens uli at youam.net
Thu Apr 28 06:34:58 UTC 2016


Package: moarvm
Version: 2016.04-1
Severity: normal
Tags: patch

I've just tried building moarvm with pbuilder. This fails with the
following error:

| make[1]: Entering directory '/tmp/moarvm-2016.04'
| perldoc -F -onroff -ddebian/moar.1 \
|         -w center:MoarVM \
|         -w "release:MoarVM-2016.04" \
|         -w "date: 2016-04" \
|         docs/moar.pod
| Couldn't open debian/moar.1: Permission denied
|  at /usr/bin/perldoc line 10.
| debian/rules:47: recipe for target 'override_dh_auto_build' failed
| make[1]: *** [override_dh_auto_build] Error 13
| make[1]: Leaving directory '/tmp/moarvm-2016.04'
| debian/rules:35: recipe for target 'binary' failed
| make: *** [binary] Error 2
| dpkg-buildpackage: error: debian/rules binary gave error exit status 2

This is, considering that the build runs as root, rather unexpected.

It turns out that perldoc tries to drop all rights when started as root, and
the resulting user 'nobody' doesn't have permission to write the output file.

This is reported to perldoc's upstream in
https://rt.cpan.org/Public/Bug/Display.html?id=87837

The workaround / fix in that ticket, adding -U to perldoc's arguments in
debian/rules, works for me.

-- System Information:
Debian Release: 8.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-0.bpo.1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)



More information about the Pkg-rakudo-devel mailing list