Compare commits

...

No commits in common. "c8" and "c9" have entirely different histories.
c8 ... c9

2 changed files with 117 additions and 85 deletions

View File

@ -5,7 +5,7 @@ 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

View File

@ -3,22 +3,23 @@ Name: tzdata
Version: 2024b
%define tzdata_version 2024b
%define tzcode_version 2024b
Release: 4%{?dist}
Release: 2%{?dist}
License: Public Domain
Group: System Environment/Base
URL: https://www.iana.org/time-zones
Source0: ftp://ftp.iana.org/tz/releases/tzdata%{tzdata_version}.tar.gz
Source1: ftp://ftp.iana.org/tz/releases/tzcode%{tzcode_version}.tar.gz
Patch002: 0002-Fix-have-snprintf.patch
%if 0%{?rhel} || 0%{?eln}
Patch003: 0003-continue-to-ship-posixrules.patch
%endif
Patch004: 0004-Fix-Apr-vs-April-2024b.patch
Patch005: 0005-Improve-style-checks-for-months-2024b.patch
BuildRequires: gawk, glibc, perl-interpreter
BuildRequires: java-devel
BuildRequires: make
BuildRequires: gcc
BuildRequires: gawk, glibc, perl-interpreter
BuildRequires: java-devel
BuildRequires: glibc-common >= 2.5.90-7
Conflicts: glibc-common <= 2.3.2-63
BuildArchitectures: noarch
@ -29,7 +30,6 @@ the world.
%package java
Summary: Timezone data for Java
Group: System Environment/Base
Source3: javazic.tar.gz
Source4: javazic-1.8-37392f2f5d59.tar.xz
Source5: ZoneTest.java
@ -48,28 +48,25 @@ This package contains timezone information for use by Java runtimes.
%setup -q -c -a 1
%patch002 -p1
%if 0%{?rhel} || 0%{?eln}
%patch003 -p1
%endif
%patch004 -p1
%patch005 -p1
# Currently tzdata is providing the "rearguard" data set for maximum
# compatibility with existing Red Hat Enterprise Linux installs. Future releases of
# Red Hat Enterprise Linux will be transitioning to the default or "vanguard" tzdata
# data set.
#
# The "rearguard" and "vanguard" data sets are defined by the upstream tzdata project
# and represent approximately the same data, with "vanguard" optimized for newer time
# zone data tooling, and "rearguard" optimized for compatibility with existing tooling.
# For example "vanguard" implements support for negative DST offsets, while "rearguard"
# supports the traditional format.
# Create the reargard data files.
# tzdata-2018g introduced 25:00 transition times. This breaks OpenJDK.
# Use rearguard for java
mkdir rearguard
make VERSION=%{version} tzdata%{version}-rearguard.tar.gz
mv tzdata%{version}-rearguard.tar.gz rearguard
pushd rearguard
tar zxf tzdata%{version}-rearguard.tar.gz
popd
# Run make to re-create the tzdata.zi file for rearguard format
rm tzdata.zi
make VERSION=%{version} DATAFORM=rearguard tzdata.zi
%if 0%{?rhel} || 0%{?eln}
# Use rearguard for rhel (overwrite default vangaurd data)
tar zxf rearguard/tzdata%{version}-rearguard.tar.gz
%endif
mkdir javazic
tar zxf %{SOURCE3} -C javazic
@ -99,9 +96,16 @@ tar xf %{SOURCE4}
echo "%{name}%{tzdata_version}" >> VERSION
%build
# Run make to create the tzdata.zi file
rm tzdata.zi
%if 0%{?rhel} || 0%{?eln}
make VERSION=%{version} DATAFORM=rearguard tzdata.zi
%else
make tzdata.zi
%endif
FILES="africa antarctica asia australasia europe northamerica southamerica
pacificnew etcetera backward"
etcetera backward factory"
mkdir zoneinfo/{,posix,right}
zic -y ./yearistype -d zoneinfo -L /dev/null -p America/New_York $FILES
@ -110,24 +114,30 @@ zic -y ./yearistype -d zoneinfo/right -L leapseconds $FILES
# grep -v tz-art.htm tz-link.htm > tz-link.html
# tzdata-2018g introduced 25:00 which breaks java - use the rearguard files for java
JAVA_FILES="rearguard/africa rearguard/antarctica rearguard/asia \
rearguard/australasia rearguard/europe rearguard/northamerica \
rearguard/southamerica rearguard/etcetera \
rearguard/backward"
# Java 6/7 tzdata
pushd javazic
javac -source 1.5 -target 1.5 -classpath . `find . -name \*.java`
javac -source 1.6 -target 1.6 -classpath . `find . -name \*.java`
popd
java -classpath javazic/ rht.tools.javazic.Main -V %{version} \
-d javazi \
$FILES javazic/tzdata_jdk/gmt javazic/tzdata_jdk/jdk11_backward
$JAVA_FILES javazic/tzdata_jdk/gmt javazic/tzdata_jdk/jdk11_backward
# Java 8 tzdata
pushd javazic-1.8
javac -source 1.7 -target 1.7 -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 \
-srcdir . -dstfile tzdb.dat \
-verbose \
$FILES javazic-1.8/tzdata_jdk/gmt javazic-1.8/tzdata_jdk/jdk11_backward
$JAVA_FILES javazic-1.8/tzdata_jdk/gmt javazic-1.8/tzdata_jdk/jdk11_backward
%install
rm -fr $RPM_BUILD_ROOT
@ -158,7 +168,6 @@ java_home/bin/java ZoneTest
echo ============END TESTING===========
%files
%defattr(-,root,root)
%{_datadir}/zoneinfo
%license LICENSE
%doc README
@ -167,20 +176,12 @@ echo ============END TESTING===========
%doc tz-art.html
%files java
%defattr(-,root,root)
%{_datadir}/javazi
%{_datadir}/javazi-1.8
%changelog
* 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)
* Fri Sep 27 2024 Patsy Griffin <patsy@redhat.com> - 2024b-2
- Harden against links to removed zones (RHEL-60063)
* Wed Sep 11 2024 Patsy Griffin <patsy@redhat.com> - 2024b-1
- Update to tzdata-2024b
@ -193,6 +194,10 @@ echo ============END TESTING===========
- SUPPORT_C89 now defaults to 1.
- Include two upstream patches for month names as in April vs Apr.
* Thu Mar 14 2024 Patsy Griffin <patsy@redhat.com> - 2024a-2
- Add java patch to fix incorrect calculations for
Africa/Casablanca starting in 2027. (RHEL-26860)
* 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.
@ -206,8 +211,8 @@ echo ============END TESTING===========
- 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)
* Thu Aug 17 2023 Patsy Griffin <patsy@redhat.com> - 2023c-2
- Bump release to test recent process changes. (RHEL-1323)
* Tue Mar 28 2023 Patsy Griffin <patsy@redhat.com> - 2023c-1
- Rebase to tzdata-2023c
@ -224,7 +229,7 @@ echo ============END TESTING===========
- Palestine delayed the start of DST this year.
* 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. (#2157982)
* Tue Nov 29 2022 Patsy Griffin <patsy@redhat.com> - 2022g-1
- Rebase to tzdata-2022g
@ -234,48 +239,55 @@ echo ============END TESTING===========
- Added a new Zone America/Ciudad_Juarez that splits from
America/Ojinaga.
* Mon Oct 31 2022 Patsy Griffin <patsy@redhat.com> - 2022f-1
* Wed Nov 02 2022 Patsy Griffin <patsy@redhat.com> - 2022f-1
- Rebase to tzdata-2022f
- Mexico will stop observing DST except near the US border.
- Chihuahua moved to -06 year round starting on 2022-10-30.
- Fiji no longer observes DST.
* Tue Aug 16 2022 Patsy Griffin <patsy@redhat.com> - 2022c-1
* Wed Oct 12 2022 Patsy Griffin <patsy@redhat.com> - 2022e-1
- Rebase to tzdata-2022e
- Jordan and Syria cancelled the DST transition planned
for 2022-10-28, remaining at +03 permanently.
* Mon Sep 26 2022 Patsy Griffin <patsy@redhat.com> - 2022d-1
- Rebase to tzdata-2022d
- Palestine's DST transition will be on October 29, 2022,
not October 28, 2022.
- Europe/Uzhgorod and Europe/Zaporozhye are moved to 'backzone'.
* Wed Aug 17 2022 Patsy Griffin <patsy@redhat.com> - 2022c-1
- Rebase to tzdata-2022c - supersedes tzdata-2022b
- Add a work-around for an awk bug in FreeBSD, macOS, etc.
- Improve tzselect with respect to intercontinental Zones.
* Wed Aug 10 2022 Patsy Griffin <patsy@redhat.com> - 2022b-1
* Mon Aug 15 2022 Patsy Griffin <patsy@redhat.com> - 2022b-1
- Rebase to tzdata-2022b
- Chile transitions to DST on 2022-09-11, not 2022-09-04
- 'make install' now defaults LOCALTIME to Factory rather than GMT
- More zones that are the same since 1970 have been moved to backzone.
- Include patch for awk workaround.
* Tue Apr 5 2022 Patsy Griffin <patsy@redhat.com> - 2022a-2
- Update the release for rebuild.
* Fri Apr 1 2022 Patsy Griffin <patsy@redhat.com> - 2022a-1
* Thu Apr 14 2022 Patsy Griffin <patsy@redhat.com> - 2022a-1
- Rebase to tzdata-2022a
- Palestine springs forward on 2022-03-27, not -03-26.
- zdump -v now outputs better failure information
- fixes for code that reads corrupted TZif data
* Fri Oct 22 2021 Patsy Griffin <patsy@redhat.com> - 2021e-1
* Fri Nov 05 2021 Patsy Griffin <patsy@redhat.com> - 2021e-1
- Rebase to tzdata-2021e - supersedes tzdata-2021d
- Pacific/Fiji suspended DST for the 2021/2022 season.
- 'zic -r' now marks unspecified timestamps with "-00".
- Palestine will fall back 2021-10-29 at 01:00, rather
than the predicted 2021-10-30.
* Wed Oct 06 2021 Patsy Griffin <patsy@redhat.com> - 2021c-1
* Thu Oct 07 2021 Patsy Griffin <patsy@redhat.com> - 2021c-1
- Rebase to tzdata-2021c - supersedes tzdata-2021b
- Revert most of 2021b changes to 'backward'.
- Fix 'zic -b fat' bug in pre-1970 32-bit data.
- Fix two Link line typos.
- Distribute SECURITY file.
- Includes changes in tzdata-2021b
- Innclude patch for Mayen
- Includes changes in tzdata-2021b:
- Jordan now starts DST on February's last Thursday.
- Samoa no longer observes DST.
- Merge more location-based Zones whose timestamps agree since 1970.
@ -290,11 +302,18 @@ echo ============END TESTING===========
- zdump -v now outputs more-useful boundary cases.
- tzfile.5 better matches a draft successor to RFC 8536.
* Sun Jan 24 2021 Patsy Griffin <patsy@redhat.com> - 2021a-1
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2021a-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2021a-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Mon Jan 25 2021 Patsy Griffin <patsy@redhat.com> - 2021a-1
- Rebase to tzdata-2021a
- South Sudan will change from +03 to +02 on 2021-02-01.
* Tue Dec 29 2020 Patsy Griffin <patsy@redhat.com> - 2020f-1
* Wed Dec 30 2020 Patsy Griffin <patsy@redhat.com> - 2020f-1
- Rebase to tzdata-2020f including changes for tzdata-2020e
- tzdata-2020f fixes a bug in tzdata-2020e that caused an
invalid zi file in rearguard format
@ -303,22 +322,22 @@ echo ============END TESTING===========
timestamps since 1970 and was therefore created by mistake,
now moved to the "backward" file.
* Wed Oct 21 2020 Patsy Griffin <patsy@redhat.com> - 2020d-1
- Rebase to tzdata-2020d
- Palestine will end summer time on 2020-10-24 rather than the
predicted 2020-10-31.
* Wed Dec 16 2020 Patsy Griffin <patsy@redhat.com> - 2020d-3
- Add 0003-continue-to-ship-posixrules.patch to initialize
POSIXRULES variable.
* Mon Oct 19 2020 Patsy Griffin <patsy@redhat.com> - 2020c-1
- Rebase to tzdata-2020c
* Wed Dec 16 2020 Patsy Griffin <patsy@redhat.com> - 2020d-2
- Add conditional support for rhel and eln.
* Fri Oct 23 2020 Patsy Griffin <patsy@redhat.com> - 2020d-1
- Rebase to tzdata-2020d including changes from tzdata-2020c
- Palestine will end summer time on 2020-10-24 rather than the
predicted 2020-10-31.
- Fiji starts DST later than usual, on 2020-12-20.
- Rearguard now provides an empty file pacificnew to support
downstream software that expects it.
* Tue Oct 13 2020 Patsy Griffin <patsy@redhat.com> - 2020b-2
- Include the upstream patch to support pacificnew for java tzupdater.
- Set POSIXRULES macro to continue installing posixrules file.
* Wed Oct 07 2020 Patsy Griffin <patsy@redhat.com> - 2020b-1
* Wed Oct 14 2020 Patsy Griffin <patsy@redhat.com> - 2020b-1
- Rebase to tzdata-2020b
- Yukon timezones represented by America/Whitehorse and
America/Dawson will change time zone rules from -08/-07 to
@ -328,7 +347,17 @@ echo ============END TESTING===========
- Remove obsolete files pacificnew, systemv, and yearistype.sh
from the distribution.
* Fri Apr 24 2020 Patsy Griffin <patsy@redhat.com> - 2020a-1
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2020a-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 2020a-3
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Fri Jun 12 2020 Jiri Vanek <jvanek@redhat.com> - 2020a-2
- bumped source/target to 1.6 for tzdata for jdk6/7
- bumped source/target to 1.8 for tzdata for jdk8
* Thu Apr 30 2020 Patsy Griffin <patsy@redhat.com> - 2020a-1
- Rebase to tzdata-2020a
- Morocco will spring forward on 2020-05-31 rather than
previously predicted 2020-05-24.
@ -336,48 +365,51 @@ echo ============END TESTING===========
effective 2020-03-08.
- America/Godthab was renamed to America/Nuuk.
* Wed Sep 11 2019 Patsy Griffin <patsy@redhat.com> - 2019c-1
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2019c-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jan 17 2020 Patsy Griffin <patsy@redhat.com> - 2019c-2
- Don't build the factory zone for tzdata-java.
Patch provided by Severin Gehwolf <sgehwolf@redhat.com> (#1789468)
* Mon Sep 23 2019 Patsy Griffin <patsy@redhat.com> - 2019c-1
- Rebase to tzdata-2019c
- Fiji will observe DST from 2019-11-10 to 2020-01-12.
- Norfolk Island will begin observing Australian-style DST on 2019-10-06.
- Add Factory back in to be more consistent with upstream.
* Mon Jul 01 2019 Patsy Griffin <patsy@redhat.com> - 2019b-1
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2019b-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Jul 09 2019 Patsy Griffin <patsy@redhat.com> - 2019b-1
- Rebase to tzdata-2019b
- Brazil will no longer observe DST going forward.
- The 2019 spring transition for Palestine occurred 03-29, not 03-30.
* Tue Mar 26 2019 Patsy Griffin Franklin <patsy@redhat.com> - 2019a-1
* Fri Mar 29 2019 Patsy Griffin Franklin <patsy@redhat.com> - 2019a-1
- Rebase to tzdata-2019a
- Palestine will start DST on 2019-03-30, rather than 2019-03-23 as
previously predicted.
- Metlakatla rejoined Alaska time on 2019-01-20, ending its observances
of Pacific standard time.
* Wed Jan 02 2019 Patsy Griffin Franklin <pfrankli@redhat.com> - 2018i-1
- Rebase to tzdata-2018i (includes changes from tzdata-2018h)
- São Tomé and Príncipe changed from UTC+01 to UTC+00 on 2019-01-01.
- Qyzylorda, Kazakhstan changed from UTC+06 to UTC+05 on 2018-12-21.
- Created a new zone Asia/Qostanay since Qostanay, Kazakhstan didn't
transition with the Qyzylorda change.
- Metlakatla, Alaska will observe PST for this winter only.
- Predict that Morocco will continue to adjust clocks around Ramadan.
- Also include predictions for Iran from 2038 through 2090.
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2018i-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Oct 29 2018 Patsy Griffin Franklin <pfrankli@redhat.com> - 2018g-1
* Mon Nov 12 2018 Patsy Griffin Franklin <pfrankli@redhat.com> - 2018g-1
- Rebase to tzdata-2018g
- Morocco will remain at UTC+1 rather than switching back to UTC+0 as
planned. This change is effective Octobober 28, 2018.
- Include changes introduced in tzdata-2018f
Includes changes for tzdata-2018f.
- Volgograd will change from UTC+03 to UTC+04 on 2018-10-28 at 02:00.
- Fiji will end DST on 2019-01-13 instead of the 2019-01-20 as
previously predicted.
- Most of Chile will end DST on the first Saturday in April at 24:00
and restart DST on the first Saturday in September at 24:00.
- Morocco will change from UTC+00/+01 to permanent +01 effective 2018-10-27.
* Fri Sep 28 2018 Patsy Franklin <pfrankli@redhat.com> - 2018e-2
- Add make check for testing.
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2018e-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon May 14 2018 Patsy Franklin <pfrankli@redhat.com> - 2018e-1
* Wed May 16 2018 Patsy Franklin <pfrankli@redhat.com> - 2018e-1
- Rebase to tzdata-2018e
- North Korea changed from UTC+8:30 to UTC+9 on May 5, 2018.
- In this update, the upstream project now defaults to using
@ -385,7 +417,7 @@ echo ============END TESTING===========
* Wed Mar 28 2018 Patsy Franklin <pfrankli@redhat.com> - 2018d-1
- Rebase to tzdata-2018d:
- DST for Asia/Gaza and Asia/Hebron has changed
- DST for Asia/Gaza and Asia/Hebron has changed
from March 31 to March 24.
- Antarctica/Casey station changed to UTC+8 on March 11.