Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5439475ybp; Tue, 8 Oct 2019 02:55:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMj282/luu09cePgjsgRHfRHPAIcVEyTmZ20q+DmmQLzbDnUM/XOQUsKKnGreCqz35XU/1 X-Received: by 2002:aa7:cdd6:: with SMTP id h22mr33392730edw.132.1570528529154; Tue, 08 Oct 2019 02:55:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570528529; cv=none; d=google.com; s=arc-20160816; b=sk4LRoEUU8ClIKAxvpI0RxfBq9YNuMzYxScuLIfWtNnX44LYGlOtPH7KubDWYjrcNW Yi+OQmzdDKqkC5HqUSNN+AbfuFykU91CGr/PBuR47N09H0OfN9ASVMAiWCEa2ncUmG7c TYCB+WsBSH2SYdFpJBJYm3uEybX/bN2FRk/k7sGccrLrcqxd/Kz+lJyi/VE+eWHhdVLz NEVEDm0H0VK29PtvmlikzRwzkVL5WWq9JMkFT8q1xKczNtFmIVNT5//b8htkTdfVRfIh AwHyRX3KwSWVY3ecZEvbdVuMvNx9vb0J35C26kKONWBMZ2N4JpfC0qSF6LmFQt1NEMxt FWww== 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:mime-version :feedback-id:references:in-reply-to:message-id:subject:reply-to:cc :from:to:dkim-signature:date; bh=xaYziXcn3PAogMjdsVmux+RpIIeoIUGVyhfe2ngISyU=; b=O97lllTBcBNvO9ygQ2vZicJ1RH0730PeMmza9ZaQYs+QgHMSovQMTSiDAzUUkwKuz2 7t3bpusQsZWIhry+s5XEpMz0kix1SmrY92/voOhG6dbYKt8LPGYwTn0vTBKM7WXhhfBe av3PrzFK6qH9+FvKFWU955Ud0m53zb7eGTd9SE0q4hE0E2JwSKqRzE4pT6aZ6s8v1Bu0 K4Q8oafNvuUbsiM2z6wtB/QxQzGY7N+XHZHL6ZiNCcGWlSQclQffm3G3V++jOH9j0Mq7 RbmkN7Dag1A4MKDlnypp7o8eoxgySgJ/epwJN8SneMfPHKUZXA9RBvUBqZ3FOwP+6xJf O5ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.ch header.s=default header.b=J87nWh58; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.ch Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x20si8406039ejb.393.2019.10.08.02.55.05; Tue, 08 Oct 2019 02:55:29 -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=@protonmail.ch header.s=default header.b=J87nWh58; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729989AbfJHJyx (ORCPT + 99 others); Tue, 8 Oct 2019 05:54:53 -0400 Received: from mail2.protonmail.ch ([185.70.40.22]:21640 "EHLO mail2.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729375AbfJHJyx (ORCPT ); Tue, 8 Oct 2019 05:54:53 -0400 Date: Tue, 08 Oct 2019 09:54:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.ch; s=default; t=1570528490; bh=xaYziXcn3PAogMjdsVmux+RpIIeoIUGVyhfe2ngISyU=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References: Feedback-ID:From; b=J87nWh58/WbHccqw04w1aFW617Wn/Y3uSdwQzjpiLOjEXCHPITPvPGKTxof3gNKZP E0PIAz9EHOSiK6dBoqI2ka1HMswUGC4giG5LT9bFLSsxrAiUSmk8jlhN79dpNJNBCz xRj+NJFVBq1WL3/toghW6kw1f6j0b69ehIuV79y4= To: Masahiro Yamada From: Dmitry Goldin Cc: Andreas Schwab , Greg KH , "linux-kernel\\\\@vger.kernel.org" , "joel\\\\@joelfernandes.org" , Ben Hutchings Reply-To: Dmitry Goldin Subject: Re: [PATCH v2] kheaders: making headers archive reproducible Message-ID: In-Reply-To: References: <874l0k3hd0.fsf@igel.home> <20191007115217.GA835482@kroah.com> <87zhic212y.fsf@igel.home> Feedback-ID: Z14zYPZ70AFJyYagXjx-jk2Vw9RTvF5p9C9xp4Pq6DJAMFg9PDsfB7GoMmtR_dfa0BaFgToZb9Q4V0UiY2YiMQ==:Ext:ProtonMail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.protonmail.ch Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =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 wrote: > > > Hmm. --sort was introduced in 1.28 in 2014. Do you think it would warra= nt some sort of version check and fallback or is this something we can expe= ct the user to handle if their distribution happens to not ship anything mo= re recent? A few sensible workarounds come to mind. > > I think the former. After pondering it briefly, maybe substituting the option is a bit less has= sle 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=3D= name. 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 o= r early tomorrow. Then we can decide if its sufficient before submitting an= other patch. Other suggestions and pointers are welcome, of course. -- Best regards, Dmitry