From f218fdc66d9077e2e7e5da0eb323089bb025d9a74e0f152c8ab89bfd422f3604 Mon Sep 17 00:00:00 2001 From: Ruediger Meier Date: Mon, 3 Apr 2017 12:56:09 +0000 Subject: [PATCH] Accepting request 484858 from home:rudi_m - fix incompatibility with tzdata/tzcode >= 2017a, 0001-fix-when-printing-zones-transitioning-at-INT_MAX-in-.patch OBS-URL: https://build.opensuse.org/request/show/484858 OBS-URL: https://build.opensuse.org/package/show/utilities/dateutils?expand=0&rev=53 --- ...g-zones-transitioning-at-INT_MAX-in-.patch | 31 +++++++++++++++++++ dateutils.changes | 6 ++++ dateutils.spec | 3 ++ 3 files changed, 40 insertions(+) create mode 100644 0001-fix-when-printing-zones-transitioning-at-INT_MAX-in-.patch diff --git a/0001-fix-when-printing-zones-transitioning-at-INT_MAX-in-.patch b/0001-fix-when-printing-zones-transitioning-at-INT_MAX-in-.patch new file mode 100644 index 0000000..15430e6 --- /dev/null +++ b/0001-fix-when-printing-zones-transitioning-at-INT_MAX-in-.patch @@ -0,0 +1,31 @@ +From 1238f9bac1f652a0e28eab1bed66914dedbcd282 Mon Sep 17 00:00:00 2001 +From: Sebastian Freundt +Date: Mon, 3 Apr 2017 12:13:51 +0000 +Subject: [PATCH] fix, when printing zones transitioning at INT_MAX in + datezone(1) use NEVER indicator + +Signed-off-by: Ruediger Meier +--- + src/dzone.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/dzone.c b/src/dzone.c +index 4fb7769..968fd06 100644 +--- a/src/dzone.c ++++ b/src/dzone.c +@@ -137,8 +137,12 @@ dz_write_nxtr(struct zrng_s r, zif_t z, const char *zn) + /* thank god there's another one */ + struct ztrdtl_s zd = zif_trdtl(z, r.trno + 1); + ++ if (r.next == INT_MAX) { ++ goto never; ++ } + bp += dz_strftr(bp, ep - bp, (struct ztr_s){r.next, zd.offs}); + } else { ++ never: + bp += xstrlcpy(bp, never, bp - ep); + } + +-- +1.8.5.6 + diff --git a/dateutils.changes b/dateutils.changes index a784c72..7c10f8d 100644 --- a/dateutils.changes +++ b/dateutils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 3 12:33:47 UTC 2017 - sweet_f_a@gmx.de + +- fix incompatibility with tzdata/tzcode >= 2017a, + 0001-fix-when-printing-zones-transitioning-at-INT_MAX-in-.patch + ------------------------------------------------------------------- Thu Dec 15 10:27:50 UTC 2016 - sweet_f_a@gmx.de diff --git a/dateutils.spec b/dateutils.spec index d8d84f4..9addfb3 100644 --- a/dateutils.spec +++ b/dateutils.spec @@ -46,6 +46,8 @@ License: BSD-3-Clause Group: Productivity/Text/Utilities Url: https://github.com/hroptatyr/dateutils/ Source: https://bitbucket.org/hroptatyr/dateutils/downloads/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM +Patch1: 0001-fix-when-printing-zones-transitioning-at-INT_MAX-in-.patch BuildRequires: pkgconfig BuildRequires: xz %if 0%{?suse_version} @@ -78,6 +80,7 @@ Dateutils can be used from within matlab or ocatave. %prep %setup -q -n %{name}-%{xversion} +%patch1 -p1 %build %configure \