From patchwork Sun Sep 7 20:42:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Badrikesh Prusty X-Patchwork-Id: 4336 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Sun, 07 Sep 2025 22:43:22 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-wr1-f62.google.com (mail-wr1-f62.google.com [209.85.221.62]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 587KhLjZ032096 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 7 Sep 2025 22:43:21 +0200 Received: by mail-wr1-f62.google.com with SMTP id ffacd0b85a97d-3dabec38299sf2313403f8f.2 for ; Sun, 07 Sep 2025 13:43:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1757277796; cv=pass; d=google.com; s=arc-20240605; b=coYDvO3zMUcwedAWfId1dUBICIySZhJ9JFknVvgDUQXEi7bfqFUmy4PDOILFRaJ9/g vRXqB8UJUjGEU841ZyCEuTNIpk/ZhMtl/K2lcDrkpYWcq3UuieT4o21fiMXCYbtRCiWO CGj8MuZOYHdpdIek2hAD41p/ajSKQ/qd+WHeJDnb24cxyvXqvkDXIq46M51IU517w8QB Y+8aAPYFAEyYeyEJFuNvPfo+aWeHNGAFGoItgqRmxlLoJOROm0Do72AP4W2C07cwGANG GuU0y2PM8fe8gMzRoGMmcCbh7k0xLgLcLn4EwG6nGnE83HkeLYkTLaBK5YfutRMlYdUE pEXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3KiOcnRDBzf7Mdn1IFG34+7x7wU9qpcL8ET4BFTByqs=; fh=7JLig8wdtRqSg3zrBFVEFaZzcX2Q71RjkdMiduZle6c=; b=AVLsxgXEqL6CXGwyfnNtbT6mlhOOaJ1RJru18zXEhycQTKqC4S3rtjfAqle3OuJTSq ZOu69BMm7HohMV+ZXdBy9lLhBqg+6AVyJyqWuUp7W3tbqnleJbTUbWCzQtJurB8m1cp9 ysGl1C/YQ7IizjaJqchXBq/dL2Jd6Um+HCG6gM+7zJlK6bCbP+SIy3MVOp+VmvsXSqzr EkLnjhlzHZAn57GdjVKDjLohqQlcuRMQQQKkcZJ0JcPV6KVEbz4LnMaTcrrxltsOs71O qV/R/gyLP4qUDfcFt4pfxK8BrQ85JEJcFi8A7X0T/Y7r/AmOH7RcmLwFpp9L4WuaVw09 ENsA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=G8zKWG+M; spf=pass (google.com: domain of fm-1328765-20250907204311c8bb3cb715000207aa-ru6tzh@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) smtp.mailfrom=fm-1328765-20250907204311c8bb3cb715000207aa-RU6tZh@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1757277796; x=1757882596; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=3KiOcnRDBzf7Mdn1IFG34+7x7wU9qpcL8ET4BFTByqs=; b=BG7iTo3jFnt6xQtpvpHhX18hY2+Rm+S+OCTKnNrMikaGguNhksbsUx3R8AuJ0AhAMa 75STRIdC7JoPnKsyW7MCEjDINe1xTWliFaua+A32lif1rEtLBkk0cZyl25/wwASnT6UZ vDQ/OE7p+pVD4ESJgGAUgzYb/twYLCXzC0DWZZjzTmKvGmojdtSpQpQUKnV4a0dtsi9t k+jPqIGshv0Jj3JZVoM0yS8mw8QBWKjWu8p9MI8ZHGaqYfMM8yeKSpRtijHDa1PI7+2n LTJQX50VH5zTToIDTDcClKA2lGjsb63Pxo1LbJ7KMASfLRjYx+5gWx3Wd5pOAJEYTypS MWfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757277796; x=1757882596; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:cc:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3KiOcnRDBzf7Mdn1IFG34+7x7wU9qpcL8ET4BFTByqs=; b=viBr1gtSiTKVVrKxRdh8Y5RsF/CqYz7W5HCSLWd+R1DJtYHd/UNmlMDQpSZ1fB/lm4 Y3gBkS67RM/IPYTOzELcBuFIwvNmp2J8aEAgrXZT0cbUcUvSNDJeeRK/BGkuzQJcNaj+ dkVAN4bc0lDLtZKwq+uhgDgRUqBU0Kgp2KV3HjK9fsYhOetTWALeSMK3VPJkAM+6VFNF OD9mxh8XtVWSFKvZpJ3WUWPEarY0geooWpBCW0zg10c1D744FF7d8ddlfLTb0bgLRT3l dBGyoBSQ5aINlKSxjR+a3FA2jvDzS2AprwiwAH/LBp5RKHRC3bHNK5eisgvbt00DhxjE HzQQ== X-Forwarded-Encrypted: i=2; AJvYcCUqXJF9gJkW2IiOf3CIQ2pFUZ/CrqAFBDSKeaFomyX8KIdhNZe8cXl/RI+iT4lTT0BVxD/YZv0=@isar-build.org X-Gm-Message-State: AOJu0YxUPvB3/wYQDVth3QBOTgBHHrJ9vkQbN4qTp3Fuw6JgfORlnOH3 5LVLbZlLFjkdqy3PzjbOtWfW0SXvBqyAGqg542vfGr/28rlar6gwki6G X-Google-Smtp-Source: AGHT+IHgdvyfTzUF6Rv0bJ9nEWEFROY5Fx01WeaiQqyKjOdUcsqD3iyiwZkLEjpqA/rFDaTOs+l89A== X-Received: by 2002:a05:6000:26cd:b0:3e0:2a95:dc9e with SMTP id ffacd0b85a97d-3e64ce50347mr3785790f8f.57.1757277795221; Sun, 07 Sep 2025 13:43:15 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h=ARHlJd5oQl81KXDFMP4ZBqvRBVhKOSNjokQy6swYjSBsHJBbFw== Received: by 2002:a05:6000:4006:b0:3cb:48b0:f7c2 with SMTP id ffacd0b85a97d-3e3af3002c4ls803120f8f.0.-pod-prod-01-eu; Sun, 07 Sep 2025 13:43:12 -0700 (PDT) X-Received: by 2002:a05:6000:1acf:b0:3d4:15a2:11e9 with SMTP id ffacd0b85a97d-3e64d22b88bmr3807122f8f.61.1757277792209; Sun, 07 Sep 2025 13:43:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1757277792; cv=none; d=google.com; s=arc-20240605; b=fjWe5/XtaN1ZJzdy2sU9ANKs4xePz3e6ms4J4XT9NJ08vA0HVcqDWSs3yZLBWntrPI l+QbaSTxU45rnC0owT3JoTfQ0SwWhvyKwmnm4pndOLpCYZvIPiI3o/0YPOmwrbD6ih3N K1HdrFpM/gBG3qFFa+fpvQLQRkQXpW5k/d9veBTanQkOR4MOgbhLrDkGtotfxCkmN/PH u+yYjm4uerTDYDsenStH+C4pWzkAnXjgjEtP2KpZwYVJlmsuNOqSdP09Dfeakg+1MfEo CxBCMJhIXtvc2lX0xO0xHIvwqaBItN1ldfNlI0FhRPWSqiXrxV5z8f7OsEXVnZfMEXV/ InvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:message-id:date :subject:cc:to:from:dkim-signature; bh=x/ticgdUrJ/uLNfaHcIaJ3zUfaxMcLNyTymWb5qkgds=; fh=IVe7tedBjrVO7NMfxxhSNfR9HdaoPf8yp1e13zSf5B8=; b=h0hHevXXhiYCt5i/q+gSPPKP+x20xhSBOf9XE8+ayXsjXyq2xSOHpJwNNTwYQn9YVa F4oGZg1QtC3aLq5aD/qABpLIFFMSTxAxlGncI7+fJgbuJmEuMCXPVvlXHGs3MhOMGEO6 3GSJ2O+navLSqof0sl/IuwBth7izfuMFumNLkS/4Jj+6UhXjg6XgYlfkXurp2HrZ/hq1 Rrm+ciKp1oBpcwADhrdtB2IaIozULd/D4KqcsoBXRAfCZbybBfcyn5v9UiAKv66GHO4L JGu65Z5BbU51v+GvV0sPor09JwA1sNbWW8eBhu3QsNe5/yiYXwdBtQ2jE+SMkAzAie85 Dhow==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=G8zKWG+M; spf=pass (google.com: domain of fm-1328765-20250907204311c8bb3cb715000207aa-ru6tzh@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) smtp.mailfrom=fm-1328765-20250907204311c8bb3cb715000207aa-RU6tZh@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-228.siemens.flowmailer.net (mta-65-228.siemens.flowmailer.net. [185.136.65.228]) by gmr-mx.google.com with ESMTPS id ffacd0b85a97d-3d250adf694si322681f8f.2.2025.09.07.13.43.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Sep 2025 13:43:12 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1328765-20250907204311c8bb3cb715000207aa-ru6tzh@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) client-ip=185.136.65.228; Received: by mta-65-228.siemens.flowmailer.net with ESMTPSA id 20250907204311c8bb3cb715000207aa for ; Sun, 07 Sep 2025 22:43:11 +0200 X-Patchwork-Original-From: "'Badrikesh Prusty' via isar-users" From: Badrikesh Prusty To: isar-users@googlegroups.com Cc: badrikesh prusty Subject: [PATCH] meta: default "Rules-Requires-Root: no", make it configurable Date: Sun, 7 Sep 2025 16:42:58 -0400 Message-ID: <20250907204258.201718-1-badrikesh.prusty@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1328765:519-21489:flowmailer X-Original-Sender: badrikesh.prusty@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=G8zKWG+M; spf=pass (google.com: domain of fm-1328765-20250907204311c8bb3cb715000207aa-ru6tzh@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) smtp.mailfrom=fm-1328765-20250907204311c8bb3cb715000207aa-RU6tZh@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Badrikesh Prusty Reply-To: Badrikesh Prusty Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: badrikesh prusty 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. 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 --- meta/recipes-bsp/optee-ftpm/files/debian/control.tmpl | 1 + meta/recipes-bsp/optee-ftpm/optee-ftpm.inc | 3 +++ meta/recipes-bsp/optee-os/files/debian/control.tmpl | 1 + meta/recipes-bsp/optee-os/optee-os.inc | 4 +++- meta/recipes-bsp/trusted-firmware-a/files/debian/control.tmpl | 1 + .../trusted-firmware-a/trusted-firmware-a-custom.inc | 4 +++- meta/recipes-bsp/u-boot/files/debian/control.tmpl | 1 + meta/recipes-bsp/u-boot/u-boot-custom.inc | 4 +++- meta/recipes-kernel/linux-module/files/debian/control.tmpl | 1 + meta/recipes-kernel/linux-module/module.inc | 2 ++ meta/recipes-kernel/linux/files/debian/control.tmpl | 1 + meta/recipes-kernel/linux/linux-custom.inc | 2 ++ 12 files changed, 22 insertions(+), 3 deletions(-) diff --git a/meta/recipes-bsp/optee-ftpm/files/debian/control.tmpl b/meta/recipes-bsp/optee-ftpm/files/debian/control.tmpl index e6af7554..d4374909 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: ${DEBIAN_RULES_REQUIRES_ROOT} Package: ${PN} Architecture: any diff --git a/meta/recipes-bsp/optee-ftpm/optee-ftpm.inc b/meta/recipes-bsp/optee-ftpm/optee-ftpm.inc index 738b694a..257c5c4c 100644 --- a/meta/recipes-bsp/optee-ftpm/optee-ftpm.inc +++ b/meta/recipes-bsp/optee-ftpm/optee-ftpm.inc @@ -23,6 +23,8 @@ DEBIAN_BUILD_DEPENDS ?= " \ optee-os-tadevkit-${OPTEE_NAME} \ " +DEBIAN_RULES_REQUIRES_ROOT ?= "no" + TA_CPU ?= "unknown" TA_DEV_KIT_DIR ?= "unknown" OPTEE_FTPM_BUILD_ARGS_EXTRA ?= " " @@ -30,6 +32,7 @@ OPTEE_FTPM_BUILD_ARGS_EXTRA ?= " " TEMPLATE_FILES = "debian/rules.tmpl debian/control.tmpl" TEMPLATE_VARS += "DEBIAN_BUILD_DEPENDS \ DEBIAN_COMPAT \ + DEBIAN_RULES_REQUIRES_ROOT \ OPTEE_FTPM_BUILD_ARGS_EXTRA \ TA_CPU \ TA_DEV_KIT_DIR" diff --git a/meta/recipes-bsp/optee-os/files/debian/control.tmpl b/meta/recipes-bsp/optee-os/files/debian/control.tmpl index 7bcd6edb..443578bd 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: ${DEBIAN_RULES_REQUIRES_ROOT} Package: ${DEBIAN_PACKAGE_NAME} Architecture: ${DISTRO_ARCH} diff --git a/meta/recipes-bsp/optee-os/optee-os.inc b/meta/recipes-bsp/optee-os/optee-os.inc index eac75ae8..edd21f58 100644 --- a/meta/recipes-bsp/optee-os/optee-os.inc +++ b/meta/recipes-bsp/optee-os/optee-os.inc @@ -22,8 +22,10 @@ DEBIAN_PACKAGE_NAME ?= "optee-os-${OPTEE_NAME}" DEBIAN_BUILD_DEPENDS ?= "python3-pycryptodome:native, python3-pyelftools" +DEBIAN_RULES_REQUIRES_ROOT ?= "no" + TEMPLATE_FILES = "debian/control.tmpl debian/rules.tmpl" -TEMPLATE_VARS += "DEBIAN_COMPAT DEBIAN_PACKAGE_NAME OPTEE_NAME DEBIAN_BUILD_DEPENDS OPTEE_PLATFORM OPTEE_EXTRA_BUILDARGS" +TEMPLATE_VARS += "DEBIAN_COMPAT DEBIAN_PACKAGE_NAME DEBIAN_RULES_REQUIRES_ROOT OPTEE_NAME DEBIAN_BUILD_DEPENDS OPTEE_PLATFORM OPTEE_EXTRA_BUILDARGS" # split strip platform flavor, if any, from the specified platform string OPTEE_PLATFORM_BASE = "${@d.getVar('OPTEE_PLATFORM').split('-')[0]}" 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..311b44c0 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: ${DEBIAN_RULES_REQUIRES_ROOT} Package: trusted-firmware-a-${TF_A_NAME} Architecture: ${DISTRO_ARCH} diff --git a/meta/recipes-bsp/trusted-firmware-a/trusted-firmware-a-custom.inc b/meta/recipes-bsp/trusted-firmware-a/trusted-firmware-a-custom.inc index 9f143b13..4ea7cc6c 100644 --- a/meta/recipes-bsp/trusted-firmware-a/trusted-firmware-a-custom.inc +++ b/meta/recipes-bsp/trusted-firmware-a/trusted-firmware-a-custom.inc @@ -20,10 +20,12 @@ TF_A_BINARIES ?= "release/bl31.bin" DEBIAN_BUILD_DEPENDS ?= "" +DEBIAN_RULES_REQUIRES_ROOT ?= "no" + PROVIDES += "trusted-firmware-a-${TF_A_NAME}" TEMPLATE_FILES = "debian/control.tmpl debian/rules.tmpl" -TEMPLATE_VARS += "DEBIAN_COMPAT \ +TEMPLATE_VARS += "DEBIAN_COMPAT DEBIAN_RULES_REQUIRES_ROOT \ TF_A_NAME DEBIAN_BUILD_DEPENDS TF_A_PLATFORM TF_A_EXTRA_BUILDARGS" do_prepare_build() { diff --git a/meta/recipes-bsp/u-boot/files/debian/control.tmpl b/meta/recipes-bsp/u-boot/files/debian/control.tmpl index 006982c2..6cbdf02c 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: ${DEBIAN_RULES_REQUIRES_ROOT} Package: u-boot-${MACHINE} Architecture: ${DISTRO_ARCH} diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc index 2d6dd8e0..e3081ce9 100644 --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc @@ -20,12 +20,14 @@ SRC_URI += "file://debian/" DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git" +DEBIAN_RULES_REQUIRES_ROOT ?= "no" + U_BOOT_BIN_INSTALL ?= "${U_BOOT_BIN}" U_BOOT_EXTRA_BUILDARGS ??= "BL31=${BL31} TEE=${TEE}" TEMPLATE_FILES = "debian/control.tmpl debian/rules.tmpl" -TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS U_BOOT_CONFIG U_BOOT_BIN \ +TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS DEBIAN_RULES_REQUIRES_ROOT U_BOOT_CONFIG U_BOOT_BIN \ U_BOOT_EXTRA_BUILDARGS DEBIAN_COMPAT" U_BOOT_TOOLS_PACKAGE ?= "0" diff --git a/meta/recipes-kernel/linux-module/files/debian/control.tmpl b/meta/recipes-kernel/linux-module/files/debian/control.tmpl index 45fcbc0e..914733d8 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: ${DEBIAN_RULES_REQUIRES_ROOT} Package: ${PN} Architecture: any diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc index d2a41766..b51e8965 100644 --- a/meta/recipes-kernel/linux-module/module.inc +++ b/meta/recipes-kernel/linux-module/module.inc @@ -34,6 +34,7 @@ KERNEL_MODULE_SIGNATURES ??= "" DEB_BUILD_PROFILES += "${@'pkg.signwith' if bb.utils.to_boolean(d.getVar('KERNEL_MODULE_SIGNATURES')) else ''}" DEPENDS += "${@'module-signer secure-boot-secrets' if bb.utils.to_boolean(d.getVar('KERNEL_MODULE_SIGNATURES')) else ''}" DEBIAN_BUILD_DEPENDS .= "${@', module-signer, secure-boot-secrets' if bb.utils.to_boolean(d.getVar('KERNEL_MODULE_SIGNATURES')) else ''}" +DEBIAN_RULES_REQUIRES_ROOT ?= "no" SRC_URI += "file://debian/" @@ -63,6 +64,7 @@ TEMPLATE_VARS += " \ KAFLAGS \ MODULE_DIR \ DEBIAN_BUILD_DEPENDS \ + DEBIAN_RULES_REQUIRES_ROOT \ SIGNATURE_KEYFILE \ SIGNATURE_CERTFILE \ SIGNATURE_HASHFN \ diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl index a79b86c4..479f8ff0 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: ${DEBIAN_RULES_REQUIRES_ROOT} Package: linux-image-${KERNEL_NAME_PROVIDED} Build-Profiles: diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc index 01e9bff7..e073206f 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc +++ b/meta/recipes-kernel/linux/linux-custom.inc @@ -17,6 +17,8 @@ DISTRIBUTOR ?= "ISAR" # pinned due to known or possible issues with compat 12 DEBIAN_COMPAT:buster = "10" +DEBIAN_RULES_REQUIRES_ROOT ?= "no" + KBUILD_DEPENDS ?= "build-essential:native, \ libelf-dev:native, \ libncurses-dev:native, \