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)