From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 367F03858D32; Mon, 3 Oct 2022 06:59:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 367F03858D32 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: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Sam James Mime-Version: 1.0 (1.0) Subject: Re: RFC: Sort tarballs created by the src-release.sh script Date: Mon, 3 Oct 2022 07:59:04 +0100 Message-Id: <38F08F3E-EFA6-4ABA-9CEE-60306E872C25@gentoo.org> References: Cc: Nick Clifton , Andreas Schwab , Binutils , Nick Clifton via Gdb-patches , Tzvetelin Katchov In-Reply-To: To: Jan Beulich X-Mailer: iPhone Mail (20A380) X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,KAM_SHORT,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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: > On 3 Oct 2022, at 07:56, Jan Beulich wrote: >=20 > =EF=BB=BFOn 02.10.2022 09:54, Sam James wrote: >>=20 >>=20 >>>> 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 >>=20 >> I think this might hit a problem I faced when trying to do this with Go t= arballs: https://www.gnu.org/software/tar/manual/tar.html#warnings. >>=20 >> With that date, I got "implausibly old time stamp" warnings from tar. I h= aven't tested this patchthough (writing from mobile, apologies). >>=20 >> Maybe default to the creation date of Binutils and allow overriding via h= ttps://reproducible-builds.org/docs/source-date-epoch/? >=20 > Not sure what "creation date" might mean here. I meant whatever date folks consider to have been the creation of the Binuti= ls project. First commit, announcement, first release, whatever. Not that it really matters, it just can't be the unix epoch.=