SHA256
3
0
forked from pool/timezone

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

bsc#1003324

OBS-URL: https://build.opensuse.org/request/show/433595
OBS-URL: https://build.opensuse.org/package/show/Base:System/timezone?expand=0&rev=194
This commit is contained in:
Andreas Stieger 2016-10-06 13:43:29 +00:00 committed by Git OBS Bridge
parent 6b65c89862
commit 8430356157
5 changed files with 79 additions and 42 deletions

View File

@ -1,10 +1,5 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Sep 28 19:41:23 UTC 2016 - astieger@suse.com Thu Oct 6 13:38:20 UTC 2016 - astieger@suse.com
- use IANA released tarballs, verify signature
-------------------------------------------------------------------
Fri Sep 16 12:08:42 UTC 2016 - astieger@suse.com
- timezone update 2016g: - timezone update 2016g:
* Turkey will remain on UTC+03 after 2016-10-30 bsc#997830 * Turkey will remain on UTC+03 after 2016-10-30 bsc#997830
@ -19,22 +14,22 @@ Fri Sep 16 12:08:42 UTC 2016 - astieger@suse.com
+ If the installed localtime and/or posixrules files are + If the installed localtime and/or posixrules files are
symbolic links, zic now keeps them symbolic links when symbolic links, zic now keeps them symbolic links when
updating them, for compatibility with platforms like updating them, for compatibility with platforms like
OpenSUSE where other programs configure these files as openSUSE where other programs configure these files as
symlinks. symlinks.
+ zic now avoids hard linking to symbolic links, avoids + zic now avoids hard linking to symbolic links, avoids
some unnecessary mkdir and stat system calls, and uses some unnecessary mkdir and stat system calls, and uses
shorter file names internally. shorter file names internally.
+ Drop the patches: + Drop the patches:
tzcode-fromname.patch
tzcode-link.diff tzcode-link.diff
tzcode-revert-01-8c9cb9580.patch tzcode-revert-01-8c9cb9580.patch
tzcode-revert-02-301f794f3.patch tzcode-revert-02-301f794f3.patch
tzcode-revert-03-39fd078a6.patch tzcode-revert-03-39fd078a6.patch
tzcode-symlink.patch tzcode-symlink.patch
tzcode-zic.diff tzcode-zic.diff
+ tzcode-fromname.patch was updated to continue ensure correct
path exansion, preventing bsc#1003324
* zdump has a new -i option to generate transitions in a * zdump has a new -i option to generate transitions in a
more-compact but still human-readable format. (experimental) more-compact but still human-readable format. (experimental)
- Drop upstream signatures and keyring, tarball generated from git
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Aug 8 17:29:14 UTC 2016 - astieger@suse.com Mon Aug 8 17:29:14 UTC 2016 - astieger@suse.com

View File

@ -35,6 +35,7 @@ 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: tzcode-fromname.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
@ -56,6 +57,7 @@ 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,10 +1,5 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Sep 28 19:41:23 UTC 2016 - astieger@suse.com Thu Oct 6 13:38:20 UTC 2016 - astieger@suse.com
- use IANA released tarballs, verify signature
-------------------------------------------------------------------
Fri Sep 16 12:08:42 UTC 2016 - astieger@suse.com
- timezone update 2016g: - timezone update 2016g:
* Turkey will remain on UTC+03 after 2016-10-30 bsc#997830 * Turkey will remain on UTC+03 after 2016-10-30 bsc#997830
@ -19,22 +14,22 @@ Fri Sep 16 12:08:42 UTC 2016 - astieger@suse.com
+ If the installed localtime and/or posixrules files are + If the installed localtime and/or posixrules files are
symbolic links, zic now keeps them symbolic links when symbolic links, zic now keeps them symbolic links when
updating them, for compatibility with platforms like updating them, for compatibility with platforms like
OpenSUSE where other programs configure these files as openSUSE where other programs configure these files as
symlinks. symlinks.
+ zic now avoids hard linking to symbolic links, avoids + zic now avoids hard linking to symbolic links, avoids
some unnecessary mkdir and stat system calls, and uses some unnecessary mkdir and stat system calls, and uses
shorter file names internally. shorter file names internally.
+ Drop the patches: + Drop the patches:
tzcode-fromname.patch
tzcode-link.diff tzcode-link.diff
tzcode-revert-01-8c9cb9580.patch tzcode-revert-01-8c9cb9580.patch
tzcode-revert-02-301f794f3.patch tzcode-revert-02-301f794f3.patch
tzcode-revert-03-39fd078a6.patch tzcode-revert-03-39fd078a6.patch
tzcode-symlink.patch tzcode-symlink.patch
tzcode-zic.diff tzcode-zic.diff
+ tzcode-fromname.patch was updated to continue ensure correct
path exansion, preventing bsc#1003324
* zdump has a new -i option to generate transitions in a * zdump has a new -i option to generate transitions in a
more-compact but still human-readable format. (experimental) more-compact but still human-readable format. (experimental)
- Drop upstream signatures and keyring, tarball generated from git
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Aug 8 17:29:14 UTC 2016 - astieger@suse.com Mon Aug 8 17:29:14 UTC 2016 - astieger@suse.com

