Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2803525rdd; Sat, 13 Jan 2024 02:43:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZhygkcnmwoCD5wZUe8OS9JtZG/FoXFkKy5ARvkUHc7zFmIw6fw9FzLwtxJUgowYQvH6JH X-Received: by 2002:a17:906:c18a:b0:a1d:7792:cdbe with SMTP id g10-20020a170906c18a00b00a1d7792cdbemr1194961ejz.146.1705142637702; Sat, 13 Jan 2024 02:43:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705142637; cv=none; d=google.com; s=arc-20160816; b=VYiEAEAOMY5yI3XxEKJklRno8M8wGAVW15PnhWFUKimo+Q7JoBwLBPyfatn/dlNboC GiWz+HZsjvMU9ELsmuZvy9++Vw+Og21kuhOql+h0+zdcWhdGDwfQVWBN3xhh4Gs8ugaH cYhPXp6Sdt0NINxdGwvQTfmAIyEOsevqCRdFPaf22JlvS/B+RPUTWaZbewOXxqWn5S/B TyQNbC+hGM06T0d90HoTLqCOfBSVbM1jPOuLENLHllifTm3OPXheYYRu+P/3o/YNUZse hOxbFiVTWOf8YNZBgtMnAMSLCH2CZ62G1gtC2uP1OYOwK0fxwvhO9J9zwHCetgYJs4Ys tGgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=F+pTPfpFAuebB1+ADDx9uABaHORrK5EdM0/uId+LNLs=; fh=5gYN4msaJmwnN8mGpibv8VZnTy0MtvGQcf5D09XpoaQ=; b=RTMDEaO6Ypv29jEVi2w93ylRvdLyxaXHx0eqeS1JIOzCr5tC+qK7LYrT1Qm1iGFCBH qHJeW0AgqcCF/v48pA571kBfsfwWaLStWJ86I8NOStVXYvvzp3naV63H3IU1CeMNqTN0 6S8KHEoWFa//juz+cGCGdmRkX0uiHHl7CvcuMIOs6Ie+9uiwqBAyZEIZWFI4+Uo2KFjx fNJA+HxGVq9hpfVdv6myl4pvT1dzUE4jR1wofEYPwEpJ9G3JYmiU7dbP9cJRIBaAwHi5 19typtEmot+faTO4nHrxjaLnAGbI2ahVKHNNDSJ2DL7iB1u1REsSyrq4X3YMYsf7EMlL 4LGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lqIrmR+i; spf=pass (google.com: domain of linux-kernel+bounces-25263-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25263-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f2-20020a170906048200b00a2c8e5a1b00si1695472eja.958.2024.01.13.02.43.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jan 2024 02:43:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25263-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lqIrmR+i; spf=pass (google.com: domain of linux-kernel+bounces-25263-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25263-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7456E1F21CD2 for ; Sat, 13 Jan 2024 10:43:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48D0D20DDD; Sat, 13 Jan 2024 10:43:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lqIrmR+i" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7434A79F3; Sat, 13 Jan 2024 10:43:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A393C433F1; Sat, 13 Jan 2024 10:43:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705142628; bh=7QTEqiII/ATcIcuXjYpHlYvEtuflKe0mzeo9AghBfD8=; h=From:To:Cc:Subject:Date:From; b=lqIrmR+i9CuvBidK8icPurOxo5FokvxXoCpnMakaVxtd5Kns7VuC9pt2cY46M6X0D 2JPzIGax10xZD6WP+idfo5l5YbYH5XUelk1KsKJn6bwkLHdrLcnXpFt6HOd2Mh2g1q BlR35CVBRLHz4JHXSu9eM2aC/Dblnt8M/aNAYZXb+KnL212+kElR99H+aCKPGL5jwG wNWNI6Y5h+6iNj4WyS+XeTbF7L4dc+DtZLqrl0xsDGqR0O0NurMr32SaZTx/aOfJmf ussp6DdZ8s50gSa19tsR30RCg4y946VoM50JZtHVWrFrP+CbHCfXkiLTC6rCFErQnS OLofs/M/rz2gA== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Ben Hutchings , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] kbuild: deb-pkg: show verbose log for direct package builds Date: Sat, 13 Jan 2024 19:43:36 +0900 Message-Id: <20240113104339.16131-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When the Debian package build is initiated by Kbuild ('make deb-pkg' or 'make bindeb-pkg'), the log messages are displayed in the short form, which is the Kbuild default. Otherwise, let's show verbose messages (unless the 'terse' tag is set in DEB_BUILD_OPTION), as suggested by Debian Policy: "The package build should be as verbose as reasonably possible, except where the terse tag is included in DEB_BUILD_OPTIONS." [1] This is what the Debian kernel also does. [2] [1]: https://www.debian.org/doc/debian-policy/ch-source.html#main-building-script-debian-rules [2]: https://salsa.debian.org/kernel-team/linux/-/blob/debian/6.7-1_exp1/debian/rules.real#L36 Signed-off-by: Masahiro Yamada --- Changes in v2: - New patch scripts/package/debian/rules | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules index 098307780062..697fbfa7595f 100755 --- a/scripts/package/debian/rules +++ b/scripts/package/debian/rules @@ -11,6 +11,14 @@ ifneq (,$(filter-out parallel=1,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))) MAKEFLAGS += -j$(NUMJOBS) endif +# When KBUILD_VERBOSE is undefined (presumably you are directly working with +# the debianized tree), show verbose logs unless DEB_BUILD_OPTION=terse is set. +ifeq ($(origin KBUILD_VERBOSE),undefined) + ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS))) + export KBUILD_VERBOSE := 1 + endif +endif + revision = $(lastword $(subst -, ,$(shell dpkg-parsechangelog -S Version))) CROSS_COMPILE ?= $(filter-out $(DEB_BUILD_GNU_TYPE)-, $(DEB_HOST_GNU_TYPE)-) make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE) KBUILD_BUILD_VERSION=$(revision) $(addprefix CROSS_COMPILE=,$(CROSS_COMPILE)) -- 2.40.1