diff mbox series

[m/unstable,2/2] UBUNTU: SAUCE: Allow to run debian/rules without (fake)root

Message ID 20231201055132.1203555-3-masahiro.yamada@canonical.com
State New
Headers show
Series Add support for rootless builds (Hackathon: KERNTT-669) | expand

Commit Message

Masahiro Yamada Dec. 1, 2023, 5:51 a.m. UTC
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>
---

 debian/rules | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/debian/rules b/debian/rules
index b78aff60ce24..787f412dba0c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -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)