[noble PATCH v2 3/3] UBUNTU: SAUCE: Allow to run debian/rules without (fake)root

Dimitri John Ledkov dimitri.ledkov at canonical.com
Mon Dec 4 23:47:40 UTC 2023


On Mon, 4 Dec 2023 at 01:50, Masahiro Yamada
<masahiro.yamada at 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 at 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 at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team



-- 
Dimitri

Sent from Ubuntu Pro
https://ubuntu.com/pro



More information about the kernel-team mailing list