bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Make .jar build reproducible


From: Bernhard M. Wiedemann
Subject: [PATCH] Make .jar build reproducible
Date: Tue, 16 Jul 2024 13:40:22 +0200
User-agent: Mozilla Thunderbird




-------- Forwarded Message --------
Subject: [PATCH] Make .jar build reproducible
Date: Tue, 16 Jul 2024 10:17:19 +0200
From: Bernhard M. Wiedemann <bwiedemann@suse.de>
To: bug-gettext@gnu.org
CC: Bernhard M. Wiedemann <bwiedemann@suse.de>

Make .jar build reproducible
by setting the build date to a constant.

Unfortunately, the --date param in jar might be a recent addition.
Do you want autoconf check to still work with older java versions?
---
 gettext-runtime/intl-java/Makefile.am | 2 +-
 gettext-tools/src/Makefile.am         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gettext-runtime/intl-java/Makefile.am b/gettext-runtime/intl-java/Makefile.am
index a8c5290e9..81701f904 100644
--- a/gettext-runtime/intl-java/Makefile.am
+++ b/gettext-runtime/intl-java/Makefile.am
@@ -45,7 +45,7 @@ gnu/gettext/GettextResource.class: $(srcdir)/gnu/gettext/GettextResource.java
        $(JAVACOMP) -d . $(srcdir)/gnu/gettext/GettextResource.java
  libintl.jar: gnu/gettext/GettextResource.class
-       $(JAR) cf $@ gnu/gettext/GettextResource*.class
+ $(JAR) --date=2000-01-01T00:00:00+00:00 -c -f $@ gnu/gettext/GettextResource*.class
  EXTRA_DIST += gnu/gettext/GettextResource.java
 diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am
index d95b08ed6..ba2759ed3 100644
--- a/gettext-tools/src/Makefile.am
+++ b/gettext-tools/src/Makefile.am
@@ -655,7 +655,7 @@ gnu/gettext/GetURL.class: $(srcdir)/gnu/gettext/GetURL.java
        $(JAVACOMP) -d . $(srcdir)/gnu/gettext/GetURL.java
  gettext.jar: gnu/gettext/DumpResource.class gnu/gettext/GetURL.class
-       $(JAR) cf $@ gnu/gettext/DumpResource*.class gnu/gettext/GetURL*.class
+ $(JAR) --date=2000-01-01T00:00:00+00:00 -c -f $@ gnu/gettext/DumpResource*.class gnu/gettext/GetURL*.class
  EXTRA_DIST += gnu/gettext/DumpResource.java gnu/gettext/GetURL.java
 -- 2.45.2



reply via email to

[Prev in Thread] Current Thread [Next in Thread]