Bug#822834: FTBFS as root because of perldoc
Hello Dominique, tl;dr: the redirection works fine On Sat, Apr 30, 2016 at 05:26:54PM +0200, Dominique Dumont wrote: > Weird, I don't have any issue when building moarvm with cowbuilder. I should clarify that I've been trying to build interactively in sudo pbuilder --login, not some "build this .dsc/directory" mode because I've still been figuring out what I need to backport. But that shouldn't matter. > That said, I'm not thrilled at the idea of using an undocumented option. Ack. > In moarvm case, using perldoc ... docs/moar.pod > debian/moar.1 provides a > similat result. > > I've tested this with gbp and cowbuild. Could you test this patch on your > side > with pbuilder ? I've now tried running the build (and perldoc) with this modified makefile snippets: perldoc -F -onroff -U -ddebian/moar.A \ -w center:MoarVM \ -w "release:MoarVM-$(MOAR_VERSION)" \ -w "date:$(MOAR_DATE)" \ docs/moar.pod perldoc -F -onroff \ -w center:MoarVM \ -w "release:MoarVM-$(MOAR_VERSION)" \ -w "date:$(MOAR_DATE)" \ docs/moar.pod > debian/moar.B That is, once as it's in the official version plus -U, and once without the -d$file but with redirection. The output files were bit-identical, but the moar.A file was chmod 600, the redirected one was chmod 644. As the file gets installed by dh_installman, that should be irrelevant. youam / Uli
Bug#822834: FTBFS as root because of perldoc
Hello Uli Weird, I don't have any issue when building moarvm with cowbuilder. That said, I'm not thrilled at the idea of using an undocumented option. In moarvm case, using perldoc ... docs/moar.pod > debian/moar.1 provides a similat result. I've tested this with gbp and cowbuild. Could you test this patch on your side with pbuilder ? Anyway, thanks for taking the time to analyse the issue :-) All the best -- https://github.com/dod38fr/ -o- http://search.cpan.org/~ddumont/ http://ddumont.wordpress.com/ -o- irc: dod at irc.debian.org
Bug#822834: FTBFS as root because of perldoc
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)