On Fri, 2020-10-30 at 17:56 +0100, Petr Vorel wrote: > This fixes make bindeb-pkg for RPM based distros, which don't have > dpkg-dev (and thus not /usr/bin/dpkg-buildpackage), which sets > $DEB_RULES_REQUIRES_ROOT. > > Fixes: 3e8541803624 ("builddeb: Enable rootless builds") This doesn't seem to fix a bug, and in fact it would introduce one. > Signed-off-by: Petr Vorel <petr.vorel@xxxxxxxxx> [...] > --- a/scripts/package/builddeb > +++ b/scripts/package/builddeb > @@ -37,7 +37,7 @@ create_package() { > | xargs -r0 md5sum > DEBIAN/md5sums" > > # Fix ownership and permissions > - if [ "$DEB_RULES_REQUIRES_ROOT" = "no" ]; then > + if [ -z "$DEB_RULES_REQUIRES_ROOT" -o "$DEB_RULES_REQUIRES_ROOT" = "no" ]; then > dpkg_deb_opts="--root-owner-group" > else > chown -R root:root "$pdir" This is the wrong default behaviour; it will cause a regression with older versions of dpkg that don't support this option. If you invoke this script directly and do not use dpkg-buildpackage (which I don't think is really supported anyway) then you must either do so as root or use fakeroot (as dpkg-buildpackage does by default). Ben. -- Ben Hutchings The first rule of tautology club is the first rule of tautology club.
Attachment:
signature.asc
Description: This is a digitally signed message part