Resolves: RHEL-32178

- Add java patch to fix incorrect calculations for
  Africa/Casablanca starting in 2027. (RHEL-32178)
- Remove hardcoded versioned path to javac.
This commit is contained in:
Patsy Griffin 2024-04-16 18:07:06 -04:00
parent 3fae85033b
commit 360cfd8b12
2 changed files with 38 additions and 2 deletions

29
JDK-8051641.patch Normal file
View File

@ -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

View File

@ -3,7 +3,7 @@ Name: tzdata
Version: 2024a Version: 2024a
%define tzdata_version 2024a %define tzdata_version 2024a
%define tzcode_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) License: LicenseRef-Fedora-Public-Domain AND (GPL-2.0-only WITH ClassPath-exception-2.0)
URL: https://www.iana.org/time-zones URL: https://www.iana.org/time-zones
Source0: ftp://ftp.iana.org/tz/releases/tzdata%{tzdata_version}.tar.gz Source0: ftp://ftp.iana.org/tz/releases/tzdata%{tzdata_version}.tar.gz
@ -27,6 +27,7 @@ the world.
%package java %package java
Summary: Timezone data for Java Summary: Timezone data for Java
Source3: javazic-1.8-37392f2f5d59.tar.xz Source3: javazic-1.8-37392f2f5d59.tar.xz
Patch100: JDK-8051641.patch
%description java %description java
This package contains timezone information for use by Java runtimes. This package contains timezone information for use by Java runtimes.
@ -54,6 +55,7 @@ tar zxf rearguard/tzdata%{version}-rearguard.tar.gz
%endif %endif
tar xf %{SOURCE3} tar xf %{SOURCE3}
%patch -P 100
echo "%{name}%{tzdata_version}" >> VERSION echo "%{name}%{tzdata_version}" >> VERSION
@ -84,7 +86,7 @@ JAVA_FILES="rearguard/africa rearguard/antarctica rearguard/asia \
# Java 8 tzdata # Java 8 tzdata
pushd javazic-1.8 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 popd
java -classpath javazic-1.8 build.tools.tzdb.TzdbZoneRulesCompiler \ 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 %{_datadir}/javazi-1.8
%changelog %changelog
* Thu Apr 18 2024 Patsy Griffin <patsy@redhat.com> - 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 <patsy@redhat.com> - 2024a-2 * Tue Feb 06 2024 Patsy Griffin <patsy@redhat.com> - 2024a-2
- Correct the bz# for the tzdata-2024 commit. - Correct the bz# for the tzdata-2024 commit.