From patchwork Thu Mar 4 09:55:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1447199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DrmTW2Wryz9sWg; Thu, 4 Mar 2021 20:55:58 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lHkhz-00075E-Vi; Thu, 04 Mar 2021 09:55:51 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lHkhz-00074z-5c for kernel-team@lists.ubuntu.com; Thu, 04 Mar 2021 09:55:51 +0000 Received: from mail-wr1-f72.google.com ([209.85.221.72]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lHkhy-0004vg-Tv for kernel-team@lists.ubuntu.com; Thu, 04 Mar 2021 09:55:50 +0000 Received: by mail-wr1-f72.google.com with SMTP id z6so5456397wrh.11 for ; Thu, 04 Mar 2021 01:55:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WuC/e2FR8nSAJC3nkl27SPS1OmRmFz9RxGDgMOs6mQw=; b=KSbrlKc7BttESCKUTEDcw6Th85r3g/pOv+lTCmpGXW8d543IgdHqayzRIJJggyXHwJ E9mp0RCSU9uhO6EQjTi+vDndWwHXTgou3S6ldw2VKrVhSaxbEfHYz+bijI/rshGQOELg 7gu9pXvRgXyULpX0V99kDPoxAkh0lNVEkUnP/UwMDbMoquUyDMb2ge3ef6e48K0V6q4d UNN+9EAHeaWGvyNP9lODEfBbrwnGlw5SOCnb59iBFnVrCz+BGsm00SvIxZlg6DgBJrEi /TP/pyxMQNQOl0h9DNq6Gm3qW5qLOwjqRvvdeT3lvp4iEMPIbHGkAovHKZXYLOa0/nzf pk2g== X-Gm-Message-State: AOAM530Esmrl+M9eQdfbxfgLKCsPKpUUUgJYq1oG4An4b1rSieQ064Qv 4Gz/43CWryQNlngiOMZL/BO7dIJUTWvqruw9BoD5MlbbYkgMvBmlmAwozR9Te2PV6yaEp1YCE0S aD7WUzbBOR7ZyW7njOzuEoY9RvJakPB/jWWPQrZVN6w== X-Received: by 2002:a5d:42cb:: with SMTP id t11mr3128252wrr.280.1614851750677; Thu, 04 Mar 2021 01:55:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxD3A92uCLO9i1L2wbP/AEWc1XT7j46EGn5phLarUJaPDCXIaLUx87C1PEl5uyLsXZIyMURfw== X-Received: by 2002:a5d:42cb:: with SMTP id t11mr3128243wrr.280.1614851750459; Thu, 04 Mar 2021 01:55:50 -0800 (PST) Received: from gollum.fritz.box ([194.191.244.86]) by smtp.gmail.com with ESMTPSA id o11sm16180867wrq.74.2021.03.04.01.55.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Mar 2021 01:55:50 -0800 (PST) From: Juerg Haefliger X-Google-Original-From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [SRU][H][PATCH 2/2] UBUNTU: [Packaging] Disable udebs if $DEBIAN/d-i doesn't exist Date: Thu, 4 Mar 2021 10:55:16 +0100 Message-Id: <20210304095516.575613-3-juergh@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210304095516.575613-1-juergh@canonical.com> References: <20210304095516.575613-1-juergh@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" Commit ("UBUNTU: [Packaging] replace custom filter script with dctrl-tools") introduced the use of grep-dctrl which fails for a kernel that doesn't build any udebs at all: $ ./debian/rules clean echo >> debian/control export KW_DEFCONFIG_DIR=debian.raspi/d-i && \ export KW_CONFIG_DIR=debian.raspi/d-i && \ LANG=C kernel-wedge gen-control 5.11.0-1002 | \ grep-dctrl -FArchitecture amd64 \ >>/ubuntu/hirsute/linux-raspi/debian/control make: *** [debian/rules:229: debian/control] Error 1 Script failed Because d-i/kernel-versions is empty in this case. With the previous commit it is now possible to remove the d-i directory tree in kernels that don't need/want udebs and use that as a global check to set disable_d_i=true. While at it, add disable_d_i to the list of variables that printenv prints out. Signed-off-by: Juerg Haefliger --- debian/rules | 5 +++++ debian/rules.d/1-maintainer.mk | 1 + 2 files changed, 6 insertions(+) diff --git a/debian/rules b/debian/rules index f66052e74a1f..1d53ecc1df7f 100755 --- a/debian/rules +++ b/debian/rules @@ -43,6 +43,11 @@ ifneq ($(filter noudeb,$(DEB_BUILD_PROFILES)),) disable_d_i=true endif +# Don't build udebs if $(DEBIAN)/d-i/ doesn't exist +ifeq ($(wildcard $(DEBIAN)/d-i/.),) + disable_d_i=true +endif + # Don't build tools or udebs in a cross compile environment. ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH)) do_tools=false diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk index 956829027e0f..b7a92591c155 100644 --- a/debian/rules.d/1-maintainer.mk +++ b/debian/rules.d/1-maintainer.mk @@ -108,6 +108,7 @@ printenv: @echo "DEB_BUILD_ARCH = $(DEB_BUILD_ARCH)" @echo "arch = $(arch)" @echo "kmake = $(kmake)" + @echo "disable_d_i = $(disable_d_i)" printchanges: @baseCommit=$$(git log --pretty=format:'%H %s' | \