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 > > 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 > --- > 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 > +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 > 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 > +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 > +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 > +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: > -- > 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.