From patchwork Sat Dec 2 15:52:12 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: 120422 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2499689qgn; Sat, 2 Dec 2017 08:12:21 -0800 (PST) X-Google-Smtp-Source: AGs4zMb3vVw7nW3Z4PknT90UXOk7USKuGSJ8wBNQvbxH60r++MODPkFoa3Bfl5oD5e9xTqQE6k+6 X-Received: by 10.98.71.90 with SMTP id u87mr14087169pfa.75.1512231140949; Sat, 02 Dec 2017 08:12:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512231140; cv=none; d=google.com; s=arc-20160816; b=ZDV9g0avPwJIfUifCkH+JxAhIiuJfTJFkKH7PDGHHFnaV9SGSELdSIAQ+xnyT6uuKU B4NyNMes+OFcamCPIztdFLsdhxwLh8PXcW7JLhfjma0dLxRowBY8XSFYL7Kaoudoqkwt hYruHiLAxUPlQUJNfxuk1HhkH18vGOP1ZyxU/fzQgSecbHfPEDVDUSKu8xQR/E0d7uM3 a17vSeB6fQODlJpTd9tzqpEu8wIN4DLlj4Xsu81bV2SgMTu8GTRHzqpJqmJIO2/kC9Gx gLoCPpXjWzxZwwyvJBdrFxspdtE6C1Expkr8foH9fwC9t40evc+KE+Tc6/M3QgnVjvF4 lCEg== 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=pyRsWcEmZLPEqezl7sK2TEqezWr+UMOPiurI2cLxyhc=; b=ZdENKJmyVZFI3/CKk7kE1TefXkRBACgRzR45rgG5Zr8Wap4NlWZNEKUYk8Axa6CVCT /HM6JhUN9hrmaX7lgCqJ36iSILYHAkOFTw/VtwyYVloyTwOX7x9MtjZL7e9BEI5vL8SR r97ZJLoGjz9vD4z2J6oDRHVsn/uACL2R44kLoyHA5tiEO1uHH3Pxn9K4Wet+XjRyA1Wu s2b/HOwhpDIL66BuSeY1fifiNoXrPa53t+XIng9XW2f+Nhs+Tka0elhMS95598K/TymX Pf7NnU+2T1JxTmjwORZgsqpEjfdMbmeIdmh3uF/T8W2ZrxyKmer+OCLhm2g/E9Og7cc/ c9tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=fv5eRbJp; dkim=fail header.i=@verizon.com header.s=corp header.b=qDgccx2n; dkim=fail header.i=@verizon.com header.s=corp header.b=S14/uaJD; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 p21si7031337pfi.396.2017.12.02.08.12.20; Sat, 02 Dec 2017 08:12:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=fv5eRbJp; dkim=fail header.i=@verizon.com header.s=corp header.b=qDgccx2n; dkim=fail header.i=@verizon.com header.s=corp header.b=S14/uaJD; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S1751885AbdLBQMS (ORCPT + 9 others); Sat, 2 Dec 2017 11:12:18 -0500 Received: from fldsmtpe03.verizon.com ([140.108.26.142]:1751 "EHLO fldsmtpe03.verizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752700AbdLBPx3 (ORCPT ); Sat, 2 Dec 2017 10:53:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1512230009; x=1543766009; h=from:cc:to:subject:date:message-id: content-transfer-encoding:mime-version; bh=/0agmksBM5kcM6vlRUDFu/3G8iyDFyxeMpFo7Buvg9k=; b=fv5eRbJpNBsaONV8gE6/IlMnh2K6hLBPMb/3v6V13qagf+o4xdMXzkEA 30Tj2WEpHUxyD0Yx4HQwPwHB1R4pn9+J81oEFLbphtDBDIoJwp8ypjLBm T99JQj0PiV8S3CYBqxEKjynz6TFrpu8g6eoGkmjb8wZP//2YqJH3UbbMg A=; Received: from unknown (HELO fldsmtpi02.verizon.com) ([166.68.71.144]) by fldsmtpe03.verizon.com with ESMTP; 02 Dec 2017 15:53:21 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi02.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Dec 2017 15:52:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1512229976; x=1543765976; h=from:cc:to:subject:date:message-id: content-transfer-encoding:mime-version; bh=/0agmksBM5kcM6vlRUDFu/3G8iyDFyxeMpFo7Buvg9k=; b=qDgccx2nOgkBphxp9mz1ulb8hidr70ercGVLecOuBRHV33+5xbYObTDj QuK73735z2+emKsSi7V/9oOxr/aEPBA4d1Nl98hvu2Qm2XDhJ2jBcwRsT bfM8Q7bZQi4nWzrdrEtnEvupWbcnWOY3hCuxOJHYPXEWFdpXy1wj28APF I=; 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:52:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1512229976; x=1543765976; h=to:subject:date:message-id:content-transfer-encoding: mime-version:from:cc; bh=/0agmksBM5kcM6vlRUDFu/3G8iyDFyxeMpFo7Buvg9k=; b=S14/uaJD1zBxZKD5KAJS7kIy6JIiYg2EZdSib4TPipbbAgd0BNWb978h CXXIqJ3lOVGRaWvxF4YbGUgp3tk030RQuORAkiBtRGV7bESVIIDWJT1Wn aB77UZvXbP/VU1KnW5GjqkQvjBVAa1j0Y7E4LnvCO5H9iSZpeoPSI9EGh Y=; From: alexander.levin@verizon.com Cc: Masahiro Yamada , alexander.levin@verizon.com X-Host: endeavour.tdc.vzwcorp.com Received: from ohtwi1exh001.uswin.ad.vzwcorp.com ([10.144.218.43]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 02 Dec 2017 15:52:56 +0000 Received: from tbwexch14apd.uswin.ad.vzwcorp.com (153.114.162.38) by OHTWI1EXH001.uswin.ad.vzwcorp.com (10.144.218.43) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sat, 2 Dec 2017 10:52:55 -0500 Received: from OMZP1LUMXCA19.uswin.ad.vzwcorp.com (144.8.22.197) by tbwexch14apd.uswin.ad.vzwcorp.com (153.114.162.38) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Sat, 2 Dec 2017 10:52:55 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA19.uswin.ad.vzwcorp.com (144.8.22.197) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Sat, 2 Dec 2017 09:52:54 -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:52:54 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.9 01/33] kbuild: pkg: use --transform option to prefix paths in tar Thread-Topic: [PATCH AUTOSEL for 4.9 01/33] kbuild: pkg: use --transform option to prefix paths in tar Thread-Index: AQHTa4WEVY6riOULv0S3qabrmcZUQQ== Date: Sat, 2 Dec 2017 15:52:12 +0000 Message-ID: <20171202155204.7691-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: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 71b4a8af9d4d..7badec3498b8 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 # ---------------------------------------------------------------------------