diff --git a/libdb_java-4_8.changes b/libdb_java-4_8.changes index 9afbec0..ffadd75 100644 --- a/libdb_java-4_8.changes +++ b/libdb_java-4_8.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 16 07:01:52 UTC 2024 - Bernhard Wiedemann + +- Add reproducible.patch to set .jar mtime to a constant. + ------------------------------------------------------------------- Wed Jun 21 12:42:57 UTC 2023 - Pedro Monreal diff --git a/libdb_java-4_8.spec b/libdb_java-4_8.spec index 03740c8..1ea08ab 100644 --- a/libdb_java-4_8.spec +++ b/libdb_java-4_8.spec @@ -33,6 +33,7 @@ Patch0: db-%{version}.patch Patch1: libdb_java-4_8-fix-java10-comp.patch # PATCH-FIX-OPENSUSE Fix build with GCC8, conflict with reserved builtin name Patch2: libdb-fix-atomic.patch +Patch3: reproducible.patch BuildRequires: autoconf BuildRequires: gcc-c++ BuildRequires: java-sdk >= 1.8 @@ -64,6 +65,10 @@ These are the development files. %patch -P 0 %patch -P 1 -p1 %patch -P 2 +# the Leap build happens with an old jar version that does not know the --date option, so we need to test for that +if jar --help|grep -q -- --date=TIMESTAMP ; then +%patch -P 3 -p1 +fi %build cd dist diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..ec2ebcc --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,19 @@ +Date: 2024-07-16 +Author: Bernhard M. Wiedemann + +make .jar build reproducible +by setting the build date to a constant. + +Index: db-4.8.30/dist/Makefile.in +=================================================================== +--- db-4.8.30.orig/dist/Makefile.in ++++ db-4.8.30/dist/Makefile.in +@@ -830,7 +830,7 @@ $(libj_jarfile): $(JAVA_DBSRCS) + $(JAVA) -classpath $(JAVA_CLASSTOP) \ + com.sleepycat.persist.model.ClassEnhancer $(JAVA_CLASSTOP) + cd $(JAVA_CLASSTOP) && \ +- $(JAR) cfm ../$(libj_jarfile) ../$(JAVA_MANIFEST) ./com/sleepycat ++ $(JAR) --date=2000-01-01T00:00:00+00:00 -c -f ../$(libj_jarfile) -m ../$(JAVA_MANIFEST) ./com/sleepycat + + $(libj_exjarfile): $(libj_jarfile) $(JAVA_EXSRCS) + @test -d $(JAVA_EXCLASSTOP) || \