On 2020-12-11, Vagrant Cascadian wrote:
> From 2974d881f31bc9808f3334565bbbd126beb4295f Mon Sep 17 00:00:00 2001
> From: Vagrant Cascadian <[email protected]>
> Date: Sat, 12 Dec 2020 05:51:14 +0000
> Subject: [PATCH 2/2] Patch Makefile.in to generate tarball with consistent
>  user id, group id, sort order, timestamps and pax headers.
>
> This patch relies on extensions to GNU tar and may require
> adjustments to make portable across implementations.
>
> https://reproducible-builds.org/docs/archives/
> ---
>  Makefile.in | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile.in b/Makefile.in
> index f454959..065f35b 100644
> --- a/Makefile.in
> +++ b/Makefile.in
> @@ -214,7 +214,11 @@ source:
>       mkdir -p export/$(EXPORTDIR)/contrib/lablgtk
>       cp $(CONTRIBDOTFILES) export/$(EXPORTDIR)/contrib/dot
>       cp $(CONTRIBLABLGTKFILES) export/$(EXPORTDIR)/contrib/lablgtk
> -     cd export ; tar cf $(TAR) $(EXPORTDIR) ; gzip -f --best $(TAR)
> +     cd export ; tar --sort=name \
> +             --mtime="@$${SOURCE_DATE_EPOCH}" \
> +             --owner=0 --group=0 --numeric-owner \
> +             
> --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
> +             -cf $(TAR) $(EXPORTDIR) ; gzip -f --best $(TAR)
>  
>  
>  DOCFILES:=$(shell echo *.mli)

I think the patch may also need to pass --mode=a+rX,og-w to tar as well.

My original test environment didn't catch the change of umask that
tests.reproducible-builds.org tests do, but I found it was necessary for
another package with a similar issue.


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature

Reply via email to