diff --git a/backport-Port-to-downstream-HP-UX-style-make.patch b/backport-Port-to-downstream-HP-UX-style-make.patch new file mode 100644 index 0000000..c937622 --- /dev/null +++ b/backport-Port-to-downstream-HP-UX-style-make.patch @@ -0,0 +1,112 @@ +From e4645c40a0a967149a5161ca2959f8c7e9027a79 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Thu, 22 Oct 2020 12:35:30 -0700 +Subject: [PATCH 1/6] =?UTF-8?q?Port=20to=20downstream=20HP-UX-style=20?= + =?UTF-8?q?=E2=80=98make=E2=80=99?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +HP-UX ‘make’ considers a target to be out-of-date if its timestamp +equals that of a dependency, and POSIX allows this ‘make’ behavior. +So, when putting timestamps on files in tarballs, add 1 to a +file’s timestamp if it depends on some other file with the same +timestamp. That way, when someone unpackages a tarball on an +HP-UX host, its ‘make’ will avoid rebuilding files like ‘version’ +that are up-to-date in the tarball. +* Makefile (SET_TIMESTAMP_N, SET_TIMESTAMP, SET_TIMESTAMP_DEP): +New macros. +(set-timestamps.out, set-tzs-timestamp.out) +(tzdata$(VERSION)-rearguard.tar.gz, tzdb-$(VERSION).tar.lz): +Use them instead of invoking ‘touch’ by hand. +(set-timestamps.out): Set the timestamp of tzdata.zi after that +of version, since the former depends on the latter. +--- + Makefile | 43 +++++++++++++++++++++++++++++++++---------- + 1 file changed, 33 insertions(+), 10 deletions(-) + +diff --git a/Makefile b/Makefile +index 40b81d1..3b9d59e 100644 +--- a/Makefile ++++ b/Makefile +@@ -872,11 +872,34 @@ $(MANTXTS): workman.sh + LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out + mv $@.out $@ + ++# Set file timestamps deterministically if possible, ++# so that tarballs containing the timestamps are reproducible. ++# ++# '$(SET_TIMESTAMP_N) N DEST A B C ...' sets the timestamp of the ++# file DEST to the maximum of the timestamps of the files A B C ..., ++# plus N if GNU ls and touch are available. ++SET_TIMESTAMP_N = sh -c '\ ++ n=$$0 dest=$$1; shift; \ ++ touch -cmr `ls -t "$$@" | sed 1q` "$$dest" && \ ++ if test $$n != 0 && \ ++ lsout=`ls -n --time-style="+%s" "$$dest" 2>/dev/null`; then \ ++ set x $$lsout && \ ++ touch -cmd @`expr $$7 + $$n` "$$dest"; \ ++ else :; fi' ++# If DEST depends on A B C ... in this Makefile, callers should use ++# $(SET_TIMESTAMP_DEP) DEST A B C ..., for the benefit of any ++# downstream 'make' that considers equal timestamps to be out of date. ++# POSIX allows this 'make' behavior, and HP-UX 'make' does it. ++# If all that matters is that the timestamp be reproducible ++# and plausible, use $(SET_TIMESTAMP). ++SET_TIMESTAMP = $(SET_TIMESTAMP_N) 0 ++SET_TIMESTAMP_DEP = $(SET_TIMESTAMP_N) 1 ++ + # Set the timestamps to those of the git repository, if available, + # and if the files have not changed since then. +-# This uses GNU 'touch' syntax 'touch -d@N FILE', +-# where N is the number of seconds since 1970. +-# If git or GNU 'touch' is absent, don't bother to sync with git timestamps. ++# This uses GNU 'ls --time-style=+%s', which outputs the seconds count, ++# and GNU 'touch -d@N FILE', where N is the number of seconds since 1970. ++# If git or GNU is absent, don't bother to sync with git timestamps. + # Also, set the timestamp of each prebuilt file like 'leapseconds' + # to be the maximum of the files it depends on. + set-timestamps.out: $(EIGHT_YARDS) +@@ -894,16 +917,16 @@ set-timestamps.out: $(EIGHT_YARDS) + fi || exit; \ + done; \ + fi +- touch -cmr `ls -t $(LEAP_DEPS) | sed 1q` leapseconds ++ $(SET_TIMESTAMP_DEP) leapseconds $(LEAP_DEPS) + for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \ +- touch -cmr `ls -t $$file workman.sh | sed 1q` $$file.txt || \ ++ $(SET_TIMESTAMP_DEP) $$file.txt $$file workman.sh || \ + exit; \ + done +- touch -cmr `ls -t $(TZDATA_ZI_DEPS) | sed 1q` tzdata.zi +- touch -cmr `ls -t $(VERSION_DEPS) | sed 1q` version ++ $(SET_TIMESTAMP_DEP) version $(VERSION_DEPS) ++ $(SET_TIMESTAMP_DEP) tzdata.zi $(TZDATA_ZI_DEPS) + touch $@ + set-tzs-timestamp.out: $(TZS) +- touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS) ++ $(SET_TIMESTAMP_DEP) $(TZS) $(TZS_DEPS) + touch $@ + + # The zics below ensure that each data file can stand on its own. +@@ -1018,7 +1041,7 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out + for f in $(TDATA) $(PACKRATDATA); do \ + rearf=tzdata$(VERSION)-rearguard.dir/$$f; \ + $(AWK) -v DATAFORM=rearguard -f ziguard.awk $$f >$$rearf && \ +- touch -cmr `ls -t ziguard.awk $$f` $$rearf || exit; \ ++ $(SET_TIMESTAMP_DEP) $$rearf ziguard.awk $$f || exit; \ + done + sed '1s/$$/-rearguard/' \ + tzdata$(VERSION)-rearguard.dir/version +@@ -1037,7 +1060,7 @@ tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out + rm -fr tzdb-$(VERSION) + mkdir tzdb-$(VERSION) + ln $(ENCHILADA) tzdb-$(VERSION) +- touch -cmr `ls -t tzdb-$(VERSION)/* | sed 1q` tzdb-$(VERSION) ++ $(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/* + LC_ALL=C && export LC_ALL && \ + tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@.out + mv $@.out $@ +-- +1.8.3.1 + diff --git a/backport-Use-better-fallback-for-unknown-VERSION.patch b/backport-Use-better-fallback-for-unknown-VERSION.patch new file mode 100644 index 0000000..b91946d --- /dev/null +++ b/backport-Use-better-fallback-for-unknown-VERSION.patch @@ -0,0 +1,42 @@ +From 78422f077abeb56e2be8fd6852eb95361398c008 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Thu, 22 Oct 2020 13:39:01 -0700 +Subject: [PATCH 3/6] Use better fallback for unknown $(VERSION) + +Problem reported by Carlos Jimenez in: +https://mm.icann.org/pipermail/tz/2020-October/029380.html +* Makefile (version): If $(VERSION) is unknown, reuse contents +of existing version file and append "-dirty" if they do not +already end in "-dirty". +--- + Makefile | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 3b9d59e..a0b6aeb 100644 +--- a/Makefile ++++ b/Makefile +@@ -583,11 +583,19 @@ INSTALL: ALL install date.1 + cp date '$(DESTDIR)$(BINDIR)/.' + cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.' + ++# Calculate version number from git, if available. ++# Otherwise, use $(VERSION) unless it is "unknown" and there is already ++# a 'version' file, in which case reuse the existing 'version' contents ++# and append "-dirty" if the contents do not already end in "-dirty". + version: $(VERSION_DEPS) + { (type git) >/dev/null 2>&1 && \ + V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ + --abbrev=7 --dirty` || \ +- V='$(VERSION)'; } && \ ++ if test '$(VERSION)' = unknown && V=`cat $@`; then \ ++ case $$V in *-dirty);; *) V=$$V-dirty;; esac; \ ++ else \ ++ V='$(VERSION)'; \ ++ fi; } && \ + printf '%s\n' "$$V" >$@.out + mv $@.out $@ + +-- +1.8.3.1 + diff --git a/backport-etcetera-Update-comment-in-the-light-of-Neil-Fuller-.patch b/backport-etcetera-Update-comment-in-the-light-of-Neil-Fuller-.patch new file mode 100644 index 0000000..8287e1b --- /dev/null +++ b/backport-etcetera-Update-comment-in-the-light-of-Neil-Fuller-.patch @@ -0,0 +1,38 @@ +From ac029805c0de56ee3970ad59a8c649c974ea4c4a Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Thu, 22 Oct 2020 12:46:17 -0700 +Subject: [PATCH 2/6] =?UTF-8?q?*=20etcetera:=20Update=20comment=20in=20the?= + =?UTF-8?q?=20light=20of=20Neil=20Fuller=E2=80=99s=20comments.?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + etcetera | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/etcetera b/etcetera +index a1606bd..1dc7411 100644 +--- a/etcetera ++++ b/etcetera +@@ -3,12 +3,11 @@ + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +-# These entries are mostly present for historical reasons, so that +-# people in areas not otherwise covered by the tz files could "zic -l" +-# to a timezone that was right for their area. These days, the +-# tz files cover almost all the inhabited world, and the only practical +-# need now for the entries that are not on UTC are for ships at sea +-# that cannot use POSIX TZ settings. ++# These entries are for uses not otherwise covered by the tz database. ++# Their main practical use is for platforms like Android that lack ++# support for POSIX-style TZ strings. On such platforms these entries ++# can be useful if the timezone database is wrong or if a ship or ++# aircraft at sea is not in a timezone. + + # Starting with POSIX 1003.1-2001, the entries below are all + # unnecessary as settings for the TZ environment variable. E.g., +-- +1.8.3.1 + diff --git a/tzdata.spec b/tzdata.spec index 0981bb2..26c9201 100644 --- a/tzdata.spec +++ b/tzdata.spec @@ -1,6 +1,6 @@ Name: tzdata Version: 2020d -Release: 1 +Release: 2 Summary: Timezone data License: Public Domain URL: https://www.iana.org/time-zones @@ -16,6 +16,10 @@ Patch9003: rename-Macau-to-Macao.patch Patch9004: remove-El_Aaiun-timezone.patch Patch9005: remove-Israel-timezone.patch +Patch9006: backport-etcetera-Update-comment-in-the-light-of-Neil-Fuller-.patch +Patch9007: backport-Port-to-downstream-HP-UX-style-make.patch +Patch9008: backport-Use-better-fallback-for-unknown-VERSION.patch + BuildRequires: gawk glibc perl-interpreter BuildRequires: java-devel BuildRequires: glibc-common >= 2.5.90-7 @@ -103,6 +107,9 @@ install -p -m 644 tzdb.dat $RPM_BUILD_ROOT%{_datadir}/javazi-1.8/ %{_datadir}/javazi-1.8 %changelog +* Tue Oct 27 2020 shenkai - 2020d-2 +- backport community patches + * Thu Oct 22 2020 liuchao - 2020d-1 - Upgrade to 2020d