From patchwork Sat Jan 13 10:43:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 187890 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp696891dyc; Sat, 13 Jan 2024 02:44:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKTQatNBeCodzD3i9SyEbLPHgV8cmu+FLswhIVcxqvHeWkumILbF+u3GCP2YYtClpR42UD X-Received: by 2002:a17:90a:f188:b0:28c:c5fd:32eb with SMTP id bv8-20020a17090af18800b0028cc5fd32ebmr4635382pjb.45.1705142655637; Sat, 13 Jan 2024 02:44:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705142655; cv=none; d=google.com; s=arc-20160816; b=MKG2K5jkirTgciSsiahHePyiFIwDmUlMhor4qVPJPFPq/8+yvCsKgxzAbkunJjxhPO DcbQ26/HpmOPbGu5N+pitDHsTbY6lL0LXly0Wu/u72gglu/1VVUaFx9uc0g1QV50OxbH yIpiOdFb/CtsVfRDefpvVSgzbpoY41I24s6pjfg9P04bzgTTv39zBBc8O5wVyWSZQE29 wwqCDete3aQksPNiZD4+BY7nQPNaHc6h2QIQUtDmCQAZRuuEjvyyCCIcP022moMpS7b8 Fpzm5saJ2IuiqcFl6gWI7jUjovKLrzl55qanTazLXx5KYvXzB/vWrwoXbfPT79IpTiAN KpBw== 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25263-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id gp2-20020a17090adf0200b0028cd441d51esi7605240pjb.27.2024.01.13.02.44.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jan 2024 02:44:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25263-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25263-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 5E9FBB230DF for ; Sat, 13 Jan 2024 10:44:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 135EF20DF5; Sat, 13 Jan 2024 10:43:51 +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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787971665132606952 X-GMAIL-MSGID: 1787971665132606952 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 Reviewed-by: Nicolas Schier --- 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))