From 663103c2f11d6ca9ef76cadcbd1950c6ab6e0dc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Thu, 20 Oct 2016 12:21:38 +0200 Subject: [PATCH] Resolves: BZ#1387067 - golang-1.7.3 is available added fix for tests failing with latest tzdata --- .gitignore | 1 + golang.spec | 15 ++++++++++++--- sources | 2 +- tzdata-fix.patch | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 tzdata-fix.patch diff --git a/.gitignore b/.gitignore index b01c064..43a2a7e 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ /go1.7rc5.src.tar.gz /go1.7.src.tar.gz /go1.7.1.src.tar.gz +/go1.7.3.src.tar.gz diff --git a/golang.spec b/golang.spec index 3aa8dc0..4e30243 100644 --- a/golang.spec +++ b/golang.spec @@ -87,11 +87,11 @@ %endif %global go_api 1.7 -%global go_version 1.7.1 +%global go_version 1.7.3 Name: golang -Version: 1.7.1 -Release: 2%{?dist} +Version: 1.7.3 +Release: 1%{?dist} Summary: The Go Programming Language # source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain License: BSD and Public Domain @@ -137,6 +137,9 @@ Patch215: ./go1.5-zoneinfo_testing_only.patch Patch216: ppc64x-overflow-1.patch Patch217: ppc64x-overflow-2.patch +# Fix for https://github.com/golang/go/issues/17276 +Patch218: tzdata-fix.patch + # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -265,6 +268,8 @@ Summary: Golang shared object libraries %patch216 -p1 %patch217 -p1 +%patch218 -p1 + %build # print out system information uname -a @@ -481,6 +486,10 @@ fi %endif %changelog +* Thu Oct 20 2016 Jakub Čajka - 1.7.3-1 +- Resolves: BZ#1387067 - golang-1.7.3 is available +- added fix for tests failing with latest tzdata + * Fri Sep 23 2016 Jakub Čajka - 1.7.1-2 - fix link failure due to relocation overflows on PPC64X diff --git a/sources b/sources index f3a3cd9..8390332 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -433e2158e5c28fe24b11622df393cc46 go1.7.1.src.tar.gz +83d1b7bd4281479ab7d153e5152c9fc9 go1.7.3.src.tar.gz diff --git a/tzdata-fix.patch b/tzdata-fix.patch new file mode 100644 index 0000000..b7e6e41 --- /dev/null +++ b/tzdata-fix.patch @@ -0,0 +1,34 @@ +From c5434f2973a87acff76bac359236e690d632ce95 Mon Sep 17 00:00:00 2001 +From: Alberto Donizetti +Date: Thu, 29 Sep 2016 13:59:10 +0200 +Subject: [PATCH] time: update test for tzdata-2016g + +Fixes #17276 + +Change-Id: I0188cf9bc5fdb48c71ad929cc54206d03e0b96e4 +Reviewed-on: https://go-review.googlesource.com/29995 +Reviewed-by: Brad Fitzpatrick +Run-TryBot: Brad Fitzpatrick +TryBot-Result: Gobot Gobot +--- + src/time/time_test.go | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/time/time_test.go b/src/time/time_test.go +index 68236fd..2e47d08 100644 +--- a/src/time/time_test.go ++++ b/src/time/time_test.go +@@ -943,8 +943,11 @@ func TestLoadFixed(t *testing.T) { + // but Go and most other systems use "east is positive". + // So GMT+1 corresponds to -3600 in the Go zone, not +3600. + name, offset := Now().In(loc).Zone() +- if name != "GMT+1" || offset != -1*60*60 { +- t.Errorf("Now().In(loc).Zone() = %q, %d, want %q, %d", name, offset, "GMT+1", -1*60*60) ++ // The zone abbreviation is "-01" since tzdata-2016g, and "GMT+1" ++ // on earlier versions; we accept both. (Issue #17276). ++ if !(name == "GMT+1" || name == "-01") || offset != -1*60*60 { ++ t.Errorf("Now().In(loc).Zone() = %q, %d, want %q or %q, %d", ++ name, offset, "GMT+1", "-01", -1*60*60) + } + } +