* [PATCH v2] meta: add "Rules-Requires-Root: no" to various recipes
[not found] <AtFkLUZ8XUQ>
@ 2025-09-19 6:17 ` 'Badrikesh Prusty' via isar-users
2025-09-19 6:34 ` 'Badrikesh Prusty' via isar-users
0 siblings, 1 reply; 2+ messages in thread
From: 'Badrikesh Prusty' via isar-users @ 2025-09-19 6:17 UTC (permalink / raw)
To: isar-users; +Cc: badrikesh prusty
From: badrikesh prusty <badrikesh.prusty@siemens.com>
Setting "Rules-Requires-Root: no" in the debian/control file avoids
unnecessarily calling fakeroot in the build environment.
Debian recommends not using fakeroot to build a package if it is not
required i.e., if a package's build doesn't require any privileged
operations such as changing ownership to root, installing/modifying
files as root.
This also fixes hangs observed during fakeroot calls in
dpkg-buildpackage. References:
https://github.com/ilbers/isar/issues/113
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1114644
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1072521
Signed-off-by: Badrikesh Prusty <badrikesh.prusty@siemens.com>
---
RECIPE-API-CHANGELOG.md | 7 +++++++
.../recipes-bsp/optee-examples/files/debian/control.tmpl | 1 +
meta/recipes-bsp/optee-ftpm/files/debian/control.tmpl | 1 +
meta/recipes-bsp/optee-os/files/debian/control.tmpl | 1 +
.../trusted-firmware-a/files/debian/control.tmpl | 1 +
meta/recipes-bsp/u-boot/files/debian/control.tmpl | 1 +
meta/recipes-kernel/linux-module/files/debian/control.tmpl | 1 +
meta/recipes-kernel/linux/files/debian/control.tmpl | 1 +
8 files changed, 14 insertions(+)
diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
index 92e7811c..07e17aff 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -741,3 +741,10 @@ By setting `MS_TPM_20_REF_DIR` in an optee-ftpm recipe, it is now possible to
use the new optee_ftpm code base from the OP-TEE project. That variable has to
point to a subdir in `WORKDIR` which contains the unpacked ms-tpm-20-ref source
code.
+
+### Avoid unnecessary use of fakeroot
+
+Set `Rules-Requires-Root: no` in `debian/control` files to prevent unnecessary
+invocation of fakeroot during package builds. This follows Debian guidelines
+recommending not to use fakeroot when no privileged operations (e.g., `chown`,
+root file modifications) are required.
diff --git a/meta-isar/recipes-bsp/optee-examples/files/debian/control.tmpl b/meta-isar/recipes-bsp/optee-examples/files/debian/control.tmpl
index 85c9735f..9b930157 100644
--- a/meta-isar/recipes-bsp/optee-examples/files/debian/control.tmpl
+++ b/meta-isar/recipes-bsp/optee-examples/files/debian/control.tmpl
@@ -4,6 +4,7 @@ Priority: optional
Standards-Version: 3.9.6
Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}), ${DEBIAN_BUILD_DEPENDS}
Maintainer: ISAR project <isar-users@googlegroups.com>
+Rules-Requires-Root: no
Package: ${PN}-acipher-ta
Architecture: ${DISTRO_ARCH}
diff --git a/meta/recipes-bsp/optee-ftpm/files/debian/control.tmpl b/meta/recipes-bsp/optee-ftpm/files/debian/control.tmpl
index e6af7554..3e8e6920 100644
--- a/meta/recipes-bsp/optee-ftpm/files/debian/control.tmpl
+++ b/meta/recipes-bsp/optee-ftpm/files/debian/control.tmpl
@@ -4,6 +4,7 @@ Priority: optional
Standards-Version: 3.9.6
Maintainer: Unknown maintainer <unknown@example.com>
Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}), ${DEBIAN_BUILD_DEPENDS}
+Rules-Requires-Root: no
Package: ${PN}
Architecture: any
diff --git a/meta/recipes-bsp/optee-os/files/debian/control.tmpl b/meta/recipes-bsp/optee-os/files/debian/control.tmpl
index 7bcd6edb..2a3076d3 100644
--- a/meta/recipes-bsp/optee-os/files/debian/control.tmpl
+++ b/meta/recipes-bsp/optee-os/files/debian/control.tmpl
@@ -4,6 +4,7 @@ Priority: optional
Standards-Version: 3.9.6
Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}), ${DEBIAN_BUILD_DEPENDS}
Maintainer: ISAR project <isar-users@googlegroups.com>
+Rules-Requires-Root: no
Package: ${DEBIAN_PACKAGE_NAME}
Architecture: ${DISTRO_ARCH}
diff --git a/meta/recipes-bsp/trusted-firmware-a/files/debian/control.tmpl b/meta/recipes-bsp/trusted-firmware-a/files/debian/control.tmpl
index cf4607e3..5de639d9 100644
--- a/meta/recipes-bsp/trusted-firmware-a/files/debian/control.tmpl
+++ b/meta/recipes-bsp/trusted-firmware-a/files/debian/control.tmpl
@@ -4,6 +4,7 @@ Priority: optional
Standards-Version: 3.9.6
Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}), ${DEBIAN_BUILD_DEPENDS}
Maintainer: ISAR project <isar-users@googlegroups.com>
+Rules-Requires-Root: no
Package: trusted-firmware-a-${TF_A_NAME}
Architecture: ${DISTRO_ARCH}
diff --git a/meta/recipes-bsp/u-boot/files/debian/control.tmpl b/meta/recipes-bsp/u-boot/files/debian/control.tmpl
index 006982c2..58f59ce6 100644
--- a/meta/recipes-bsp/u-boot/files/debian/control.tmpl
+++ b/meta/recipes-bsp/u-boot/files/debian/control.tmpl
@@ -4,6 +4,7 @@ Priority: optional
Standards-Version: 3.9.6
Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}), ${DEBIAN_BUILD_DEPENDS}
Maintainer: ISAR project <isar-users@googlegroups.com>
+Rules-Requires-Root: no
Package: u-boot-${MACHINE}
Architecture: ${DISTRO_ARCH}
diff --git a/meta/recipes-kernel/linux-module/files/debian/control.tmpl b/meta/recipes-kernel/linux-module/files/debian/control.tmpl
index 45fcbc0e..95e6e84a 100644
--- a/meta/recipes-kernel/linux-module/files/debian/control.tmpl
+++ b/meta/recipes-kernel/linux-module/files/debian/control.tmpl
@@ -4,6 +4,7 @@ Priority: optional
Standards-Version: 3.9.6
Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}), ${DEBIAN_BUILD_DEPENDS}
Maintainer: ${MAINTAINER}
+Rules-Requires-Root: no
Package: ${PN}
Architecture: any
diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
index a79b86c4..2097a56d 100644
--- a/meta/recipes-kernel/linux/files/debian/control.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
@@ -4,6 +4,7 @@ Priority: optional
Maintainer: ${MAINTAINER}
Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}), bc, kmod, cpio, ${KBUILD_DEPENDS}
Homepage: http://www.kernel.org/
+Rules-Requires-Root: no
Package: linux-image-${KERNEL_NAME_PROVIDED}
Build-Profiles: <kernel>
--
2.47.3
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250919061720.1510008-1-badrikesh.prusty%40siemens.com.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] meta: add "Rules-Requires-Root: no" to various recipes
2025-09-19 6:17 ` [PATCH v2] meta: add "Rules-Requires-Root: no" to various recipes 'Badrikesh Prusty' via isar-users
@ 2025-09-19 6:34 ` 'Badrikesh Prusty' via isar-users
0 siblings, 0 replies; 2+ messages in thread
From: 'Badrikesh Prusty' via isar-users @ 2025-09-19 6:34 UTC (permalink / raw)
To: isar-users
[-- Attachment #1.1: Type: text/plain, Size: 6807 bytes --]
This is the v2 of older
patch: https://groups.google.com/g/isar-users/c/AtFkLUZ8XUQ
Thanks,
Badrikesh
On Friday, September 19, 2025 at 11:47:49 AM UTC+5:30 Badrikesh Prusty
wrote:
> From: badrikesh prusty <badrikes...@siemens.com>
>
> Setting "Rules-Requires-Root: no" in the debian/control file avoids
> unnecessarily calling fakeroot in the build environment.
>
> Debian recommends not using fakeroot to build a package if it is not
> required i.e., if a package's build doesn't require any privileged
> operations such as changing ownership to root, installing/modifying
> files as root.
>
> This also fixes hangs observed during fakeroot calls in
> dpkg-buildpackage. References:
> https://github.com/ilbers/isar/issues/113
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1114644
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1072521
>
> Signed-off-by: Badrikesh Prusty <badrikes...@siemens.com>
> ---
> RECIPE-API-CHANGELOG.md | 7 +++++++
> .../recipes-bsp/optee-examples/files/debian/control.tmpl | 1 +
> meta/recipes-bsp/optee-ftpm/files/debian/control.tmpl | 1 +
> meta/recipes-bsp/optee-os/files/debian/control.tmpl | 1 +
> .../trusted-firmware-a/files/debian/control.tmpl | 1 +
> meta/recipes-bsp/u-boot/files/debian/control.tmpl | 1 +
> meta/recipes-kernel/linux-module/files/debian/control.tmpl | 1 +
> meta/recipes-kernel/linux/files/debian/control.tmpl | 1 +
> 8 files changed, 14 insertions(+)
>
> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
> index 92e7811c..07e17aff 100644
> --- a/RECIPE-API-CHANGELOG.md
> +++ b/RECIPE-API-CHANGELOG.md
> @@ -741,3 +741,10 @@ By setting `MS_TPM_20_REF_DIR` in an optee-ftpm
> recipe, it is now possible to
> use the new optee_ftpm code base from the OP-TEE project. That variable
> has to
> point to a subdir in `WORKDIR` which contains the unpacked ms-tpm-20-ref
> source
> code.
> +
> +### Avoid unnecessary use of fakeroot
> +
> +Set `Rules-Requires-Root: no` in `debian/control` files to prevent
> unnecessary
> +invocation of fakeroot during package builds. This follows Debian
> guidelines
> +recommending not to use fakeroot when no privileged operations (e.g.,
> `chown`,
> +root file modifications) are required.
> diff --git
> a/meta-isar/recipes-bsp/optee-examples/files/debian/control.tmpl
> b/meta-isar/recipes-bsp/optee-examples/files/debian/control.tmpl
> index 85c9735f..9b930157 100644
> --- a/meta-isar/recipes-bsp/optee-examples/files/debian/control.tmpl
> +++ b/meta-isar/recipes-bsp/optee-examples/files/debian/control.tmpl
> @@ -4,6 +4,7 @@ Priority: optional
> Standards-Version: 3.9.6
> Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}),
> ${DEBIAN_BUILD_DEPENDS}
> Maintainer: ISAR project <isar-...@googlegroups.com>
> +Rules-Requires-Root: no
>
> Package: ${PN}-acipher-ta
> Architecture: ${DISTRO_ARCH}
> diff --git a/meta/recipes-bsp/optee-ftpm/files/debian/control.tmpl
> b/meta/recipes-bsp/optee-ftpm/files/debian/control.tmpl
> index e6af7554..3e8e6920 100644
> --- a/meta/recipes-bsp/optee-ftpm/files/debian/control.tmpl
> +++ b/meta/recipes-bsp/optee-ftpm/files/debian/control.tmpl
> @@ -4,6 +4,7 @@ Priority: optional
> Standards-Version: 3.9.6
> Maintainer: Unknown maintainer <unk...@example.com>
> Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}),
> ${DEBIAN_BUILD_DEPENDS}
> +Rules-Requires-Root: no
>
> Package: ${PN}
> Architecture: any
> diff --git a/meta/recipes-bsp/optee-os/files/debian/control.tmpl
> b/meta/recipes-bsp/optee-os/files/debian/control.tmpl
> index 7bcd6edb..2a3076d3 100644
> --- a/meta/recipes-bsp/optee-os/files/debian/control.tmpl
> +++ b/meta/recipes-bsp/optee-os/files/debian/control.tmpl
> @@ -4,6 +4,7 @@ Priority: optional
> Standards-Version: 3.9.6
> Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}),
> ${DEBIAN_BUILD_DEPENDS}
> Maintainer: ISAR project <isar-...@googlegroups.com>
> +Rules-Requires-Root: no
>
> Package: ${DEBIAN_PACKAGE_NAME}
> Architecture: ${DISTRO_ARCH}
> diff --git a/meta/recipes-bsp/trusted-firmware-a/files/debian/control.tmpl
> b/meta/recipes-bsp/trusted-firmware-a/files/debian/control.tmpl
> index cf4607e3..5de639d9 100644
> --- a/meta/recipes-bsp/trusted-firmware-a/files/debian/control.tmpl
> +++ b/meta/recipes-bsp/trusted-firmware-a/files/debian/control.tmpl
> @@ -4,6 +4,7 @@ Priority: optional
> Standards-Version: 3.9.6
> Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}),
> ${DEBIAN_BUILD_DEPENDS}
> Maintainer: ISAR project <isar-...@googlegroups.com>
> +Rules-Requires-Root: no
>
> Package: trusted-firmware-a-${TF_A_NAME}
> Architecture: ${DISTRO_ARCH}
> diff --git a/meta/recipes-bsp/u-boot/files/debian/control.tmpl
> b/meta/recipes-bsp/u-boot/files/debian/control.tmpl
> index 006982c2..58f59ce6 100644
> --- a/meta/recipes-bsp/u-boot/files/debian/control.tmpl
> +++ b/meta/recipes-bsp/u-boot/files/debian/control.tmpl
> @@ -4,6 +4,7 @@ Priority: optional
> Standards-Version: 3.9.6
> Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}),
> ${DEBIAN_BUILD_DEPENDS}
> Maintainer: ISAR project <isar-...@googlegroups.com>
> +Rules-Requires-Root: no
>
> Package: u-boot-${MACHINE}
> Architecture: ${DISTRO_ARCH}
> diff --git a/meta/recipes-kernel/linux-module/files/debian/control.tmpl
> b/meta/recipes-kernel/linux-module/files/debian/control.tmpl
> index 45fcbc0e..95e6e84a 100644
> --- a/meta/recipes-kernel/linux-module/files/debian/control.tmpl
> +++ b/meta/recipes-kernel/linux-module/files/debian/control.tmpl
> @@ -4,6 +4,7 @@ Priority: optional
> Standards-Version: 3.9.6
> Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}),
> ${DEBIAN_BUILD_DEPENDS}
> Maintainer: ${MAINTAINER}
> +Rules-Requires-Root: no
>
> Package: ${PN}
> Architecture: any
> diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl
> b/meta/recipes-kernel/linux/files/debian/control.tmpl
> index a79b86c4..2097a56d 100644
> --- a/meta/recipes-kernel/linux/files/debian/control.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
> @@ -4,6 +4,7 @@ Priority: optional
> Maintainer: ${MAINTAINER}
> Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}), bc, kmod, cpio,
> ${KBUILD_DEPENDS}
> Homepage: http://www.kernel.org/
> +Rules-Requires-Root: no
>
> Package: linux-image-${KERNEL_NAME_PROVIDED}
> Build-Profiles: <kernel>
> --
> 2.47.3
>
>
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/d78593be-ca92-4b8a-a2f5-b3c6ad062b5cn%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 9134 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-19 6:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <AtFkLUZ8XUQ>
2025-09-19 6:17 ` [PATCH v2] meta: add "Rules-Requires-Root: no" to various recipes 'Badrikesh Prusty' via isar-users
2025-09-19 6:34 ` 'Badrikesh Prusty' via isar-users
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox