UBUNTU: [Packaging] Allow to run debian/rules without (fake)root

While DEB_RULES_REQUIRES_ROOT is set by build drivers like
dpkg-buildpackage, we often run debian/rules directly.

Typing "fakeroot debian/rules ..." can be tedious, so we introduced
a shorthand

  alias fdr="fakeroot debian/rules"

By setting DEB_RULES_REQUIRES_ROOT=no, debhelpers will function as
intended even when debian/rules is directly executed without fakeroot.

Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
Acked-by: Agathe Porte <agathe.porte@canonical.com>
Acked-by: Thibault Ferrante <thibault.ferrante@canonical.com>
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
This commit is contained in:
Masahiro Yamada
2023-12-04 10:49:49 +09:00
committed by Paolo Pisati
parent a8c08a2198
commit 5eccec0868
+3
View File
@@ -11,6 +11,9 @@
# (this increases performance and avoids hard-to-debug behaviour)
MAKEFLAGS += -rR
# Allow to run debian/rules directly without root
export DEB_RULES_REQUIRES_ROOT := no
.NOTPARALLEL:
DEBIAN=$(shell awk -F= '($$1 == "DEBIAN") { print $$2 }' <debian/debian.env)