Compare commits

...

1 Commits
c8 ... c10-beta

Author SHA1 Message Date
67c2d290b7 import RHEL 10 Beta tzdata-2024a-3.el10 2024-11-20 13:51:48 +00:00
16 changed files with 189 additions and 619 deletions

7
.gitignore vendored
View File

@ -1,4 +1,3 @@
SOURCES/javazic-1.8-37392f2f5d59.tar.xz
SOURCES/javazic.tar.gz
SOURCES/tzcode2024b.tar.gz
SOURCES/tzdata2024b.tar.gz
javazic-1.8-37392f2f5d59.tar.xz
tzcode2024a.tar.gz
tzdata2024a.tar.gz

View File

@ -1,4 +0,0 @@
77292e1839952807567570118e01405b405af80c SOURCES/javazic-1.8-37392f2f5d59.tar.xz
ee8ad215161cd132e65e2be447b279457158b540 SOURCES/javazic.tar.gz
95cfb1106f60e925f0255d340350ba4be51b9b29 SOURCES/tzcode2024b.tar.gz
52adf39a4b3c29502866167e78b89b20fd08dc3e SOURCES/tzdata2024b.tar.gz

View File

@ -1,3 +1,15 @@
# 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

View File

@ -1,23 +0,0 @@
commit 926b507fa5c3192b1b68fab5910cbd3ba9377c97
Author: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu Sep 5 14:36:02 2024 -0700
"Apr", not "April", in IN column
* northamerica (Rule): Use "Apr", not "April", in the IN column.
Both forms are valid, but "Apr" is more consistent.
Problem reported by Howard Hinnant.
diff --git a/northamerica b/northamerica
index 01f392e0..1af874b6 100644
--- a/northamerica
+++ b/northamerica
@@ -2631,7 +2631,7 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# http://puentelibre.mx/noticia/ciudad_juarez_cambio_horario_noviembre_2022/
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
-Rule Mexico 1931 only - April 30 0:00 1:00 D
+Rule Mexico 1931 only - Apr 30 0:00 1:00 D
Rule Mexico 1931 only - Oct 1 0:00 0 S
Rule Mexico 1939 only - Feb 5 0:00 1:00 D
Rule Mexico 1939 only - Jun 25 0:00 0 S

View File

