[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "jar" tool and and reproducible builds - how?
From: |
Danny Milosavljevic |
Subject: |
Re: "jar" tool and and reproducible builds - how? |
Date: |
Tue, 5 Nov 2019 16:09:53 +0100 |
Hi Gábor,
> This looks like a jar timestamps issue. Adding a phase similar to
> strip-jar-timestamps in ant-build-system should work.
> It extracts the jar to a temporary directory, resets file timestamps, and
> then repacks it, and resets the timestamp on the archive.
> Could you check if that works for you?
Yes, the following works and makes it reproducible:
(arguments
`(#:imported-modules
((guix build utils)
(guix build ant-build-system)
(guix build gremlin)
(guix build syscalls)
(guix elf)
(guix build gnu-build-system))
#:phases
(modify-phases %standard-phases
(add-after 'install 'strip-jar-timestamps
(assoc-ref (@ (guix build ant-build-system) %standard-phases)
'strip-jar-timestamps)))))
But I'd prefer if our "jar" tool did that on its own if SOURCE_DATE_EPOCH
is set--I don't think the code above is maintainable.
The following code does not work (doesn't find ant-build-system):
(arguments
`(#:modules
((guix build gnu-build-system)
((guix build ant-build-system) #:prefix ant:)
(guix build utils))
#:phases
(modify-phases %standard-phases
(add-after 'install 'strip-jar-timestamps
(assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))
pgp16qSAo4anh.pgp
Description: OpenPGP digital signature
Re: "jar" tool and and reproducible builds - how?, Hartmut Goebel, 2019/11/05