From patchwork Mon Sep 15 14:49:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaac True X-Patchwork-Id: 4350 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Mon, 15 Sep 2025 18:00:31 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-qv1-f63.google.com (mail-qv1-f63.google.com [209.85.219.63]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 58FG0Spu012266 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 15 Sep 2025 18:00:29 +0200 Received: by mail-qv1-f63.google.com with SMTP id 6a1803df08f44-77766aadfd4sf20001246d6.1 for ; Mon, 15 Sep 2025 09:00:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1757952023; cv=pass; d=google.com; s=arc-20240605; b=CXzD/upwpRmEaY61tLrg2+P/0tbLeVNOrbe4xk9tCv65qsWKeFAUvFEPO5B/IKw9Qs rFohDBzJwxufjKLvV5OV2YNf2ao9PGDfuxmslX1L3aToprI4w4F9UVOZEcPNAEyHHkJD SK4l4xIy3XyFQ0ZF+HZfM/7WuTTI2Uf2R57LppE8YvlTkNI/NZk8ApPIcFaaDSJY1hmp gko966i+BPdH/IP6WUpT0rNXIbgQAbjJRK0UzyxHklaLqA2glrEGFWaAKBi9ssvcM5Es zKNk33d/EfnpLemaeWRATz4SZwRSvujkWbj9X5EctAdRk/10l5e+js4xpABBgPAt8g9T EElQ== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=+p8FpybyNlhx4OXC3dWaozd8+98sIEkqw0QY6bHbSKk=; fh=AzEeKGg+w0kahQUnbW+UdM9GJXiy9jjF+MqAwmOagRk=; b=RQ/eMz5dioMGLn0PbRLYHt1+xmxZCm1F5Rsa8zX9oLQDXBCuwkArtgWwJybHnue8ch keVNoP9RczdYJt3CdaAIEr/WhgRkdKuvazuJxH96SLwWTGTqWgTsY9in9Pic32jqb80D TXPkrfWieHHnNeim90QHRVXk9pZxfL3j5V49Fe2DwvDvxgDmB52VbeqnN8p1gyejf1j1 KT3rz+BAnmtzgx45QQ4oUI5cyYhEMVm0yYF0hXho3YiB2jEdzUebxWo1JLbX+15D/tc0 EtHyVuqc2d3k5Gha8BoS8M3cC9TvnJuT/SikFu0gogbggwLHQGb/N/zd0CGogs2lsrrE dAHg==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of itrue@emlix.com designates 178.63.209.131 as permitted sender) smtp.mailfrom=itrue@emlix.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1757952023; x=1758556823; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=+p8FpybyNlhx4OXC3dWaozd8+98sIEkqw0QY6bHbSKk=; b=ehPL8NTo8NYlFdmUkFSMpWO5sQoMNII6VOw/i5ALszrhwlwyUyBpriyFM8i1D+Wy4i 7IofKCRUql8ia7C9q5ZBP01c3242agF61fQ7FgSdy3hx4mHSbkIY11EB4zp2ynD2EDyM aBr4n0M2wBz21wy6ldv4+ygorhjhrxMN+91thTx8AUaEU3dXxQFcaMyp5V9Xvwo6hwDg 1bSHoBnqZtVCMNn9whCsRkdMG8ZW+ZQEeT6lMeu1XKdnD3RiTzgDOKUBfWgbViu+YGrO mkRIHSN8hES0Gq8bQzIXPHX8vqrk4R0zZ0laC6S0Y2luJO+1OTEuBsPfrCL1VlEkVOtp oeOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757952023; x=1758556823; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=+p8FpybyNlhx4OXC3dWaozd8+98sIEkqw0QY6bHbSKk=; b=VttDxuLFrhdAZ9CfJRez9fuBr56iEZt/xDqLr8SVogjpQrr8Sk5wKVQyg6+cY9ZqUM fwZY3IVjmJQDjtCkcQElo+ddNV830ZMbT0Z0KnC09NBkmH+eLp1v1TiqjnRKS48lgXEU fymZWjClELuTj/dh1fOwOwrwEXVcleQfnqWRgn0KALI9RlcJ2vT/mtOc91J0xmBSow1Q jTRyYUUTBGJSLFO9Iybe47kk0rbuZxM5nHJRYkax7gVZHqvgISc838wrmYauRVPhK6sh 7MvmvAutNWxT7XeHYelVoSbLKhBP5W4mMCHttZNEbxWha30olOUOuoJCJfiT/XAobb37 572A== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCUtv2KK0ZTejym3mdo/BfP0JWuHi68ZiR45v19pesQJp5j2w1Xi2CmlwEgKuPHQXL1Ot9tW+l8=@isar-build.org X-Gm-Message-State: AOJu0YzsYrndLSNnC1YzBo9URieo+Jdx0uOuhudTCTRAIhrmaJl48Fnd frdP1vvfUxL04GiwT2pHMG8T4L9dRZn/G8mkqoZEOLtd99VE0Ibx2vpb X-Google-Smtp-Source: AGHT+IHIVehhlrrb7OmTrMOHbYPh8ya9aszC8oZC5eSzf21q0FlDrjpLkRdnUo7gHKKvRWyU6T+8DQ== X-Received: by 2002:a05:6214:2b0e:b0:71d:478f:e0cd with SMTP id 6a1803df08f44-767bc9e64fdmr143901216d6.26.1757952022255; Mon, 15 Sep 2025 09:00:22 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h=ARHlJd7Geop2+s8BeDjwoAy3lrJ6O8fXqWa52IWW3eXVz+oZ7w== Received: by 2002:a05:6214:ac1:b0:70d:9340:3384 with SMTP id 6a1803df08f44-762e48bd695ls66957016d6.2.-pod-prod-08-us; Mon, 15 Sep 2025 09:00:21 -0700 (PDT) X-Received: by 2002:a05:620a:ac07:b0:823:51b0:3a75 with SMTP id af79cd13be357-82400758717mr1868046285a.39.1757952021676; Mon, 15 Sep 2025 09:00:21 -0700 (PDT) Received: by 2002:a05:600c:c16f:b0:45f:2aac:40be with SMTP id 5b1f17b1804b1-45f316eaac5ms5e9; Mon, 15 Sep 2025 07:52:52 -0700 (PDT) X-Received: by 2002:a05:6000:616:b0:3eb:b80c:cea0 with SMTP id ffacd0b85a97d-3ebb80cd132mr1332009f8f.4.1757947970475; Mon, 15 Sep 2025 07:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1757947970; cv=none; d=google.com; s=arc-20240605; b=jFr+M/560cmbPFb5EXsWq91J+c5U2T/Fuz/xKpxY+Wo3R0a5tp7mzywFBO95wVc5q8 gnVpsdlknASiYv9DkIVpCbfanNdE+1SLojtRFajNr35ijCxcXGrCTueL3G5fDsSkmJAi 8omAcwvODz5qO8oEjFnYCw7yhpDOp7Cui76+N25dtZR1SiK6qwAKCNoVd29bKI3gBp/n XguRAr7r1qnVZnHil0zInkTBdTqyB4K4kCzQkwpiSfHBa0LjxOGUZf+0SEjfq6nAJMgN umJwji4kDBfRA4PAEuOEYE/MHKv3dPuIMOE8dQA0QEPRlwebngvAyAP4PamauGSrzZWB UMyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=rp2ZBhPiwKsH4tUztgOdoeg2IkffoAh+nJQuQkKM9SM=; fh=vRrjvjDC0Nm912rKb+hserwyuGVHai4IaHlHCTH5jzE=; b=c5YXIg8hxWjPI3QvKilr7fpZERsqmaOyv+U8+2k/o7qIUacoIVcEijWT1L62qqi5ct uprOA0/8uwSCe/GDFHG8ZobFIhSqPAPPcrk+i/k7RZSW+9VVpPWGgthj9NmVvhMM66zu m/iZjx4BjB0U/p91pBrmwl0gvW39lMUlK4vrQ40fnsjNyxGPMAQHcJJy7HIICJoo03Ao Upx9f7DazcE7Fdcp9KFWI1qsWRTb1UjRIjLNYSIrmarXFo2QNeSRUpUVEwi9zvhyUmda vg9mBfpGG35KyOVLxon7Upz6GCYLWFg0JhyFwnHMy5j/bp4i9arubO47QGCl2hOZeWsE dZUA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of itrue@emlix.com designates 178.63.209.131 as permitted sender) smtp.mailfrom=itrue@emlix.com Received: from mx1.emlix.com (mx1.emlix.com. [178.63.209.131]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-45f278da733si386885e9.0.2025.09.15.07.52.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Sep 2025 07:52:50 -0700 (PDT) Received-SPF: pass (google.com: domain of itrue@emlix.com designates 178.63.209.131 as permitted sender) client-ip=178.63.209.131; Received: from mailer.emlix.com (p5098be52.dip0.t-ipconnect.de [80.152.190.82]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.emlix.com (Postfix) with ESMTPS id 047A45FDC1 for ; Mon, 15 Sep 2025 16:52:49 +0200 (CEST) From: Isaac True To: isar-users@googlegroups.com Cc: Isaac True Subject: [PATCH v2] debianize: allow setting Rules-Requires-Root Date: Mon, 15 Sep 2025 16:49:26 +0200 Message-ID: <20250915144925.274032-2-itrue@emlix.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20250814143405.204360-2-itrue@emlix.com> References: <20250814143405.204360-2-itrue@emlix.com> MIME-Version: 1.0 X-Original-Sender: itrue@emlix.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of itrue@emlix.com designates 178.63.209.131 as permitted sender) smtp.mailfrom=itrue@emlix.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, 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?= Add a new variable "DEBIAN_RULES_REQUIRES_ROOT" which can be used to control the value of the "Rules-Requires-Root" parameter in the debian/control file. If this variable has no value (the default behaviour), nothing is added. Otherwise, it appends "Rules-Requires-Root: ${DEBIAN_RULES_REQUIRES_ROOT}" to the Source section of the debian/control file. This can be useful when using dpkg-raw, as setting this value to "no" skips calling `fakeroot` during the package build process, which can provide 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 --- Changes in v2: - Add information to RECIPE-API-CHANGELOG.md - Only add Rules-Requires-Root if the DEBIAN_RULES_REQUIRES_ROOT variable has been set RECIPE-API-CHANGELOG.md | 8 ++++++++ meta/classes/debianize.bbclass | 17 ++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index 8468717d..f0b94c2f 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -727,3 +727,11 @@ Changes in next This was never documented and never had practical relevance. `oci-archive` is the useful OCI image format that can be imported, e.g., by podman. + +### Allow setting Rules-Requires-Root + +Recipes based on the `debianize` class can now set the +`DEBIAN_RULES_REQUIRES_ROOT` variable to control the value of the +`Rules-Requires-Root` setting in the `debian/control` file. If this variable is +unset (the default), `Rules-Requires-Root` will not be added. Otherwise, +`Rules-Requires-Root` will be added and set to the value of the variable. diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass index 4989c601..acc5a1ba 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 ??= "" DESCRIPTION ??= "must not be empty" MAINTAINER ??= "Unknown maintainer " @@ -74,8 +75,10 @@ deb_create_control[vardeps] += "DEBIANIZE_BUILD_DEPENDS \ DEBIAN_PROVIDES \ DEBIAN_REPLACES \ DEBIAN_BREAKS \ - DEBIAN_CONFLICTS" + DEBIAN_CONFLICTS \ + DEBIAN_RULES_REQUIRES_ROOT" deb_create_control() { + # Add Source section cat << EOF > ${S}/debian/control Source: ${BPN} Section: misc @@ -83,6 +86,18 @@ Priority: optional Standards-Version: 3.9.6 Maintainer: ${MAINTAINER} Build-Depends: ${@ deb_list_beautify(d, 'DEBIANIZE_BUILD_DEPENDS')} +EOF + + # If a value has been set, add the value of DEBIAN_RULES_REQUIRES_ROOT to + # the control file. + if [ -n "${DEBIAN_RULES_REQUIRES_ROOT}" ]; then + echo "Rules-Requires-Root: ${DEBIAN_RULES_REQUIRES_ROOT}" >> \ + ${S}/debian/control + fi + + # Add Package section proceeded by an empty line to separate it from the + # previous section. + cat << EOF >> ${S}/debian/control Package: ${BPN} Architecture: ${DPKG_ARCH}