Andre Noll:
On Sat, Dec 07, 20:34, Niels Thykier wroteDuring a test rebuild for building packages with `Rules-Requires-Root: no` as the default in `dpkg`, liblopsub failed to rebuild. Log Summary:[...]debian/rules clean rm -f debian/substvars /usr/bin/make distclean make[1]: Entering directory '/<<PKGBUILDDIR>>'The looks weird. Instead of '/<<PKGBUILDDIR>>' this should print the actual name of the build directory.
It is standard for `sbuild` to replace the current dir with this placeholder, so that is why you see it here.
In the full log (https://people.debian.org/~nthykier/rrr-no-as-default/logs/liblopsub_1.0.5-1.1009822.build.gz), you can see them identifide with lines like
I: NOTICE: Log filtering will replace 'build/liblopsub-Ok2CRc/liblopsub-1.0.5' with '<<PKGBUILDDIR>>' I: NOTICE: Log filtering will replace 'build/liblopsub-Ok2CRc' with '<<BUILDDIR>>'
install -p -d -o root -g root -m 755 /<<PKGBUILDDIR>>/debian/tmp/usr/lib install: cannot change owner and permissions of ‘/<<PKGBUILDDIR>>/debian/tmp/usr/lib’: Operation not permittedThis corresponds to the $(MAKE_DIR) $(TMPDIR)/usr/lib line in debian/rules. Here MAKE_DIR expands to install -p -d -o root -g root -m 755 which fails due to insufficient permissions. Omitting the -o and -g options would likely fix the problem, but that might cause other issues because then all installed files and directories will be owned by the UID/GID that invoked make. What do you suggest? Thanks Andre
Ideally, in the case of liblopsub, the *Debian* build would have the expanded $(MAKE_DIR) resolve **without** `-o root -g root`. Based on the code, I think you can pretty much just remove `INST_OWN` from `debian/rules` and it should work.
For this to fully work, you should also have a call to `dh_fixperms` at the right place. In this case, adding it just before `dh_makeshlibs` should be fine. Double check it does not change any mode that is important in your case (in most cases, it will not).
With these two changes in place, liblopsub should be able to build without requiring any form of root during the `binary` target. You can test this by adding `Rules-Requires-Root: no` to the source stanza of `debian/control` (e.g., just before the `Standards-Versions` field).
Best regards, Niels
OpenPGP_signature.asc
Description: OpenPGP digital signature