Compare commits
No commits in common. "c8-beta" and "c8" have entirely different histories.
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
SOURCES/javazic-1.8-37392f2f5d59.tar.xz
|
SOURCES/javazic-1.8-37392f2f5d59.tar.xz
|
||||||
SOURCES/javazic.tar.gz
|
SOURCES/javazic.tar.gz
|
||||||
SOURCES/tzcode2022g.tar.gz
|
SOURCES/tzcode2025a.tar.gz
|
||||||
SOURCES/tzdata2022g.tar.gz
|
SOURCES/tzdata2025a.tar.gz
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
77292e1839952807567570118e01405b405af80c SOURCES/javazic-1.8-37392f2f5d59.tar.xz
|
77292e1839952807567570118e01405b405af80c SOURCES/javazic-1.8-37392f2f5d59.tar.xz
|
||||||
ee8ad215161cd132e65e2be447b279457158b540 SOURCES/javazic.tar.gz
|
ee8ad215161cd132e65e2be447b279457158b540 SOURCES/javazic.tar.gz
|
||||||
ffcae61ec6a0b703deb7c5dba497577eae018cd5 SOURCES/tzcode2022g.tar.gz
|
31e24f86fda44de2409c8d49708c2145f1ed8030 SOURCES/tzcode2025a.tar.gz
|
||||||
f28562b04f3a26c4a01b295efce86a5d378ea9af SOURCES/tzdata2022g.tar.gz
|
e5b9eeb4388c91e462447cafb342d6584243f546 SOURCES/tzdata2025a.tar.gz
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
diff -Nrup a/Makefile b/Makefile
|
|
||||||
--- a/Makefile 2017-10-23 18:03:40.237177646 -0400
|
|
||||||
+++ b/Makefile 2017-10-23 18:06:20.060683518 -0400
|
|
||||||
@@ -292,7 +292,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fn
|
|
||||||
# January's first Monday when a "%V" format is used and January 1
|
|
||||||
# falls on a Friday, Saturday, or Sunday.
|
|
||||||
|
|
||||||
-CFLAGS=
|
|
||||||
+CFLAGS= -DHAVE_SNPRINTF=1
|
|
||||||
|
|
||||||
# Linker flags. Default to $(LFLAGS) for backwards compatibility
|
|
||||||
# to release 2012h and earlier.
|
|
12
SOURCES/0002-Fix-have-snprintf.patch
Normal file
12
SOURCES/0002-Fix-have-snprintf.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -Nrup a/Makefile b/Makefile
|
||||||
|
--- a/Makefile 2024-01-01 17:57:30.112884304 -0500
|
||||||
|
+++ b/Makefile 2024-01-01 17:59:33.641497622 -0500
|
||||||
|
@@ -423,6 +423,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fn
|
||||||
|
# Uncomment the following line and edit its contents as needed.
|
||||||
|
|
||||||
|
#CFLAGS= -O 1
|
||||||
|
+CFLAGS= -DHAVE_SNPRINTF=1
|
||||||
|
|
||||||
|
|
||||||
|
# The name of a POSIX-like library archiver, its flags, C compiler,
|
||||||
|
Binary files a/tzdata2023d-rearguard.tar.gz and b/tzdata2023d-rearguard.tar.gz differ
|
@ -1,7 +1,7 @@
|
|||||||
diff -Nrup a/Makefile b/Makefile
|
diff -Nrup a/Makefile b/Makefile
|
||||||
--- a/Makefile 2020-10-13 15:58:12.000000000 -0400
|
--- a/Makefile 2023-03-22 17:41:49.069789592 -0400
|
||||||
+++ b/Makefile 2020-10-13 16:03:09.461302282 -0400
|
+++ b/Makefile 2023-03-22 17:44:07.528427093 -0400
|
||||||
@@ -60,7 +60,7 @@ LOCALTIME= GMT
|
@@ -52,7 +52,7 @@ LOCALTIME= Factory
|
||||||
# make zonenames
|
# make zonenames
|
||||||
# to get a list of the values you can use for POSIXRULES.
|
# to get a list of the values you can use for POSIXRULES.
|
||||||
|
|
||||||
@ -9,5 +9,5 @@ diff -Nrup a/Makefile b/Makefile
|
|||||||
+POSIXRULES= America/New_York
|
+POSIXRULES= America/New_York
|
||||||
|
|
||||||
# Also see TZDEFRULESTRING below, which takes effect only
|
# Also see TZDEFRULESTRING below, which takes effect only
|
||||||
# if the time zone files cannot be accessed.
|
# if POSIXRULES is '-' or if the template file cannot be accessed.
|
||||||
Binary files a/tzdata2020b-rearguard.tar.gz and b/tzdata2020b-rearguard.tar.gz differ
|
Binary files a/tzdata2023a-rearguard.tar.gz and b/tzdata2023a-rearguard.tar.gz differ
|
||||||
|
42
SOURCES/ZoneTest.java
Normal file
42
SOURCES/ZoneTest.java
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/* Smoke test to ensure that tzdb.data can be loaded.
|
||||||
|
Copyright (c) 2024 Red Hat, Inc.
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
|
||||||
|
import java.time.zone.ZoneRulesProvider;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.GregorianCalendar;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.TimeZone;
|
||||||
|
|
||||||
|
public class ZoneTest {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
// This is what failed in OpenJDK's build.tools.cldrconverter.
|
||||||
|
new GregorianCalendar(TimeZone.getTimeZone("America/Los_Angeles"),
|
||||||
|
Locale.US).get(Calendar.YEAR);
|
||||||
|
|
||||||
|
// In some OpenJDK versions, this exercises a different parser.
|
||||||
|
Set<String> available = ZoneRulesProvider.getAvailableZoneIds();
|
||||||
|
boolean errors = false;
|
||||||
|
if (available.contains("ROC"))
|
||||||
|
System.out.println("error: ROC zone is present");
|
||||||
|
if (!available.contains("America/New_York"))
|
||||||
|
System.out.println("error: America/New_York is missing");
|
||||||
|
if (errors)
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
86
SOURCES/javazic-harden-links.patch
Normal file
86
SOURCES/javazic-harden-links.patch
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
Modified for downstream inclusion in tzdata-java.
|
||||||
|
|
||||||
|
commit 1bc13a1c10a580f84f1b7686c95344ec2633f611
|
||||||
|
Author: Florian Weimer <fweimer@openjdk.org>
|
||||||
|
Date: Thu Sep 26 22:37:45 2024 +0000
|
||||||
|
|
||||||
|
8340552: Harden TzdbZoneRulesCompiler against missing zone names
|
||||||
|
|
||||||
|
Reviewed-by: andrew, jlu, naoto
|
||||||
|
|
||||||
|
diff -ur tzdata-2024b.orig/javazic-1.8/build/tools/tzdb/TzdbZoneRulesCompiler.java tzdata-2024b/javazic-1.8/build/tools/tzdb/TzdbZoneRulesCompiler.java
|
||||||
|
--- tzdata-2024b.orig/javazic-1.8/build/tools/tzdb/TzdbZoneRulesCompiler.java 2014-04-22 19:46:49.000000000 +0200
|
||||||
|
+++ tzdata-2024b/javazic-1.8/build/tools/tzdb/TzdbZoneRulesCompiler.java 2024-09-20 21:10:12.748483767 +0200
|
||||||
|
@@ -248,7 +248,7 @@
|
||||||
|
// link version-region-rules
|
||||||
|
out.writeShort(builtZones.size());
|
||||||
|
for (Map.Entry<String, ZoneRules> entry : builtZones.entrySet()) {
|
||||||
|
- int regionIndex = Arrays.binarySearch(regionArray, entry.getKey());
|
||||||
|
+ int regionIndex = findRegionIndex(regionArray, entry.getKey());
|
||||||
|
int rulesIndex = rulesList.indexOf(entry.getValue());
|
||||||
|
out.writeShort(regionIndex);
|
||||||
|
out.writeShort(rulesIndex);
|
||||||
|
@@ -256,8 +256,8 @@
|
||||||
|
// alias-region
|
||||||
|
out.writeShort(links.size());
|
||||||
|
for (Map.Entry<String, String> entry : links.entrySet()) {
|
||||||
|
- int aliasIndex = Arrays.binarySearch(regionArray, entry.getKey());
|
||||||
|
- int regionIndex = Arrays.binarySearch(regionArray, entry.getValue());
|
||||||
|
+ int aliasIndex = findRegionIndex(regionArray, entry.getKey());
|
||||||
|
+ int regionIndex = findRegionIndex(regionArray, entry.getValue());
|
||||||
|
out.writeShort(aliasIndex);
|
||||||
|
out.writeShort(regionIndex);
|
||||||
|
}
|
||||||
|
@@ -269,6 +269,14 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ private static int findRegionIndex(String[] regionArray, String region) {
|
||||||
|
+ int index = Arrays.binarySearch(regionArray, region);
|
||||||
|
+ if (index < 0) {
|
||||||
|
+ throw new IllegalArgumentException("Unknown region: " + region);
|
||||||
|
+ }
|
||||||
|
+ return index;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
private static final Pattern YEAR = Pattern.compile("(?i)(?<min>min)|(?<max>max)|(?<only>only)|(?<year>[0-9]+)");
|
||||||
|
private static final Pattern MONTH = Pattern.compile("(?i)(jan)|(feb)|(mar)|(apr)|(may)|(jun)|(jul)|(aug)|(sep)|(oct)|(nov)|(dec)");
|
||||||
|
private static final Matcher DOW = Pattern.compile("(?i)(mon)|(tue)|(wed)|(thu)|(fri)|(sat)|(sun)").matcher("");
|
||||||
|
@@ -607,22 +615,20 @@
|
||||||
|
}
|
||||||
|
builtZones.put(aliasId, realRules);
|
||||||
|
}
|
||||||
|
- // remove UTC and GMT
|
||||||
|
- // builtZones.remove("UTC");
|
||||||
|
- // builtZones.remove("GMT");
|
||||||
|
- // builtZones.remove("GMT0");
|
||||||
|
- builtZones.remove("GMT+0");
|
||||||
|
- builtZones.remove("GMT-0");
|
||||||
|
- links.remove("GMT+0");
|
||||||
|
- links.remove("GMT-0");
|
||||||
|
- // remove ROC, which is not supported in j.u.tz
|
||||||
|
- builtZones.remove("ROC");
|
||||||
|
- links.remove("ROC");
|
||||||
|
- // remove EST, HST and MST. They are supported via
|
||||||
|
- // the short-id mapping
|
||||||
|
- builtZones.remove("EST");
|
||||||
|
- builtZones.remove("HST");
|
||||||
|
- builtZones.remove("MST");
|
||||||
|
+
|
||||||
|
+ List<String> zonesToRemove = Arrays.asList(
|
||||||
|
+ // remove UTC and GMT
|
||||||
|
+ "GMT+0",
|
||||||
|
+ "GMT-0",
|
||||||
|
+ // remove ROC, which is not supported in j.u.tz
|
||||||
|
+ "ROC",
|
||||||
|
+ // remove EST, HST and MST. They are supported via
|
||||||
|
+ // the short-id mapping
|
||||||
|
+ "EST",
|
||||||
|
+ "HST",
|
||||||
|
+ "MST");
|
||||||
|
+ builtZones.keySet().removeAll(zonesToRemove);
|
||||||
|
+ links.keySet().removeAll(zonesToRemove);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
@ -1,20 +1,22 @@
|
|||||||
Summary: Timezone data
|
Summary: Timezone data
|
||||||
Name: tzdata
|
Name: tzdata
|
||||||
Version: 2022g
|
Version: 2025a
|
||||||
%define tzdata_version 2022g
|
%define tzdata_version 2025a
|
||||||
%define tzcode_version 2022g
|
%define tzcode_version 2025a
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
License: Public Domain
|
License: Public Domain
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
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
|
||||||
Source1: ftp://ftp.iana.org/tz/releases/tzcode%{tzcode_version}.tar.gz
|
Source1: ftp://ftp.iana.org/tz/releases/tzcode%{tzcode_version}.tar.gz
|
||||||
|
|
||||||
Patch002: 0002-Fix-have-snprintf-error.patch
|
Patch002: 0002-Fix-have-snprintf.patch
|
||||||
Patch003: 0003-continue-to-ship-posixrules.patch
|
Patch003: 0003-continue-to-ship-posixrules.patch
|
||||||
|
|
||||||
BuildRequires: gawk, glibc, perl-interpreter
|
BuildRequires: gawk, glibc, perl-interpreter
|
||||||
BuildRequires: java-devel
|
BuildRequires: java-devel
|
||||||
|
BuildRequires: make
|
||||||
|
BuildRequires: gcc
|
||||||
BuildRequires: glibc-common >= 2.5.90-7
|
BuildRequires: glibc-common >= 2.5.90-7
|
||||||
Conflicts: glibc-common <= 2.3.2-63
|
Conflicts: glibc-common <= 2.3.2-63
|
||||||
BuildArchitectures: noarch
|
BuildArchitectures: noarch
|
||||||
@ -28,12 +30,14 @@ Summary: Timezone data for Java
|
|||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Source3: javazic.tar.gz
|
Source3: javazic.tar.gz
|
||||||
Source4: javazic-1.8-37392f2f5d59.tar.xz
|
Source4: javazic-1.8-37392f2f5d59.tar.xz
|
||||||
|
Source5: ZoneTest.java
|
||||||
Patch100: javazic-fixup.patch
|
Patch100: javazic-fixup.patch
|
||||||
Patch101: rebase-01.patch
|
Patch101: rebase-01.patch
|
||||||
Patch102: rebase-02.patch
|
Patch102: rebase-02.patch
|
||||||
Patch103: 7090844.patch
|
Patch103: 7090844.patch
|
||||||
Patch104: 7133138.patch
|
Patch104: 7133138.patch
|
||||||
Patch105: 8051641.patch
|
Patch105: 8051641.patch
|
||||||
|
Patch106: javazic-harden-links.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.
|
||||||
@ -86,6 +90,7 @@ popd
|
|||||||
|
|
||||||
tar xf %{SOURCE4}
|
tar xf %{SOURCE4}
|
||||||
%patch105
|
%patch105
|
||||||
|
%patch106 -p1
|
||||||
|
|
||||||
echo "%{name}%{tzdata_version}" >> VERSION
|
echo "%{name}%{tzdata_version}" >> VERSION
|
||||||
|
|
||||||
@ -132,6 +137,20 @@ install -p -m 644 tzdb.dat $RPM_BUILD_ROOT%{_datadir}/javazi-1.8/
|
|||||||
%check
|
%check
|
||||||
echo ============TESTING===============
|
echo ============TESTING===============
|
||||||
/usr/bin/env LANG=C make -k VALIDATE=':' check && true
|
/usr/bin/env LANG=C make -k VALIDATE=':' check && true
|
||||||
|
|
||||||
|
# Create a custom JAVA_HOME, where we can replace tzdb.dat with the
|
||||||
|
# one just built, for testing.
|
||||||
|
system_java_home=$(dirname $(readlink -f $(which java)))/..
|
||||||
|
mkdir -p java_home
|
||||||
|
cp -Lr $system_java_home/* java_home/.
|
||||||
|
for tzdb in $(find java_home -name tzdb.dat) ; do
|
||||||
|
rm $tzdb
|
||||||
|
cp $RPM_BUILD_ROOT%{_datadir}/javazi-1.8/tzdb.dat $tzdb
|
||||||
|
done
|
||||||
|
# Compile the smoke test and run it.
|
||||||
|
cp %{SOURCE5} .
|
||||||
|
javac ZoneTest.java
|
||||||
|
java_home/bin/java ZoneTest
|
||||||
echo ============END TESTING===========
|
echo ============END TESTING===========
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -149,6 +168,64 @@ echo ============END TESTING===========
|
|||||||
%{_datadir}/javazi-1.8
|
%{_datadir}/javazi-1.8
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 21 2025 Patsy Griffin <pats@redhat.com> - 2025a-1
|
||||||
|
Update to tzdata-2025a (RHEL-74309)
|
||||||
|
- Paraguay is now permanently at -03. This impacts timestamps
|
||||||
|
starting on 2025-03-22.
|
||||||
|
- Includes improvements to pre-1991 data for the Philippines.
|
||||||
|
- Etc/Unknown is now reserved.
|
||||||
|
|
||||||
|
* Wed Oct 09 2024 Patsy Griffin <patsy@redhat.com> - 2024b-4
|
||||||
|
- Bump release and rebuild to fix a build issue.
|
||||||
|
|
||||||
|
* Thu Oct 03 2024 Patsy Griffin <patsy@redhat.com> - 2024b-3
|
||||||
|
- Add copyright, patch attribution and build dependencies for
|
||||||
|
the previous commit. (RHEL-59542)
|
||||||
|
|
||||||
|
* Fri Sep 20 2024 Florian Weimer <fweimer@redhat.com> - 2024b-2
|
||||||
|
- Harden against links to removed zones (RHEL-59542)
|
||||||
|
|
||||||
|
* Wed Sep 11 2024 Patsy Griffin <patsy@redhat.com> - 2024b-1
|
||||||
|
- Update to tzdata-2024b
|
||||||
|
- Improve historical data for Mexico, Mongolia, and Portugal.
|
||||||
|
- System V names are now obsolescent.
|
||||||
|
- The main data form now uses %z.
|
||||||
|
- The code now conforms to RFC 8536 for early timestamps.
|
||||||
|
- Support POSIX.1-2024, which removes asctime_r and ctime_r.
|
||||||
|
- Assume POSIX.2-1992 or later for shell scripts.
|
||||||
|
- SUPPORT_C89 now defaults to 1.
|
||||||
|
- Include two upstream patches for month names as in April vs Apr.
|
||||||
|
|
||||||
|
* Thu Feb 01 2024 Patsy Griffin <patsy@redhat.com> - 2024a-1
|
||||||
|
- Rebase to tzdata-2024a
|
||||||
|
- Kazakhstan will transition from UTC+6 to UTC+5 on 2024-03-01.
|
||||||
|
- Palestine will spring forward a week later than previously
|
||||||
|
predicted.
|
||||||
|
|
||||||
|
* Mon Jan 01 2024 Patsy Griffin <patsy@redhat.com> - 2023d-1
|
||||||
|
- Rebase to tzdata-2023d
|
||||||
|
- Include time zone changes for Ittoqqortoormiit, Greenland
|
||||||
|
and Vostok, Antarctica.
|
||||||
|
- Update the expiration date for the leap-seconds.list file.
|
||||||
|
No new leap seconds were added.
|
||||||
|
|
||||||
|
* Mon Aug 21 2023 Patsy Griffin <patsy@redhat.com> - 2023c-2
|
||||||
|
- Bump release to test recent process changes. (RHEL-1326)
|
||||||
|
|
||||||
|
* Tue Mar 28 2023 Patsy Griffin <patsy@redhat.com> - 2023c-1
|
||||||
|
- Rebase to tzdata-2023c
|
||||||
|
- Lebanon reversed the change added in tzdata-2023b.
|
||||||
|
|
||||||
|
* Fri Mar 24 2023 Patsy Griffin <patsy@redhat.com> - 2023b-1
|
||||||
|
- Rebase to tzdata-2023b
|
||||||
|
- Lebanon will transition to DST on April 20/21, not March 25/26.
|
||||||
|
|
||||||
|
* Wed Mar 22 2023 Patsy Griffin <patsy@redhat.com> - 2023a-1
|
||||||
|
- Rebase to tzdata-2023a
|
||||||
|
- Egypt reintroduced DST, from April through October.
|
||||||
|
- Morocco springs forward April 23, not April 30.
|
||||||
|
- Palestine delayed the start of DST this year.
|
||||||
|
|
||||||
* Fri Jan 6 2023 Patsy Griffin <patsy@redhat.com> - 2022g-2
|
* Fri Jan 6 2023 Patsy Griffin <patsy@redhat.com> - 2022g-2
|
||||||
- Include leap-seconds.list in tzdata install. (#2154109)
|
- Include leap-seconds.list in tzdata install. (#2154109)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user