Message ID | 20231204014949.2034062-4-masahiro.yamada@canonical.com |
---|---|
State | New |
Headers | show |
Series | Add support for rootless builds (Hackathon: KERNTT-669) | expand |
On Mon, 4 Dec 2023 at 01:50, Masahiro Yamada <masahiro.yamada@canonical.com> wrote: > > 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. > Very nice. Separately I think it is worth (later on) to make fdr alias to actually do `DEB_RULES_REQUIRES_ROOT=no debian/rules` for noble+ once all of our packages are converted to RRR:no. > Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com> > --- > > (no changes since v1) > > debian/rules | 3 +++ > 1 file changed, 3 insertions(+) > > 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) > -- > 2.40.1 > > > -- > kernel-team mailing list > kernel-team@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/kernel-team
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)
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> --- (no changes since v1) debian/rules | 3 +++ 1 file changed, 3 insertions(+)