From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 0124A3858D32; Sun, 2 Oct 2022 07:55:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0124A3858D32 From: Sam James Mime-Version: 1.0 (1.0) Subject: Re: RFC: Sort tarballs created by the src-release.sh script Date: Sun, 2 Oct 2022 08:54:58 +0100 Message-Id: <3EC98FFD-FD7A-4A17-9FE0-EF5DAFB36B3C@gentoo.org> References: <07a1ca21-5569-e67b-d0c7-6069974b1068@redhat.com> Cc: Jan Beulich , Andreas Schwab , Binutils , Nick Clifton via Gdb-patches , Tzvetelin Katchov In-Reply-To: <07a1ca21-5569-e67b-d0c7-6069974b1068@redhat.com> To: Nick Clifton X-Mailer: iPhone Mail (20A380) X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, HTML_MESSAGE, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, MIME_QP_LONG_LINE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2022 07:55:17 -0000 > On 30 Sep 2022, at 12:38, Nick Clifton via Binutils wrote: >=20 > =EF=BB=BFHi Guys, >=20 > Right, here is the latest and greatest - and hopefully last - version > of the patch. I added a parseable string to the --mtime option and a > comment explaining why these options are being used. >=20 > Any more comments/suggestions ? >=20 > Cheers > Nick >=20 > diff --git a/src-release.sh b/src-release.sh > index 079b545ae7c..8a2ac125030 100755 > --- a/src-release.sh > +++ b/src-release.sh > @@ -184,9 +184,11 @@ do_tar() > ver=3D$2 > echo "=3D=3D> Making $package-$ver.tar" > rm -f $package-$ver.tar > + # The sort command and --mtime, --group and --owner options are > + # used in order to create consistent, reproducible tarballs. > find $package-$ver -follow \( $CVS_NAMES \) -prune \ > - -o -type f -print \ > - | tar cTfh - $package-$ver.tar > + -o -type f -print | LC_ALL=3DC sort \ > + | tar cTfh - $package-$ver.tar --mtime=3D"1970-01-01 00:00:00" --g= roup=3D0 --owner=3D0 > } >=20 > # Compress the output with bzip2 >=20 I think this might hit a problem I faced when trying to do this with Go tarb= alls: https://www.gnu.org/software/tar/manual/tar.html#warnings. With that date, I got "implausibly old time stamp" warnings from tar. I have= n't tested this patchthough (writing from mobile, apologies). Maybe default to the creation date of Binutils and allow overriding via http= s://reproducible-builds.org/docs/source-date-epoch/? best, sam= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 0124A3858D32; Sun, 2 Oct 2022 07:55:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0124A3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Content-Type: multipart/alternative; boundary=Apple-Mail-6F771711-0AE5-4B95-B5C1-D3251A07A370 Content-Transfer-Encoding: 7bit From: Sam James Mime-Version: 1.0 (1.0) Subject: Re: RFC: Sort tarballs created by the src-release.sh script Date: Sun, 2 Oct 2022 08:54:58 +0100 Message-ID: <3EC98FFD-FD7A-4A17-9FE0-EF5DAFB36B3C@gentoo.org> References: <07a1ca21-5569-e67b-d0c7-6069974b1068@redhat.com> Cc: Jan Beulich , Andreas Schwab , Binutils , Nick Clifton via Gdb-patches , Tzvetelin Katchov In-Reply-To: <07a1ca21-5569-e67b-d0c7-6069974b1068@redhat.com> To: Nick Clifton X-Mailer: iPhone Mail (20A380) X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00,GIT_PATCH_0,HTML_MESSAGE,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,KAM_SHORT,MIME_QP_LONG_LINE,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Message-ID: <20221002075458.8f6JWfEfPjU-27tmQERypppOBuhqbnPysKO71p-GdUY@z> --Apple-Mail-6F771711-0AE5-4B95-B5C1-D3251A07A370 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > On 30 Sep 2022, at 12:38, Nick Clifton via Binutils wrote: >=20 > =EF=BB=BFHi Guys, >=20 > Right, here is the latest and greatest - and hopefully last - version > of the patch. I added a parseable string to the --mtime option and a > comment explaining why these options are being used. >=20 > Any more comments/suggestions ? >=20 > Cheers > Nick >=20 > diff --git a/src-release.sh b/src-release.sh > index 079b545ae7c..8a2ac125030 100755 > --- a/src-release.sh > +++ b/src-release.sh > @@ -184,9 +184,11 @@ do_tar() > ver=3D$2 > echo "=3D=3D> Making $package-$ver.tar" > rm -f $package-$ver.tar > + # The sort command and --mtime, --group and --owner options are > + # used in order to create consistent, reproducible tarballs. > find $package-$ver -follow \( $CVS_NAMES \) -prune \ > - -o -type f -print \ > - | tar cTfh - $package-$ver.tar > + -o -type f -print | LC_ALL=3DC sort \ > + | tar cTfh - $package-$ver.tar --mtime=3D"1970-01-01 00:00:00" --= group=3D0 --owner=3D0 > } >=20 > # Compress the output with bzip2 >=20 I think this might hit a problem I faced when trying to do this with Go tar= balls: https://www.gnu.org/software/tar/manual/tar.html#warnings. With that date, I got "implausibly old time stamp" warnings from tar. I hav= en't tested this patchthough (writing from mobile, apologies). Maybe default to the creation date of Binutils and allow overriding via htt= ps://reproducible-builds.org/docs/source-date-epoch/? best, sam= --Apple-Mail-6F771711-0AE5-4B95-B5C1-D3251A07A370--