Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp6840405imb; Sat, 9 Mar 2019 07:46:27 -0800 (PST) X-Google-Smtp-Source: APXvYqzvkk9XeVqvzXe1sVgVRZMCb/Tz5Ns85qOfrx8VS4IEdyLflr8ggIs53N417Y+J8HcO67cO X-Received: by 2002:a17:902:29cb:: with SMTP id h69mr21983971plb.277.1552146387663; Sat, 09 Mar 2019 07:46:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552146387; cv=none; d=google.com; s=arc-20160816; b=B08QdAKVz3HiN0EXFtv02Z4qQxEGZebnEulbFFToEGBOWTawUTmKnrNTxjb5H0NT8M puR17wLVdvMP3GcZKVlhDH0ML/3khb+1ZXxa5xCQ1pYPZzqmB3WENkaDsLQXmCiLveZ5 jTZYGsVz6RoRMNpR8eCAuQXP2dxECV6xeKxipTvlo/D8e59sGQGF/JEGeqAgtwtX0hWd TmRGoHKDh+2BS16colUmlmtnpQLhFVsE5VvjBSOsiMUx+cO8uDtcu/kd2FpbzC+jfLI1 6ech70n1PDmON68xXOPMzlINNOTbIR4czNCC+gnqXl4coYTlL5CGPSgnyY9MsGgiJJ9W Gjfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from :dkim-signature; bh=a2A+taKjoNPZbH6GRbsyFcp2CMYguJDwXGJstd7lijw=; b=J6Tvv+UdLGVIcaoqtz8UQuWmoRO1wj6m5DFt5CGseJDzwc5cz4GI9RWUhQTm0fOPxy 9dUU3T+X6ob4gHkw8FQ5M3MnBKt/pfK1B1ZoRRXw0Ph2YABbdygwPeHIrwDa6oFSTwsJ 0Ll5ufmWr4zR9ZcaXDxXhbFg23GM/LzZIKRX3gP3k/vNNgypDHv7MKl/x0icv2Ey6iCr VEMfYvNmDczExpQ6Wn0uPlCF7UslgltUP5nLyG1Mx+xLOdMoU7hoEVSHgO4Nw26/HyqE HF2pjOPoW6vU8oP7o+rrlUblqDTiUwfHoDJW3j1sI1tWjw2Zo1Y6zXirmit1ZDLQpXSX qmKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cs.msu.ru header.s=dkim header.b=OEyIdflY; spf=temperror (google.com: error in processing during lookup of linux-kernel-owner@vger.kernel.org: DNS error) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cs.msu.ru Return-Path: Received: from vger.kernel.org ([209.132.180.67]) by mx.google.com with ESMTP id g1si713844plp.406.2019.03.09.07.46.11; Sat, 09 Mar 2019 07:46:27 -0800 (PST) Received-SPF: temperror (google.com: error in processing during lookup of linux-kernel-owner@vger.kernel.org: DNS error) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@cs.msu.ru header.s=dkim header.b=OEyIdflY; spf=temperror (google.com: error in processing during lookup of linux-kernel-owner@vger.kernel.org: DNS error) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cs.msu.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726424AbfCIPnt (ORCPT + 99 others); Sat, 9 Mar 2019 10:43:49 -0500 Received: from imap.cs.msu.ru ([188.44.42.39]:50712 "EHLO mail.cs.msu.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726286AbfCIPns (ORCPT ); Sat, 9 Mar 2019 10:43:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.msu.ru; s=dkim; h=Subject:Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=a2A+taKjoNPZbH6GRbsyFcp2CMYguJDwXGJstd7lijw=; b=OEyIdflYbiyZxB73Lh8/4b+3F3 w++BzTM8I2WmfH5r41P0dZ9smV9ViXp8OzBGtuBU62AYnM48qLOx1hcAlfub/G9cD2CmBRDeZeb8t NoVbRgdS+JUQmGhRpusjfqfRcVeQ+EXn6NedmNRHn7UCyreDyQcQmEuinONWJS47EydU7mvKa43r2 9ryVfjBeyONQaxWXdw04SLFY2QCe0y1DIGbOBUF5CvsU3tj4ZmorYYR/EbP8dUZmtjTUzc19PMXXY i2OEH+0kwbkm73RTxmhKufRrL46g28jJ6cjTt7Hrudo+k1+jYPbLZi5CFqF2mNvo4l/YViUrR1rKE PhMW2zEw==; Received: from [37.204.119.143] (port=44904 helo=localhost.localdomain) by mail.cs.msu.ru with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91 (FreeBSD)) (envelope-from ) id 1h2e8T-000IDA-NA; Sat, 09 Mar 2019 18:43:41 +0300 From: Arseny Maslennikov To: Masahiro Yamada , Michal Marek , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Arseny Maslennikov , Ben Hutchings , Riku Voipio Date: Sat, 9 Mar 2019 18:43:07 +0300 Message-Id: <20190309154307.23039-3-ar@cs.msu.ru> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190309154307.23039-1-ar@cs.msu.ru> References: <20190309154307.23039-1-ar@cs.msu.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 37.204.119.143 X-SA-Exim-Mail-From: ar@cs.msu.ru X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.cs.msu.ru X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_ALL,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Subject: [PATCH v2 3/3] package: {mkdebian,Makefile}: ignore .config in dpkg-source diffs X-SA-Exim-Version: 4.2 X-SA-Exim-Scanned: Yes (on mail.cs.msu.ru) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * We'd like to make dpkg-source ignore certain filepath patterns while producing the .diff.gz as part of a Debian source package. The relationship between dpkg-source's -i and --extend-diff-ignore options is quite complicated[1]. It's thus not very convenient to specify file path patterns to ignore on dpkg-buildpackage's command line (they do not end up in the source package as well), so we turn `-i.git' into a record in debian/source/options. Besides, the dot in `-i.git' is a metacharacter and matches a tad too much. * In cases where a .config exists in the source tree, but the .config in the source tarball is provided by wherever KCONFIG_CONFIG pointed to, dpkg-source would attempt to replace the second, proper one with the first one, which is undesirable and nullifies the effort made to put the proper config in the source tarball. To prevent this, force dpkg-source to ignore /^[.]config$/ as well. This makes it possible to build working Debian source packages with a redefined KCONFIG_CONFIG: - that file is put in the source tarball at its traditional place, and the diff.gz does not dare touch it; - when the source package is rebuilt, debian/rules initiates the build process with the desired config already in the standard location. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625789#22 Signed-off-by: Arseny Maslennikov --- scripts/package/Makefile | 2 +- scripts/package/mkdebian | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/package/Makefile b/scripts/package/Makefile index 134cefee068d..f2fca7e7d9fa 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -73,7 +73,7 @@ deb-pkg: FORCE $(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 bindeb-pkg: FORCE $(CONFIG_SHELL) $(srctree)/scripts/package/mkdebian diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index d276eb671a27..74158c7f28ea 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -135,6 +135,12 @@ fi mkdir -p debian/source/ echo "1.0" > debian/source/format +cat < debian/source/options +# The regexes are matched against paths from the source tree. +diff-ignore = "[.]git" +extend-diff-ignore = "^[.]config$" +EOF + echo $debarch > debian/arch # Generate a simple changelog template -- 2.20.1