Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp6839918imb; Sat, 9 Mar 2019 07:45:28 -0800 (PST) X-Google-Smtp-Source: APXvYqzQZWxd86MNuGfAvlrdWfbKVv0j1uXM7TPugAZONxT4Rz0OLiPxHT2KqmOz9Umxg+ZI0OKf X-Received: by 2002:a17:902:b188:: with SMTP id s8mr6313710plr.327.1552146328239; Sat, 09 Mar 2019 07:45:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552146328; cv=none; d=google.com; s=arc-20160816; b=p4AutDGt7zbnIY14kokVLq+nwnIVVfmSkQ53bYbaJZOG6UIKBy8ii0DJVwNCnE32rk u6Ueltc4gJtRZGwovovvc6QpjgiU9mx4GRmIJ5WQ34KL16v2+VLaw3/Dvlueap+/+5qr YCbe9gvWvfxhkjoWdC8PgkY7CFnhnHMB8LSCpvv8AO127B0o5eYW1mdu6R+kuTj0fxzL +YvdUpCOf4IwII+2H+HUMPqqNmMk6OSN4bGsOeQsNyvyzL2a7HpSzxoUKPdYuUsHHwxd 9rL2YIe7yCFBvI0wBY77dAbkWP6WjOPFR6XzDFBeP8OW5YTAHFVeqNkrHCs5GterUlOi IrSA== 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:message-id:date:cc:to:from:dkim-signature; bh=lggRxzWvoqfJxyRfc5m6AD0bqLNWTNk6axPQzHT2cDg=; b=lCvIayyV+0zD0KyJZ+mlw0WZ/pI5Ox4hBmq8CK9Zsc+k1mtbRHWNmQVHrN2YaYlUzU EFWhtJpBWkPBwrAfv5EzZ2M9WDXOuwR21yNeYHdyDBW6p/xsRuqZ2T+ESlDeHqRLl7kd UddoPMwOW6lMJ+ZttxqjQWbhdZlTpZytN0sIsFQPueb7QvzOcKnE+xROgSFhlVom0wLx IAqhmPLOxwmd9GgcCunsIgugOQORYL616KNvbxL2n9mlUFOAxs5OUjMbXmRpDBSuaaia 2NefG/G21MIwT7yx5aY9blvFcm0rkmAKBmx1PndzKMCM56hmA9l+JYpTB58xlMAq4Yxl G7xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cs.msu.ru header.s=dkim header.b=G8UPo275; 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 r16si704798pgm.483.2019.03.09.07.44.58; Sat, 09 Mar 2019 07:45:28 -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=G8UPo275; 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 S1726528AbfCIPny (ORCPT + 99 others); Sat, 9 Mar 2019 10:43:54 -0500 Received: from imap.cs.msu.ru ([188.44.42.39]:52414 "EHLO mail.cs.msu.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726372AbfCIPnu (ORCPT ); Sat, 9 Mar 2019 10:43:50 -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: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: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=lggRxzWvoqfJxyRfc5m6AD0bqLNWTNk6axPQzHT2cDg=; b=G8UPo275ParO04h5qr79vRWJ6j y9ofFM/t/SMasTHKeeDzvEJYc8nLv9NyppCy+S6Cx6WN1FoGPPAWf7PHLTnmSi3EGuYwY9C4mNfwz Zvc5IygPF7ROTzfRQ2O+FD0C31foguXCVjHqglEV3TEZqYNoSzphusdgBBhR2gaIY86GIgfxALHI8 ZKC13kGhAOS4wDJ+WrR3/TvC/PHNZ1bNTcvc1rbRW+kXa31UjLawgU07WBFJ5gtsNfoPCHX+lTqkS 8j1+M3XEuK4+chL0uGHWyVxD7BAI4wlyYyN8jBteVpbb8RvFDt+sHQoU38FCrinZkvOpeThJmShq7 ThxxtUwg==; 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 1h2e8Q-000IDA-Ni; Sat, 09 Mar 2019 18:43:38 +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:05 +0300 Message-Id: <20190309154307.23039-1-ar@cs.msu.ru> X-Mailer: git-send-email 2.20.1 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 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 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. 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'. 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=../../some.config, as well as absolute paths. Signed-off-by: Arseny Maslennikov --- scripts/package/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ?= linux-$(KERNELRELEASE) 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 \ +TAR_CONTENT := $(KBUILD_ALLDIRS) $(KCONFIG_CONFIG) .scmversion Makefile \ Kbuild Kconfig COPYING $(wildcard localversion*) MKSPEC := $(srctree)/scripts/package/mkspec @@ -44,6 +44,7 @@ if test "$(objtree)" != "$(srctree)"; then \ fi ; \ $(srctree)/scripts/setlocalversion --save-scmversion; \ tar -cz $(RCS_TAR_IGNORE) -f $(2).tar.gz \ + --absolute-names --transform 's:^$(KCONFIG_CONFIG)$$:.config:S' \ --transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3); \ rm -f $(objtree)/.scmversion -- 2.20.1