From patchwork Wed Feb 15 01:20:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13141168 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2752C64EC7 for ; Wed, 15 Feb 2023 01:22:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233444AbjBOBWP (ORCPT ); Tue, 14 Feb 2023 20:22:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232736AbjBOBWO (ORCPT ); Tue, 14 Feb 2023 20:22:14 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30B6D31E04; Tue, 14 Feb 2023 17:21:40 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D9352B81F8D; Wed, 15 Feb 2023 01:21:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2451FC4339C; Wed, 15 Feb 2023 01:21:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676424097; bh=79SOz62YcHFzQBbIrRtp7ktn5c/Q1u91mdZ/FPKD8Es=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QdK1MqD0cy4vSU00oKAcdUwnOigcJRqoysMfSGsMEb80YwZDevrNx08EQojR1pcgN MFd5H4jbETnqVx1Ao9ZIRbfxkMEJKF0Qpp9B8FcfYsZ3TAuE4BSXdKJL8NP2R2Th6o VrA863CE+fMDSsV0Xv3d3dYuLYyZMRQHh7zv6xmn7lOp6dPYa1FvbYSN5unwnDeJNC 6j4g6MA6MVeYVq3RuDg7PdrAhM7H8kotidhRKrw/5hd0rsu/cJjLCvdoak/gemCEbH c6cHgA/BqWO7CQBmmHlcCFfgnNXmx3splzUkCPDTkZc9frOPdJOHOVzYmiSo+cr6qP UxIkupwURKV/g== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Ben Hutchings , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier Subject: [PATCH v6 03/12] kbuild: rpm-pkg: build binary packages from source rpm Date: Wed, 15 Feb 2023 10:20:25 +0900 Message-Id: <20230215012034.403356-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230215012034.403356-1-masahiroy@kernel.org> References: <20230215012034.403356-1-masahiroy@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org The build rules of rpm-pkg and srcrpm-pkg are almost the same. Remove the code duplication. Change rpm-pkg to build binary packages from the source package generated by srcrpm-pkg. This changes the output directory of the srpm generated by 'make rpm-pkg' because srcrpm-pkg overrides _srcrpmdir. Signed-off-by: Masahiro Yamada --- (no changes since v3) Changes in v3: - Explain that the source package location will be changed. scripts/Makefile.package | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/Makefile.package b/scripts/Makefile.package index f0002ace4156..55441d776d70 100644 --- a/scripts/Makefile.package +++ b/scripts/Makefile.package @@ -87,11 +87,9 @@ linux.tar.gz: .tmp_filelist # rpm-pkg # --------------------------------------------------------------------------- PHONY += rpm-pkg -rpm-pkg: - $(MAKE) clean - $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec - $(call cmd,src_tar,$(KERNELPATH),kernel.spec) - +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -ta $(KERNELPATH).tar.gz \ +rpm-pkg: srpm = $(shell rpmspec --srpm --query --queryformat='%{name}-%{VERSION}-%{RELEASE}.src.rpm' kernel.spec) +rpm-pkg: srcrpm-pkg + +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -rb $(srpm) \ --define='_smp_mflags %{nil}' # srcrpm-pkg