Accepting request 436670 from home:AndreasStieger:branches:Base:System

timezone update 2016h

OBS-URL: https://build.opensuse.org/request/show/436670
OBS-URL: https://build.opensuse.org/package/show/Base:System/timezone?expand=0&rev=199
This commit is contained in:
Andreas Stieger 2016-10-21 10:09:52 +00:00 committed by Git OBS Bridge
parent 0603a50597
commit 70cbe0976a
13 changed files with 62 additions and 153 deletions

View File

@ -1,107 +0,0 @@
From df9991a2186d4236ba1e97e6638fa53b578bc6d7 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 6 Oct 2016 11:47:17 -0700
Subject: [PATCH] Do not assume TZDEFAULT is relative.
Problem reported by Andreas Stieger in:
http://mm.icann.org/pipermail/tz/2016-October/024280.html
* NEWS: Document this.
* zic.c (relname): New function.
(dolink): Use it.
---
zic.c | 65 ++++++++++++++++++++++++++++++++++++++++++++---------------------
1 file changed, 44 insertions(+), 21 deletions(-)
---
Fixes: https://bugzilla.suse.com/show_bug.cgi?id=1003324
diff --git a/zic.c b/zic.c
index 2505c11..eba223c 100644
--- a/zic.c
+++ b/zic.c
@@ -764,6 +764,44 @@ namecheck(const char *name)
return componentcheck(name, component, cp);
}
+/* Create symlink contents suitable for symlinking FROM to TO, as a
+ freshly allocated string. FROM should be a relative file name, and
+ is relative to the global variable DIRECTORY. TO can be either
+ relative or absolute. */
+static char *
+relname(char const *from, char const *to)
+{
+ size_t i, taillen, dotdotetcsize;
+ size_t dir_len = 0, dotdots = 0, linksize = SIZE_MAX;
+ char const *f = from;
+ char *result = NULL;
+ if (*to == '/') {
+ /* Make F absolute too. */
+ size_t len = strlen(directory);
+ bool needslash = len && directory[len - 1] != '/';
+ linksize = len + needslash + strlen(from) + 1;
+ f = result = emalloc(linksize);
+ strcpy(result, directory);
+ result[len] = '/';
+ strcpy(result + len + needslash, from);
+ }
+ for (i = 0; f[i] && f[i] == to[i]; i++)
+ if (f[i] == '/')
+ dir_len = i + 1;
+ for (; f[i]; i++)
+ dotdots += f[i] == '/' && f[i - 1] != '/';
+ taillen = i - dir_len;
+ dotdotetcsize = 3 * dotdots + taillen + 1;
+ if (dotdotetcsize <= linksize) {
+ if (!result)
+ result = emalloc(dotdotetcsize);
+ for (i = 0; i < dotdots; i++)
+ memcpy(result + 3 * i, "../", 3);
+ memmove(result + 3 * dotdots, f + dir_len, taillen + 1);
+ }
+ return result;
+}
+
static void
dolink(char const *fromfield, char const *tofield, bool staysymlink)
{
@@ -800,30 +838,15 @@ dolink(char const *fromfield, char const *tofield, bool staysymlink)
link_errno = link(fromfield, tofield) == 0 ? 0 : errno;
}
if (link_errno != 0) {
- const char *s = fromfield;
- const char *t;
- char *p;
- size_t dotdots = 0;
- char *symlinkcontents;
- int symlink_errno;
-
- do
- t = s;
- while ((s = strchr(s, '/'))
- && strncmp(fromfield, tofield, ++s - fromfield) == 0);
-
- for (s = tofield + (t - fromfield); *s; s++)
- dotdots += *s == '/';
- symlinkcontents = emalloc(3 * dotdots + strlen(t) + 1);
- for (p = symlinkcontents; dotdots-- != 0; p += 3)
- memcpy(p, "../", 3);
- strcpy(p, t);
- symlink_errno = symlink(symlinkcontents, tofield) == 0 ? 0 : errno;
+ bool absolute = *fromfield == '/';
+ char *linkalloc = absolute ? NULL : relname(fromfield, tofield);
+ char const *contents = absolute ? fromfield : linkalloc;
+ int symlink_errno = symlink(contents, tofield) == 0 ? 0 : errno;
if (symlink_errno == ENOENT && !todirs_made) {
mkdirs(tofield, true);
- symlink_errno = symlink(symlinkcontents, tofield) == 0 ? 0 : errno;
+ symlink_errno = symlink(contents, tofield) == 0 ? 0 : errno;
}
- free(symlinkcontents);
+ free(linkalloc);
if (symlink_errno == 0) {
if (link_errno != ENOTSUP)
warning(_("symbolic link used because hard link failed: %s"),
--
2.10.1

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Fri Oct 21 09:54:37 UTC 2016 - astieger@suse.com
- timezone update 2016h:
* Asia/Gaza and Asia/Hebron end DST on 2016-10-29 at 01:00, not
2016-10-21 at 00:00.
* Adjust 1986-1990, 1994 Turkey DST transistions
* Asia/Colombo now uses numeric time zone abbreviations
* drop timezone-2016g-absolute-TZDEFAULT.patch, upstream
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Oct 6 19:14:45 UTC 2016 - astieger@suse.com Thu Oct 6 19:14:45 UTC 2016 - astieger@suse.com

View File

@ -25,7 +25,7 @@ License: BSD-3-Clause and SUSE-Public-Domain
Group: System/Base Group: System/Base
# COMMON-BEGIN # COMMON-BEGIN
# COMMON-BEGIN # COMMON-BEGIN
Version: 2016g Version: 2016h
Release: 0 Release: 0
Source: https://www.iana.org/time-zones/repository/releases/tzdata%{version}.tar.gz Source: https://www.iana.org/time-zones/repository/releases/tzdata%{version}.tar.gz
Source1: https://www.iana.org/time-zones/repository/releases/tzcode%{version}.tar.gz Source1: https://www.iana.org/time-zones/repository/releases/tzcode%{version}.tar.gz
@ -35,7 +35,6 @@ Source4: %{name}.keyring
Source5: %{name}.changes Source5: %{name}.changes
Patch0: tzdata-china.diff Patch0: tzdata-china.diff
Patch3: iso3166-uk.diff Patch3: iso3166-uk.diff
Patch4: timezone-2016g-absolute-TZDEFAULT.patch
# COMMON-END # COMMON-END
# COMMON-END # COMMON-END
Url: http://www.gnu.org/software/libc/libc.html Url: http://www.gnu.org/software/libc/libc.html
@ -57,7 +56,6 @@ package is intended for Java Virtual Machine based on OpenJDK.
# COMMON-PREP-BEGIN # COMMON-PREP-BEGIN
%patch0 -p1 %patch0 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1
sed -ri 's@/usr/local/etc/zoneinfo@%{_datadir}/zoneinfo@g' *.[1358] sed -ri 's@/usr/local/etc/zoneinfo@%{_datadir}/zoneinfo@g' *.[1358]
# COMMON-PREP-END # COMMON-PREP-END
# COMMON-PREP-END # COMMON-PREP-END

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Fri Oct 21 09:54:37 UTC 2016 - astieger@suse.com
- timezone update 2016h:
* Asia/Gaza and Asia/Hebron end DST on 2016-10-29 at 01:00, not
2016-10-21 at 00:00.
* Adjust 1986-1990, 1994 Turkey DST transistions
* Asia/Colombo now uses numeric time zone abbreviations
* drop timezone-2016g-absolute-TZDEFAULT.patch, upstream
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Oct 6 19:14:45 UTC 2016 - astieger@suse.com Thu Oct 6 19:14:45 UTC 2016 - astieger@suse.com

View File

@ -23,7 +23,7 @@ Group: System/Base
Url: http://www.iana.org/time-zones Url: http://www.iana.org/time-zones
PreReq: filesystem, coreutils PreReq: filesystem, coreutils
# COMMON-BEGIN # COMMON-BEGIN
Version: 2016g Version: 2016h
Release: 0 Release: 0
Source: https://www.iana.org/time-zones/repository/releases/tzdata%{version}.tar.gz Source: https://www.iana.org/time-zones/repository/releases/tzdata%{version}.tar.gz
Source1: https://www.iana.org/time-zones/repository/releases/tzcode%{version}.tar.gz Source1: https://www.iana.org/time-zones/repository/releases/tzcode%{version}.tar.gz
@ -33,7 +33,6 @@ Source4: %{name}.keyring
Source5: %{name}.changes Source5: %{name}.changes
Patch0: tzdata-china.diff Patch0: tzdata-china.diff
Patch3: iso3166-uk.diff Patch3: iso3166-uk.diff
Patch4: timezone-2016g-absolute-TZDEFAULT.patch
# COMMON-END # COMMON-END
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -51,7 +50,6 @@ can select an appropriate time zone for your system with YaST.
# COMMON-PREP-BEGIN # COMMON-PREP-BEGIN
%patch0 -p1 %patch0 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1
sed -ri 's@/usr/local/etc/zoneinfo@%{_datadir}/zoneinfo@g' *.[1358] sed -ri 's@/usr/local/etc/zoneinfo@%{_datadir}/zoneinfo@g' *.[1358]
# COMMON-PREP-END # COMMON-PREP-END

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1ff90b47ad7986140a513b5287b1851c40f80fd44fd636db5cc5b46d06f9fa2b
size 203362

View File

@ -1,17 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJX2CTkAAoJEO2X6Q5iqn40/dsQAKZVDkj6jZNmdcS3qfArD30Z
U9K7AwLUlugG6WuwMzPYPp2zMNhdM3pVdfSrtgNPjGBJY4kISIiSnNx8CuvNUxlf
u+gnsPkr2qfEMEhjEKS9K4yeBi12Bo3WX7lxFJDSqXfQM389EIQufLdcpggQVnoZ
mbUCSGS3P+C+JCZBr3ltc6dZVo3OofduZR6rZauyKdHLsFo3UZgo3HZ1AgADU5KB
b+8JUAUMssOFr9dp61mF1WBlhHrg7+SubCZe5a4QggON73prhCQWtNFH/de76Ep0
vpjn9y8dbzjSGEuMGxRRH7aBN1XYOiTyBEO3rXYA5J93I7C0IXRD3hALCpqJH/+F
dw3lzEOHi7drX/WPS2eHYaHV6GtXs8BpU39lzPiyQ89ZwFDI+ed+IFx0F2nhGI4a
YnncsPwHtodhK5AnTifDA9F95MuAZiILBlMLklaFicbtVuptM/pHgSRKKbkjptfR
3M8XmCgw/1zOAyMvc0D7X5YBspKacXDnMNX4jGDtdKoDiUAEjNf2w4RXV9fYg7Wa
5RgcqqhAcSW1SpyUcHo+po6oXTELaBh7+QGPKqsdG8ntbaywqYNT6oJqkLtYzyVj
sraRd7+f0EXdgrYTi6rZim/v6VudEqGGBRVfenXzQPCwtaNY1/+UW+Ruo/Yqlo9k
Cs4QYazop8GmeH74lAIx
=+WWr
-----END PGP SIGNATURE-----

3
tzcode2016h.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:30e62f0b86a78fb020d378b950930da023ca31b1a58f08d8fb2066627c4d6566
size 206155

17
tzcode2016h.tar.gz.asc Normal file
View File

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJYCGLlAAoJEO2X6Q5iqn40hxQP/iamwTHAfVWNxb9yu+Xz8DeV
3kYZJF1ln6kkgmTqASn/L1m5VnaO8e4gVjwpYmkUavYUKZBCHkw9GxclNS5Qt3hI
tDm2yE7vAvH23/zgo/NWeFtIzpp476W+VcIlCaSCo0iJ008rPxvIiBmFfgAg9Jji
xUPYBBNHH1fLVIpyD2xCzwdeoDiJITX45CtWeGoT2uwA+4xbtfv1/NVMu8j7SN9w
7mpUTF2sAoMUdmG56TE0B8Y4vP3BwlqmVq8CadA4yj0DDwg+vyHKI7wkk9uP44+g
DDmcZc9vK8P934veSsexNDLjdAxWSHkgcZ1IwGIPjl5/nquosPy5CdF6VqZFS+IX
9ruapyouZlXlfgg+I6pofkQw4WInO+tn0mIZxJHKXfv33aIxMU22m5ddvCJ0+hUf
JIMgrkf0dGzlc8g2FT0DYVtDRg7Zik0GrszjmPc8jzeLi31oGxWA4Xjpwm8rYX/p
7kwIGwg3R19OwUaSgDjpEzXgXi3+iyNeLgq28YjhXj9p4iDhVUo+Njl8Kl31H1Vt
7gpo3utpRcT41nX/5yVUVcx4mJjvNwzD36/zc7hoTTQIInyrR5jQAZ5danDr/HCp
NoK16D7WgbMaZMD0M0UV4RyTBlHKc0qeyL++xT7WLESCLxOpmVQdB/CYLjx0BZUr
UAq95YoKcMMv+3KHjsDG
=aC8a
-----END PGP SIGNATURE-----

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3c7137b2bc47323b0de47b77786bacf81ed503d4b2c693ff8ada2fbd1281ebd1
size 316669

View File

@ -1,17 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJX2CTkAAoJEO2X6Q5iqn40i8IP/jtQ8PYjBG3NJV5uvRGzbV60
n1vdVJDMU9SkRpiT1G8p/cjr4mszUnm+qsZNZGg1wZknBuQdnglAMwA2lj8Llv5N
gAlGj/JDEsNESfOC+9wD+NtZK+aUxJzHSXl4xzhzCMjBKaPOytcLKuGscMrpcGFH
2IDyjdjHOfDNG5PAxu0wjkMsKFUt95wmuWzPu1x48EqCF5c2zhanQI3mrugnmLwm
MAnq69E+z1q/5WLOzZEfRGXm98BpS90PC89fWwiKdKciHvTVFO9XLz9pknaeRP4N
uNcGoF0zEB+unAKoQmMI248sQZ1DzQGRC/niZ9SG70xHSdtBQF19B4oNoh27h3jz
j2ZF262PZCL6J5SoEISqXRFkiZbRFR79uwUA5LQRyFWu4gg63wk85+gx8BjxwbPP
bUVtV4IBRScFdVC7Li3Xw5PF8cwfQRf0JAxTdtwSgY9tC2pEjomCkb9mzSMDz78w
CSFl6yNuL44atUmHK0XFCNIJnyoG0hNrIWwOx/zmlYnaX9Iqm6H9LmXaUcV3rg0N
uKaTWuvZQzgxRwbrq0NxH8O/B1LWmdOls4ZGoMboVpTracg6APATXJIaQjm+RKjH
EGtDiihPYP/WbrCg823uVPNHCbyoMcFrZB34ujjO89ObH8BsLJKmnUeQUCw74mok
D92yWr5OAzGJYJFpgUNr
=WYLD
-----END PGP SIGNATURE-----

3
tzdata2016h.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:da1b74fc2dec2ce8b64948dafb0bfc2f923c830d421a7ae4d016226135697a64
size 318714

17
tzdata2016h.tar.gz.asc Normal file
View File

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJYCGLlAAoJEO2X6Q5iqn40FNcP/RX7P5yEnZCRQ4FHHSFg9oIN
Hsbp+7R9J9ap5egW8qPVu4HXzmbIzVbED/iCYWah+OMHI9ivJhRTVgPMhHcGco/k
Qe8cb72EJIFc/N62BJyPoi48XqrDlw7bJGUuP0+bQGDG8Mik6RqTfOw3kUiUZT+y
9d/NfjQv8k/ASVxaag4FTKhcC9GeKHT51GDdFY9cRam4dgADXdqqsDAhPPeBeKrU
hcZEtXaFYZzYvdBjmR7jK/2OYsSGatFeZY5aHxUi4dEmQ2WTv5/3nj6uOe1oHTjw
X+xxrYcqINxPC3ss/VHT1fn8X1gQSsbAo/Vp9M9njdXCXCoOu/pSvpnyS4TZi/a6
CGSeGOr3Bz2hYQ1zIegr1QQgcgaK8LP/kl9IJ7dm6yBLVo0NZulzsJ9hRyZwDgWV
+BhaPt5IZ0ktQNW8vU5HXrF7ic4qGdCKbcZOUr3DJaOcGHN92QpXS2cgvfZN/+8S
uOWGdbCJIcaBmdfe3v9m4I/CKXi8ymb5ZXMDrPwkY6mDokqCG6s6Wfo++zlh1PPT
E3Ix3HXfgYBrmByRxtJFwvI/l0VbzpfvOd4HcKuzWQltR5WYvPzdPB6HHLQGdsj7
2BFVXkFPKm1c0NMwB7u5xxvQiVRn1fjz+nLcP9BgZqASCVtREDu91GbRsNntFjzM
MbBfIJc99AZIjc9hBjeI
=dGny
-----END PGP SIGNATURE-----