@ -1,77 +0,0 @@
commit 7b6fb155cadd5e5ee70b55c2770e1bdd2f5d2a38
Author: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu Sep 5 14:38:35 2024 -0700
Improve style checks for months
* checktab.awk: Check style of STDOFF and month names.
diff --git a/checktab.awk b/checktab.awk
index 9a26e465..15a3a697 100644
--- a/checktab.awk
+++ b/checktab.awk
@@ -9,6 +9,19 @@ BEGIN {
if (!zone_table) zone_table = "zone1970.tab"
if (!want_warnings) want_warnings = -1
+ monthabbr["Jan"] = 1
+ monthabbr["Feb"] = 1
+ monthabbr["Mar"] = 1
+ monthabbr["Apr"] = 1
+ monthabbr["May"] = 1
+ monthabbr["Jun"] = 1
+ monthabbr["Jul"] = 1
+ monthabbr["Aug"] = 1
+ monthabbr["Sep"] = 1
+ monthabbr["Oct"] = 1
+ monthabbr["Nov"] = 1
+ monthabbr["Dec"] = 1
+
while (getline <iso_table) {
iso_NR++
if ($0 ~ /^#/) continue
@@ -128,12 +141,14 @@ BEGIN {
$1 ~ /^#/ { next }
{
- tz = rules = ""
+ tz = rules = stdoff = ""
if ($1 == "Zone") {
tz = $2
+ stdoff = $3
ruleUsed[$4] = 1
if ($5 ~ /%/) rulePercentUsed[$4] = 1
- } else if ($1 == "Link" && zone_table == "zone.tab") {
+ } else if ($1 == "Link") {
+ if (zone_table == "zone.tab") {
# Ignore Link commands if source and destination basenames
# are identical, e.g. Europe/Istanbul versus Asia/Istanbul.
src = $2
@@ -141,13 +156,27 @@ $1 ~ /^#/ { next }
while ((i = index(src, "/"))) src = substr(src, i+1)
while ((i = index(dst, "/"))) dst = substr(dst, i+1)
if (src != dst) tz = $3
+ }
} else if ($1 == "Rule") {
ruleDefined[$2] = 1
if ($10 != "-") ruleLetters[$2] = 1
+ if (!monthabbr[$6]) {
+ printf "%s:%d: tricky month: %s\n", FILENAME, FNR, $6 \
+ >>"/dev/stderr"
+ status = 1
+ }
} else {
+ stdoff = $1
ruleUsed[$2] = 1
if ($3 ~ /%/) rulePercentUsed[$2] = 1
}
+
+ if (stdoff && stdoff !~ /^\-?1?[0-9](:[0-5][0-9](:[0-5][0-9])?)?$/) {
+ printf "%s:%d: unlikely STDOFF: %s\n", FILENAME, FNR, stdoff \
+ >>"/dev/stderr"
+ status = 1
+ }
+
if (tz && tz ~ /\// && tz !~ /^Etc\//) {
if (!tztab[tz] && FILENAME != "backward" \
&& zone_table != "zonenow.tab") {

View File

@ -1,44 +0,0 @@
diff --git a/7090844.patch b/7090844.patch
new file mode 100644
index 0000000..fd5b531
--- /dev/null
+++ b/7090844.patch
@@ -0,0 +1,38 @@
+--- sun/tools/javazic/Mappings.java.orig 2015-04-13 12:42:30.000000000 -0400
++++ sun/tools/javazic/Mappings.java 2015-04-13 12:43:32.000000000 -0400
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+@@ -26,9 +26,6 @@
+ package sun.tools.javazic;
+
+ import java.util.ArrayList;
+-import java.util.HashMap;
+-import java.util.HashSet;
+-import java.util.Iterator;
+ import java.util.LinkedList;
+ import java.util.List;
+ import java.util.Map;
+@@ -79,8 +76,8 @@
+ // If the GMT offset of this Zone will change in some
+ // future time, this Zone is added to the exclude list.
+ boolean isExcluded = false;
+- if (zone.size() > 1) {
+- ZoneRec zrec = zone.get(zone.size()-2);
++ for (int i = 0; i < zone.size(); i++) {
++ ZoneRec zrec = zone.get(i);
+ if ((zrec.getGmtOffset() != rawOffset)
+ && (zrec.getUntilTime(0) > Time.getCurrentTime())) {
+ if (excludeList == null) {
+@@ -88,6 +85,7 @@
+ }
+ excludeList.add(zone.getName());
+ isExcluded = true;
++ break;
+ }
+ }
+

View File

@ -1,44 +0,0 @@
diff --git a/7133138.patch b/7133138.patch
new file mode 100644
index 0000000..882f15f
--- /dev/null
+++ b/7133138.patch
@@ -0,0 +1,38 @@
+--- sun/tools/javazic/Mappings.java.orig 2015-04-13 12:44:10.000000000 -0400
++++ sun/tools/javazic/Mappings.java 2015-04-13 12:45:28.000000000 -0400
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+@@ -26,6 +26,7 @@
+ package sun.tools.javazic;
+
+ import java.util.ArrayList;
++import java.util.HashMap;
+ import java.util.LinkedList;
+ import java.util.List;
+ import java.util.Map;
+@@ -162,6 +163,20 @@
+ for (String key : toBeRemoved) {
+ aliases.remove(key);
+ }
++ // Eliminate any alias-to-alias mappings. For example, if
++ // there are A->B and B->C, A->B is changed to A->C.
++ Map<String, String> newMap = new HashMap<String, String>();
++ for (String key : aliases.keySet()) {
++ String realid = aliases.get(key);
++ String leaf = realid;
++ while (aliases.get(leaf) != null) {
++ leaf = aliases.get(leaf);
++ }
++ if (!realid.equals(leaf)) {
++ newMap.put(key, leaf);
++ }
++ }
++ aliases.putAll(newMap);
+ }
+
+ Map<String,String> getAliases() {

View File

@ -1,42 +0,0 @@
/* 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);
}
}

View File

@ -1,34 +0,0 @@
--- sun/util/calendar/LocalGregorianCalendar.java.keiths 2007-09-07 14:48:19.000000000 -0700
+++ sun/util/calendar/LocalGregorianCalendar.java 2007-09-07 14:52:58.000000000 -0700
@@ -120,8 +120,7 @@ public class LocalGregorianCalendar exte
static LocalGregorianCalendar getLocalGregorianCalendar(String name) {
Properties calendarProps = null;
try {
- String homeDir = (String) AccessController.doPrivileged(
- new sun.security.action.GetPropertyAction("java.home"));
+ String homeDir = (String) System.getProperty("java.home");
final String fname = homeDir + File.separator + "lib" + File.separator
+ "calendars.properties";
calendarProps = (Properties) AccessController.doPrivileged(new PrivilegedExceptionAction() {
--- sun/util/calendar/ZoneInfoFile.java.keiths 2007-09-07 14:54:58.000000000 -0700
+++ sun/util/calendar/ZoneInfoFile.java 2007-09-07 14:55:36.000000000 -0700
@@ -1021,8 +1021,7 @@ public class ZoneInfoFile {
byte[] buffer = null;
try {
- String zi_dir = (String) AccessController.doPrivileged(
- new sun.security.action.GetPropertyAction("user.zoneinfo.dir"));
+ String zi_dir = (String) System.getProperty("user.zoneinfo.dir");
File dir = null;
if (zi_dir != null)
dir = new File(zi_dir);
@@ -1035,8 +1034,7 @@ public class ZoneInfoFile {
}
if (dir == null) {
- String homeDir = (String) AccessController.doPrivileged(
- new sun.security.action.GetPropertyAction("java.home"));
+ String homeDir = (String) System.getProperty("java.home");
zi_dir = homeDir + File.separator + "lib" + File.separator
+ "zi";
}

View File

@ -1,86 +0,0 @@
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);
}
/**

View File

@ -1,37 +0,0 @@
diff --git a/rebase-01.patch b/rebase-01.patch
new file mode 100644
index 0000000..bca6ed4
--- /dev/null
+++ b/rebase-01.patch
@@ -0,0 +1,31 @@
+--- sun/tools/javazic/Mappings.java.orig 2007-08-30 03:55:48.000000000 -0400
++++ sun/tools/javazic/Mappings.java 2015-04-13 12:39:44.000000000 -0400
+@@ -1,12 +1,12 @@
+ /*
+- * Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved.
++ * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation. Sun designates this
++ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+- * by Sun in the LICENSE file that accompanied this code.
++ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+@@ -18,9 +18,9 @@
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+- * CA 95054 USA or visit www.sun.com if you need additional information or
+- * have any questions.
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
+ */
+
+ package sun.tools.javazic;

View File

@ -1,42 +0,0 @@
diff --git a/rebase-02.patch b/rebase-02.patch
new file mode 100644
index 0000000..0f57125
--- /dev/null
+++ b/rebase-02.patch
@@ -0,0 +1,36 @@
+--- sun/tools/javazic/Mappings.java.orig 2015-04-13 12:40:26.000000000 -0400
++++ sun/tools/javazic/Mappings.java 2015-04-13 12:42:11.000000000 -0400
+@@ -75,8 +75,10 @@
+ Zone zone = zones.get(zoneName);
+ String zonename = zone.getName();
+ int rawOffset = zone.get(zone.size()-1).getGmtOffset();
++
+ // If the GMT offset of this Zone will change in some
+ // future time, this Zone is added to the exclude list.
++ boolean isExcluded = false;
+ if (zone.size() > 1) {
+ ZoneRec zrec = zone.get(zone.size()-2);
+ if ((zrec.getGmtOffset() != rawOffset)
+@@ -85,7 +87,7 @@
+ excludeList = new ArrayList<String>();
+ }
+ excludeList.add(zone.getName());
+- continue;
++ isExcluded = true;
+ }
+ }
+
+@@ -101,9 +103,11 @@
+ rawOffsetsIndex.add(i, rawOffset);
+
+ Set<String> perRawOffset = new TreeSet<String>();
+- perRawOffset.add(zonename);
++ if (!isExcluded) {
++ perRawOffset.add(zonename);
++ }
+ rawOffsetsIndexTable.add(i, perRawOffset);
+- } else {
++ } else if (!isExcluded) {
+ int i = rawOffsetsIndex.indexOf(new Integer(rawOffset));
+ Set<String> perRawOffset = rawOffsetsIndexTable.get(i);
+ perRawOffset.add(zonename);

3
sources Normal file
View File

@ -0,0 +1,3 @@
SHA512 (javazic-1.8-37392f2f5d59.tar.xz) = 2ba718dfeed53a3bd6b44e3dfe96338a609e482e4e6d942e2a7e622fc6c52606cb323ac3a59739c463e34f70fff217c0a61f5b3d3c4958eff2801b1504ee4204
SHA512 (tzcode2024a.tar.gz) = 46da8bfa762c7d109db93e5c060789097fc0e1e38bdad5bb8fec886ef47f138bd03b913a743cd5f7e23dc359a72bfd63e7ffc0de199d2b51e6a174361dbdc43c
SHA512 (tzdata2024a.tar.gz) = 1f09f1b2327cc9e1afc7e9045e83ee3377918dafe1bee2f282b6991828d03b3c70a4d3a17f9207dfb1361bb25bc214a8922a756e84fa114e9ba476226db57236

View File

@ -1,27 +1,24 @@
Summary: Timezone data
Name: tzdata
Version: 2024b
%define tzdata_version 2024b
%define tzcode_version 2024b
Release: 4%{?dist}
License: Public Domain
Group: System Environment/Base
Version: 2024a
%define tzdata_version 2024a
%define tzcode_version 2024a
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
Source1: ftp://ftp.iana.org/tz/releases/tzcode%{tzcode_version}.tar.gz
Patch002: 0002-Fix-have-snprintf.patch
Patch002: 0002-Fix-have-snprintf-error.patch
Patch003: 0003-continue-to-ship-posixrules.patch
Patch004: 0004-Fix-Apr-vs-April-2024b.patch
Patch005: 0005-Improve-style-checks-for-months-2024b.patch
BuildRequires: make
BuildRequires: gawk, glibc, perl-interpreter
BuildRequires: java-devel
BuildRequires: make
BuildRequires: gcc
BuildRequires: glibc-common >= 2.5.90-7
Conflicts: glibc-common <= 2.3.2-63
BuildArchitectures: noarch
ExcludeArch: i686
%description
This package contains data files with rules for various timezones around
@ -29,17 +26,8 @@ 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
Patch100: javazic-fixup.patch
Patch101: rebase-01.patch
Patch102: rebase-02.patch
Patch103: 7090844.patch
Patch104: 7133138.patch
Patch105: 8051641.patch
Patch106: javazic-harden-links.patch
Source3: javazic-1.8-37392f2f5d59.tar.xz
Patch100: JDK-8051641.patch
%description java
This package contains timezone information for use by Java runtimes.
@ -47,61 +35,41 @@ This package contains timezone information for use by Java runtimes.
%prep
%setup -q -c -a 1
%patch002 -p1
%patch003 -p1
%patch004 -p1
%patch005 -p1
%patch -p1 -P 2
%if 0%{?rhel}
%patch -p1 -P 3
%endif
# 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
# Run make to re-create the tzdata.zi file for rearguard format
rm tzdata.zi
make VERSION=%{version} DATAFORM=rearguard tzdata.zi
mkdir javazic
tar zxf %{SOURCE3} -C javazic
pushd javazic
%patch100
%patch101
%patch102
%patch103
%patch104
# Hack alert! sun.tools may be defined and installed in the
# VM. In order to guarantee that we are using IcedTea/OpenJDK
# for creating the zoneinfo files, rebase all the packages
# from "sun." to "rht.". Unfortunately, gcj does not support
# any of the -Xclasspath options, so we must go this route
# to ensure the greatest compatibility.
mv sun rht
find . -type f -name '*.java' -print0 \
| xargs -0 -- sed -i -e 's:sun\.tools\.:rht.tools.:g' \
-e 's:sun\.util\.:rht.util.:g'
popd
tar xf %{SOURCE4}
%patch105
%patch106 -p1
%if 0%{?rhel}
# Use rearguard for rhel (overwrite default vangaurd data)
tar zxf rearguard/tzdata%{version}-rearguard.tar.gz
%endif
tar xf %{SOURCE3}
%patch -P 100
echo "%{name}%{tzdata_version}" >> VERSION
%build
# Run make to create the tzdata.zi file
rm tzdata.zi
%if 0%{?rhel}
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,55 +78,31 @@ zic -y ./yearistype -d zoneinfo/right -L leapseconds $FILES
# grep -v tz-art.htm tz-link.htm > tz-link.html
# Java 6/7 tzdata
pushd javazic
javac -source 1.5 -target 1.5 -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
# 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 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
install -d $RPM_BUILD_ROOT%{_datadir}
cp -prd zoneinfo $RPM_BUILD_ROOT%{_datadir}
install -p -m 644 zone.tab zone1970.tab iso3166.tab leap-seconds.list leapseconds tzdata.zi $RPM_BUILD_ROOT%{_datadir}/zoneinfo
cp -prd javazi $RPM_BUILD_ROOT%{_datadir}/javazi
mkdir -p $RPM_BUILD_ROOT%{_datadir}/javazi-1.8
install -p -m 644 tzdb.dat $RPM_BUILD_ROOT%{_datadir}/javazi-1.8/
%check
echo ============TESTING===============
/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===========
%files
%defattr(-,root,root)
%{_datadir}/zoneinfo
%license LICENSE
%doc README
@ -167,66 +111,67 @@ 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 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.
* Thu Oct 03 2024 Patsy Griffin <patsy@redhat.com> - 2024b-3
- Add copyright, patch attribution and build dependencies for
the previous commit. (RHEL-59542)
* Tue Feb 06 2024 Patsy Griffin <patsy@redhat.com> - 2024a-2
- Correct the bz# for the tzdata-2024 commit.
* 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
* Mon Feb 05 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
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2023d-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jan 18 2024 Patsy Griffin <patsy@redhat.com> - 2023d-2
- Migrate License field to SPDX identifiers for
https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_2
* Wed Jan 03 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)
* Wed Dec 13 2023 Patsy Griffin <patsy@redhat.com> - 2023c-5
- Remove Java 6/7 support for Fedora 40 and RHEL 10 forward.
* Tue Mar 28 2023 Patsy Griffin <patsy@redhat.com> - 2023c-1
* Tue Oct 3 2023 David Cantrell <dcantrell@redhat.com> - 2023c-4
- Use the new syntax for the %%patch macro in the spec file
* Mon Jul 24 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 2023c-3
- Disable Java 6/7 data in RHEL 10 builds
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2023c-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Mar 29 2023 Patsy Griffin <patsy@redhat.com> - 2023c-1
- Rebase to tzdata-2023c
- Lebanon reversed the change added in tzdata-2023b.
- Reinstate Lebanon DST change effective March 25.
* 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
* Thu Mar 23 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
- Include leap-seconds.list in tzdata install. (#2154109)
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2022g-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Nov 29 2022 Patsy Griffin <patsy@redhat.com> - 2022g-1
* Fri Dec 02 2022 Patsy Griffin <patsy@redhat.com> - 2022g-1
- Rebase to tzdata-2022g
- The northern edge of the Mexican state of Chihuahua will
change time zone to agree with nearby US locations on
@ -240,42 +185,70 @@ echo ============END TESTING===========
- 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
* Fri Oct 14 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.
* Sun Sep 25 2022 Patsy Griffin <patsy@redhat.com> - 2022d-1
- Rebase to tzdata-2022d
- Palestine DST transition will be on October 29, 2022,
not October 28, 2022.
- Europe/Uzhgorod and Europe/Zaporozhye are moved to 'backzone'.
* Mon Aug 22 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
* Sun Aug 14 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.
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2022a-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Apr 1 2022 Patsy Griffin <patsy@redhat.com> - 2022a-1
* Fri Jul 15 2022 Patsy Griffin <patsy@redhat.com> - 2022a-3
- Java OpenJDK packages are no longer available on i686.
Exclude i686 builds. (bz #2104108)
* Tue Jun 07 2022 Patsy Griffin <patsy@redhat.com> - 2022a-2
- Include leap-second.list in tzdata install. (#2091390)
* Wed Mar 23 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
- Palestine springs forward on 2022-03-27, not 2022-03-26.
- zdump -v now outputs better failure information.
- bug fixes for code that reads corrupted TZif data.
* Fri Oct 22 2021 Patsy Griffin <patsy@redhat.com> - 2021e-1
* Tue Feb 08 2022 Patsy Griffin <patsy@redhat.com> - 2021e-4
- Clean-up changelog.
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 2021e-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/Java17
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2021e-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Oct 26 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
- 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
* Thu Oct 07 2021 Patsy Griffin <patsy@redhat.com> - 2021c-1
- Rebase to tzdata-2021c
- Revert most 2021b changes to the 'backward' file.
- Fix 'zic -b fat' bug in pre-1970 32-bit data reported in tzdata-2021b.
- Fix two Link line typos from tzdata-2021b.
- Distribute the new SECURITY file.
* Sat Sep 25 2021 Patsy Griffin <patsy@redhat.com> - 2021b-1
- Rebase to 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 +263,14 @@ 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
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2021a-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* 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 +279,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
* Wed Dec 16 2020 Patsy Griffin <patsy@redhat.com> - 2020d-3
- Add 0003-continue-to-ship-posixrules.patch to initialize
POSIXRULES variable.
* 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.
* Mon Oct 19 2020 Patsy Griffin <patsy@redhat.com> - 2020c-1
- Rebase to tzdata-2020c
- 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 +304,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 +322,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