diff --git a/alternative-tzdb_dat.patch b/alternative-tzdb_dat.patch deleted file mode 100644 index 3d14698..0000000 --- a/alternative-tzdb_dat.patch +++ /dev/null @@ -1,111 +0,0 @@ ---- a/src/java.base/share/classes/java/time/zone/TzdbZoneRulesProvider.java Thu Jun 28 17:49:13 2018 -0700 -+++ b/src/java.base/share/classes/java/time/zone/TzdbZoneRulesProvider.java Fri Jun 29 08:23:40 2018 +0200 -@@ -74,6 +74,7 @@ - import java.util.List; - import java.util.Map; - import java.util.NavigableMap; -+import java.util.Properties; - import java.util.Set; - import java.util.TreeMap; - import java.util.concurrent.ConcurrentHashMap; -@@ -106,7 +107,14 @@ - */ - public TzdbZoneRulesProvider() { - try { -- String libDir = StaticProperty.javaHome() + File.separator + "lib"; -+ final String homeDir = StaticProperty.javaHome(); -+ if (homeDir == null) { -+ throw new Error("java.home is not set"); -+ } -+ String libDir = homeDir + File.separator + "lib"; -+ String otherDir = getZoneInfoDir(homeDir); -+ if (otherDir != null) -+ libDir = otherDir; - try (DataInputStream dis = new DataInputStream( - new BufferedInputStream(new FileInputStream( - new File(libDir, "tzdb.dat"))))) { -@@ -117,6 +125,28 @@ - } - } - -+ private static String getZoneInfoDir(final String homeDir) { -+ try { -+ File f = new File(homeDir + File.separator + "conf" + -+ File.separator + "tz.properties"); -+ if (!f.exists()) -+ return null; -+ BufferedInputStream bin = new BufferedInputStream(new FileInputStream(f)); -+ Properties props = new Properties(); -+ props.load(bin); -+ bin.close(); -+ String dir = props.getProperty("sun.zoneinfo.dir"); -+ if (dir == null) -+ return null; -+ File tzdbdat = new File(dir, "tzdb.dat"); -+ if (tzdbdat.exists()) -+ return dir; -+ return null; -+ } catch (Exception x) { -+ return null; -+ } -+ } -+ - @Override - protected Set provideZoneIds() { - return new HashSet<>(regionIds); ---- a/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java Thu Jun 28 17:49:13 2018 -0700 -+++ b/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java Fri Jun 29 08:23:40 2018 +0200 -@@ -45,6 +45,7 @@ - import java.util.List; - import java.util.Locale; - import java.util.Map; -+import java.util.Properties; - import java.util.SimpleTimeZone; - import java.util.concurrent.ConcurrentHashMap; - import java.util.zip.CRC32; -@@ -252,7 +253,15 @@ - AccessController.doPrivileged(new PrivilegedAction() { - public Void run() { - try { -- String libDir = StaticProperty.javaHome() + File.separator + "lib"; -+ final String homeDir = StaticProperty.javaHome(); -+ if (homeDir == null) { -+ throw new Error("java.home is not set"); -+ } -+ String libDir = homeDir + File.separator + "lib"; -+ String otherDir = getZoneInfoDir(homeDir); -+ if (otherDir != null) -+ libDir = otherDir; -+ - try (DataInputStream dis = new DataInputStream( - new BufferedInputStream(new FileInputStream( - new File(libDir, "tzdb.dat"))))) { -@@ -266,6 +275,28 @@ - }); - } - -+ private static String getZoneInfoDir(final String homeDir) { -+ try { -+ File f = new File(homeDir + File.separator + "conf" + -+ File.separator + "tz.properties"); -+ if (!f.exists()) -+ return null; -+ BufferedInputStream bin = new BufferedInputStream(new FileInputStream(f)); -+ Properties props = new Properties(); -+ props.load(bin); -+ bin.close(); -+ String dir = props.getProperty("sun.zoneinfo.dir"); -+ if (dir == null) -+ return null; -+ File tzdbdat = new File(dir, "tzdb.dat"); -+ if (tzdbdat.exists()) -+ return dir; -+ return null; -+ } catch (Exception x) { -+ return null; -+ } -+ } -+ - private static void addOldMapping() { - for (String[] alias : oldMappings) { - aliases.put(alias[0], alias[1]); diff --git a/java-17-openjdk.changes b/java-17-openjdk.changes index 5d2dc04..cea2330 100644 --- a/java-17-openjdk.changes +++ b/java-17-openjdk.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Mar 7 12:44:28 UTC 2024 - Fridrich Strba + +- Removed patch: + * alternative-tzdb_dat.patch + + Remove the possibility to use the system timezone-java. It + creates more problems then it solves (bsc#1213470) + ------------------------------------------------------------------- Tue Feb 20 15:41:01 UTC 2024 - Fridrich Strba diff --git a/java-17-openjdk.spec b/java-17-openjdk.spec index 6ddc7a4..1a8d4ae 100644 --- a/java-17-openjdk.spec +++ b/java-17-openjdk.spec @@ -177,8 +177,7 @@ Patch200: ppc_stack_overflow_fix.patch Patch300: JDK-8282944.patch Patch301: JDK-8303509.patch Patch302: disable-doclint-by-default.patch -Patch303: alternative-tzdb_dat.patch -Patch304: unsigned-sni-server-name.patch +Patch303: unsigned-sni-server-name.patch # BuildRequires: alsa-lib-devel BuildRequires: autoconf @@ -288,7 +287,6 @@ Requires(posttrans): java-ca-certificates # Postun requires update-alternatives to uninstall tool update-alternatives. Requires(postun): update-alternatives Recommends: mozilla-nss-sysinit -Recommends: tzdata-java8 Obsoletes: %{name}-accessibility %if 0%{?suse_version} > 1315 || 0%{?java_bootstrap} # Standard JPackage base provides. @@ -422,7 +420,6 @@ rm -rvf src/java.desktop/share/native/liblcms/lcms2* %patch -P 301 -p1 %patch -P 302 -p1 %patch -P 303 -p1 -%patch -P 304 -p1 # Extract systemtap tapsets @@ -522,9 +519,6 @@ popd >& /dev/null export JAVA_HOME=$(pwd)/%{buildoutputdir}/%{imagesdir}/jdk -# Copy tz.properties -echo "sun.zoneinfo.dir=%{_datadir}/javazi" >> $JAVA_HOME/conf/tz.properties - # cacerts are generated in runtime in openSUSE if [ -f %{buildoutputdir}/%{imagesdir}/jdk/lib/security/cacerts ]; then rm %{buildoutputdir}/%{imagesdir}/jdk/lib/security/cacerts @@ -900,7 +894,6 @@ fi %{_jvmdir}/%{sdkdir}/conf/security/policy/unlimited/default_local.policy %{_jvmdir}/%{sdkdir}/conf/security/policy/unlimited/default_US_export.policy %{_jvmdir}/%{sdkdir}/conf/sound.properties -%{_jvmdir}/%{sdkdir}/conf/tz.properties %{_jvmdir}/%{sdkdir}/lib/desktop/jconsole.desktop %{_jvmdir}/%{sdkdir}/lib/jexec %{_jvmdir}/%{sdkdir}/lib/jfr/default.jfc