From patchwork Thu Feb 2 03:37:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 51668 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp26536wrn; Wed, 1 Feb 2023 20:11:07 -0800 (PST) X-Google-Smtp-Source: AK7set/EWzTuo073jYIKsNFFSqwSflRnqchM5IJkH4AwAKU81ItsSpIl1aEiZEqx8AQ8gZ0oqDvk X-Received: by 2002:a17:902:db0c:b0:192:751c:6e8d with SMTP id m12-20020a170902db0c00b00192751c6e8dmr5312430plx.58.1675311067441; Wed, 01 Feb 2023 20:11:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675311067; cv=none; d=google.com; s=arc-20160816; b=JcSudJQlsg/VpFHiEUpX85EQ/penUCyizom4C0J6eSqY5fAGtKDrZd1cUjprSA7z8/ 7YfGu0STpZKlUM712naZW+hLdf94gSWPamfR2YTLbI93rIrsorvCr4Te3AUGqOHMFJqf fDtNUsKlMaHfIyHfF0GxgWeTw7eb9u8OdpCJLDEcK9VL5fq3a5NU73Yn12DjYMeSiBav +7A9HRxBj5KP2H9DTWOfy0x1cJUWHMMVMGI9y8wJwJDebSWf3dYlXDA8dCs2qzSXb6Rv LvZmUvSfyGXblNuxMXpv9YHf4Xwyx4dUqlVWwytOPrOnFm2LCfOrlaOkbXo4UsS5BpWQ vnNw== 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=UzM9vGYT3KDydrH7yF6tZsPbgwRMDZ7wM+1r6yWkQDY=; b=q8b2YSupfwy3QaXdVmVsQ8cVbdOt+4hINGUYw3tUJ+lOXTgtiZcJ4kKFR/7SeDtAH7 5dY12TY/r3/b9IQ0NqoEp0lvYRqxcIzp/NOOQlhDxcBHwgAhrMCHK5ut4zDoDxf32efd Dy+37MuGDDdtLdBZO24t17IkXkyyC/oPu9EnVzgBTHd2PXUMCEeABYHqMIB6eR9y59aq XEddBk2hLCpwWGjNCFxKScq1Bw0lBU5+qv/l2O0WiZvyhYHvljoh9AKuZJWS9JNMkVSM rgy8NSPglSoA9ahdft6llRVCTaXfMaxNOAnmxDjb3aAkgEnZEGpzOaHLO8C0NGKlt7Hw sGSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CZ4TYa3h; 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 l10-20020a170903120a00b0017a0e7aaf6bsi24652933plh.128.2023.02.01.20.10.54; Wed, 01 Feb 2023 20:11:07 -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=CZ4TYa3h; 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 S232135AbjBBDki (ORCPT + 99 others); Wed, 1 Feb 2023 22:40:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232190AbjBBDjO (ORCPT ); Wed, 1 Feb 2023 22:39:14 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC27D7D6DD; Wed, 1 Feb 2023 19:38:37 -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 2C176619E8; Thu, 2 Feb 2023 03:38:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B21EC433A0; Thu, 2 Feb 2023 03:38:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675309116; bh=q+6WIWIgdV8iv/IIa/6uMtSiTo1opal/OruDUNHzygM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CZ4TYa3hUVo//cGVT9wCIRN2RIiYwn5/BzvtUZde6EmRCfxXZXGUE4WRlhid8/OmH kUXkmEIEgknC0wbPaqndPoLt1lbtMxLxapwMzxdmA10uL39DqHn5kPbkExo5NT1w1s ha8PernNgJKGazEzqLWghxhVjbv68JXxl8rwZ9kEUQ+i4l4guiWmin9pN5C5B51Oqp M9cgwx6s+pmCqvyp9gWnx4YzpKd5T4bclV1MbOqgryUaNfKHkSKg9mmKPh4l16p9zj pqFEewShOzO+L+0eUOUrjKrS4lfj2gBr3aN/06t+9i+h0WKNDigiY9/MHWP/21TLAZ HbUluvTgY8vfw== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Ben Hutchings , Masahiro Yamada Subject: [PATCH v4 6/6] kbuild: deb-pkg: switch over to format 3.0 (quilt) Date: Thu, 2 Feb 2023 12:37:16 +0900 Message-Id: <20230202033716.341858-7-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230202033716.341858-1-masahiroy@kernel.org> References: <20230202033716.341858-1-masahiroy@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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?1756690977633617201?= X-GMAIL-MSGID: =?utf-8?q?1756690977633617201?= Switch from "1.0" to "3.0 (quilt)" because it works more cleanly. All files except .config and debian/ go into the .orig tarball. You can add a single patch, debian/patches/config, and delete the ugly extend-diff-ignore patterns. The debian tarball will be compressed into *.debian.tar.xz by default. If you like to use a different compression mode, you can pass the command line option, DPKG_FLAGS=-Zgzip, for example. The .orig tarball only supports gzip for now. The combination of gzip and xz is somewhat clumsy, but it is not a practical problem. Signed-off-by: Masahiro Yamada --- Changes in v4: - New patch scripts/Makefile.package | 2 +- scripts/package/mkdebian | 42 +++++++++++++++++----------------------- 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/scripts/Makefile.package b/scripts/Makefile.package index 5135a5419a72..454268a37af1 100644 --- a/scripts/Makefile.package +++ b/scripts/Makefile.package @@ -94,7 +94,7 @@ debian-tarball: debian PHONY += deb-pkg deb-pkg: debian-tarball +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) \ - --build=source,binary --source-option=-sP -nc -us -uc + --build=source,binary -nc -us -uc PHONY += bindeb-pkg bindeb-pkg: debian diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index 0c1ed6215a02..1ab4c6ee76d9 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -135,30 +135,24 @@ else fi mkdir -p debian/source/ -echo "1.0" > debian/source/format - -# Ugly: ignore anything except .config or debian/ -# (is there a cleaner way to do this?) -cat<<'EOF' > debian/source/local-options -diff-ignore - -extend-diff-ignore = ^[^.d] - -extend-diff-ignore = ^\.[^c] -extend-diff-ignore = ^\.c($|[^o]) -extend-diff-ignore = ^\.co($|[^n]) -extend-diff-ignore = ^\.con($|[^f]) -extend-diff-ignore = ^\.conf($|[^i]) -extend-diff-ignore = ^\.confi($|[^g]) -extend-diff-ignore = ^\.config. - -extend-diff-ignore = ^d($|[^e]) -extend-diff-ignore = ^de($|[^b]) -extend-diff-ignore = ^deb($|[^i]) -extend-diff-ignore = ^debi($|[^a]) -extend-diff-ignore = ^debia($|[^n]) -extend-diff-ignore = ^debian[^/] -EOF +echo "3.0 (quilt)" > debian/source/format + +{ + echo "diff-ignore" + echo "extend-diff-ignore = .*" +} > debian/source/local-options + +# Add .config as a patch +mkdir -p debian/patches +{ + echo "Subject: Add .config" + echo "Author: ${maintainer}" + echo + echo "--- /dev/null" + echo "+++ linux/.config" + diff -u /dev/null .config | tail -n +3 +} > debian/patches/config +echo config > debian/patches/series echo $debarch > debian/arch extra_build_depends=", $(if_enabled_echo CONFIG_UNWINDER_ORC libelf-dev:native)"