public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Badrikesh Prusty' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: badrikesh prusty <badrikesh.prusty@siemens.com>
Subject: [PATCH v2] meta: add "Rules-Requires-Root: no" to various recipes
Date: Fri, 19 Sep 2025 02:17:20 -0400	[thread overview]
Message-ID: <20250919061720.1510008-1-badrikesh.prusty@siemens.com> (raw)
In-Reply-To: <AtFkLUZ8XUQ>

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.

       reply	other threads:[~2025-09-19  6:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AtFkLUZ8XUQ>
2025-09-19  6:17 ` 'Badrikesh Prusty' via isar-users [this message]
2025-09-19  6:34   ` 'Badrikesh Prusty' via isar-users

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250919061720.1510008-1-badrikesh.prusty@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=badrikesh.prusty@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox