From patchwork Mon Dec 4 01:49:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1871334 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Sk67C28lmz23mf for ; Mon, 4 Dec 2023 12:50:14 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1r9y61-0004Cg-8B; Mon, 04 Dec 2023 01:50:05 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1r9y5v-0004BH-0Q for kernel-team@lists.ubuntu.com; Mon, 04 Dec 2023 01:49:59 +0000 Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id C17353F18D for ; Mon, 4 Dec 2023 01:49:58 +0000 (UTC) Received: by mail-oo1-f71.google.com with SMTP id 006d021491bc7-58dc2d926e7so5631473eaf.0 for ; Sun, 03 Dec 2023 17:49:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701654597; x=1702259397; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I+HdphpkDLuumzUX4MugSco/9fBZG/LZ8bYp4tQMbYs=; b=SdE6W/+doiBYmsKSlvEBIp8DP4V0eCuhXIVQ/Z6LQU+qJG2m+VeDnNoqX1I4GzvdT8 e3J+kHX42Rg9itmrbHr1nnSWyLl9+rT3CyZlnJVDJM58HEumqFS2/dFM+4UM4IuB2KdU KbH4WaWgsBkTBhJf+gOx7vUAdh7feP5e+RGy0Ep848vs9Wvv0bOZ8S3VclupG2TEnTVY J6dFO1ShK0rJlbWuqCAl6jknoV67HOf66thyEnUJUWRlFr04bPzibtiHUoadYAJQUY8/ cLi6mLB+h/y/A78Sq2aj35BZaByV/gD/GlEemjpgd/Ux4peea+//qKjNZsKRTohkg1mC vaLw== X-Gm-Message-State: AOJu0YxBVEXmm/6IOed5jlzxQ9hHcOniNYm1xkJUOyauqAZ3H3kg3Rva bL/ubl1CJUgIH5o8A6/j+WwEogo1fiWPT32LpKKCczbjJJRjsXVs/cnCiDmiHwzPmM5JJnRjkna fH2+lCz34fAwz2He0UQskXd2ks0hYsrd25hAldaiaai9sfY8quw== X-Received: by 2002:a05:6358:2484:b0:170:8da:ade7 with SMTP id m4-20020a056358248400b0017008daade7mr5851237rwc.27.1701654597348; Sun, 03 Dec 2023 17:49:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IGj+2uiQ1vlgE9pUTS7Gv60XHf9dPgAGfQuuZCgnijTM40vEY19FSCExV7CFJfGWaJmIhGK5w== X-Received: by 2002:a05:6358:2484:b0:170:8da:ade7 with SMTP id m4-20020a056358248400b0017008daade7mr5851226rwc.27.1701654596978; Sun, 03 Dec 2023 17:49:56 -0800 (PST) Received: from zoe.. ([2001:f74:8f00:c00:6aff::1001]) by smtp.gmail.com with ESMTPSA id k14-20020a17090a514e00b002867f87d103sm2320380pjm.50.2023.12.03.17.49.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 17:49:56 -0800 (PST) From: Masahiro Yamada To: kernel-team@lists.ubuntu.com Subject: [noble PATCH v2 1/3] UBUNTU: SAUCE: make $(stampdir)/stamp-build-perarch depend on build-arch Date: Mon, 4 Dec 2023 10:49:47 +0900 Message-Id: <20231204014949.2034062-2-masahiro.yamada@canonical.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231204014949.2034062-1-masahiro.yamada@canonical.com> References: <20231204014949.2034062-1-masahiro.yamada@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Since commit ("UBUNTU: [Packaging] bpftool: always use vmlinux to generate headers"), tools/bpf/bpftool/vmlinux must be created before building the bpftool. This is not guaranteed because the $(stampdir)/stamp-build-perarch target does not depend on build-arch. Running 'debian/rules binary' results in the following build error: mv [...]/linux/debian/build/tools-perarch/tools/bpf/bpftool/vmlinux [...]/linux/debian/build/tools-perarch/vmlinux mv: cannot stat '[...]/linux/debian/build/tools-perarch/tools/bpf/bpftool/vmlinux': No such file or directory This potential issue has been hidden, relying on build drivers such as dpkg-buildpackage running 'debian/rules build' and 'debian/rules binary' as separate steps. Without rootless builds, the (fake) root privilege is required for the binary target, hence dpkg-buildpackage splits the build process into three stages: - fakeroot debian/rules clean - debian/rules build - fakeroot debian/rules binary To support rootless builds, you need to specify all dependencies correctly without such an assumption. Once we transition to rootless builds, the 'binary' target will not require the root privilege any more, so dpkg-buildpackage will merge 'build' and 'binary' into a single step. We need to assume only the following two will be executed: - debian/rules clean - debian/rules binary Signed-off-by: Masahiro Yamada --- Changes in v2: - new patch debian/rules.d/2-binary-arch.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index f89efd270e1c..b281428d3462 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -695,7 +695,7 @@ ifeq ($(do_any_tools),true) endif touch $@ -$(stampdir)/stamp-build-perarch: $(stampdir)/stamp-prepare-perarch install-arch-headers +$(stampdir)/stamp-build-perarch: $(stampdir)/stamp-prepare-perarch install-arch-headers build-arch @echo Debug: $@ ifeq ($(do_linux_tools),true) ifeq ($(do_tools_usbip),true) From patchwork Mon Dec 4 01:49:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1871337 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Sk67H5qfNz23mf for ; Mon, 4 Dec 2023 12:50:19 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1r9y67-0004F0-Me; Mon, 04 Dec 2023 01:50:11 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1r9y5x-0004BU-51 for kernel-team@lists.ubuntu.com; Mon, 04 Dec 2023 01:50:03 +0000 Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 2EBAE3F18D for ; Mon, 4 Dec 2023 01:50:00 +0000 (UTC) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-2869d27e878so237679a91.1 for ; Sun, 03 Dec 2023 17:50:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701654599; x=1702259399; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JTzRbXvmabEdxQedy8rRfRAVVk9vf9jeQpEgE45I+1g=; b=Ab15meQHg4dEcbtAc8vSdUSwkFfTmQTqiS070h3UbE+YHU9M6CMGIdvEOAylk90vtE vxNHgPklMSgI0MYavJ8K7i9HECkQHLG75fxfsyWnU5njCaYKRpNZGbKnttzzorKGe/el wFVnJ1l08Me6cOfTGFSueW700R8zdZ2wSmBEgO2fREKtq/BRgA02XdB6kInsPiPtd8FW q0BcqvDsF/2dKsCj5t699KuieHiTw6BzOA4jbWScdLHn/60v4JnGRaNZuOP3WqXtQMfb mT7jwGpVhYWGTX7wFRdMWmq4dGcxM6SriCnt/CPu6iM5DRJf0xFL6UYyXJmNO1Y9hOZU qMbQ== X-Gm-Message-State: AOJu0Yz+bu7p7t1BDm7hqJFrHkqhSm0f6S9yEWJlhFkTD5JBbG7nMp+r 4YkZOi9d+QsBudQ7FK01WRjI25RQ8+K+UG7cXOjpINFN5trt/Hkm7CNqBZN8VQ9an0vKlnDn9lb lUG+PHqQNZfDGf9+SxVGRxjaLFkJAlDb/zdm4gDDH4Nal4vnkFg== X-Received: by 2002:a17:90b:104:b0:286:6cc1:5fd7 with SMTP id p4-20020a17090b010400b002866cc15fd7mr702398pjz.90.1701654598727; Sun, 03 Dec 2023 17:49:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IEdnlu05pVD8uvXh8zXpZz7hAiF58YYJpQeOg269+Rn7cEJdP/lCw5iCEmbWeqAnURev7eivQ== X-Received: by 2002:a17:90b:104:b0:286:6cc1:5fd7 with SMTP id p4-20020a17090b010400b002866cc15fd7mr702396pjz.90.1701654598446; Sun, 03 Dec 2023 17:49:58 -0800 (PST) Received: from zoe.. ([2001:f74:8f00:c00:6aff::1001]) by smtp.gmail.com with ESMTPSA id k14-20020a17090a514e00b002867f87d103sm2320380pjm.50.2023.12.03.17.49.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 17:49:57 -0800 (PST) From: Masahiro Yamada To: kernel-team@lists.ubuntu.com Subject: [noble PATCH v2 2/3] UBUNTU: SAUCE: Enable rootless builds Date: Mon, 4 Dec 2023 10:49:48 +0900 Message-Id: <20231204014949.2034062-3-masahiro.yamada@canonical.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231204014949.2034062-1-masahiro.yamada@canonical.com> References: <20231204014949.2034062-1-masahiro.yamada@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Let the build driver (e.g. dpkg-buildpackage) know this can be built without root privilege. DEB_RULES_REQUIRES_ROOT will be set to "no" instead of "binary-targets". Signed-off-by: Masahiro Yamada --- (no changes since v1) debian.master/control.stub.in | 1 + 1 file changed, 1 insertion(+) diff --git a/debian.master/control.stub.in b/debian.master/control.stub.in index e8682fbc6a16..316d2271ed23 100644 --- a/debian.master/control.stub.in +++ b/debian.master/control.stub.in @@ -2,6 +2,7 @@ Source: SRCPKGNAME Section: devel Priority: optional Maintainer: Ubuntu Kernel Team +Rules-Requires-Root: no Standards-Version: 3.9.4.0 Build-Depends: debhelper-compat (= 10), From patchwork Mon Dec 4 01:49:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1871336 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Sk67D2RqYz23p6 for ; Mon, 4 Dec 2023 12:50:15 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1r9y64-0004DS-Be; Mon, 04 Dec 2023 01:50:08 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1r9y5y-0004CF-Fc for kernel-team@lists.ubuntu.com; Mon, 04 Dec 2023 01:50:03 +0000 Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 7CCCE40632 for ; Mon, 4 Dec 2023 01:50:01 +0000 (UTC) Received: by mail-oo1-f71.google.com with SMTP id 006d021491bc7-58e157f489dso3308329eaf.0 for ; Sun, 03 Dec 2023 17:50:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701654600; x=1702259400; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gqhW5k2iIDiDWsoyMent566iIgQob/rLbjI0ooQNOCA=; b=GZUxCnVO1fl+e2S17qHwA/VOZOSu+zLWjt13jLwhzU4te9yFvmYjzWZsiRegYbCKEW 1HAcQLjB6NKGd9LXqFoMozfIUMD9pRAIkNT58QHD5RHhRGy0FRJ9qtXvWr8BGqy6+dwM 14ITVq2OuVamQcLKTfCE6qGPM5kBHz8aFg9ZpHxoZEQf7VdQgKKaqimm5gJ6Q/Wyy7vK cohggbuK5NwmT3/WMkP2u5VxiiEepyDvYRYMnJRpAnBqnqUAVKEEdiCF1BZ9jwuQDk+t Etj4MWHOsE8O8PvSoS6KNDmdAvT0kU/wYAMxjQa3PDQYL7ddGpNrBF1mEhAb+iAbTcBg AC4Q== X-Gm-Message-State: AOJu0YyBt9qFUfK9xHgvWDuelmMgTKYzqJwdhtx8WcTb8oIJ3q/ftC6A StDHxty0aTL6dKhAxZca1d9Ttw+EfsH5i5keuEDPugSIDBaAFyFnDb/zuUFfwUNBoJJodFZKO3N wJxgC86AieCo4tv6b59m72Y3+EOCzLeeishxyinxBzYnM7em1DA== X-Received: by 2002:a05:6358:948f:b0:16f:ec86:698a with SMTP id i15-20020a056358948f00b0016fec86698amr4076894rwb.9.1701654599970; Sun, 03 Dec 2023 17:49:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IHHJIubewUCfA+Lh4b8ypOpE+ItyxO2pYR2lF2TNa9Y07A481D6jgsi8znaw3Tpi21aZRgYFQ== X-Received: by 2002:a05:6358:948f:b0:16f:ec86:698a with SMTP id i15-20020a056358948f00b0016fec86698amr4076885rwb.9.1701654599596; Sun, 03 Dec 2023 17:49:59 -0800 (PST) Received: from zoe.. ([2001:f74:8f00:c00:6aff::1001]) by smtp.gmail.com with ESMTPSA id k14-20020a17090a514e00b002867f87d103sm2320380pjm.50.2023.12.03.17.49.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 17:49:59 -0800 (PST) From: Masahiro Yamada To: kernel-team@lists.ubuntu.com Subject: [noble PATCH v2 3/3] UBUNTU: SAUCE: Allow to run debian/rules without (fake)root Date: Mon, 4 Dec 2023 10:49:49 +0900 Message-Id: <20231204014949.2034062-4-masahiro.yamada@canonical.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231204014949.2034062-1-masahiro.yamada@canonical.com> References: <20231204014949.2034062-1-masahiro.yamada@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" While DEB_RULES_REQUIRES_ROOT is set by build drivers like dpkg-buildpackage, we often run debian/rules directly. Typing "fakeroot debian/rules ..." can be tedious, so we introduced a shorthand alias fdr="fakeroot debian/rules" By setting DEB_RULES_REQUIRES_ROOT=no, debhelpers will function as intended even when debian/rules is directly executed without fakeroot. Signed-off-by: Masahiro Yamada --- (no changes since v1) debian/rules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/rules b/debian/rules index b78aff60ce24..787f412dba0c 100755 --- a/debian/rules +++ b/debian/rules @@ -11,6 +11,9 @@ # (this increases performance and avoids hard-to-debug behaviour) MAKEFLAGS += -rR +# Allow to run debian/rules directly without root +export DEB_RULES_REQUIRES_ROOT := no + .NOTPARALLEL: DEBIAN=$(shell awk -F= '($$1 == "DEBIAN") { print $$2 }'