From 371df34265a3aa06bd6c328fcf38bb83f92a9eaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Thu, 3 May 2018 15:17:35 +0200 Subject: [PATCH] Rebase to 1.9.6 --- .gitignore | 1 + ...1-Make-build-little-bit-more-verbose.patch | 23 +++- ...=> 0002-Don-t-use-the-bundled-tzdata.patch | 14 +- ...expose-IfInfomsg.X__ifi_pad-on-s390x.patch | 13 +- ...h => 0004-Ignore-L0-A-during-linking.patch | 14 +- ...s-github.com-golang-go-commit-ca8c36.patch | 24 +++- ...testcarchive-use-no-pie-where-needed.patch | 11 +- 31bit-OID-asn1.patch | 83 ------------ CVE-2018-7187.patch | 124 ------------------ golang-1.5-bootstrap-binary-path.patch | 61 --------- golang.spec | 51 +++---- sources | 2 +- 12 files changed, 98 insertions(+), 323 deletions(-) rename golang-1.2-verbose-build.patch => 0001-Make-build-little-bit-more-verbose.patch (58%) rename go1.5-zoneinfo_testing_only.patch => 0002-Don-t-use-the-bundled-tzdata.patch (65%) rename s390x-expose-IfInfomsg-X__ifi_pad.patch => 0003-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch (69%) rename s390x-ignore-L0syms.patch => 0004-Ignore-L0-A-during-linking.patch (69%) rename use-buildmode-pie-for-pie-testing.patch => 0005-Backport-of-https-github.com-golang-go-commit-ca8c36.patch (68%) rename use-no-pie-where-needed.patch => 0006-misc-cgo-testcarchive-use-no-pie-where-needed.patch (89%) delete mode 100644 31bit-OID-asn1.patch delete mode 100644 CVE-2018-7187.patch delete mode 100644 golang-1.5-bootstrap-binary-path.patch diff --git a/.gitignore b/.gitignore index 0218b4d..85c8935 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,4 @@ /go1.9.3.src.tar.gz /go1.9.4.src.tar.gz /go1.9.5.src.tar.gz +/go1.9.6.src.tar.gz diff --git a/golang-1.2-verbose-build.patch b/0001-Make-build-little-bit-more-verbose.patch similarity index 58% rename from golang-1.2-verbose-build.patch rename to 0001-Make-build-little-bit-more-verbose.patch index c9dbba2..b6e0343 100644 --- a/golang-1.2-verbose-build.patch +++ b/0001-Make-build-little-bit-more-verbose.patch @@ -1,7 +1,17 @@ -diff -up go/src/make.bash.verbose go/src/make.bash ---- go/src/make.bash.verbose 2017-07-11 12:00:09.513553508 +0200 -+++ go/src/make.bash 2017-07-11 12:01:25.288245720 +0200 -@@ -167,7 +167,7 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH +From 2f52dca801a86a729fb69dc9123d111a9e995895 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jakub=20=C4=8Cajka?= +Date: Thu, 22 Mar 2018 12:39:16 +0100 +Subject: [PATCH 1/6] Make build little bit more verbose + +--- + src/make.bash | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/make.bash b/src/make.bash +index 71e75318f2..14c4424392 100755 +--- a/src/make.bash ++++ b/src/make.bash +@@ -167,7 +167,7 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, # use the host compiler, CC, from `cmd/dist/dist env` instead. CC=$CC GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \ @@ -10,7 +20,7 @@ diff -up go/src/make.bash.verbose go/src/make.bash echo fi -@@ -175,7 +175,7 @@ echo "##### Building packages and comman +@@ -175,7 +175,7 @@ echo "##### Building packages and commands for $GOOS/$GOARCH." old_bin_files=$(cd $GOROOT/bin && echo *) @@ -19,3 +29,6 @@ diff -up go/src/make.bash.verbose go/src/make.bash # Check that there are no new files in $GOROOT/bin other than go and gofmt # and $GOOS_$GOARCH (a directory used when cross-compiling). +-- +2.14.3 + diff --git a/go1.5-zoneinfo_testing_only.patch b/0002-Don-t-use-the-bundled-tzdata.patch similarity index 65% rename from go1.5-zoneinfo_testing_only.patch rename to 0002-Don-t-use-the-bundled-tzdata.patch index 3e9cb5f..7a01b48 100644 --- a/go1.5-zoneinfo_testing_only.patch +++ b/0002-Don-t-use-the-bundled-tzdata.patch @@ -1,5 +1,14 @@ +From 63c8189910c1cc2a45a7fb21fbc5c516ce01f46c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jakub=20=C4=8Cajka?= +Date: Thu, 22 Mar 2018 12:41:12 +0100 +Subject: [PATCH 2/6] Don't use the bundled tzdata + +--- + src/time/zoneinfo_unix.go | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + diff --git a/src/time/zoneinfo_unix.go b/src/time/zoneinfo_unix.go -index ed9502d..c2569e7 100644 +index bbf263a16f..ec14bc0f7b 100644 --- a/src/time/zoneinfo_unix.go +++ b/src/time/zoneinfo_unix.go @@ -32,14 +32,14 @@ var zoneDirs = []string{ @@ -19,3 +28,6 @@ index ed9502d..c2569e7 100644 if zipOnly { for i := 0; i < len(zoneDirs)-1; i++ { zoneDirs[i] = "/XXXNOEXIST" +-- +2.14.3 + diff --git a/s390x-expose-IfInfomsg-X__ifi_pad.patch b/0003-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch similarity index 69% rename from s390x-expose-IfInfomsg-X__ifi_pad.patch rename to 0003-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch index ec53077..eabd27a 100644 --- a/s390x-expose-IfInfomsg-X__ifi_pad.patch +++ b/0003-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch @@ -1,7 +1,7 @@ -From 84b8c9ceaa5257f7ff4ab059ff208246ecdfe9d9 Mon Sep 17 00:00:00 2001 +From d53a3784bbeab6ac7405c88e56528024061d2ef2 Mon Sep 17 00:00:00 2001 From: Michael Munday Date: Tue, 17 Jan 2017 11:33:38 -0500 -Subject: [PATCH] syscall: expose IfInfomsg.X__ifi_pad on s390x +Subject: [PATCH 3/6] syscall: expose IfInfomsg.X__ifi_pad on s390x Exposing this field on s390x improves compatibility with the other linux architectures, all of which already expose it. @@ -10,12 +10,14 @@ Fixes #18628 and updates #18632. Change-Id: I08e8e1eb705f898cd8822f8bee0d61ce11d514b5 --- + src/syscall/ztypes_linux_s390x.go | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/syscall/ztypes_linux_s390x.go b/src/syscall/ztypes_linux_s390x.go -index 63c4a83..b589425 100644 +index 63c4a83b19..b5894255df 100644 --- a/src/syscall/ztypes_linux_s390x.go +++ b/src/syscall/ztypes_linux_s390x.go -@@ -449,12 +449,12 @@ +@@ -449,12 +449,12 @@ type RtAttr struct { } type IfInfomsg struct { @@ -34,3 +36,6 @@ index 63c4a83..b589425 100644 } type IfAddrmsg struct { +-- +2.14.3 + diff --git a/s390x-ignore-L0syms.patch b/0004-Ignore-L0-A-during-linking.patch similarity index 69% rename from s390x-ignore-L0syms.patch rename to 0004-Ignore-L0-A-during-linking.patch index a6c65e0..4a88532 100644 --- a/s390x-ignore-L0syms.patch +++ b/0004-Ignore-L0-A-during-linking.patch @@ -1,5 +1,14 @@ +From a170a330e0598ad67240a4080a2ab185491884f5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jakub=20=C4=8Cajka?= +Date: Thu, 22 Mar 2018 12:42:33 +0100 +Subject: [PATCH 4/6] Ignore L0^A during linking + +--- + src/cmd/link/internal/ld/ldelf.go | 7 +++++++ + 1 file changed, 7 insertions(+) + diff --git a/src/cmd/link/internal/ld/ldelf.go b/src/cmd/link/internal/ld/ldelf.go -index d4f9fc4..87dabaa 100644 +index d4f9fc44d7..9b02bf5d36 100644 --- a/src/cmd/link/internal/ld/ldelf.go +++ b/src/cmd/link/internal/ld/ldelf.go @@ -799,6 +799,13 @@ func ldelf(ctxt *Link, f *bio.Reader, pkg string, length int64, pn string) { @@ -16,3 +25,6 @@ index d4f9fc4..87dabaa 100644 if strings.HasPrefix(sym.name, ".LASF") { // gcc on s390x does this continue } +-- +2.14.3 + diff --git a/use-buildmode-pie-for-pie-testing.patch b/0005-Backport-of-https-github.com-golang-go-commit-ca8c36.patch similarity index 68% rename from use-buildmode-pie-for-pie-testing.patch rename to 0005-Backport-of-https-github.com-golang-go-commit-ca8c36.patch index 9f0db0e..c9a68c7 100644 --- a/use-buildmode-pie-for-pie-testing.patch +++ b/0005-Backport-of-https-github.com-golang-go-commit-ca8c36.patch @@ -1,7 +1,18 @@ -diff -up go/src/cmd/dist/test.go.pie go/src/cmd/dist/test.go ---- go/src/cmd/dist/test.go.pie 2017-10-25 20:30:21.000000000 +0200 -+++ go/src/cmd/dist/test.go 2017-11-03 16:47:55.290829798 +0100 -@@ -852,6 +852,16 @@ func (t *tester) supportedBuildmode(mode +From 6d91532e4da10746ced62f714783017f682f83e1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jakub=20=C4=8Cajka?= +Date: Thu, 22 Mar 2018 12:44:25 +0100 +Subject: [PATCH 5/6] Backport of + https://github.com/golang/go/commit/ca8c361d867d62bd46013c5abbaaad0b2ca6077f + +--- + src/cmd/dist/test.go | 30 ++++++++++++++++-------------- + 1 file changed, 16 insertions(+), 14 deletions(-) + +diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go +index 73432d31ea..ed7151ab66 100644 +--- a/src/cmd/dist/test.go ++++ b/src/cmd/dist/test.go +@@ -852,6 +852,16 @@ func (t *tester) supportedBuildmode(mode string) bool { return true } return false @@ -18,7 +29,7 @@ diff -up go/src/cmd/dist/test.go.pie go/src/cmd/dist/test.go default: log.Fatalf("internal error: unknown buildmode %s", mode) return false -@@ -953,24 +963,16 @@ func (t *tester) cgoTest(dt *distTest) e +@@ -953,24 +963,16 @@ func (t *tester) cgoTest(dt *distTest) error { } } @@ -49,3 +60,6 @@ diff -up go/src/cmd/dist/test.go.pie go/src/cmd/dist/test.go } } } +-- +2.14.3 + diff --git a/use-no-pie-where-needed.patch b/0006-misc-cgo-testcarchive-use-no-pie-where-needed.patch similarity index 89% rename from use-no-pie-where-needed.patch rename to 0006-misc-cgo-testcarchive-use-no-pie-where-needed.patch index e970498..0a65eaf 100644 --- a/use-no-pie-where-needed.patch +++ b/0006-misc-cgo-testcarchive-use-no-pie-where-needed.patch @@ -1,7 +1,7 @@ -From 3502496d03bcd842fd7aac95ec0d7096d581cd26 Mon Sep 17 00:00:00 2001 +From 0c99703e993fe8a68bdf311b51bfe7b03b9eced0 Mon Sep 17 00:00:00 2001 From: Lynn Boger Date: Wed, 11 Oct 2017 16:02:59 -0400 -Subject: [PATCH] misc/cgo/testcarchive: use -no-pie where needed +Subject: [PATCH 6/6] misc/cgo/testcarchive: use -no-pie where needed Starting in gcc 6, -pie is passed to the linker by default on some platforms, including ppc64le. If the objects @@ -22,7 +22,7 @@ Reviewed-by: Ian Lance Taylor 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/misc/cgo/testcarchive/carchive_test.go b/misc/cgo/testcarchive/carchive_test.go -index b5123154e79..ac637c06007 100644 +index 74897c7f6f..958d9d739e 100644 --- a/misc/cgo/testcarchive/carchive_test.go +++ b/misc/cgo/testcarchive/carchive_test.go @@ -6,6 +6,7 @@ package carchive_test @@ -33,7 +33,7 @@ index b5123154e79..ac637c06007 100644 "debug/elf" "fmt" "io/ioutil" -@@ -609,9 +610,26 @@ func TestCompileWithoutShared(t *testing.T) { +@@ -605,9 +606,26 @@ func TestCompileWithoutShared(t *testing.T) { } exe := "./testnoshared" + exeSuffix @@ -61,3 +61,6 @@ index b5123154e79..ac637c06007 100644 t.Logf("%s", out) if err != nil { t.Fatal(err) +-- +2.14.3 + diff --git a/31bit-OID-asn1.patch b/31bit-OID-asn1.patch deleted file mode 100644 index 4d01b3d..0000000 --- a/31bit-OID-asn1.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 94aba76639cf4d5e30975d846bb0368db8202269 Mon Sep 17 00:00:00 2001 -From: Monis Khan -Date: Wed, 12 Apr 2017 16:00:58 -0400 -Subject: [PATCH] encoding/asn1: support 31 bit identifiers with OID - -The current implementation uses a max of 28 bits when decoding an -ObjectIdentifier. This change makes it so that an int64 is used to -accumulate up to 35 bits. If the resulting data would not overflow -an int32, it is used as an int. Thus up to 31 bits may be used to -represent each subidentifier of an ObjectIdentifier. - -Fixes #19933 - -Change-Id: I95d74b64b24cdb1339ff13421055bce61c80243c -Reviewed-on: https://go-review.googlesource.com/40436 -Reviewed-by: Adam Langley -Run-TryBot: Adam Langley ---- - src/encoding/asn1/asn1.go | 15 ++++++++++++--- - src/encoding/asn1/asn1_test.go | 3 +++ - 2 files changed, 15 insertions(+), 3 deletions(-) - -diff --git a/src/encoding/asn1/asn1.go b/src/encoding/asn1/asn1.go -index c2c0ee420ac..65f018d0148 100644 ---- a/src/encoding/asn1/asn1.go -+++ b/src/encoding/asn1/asn1.go -@@ -22,6 +22,7 @@ package asn1 - import ( - "errors" - "fmt" -+ "math" - "math/big" - "reflect" - "strconv" -@@ -293,16 +294,24 @@ type Flag bool - // given byte slice. It returns the value and the new offset. - func parseBase128Int(bytes []byte, initOffset int) (ret, offset int, err error) { - offset = initOffset -+ var ret64 int64 - for shifted := 0; offset < len(bytes); shifted++ { -- if shifted == 4 { -+ // 5 * 7 bits per byte == 35 bits of data -+ // Thus the representation is either non-minimal or too large for an int32 -+ if shifted == 5 { - err = StructuralError{"base 128 integer too large"} - return - } -- ret <<= 7 -+ ret64 <<= 7 - b := bytes[offset] -- ret |= int(b & 0x7f) -+ ret64 |= int64(b & 0x7f) - offset++ - if b&0x80 == 0 { -+ ret = int(ret64) -+ // Ensure that the returned value fits in an int on all platforms -+ if ret64 > math.MaxInt32 { -+ err = StructuralError{"base 128 integer too large"} -+ } - return - } - } -diff --git a/src/encoding/asn1/asn1_test.go b/src/encoding/asn1/asn1_test.go -index 9976656df89..2dd799f2362 100644 ---- a/src/encoding/asn1/asn1_test.go -+++ b/src/encoding/asn1/asn1_test.go -@@ -7,6 +7,7 @@ package asn1 - import ( - "bytes" - "fmt" -+ "math" - "math/big" - "reflect" - "strings" -@@ -386,6 +387,8 @@ var tagAndLengthData = []tagAndLengthTest{ - {[]byte{0xa0, 0x81, 0x7f}, false, tagAndLength{}}, - // Tag numbers which would overflow int32 are rejected. (The value below is 2^31.) - {[]byte{0x1f, 0x88, 0x80, 0x80, 0x80, 0x00, 0x00}, false, tagAndLength{}}, -+ // Tag numbers that fit in an int32 are valid. (The value below is 2^31 - 1.) -+ {[]byte{0x1f, 0x87, 0xFF, 0xFF, 0xFF, 0x7F, 0x00}, true, tagAndLength{tag: math.MaxInt32}}, - // Long tag number form may not be used for tags that fit in short form. - {[]byte{0x1f, 0x1e, 0x00}, false, tagAndLength{}}, - } diff --git a/CVE-2018-7187.patch b/CVE-2018-7187.patch deleted file mode 100644 index 591ba32..0000000 --- a/CVE-2018-7187.patch +++ /dev/null @@ -1,124 +0,0 @@ -From c941e27e70c3e06e1011d2dd71d72a7a06a9bcbc Mon Sep 17 00:00:00 2001 -From: Ian Lance Taylor -Date: Thu, 15 Feb 2018 15:57:13 -0800 -Subject: [PATCH] cmd/go: restrict meta imports to valid schemes - -Before this change, when using -insecure, we permitted any meta import -repo root as long as it contained "://". When not using -insecure, we -restrict meta import repo roots to be valid URLs. People may depend on -that somehow, so permit meta import repo roots to be invalid URLs, but -require them to have valid schemes per RFC 3986. - -Fixes #23867 - -Change-Id: Iac666dfc75ac321bf8639dda5b0dba7c8840922d -Reviewed-on: https://go-review.googlesource.com/94603 -Reviewed-by: Brad Fitzpatrick ---- - src/cmd/go/internal/get/vcs.go | 34 +++++++++++++++++++++++++++-- - src/cmd/go/internal/get/vcs_test.go | 43 +++++++++++++++++++++++++++++++++++++ - 2 files changed, 75 insertions(+), 2 deletions(-) - -diff --git a/src/cmd/go/internal/get/vcs.go b/src/cmd/go/internal/get/vcs.go -index ee6b16a1369..dced0ed8db5 100644 ---- a/src/cmd/go/internal/get/vcs.go -+++ b/src/cmd/go/internal/get/vcs.go -@@ -809,8 +809,8 @@ func repoRootForImportDynamic(importPath string, security web.SecurityMode) (*re - } - } - -- if !strings.Contains(mmi.RepoRoot, "://") { -- return nil, fmt.Errorf("%s: invalid repo root %q; no scheme", urlStr, mmi.RepoRoot) -+ if err := validateRepoRootScheme(mmi.RepoRoot); err != nil { -+ return nil, fmt.Errorf("%s: invalid repo root %q: %v", urlStr, mmi.RepoRoot, err) - } - rr := &repoRoot{ - vcs: vcsByCmd(mmi.VCS), -@@ -824,6 +824,36 @@ func repoRootForImportDynamic(importPath string, security web.SecurityMode) (*re - return rr, nil - } - -+// validateRepoRootScheme returns an error if repoRoot does not seem -+// to have a valid URL scheme. At this point we permit things that -+// aren't valid URLs, although later, if not using -insecure, we will -+// restrict repoRoots to be valid URLs. This is only because we've -+// historically permitted them, and people may depend on that. -+func validateRepoRootScheme(repoRoot string) error { -+ end := strings.Index(repoRoot, "://") -+ if end <= 0 { -+ return errors.New("no scheme") -+ } -+ -+ // RFC 3986 section 3.1. -+ for i := 0; i < end; i++ { -+ c := repoRoot[i] -+ switch { -+ case 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z': -+ // OK. -+ case '0' <= c && c <= '9' || c == '+' || c == '-' || c == '.': -+ // OK except at start. -+ if i == 0 { -+ return errors.New("invalid scheme") -+ } -+ default: -+ return errors.New("invalid scheme") -+ } -+ } -+ -+ return nil -+} -+ - var fetchGroup singleflight.Group - var ( - fetchCacheMu sync.Mutex -diff --git a/src/cmd/go/internal/get/vcs_test.go b/src/cmd/go/internal/get/vcs_test.go -index 2cb611fabd8..ece78b563ce 100644 ---- a/src/cmd/go/internal/get/vcs_test.go -+++ b/src/cmd/go/internal/get/vcs_test.go -@@ -416,3 +416,46 @@ func TestMatchGoImport(t *testing.T) { - } - } - } -+ -+func TestValidateRepoRootScheme(t *testing.T) { -+ tests := []struct { -+ root string -+ err string -+ }{ -+ { -+ root: "", -+ err: "no scheme", -+ }, -+ { -+ root: "http://", -+ err: "", -+ }, -+ { -+ root: "a://", -+ err: "", -+ }, -+ { -+ root: "a#://", -+ err: "invalid scheme", -+ }, -+ { -+ root: "-config://", -+ err: "invalid scheme", -+ }, -+ } -+ -+ for _, test := range tests { -+ err := validateRepoRootScheme(test.root) -+ if err == nil { -+ if test.err != "" { -+ t.Errorf("validateRepoRootScheme(%q) = nil, want %q", test.root, test.err) -+ } -+ } else if test.err == "" { -+ if err != nil { -+ t.Errorf("validateRepoRootScheme(%q) = %q, want nil", test.root, test.err) -+ } -+ } else if err.Error() != test.err { -+ t.Errorf("validateRepoRootScheme(%q) = %q, want %q", test.root, err, test.err) -+ } -+ } -+} diff --git a/golang-1.5-bootstrap-binary-path.patch b/golang-1.5-bootstrap-binary-path.patch deleted file mode 100644 index af7d069..0000000 --- a/golang-1.5-bootstrap-binary-path.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff -up go/src/cmd/dist/buildtool.go.bootstrap go/src/cmd/dist/buildtool.go ---- go/src/cmd/dist/buildtool.go.bootstrap 2017-07-11 12:05:00.041373419 +0200 -+++ go/src/cmd/dist/buildtool.go 2017-07-11 12:07:27.141775914 +0200 -@@ -153,18 +153,26 @@ func bootstrapBuildTools() { - defer os.Setenv("GOBIN", os.Getenv("GOBIN")) - os.Setenv("GOBIN", "") - -+ hostos := os.Getenv("GOHOSTOS") -+ hostarch := os.Getenv("GOHOSTARCH") -+ - os.Setenv("GOOS", "") - os.Setenv("GOHOSTOS", "") - os.Setenv("GOARCH", "") - os.Setenv("GOHOSTARCH", "") - -+ bingopath := pathf("%s/bin/%s_%s/go", goroot_bootstrap, hostos, hostarch) -+ if _, err := os.Stat(bingopath); os.IsNotExist(err) { -+ bingopath = pathf("%s/bin/go", goroot_bootstrap) -+ } -+ - // Run Go 1.4 to build binaries. Use -gcflags=-l to disable inlining to - // workaround bugs in Go 1.4's compiler. See discussion thread: - // https://groups.google.com/d/msg/golang-dev/Ss7mCKsvk8w/Gsq7VYI0AwAJ - // Use the math_big_pure_go build tag to disable the assembly in math/big - // which may contain unsupported instructions. - cmd := []string{ -- pathf("%s/bin/go", goroot_bootstrap), -+ bingopath, - "install", - "-gcflags=-l", - "-tags=math_big_pure_go", -diff -up go/src/make.bash.bootstrap go/src/make.bash ---- go/src/make.bash.bootstrap 2017-07-11 12:05:00.036373439 +0200 -+++ go/src/make.bash 2017-07-11 12:05:00.041373419 +0200 -@@ -120,8 +120,15 @@ echo '##### Building Go bootstrap tool.' - echo cmd/dist - export GOROOT="$(cd .. && pwd)" - GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:-$HOME/go1.4} --if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then -- echo "ERROR: Cannot find $GOROOT_BOOTSTRAP/bin/go." >&2 -+if [ -x "$GOROOT_BOOTSTRAP/bin/${GOHOSTOS}_${GOHOSTARCH}/go" ]; then -+ rm -f cmd/dist/dist -+ GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/${GOHOSTOS}_${GOHOSTARCH}/go" build -o cmd/dist/dist ./cmd/dist -+elif [ -x "$GOROOT_BOOTSTRAP/bin/go" ]; then -+ rm -f cmd/dist/dist -+ GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist -+else -+ echo "ERROR: Cannot find $GOROOT_BOOTSTRAP/bin/${GOHOSTOS}_${GOHOSTARCH}/go." >&2 -+ echo "ERROR: or $GOROOT_BOOTSTRAP/bin/${GOHOSTOS}_${GOHOSTARCH}/go." >&2 - echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2 - exit 1 - fi -@@ -130,8 +137,6 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; - echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2 - exit 1 - fi --rm -f cmd/dist/dist --GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist - - # -e doesn't propagate out of eval, so check success by hand. - eval $(./cmd/dist/dist env -p || echo FAIL=true) diff --git a/golang.spec b/golang.spec index f930b52..0e04a7c 100644 --- a/golang.spec +++ b/golang.spec @@ -96,10 +96,10 @@ %endif %global go_api 1.9 -%global go_version 1.9.5 +%global go_version 1.9.6 Name: golang -Version: 1.9.5 +Version: 1.9.6 Release: 1%{?dist} Summary: The Go Programming Language # source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain @@ -164,24 +164,12 @@ Requires: %{name}-bin = %{version}-%{release} Requires: %{name}-src = %{version}-%{release} Requires: go-srpm-macros -Patch0: golang-1.2-verbose-build.patch - -# use the arch dependent path in the bootstrap -Patch212: golang-1.5-bootstrap-binary-path.patch - -# we had been just removing the zoneinfo.zip, but that caused tests to fail for users that -# later run `go test -a std`. This makes it only use the zoneinfo.zip where needed in tests. -Patch215: ./go1.5-zoneinfo_testing_only.patch - -# Proposed patch by mmunday https://golang.org/cl/35262 -Patch219: s390x-expose-IfInfomsg-X__ifi_pad.patch - -Patch220: s390x-ignore-L0syms.patch - -# https://github.com/golang/go/commit/ca8c361d867d62bd46013c5abbaaad0b2ca6077f -Patch221: use-buildmode-pie-for-pie-testing.patch -# https://github.com/hyangah/go/commit/3502496d03bcd842fd7aac95ec0d7096d581cd26 -Patch222: use-no-pie-where-needed.patch +Patch1: 0001-Make-build-little-bit-more-verbose.patch +Patch2: 0002-Don-t-use-the-bundled-tzdata.patch +Patch3: 0003-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch +Patch4: 0004-Ignore-L0-A-during-linking.patch +Patch5: 0005-Backport-of-https-github.com-golang-go-commit-ca8c36.patch +Patch6: 0006-misc-cgo-testcarchive-use-no-pie-where-needed.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -304,20 +292,12 @@ Requires: %{name} = %{version}-%{release} %prep %setup -q -n go -# increase verbosity of build -%patch0 -p1 -b .verbose - -# use the arch dependent path in the bootstrap -%patch212 -p1 -b .bootstrap - -%patch215 -p1 - -%patch219 -p1 - -%patch220 -p1 - -%patch221 -p1 -b pie -%patch222 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 cp %{SOURCE1} ./src/runtime/ @@ -554,6 +534,9 @@ fi %endif %changelog +* Thu May 03 2018 Jakub Čajka - 1.9.6-1 +- Rebase to 1.9.6 + * Tue Apr 03 2018 Jakub Čajka - 1.9.5-1 - Rebase to 1.9.5 diff --git a/sources b/sources index 9c6b46c..af65b4f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.9.5.src.tar.gz) = 5cde6a3c6e6040ddbcafa75dae551500d0bb15096a523ee29f788cbf3fa11d083d4e4a1b56a094ad2234f967c0d1be280ae00479d5f7c01174dc6da2a5a25924 +SHA512 (go1.9.6.src.tar.gz) = f7863a4fe586414c91465a6a82a47097b2593384688a7c68ad3e9981559047b4faf2c134104ad09a64125576dac557809884d9f125d91108dd51746620a368a2