diff --git a/mysql-connector-java.changes b/mysql-connector-java.changes index 53c615d..a086b47 100644 --- a/mysql-connector-java.changes +++ b/mysql-connector-java.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Sep 26 05:14:00 UTC 2023 - Fridrich Strba + +- Added patch: + * reproducible-build.patch + + keep PropertyDefinitions sorted to achieve reproducible order + of getters/setters in generated class files + ------------------------------------------------------------------- Mon Sep 25 09:45:21 UTC 2023 - Fridrich Strba diff --git a/mysql-connector-java.spec b/mysql-connector-java.spec index 372080f..3103334 100644 --- a/mysql-connector-java.spec +++ b/mysql-connector-java.spec @@ -37,6 +37,7 @@ Patch0: javac-check.patch # The patch doesn't remove the file AuthenticationOciClient.java # therefore it's removed during prep phase Patch1: %{name}-remove-oci-support.patch +Patch2: reproducible-build.patch BuildRequires: ant BuildRequires: ant-contrib BuildRequires: apache-commons-logging @@ -80,6 +81,7 @@ set that supports the capabilities of MySQL. %setup -q -n mysql-connector-j-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 %if 0%{?suse_version} <= 1500 && 0%{?sle_version} <= 150200 # ship protobuf generated files compatible with protobuf 3.9.2 diff --git a/reproducible-build.patch b/reproducible-build.patch new file mode 100644 index 0000000..a8fddb5 --- /dev/null +++ b/reproducible-build.patch @@ -0,0 +1,20 @@ +--- mysql-connector-j-8.1.0/src/main/core-api/java/com/mysql/cj/conf/PropertyDefinitions.java 2023-09-26 06:49:03.580772166 +0200 ++++ mysql-connector-j-8.1.0/src/main/core-api/java/com/mysql/cj/conf/PropertyDefinitions.java 2023-09-26 06:53:10.775563886 +0200 +@@ -30,7 +30,7 @@ + package com.mysql.cj.conf; + + import java.util.Collections; +-import java.util.HashMap; ++import java.util.TreeMap; + import java.util.Map; + + import com.mysql.cj.Messages; +@@ -895,7 +895,7 @@ + // + }; + +- HashMap> propertyKeyToPropertyDefinitionMap = new HashMap<>(); ++ TreeMap> propertyKeyToPropertyDefinitionMap = new TreeMap<>(); + for (PropertyDefinition pdef : pdefs) { + propertyKeyToPropertyDefinitionMap.put(pdef.getPropertyKey(), pdef); + }