View File

@ -33,6 +33,7 @@ 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: tzcode-fromname.patch
# COMMON-END # COMMON-END
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -50,6 +51,7 @@ 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,27 +1,70 @@
Index: timezone-2016b/zic.c From: Andreas Stieger <astieger@suse.com>
=================================================================== Date: Thu, 06 Oct 2016 13:26:04 +0000
--- timezone-2016b.orig/zic.c References: bsc#845530 bsc#1003324
+++ timezone-2016b/zic.c
@@ -768,7 +768,7 @@ dolink(char const *fromfield, char const
result = link(fromname, toname); This patch ensures correct path expansion for the local time zone link.
if (result != 0) {
The 2016g release re-worked much of the code, however the problem
with broken symlinks remain.
Brought up on mailing list:
http://mm.icann.org/pipermail/tz/2016-October/024280.html
Index: timezone-2016g/zic.c
===================================================================
--- timezone-2016g.orig/zic.c 2016-09-06 04:39:50.000000000 +0000
+++ timezone-2016g/zic.c 2016-10-06 13:18:13.752297564 +0000
@@ -764,12 +764,32 @@ namecheck(const char *name)
return componentcheck(name, component, cp);
}
+static char *
+relname(char const *dir, char const *base)
+{
+ if (*base == '/')
+ return ecpyalloc(base);
+ else {
+ size_t dir_len = strlen(dir);
+ bool needs_slash = dir_len && dir[dir_len - 1] != '/';
+ char *result = emalloc(dir_len + needs_slash + strlen(base) + 1);
+ result[dir_len] = '/';
+ strcpy(result + dir_len + needs_slash, base);
+ return memcpy(result, dir, dir_len);
+ }
+}
+
static void
dolink(char const *fromfield, char const *tofield, bool staysymlink)
{
register int fromisdir;
bool todirs_made = false;
int link_errno;
+ register char * fromname;
+ register char * toname;
+
+ fromname = relname(directory, fromfield);
+ toname = relname(directory, tofield);
/*
** We get to be careful here since
@@ -800,7 +820,7 @@ dolink(char const *fromfield, char const
link_errno = link(fromfield, tofield) == 0 ? 0 : errno;
}
if (link_errno != 0) {
- const char *s = fromfield; - const char *s = fromfield;
+ const char *s = fromname; + const char *s = fromname;
const char *t; const char *t;
char *p; char *p;
size_t dotdots = 0; size_t dotdots = 0;
@@ -777,10 +777,10 @@ dolink(char const *fromfield, char const @@ -810,9 +830,9 @@ dolink(char const *fromfield, char const
do do
t = s; t = s;
while ((s = strchr(s, '/')) while ((s = strchr(s, '/'))
- && ! strncmp (fromfield, tofield, - && strncmp(fromfield, tofield, ++s - fromfield) == 0);
- ++s - fromfield)); + && strncmp(fromname, tofield, ++s - fromname) == 0);
+ && ! strncmp (fromname, tofield,
+ ++s - fromname));
- for (s = tofield + (t - fromfield); *s; s++) - for (s = tofield + (t - fromfield); *s; s++)
+ for (s = tofield + (t - fromname); *s; s++) + for (s = tofield + (t - fromname); *s; s++)
dotdots += *s == '/'; dotdots += *s == '/';
symlinkcontents symlinkcontents = emalloc(3 * dotdots + strlen(t) + 1);
= emalloc(3 * dotdots + strlen(t) + 1); for (p = symlinkcontents; dotdots-- != 0; p += 3)