- Add conditional support for rhel and eln rearguard format.
This commit is contained in:
Patsy Griffin 2020-12-16 13:33:31 -05:00
parent 401ee85cde
commit deebbac60f

View File

@ -3,13 +3,16 @@ Name: tzdata
Version: 2020d
%define tzdata_version 2020d
%define tzcode_version 2020d
Release: 1%{?dist}
Release: 2%{?dist}
License: Public Domain
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-error.patch
%if 0%{?rhel} || 0%{?eln}
Patch003: 0003-continue-to-ship-posixrules.patch
%endif
BuildRequires: gawk, glibc, perl-interpreter
BuildRequires: java-devel
@ -38,6 +41,9 @@ 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
# tzdata-2018g introduced 25:00 transition times. This breaks OpenJDK.
# Use rearguard for java
@ -48,6 +54,11 @@ pushd rearguard
tar zxf tzdata%{version}-rearguard.tar.gz
popd
%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
pushd javazic
@ -75,7 +86,12 @@ 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
etcetera backward factory"
@ -134,7 +150,10 @@ install -p -m 644 tzdb.dat $RPM_BUILD_ROOT%{_datadir}/javazi-1.8/
%{_datadir}/javazi-1.8
%changelog
* Wed Oct 23 2020 Patsy Griffin <patsy@redhat.com> - 2020d-1
* Mon Nov 23 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.