diff --git a/.gitignore b/.gitignore index ec82f39..6969e5f 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ /go1.7.1.src.tar.gz /go1.7.3.src.tar.gz /go1.7.4.src.tar.gz +/go1.7.6.src.tar.gz diff --git a/golang.spec b/golang.spec index 35324fe..6b72c37 100644 --- a/golang.spec +++ b/golang.spec @@ -44,10 +44,10 @@ %endif %global go_api 1.7 -%global go_version 1.7.4 +%global go_version 1.7.6 Name: golang -Version: 1.7.4 +Version: 1.7.6 Release: 1%{?dist} Summary: The Go Programming Language # source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain @@ -86,7 +86,6 @@ 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 @@ -444,6 +443,11 @@ fi %endif %changelog +* Thu Jun 15 2017 Jakub Čajka - 1.7.4-1 +- Bump to 1.7.6 +- Fix for CVE-2017-8932 +- Resolves: BZ#1455190 + * Mon Dec 05 2016 Jakub Čajka - 1.7.4-1 - Bump to 1.7.4 - Resolves: BZ#1400732 diff --git a/sources b/sources index a66d54c..2eb8220 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -49c1076428a5d3b5ad7ac65233fcca2f go1.7.4.src.tar.gz +SHA512 (go1.7.6.src.tar.gz) = b01846bfb17bf91a9c493c4d6c43bbe7e17270b9e8a229a2be4032b78ef9395f5512917ea9faab74a120c755bbd53bbd816b033caadcbb7679e91702b37f8c7f diff --git a/tzdata-fix.patch b/tzdata-fix.patch index b7e6e41..8fb9f40 100644 --- a/tzdata-fix.patch +++ b/tzdata-fix.patch @@ -1,34 +1,97 @@ -From c5434f2973a87acff76bac359236e690d632ce95 Mon Sep 17 00:00:00 2001 +From 8890527476e25747f063377d637b106db0008329 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 +Date: Thu, 9 Mar 2017 13:20:54 +0100 +Subject: [PATCH] [release-branch.go1.8] time: make the ParseInLocation test + more robust -Fixes #17276 +The tzdata 2017a update (2017-02-28) changed the abbreviation of the +Asia/Baghdad time zone (used in TestParseInLocation) from 'AST' to the +numeric '+03'. -Change-Id: I0188cf9bc5fdb48c71ad929cc54206d03e0b96e4 -Reviewed-on: https://go-review.googlesource.com/29995 -Reviewed-by: Brad Fitzpatrick -Run-TryBot: Brad Fitzpatrick +Update the test so that it skips the checks if we're using a recent +tzdata release. + +Fixes #19457 + +Change-Id: I45d705a5520743a611bdd194dc8f8d618679980c +Reviewed-on: https://go-review.googlesource.com/37964 +Reviewed-by: Ian Lance Taylor +Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot +(cherry picked from commit 91563ced5897faf729a34be7081568efcfedda31) +Reviewed-on: https://go-review.googlesource.com/37991 +Run-TryBot: Brad Fitzpatrick --- - src/time/time_test.go | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) + src/time/format_test.go | 41 +++++++++++++++++++++++++++++++---------- + 1 file changed, 31 insertions(+), 10 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) +diff --git a/src/time/format_test.go b/src/time/format_test.go +index 219c2ca..d0013bc 100644 +--- a/src/time/format_test.go ++++ b/src/time/format_test.go +@@ -245,27 +245,45 @@ func TestParseDayOutOfRange(t *testing.T) { } } ++// TestParseInLocation checks that the Parse and ParseInLocation ++// functions do not get confused by the fact that AST (Arabia Standard ++// Time) and AST (Atlantic Standard Time) are different time zones, ++// even though they have the same abbreviation. ++// ++// ICANN has been slowly phasing out invented abbreviation in favor of ++// numeric time zones (for example, the Asia/Baghdad time zone ++// abbreviation got changed from AST to +03 in the 2017a tzdata ++// release); but we still want to make sure that the time package does ++// not get confused on systems with slightly older tzdata packages. + func TestParseInLocation(t *testing.T) { +- // Check that Parse (and ParseInLocation) understand that +- // Feb 01 AST (Arabia Standard Time) and Feb 01 AST (Atlantic Standard Time) +- // are in different time zones even though both are called AST + + baghdad, err := LoadLocation("Asia/Baghdad") + if err != nil { + t.Fatal(err) + } + +- t1, err := ParseInLocation("Jan 02 2006 MST", "Feb 01 2013 AST", baghdad) ++ var t1, t2 Time ++ ++ t1, err = ParseInLocation("Jan 02 2006 MST", "Feb 01 2013 AST", baghdad) + if err != nil { + t.Fatal(err) + } +- t2 := Date(2013, February, 1, 00, 00, 00, 0, baghdad) +- if t1 != t2 { +- t.Fatalf("ParseInLocation(Feb 01 2013 AST, Baghdad) = %v, want %v", t1, t2) +- } ++ + _, offset := t1.Zone() +- if offset != 3*60*60 { +- t.Fatalf("ParseInLocation(Feb 01 2013 AST, Baghdad).Zone = _, %d, want _, %d", offset, 3*60*60) ++ ++ // A zero offset means that ParseInLocation did not recognize the ++ // 'AST' abbreviation as matching the current location (Baghdad, ++ // where we'd expect a +03 hrs offset); likely because we're using ++ // a recent tzdata release (2017a or newer). ++ // If it happens, skip the Baghdad test. ++ if offset != 0 { ++ t2 = Date(2013, February, 1, 00, 00, 00, 0, baghdad) ++ if t1 != t2 { ++ t.Fatalf("ParseInLocation(Feb 01 2013 AST, Baghdad) = %v, want %v", t1, t2) ++ } ++ if offset != 3*60*60 { ++ t.Fatalf("ParseInLocation(Feb 01 2013 AST, Baghdad).Zone = _, %d, want _, %d", offset, 3*60*60) ++ } + } + + blancSablon, err := LoadLocation("America/Blanc-Sablon") +@@ -273,6 +291,9 @@ func TestParseInLocation(t *testing.T) { + t.Fatal(err) + } + ++ // In this case 'AST' means 'Atlantic Standard Time', and we ++ // expect the abbreviation to correctly match the american ++ // location. + t1, err = ParseInLocation("Jan 02 2006 MST", "Feb 01 2013 AST", blancSablon) + if err != nil { + t.Fatal(err)