From patchwork Sat Dec 2 15:52:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 120421 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2493059qgn; Sat, 2 Dec 2017 08:05:37 -0800 (PST) X-Google-Smtp-Source: AGs4zMa/RCGpCx6+IX8ul2sQANhXdoef1GPP6C/WaA3Qx60lylpXkNrcxxK0ZkrD4Zm5a9XP8ezg X-Received: by 10.84.233.1 with SMTP id j1mr9758311plk.311.1512230737068; Sat, 02 Dec 2017 08:05:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512230737; cv=none; d=google.com; s=arc-20160816; b=TlCSLt2blQ53Qt3vOLyoIWqmhICclk0uYr6gtCktA96uxgnA7wED/SNXf/W9FgkrWa xB6KtW0w78k+zOeloZw4yoK6MnLhwYOkrlO3f8IktgZ29vM4g3LlOqqQqWKMAIapGVWQ BRr7wYraWsQIxz+IAVjLECbEjlx3tbgUTDiYAuK27oFdeYRtUzj8gOLYhDfZKP29YCWy A8I/qPxVg4tYv3CYO3Y2l3C6XIcexsu47tnYN3Ob8X6NkO+AxoJCp6D96fuSSrIeZdcB FqSB7Im5s/HtbRgfc0ROOq3MsTZvMsLFK6mQrxhtLEMNyzboPIv0s3mhnAF5gpF3fxQa eIYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:to:cc:from:dkim-signature:dkim-signature :dkim-signature:arc-authentication-results; bh=knfirD7I/t16uigvHRIeHQkzE9NjVt1E7VI8BTtB+tU=; b=HFd9/CcB793a9Yo3/MZqC20eDqX8fTXisrTvh3FeAcp7791yq1ubrcl5QwGxVJSbjm 3iTyiJmnQbYyAt8Y/9CU1fqJo3j4fqSEb9wnflBDP4IC7LHg0QzvS5t1MQTNtcGzaLy4 4trqRssf/+/0/mHHq3J6c7fmKHYXm0P7TvHwLrSP8xc2QbgNxEQqYd4m2xYkPgPRO/Od XmqpRVMrjxTkPLMSsIS+jsW4GGXvW10z/E+pvoZN/7ckoWON78xP3BX+UYkNio/TXB+5 7GsHMVLGiRRfUU7ff3TGtHyvsPYVGaapmjnZ5Xtt3f9oNZsSrDBpFYdJEUWe84n2yRYR 4vpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=krBTNlWh; dkim=fail header.i=@verizon.com header.s=corp header.b=FoVPNd4C; dkim=fail header.i=@verizon.com header.s=corp header.b=ZtdqUmsh; 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=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7si7014878pfi.179.2017.12.02.08.05.36; Sat, 02 Dec 2017 08:05:37 -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=@verizon.com header.s=corp header.b=krBTNlWh; dkim=fail header.i=@verizon.com header.s=corp header.b=FoVPNd4C; dkim=fail header.i=@verizon.com header.s=corp header.b=ZtdqUmsh; 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=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752894AbdLBPyF (ORCPT + 28 others); Sat, 2 Dec 2017 10:54:05 -0500 Received: from fldsmtpe03.verizon.com ([140.108.26.142]:41330 "EHLO fldsmtpe03.verizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752391AbdLBPx4 (ORCPT ); Sat, 2 Dec 2017 10:53:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1512230036; x=1543766036; h=from:cc:to:subject:date:message-id: content-transfer-encoding:mime-version; bh=BpshB1rAg/GQ9rnFxY1F/2t+nMdI0032mdyoLfpR9ZU=; b=krBTNlWhrAJBNsoen0Uf2R1GhfN5BeANptgrqI2k4lsE8GYzpTT+mbu6 WxwPs389nsMoqi0OY7o6uLXetW279SKXvitN08dmHP4F7fc4nrTJ7QYry qkaOGaQ89qS7rJXCID0zvGWXZ34RCVFTO8uyr8B7vLoNiO2ET/SWPV+Nq 8=; Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by fldsmtpe03.verizon.com with ESMTP; 02 Dec 2017 15:53:53 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO apollo.verizonwireless.com) ([10.255.192.101]) by fldsmtpi01.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Dec 2017 15:53:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1512230027; x=1543766027; h=from:cc:to:subject:date:message-id: content-transfer-encoding:mime-version; bh=BpshB1rAg/GQ9rnFxY1F/2t+nMdI0032mdyoLfpR9ZU=; b=FoVPNd4C86q+4nOp+1+hpasBS/bIHIWREz5w2pXCBlIuwBNI27AIGPLR EuGXynnp/QWo+pfs8L8ZNzuoMRPuue1ofCx4pBZIiVxzLm3iztTUlPmSp NnPzg6hehphaqwmgZM1wbDxIcPaD0hCe7TgZFOho35kjEQo7BQMQj5iN5 Q=; Received: from endeavour.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.163]) by apollo.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Dec 2017 10:53:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1512230027; x=1543766027; h=to:subject:date:message-id:content-transfer-encoding: mime-version:from:cc; bh=BpshB1rAg/GQ9rnFxY1F/2t+nMdI0032mdyoLfpR9ZU=; b=ZtdqUmshupzM/d3CAb8oLcnixmPIk3Q4Btkt4vyip/eDROX5e9EhNBBa jcgo6al1l+tghSUs8L83gSxHVZskWJlXMcFoUTmiV25VmdSvF+YpSxd1f 6LudMsmUiQyTUboshatYIXIoV7PGJIMPMiyIx/8XNcXzwJyc8jid9oME6 I=; From: alexander.levin@verizon.com Cc: Masahiro Yamada , alexander.levin@verizon.com X-Host: endeavour.tdc.vzwcorp.com Received: from ohtwi1exh003.uswin.ad.vzwcorp.com ([10.144.218.45]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 02 Dec 2017 15:53:47 +0000 Received: from tbwexch07apd.uswin.ad.vzwcorp.com (153.114.162.31) by OHTWI1EXH003.uswin.ad.vzwcorp.com (10.144.218.45) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sat, 2 Dec 2017 10:53:46 -0500 Received: from OMZP1LUMXCA14.uswin.ad.vzwcorp.com (144.8.22.189) by tbwexch07apd.uswin.ad.vzwcorp.com (153.114.162.31) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Sat, 2 Dec 2017 10:53:46 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA14.uswin.ad.vzwcorp.com (144.8.22.189) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Sat, 2 Dec 2017 09:53:45 -0600 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Sat, 2 Dec 2017 09:53:45 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.4 01/20] kbuild: pkg: use --transform option to prefix paths in tar Thread-Topic: [PATCH AUTOSEL for 4.4 01/20] kbuild: pkg: use --transform option to prefix paths in tar Thread-Index: AQHTa4WbbDj1QdcAYUCBB2xACVIBkw== Date: Sat, 2 Dec 2017 15:52:50 +0000 Message-ID: <20171202155243.7774-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada [ Upstream commit 2dbc644ac62bbcb9ee78e84719953f611be0413d ] For rpm-pkg and deb-pkg, a source tar file is created. All paths in the archive must be prefixed with the base name of the tar so that everything is contained in the directory when you extract it. Currently, scripts/package/Makefile uses a symlink for that, and removes it after the tar is created. If you terminate the build during the tar creation, the symlink is left over. Then, at the next package build, you will see a warning like follows: ln: '.' and 'kernel-4.14.0+/.' are the same file It is possible to fix it by adding -n (--no-dereference) option to the "ln" command, but a cleaner way is to use --transform option of "tar" command. This option is GNU extension, but it should not hurt to use it in the Linux build system. The 'S' flag is needed to exclude symlinks from the path fixup. Without it, symlinks in the kernel are broken. Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- scripts/package/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.11.0 diff --git a/scripts/package/Makefile b/scripts/package/Makefile index 493e226356ca..52917fb8e0c5 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -39,10 +39,9 @@ if test "$(objtree)" != "$(srctree)"; then \ false; \ fi ; \ $(srctree)/scripts/setlocalversion --save-scmversion; \ -ln -sf $(srctree) $(2); \ tar -cz $(RCS_TAR_IGNORE) -f $(2).tar.gz \ - $(addprefix $(2)/,$(TAR_CONTENT) $(3)); \ -rm -f $(2) $(objtree)/.scmversion + --transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3); \ +rm -f $(objtree)/.scmversion # rpm-pkg # ---------------------------------------------------------------------------