Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5473926ybp; Tue, 8 Oct 2019 03:29:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZBKoWc3JzKYrbsTf4eM8KkoyjNocXW9bWo2SoRDpK+X92iLwpe+Dpb4niztY1ykWzPkmg X-Received: by 2002:a17:906:c822:: with SMTP id dd2mr27432519ejb.165.1570530578940; Tue, 08 Oct 2019 03:29:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570530578; cv=none; d=google.com; s=arc-20160816; b=EhL4U0zA4cZFLwHMk2v3ECAIrFiD4A+zyb4lH/EINFCEBOdzEFqFOH54rLT02xglvU btFlBgRflYDB7cgC8wWLG18y8aBKHdb/HToBgEYH/iyV62OulfQ0yrMhcJP5/ImaDtEt 6/Ojb2FlQ+Y6XR3qLmWoJLO01on43b0o8o8nX0g5hjqemlrGGMGIWCrb36nVciTElJov ujyAe8iM101nLp2dxXxDEZa6muqAPmSX10UQ99x0lOu/GQIL9FSy+Ns+H+IQ61eFP0H+ gi6EVRDqeKw13ZKUPf9IiWMmc1ZE9iFSMfk5oRdNalO9QKICuktQgz2iIKr6FCQMJjok 87QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:dkim-filter; bh=Ro3IwQhUtN8hjL6s+IXt8h05Htw+O0E3OtIDEn/I81g=; b=NLsaHtO6z3U3uVdNTMp2gOj7wCDeaZRy51HA9yhPetM0YWcY6pzI9AojxYHD4gb8LV NXsX636Enfu8KIQCVM6geEQ5nuLfobWq3e9V3daK+1AWjMZwmbWri4xLC7Nai7JxDWUL 9K0ulXCTrKSzx6unnFihlFEq+ImkrdflnWfCh0/WJxClW45zii50wXgPEFxrkw9X+E8/ 9pGUqV8prOMjaVSJEckc8J3GMomPHzMNjTVpx+tQxast+wqx08CwrkYjso4MY2k3sd2r vkN52vJ2CvLlLYFvL0hV8+tl+Wrcm0tHVW3qBFVBexNHXb7IcX+gMS99fcRYp70rzQ27 ARMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=hQ+5vfiV; 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 y27si11046391edd.249.2019.10.08.03.29.15; Tue, 08 Oct 2019 03:29:38 -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=hQ+5vfiV; 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 S1730256AbfJHK2g (ORCPT + 99 others); Tue, 8 Oct 2019 06:28:36 -0400 Received: from conssluserg-06.nifty.com ([210.131.2.91]:60489 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729790AbfJHK2g (ORCPT ); Tue, 8 Oct 2019 06:28:36 -0400 Received: from mail-vk1-f169.google.com (mail-vk1-f169.google.com [209.85.221.169]) (authenticated) by conssluserg-06.nifty.com with ESMTP id x98ASHZG014542 for ; Tue, 8 Oct 2019 19:28:18 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com x98ASHZG014542 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1570530498; bh=Ro3IwQhUtN8hjL6s+IXt8h05Htw+O0E3OtIDEn/I81g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hQ+5vfiV2YicKKIWkJZx0TJhvgrlzmcjMSRMDckGKSrAyTNO5t3kHp1JwziRBkoGG uz7zwiWA88BeN6Kl9sKRlO0SM8mIL75AvEAsCA+0UNxbTZ+BcAdm001Bbt/t/FEVve odSHckdGk2M+ak2NQCdwjf+JrDGtN1zmtLW+wJY+pWbnC+pUuHDcx8Vouud8CY4OHC rorNvJN9WwwNKIIxCgY9brgsQTgWd9EoMslUznWORzEbgJXpCFgIWVltBiTCVoLdcV bPVQly57XKEeN9bTXJg3apc1lN6jPOJLWrt5RheS/ooSPddkUJU9tZ2HI5WM5e5hyn P5FUBEtwIsEWw== X-Nifty-SrcIP: [209.85.221.169] Received: by mail-vk1-f169.google.com with SMTP id p189so3636996vkf.10 for ; Tue, 08 Oct 2019 03:28:18 -0700 (PDT) X-Gm-Message-State: APjAAAUeUeGg3arj82RZx8JkSKyzNof61ntob71WrKcjXvFIIscVdR9k h031fqI9BNafAjhYjIxLqaCA4pr2cXQ3/uSqyvw= X-Received: by 2002:a1f:5243:: with SMTP id g64mr16756813vkb.26.1570530491980; Tue, 08 Oct 2019 03:28:11 -0700 (PDT) MIME-Version: 1.0 References: <874l0k3hd0.fsf@igel.home> <20191007115217.GA835482@kroah.com> <87zhic212y.fsf@igel.home> In-Reply-To: From: Masahiro Yamada Date: Tue, 8 Oct 2019 19:27:35 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] kheaders: making headers archive reproducible To: Dmitry Goldin Cc: Andreas Schwab , Greg KH , "linux-kernel\\\\@vger.kernel.org" , "joel\\\\@joelfernandes.org" , Ben Hutchings Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 8, 2019 at 6:54 PM Dmitry Goldin wrote: > > =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original = Message =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 > On Tuesday, October 8, 2019 10:14 AM, Masahiro Yamada wrote: > > > On Tue, Oct 8, 2019 at 5:07 PM Dmitry Goldin dgoldin@protonmail.ch wrot= e: > > > > > Hmm. --sort was introduced in 1.28 in 2014. Do you think it would war= rant some sort of version check and fallback or is this something we can ex= pect the user to handle if their distribution happens to not ship anything = more recent? A few sensible workarounds come to mind. > > > > I think the former. > > After pondering it briefly, maybe substituting the option is a bit less h= assle than checking for > the version and then degrading to a possibly non-reproducible archive. > > Maybe we could go with something like the sketch below to replace --sort= =3Dname. That is, if > that's the only problematic flag. > > find $cpio_dir -printf "%P\n" | LC_ALL=3DC sort | \ > tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=3D$KBUILD_BUILD_TIMESTAMP}" \ > --owner=3D0 --group=3D0 --numeric-owner \ > -Jcf $tarfile -C $cpio_dir/ -T - > /dev/null > > I will look at this a bit more closely and give it a test-run later today= or early tomorrow. Then we can decide if its sufficient before submitting = another patch. Other suggestions and pointers are welcome, of course. I am fine with this solution too. Thanks! --=20 Best Regards Masahiro Yamada