From 360cfd8b1267960d8ec7a2cd4fa27be4e5cc105c Mon Sep 17 00:00:00 2001 From: Patsy Griffin Date: Tue, 16 Apr 2024 18:07:06 -0400 Subject: [PATCH] Resolves: RHEL-32178 - Add java patch to fix incorrect calculations for Africa/Casablanca starting in 2027. (RHEL-32178) - Remove hardcoded versioned path to javac. --- JDK-8051641.patch | 29 +++++++++++++++++++++++++++++ tzdata.spec | 11 +++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 JDK-8051641.patch diff --git a/JDK-8051641.patch b/JDK-8051641.patch new file mode 100644 index 0000000..e55cb5f --- /dev/null +++ b/JDK-8051641.patch @@ -0,0 +1,29 @@ +# HG changeset patch +# User aefimov +# Date 1419878542 -10800 +# Mon Dec 29 21:42:22 2014 +0300 +# Node ID 189490f29d1e335a2b7d162a0260d961a729652c +# Parent c8a71253d6e291112e62551b8dfc859e15dd9503 +# https://hg.openjdk.org/jdk8u/jdk8u-dev/jdk/rev/189490f29d1e + +# 8051641: Africa/Casablanca transitions is incorrectly calculated starting from 2027 + +# Reviewed-by: sherman + +diff -r c8a71253d6e2 -r 189490f29d1e make/src/classes/build/tools/tzdb/ZoneRulesBuilder.java +--- javazic-1.8/build/tools/tzdb/ZoneRulesBuilder.java Thu Oct 23 11:42:20 2014 +0200 ++++ javazic-1.8/build/tools/tzdb/ZoneRulesBuilder.java Mon Dec 29 21:42:22 2014 +0300 +@@ -491,10 +491,10 @@ + TZRule rule = new TZRule(year, month, dayOfMonthIndicator, dayOfWeek, time, timeEndOfDay, timeDefinition, savingAmountSecs); + if (lastRule) { + lastRuleList.add(rule); +- maxLastRuleStartYear = Math.max(startYear, maxLastRuleStartYear); + } else { + ruleList.add(rule); + } ++ maxLastRuleStartYear = Math.max(startYear, maxLastRuleStartYear); + year++; + } + } +-- +cgit v0.9.2 diff --git a/tzdata.spec b/tzdata.spec index c59ae67..6495eca 100644 --- a/tzdata.spec +++ b/tzdata.spec @@ -3,7 +3,7 @@ Name: tzdata Version: 2024a %define tzdata_version 2024a %define tzcode_version 2024a -Release: 2%{?dist} +Release: 3%{?dist} License: LicenseRef-Fedora-Public-Domain AND (GPL-2.0-only WITH ClassPath-exception-2.0) URL: https://www.iana.org/time-zones Source0: ftp://ftp.iana.org/tz/releases/tzdata%{tzdata_version}.tar.gz @@ -27,6 +27,7 @@ the world. %package java Summary: Timezone data for Java Source3: javazic-1.8-37392f2f5d59.tar.xz +Patch100: JDK-8051641.patch %description java This package contains timezone information for use by Java runtimes. @@ -54,6 +55,7 @@ tar zxf rearguard/tzdata%{version}-rearguard.tar.gz %endif tar xf %{SOURCE3} +%patch -P 100 echo "%{name}%{tzdata_version}" >> VERSION @@ -84,7 +86,7 @@ JAVA_FILES="rearguard/africa rearguard/antarctica rearguard/asia \ # Java 8 tzdata pushd javazic-1.8 -/usr/lib/jvm/java-17-openjdk/bin/javac -source 1.8 -target 1.8 -classpath . `find . -name \*.java` +javac -source 1.8 -target 1.8 -classpath . `find . -name \*.java` popd java -classpath javazic-1.8 build.tools.tzdb.TzdbZoneRulesCompiler \ @@ -112,6 +114,11 @@ install -p -m 644 tzdb.dat $RPM_BUILD_ROOT%{_datadir}/javazi-1.8/ %{_datadir}/javazi-1.8 %changelog +* Thu Apr 18 2024 Patsy Griffin - 2024a-3 +- Add java patch to fix incorrect calculations for + Africa/Casablanca starting in 2027. (RHEL-32178) +- Remove hardcoded versioned path to javac. + * Tue Feb 06 2024 Patsy Griffin - 2024a-2 - Correct the bz# for the tzdata-2024 commit.