forked from pool/timezone
Accepting request 204376 from Base:System
Attention: This bug fix is _required_ for openSUSE 13.1 OBS-URL: https://build.opensuse.org/request/show/204376 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/timezone?expand=0&rev=80
This commit is contained in:
commit
e949f56573
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 23 07:36:26 UTC 2013 - werner@suse.de
|
||||||
|
|
||||||
|
- Re-run pre_checkin.sh to prepare timezone-jave.spec
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 14 13:56:20 UTC 2013 - werner@suse.de
|
||||||
|
|
||||||
|
- Add patch tzcode-fromname.patch to correct path expansion for
|
||||||
|
local time link (bnc#845530)
|
||||||
|
- Modify tzcode-link.diff to fit with tzcode-fromname.patch
|
||||||
|
- Modify tzcode-symlink.patch to fit with tzcode-fromname.patch
|
||||||
|
and to avoid broken posixrules if /etc/localtime is a symlink
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 2 23:35:00 UTC 2013 - lchiquitto@suse.com
|
Wed Oct 2 23:35:00 UTC 2013 - lchiquitto@suse.com
|
||||||
|
|
||||||
|
@ -31,6 +31,8 @@ Source: ftp://ftp.iana.org/tz/releases/tzdata%{version}.tar.gz
|
|||||||
Source1: ftp://ftp.iana.org/tz/releases/tzcode%{version}.tar.gz
|
Source1: ftp://ftp.iana.org/tz/releases/tzcode%{version}.tar.gz
|
||||||
Patch0: tzdata-china.diff
|
Patch0: tzdata-china.diff
|
||||||
Patch1: tzcode-zic.diff
|
Patch1: tzcode-zic.diff
|
||||||
|
# PATCH-FIX-OPENSUSE bnc#845530
|
||||||
|
Patch2: tzcode-fromname.patch
|
||||||
Patch3: iso3166-uk.diff
|
Patch3: iso3166-uk.diff
|
||||||
Patch4: tzcode-link.diff
|
Patch4: tzcode-link.diff
|
||||||
Patch5: tzcode-symlink.patch
|
Patch5: tzcode-symlink.patch
|
||||||
@ -54,12 +56,14 @@ package is intended for Java Virtual Machine based on OpenJDK.
|
|||||||
# COMMON-PREP-BEGIN
|
# COMMON-PREP-BEGIN
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%if 0%{?suse_version} < 1220
|
%if 0%{?suse_version} < 1220
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%else
|
%else
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%endif
|
%endif
|
||||||
|
sed -ri 's@/usr/local/etc/zoneinfo@%{_datadir}/zoneinfo@g' *.[1358]
|
||||||
# COMMON-PREP-END
|
# COMMON-PREP-END
|
||||||
# COMMON-PREP-END
|
# COMMON-PREP-END
|
||||||
|
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 14 13:56:20 UTC 2013 - werner@suse.de
|
||||||
|
|
||||||
|
- Add patch tzcode-fromname.patch to correct path expansion for
|
||||||
|
local time link (bnc#845530)
|
||||||
|
- Modify tzcode-link.diff to fit with tzcode-fromname.patch
|
||||||
|
- Modify tzcode-symlink.patch to fit with tzcode-fromname.patch
|
||||||
|
and to avoid broken posixrules if /etc/localtime is a symlink
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 2 23:35:00 UTC 2013 - lchiquitto@suse.com
|
Wed Oct 2 23:35:00 UTC 2013 - lchiquitto@suse.com
|
||||||
|
|
||||||
|
@ -29,6 +29,8 @@ Source: ftp://ftp.iana.org/tz/releases/tzdata%{version}.tar.gz
|
|||||||
Source1: ftp://ftp.iana.org/tz/releases/tzcode%{version}.tar.gz
|
Source1: ftp://ftp.iana.org/tz/releases/tzcode%{version}.tar.gz
|
||||||
Patch0: tzdata-china.diff
|
Patch0: tzdata-china.diff
|
||||||
Patch1: tzcode-zic.diff
|
Patch1: tzcode-zic.diff
|
||||||
|
# PATCH-FIX-OPENSUSE bnc#845530
|
||||||
|
Patch2: tzcode-fromname.patch
|
||||||
Patch3: iso3166-uk.diff
|
Patch3: iso3166-uk.diff
|
||||||
Patch4: tzcode-link.diff
|
Patch4: tzcode-link.diff
|
||||||
Patch5: tzcode-symlink.patch
|
Patch5: tzcode-symlink.patch
|
||||||
@ -48,12 +50,14 @@ can select an appropriate time zone for your system with YaST.
|
|||||||
# COMMON-PREP-BEGIN
|
# COMMON-PREP-BEGIN
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%if 0%{?suse_version} < 1220
|
%if 0%{?suse_version} < 1220
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%else
|
%else
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%endif
|
%endif
|
||||||
|
sed -ri 's@/usr/local/etc/zoneinfo@%{_datadir}/zoneinfo@g' *.[1358]
|
||||||
# COMMON-PREP-END
|
# COMMON-PREP-END
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -63,7 +67,7 @@ LC_ALL=POSIX
|
|||||||
AREA=%{AREA}
|
AREA=%{AREA}
|
||||||
ZONE=%{ZONE}
|
ZONE=%{ZONE}
|
||||||
export AREA LANG LC_ALL ZONE
|
export AREA LANG LC_ALL ZONE
|
||||||
make %{?_smp_mflags} TZDIR=%{_prefix}/share/zoneinfo CFLAGS="$RPM_OPT_FLAGS -DHAVE_GETTEXT=1 -DTZDEFAULT='\"/etc/localtime\"' -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone" AWK=awk
|
make %{?_smp_mflags} TZDIR=%{_datadir}/zoneinfo CFLAGS="$RPM_OPT_FLAGS -DHAVE_GETTEXT=1 -DTZDEFAULT='\"/etc/localtime\"' -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone" AWK=awk
|
||||||
make %{?_smp_mflags} TZDIR=zoneinfo AWK=awk zones
|
make %{?_smp_mflags} TZDIR=zoneinfo AWK=awk zones
|
||||||
# Generate posixrules
|
# Generate posixrules
|
||||||
./zic -y ./yearistype -d zoneinfo -p %{AREA}/%{ZONE}
|
./zic -y ./yearistype -d zoneinfo -p %{AREA}/%{ZONE}
|
||||||
|
24
tzcode-fromname.patch
Normal file
24
tzcode-fromname.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
--- timezone-2013g/zic.c
|
||||||
|
+++ timezone-2013g/zic.c 2013-10-14 13:52:42.070235810 +0000
|
||||||
|
@@ -628,17 +628,17 @@ dolink(const char *const fromfield, cons
|
||||||
|
|
||||||
|
result = link(fromname, toname);
|
||||||
|
if (result != 0) {
|
||||||
|
- const char *s = fromfield;
|
||||||
|
+ const char *s = fromname;
|
||||||
|
const char *t;
|
||||||
|
register char * symlinkcontents = NULL;
|
||||||
|
|
||||||
|
do
|
||||||
|
t = s;
|
||||||
|
while ((s = strchr(s, '/'))
|
||||||
|
- && ! strncmp (fromfield, tofield,
|
||||||
|
- ++s - fromfield));
|
||||||
|
+ && ! strncmp (fromname, tofield,
|
||||||
|
+ ++s - fromname));
|
||||||
|
|
||||||
|
- for (s = tofield + (t - fromfield);
|
||||||
|
+ for (s = tofield + (t - fromname);
|
||||||
|
(s = strchr(s, '/'));
|
||||||
|
s++)
|
||||||
|
symlinkcontents =
|
@ -33,5 +33,5 @@ Index: timezone-2013g/zic.c
|
|||||||
+ if (result != 0)
|
+ if (result != 0)
|
||||||
+ result = copy(fromname, toname);
|
+ result = copy(fromname, toname);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
const char *s = fromfield;
|
const char *s = fromname;
|
||||||
const char *t;
|
const char *t;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
--- timezone-2013g.orig/zic.c
|
--- timezone-2013g/zic.c
|
||||||
+++ timezone-2013g/zic.c
|
+++ timezone-2013g/zic.c 2013-10-14 14:23:08.450235811 +0000
|
||||||
@@ -120,7 +120,7 @@ static int addtype(zic_t gmtoff, const c
|
@@ -120,7 +120,7 @@ static int addtype(zic_t gmtoff, const c
|
||||||
static void leapadd(zic_t t, int positive, int rolling, int count);
|
static void leapadd(zic_t t, int positive, int rolling, int count);
|
||||||
static void adjleap(void);
|
static void adjleap(void);
|
||||||
@ -18,7 +18,7 @@
|
|||||||
if (noise)
|
if (noise)
|
||||||
for (j = 0; j < nlinks; ++j)
|
for (j = 0; j < nlinks; ++j)
|
||||||
if (strcmp(links[i].l_to,
|
if (strcmp(links[i].l_to,
|
||||||
@@ -584,17 +584,17 @@ _("%s: More than one -L option specified
|
@@ -584,18 +584,19 @@ _("%s: More than one -L option specified
|
||||||
}
|
}
|
||||||
if (lcltime != NULL) {
|
if (lcltime != NULL) {
|
||||||
eat("command line", 1);
|
eat("command line", 1);
|
||||||
@ -37,9 +37,22 @@
|
|||||||
-dolink(const char *const fromfield, const char *const tofield)
|
-dolink(const char *const fromfield, const char *const tofield)
|
||||||
+dolink(const char *const fromfield, const char *const tofield, int defaultsymlink)
|
+dolink(const char *const fromfield, const char *const tofield, int defaultsymlink)
|
||||||
{
|
{
|
||||||
|
+ struct stat st;
|
||||||
register char * fromname;
|
register char * fromname;
|
||||||
register char * toname;
|
register char * toname;
|
||||||
@@ -619,15 +619,16 @@ dolink(const char *const fromfield, cons
|
|
||||||
|
@@ -606,6 +607,10 @@ dolink(const char *const fromfield, cons
|
||||||
|
fromname = ecatalloc(fromname, "/");
|
||||||
|
fromname = ecatalloc(fromname, fromfield);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ if (lstat(fromname, &st) == 0 && S_ISLNK(st.st_mode))
|
||||||
|
+ defaultsymlink = TRUE;
|
||||||
|
+
|
||||||
|
if (tofield[0] == '/')
|
||||||
|
toname = ecpyalloc(tofield);
|
||||||
|
else {
|
||||||
|
@@ -619,15 +624,16 @@ dolink(const char *const fromfield, cons
|
||||||
*/
|
*/
|
||||||
if (!itsdir(toname))
|
if (!itsdir(toname))
|
||||||
(void) remove(toname);
|
(void) remove(toname);
|
||||||
@ -56,6 +69,6 @@
|
|||||||
+ if (!defaultsymlink) result = link(fromname, toname);
|
+ if (!defaultsymlink) result = link(fromname, toname);
|
||||||
+
|
+
|
||||||
+ if ((defaultsymlink || (!defaultsymlink && result != 0))) {
|
+ if ((defaultsymlink || (!defaultsymlink && result != 0))) {
|
||||||
const char *s = fromfield;
|
const char *s = fromname;
|
||||||
const char *t;
|
const char *t;
|
||||||
register char * symlinkcontents = NULL;
|
register char * symlinkcontents = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user