From patchwork Wed Feb 15 01:20:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 57334 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3300678wrn; Tue, 14 Feb 2023 17:26:49 -0800 (PST) X-Google-Smtp-Source: AK7set8yAUtlDK9n7QGEnMHHON/C7gb7wNrn2SmyxmSXlXf5q1MVMDkanelmsbSkTKPnwtWZTJQq X-Received: by 2002:a05:6a00:188b:b0:5a8:e3d5:d7d4 with SMTP id x11-20020a056a00188b00b005a8e3d5d7d4mr1617048pfh.7.1676424409424; Tue, 14 Feb 2023 17:26:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676424409; cv=none; d=google.com; s=arc-20160816; b=NR3mjPoaEaUHwaGO0VN90LX/n7M1/cQ+DmnxhL/wO42wwb0DBY3w7hw5j/RUtNyJJE 7aGuXoaA4WjbC604osApavZKyk5GXkufj7rKXkTdcwKsBG8r31dWGIuy17cXzYjbI9Md z2FsccwVqBSZ+VqbmvKkgqgbYa3fnPkmXFuirRG0bXg08lWd4XpTTNiy9QHHUX12EaN3 epOd8NAebkv6ssE7MQJBlFLVDdwbROFDiUmjTei6HoYzdHNfYKjXtSRlmfiLKQoNgKN+ 4fCNnpZ2RJg05Basl8Zf2MWe0oH6llPIFcy4Rvwioj6wO5KC5dA4zK4PuDAK/KP8ehlm cfIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OUymR0RbO+MH7OLAPYYR851TXXLje9FQmuPT8GMFbTU=; b=OAVdxtfb4c/xXfzO5CWSmOH6KA+AB++Clkbn+elA7wEj3L4ZaRDaJo0Ls6SfrzXmI0 gW12ja0OP72ZG18YUoIUzkOFLmJlGOp+O+CKu3I4Bcup9V8lXMjwN1sq6VgIOe+ktzVh 6gHRvcH3B+QwLa0a7wifNtrUy0z5mjisu/lc4naep6QMWlzubPsGZsBR9cLAiH9edph8 zXelpANgfMcAI12L6D01/j++tS/LsL0/+MbALzupEDudv3EPVbrMeeI2r69IXX1+enDs ZCV4x7Lg8yEhPtgbvbBgs3zRPzhU99LWumGlGWoanvLBYw3PIBkti/ztUloyjsUY+WkY XttQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D48JCem6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z28-20020aa79f9c000000b005a8dd9b898esi3114361pfr.75.2023.02.14.17.26.35; Tue, 14 Feb 2023 17:26:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D48JCem6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233625AbjBOBWz (ORCPT + 99 others); Tue, 14 Feb 2023 20:22:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233571AbjBOBWk (ORCPT ); Tue, 14 Feb 2023 20:22:40 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8B1B3345A; Tue, 14 Feb 2023 17:21:54 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 6C72E6198D; Wed, 15 Feb 2023 01:21:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8428FC4339B; Wed, 15 Feb 2023 01:21:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676424113; bh=3R0g8mH0HfVeY9FreGkKJ/GZs7e+F2BbvGb/IvPgPy0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D48JCem6bygp0I6spR8PbF1EHyZyFI1QA8uihjpdnRla/umK2r2AQKWIOL+OUlkyg /Ym5JV1JbC+rVTGMNgWF1cNQSkxio2fXpXC/RabTQ0yjetzAWsuRrTgw9Wkfui3goI AhyEXZB+tW701Oq5pO48CMnkU6wVyStlWWQt6MM7S4e3CVofMVk8fqcqbWWn/SrmJ8 64UV7VFJt6gUnWTgeqGaVe9NObLL98VRQZF06F4kkGCT7SfpB+rCrv1SFCTJHOcdZd erCACdaLNtT56XUADTUlZcMth0LHEv6ecKlZLYtdVDRUyqvsMBjp2/y0nIKyjymxTr G+SwMQa21l3WQ== 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 12/12] kbuild: add srcdeb-pkg target Date: Wed, 15 Feb 2023 10:20:34 +0900 Message-Id: <20230215012034.403356-12-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 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757858401545323535?= X-GMAIL-MSGID: =?utf-8?q?1757858401545323535?= This new target builds only the debian source package. Factor similar code out to the 'build-deb-pkg' variable. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier --- Changes in v6: - New patch scripts/Makefile.package | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/scripts/Makefile.package b/scripts/Makefile.package index b941e6341b36..8650d9432c26 100644 --- a/scripts/Makefile.package +++ b/scripts/Makefile.package @@ -100,6 +100,9 @@ binrpm-pkg: +rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \ $(UTS_MACHINE)-linux -bb $(objtree)/binkernel.spec +# deb-pkg srcdeb-pkg bindeb-pkg +# --------------------------------------------------------------------------- + quiet_cmd_debianize = GEN $@ cmd_debianize = $(srctree)/scripts/package/mkdebian @@ -117,14 +120,27 @@ debian-orig: linux.tar.gz debian cp $< ../$(orig-name); \ fi +build-deb-pkg = \ + dpkg-buildpackage \ + --build=$(build-type) --no-pre-clean --unsigned-changes \ + $(if $(findstring source, $(build-type)), --unsigned-source) \ + $(if $(findstring binary, $(build-type)), -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch)) \ + $(DPKG_FLAGS) + PHONY += deb-pkg +deb-pkg: private build-type := source,binary deb-pkg: debian-orig - +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) \ - --build=source,binary -nc -us -uc + +$(build-deb-pkg) + +PHONY += srcdeb-pkg +srcdeb-pkg: private build-type := source +srcdeb-pkg: debian-orig + +$(build-deb-pkg) PHONY += bindeb-pkg +bindeb-pkg: private build-type := binary bindeb-pkg: debian - +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -b -nc -uc + +$(build-deb-pkg) PHONY += intdeb-pkg intdeb-pkg: @@ -225,6 +241,7 @@ help: @echo ' srcrpm-pkg - Build only the source kernel RPM package' @echo ' binrpm-pkg - Build only the binary kernel RPM package' @echo ' deb-pkg - Build both source and binary deb kernel packages' + @echo ' binsrc-pkg - Build only the source kernel deb package' @echo ' bindeb-pkg - Build only the binary kernel deb package' @echo ' snap-pkg - Build only the binary kernel snap package' @echo ' (will connect to external hosts)'