Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp264984ybg; Thu, 17 Oct 2019 22:41:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7zW/3J8avLpRjfSNNYspL3J9Y0Hnn5Db2LAWilD2z9E/76s5a+gO0UnekaC/3UaqaA90S X-Received: by 2002:a05:6402:21e8:: with SMTP id ce8mr7853599edb.32.1571377314167; Thu, 17 Oct 2019 22:41:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571377314; cv=none; d=google.com; s=arc-20160816; b=vOmAuGIDs+FkD2Ssb4INBx81TMjOsS9+5kFjWNd9tkMyWYrNA/RwBsAqhroNOak9tg YQGx1ZHGl9+8dm2GHaaKuGaiOjc7yxakGxcRE0pH73+feHHrQUPxrkWuh2OkDdv1U4cp iRlahaydjZLc675D972J1S0iv870+wOnWAP//RN30kVNBl6HCc3ppkeTdqPXkjSRJwBe mZAwDljvGApWvX2n74HyVEHgcavbS9sxYgOVYyElOXD+CppyIYwfHIUMS2ktFUxXZyVB zGW6Xd9O8SiWI+jqdE0hTnbVuVDs//fDicqrmu0C5Rst8iOYu14iPO4WeQOfgEKujbcr VkCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=5W3OY67om9EG9vb/EYg6ImNL7BEojMB8tQN+Mmn7vbA=; b=P6Bx1IEIxku5blES6VviWhv27Zu4YD5U9ygKEEEaanbSPVtKWJFc7GSy6GtUCyCVe5 xmRW65kC4LAEcxBxO+WAykISN6TbUwkz6zaKRp27VqC+EDG/5xG7eQMBNBNMPCPWsI71 N8cMyHO9L2DAlKS+TVIaG7SH9BdfGq8LDt84ymWJh3O1oPOW1ojiKZJ586ixE0ok25/q eKpG6gicysDQ19D5SnFKNziTkF05JfZcJRm6fy5aWmI61JjS8qlr2weoAsUmh7pws9/9 vejIPCKOPa06ap17poZgfULlid+uImvCLqWl0J0D9EvnfCjAc8KBRuzKj0iy+SUfaX6g L3bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=n3W5e19M; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si2959563edq.250.2019.10.17.22.41.30; Thu, 17 Oct 2019 22:41:53 -0700 (PDT) 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=pass header.i=@nifty.com header.s=dec2015msa header.b=n3W5e19M; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395017AbfJQCDZ (ORCPT + 99 others); Wed, 16 Oct 2019 22:03:25 -0400 Received: from conssluserg-01.nifty.com ([210.131.2.80]:61428 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729268AbfJQCDY (ORCPT ); Wed, 16 Oct 2019 22:03:24 -0400 Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com [209.85.222.50]) (authenticated) by conssluserg-01.nifty.com with ESMTP id x9H23H7l000536 for ; Thu, 17 Oct 2019 11:03:18 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com x9H23H7l000536 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1571277798; bh=5W3OY67om9EG9vb/EYg6ImNL7BEojMB8tQN+Mmn7vbA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=n3W5e19MVEMy9zpWEjk6gEoYsVrPHBjkQmgEjEJdVzbv+yeYo6ImlbW4mmcyajGKK qWkQB7V35OVxzuBejYBzRb3JlwGy2fVgzIDbGRDHnd6iZ+q2fR3ehpUho+N11f8MAs kYox4BuTcw4uEejecY8Q0mPCNH7JgXSa9+NDdabMq77xtTnFioW6lrNvAUTt5WY4mE 1f+YRGt8pbKuQcbZjGnx7hPNeEEx3B2TDF6bBWcNwP2p29ENy3EXNe/qCNRlOCn5he C8n/WtHu7BuRofXwGitL2wquDXqQ3C/Myd/cB5e2qvm9J+riWQ35wA9zDlIsSMqH3D wgLXqLEkz6EDw== X-Nifty-SrcIP: [209.85.222.50] Received: by mail-ua1-f50.google.com with SMTP id 107so173398uau.5 for ; Wed, 16 Oct 2019 19:03:18 -0700 (PDT) X-Gm-Message-State: APjAAAUoNML63EheeU+6j/22ukLHMqEQ/zyJl/cfFd7TWdKbwmyFi6Sn 2n1huUIHA23o6NEryyKIkBla6WcGXTTZ1ugnv90= X-Received: by 2002:ab0:59ed:: with SMTP id k42mr907181uad.25.1571277796854; Wed, 16 Oct 2019 19:03:16 -0700 (PDT) MIME-Version: 1.0 References: <20191014134037.GA79684@google.com> In-Reply-To: <20191014134037.GA79684@google.com> From: Masahiro Yamada Date: Thu, 17 Oct 2019 11:02:41 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kheaders: substituting --sort in archive creation To: Quentin Perret Cc: Dmitry Goldin , Andreas Schwab , Greg KH , "linux-kernel\\\\\\\\@vger.kernel.org" , "joel\\\\\\\\@joelfernandes.org" , Ben Hutchings , adelva@google.com, Nathan Chancellor , Matthias Maennich Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 14, 2019 at 10:40 PM Quentin Perret wrote: > > Hi Dmitry, > > On Wednesday 09 Oct 2019 at 13:42:14 (+0000), Dmitry Goldin wrote: > > From: Dmitry Goldin > > > > The option --sort=ORDER was only introduced in tar 1.28 (2014), which > > is rather new and might not be available in some setups. > > > > This patch tries to replicate the previous behaviour as closely as possible > > to fix the kheaders build for older environments. It does not produce identical > > archives compared to the previous version due to minor sorting > > differences but produces reproducible results itself in my tests. > > > > Signed-off-by: Dmitry Goldin > > --- > > kernel/gen_kheaders.sh | 11 +++++++---- > > 1 file changed, 7 insertions(+), 4 deletions(-) > > > > diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh > > index aff79e461fc9..5a0fc0b0403a 100755 > > --- a/kernel/gen_kheaders.sh > > +++ b/kernel/gen_kheaders.sh > > @@ -71,10 +71,13 @@ done | cpio --quiet -pd $cpio_dir >/dev/null 2>&1 > > find $cpio_dir -type f -print0 | > > xargs -0 -P8 -n1 perl -pi -e 'BEGIN {undef $/;}; s/\/\*((?!SPDX).)*?\*\///smg;' > > > > -# Create archive and try to normalize metadata for reproducibility > > -tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \ > > - --owner=0 --group=0 --sort=name --numeric-owner \ > > - -Jcf $tarfile -C $cpio_dir/ . > /dev/null > > +# Create archive and try to normalize metadata for reproducibility. > > +# For compatibility with older versions of tar, files are fed to tar > > +# pre-sorted, as --sort=name might not be available. > > +find $cpio_dir -printf "./%P\n" | LC_ALL=C sort | \ > > + tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \ > > + --owner=0 --group=0 --numeric-owner --no-recursion \ > > + -Jcf $tarfile -C $cpio_dir/ -T - > /dev/null > > > > echo "$src_files_md5" > kernel/kheaders.md5 > > echo "$obj_files_md5" >> kernel/kheaders.md5 > > -- > > 2.23.0 > > FWIW: > > Tested-by: Quentin Perret > > It turns out this issue broke something in our CI, could this patch be > queued as a -rc4 fix ? Applied to linux-kbuild/fixes. Thanks. I will send a pull request for -rc4. -- Best Regards Masahiro Yamada