Hello Niels et al.
Now that most packages allow building without fakeroot, I would
expect this to work:
(Using indent as an example because it has Rules-Requires-Root: no
and a very low build time)
$ apt-get source indent
$ cd indent-2.2.13
$ debian/rules build
[...]
$ debian/rules binary
dh binary
dh_testroot
dh_testroot: error: You must run this as root (or use fakeroot).
make: *** [debian/rules:3: binary] Error 255
If I replace dh_testroot by a symlink to true, then it fails
because dh_installdocs tries to use chown.
This is strange because I don't need fakeroot at all inside
the chroot when I build the package using dpkg-buildpackage.
Not sure if my expectancy is realistic or not, maybe I'm
missing something.
Thanks.
Santiago Vila: Hi, That is correct behavior for debhelper according to the rootless spec and the necessary support for packages that do require (fake)root, where the builder exposes DEB_RULES_REQUIRES_ROOT to announce whether it is a rootless builds. You (as a package builder) need to use `dpkg-buildpackage` to invoke `debian/rules` for rootless builds. If you (as a maintainer) for some reason need to debug some very specific issue (etc.) where bypassing `dpkg-buildpackage` is imperative, you can use `DEB_RULES_REQUIRES_ROOT=<value> debian/rules binary`. Best regards, Niels