From patchwork Sat Dec 30 13:51:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 184009 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp3092046dyb; Sat, 30 Dec 2023 05:52:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzIT5auiRE5QnWpi+24gmAjgX9VG5qCk6KMLUEiYR3n1VjQiTPhM/HlkGc4VUVba/4YKLk X-Received: by 2002:a92:cd8a:0:b0:35f:e8a1:2b18 with SMTP id r10-20020a92cd8a000000b0035fe8a12b18mr14807340ilb.21.1703944350524; Sat, 30 Dec 2023 05:52:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703944350; cv=none; d=google.com; s=arc-20160816; b=K6rhtDIUI+h9vyCrI36WSfvdHCXUdUQ+ciL6uKrSK4/k2yxfuNKnqujweNtvRmLt7C QdTVI1X7rGuJyOrDw2vE5c8pGuASVxvK11GVUYQxhwu3DX+NxL7mVEbatNTX+fSPJAoj fda2Hd3Ch3sQL3Lc4+OuGsWHNIUBpSk0T9kiAuauvQN0KcPNe6s/2r3QM0dPt2UncTQh UKmT1CRSIZ8SzGwLqy/xtljweYP4s/YEfXA2W42AhPBmI3ApBlZDv/mlHf4myMLnEZOP ZzVVs+2PEnp+xk19a1NgrgHGOuCdQtswR3UC4ggMtuQAPVKSkYFFSyPPaeP/Xy+3zsDb fNwA== 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=CDRS04BashpMFDUIxCodRBzo58n8uptM7wfoDDa34Wo=; fh=5gYN4msaJmwnN8mGpibv8VZnTy0MtvGQcf5D09XpoaQ=; b=RSMM7BO1c8sDQbRaYEITjItZW46g9I+38szeSdJp9eY1i6oTc/78WLV5TaU1Z5rE9q LrMaQok0iNcTKbEiEpJMOXZaBNpgCuhdgPypJbqYA5wdEQbvE6CURlMEQTSy+2ie0dts /LWGNMx1KyXsoSQsj7PP7VjA591exm+Mfgvl95ckD08lk61eJNepAq0aXbduJlBAbZUp tr9QuLEOJoHP/coRcD4SivI+XIypLQFGak+cGdhN51IoDKxHeoTEurivWekPRvbaPt3N AtyHLnsoxxvlzyR38eLJ8A1EeNrj4Jke+FxovsehPjxTQh7Y2bbbbDQMAwoTJV8zTdWz l4iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Tf9kgC0O; spf=pass (google.com: domain of linux-kernel+bounces-13438-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13438-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 k2-20020a632402000000b005bdd6196f4asi13253932pgk.392.2023.12.30.05.52.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Dec 2023 05:52:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13438-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=Tf9kgC0O; spf=pass (google.com: domain of linux-kernel+bounces-13438-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13438-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 1C61BB213AE for ; Sat, 30 Dec 2023 13:52:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B5FC9479; Sat, 30 Dec 2023 13:52:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Tf9kgC0O" X-Original-To: linux-kernel@vger.kernel.org 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 53AA18BED; Sat, 30 Dec 2023 13:52:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89A96C433C7; Sat, 30 Dec 2023 13:52:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703944324; bh=I8YWkNwCfpsTCQMjWVH+WYYNUuZhW8O5gv7Trb+2X3I=; h=From:To:Cc:Subject:Date:From; b=Tf9kgC0OzB3/DOGkdXeZio0IHJKL0+iT99ZhAUEHwPB0KSBkAJMOZVNxoqlbUbBpj pTEX1c1KaFnopzGD2H0tB+fXdJmjc5uEYJYs/jSTF82EM1nhS+6zgUCHUwgxqpwFfU yqwpEYfeyuBiMDa4Yii9+JuIxfxYDPXQMmVvJMmS2scOTTLsfO4u2jNcgYwjzsDRd9 tCjWpcW0pLEkeE4wrNRBUUPNTvE0Lf5bYxbUmYpKdEH4AZx1S3xDv3e98SKwYvBRi3 rrpkw78tGtd0QI3+59xcPYUAU4FDP9tCp+TQ/rfhR+yLYxsNhJxL1FgpPfFV1QUZSs fBTqkkwz/hdOQ== 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 1/5] kbuild: deb-pkg: move 'make headers' to build-arch Date: Sat, 30 Dec 2023 22:51:56 +0900 Message-Id: <20231230135200.1058873-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: 1786715151367167081 X-GMAIL-MSGID: 1786715151367167081 Strictly speaking, 'make headers' should be a part of build-arch instead of binary-arch. 'make headers' constructs read-to-copy UAPI headers in the kernel directory. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier --- scripts/package/builddeb | 1 - scripts/package/debian/rules | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index cc8c7a807fcc..842ee4b40528 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -155,7 +155,6 @@ install_libc_headers () { rm -rf $pdir - $MAKE -f $srctree/Makefile headers $MAKE -f $srctree/Makefile headers_install INSTALL_HDR_PATH=$pdir/usr # move asm headers to /usr/include//asm to match the structure diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules index cb084e387469..a686c37d0d02 100755 --- a/scripts/package/debian/rules +++ b/scripts/package/debian/rules @@ -26,8 +26,8 @@ binary-arch: build-arch build: build-arch build-indep build-indep: build-arch: - $(MAKE) $(make-opts) \ - olddefconfig all + $(MAKE) $(make-opts) olddefconfig + $(MAKE) $(make-opts) headers all .PHONY: clean clean: From patchwork Sat Dec 30 13:51:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 184010 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp3092081dyb; Sat, 30 Dec 2023 05:52:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IE6GnCEZpFhLT6MfI3GtBS57c1vpI2ySzatlHFSAtJrsbpac+S77iImh6MKaCGn7+uzFV5v X-Received: by 2002:a05:6a20:9143:b0:196:c50e:f6ae with SMTP id x3-20020a056a20914300b00196c50ef6aemr370027pzc.73.1703944358839; Sat, 30 Dec 2023 05:52:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703944358; cv=none; d=google.com; s=arc-20160816; b=KfJ+tYwdjG3kawZDS1tyM5QtZo1LkM8SvTb4JSArEUBMOldBk/nETibxs3fJcyoFO6 Yxk8iwx4elxercMNKC9Hq6oLsbpqFq9ZyiekH9b6ccSb4aLqTQCqr7QcX9VMKZe2SC+w 1kS0KFdxANZl3new0glAU4Di9W4UQnNSdYGVcEMGcGyiovTb4QzahSlRKqu+JQ/BzIkB +LLNmqKnbMinHod1xACVYisCiXTU+XqROhZHJpmi8NeWpn68Intrb/BDFBNU9sVdV0sI gs/zb1lB4HcQdeA+mMsNkAclcR8UGRZinEixVdoo2jtpLOjuvy445VkLC2FzpOdxOg/n uB5Q== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=RzWg+MeV80bKXSV/rwxcEVNnk9YnJwD0eHSnwQqTA2U=; fh=5gYN4msaJmwnN8mGpibv8VZnTy0MtvGQcf5D09XpoaQ=; b=uYXvhoQzUiGZLOcjo1gAskdzafoZ+1ZkDGoZDSW65crR3N9WR8/QPCRLuBDxb5lq+l cEqdIQS4rhzI1tjeFxFV97W9hJdu23FnH94q93UjKpunib54nj6lgOFZht6XwaDn4zDn u02IYxcHUcpl6XMJBPJ+kgoGFwUphS49tMedXK8pE0UaMpEwIVm30fX+JwWkAS1zqYDJ K71PvWl5ojibkt5C2Ri6pCXAbgQqO9BKZSm9M1sKwCEPX8mX6F10jw9FC6Jn1maEE+RM hulouxkKk90gZBnZiI/FHQ5lU8yN++t5AElFrcaeUvDvDwHn7Lb6SWc9s9VfuOadCkyT +Y0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uMHcSBpv; spf=pass (google.com: domain of linux-kernel+bounces-13439-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13439-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c25-20020a62e819000000b006d9a9d65993si11647937pfi.127.2023.12.30.05.52.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Dec 2023 05:52:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13439-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uMHcSBpv; spf=pass (google.com: domain of linux-kernel+bounces-13439-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13439-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 841E328225C for ; Sat, 30 Dec 2023 13:52:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 96674BA33; Sat, 30 Dec 2023 13:52:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uMHcSBpv" X-Original-To: linux-kernel@vger.kernel.org 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 08C7D8F65; Sat, 30 Dec 2023 13:52:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31B0DC433CB; Sat, 30 Dec 2023 13:52:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703944326; bh=kDbLJxPgBxd0hxuVu8WO1yEFieOFRTfcfLs0cYwU+DM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uMHcSBpvo7B5K13+zqSWNAHlxna6pKVh2SM6n1VZ7bNqHaA/sxvQ+wWj7TFo2uFkp jSX0Nl0GQdqc6shqmy3oJGcFSs1uhZYoHdn4P5XCwnpYeQF5Q1WP1OHbUE4lp4AZPt AFViReyWtCCUF/r/8c3W+DRwlogPOTbj4jw/od6rqmk2kJoNUZ4+LvvQO5zYFxc7/K oMIlz7TyByTbYORuNOO/SjXC2M1hiMWMKD67WlJZDYXSm4v21SeUXZgWT8TaSoJ9iu NCKZI9q9YGrbkXA6QFpv6J153orCu1nKxYIf+XRZ4nYP4nCkIxI0HJw7fENKir2RKQ 05EPLKopj/yKg== 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 2/5] kbuild: deb-pkg: make debian/rules quiet by default Date: Sat, 30 Dec 2023 22:51:57 +0900 Message-Id: <20231230135200.1058873-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231230135200.1058873-1-masahiroy@kernel.org> References: <20231230135200.1058873-1-masahiroy@kernel.org> 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: 1786715159798857527 X-GMAIL-MSGID: 1786715159798857527 Add $(Q) to commands in debian/rules to make them quiet when the package built is initiated by 'make deb-pkg'. While the commands in debian/rules are not hidden when you directly work with the debianized tree, you can set 'terse' to DEB_BUILD_OPTIONS to silence them. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier --- scripts/package/debian/rules | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules index a686c37d0d02..b3f80f62236c 100755 --- a/scripts/package/debian/rules +++ b/scripts/package/debian/rules @@ -11,6 +11,10 @@ ifneq (,$(filter-out parallel=1,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))) MAKEFLAGS += -j$(NUMJOBS) endif +ifneq (,$(filter terse,$(DEB_BUILD_OPTIONS))) + Q ?= @ +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)) @@ -19,20 +23,20 @@ make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE) KBUILD_BUILD_VERSION=$(r binary: binary-arch binary-indep binary-indep: build-indep binary-arch: build-arch - $(MAKE) $(make-opts) \ + $(Q)$(MAKE) $(make-opts) \ run-command KBUILD_RUN_COMMAND='+$$(srctree)/scripts/package/builddeb' .PHONY: build build-indep build-arch build: build-arch build-indep build-indep: build-arch: - $(MAKE) $(make-opts) olddefconfig - $(MAKE) $(make-opts) headers all + $(Q)$(MAKE) $(make-opts) olddefconfig + $(Q)$(MAKE) $(make-opts) headers all .PHONY: clean clean: - rm -rf debian/files debian/linux-* debian/deb-env.vars* - $(MAKE) ARCH=$(ARCH) clean + $(Q)rm -rf debian/files debian/linux-* debian/deb-env.vars* + $(Q)$(MAKE) ARCH=$(ARCH) clean # If DEB_HOST_ARCH is empty, it is likely that debian/rules was executed # directly. Run 'dpkg-architecture --print-set --print-format=make' to @@ -41,6 +45,6 @@ ifndef DEB_HOST_ARCH -include debian/deb-env.vars debian/deb-env.vars: - dpkg-architecture -a$$(cat debian/arch) --print-set --print-format=make > $@.tmp - mv $@.tmp $@ + $(Q)dpkg-architecture -a$$(cat debian/arch) --print-set --print-format=make > $@.tmp + $(Q)mv $@.tmp $@ endif From patchwork Sat Dec 30 13:51:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 184011 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp3092164dyb; Sat, 30 Dec 2023 05:52:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IHHjjqLqA3atJJWnJorZQErrXxGfjm5TPHMTvBQf+QUf/mT8Xw5cs5n4pAlhQ9wDfi4TA2F X-Received: by 2002:a05:6a21:6d96:b0:196:3126:bc59 with SMTP id wl22-20020a056a216d9600b001963126bc59mr6364714pzb.15.1703944374312; Sat, 30 Dec 2023 05:52:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703944374; cv=none; d=google.com; s=arc-20160816; b=NYEyV+E8zqT5OxYreU4sT5gXsCdteLlQEnzwjOB5fV7p0Flq5wj85l2GAaPE7Ob5Ne jNuNBPnfNcXtESFwfyWvHxIM6NMS49+evvVgSHopE5yaODMrbEKRoUcC21XHXTI7Or0j Sj/ycE2OoVkcYzjrLjATHWpYk+bibmc1QlygVfHr6ofGEOEQFbhmT67aWYrgO+wJVSx9 tar7IJGF2zyXzD2uXGWut7tofa7mWtb8pW0ATe2shKi76ukyTDvurcSL5LihTVmq+D1M 4jg1Oqx9DRWhn0tmisnKtaH1llTFuhIO/cyFLDgia4aV4lmqoF2B3vKLe2v9dOw1rzMA o3MQ== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=owjFKRcQ9tOSshK2nO0jqqEaEQ/XCqjrdIyQ4CIXGUE=; fh=5gYN4msaJmwnN8mGpibv8VZnTy0MtvGQcf5D09XpoaQ=; b=j9rPfJCsRRbGJ11c0Z79pPmtPO/Lz+Mk0Yl5EcQmGC0ek0oXo7UJ6fp5OH/9T66IpV SL0yVKq2JnQVs2WGL8Dt9Zd0CgW0JfhuSNM/h+RDZ4FaHuy3nNyQ/pPAkkiVj26qUsen 17BtWt6WCvsk0crzTj22HelWM+4XLyxDB3XWWtX+LfuB8MbEA4Duuo4uvESyX5TlWwtQ xo+IlJ4McS+NaUle7eD1TkByLCDICfi/jL+Ey+UETK3ZTv1erVgKCSioBuRRq7ePf8Y2 y1npnf4LfOgQs8AlRu6Qd1rrf6/N9/ZG00ek6VNz5nEUrl6cPRqgv4df7L4SOWXZ/DXk JVSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VgkfbaYC; spf=pass (google.com: domain of linux-kernel+bounces-13440-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13440-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y66-20020a633245000000b005c66404de05si16136370pgy.413.2023.12.30.05.52.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Dec 2023 05:52:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13440-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VgkfbaYC; spf=pass (google.com: domain of linux-kernel+bounces-13440-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13440-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0256F2822FD for ; Sat, 30 Dec 2023 13:52:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E5F2C148; Sat, 30 Dec 2023 13:52:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VgkfbaYC" X-Original-To: linux-kernel@vger.kernel.org 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 A40F0B661; Sat, 30 Dec 2023 13:52:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB020C433C8; Sat, 30 Dec 2023 13:52:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703944328; bh=h/bVRvqBDpxa6Xn0ybqaJ9bxYvhDa1MDNIDx4fYYn6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VgkfbaYCDnHDqECG5hJVZR4EQlngt3vDZwFAgOzAFgdXSBoJ7FXVGq7VOueQuzxsS hHwa1t8KnFh4E8L5rr3MbbignJ7mDEOXoiTR+DXXqLlfemzFZH+S4PhLjRW3VnYPDk drVHFhSJcJ+E51onp3H6vscUszm3mH33sAR4eu3Bzkm2bSq0EhdWkrkGruZAITfeoD 3+dJPOhpQpfo5Dvbul59uZCTRhsL2nKuExlfb/YIxeUUtr2ais4vJRqBHClToyoY7K pWYhp24PFAfwIfpLQsdHfiMLV5cndhZ14/E409qw7CADQ2RFYaHQNSamG1yrtZtD2U FwCxOQ9coOuJg== 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 3/5] kbuild: deb-pkg: use debian/ for tmpdir Date: Sat, 30 Dec 2023 22:51:58 +0900 Message-Id: <20231230135200.1058873-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231230135200.1058873-1-masahiroy@kernel.org> References: <20231230135200.1058873-1-masahiroy@kernel.org> 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: 1786715176606216745 X-GMAIL-MSGID: 1786715176606216745 Use debian/ for tmpdir, which is the default of debhelper. This simplifies the code. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier --- scripts/package/builddeb | 41 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 842ee4b40528..bf96a3c24608 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -25,9 +25,7 @@ if_enabled_echo() { } create_package() { - local pname="$1" pdir="$2" - - export DH_OPTIONS="-p${pname} -P${pdir}" + export DH_OPTIONS="-p${1}" dh_installdocs dh_installchangelogs @@ -39,8 +37,8 @@ create_package() { } install_linux_image () { - pdir=$1 - pname=$2 + pname=$1 + pdir=debian/$1 rm -rf ${pdir} @@ -109,7 +107,7 @@ install_linux_image () { } install_linux_image_dbg () { - pdir=$1 + pdir=debian/$1 rm -rf ${pdir} @@ -139,8 +137,8 @@ install_linux_image_dbg () { } install_kernel_headers () { - pdir=$1 - version=$2 + pdir=debian/$1 + version=${1#linux-headers-} rm -rf $pdir @@ -151,7 +149,7 @@ install_kernel_headers () { } install_libc_headers () { - pdir=$1 + pdir=debian/$1 rm -rf $pdir @@ -171,28 +169,13 @@ for package in ${packages_enabled} do case ${package} in *-dbg) - install_linux_image_dbg debian/linux-image-dbg;; + install_linux_image_dbg "${package}";; linux-image-*|user-mode-linux-*) - install_linux_image debian/linux-image ${package};; + install_linux_image "${package}";; linux-libc-dev) - install_libc_headers debian/linux-libc-dev;; + install_libc_headers "${package}";; linux-headers-*) - install_kernel_headers debian/linux-headers ${package#linux-headers-};; + install_kernel_headers "${package}";; esac + create_package "${package}" done - -for package in ${packages_enabled} -do - case ${package} in - *-dbg) - create_package ${package} debian/linux-image-dbg;; - linux-image-*|user-mode-linux-*) - create_package ${package} debian/linux-image;; - linux-libc-dev) - create_package ${package} debian/linux-libc-dev;; - linux-headers-*) - create_package ${package} debian/linux-headers;; - esac -done - -exit 0 From patchwork Sat Dec 30 13:51:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 184013 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp3092303dyb; Sat, 30 Dec 2023 05:53:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvLmrpLH2j/mcri0KYwKRpORe7iSiDjejwCbBxcUzJybncy0gUvrWjU+MU8JYAEsy5GaiO X-Received: by 2002:a05:6e02:1707:b0:35f:e71f:4c60 with SMTP id u7-20020a056e02170700b0035fe71f4c60mr24677959ill.13.1703944395764; Sat, 30 Dec 2023 05:53:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703944395; cv=none; d=google.com; s=arc-20160816; b=fUfSLQnd/+GcCf6AcGHCA/ntGDMDOhmkmtUlJ7Cu2XGDnJNDi8aVKv8mGedOnB232F 3wBYQoFIvmeIvC/mHfSAmqHVxsHmjZhYL5bgBcau0WPCXtQtQxTXCAGNU3cvB4I2Id40 8b7gPVuUrvuISv+Bu6y42jyzOb2Sp/iFBpCVja+hawQnaCk64ojaKKC6PmjljtkQtmaU IIWQeSByTJ+TeZubFPL6iVG/1rRQ83Fldf922nE38zvjF7b0oI0TK+7j01o27Ahbazeu hjyyC+8MFRNIy2ndJYjjnnnnVIPoniD6qSbx44bBjUVPJkBm/D92ckzAXfdD6iL7YcF7 1hdw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=9C6TkDPVlnxVFXhU6Ue0VuMh+6A1CZbv5UrvTPeHMwQ=; fh=5gYN4msaJmwnN8mGpibv8VZnTy0MtvGQcf5D09XpoaQ=; b=vtl7qklm7bieUABzsvBPp4r5BQwC/+y+15AbRdmqDuDD3+2dIUskn/0O19HN8/bw9U JUWzW1Y3uoKeGdu29b8Ju9WX5MS/t08ybplkNWKNr1aHAt9etfPnRjfbjoJzSkXktHJV MG2MoaxV9lF687NTmma8JhtY6R4KOJTdQRBrd9CIkJYdwpKGEyvET2oIBB2o3XxfrTNd 98ant0UZjlMgWyFA6AQGxMJYFOYxaEKY5nPlW05mvqt7VUhNyxeW6Oiz6OHkKogQMPsQ EYZyi/X2KovMocNjlmeyAs2iLAiZBDJ7QD6j39aSLHkjVo5r21/Epsuw5TTL0HVzcq5S UQTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sz9XIKbG; spf=pass (google.com: domain of linux-kernel+bounces-13441-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13441-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. [147.75.48.161]) by mx.google.com with ESMTPS id v23-20020a63f857000000b005cdfc01b502si13334797pgj.337.2023.12.30.05.53.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Dec 2023 05:53:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13441-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sz9XIKbG; spf=pass (google.com: domain of linux-kernel+bounces-13441-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13441-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 4E499B21494 for ; Sat, 30 Dec 2023 13:53:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6C525CA73; Sat, 30 Dec 2023 13:52:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sz9XIKbG" X-Original-To: linux-kernel@vger.kernel.org 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 C78B1BA45; Sat, 30 Dec 2023 13:52:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E1D8C433CC; Sat, 30 Dec 2023 13:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703944329; bh=zkEEcJ/BgQNaFI4OxXzXZP6UJ1d1sIRgE54D7s6R+qI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sz9XIKbGux9/yCiAJKc/VEsKOUFvOmYZ/RxfNRUIR1zegZ1OCuj7NZX638OkksG2t RRgFgHtmUzM1pXFn0LfCZHZ1dXTdfy80HqIAVPuYVnNeM+pfb5ed/7UumDSWAl2rXX Zwb+fX0YI1XNUwQI/xImeQ3ScpVF7vnNchubDGcBaKCXSthAF1ofVKZf2kN0qMYi6p PT3LbIaoRsK2eUGmW9pIM6rID8WeFlfmpDFfokg+NTs0Wky4l4hbSfitq5YD0pEi6Z 7vJilJfGZKjcV7x79G0qdPFlI8hWsHJOcf7fVmEttCAsrbvfCWCF+Au+Eu+5wMveWp 0EzigAzrZDa5w== 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 4/5] kbuild: deb-pkg: build binary-arch in parallel Date: Sat, 30 Dec 2023 22:51:59 +0900 Message-Id: <20231230135200.1058873-4-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231230135200.1058873-1-masahiroy@kernel.org> References: <20231230135200.1058873-1-masahiroy@kernel.org> 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: 1786715198625216749 X-GMAIL-MSGID: 1786715198625216749 'make deb-pkg' builds build-arch in parallel, but binary-arch serially. Given that all binary packages are independent of one another, they can be built in parallel. I am uncertain whether debian/files is robust against a race condition. Just in case, make dh_gencontrol (dpkg-gencontrol) output to separate debian/*.files, which are then concatenated into debian/files. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier --- scripts/package/builddeb | 40 ++++++++++-------------------------- scripts/package/debian/rules | 35 +++++++++++++++++++++++++++---- 2 files changed, 42 insertions(+), 33 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index bf96a3c24608..d31b16afe0db 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -24,18 +24,6 @@ if_enabled_echo() { fi } -create_package() { - export DH_OPTIONS="-p${1}" - - dh_installdocs - dh_installchangelogs - dh_compress - dh_fixperms - dh_gencontrol - dh_md5sums - dh_builddeb -- ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} -} - install_linux_image () { pname=$1 pdir=debian/$1 @@ -161,21 +149,15 @@ install_libc_headers () { mv "$pdir/usr/include/asm" "$pdir/usr/include/${DEB_HOST_MULTIARCH}" } -rm -f debian/files +package=$1 -packages_enabled=$(dh_listpackages) - -for package in ${packages_enabled} -do - case ${package} in - *-dbg) - install_linux_image_dbg "${package}";; - linux-image-*|user-mode-linux-*) - install_linux_image "${package}";; - linux-libc-dev) - install_libc_headers "${package}";; - linux-headers-*) - install_kernel_headers "${package}";; - esac - create_package "${package}" -done +case "${package}" in +*-dbg) + install_linux_image_dbg "${package}";; +linux-image-*|user-mode-linux-*) + install_linux_image "${package}";; +linux-libc-dev) + install_libc_headers "${package}";; +linux-headers-*) + install_kernel_headers "${package}";; +esac diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules index b3f80f62236c..407f46a4a655 100755 --- a/scripts/package/debian/rules +++ b/scripts/package/debian/rules @@ -19,12 +19,39 @@ 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)) +binary-targets := $(addprefix binary-, image image-dbg headers libc-dev) + +all-packages = $(shell dh_listpackages) +image-package = $(filter linux-image-% user-%, $(filter-out %-dbg, $(all-packages))) +image-dbg-package = $(filter %-dbg, $(all-packages)) +libc-dev-package = $(filter linux-libc-dev, $(all-packages)) +headers-package = $(filter linux-headers-%, $(all-packages)) + +mk-files = $(patsubst binary-%,debian/%.files,$1) +package = $($(@:binary-%=%-package)) +DH_OPTIONS = -p$(package) + +define binary + $(Q)+$(MAKE) $(make-opts) run-command KBUILD_RUN_COMMAND='+$$(srctree)/scripts/package/builddeb $(package)' + $(Q)dh_installdocs $(DH_OPTIONS) + $(Q)dh_installchangelogs $(DH_OPTIONS) + $(Q)dh_compress $(DH_OPTIONS) + $(Q)dh_fixperms $(DH_OPTIONS) + $(Q)dh_gencontrol $(DH_OPTIONS) -- -f$(call mk-files,$@) + $(Q)dh_md5sums $(DH_OPTIONS) + $(Q)dh_builddeb $(DH_OPTIONS) -- $(addprefix -Z,$(KDEB_COMPRESS)) +endef + +.PHONY: $(binary-targets) +$(binary-targets): build-arch + $(Q)truncate -s0 $(call mk-files,$@) + $(if $(package),$(binary)) + .PHONY: binary binary-indep binary-arch binary: binary-arch binary-indep binary-indep: build-indep -binary-arch: build-arch - $(Q)$(MAKE) $(make-opts) \ - run-command KBUILD_RUN_COMMAND='+$$(srctree)/scripts/package/builddeb' +binary-arch: $(binary-targets) + $(Q)cat $(call mk-files,$^) > debian/files .PHONY: build build-indep build-arch build: build-arch build-indep @@ -35,7 +62,7 @@ build-arch: .PHONY: clean clean: - $(Q)rm -rf debian/files debian/linux-* debian/deb-env.vars* + $(Q)rm -rf debian/files debian/linux-* debian/deb-env.vars* debian/*.files $(Q)$(MAKE) ARCH=$(ARCH) clean # If DEB_HOST_ARCH is empty, it is likely that debian/rules was executed From patchwork Sat Dec 30 13:52:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 184012 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp3092304dyb; Sat, 30 Dec 2023 05:53:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IHawxlrqqk1OaEL+fZFYMCuvDl20nQ/rKqwSYipM7CZsZAuDjfDh5h+j2BGHGm9rf3LemCm X-Received: by 2002:ac8:5dd3:0:b0:427:851a:dde4 with SMTP id e19-20020ac85dd3000000b00427851adde4mr17711747qtx.115.1703944395874; Sat, 30 Dec 2023 05:53:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703944395; cv=none; d=google.com; s=arc-20160816; b=EPbmyJ3ebWZDS1Uj+PIqHCTlQg/tfpNDj1ZWm2R45jktXGwqiSWzsp5MDimndSBA/8 nzucbnsIKywabTYKPsNDmto4Ea39Z7ucxMwz2kd4b5tQEOZEVVNPRYuj2D/8bhKfEMXb +rzbN0qPo9PHstEJI393ur+joXVWo7Tl/7MNCbR+dt9WWDA+0o7GgLqvlGAz93C/jNBj hhYICe0z9khmrRuxMM8AxbmV4TvkXj5pT5nLALiMO3g/G4ouGCILOQ6lgd6LevwHErko XJID8fUv6i37bN0Bs3D/iJgn/hcHqWaltvRzCkl2+3pQ42ZSrQkSRBZQCzLtCV5kNUcp Ip+Q== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=llsSDqlJ0LJ+r9Jyw41oL9EhehIXcjUsv39CZDSaC0U=; fh=5gYN4msaJmwnN8mGpibv8VZnTy0MtvGQcf5D09XpoaQ=; b=bzFhXc4X0P/OPfsk4CgVGAnYglRcI7qVugnnp98YFj8ZI5fjSNxN7SoVTl3ES8W/rS Q2l2sd2xQrMWuzvA09N+j+GRrUntk847sQ3mUl7KyEibt1flYS5TCWyNNxWZ7n/JRbC8 KipVZ3Za2RVgwlHXa3zDaNlFwSo8WfK1BDxhWpbhxTJXG3ZHhpSLrLTM4E4jgvpEEig+ 1Q4StVeZuxDJDhGefYnJyZefmcIAwA1AD0UfWjIBmkksTWcMqafuM+QbTFoxJrreqLnz uaaQdq9wXJ5/vm03LzsH66NfYZ038Yc8fysoAThoVrG3rZJk/p5U10pc9xDgDxY5qz00 d/Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EiPoJCnP; spf=pass (google.com: domain of linux-kernel+bounces-13442-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13442-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d13-20020ac85d8d000000b0042790849658si21168439qtx.335.2023.12.30.05.53.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Dec 2023 05:53:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13442-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EiPoJCnP; spf=pass (google.com: domain of linux-kernel+bounces-13442-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13442-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id A7E531C212F0 for ; Sat, 30 Dec 2023 13:53:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D2A9E57E; Sat, 30 Dec 2023 13:52:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EiPoJCnP" X-Original-To: linux-kernel@vger.kernel.org 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 EC38BC8E0; Sat, 30 Dec 2023 13:52:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10FAFC433C9; Sat, 30 Dec 2023 13:52:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703944331; bh=wJWQwmRdH1pPYpBRNITxKPq6OkG6pHAnNrHczJWgfW4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EiPoJCnP22eAYdYAiZX+dMT580mxQCjPUs2dBLOFiw8rPVeLqDnJruv+2nb7jbCe1 Jh9pAt/JFSL0xadph+YrfIf6J8RK+7hN0JuEXl9ygt7PFM+Kqra3bKga9vQz0c0sqk ve8xgExFEuhXu5PVQknhRGMVH+G9kmIdf9p6JlcfU/eJncNPvGXNIgrk5R2RuNRKKI rnDyo24RP9tVhZ0Nfv1OSQdDckJm+/CwxD8JMI5tm6rDBM41jIIy+DihM8ozAVilK+ YKk/VphOdSBF4ZZQUTw2jttBfSSJrZ2oLxveGl5Tfr3Y7yTPICouu1feVoufnQpHEi zZsE2u4ShRUog== 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 5/5] kbuild: deb-pkg: call more misc debhelper commands Date: Sat, 30 Dec 2023 22:52:00 +0900 Message-Id: <20231230135200.1058873-5-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231230135200.1058873-1-masahiroy@kernel.org> References: <20231230135200.1058873-1-masahiroy@kernel.org> 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: 1786715199148341864 X-GMAIL-MSGID: 1786715199148341864 Use dh_prep instead of removing old build directories manually. Use dh_clean instead of removing build directories and debian/files manually. Call dh_testdir and dh_testroot for preliminary checks. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier --- scripts/package/builddeb | 8 -------- scripts/package/debian/rules | 6 +++++- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index d31b16afe0db..e797ad360f7a 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -28,8 +28,6 @@ install_linux_image () { pname=$1 pdir=debian/$1 - rm -rf ${pdir} - # Only some architectures with OF support have this target if is_enabled CONFIG_OF_EARLY_FLATTREE && [ -d "${srctree}/arch/${SRCARCH}/boot/dts" ]; then ${MAKE} -f ${srctree}/Makefile INSTALL_DTBS_PATH="${pdir}/usr/lib/linux-image-${KERNELRELEASE}" dtbs_install @@ -97,8 +95,6 @@ install_linux_image () { install_linux_image_dbg () { pdir=debian/$1 - rm -rf ${pdir} - # Parse modules.order directly because 'make modules_install' may sign, # compress modules, and then run unneeded depmod. while read -r mod; do @@ -128,8 +124,6 @@ install_kernel_headers () { pdir=debian/$1 version=${1#linux-headers-} - rm -rf $pdir - "${srctree}/scripts/package/install-extmod-build" "${pdir}/usr/src/linux-headers-${version}" mkdir -p $pdir/lib/modules/$version/ @@ -139,8 +133,6 @@ install_kernel_headers () { install_libc_headers () { pdir=debian/$1 - rm -rf $pdir - $MAKE -f $srctree/Makefile headers_install INSTALL_HDR_PATH=$pdir/usr # move asm headers to /usr/include//asm to match the structure diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules index 407f46a4a655..5c5554c70949 100755 --- a/scripts/package/debian/rules +++ b/scripts/package/debian/rules @@ -32,6 +32,9 @@ package = $($(@:binary-%=%-package)) DH_OPTIONS = -p$(package) define binary + $(Q)dh_testdir $(DH_OPTIONS) + $(Q)dh_testroot $(DH_OPTIONS) + $(Q)dh_prep $(DH_OPTIONS) $(Q)+$(MAKE) $(make-opts) run-command KBUILD_RUN_COMMAND='+$$(srctree)/scripts/package/builddeb $(package)' $(Q)dh_installdocs $(DH_OPTIONS) $(Q)dh_installchangelogs $(DH_OPTIONS) @@ -62,7 +65,8 @@ build-arch: .PHONY: clean clean: - $(Q)rm -rf debian/files debian/linux-* debian/deb-env.vars* debian/*.files + $(Q)dh_clean + $(Q)rm -rf debian/deb-env.vars* debian/*.files $(Q)$(MAKE) ARCH=$(ARCH) clean # If DEB_HOST_ARCH is empty, it is likely that debian/rules was executed