From patchwork Tue May 25 23:01:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Germann X-Patchwork-Id: 12280323 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD2DDC4707F for ; Tue, 25 May 2021 23:02:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AE4B461284 for ; Tue, 25 May 2021 23:02:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232127AbhEYXDy (ORCPT ); Tue, 25 May 2021 19:03:54 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:51098 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232040AbhEYXDy (ORCPT ); Tue, 25 May 2021 19:03:54 -0400 From: bage@linutronix.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1621983742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TbNffWAwwOO/zHwDZAIuU9j/1ayprncSRG9Hgevu32g=; b=y4ouNV33WrlWVrNzIJbDB3mWmu+faDsWmAclWAKB8uuJagRq+DDP1feE8vDqZjHCtC9BHl RMmrfmXbUp+bm7YOJKvP6Xp/SMVtPAv9gTxvJwvAS/rgVpWDVIkJfKvZallBov9QjESd+j +63qvQ67J4ZMiTPkGovCUK0Ax2HvF5P7HhNSTIW51XHZKhzeoosFE17k8zXqyGu+STVrcr SKoBUnBYGgnA0JwTwwthPICYDuowh86wvBVJFI/fAhYl2gg2R5U2xk9xSFLmylMLts8hyu 0GASb7uokaogQkgQgV2p1sWIs9ObcYx1YCjqZYygVIpFZnwXh8M2ULC/mDvsrA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1621983742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TbNffWAwwOO/zHwDZAIuU9j/1ayprncSRG9Hgevu32g=; b=VLjhj/xfkFRv/iO0dsDUCehda4shULe6GT1AQEzI7xkr2WV3lcLYvfl4njJwg3VsybbkHU lz1YljPzuaMVP4Dw== To: Masahiro Yamada , Michal Marek Cc: Bastian Germann , linux-kbuild@vger.kernel.org, tglx@linutronix.de Subject: [PATCH v2 1/5] builddeb: ignore or export files for clean pkg build Date: Wed, 26 May 2021 01:01:35 +0200 Message-Id: <20210525230139.6165-2-bage@linutronix.de> In-Reply-To: <20210525230139.6165-1-bage@linutronix.de> References: <20210525230139.6165-1-bage@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: Bastian Germann scripts/Makefile.package's TAR_CONTENT lists the files to include in orig tarballs while the deb-pkg make target only ignores .git. This results in the other top-level files ending up in the .diff.gz. Extend the TAR_CONTENT with the git-controlled top-level files. Let dpkg-source ignore .git with the default diff-ignore and list dynamically generated files that are not cleaned in extend-diff-ignore. Use the debian/source/options in order to have those always available on building the package. Signed-off-by: Bastian Germann --- scripts/Makefile.package | 5 +++-- scripts/package/mkdebian | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile.package b/scripts/Makefile.package index b74c65284fb2..360ce0ae2fa1 100644 --- a/scripts/Makefile.package +++ b/scripts/Makefile.package @@ -28,8 +28,9 @@ KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE)) KDEB_SOURCENAME ?= linux-upstream KBUILD_PKG_ROOTCMD ?="fakeroot -u" export KDEB_SOURCENAME -# Include only those top-level files that are needed by make, plus the GPL copy TAR_CONTENT := $(KBUILD_ALLDIRS) .config .scmversion Makefile \ + .clang-format .cocciconfig .get_maintainer.ignore \ + .gitignore .mailmap CREDITS MAINTAINERS README \ Kbuild Kconfig COPYING $(wildcard localversion*) MKSPEC := $(srctree)/scripts/package/mkspec @@ -75,7 +76,7 @@ deb-pkg: $(call cmd,src_tar,$(KDEB_SOURCENAME)) origversion=$$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$$//');\ mv $(KDEB_SOURCENAME).tar.gz ../$(KDEB_SOURCENAME)_$${origversion}.orig.tar.gz - +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -i.git -us -uc + +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -us -uc PHONY += bindeb-pkg bindeb-pkg: diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index 60a2a63a5e90..b317d26e2bbf 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -134,6 +134,8 @@ fi mkdir -p debian/source/ echo "1.0" > debian/source/format +echo diff-ignore > debian/source/options +echo 'extend-diff-ignore = ".config.old|.version|.*include/generated.*|scripts/mod/.*"' >> debian/source/options echo $debarch > debian/arch extra_build_depends=", $(if_enabled_echo CONFIG_UNWINDER_ORC libelf-dev:native)" From patchwork Tue May 25 23:01:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Germann X-Patchwork-Id: 12280325 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A75DBC4707F for ; Tue, 25 May 2021 23:02:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 88A1061413 for ; Tue, 25 May 2021 23:02:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232040AbhEYXD6 (ORCPT ); Tue, 25 May 2021 19:03:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232065AbhEYXD5 (ORCPT ); Tue, 25 May 2021 19:03:57 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1A3DC061756 for ; Tue, 25 May 2021 16:02:26 -0700 (PDT) From: bage@linutronix.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1621983743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7kafmThOz3eNzZ1ujEOerebfXF333jroyu7OdlmXeos=; b=Hi1O27cylViv3Bz23a7Py7dP85gBgqHB9RhtQNgsTMFszDqvsrP+D2HJ1Xy4HN5D7HgvpB O/4b1R6ud9LkDXrCxD2XuBkbWh7QXfOJA9s6cwGmABXZl2w+lhygU3bokbuBeR9+pt9ZB2 /UeKpXzFcCGfUG2jOl6H98USFb6qm+/UU1ByN+FhCLvRpQDnzvGpS2NbllWwIja5q69Ijm M1RDBrCY99EM09eJqmKKY9rnRPzocORqiIZ5oX4tsnYU1l0mTiVkKbS+spRYtyOeb0hzz2 WD5tW90Qf6cztiD4e9M/YcyEE7Y9QPvnwZsjqz3O6Q3s/9QKCt+WpwnmlFjlYg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1621983743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7kafmThOz3eNzZ1ujEOerebfXF333jroyu7OdlmXeos=; b=01SOOT2peEnBmAk75iLCSnUPMYjDqpXmGQB5B+cGYguX3hv3HzZrci2pkMfiwDf53vOdyI aAKVSQg+IOSbkmAw== To: Masahiro Yamada , Michal Marek Cc: Bastian Germann , linux-kbuild@vger.kernel.org, tglx@linutronix.de Subject: [PATCH v2 2/5] builddeb: set CC on cross build to prefixed gcc Date: Wed, 26 May 2021 01:01:36 +0200 Message-Id: <20210525230139.6165-3-bage@linutronix.de> In-Reply-To: <20210525230139.6165-1-bage@linutronix.de> References: <20210525230139.6165-1-bage@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: Bastian Germann Building the generated package with CC unset will fail for cross compilation. Detect that and set CC to a sane default prefixed by dpkg-architecture's DEB_HOST_GNU_TYPE variable. Signed-off-by: Bastian Germann --- scripts/package/mkdebian | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index b317d26e2bbf..449e284a449c 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -223,6 +223,14 @@ fi cat < debian/rules #!$(command -v $MAKE) -f +include /usr/share/dpkg/architecture.mk + +ifneq (\$(DEB_BUILD_GNU_TYPE),\$(DEB_HOST_GNU_TYPE)) +ifeq (\$(origin CC),default) +CC := \$(DEB_HOST_GNU_TYPE)-gcc +endif +endif + srctree ?= . build-indep: From patchwork Tue May 25 23:01:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Germann X-Patchwork-Id: 12280327 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68E06C47087 for ; Tue, 25 May 2021 23:02:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C53161417 for ; Tue, 25 May 2021 23:02:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232133AbhEYXD6 (ORCPT ); Tue, 25 May 2021 19:03:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232088AbhEYXD5 (ORCPT ); Tue, 25 May 2021 19:03:57 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D21FEC06175F for ; Tue, 25 May 2021 16:02:26 -0700 (PDT) From: bage@linutronix.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1621983744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G7e0Q+5dF3OHIGid4Aab2rVzbUa2cJN+n3ka6i1AOc4=; b=nQy7RrpBPBHjWsVu6pL8dbF5kkJBnH+svtGw+Ncd9Taa3tYxGciMdkJpr4s7WW49HFWWta 33RkLEzmvBTm4S+gBgN9MmJRszs/lJnwvf4XcE9pOddVWkz18zuFiDZDaL7BDAEamQeOEP OxzJARSOYRD95dSjilkVhwca7kTYvSXaukKBgBM3CfU35uf3nkH8lCODEWdtb7HoiE++wi AMHfVrVn/fHU3jOT4yXNPDDpbtcTpBNaJ7LUnp8clU6B7GCngu6smLYyo4v2s7sVKki2a/ /ilHAOQhV4MuUkpuxpPoEcdDuqVgrca/mutCIMRcY3dVKlPCzQG1qt4Rpuallw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1621983744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G7e0Q+5dF3OHIGid4Aab2rVzbUa2cJN+n3ka6i1AOc4=; b=eTVri8UVT5tgwUwBuHPhf13fhjEhseYuaSKmM5EI++UoIh3gfQAtpj9R3lr5zUaC0qXCxW EGCBjrXEK/Rm/NBA== To: Masahiro Yamada , Michal Marek Cc: Bastian Germann , linux-kbuild@vger.kernel.org, tglx@linutronix.de Subject: [PATCH v2 3/5] builddeb: clean generated package content Date: Wed, 26 May 2021 01:01:37 +0200 Message-Id: <20210525230139.6165-4-bage@linutronix.de> In-Reply-To: <20210525230139.6165-1-bage@linutronix.de> References: <20210525230139.6165-1-bage@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: Bastian Germann For each binary Debian package, a directory with the package name is created in the debian directory. Correct the generated file matches in the package's clean target, which were renamed without adjusting the target. Fixes: 1694e94e4f46 ("builddeb: match temporary directory name to the package name") Signed-off-by: Bastian Germann --- scripts/package/mkdebian | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index 449e284a449c..9470581d8c75 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -246,7 +246,7 @@ binary-arch: build-arch KBUILD_BUILD_VERSION=${revision} -f \$(srctree)/Makefile intdeb-pkg clean: - rm -rf debian/*tmp debian/files + rm -rf debian/files debian/linux-* \$(MAKE) clean binary: binary-arch From patchwork Tue May 25 23:01:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Germann X-Patchwork-Id: 12280331 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75779C47089 for ; Tue, 25 May 2021 23:02:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5B80061284 for ; Tue, 25 May 2021 23:02:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232226AbhEYXD7 (ORCPT ); Tue, 25 May 2021 19:03:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232107AbhEYXD5 (ORCPT ); Tue, 25 May 2021 19:03:57 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4ABC2C061574 for ; Tue, 25 May 2021 16:02:27 -0700 (PDT) From: bage@linutronix.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1621983745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Cv+zu7W2GChgFJp4HOz/u8Hpr4RiyGNAMX6ZvzMvcDI=; b=wVv9IdBm769eH0avKYiQIZU9RUNH6sWpOrcII7F35K/3Y/njPtfSv0P+WoDKdYxkTXgWtK Q90SqkwUERnW2+3trKOLr3lxJgyXMMRXmA/pnCSZRx9LYsNHuDaNr+5F/RXRCiJRYjiiel Ae4iCjAJZ2hEZ0mV6LGhvUt15xlK384zD0qTCJTJn1LtsJTBJgMkkK9LOCJU3X9oi7QiPr QGFsfmaA7GKkf3gQjedRGYjSQ2w1V1Gu9aDtEv069RAJkFiMUa7S8NEULnuL97IOQtu+sW KAV4vHMPkkOpHtKHTcsACYJmZ9kNEHFPOH4ry2t0jbyBUNsdAr1SwzLjWrsH8w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1621983745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Cv+zu7W2GChgFJp4HOz/u8Hpr4RiyGNAMX6ZvzMvcDI=; b=6T+nrsqVuf4TVnCk9IOK72DM7UlAYiEqHPpTaewf54HFsQkJxZOOuWbhHAOo2vdFqxqUfi FfKqwB2PpsElQXAg== To: Masahiro Yamada , Michal Marek Cc: Bastian Germann , linux-kbuild@vger.kernel.org, tglx@linutronix.de Subject: [PATCH v2 4/5] builddeb: introduce profile excluding the dbg pkg Date: Wed, 26 May 2021 01:01:38 +0200 Message-Id: <20210525230139.6165-5-bage@linutronix.de> In-Reply-To: <20210525230139.6165-1-bage@linutronix.de> References: <20210525230139.6165-1-bage@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: Bastian Germann Enabling CONFIG_DEBUG_INFO implies building the binary linux-image-*-dbg. As this increases package build time significantly, one might want to exclude it from being built. Add a pkg.$sourcename.nodbg build profile for that package so it can be excluded via e.g.: `make DPKG_FLAGS="-P=pkg.linux-upstream.nodbg" deb-pkg` Link: https://wiki.debian.org/BuildProfileSpec Signed-off-by: Bastian Germann --- scripts/package/mkdebian | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index 9470581d8c75..2e95966fe4dd 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -212,6 +212,7 @@ if is_enabled CONFIG_DEBUG_INFO; then cat <> debian/control Package: linux-image-$version-dbg +Build-Profiles: Section: debug Architecture: $debarch Description: Linux kernel debugging symbols for $version From patchwork Tue May 25 23:01:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Germann X-Patchwork-Id: 12280329 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A791CC47086 for ; Tue, 25 May 2021 23:02:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8DC0561417 for ; Tue, 25 May 2021 23:02:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232088AbhEYXD6 (ORCPT ); Tue, 25 May 2021 19:03:58 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:51120 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230103AbhEYXD5 (ORCPT ); Tue, 25 May 2021 19:03:57 -0400 From: bage@linutronix.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1621983746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Coa/6AgcgN9DAYJTginr0IdsovL0lGETM6OI8BTtTcg=; b=rTh++prfoS03nUuGBEkI2idG7e1iRCEqC4in4g11lZQMAHuryD1L2pQ4LwzBKWh5WeK6eO 8y1Tm7FmmuU8AlJ25CBy60GSM59N5QamDLlp5ULOvW98sfR//5uouM9Aes3RRAulT3001X EyBy83JrXpawPs9XCFj9OLO8vogJ6z1by7goSdMhbT4pFfBu262SbILeeCLioYZJO7oTeS V7O10sfK+sG9tTyK/OvNl7GXturDHJlY5o+gYtzqvRS0drM/aUmhaXAKuS0FCU8ypprHyy x9HtrnqpaMzdqtFMNAyNKFA3lUC4YJi+8gagbqlKJqQlYBVGv+cTFd38kjLF+A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1621983746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Coa/6AgcgN9DAYJTginr0IdsovL0lGETM6OI8BTtTcg=; b=ziyLWtTzcAd413Vm1xhJ2FJ78iPqukDPWKrYtRYoH8LyqPugIoUW6h8p8RLBipxkQsgs7n JvUH/AUkKsD+AiCQ== To: Masahiro Yamada , Michal Marek Cc: Bastian Germann , linux-kbuild@vger.kernel.org, tglx@linutronix.de Subject: [PATCH v2 5/5] kbuild: introduce srcdeb-pkg target Date: Wed, 26 May 2021 01:01:39 +0200 Message-Id: <20210525230139.6165-6-bage@linutronix.de> In-Reply-To: <20210525230139.6165-1-bage@linutronix.de> References: <20210525230139.6165-1-bage@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: Bastian Germann A Debian source package can be generated only in combination with building it afterwards. Introduce a target srcdeb-pkg that generates the source package without building it (adding dpkg-buildpackage's -S flag). Make the former deb-pkg run both srcdeb-pkg and bindeb-pkg to retain its behavior. Signed-off-by: Bastian Germann --- scripts/Makefile.package | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.package b/scripts/Makefile.package index 360ce0ae2fa1..dd347355c95e 100644 --- a/scripts/Makefile.package +++ b/scripts/Makefile.package @@ -71,12 +71,17 @@ binrpm-pkg: PHONY += deb-pkg deb-pkg: + $(MAKE) srcdeb-pkg + $(MAKE) bindeb-pkg + +PHONY += srcdeb-pkg +srcdeb-pkg: $(MAKE) clean $(CONFIG_SHELL) $(srctree)/scripts/package/mkdebian $(call cmd,src_tar,$(KDEB_SOURCENAME)) origversion=$$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$$//');\ mv $(KDEB_SOURCENAME).tar.gz ../$(KDEB_SOURCENAME)_$${origversion}.orig.tar.gz - +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -us -uc + +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -S -us -uc PHONY += bindeb-pkg bindeb-pkg: @@ -146,6 +151,7 @@ help: @echo ' rpm-pkg - Build both source and binary RPM kernel packages' @echo ' binrpm-pkg - Build only the binary kernel RPM package' @echo ' deb-pkg - Build both source and binary deb kernel packages' + @echo ' srcdeb-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)'