Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp6879863imb; Sat, 9 Mar 2019 08:51:04 -0800 (PST) X-Google-Smtp-Source: APXvYqzHQpbDq8udNH9tQTj2fPBk7EliLVH8pL/JrJWPBhZScOKojWUteuo+T5bJpNf9nQ7A5SSC X-Received: by 2002:a63:c948:: with SMTP id y8mr22536991pgg.263.1552150264376; Sat, 09 Mar 2019 08:51:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552150264; cv=none; d=google.com; s=arc-20160816; b=xShoRuL1GO6o+huBb/T+2cq+JqpNczIxx/FI/9my+3WvihOqTywnsFwlX2EE30aIpQ ydaajRD4HfJrBzUJDLiPGDQy+yFGs14GreCMpfjAhctDNt0mJeXsMj5Oa2VDr+D8yGTz vj39LQKcQ/ujFNmffZDY+NRl441nohewJNEJ4O/Amo5xG1jdrTFgW5N6r6QfKUSEUVgx nbWXjMgt4M+rArbuUexj1cKwL5oCDCHU8OVZfBDjzvFqJCPJtuEPyAI/Xn9HdVgCHR4V ovObJl0sgZds/tuTbN1geZsLfT/kUAf4uQAizSZGZ0g9p6nzvsjtmqwpg/4qsmF+UVP/ HZtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:user-agent:openpgp:in-reply-to :content-disposition:mime-version:references:message-id:cc:to:from :date:dkim-signature; bh=ulGqVDSUycX/BoqmH9Fe4QsVBAuubtWT/nsBLs94zsM=; b=vQUDXdALqugl72K/V5SWw8ujHC2TzXfU+1rwH96w+DzebnKz1s0v6R/EE9dkjs/HHq 1GpsdHj14XuslyUqvdw+MVlgeHXaCGKBe/WtmQ8C9y2u65uW9ZacAnCp72KDK8yaZ5HJ DiEym2r4aT11Z8alQQAk/r8v+lDbm55xG3I0UnvpyWBv2FS16h00IuzmUywEHe/fIO/4 P1REiqyr3BT1QNg3lzRoUW50Z1wr0pZoB0J0jW3BiWIsUAL65PrO+4oQLwJB1wul+Ufr kMtQ7hhmoltDU5H6zg7OZ2Sr8+K83pd7/QYu3kvKRWSbDzGaAR+BvolL7/kygEkxdS4y c7BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cs.msu.ru header.s=dkim header.b=ApEVEy0n; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) 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 (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e10si833387pgm.298.2019.03.09.08.50.48; Sat, 09 Mar 2019 08:51:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@cs.msu.ru header.s=dkim header.b=ApEVEy0n; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) 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 S1726435AbfCIQra (ORCPT + 99 others); Sat, 9 Mar 2019 11:47:30 -0500 Received: from imap.cs.msu.ru ([188.44.42.39]:62345 "EHLO mail.cs.msu.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726332AbfCIQr3 (ORCPT ); Sat, 9 Mar 2019 11:47:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.msu.ru; s=dkim; h=Subject:In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: 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=ulGqVDSUycX/BoqmH9Fe4QsVBAuubtWT/nsBLs94zsM=; b=ApEVEy0nOrrJ1Lmpwtx/8cwEmJ OjLwX+hK8hZFfXZGGREEAG8UxHcbuiJjHtdIUywtKVQHcKx0U4xQWEZN/dkubfawNz9UZAErT2G37 D4TKrWAGhI0wB33S1AGFhjn+VA/XgQTz1I/G8Zlda67P42ty2cgCc5/9KWxJFyyoDTuRF9fAzdPX7 ZiJzbnS3haHSIr6SvC08OBn8n+5rgXcxcpNgTbeOcGrJyiH1PamRCAQdAmmhzpKSP7PI6ieE6kjQF q2nLsBxwgxnLpccDZWxNynB0VgTB5Y53LP1suoDpZzWBDl/BmY9Bc0lYCjuiAOpCb5VBDyYzlXWlm aOc4h3aQ==; Received: from [37.204.119.143] (port=57438 helo=cello) by mail.cs.msu.ru with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91 (FreeBSD)) (envelope-from ) id 1h2f83-0007gt-AC; Sat, 09 Mar 2019 19:47:19 +0300 Date: Sat, 9 Mar 2019 19:47:18 +0300 From: Arseny Maslennikov To: Masahiro Yamada , Michal Marek , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ben Hutchings , Riku Voipio Message-ID: <20190309164718.GD25561@cello> References: <20190309154307.23039-1-ar@cs.msu.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="q9KOos5vDmpwPx9o" Content-Disposition: inline In-Reply-To: <20190309154307.23039-1-ar@cs.msu.ru> OpenPGP: url=http://grep.cs.msu.ru/~ar/pgp-key.asc User-Agent: Mutt/1.10.1 (2018-07-13) 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: Re: [PATCH v2 1/3] scripts/package/Makefile: put proper config in source tarball 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 --q9KOos5vDmpwPx9o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 09, 2019 at 06:43:05PM +0300, Arseny Maslennikov wrote: > It is widely known that one can build a kernel without a .config in the > source tree by setting KCONFIG_CONFIG equal to the actual configuration > file path. >=20 > When making a *-pkg target, make(1) prepares a source tarball and tries > to pack `.config' in there regardless of the value of KCONFIG_CONFIG, > failing spectacularly if .config is absent and packing the wrong config > if it exists. > Let's fix that by including whatever KCONFIG_CONFIG points to in the > archive under the traditional name `.config'. >=20 > We have to pass --absolute-names to tar, since it seems to trim the > paths of archive members first and only then consider --transform, which > breaks KCONFIG_CONFIG=3D../../some.config, as well as absolute paths. One way to avoid --absolute-names here is to do the dance below: >=20 > Signed-off-by: Arseny Maslennikov > --- > scripts/package/Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/scripts/package/Makefile b/scripts/package/Makefile > index 2c6de21e5152..134cefee068d 100644 > --- a/scripts/package/Makefile > +++ b/scripts/package/Makefile > @@ -27,7 +27,7 @@ KDEB_SOURCENAME ?=3D linux-$(KERNELRELEASE) > KBUILD_PKG_ROOTCMD ?=3D"fakeroot -u" > export KDEB_SOURCENAME > # Include only those top-level files that are needed by make, plus the G= PL copy > -TAR_CONTENT :=3D $(KBUILD_ALLDIRS) .config .scmversion Makefile \ > +TAR_CONTENT :=3D $(KBUILD_ALLDIRS) $(KCONFIG_CONFIG) .scmversion Makefil= e \ > Kbuild Kconfig COPYING $(wildcard localversion*) > MKSPEC :=3D $(srctree)/scripts/package/mkspec > =20 > @@ -44,6 +44,7 @@ if test "$(objtree)" !=3D "$(srctree)"; then \ > fi ; \ > $(srctree)/scripts/setlocalversion --save-scmversion; \ +cp $(KCONFIG_CONFIG) .tmp.config-tarball > tar -cz $(RCS_TAR_IGNORE) -f $(2).tar.gz \ + --absolute-names --transform 's:^.tmp.config-tarball$$:.config:S' \ > --transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3); \ +rm -f .tmp.config-tarball > rm -f $(objtree)/.scmversion > =20 > --=20 > 2.20.1 >=20 I'm not sure if this is strictly better. --q9KOos5vDmpwPx9o Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE56JD3UKTLEu/ddrm9dQjyAYL01AFAlyD7g8ACgkQ9dQjyAYL 01DmLw/9FlAX3xDu+dLPStFypBfPNicW8tAAi1ivnlj+izOPUEcG+lxVmJsyXK+N WtwSL77RO3ARvABRWiVAikbEjx3dVxdqwXHPpcUgqgGON7FeNb86u0h9LkgWwdtY /wK2Ksyt4D8JZKnyeFk6UUvgn4egXt83dLzO6N2b6yAyWWDP4Kj8+WBoX5K+jN/8 3DryL1PUz7NGsUbvntrAUNPhTiHzR1CA8kYLtvj7z38VMCuy5GEbGwwVbhvHUFaK LN93H0TDu93cm5TpPDxsfwDmHe3SU9LTyzbema2FU/LeTTB1cfeqY5EqBhul517o FiudifGkrrKcO+o0NyxuNT94rQiADrAPcvkl53NMEAs6R1hU+6RY/n8jiEi8ZfQX uCxQgQmzGyX+zLMzxf10goD1neGri2jqjTGe9PSXqlzCt+xYMmA/J9Oy2exT0w/s wSTHK5ukCelqrBfNX9sUVdDmTYEOpnyZbB8ndus+HgVi80eR3eCCEKbSMUH/vkSh b2eaTlJY3r71ouz16MViA03SXM7Necst9IeAdKjlnDtk8od657DJt9fYIHmgkvHo MMlhKgUzYg/YpJDsNOHEkdtcJSDUxqi2GHudSl3xyb9lXxuCpCz/D5BrDskP4K6w JV9SHRQeU9/U8tYpDXq34DWTA8Ilht42f5ZKgSdOMb1cDSIdZsE= =qdIx -----END PGP SIGNATURE----- --q9KOos5vDmpwPx9o--