- Make zic -l do a copy when hardlinking fails (e.g. because /usr

being on a separate partition) [bnc#607532]

- un-fuzz patches to fix build

OBS-URL: https://build.opensuse.org/package/show/Base:System/timezone?expand=0&rev=27
This commit is contained in:
Petr Baudis 2010-08-24 10:38:30 +00:00 committed by Git OBS Bridge
parent ee069f850c
commit 6616e71e99
7 changed files with 74 additions and 11 deletions

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Aug 24 12:11:51 CEST 2010 - pbaudis@suse.cz
- Make zic -l do a copy when hardlinking fails (e.g. because /usr
being on a separate partition) [bnc#607532]
-------------------------------------------------------------------
Thu Aug 19 18:12:03 CEST 2010 - ro@suse.de
- un-fuzz patches to fix build
-------------------------------------------------------------------
Thu Aug 19 01:18:14 CEST 2010 - pbaudis@suse.cz

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Aug 24 12:11:51 CEST 2010 - pbaudis@suse.cz
- Make zic -l do a copy when hardlinking fails (e.g. because /usr
being on a separate partition) [bnc#607532]
-------------------------------------------------------------------
Thu Aug 19 18:12:03 CEST 2010 - ro@suse.de
- un-fuzz patches to fix build
-------------------------------------------------------------------
Thu Aug 19 01:18:14 CEST 2010 - pbaudis@suse.cz

View File

@ -1,5 +1,5 @@
#
# spec file for package timezone (Version 2010h)
# spec file for package timezone (Version 2010l)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -26,7 +26,7 @@ Url: http://www.gnu.org/software/libc/libc.html
PreReq: filesystem, coreutils
# COMMON-BEGIN
Version: 2010l
Release: 1
Release: 0.<RELEASE8>
Source: tzdata%{version}.tar.gz
Source1: tzcode2010c.tar.gz
# COMMON-END
@ -34,6 +34,7 @@ Patch0: tzdata-china.diff
Patch1: tzcode-zic.diff
Patch2: tzcode-ksh.diff
Patch3: iso3166-uk.diff
Patch4: tzcode-link.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global AREA Etc
%global ZONE UTC
@ -50,6 +51,7 @@ can select an appropriate time zone for your system with YaST.
%patch1
%patch2
%patch3
%patch4
%build
unset ${!LC_*}

View File

@ -1,6 +1,8 @@
--- Makefile~ 2007-08-03 15:06:38.257922000 +0200
+++ Makefile 2007-08-03 15:07:10.983167000 +0200
@@ -362,6 +362,7 @@
Index: Makefile
===================================================================
--- Makefile.orig
+++ Makefile
@@ -357,6 +357,7 @@ date: $(DATEOBJS)
tzselect: tzselect.ksh
sed \

35
tzcode-link.diff Normal file
View File

@ -0,0 +1,35 @@
--- zic.c 2010-01-06 16:21:33.000000000 +0100
+++ zic.c 2010-06-01 01:34:12.000000000 +0200
@@ -614,6 +614,23 @@
return (errors == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
+static int
+copy(fromname, toname)
+const char * const fromname;
+const char * const toname;
+{
+ if (!fork()) {
+ execlp("cp", "cp", fromname, toname);
+ _exit(1);
+ }
+ int s;
+ if (wait(&s) < 0)
+ return -1;
+ if (!WIFEXITED(s))
+ return -1;
+ return -WEXITSTATUS(s);
+}
+
static void
dolink(fromfield, tofield)
const char * const fromfield;
@@ -649,6 +666,8 @@
exit(EXIT_FAILURE);
result = link(fromname, toname);
+ if (result != 0)
+ result = copy(fromname, toname);
#if HAVE_SYMLINK
if (result != 0 &&
access(fromname, F_OK) == 0 &&

View File

@ -1,6 +1,8 @@
--- zic.c
+++ zic.c 2006/01/11 17:41:30
@@ -653,8 +653,10 @@
Index: zic.c
===================================================================
--- zic.c.orig
+++ zic.c
@@ -665,8 +665,10 @@ const char * const tofield;
fromname);
result = symlink(symlinkcontents,
toname);

View File

@ -2,7 +2,7 @@ Index: asia
===================================================================
--- asia.orig
+++ asia
@@ -533,6 +533,9 @@ Zone Asia/Kashgar 5:03:56 - LMT 1928 # o
@@ -531,6 +531,9 @@ Zone Asia/Kashgar 5:03:56 - LMT 1928 # o
# The Japanese surrender of Hong Kong was signed 1945-09-15.
# For lack of anything better, use start of those days as the transition times.
@ -16,7 +16,7 @@ Index: backward
===================================================================
--- backward.orig
+++ backward
@@ -88,12 +88,11 @@ Link America/Mexico_City Mexico/General
@@ -88,14 +88,13 @@ Link America/Mexico_City Mexico/General
Link Pacific/Auckland NZ
Link Pacific/Chatham NZ-CHAT
Link America/Denver Navajo
@ -36,7 +36,7 @@ Index: zone.tab
===================================================================
--- zone.tab.orig
+++ zone.tab
@@ -145,11 +145,12 @@ CK -2114-15946 Pacific/Rarotonga
@@ -146,11 +146,12 @@ CK -2114-15946 Pacific/Rarotonga
CL -3327-07040 America/Santiago most locations
CL -2709-10926 Pacific/Easter Easter Island & Sala y Gomez
CM +0403+00942 Africa/Douala