[Git][java-team/jameica-h2database][master] Create reproducible zip files in the jar
Emmanuel Bourg (@ebourg)
gitlab at salsa.debian.org
Fri Oct 16 10:14:57 BST 2026
Emmanuel Bourg pushed to branch master at Debian Java Maintainers / jameica-h2database
Commits:
84fa678c by Emmanuel Bourg at 2026-10-16T11:01:17+02:00
Create reproducible zip files in the jar
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/05-reproducible-zip-files.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+jameica-h2database (1.4.199-3) unstable; urgency=medium
+
+ * Team upload.
+ * Create reproducible zip files in the jar
+
+ -- Emmanuel Bourg <ebourg at apache.org> Fri, 16 Oct 2026 11:00:52 +0200
+
jameica-h2database (1.4.199-2) unstable; urgency=medium
* Team upload
=====================================
debian/patches/05-reproducible-zip-files.patch
=====================================
@@ -0,0 +1,37 @@
+Description: Create reproducible zip and jar files
+ The entries were stored in the order returned by the filesystem and with
+ the current time, which makes org/h2/util/data.zip differ between builds.
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/src/tools/org/h2/build/BuildBase.java
++++ b/src/tools/org/h2/build/BuildBase.java
+@@ -31,6 +31,8 @@
+ import java.nio.charset.StandardCharsets;
+ import java.security.MessageDigest;
+ import java.security.NoSuchAlgorithmException;
++import java.time.LocalDateTime;
++import java.time.ZoneOffset;
+ import java.util.ArrayList;
+ import java.util.Arrays;
+ import java.util.Collections;
+@@ -876,6 +878,8 @@
+ return p1.compareTo(p2);
+ }
+ });
++ } else {
++ Collections.sort(files);
+ }
+ mkdirs(new File(destFile).getAbsoluteFile().getParentFile());
+ // normalize the path (replace / with \ if required)
+@@ -902,6 +906,11 @@
+ String entryName = removeBase(basePath, fileName);
+ byte[] data = readFile(file);
+ ZipEntry entry = new ZipEntry(entryName);
++ String sourceDateEpoch = System.getenv("SOURCE_DATE_EPOCH");
++ if (sourceDateEpoch != null) {
++ entry.setTimeLocal(LocalDateTime.ofEpochSecond(
++ Long.parseLong(sourceDateEpoch), 0, ZoneOffset.UTC));
++ }
+ CRC32 crc = new CRC32();
+ crc.update(data);
+ entry.setSize(file.length());
=====================================
debian/patches/series
=====================================
@@ -6,3 +6,4 @@ CVE-2021-42392.patch
0008-Drop-Resource-Doclet.java-does-not-compile-with-JDK-.patch
0007-Make-compatible-with-Lucene-9.patch
0008-Drop-version-from-jar-filename.patch
+05-reproducible-zip-files.patch
View it on GitLab: https://salsa.debian.org/java-team/jameica-h2database/-/commit/84fa678cf37f8c7cb17ca55ae12f0638e0f5a00b
--
View it on GitLab: https://salsa.debian.org/java-team/jameica-h2database/-/commit/84fa678cf37f8c7cb17ca55ae12f0638e0f5a00b
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20261016/954ef631/attachment.htm>
More information about the pkg-java-commits
mailing list