From patchwork Sat Dec 2 15:51:14 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: 120427 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2510001qgn; Sat, 2 Dec 2017 08:24:20 -0800 (PST) X-Google-Smtp-Source: AGs4zMZqtS8gyNnoTvPi7EL2JST3b6Q1NozDVwJuVxHk2SFNV0qcCX3gebct2GcHQwX2fZOzi2zO X-Received: by 10.101.81.73 with SMTP id g9mr9377215pgq.137.1512231860421; Sat, 02 Dec 2017 08:24:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512231860; cv=none; d=google.com; s=arc-20160816; b=UHPNwcrTsx2S/Lwx4kHOzM5QfDsHo0vKxHEC71zW5OdKojYWSdJ8R/I7nkvFNT0jgC fyyrWLlo/yfKVWj6QySaxtbUpHJm19gVLik6PDwm/useHBrUjLmyO9D52w+yFnhTXSY1 CbZH3Mgrn5YKHNtHcb15ARJ+UqP2gCvyRkq+Xrp2kYdc1Pr8GZKIJpm+VymZdSEU5KPS jwsLmJ4+EugKyyiJtcUfD+FmrwZnmImRVOovafygjm8eLElHB+sb/uRiuSDjzQon1983 r89VhW2aaYMe3ETVx8XjT81zc7TJ0kQc19xJhCqt+bJM2IjOWpwgo9w+1pqYd55V1cjO 1LuA== 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:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:cc:from:dkim-signature :dkim-signature:dkim-signature:arc-authentication-results; bh=dCS9pOP5Z/PBw1NRRuUu630lu22UdqyZSYV0xFJLTcU=; b=WFcShSL8L0Lz/J+qfpcRy3WYEVHhqCSq1utGPy9L6M4gKK81FPP/oJ6rlZQzAEJMam eoKmcKzXm2O99dtIyZ5lEWbMXCfOo1CLwZ22+VZRGIKjh33bfttfZGjQ+r914649IRO5 ZOaBdfpUKP6uMYIjk85Ts5mlrlnuBqo+px77VT3SLXquof7RQPezhXa/zHQWIwmum9gB 9fRHet5y1ANQEQKcXzR1t1yzlj6fcuUtcwa9vzdfXUxMz3fEJ7E1CwriTRhtIC6WhqMs CmKs1IFq4hdHneXs/HdDsC/WMxCrun2mTmDE8O1ZDB0enx1GUYv6hua3Crk8KR0NlryO DtAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=X/csYORZ; dkim=fail header.i=@verizon.com header.s=corp header.b=PssSleej; dkim=fail header.i=@verizon.com header.s=corp header.b=kZGA0YUv; 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 q5si6572513pgq.711.2017.12.02.08.24.19; Sat, 02 Dec 2017 08:24:20 -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=X/csYORZ; dkim=fail header.i=@verizon.com header.s=corp header.b=PssSleej; dkim=fail header.i=@verizon.com header.s=corp header.b=kZGA0YUv; 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 S1752119AbdLBPvy (ORCPT + 28 others); Sat, 2 Dec 2017 10:51:54 -0500 Received: from omzsmtpe01.verizonbusiness.com ([199.249.25.210]:18051 "EHLO omzsmtpe01.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751776AbdLBPvr (ORCPT ); Sat, 2 Dec 2017 10:51:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1512229907; x=1543765907; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=A6YhbVxqMNm+4TI2LUXC9q0Lko6s8VDw3iCv8FGPeKI=; b=X/csYORZu/Rb8eOYSTIKcKGkkhDQG4WFAL0asCn2EAkGfu1ByjFhrwXm DUybW25SMehMtKEroKzUvBhZnZEd0nGYCP8PwkV/h+/MSex5xmRzdM4lr 6Qr9Nvs9140oNQw/hhfVp0VPEa7vpAFC4DHR9BKwNk/Uw0HK+C7zvJmeZ k=; Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by omzsmtpe01.verizonbusiness.com with ESMTP; 02 Dec 2017 15:51:46 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi01.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Dec 2017 15:51:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1512229877; x=1543765877; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=A6YhbVxqMNm+4TI2LUXC9q0Lko6s8VDw3iCv8FGPeKI=; b=PssSleej4EHyq+qEReqWhkD+Qhtwjk1RXebsduCZ4N8ZUqLuJMoeCD2G TYP/rVOmZVul+N/N1oF1EpNrot6wOLpz/LUdc+geQjKBx7Ymbaunc5+lT XlYmvXSditGCDWpgz5E6Ta1AFbRvw94p9lP8ppwT/2XjFrZRLCmUEvmDX M=; Received: from endeavour.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.163]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Dec 2017 10:51:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1512229877; x=1543765877; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=A6YhbVxqMNm+4TI2LUXC9q0Lko6s8VDw3iCv8FGPeKI=; b=kZGA0YUv9ZJHqwvp1xFh1mRg6wIbtOBYEBjKRZNVO650N3oYH0Hvgiwl pRCto8bx8UwMfP87B30zxeEnwwN+mBmQnm8swYh4nSjv6PPelOzXPD4rZ z0aeNLKP1baB2RtzB7F4i6/UYD2eG2hTsGqegOrIG7Z3xgA9ydLwZEeOI k=; 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:51:16 +0000 Received: from tbwexch06apd.uswin.ad.vzwcorp.com (153.114.162.30) 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:51:16 -0500 Received: from OMZP1LUMXCA12.uswin.ad.vzwcorp.com (144.8.22.187) by tbwexch06apd.uswin.ad.vzwcorp.com (153.114.162.30) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Sat, 2 Dec 2017 10:51:16 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA12.uswin.ad.vzwcorp.com (144.8.22.187) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Sat, 2 Dec 2017 09:51:15 -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:51:15 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.14 04/64] kbuild: pkg: use --transform option to prefix paths in tar Thread-Topic: [PATCH AUTOSEL for 4.14 04/64] kbuild: pkg: use --transform option to prefix paths in tar Thread-Index: AQHTa4ViAQoMR03jDEyiKkdOmlm8AQ== Date: Sat, 2 Dec 2017 15:51:14 +0000 Message-ID: <20171202155101.7573-4-alexander.levin@verizon.com> References: <20171202155101.7573-1-alexander.levin@verizon.com> In-Reply-To: <20171202155101.7573-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 73f9f3192b9f..2b4aa4c19b21 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 # ---------------------------------------------------------------------------