public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] debianize: set Rules-Requires-Root in debian/control
@ 2025-08-13  8:48 Isaac True
  2025-08-15 13:07 ` 'Prusty, Badrikesh' via isar-users
  0 siblings, 1 reply; 9+ messages in thread
From: Isaac True @ 2025-08-13  8:48 UTC (permalink / raw)
  To: isar-users; +Cc: Isaac True

Setting "Rules-Requires-Root: no" in the debian/control file avoids
unnecessarily calling fakeroot in the build environment. Packages which
require root can override the new "DEBIAN_RULES_REQUIRES_ROOT" variable
with the desired value.

This is particularly useful when using dpkg-raw, as it no longer needs
fakeroot to create the packages. This provides a considerable speedup in
some environments (e.g. systems with very high open file descriptor
limits and specific versions of fakeroot).

Signed-off-by: Isaac True <itrue@emlix.com>
---
 meta/classes/debianize.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
index 4989c601..eeebea69 100644
--- a/meta/classes/debianize.bbclass
+++ b/meta/classes/debianize.bbclass
@@ -16,6 +16,7 @@ DEBIAN_BREAKS ??= ""
 DEBIAN_MULTI_ARCH ??= "no"
 DEBIAN_COMPAT ??= "10"
 DEBIAN_CHANGELOG_TIMESTAMP ??= "3600"
+DEBIAN_RULES_REQUIRES_ROOT ??= "no"
 DESCRIPTION ??= "must not be empty"
 MAINTAINER ??= "Unknown maintainer <unknown@example.com>"
 
@@ -74,7 +75,8 @@ deb_create_control[vardeps] += "DEBIANIZE_BUILD_DEPENDS \
                                 DEBIAN_PROVIDES \
                                 DEBIAN_REPLACES \
                                 DEBIAN_BREAKS \
-                                DEBIAN_CONFLICTS"
+                                DEBIAN_CONFLICTS \
+                                DEBIAN_RULES_REQUIRES_ROOT"
 deb_create_control() {
 	cat << EOF > ${S}/debian/control
 Source: ${BPN}
@@ -83,6 +85,7 @@ Priority: optional
 Standards-Version: 3.9.6
 Maintainer: ${MAINTAINER}
 Build-Depends: ${@ deb_list_beautify(d, 'DEBIANIZE_BUILD_DEPENDS')}
+Rules-Requires-Root: ${DEBIAN_RULES_REQUIRES_ROOT}
 
 Package: ${BPN}
 Architecture: ${DPKG_ARCH}

-- 
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/20250813084852.2503053-3-itrue%40emlix.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH] debianize: set Rules-Requires-Root in debian/control
@ 2025-08-14 14:34 Isaac True
  2025-08-15 13:01 ` 'Jan Kiszka' via isar-users
  0 siblings, 1 reply; 9+ messages in thread
From: Isaac True @ 2025-08-14 14:34 UTC (permalink / raw)
  To: isar-users; +Cc: Isaac True

Setting "Rules-Requires-Root: no" in the debian/control file avoids
unnecessarily calling fakeroot in the build environment. Packages which
require root can override the new "DEBIAN_RULES_REQUIRES_ROOT" variable
with the desired value.

This is specifically useful when using dpkg-raw, as it no longer needs
fakeroot to create the packages. This provides a considerable speedup in
some environments (e.g. systems with very high open file descriptor
limits and specific versions of fakeroot).

Signed-off-by: Isaac True <itrue@emlix.com>
---
 meta/classes/debianize.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
index 4989c601..eeebea69 100644
--- a/meta/classes/debianize.bbclass
+++ b/meta/classes/debianize.bbclass
@@ -16,6 +16,7 @@ DEBIAN_BREAKS ??= ""
 DEBIAN_MULTI_ARCH ??= "no"
 DEBIAN_COMPAT ??= "10"
 DEBIAN_CHANGELOG_TIMESTAMP ??= "3600"
+DEBIAN_RULES_REQUIRES_ROOT ??= "no"
 DESCRIPTION ??= "must not be empty"
 MAINTAINER ??= "Unknown maintainer <unknown@example.com>"
 
@@ -74,7 +75,8 @@ deb_create_control[vardeps] += "DEBIANIZE_BUILD_DEPENDS \
                                 DEBIAN_PROVIDES \
                                 DEBIAN_REPLACES \
                                 DEBIAN_BREAKS \
-                                DEBIAN_CONFLICTS"
+                                DEBIAN_CONFLICTS \
+                                DEBIAN_RULES_REQUIRES_ROOT"
 deb_create_control() {
 	cat << EOF > ${S}/debian/control
 Source: ${BPN}
@@ -83,6 +85,7 @@ Priority: optional
 Standards-Version: 3.9.6
 Maintainer: ${MAINTAINER}
 Build-Depends: ${@ deb_list_beautify(d, 'DEBIANIZE_BUILD_DEPENDS')}
+Rules-Requires-Root: ${DEBIAN_RULES_REQUIRES_ROOT}
 
 Package: ${BPN}
 Architecture: ${DPKG_ARCH}

-- 
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/20250814143405.204360-2-itrue%40emlix.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-08-19 13:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-13  8:48 [PATCH] debianize: set Rules-Requires-Root in debian/control Isaac True
2025-08-15 13:07 ` 'Prusty, Badrikesh' via isar-users
2025-08-15 13:44   ` 'Jan Kiszka' via isar-users
2025-08-15 13:49     ` 'Prusty, Badrikesh' via isar-users
2025-08-15 14:15       ` 'Prusty, Badrikesh' via isar-users
2025-08-14 14:34 Isaac True
2025-08-15 13:01 ` 'Jan Kiszka' via isar-users
2025-08-15 13:09   ` Isaac True
2025-08-15 13:39     ` 'Jan Kiszka' 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