RFC: Sort tarballs created by the src-release.sh script
Jan Beulich
jbeulich@suse.com
Thu Sep 29 12:36:18 GMT 2022
On 29.09.2022 14:24, Nick Clifton via Binutils wrote:
> Thinking about this a little more last night, it occurred to me that if
> we want reproducible tarballs then we should not be storing user names,
> group names or modification times either. So what do you think about
> this extended version of the patch:
>
> diff --git a/src-release.sh b/src-release.sh
> index 079b545ae7c..908492c28f7 100755
> --- a/src-release.sh
> +++ b/src-release.sh
> @@ -185,8 +185,8 @@ do_tar()
> echo "==> Making $package-$ver.tar"
> rm -f $package-$ver.tar
> find $package-$ver -follow \( $CVS_NAMES \) -prune \
> - -o -type f -print \
> - | tar cTfh - $package-$ver.tar
> + -o -type f -print | LC_ALL=C sort \
> + | tar cTfh - $package-$ver.tar --mtime=0 --group=0 --owner=0
> }
I wanted to indicate that an mtime of zero isn't the neatest, but the
two tar versions I've tried this with said anyway "Treating date '0' as
2022-09-29 00:00:00". A non-zero date with a time of zero is fine with
me, but won't make much of a difference in terms of reproducibility.
Jan
More information about the Binutils
mailing list