From 6caa43c1063f4eac8b7ce61fdd451f1b10621376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Thu, 3 May 2018 11:11:48 +0200 Subject: [PATCH] Rebase to 1.10.2 Patch clean up --- .gitignore | 1 + ...ndled-tzdata-at-runtime-except-for-t.patch | 38 ++++++--- ...expose-IfInfomsg.X__ifi_pad-on-s390x.patch | 13 ++- ...work-improve-pkgconfig-support-to-wo.patch | 10 +-- 31bit-OID-asn1.patch | 83 ------------------- golang-1.5-bootstrap-binary-path.patch | 61 -------------- golang.spec | 27 +++--- sources | 2 +- 8 files changed, 55 insertions(+), 180 deletions(-) rename go1.5-zoneinfo_testing_only.patch => 0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch (54%) rename s390x-expose-IfInfomsg-X__ifi_pad.patch => 0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch (69%) rename golang-1.10-pkgconfig-fix.patch => 0003-cmd-go-internal-work-improve-pkgconfig-support-to-wo.patch (96%) delete mode 100644 31bit-OID-asn1.patch delete mode 100644 golang-1.5-bootstrap-binary-path.patch diff --git a/.gitignore b/.gitignore index 4cbb603..c3bee51 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,4 @@ /go1.10rc2.src.tar.gz /go1.10.src.tar.gz /go1.10.1.src.tar.gz +/go1.10.2.src.tar.gz diff --git a/go1.5-zoneinfo_testing_only.patch b/0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch similarity index 54% rename from go1.5-zoneinfo_testing_only.patch rename to 0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch index 581cb94..422ca2b 100644 --- a/go1.5-zoneinfo_testing_only.patch +++ b/0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch @@ -1,6 +1,19 @@ -diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/internal_test.go.time go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/internal_test.go ---- go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/internal_test.go.time 2017-12-05 01:10:10.000000000 +0100 -+++ go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/internal_test.go 2017-12-05 14:55:10.574637475 +0100 +From edce31a2904846ae74e3c011f2cf5fddc963459e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jakub=20=C4=8Cajka?= +Date: Thu, 22 Mar 2018 12:07:32 +0100 +Subject: [PATCH 1/3] Don't use the bundled tzdata at runtime, except for the + internal test suite + +--- + src/time/internal_test.go | 7 +++++-- + src/time/zoneinfo_test.go | 3 ++- + src/time/zoneinfo_unix.go | 2 -- + 3 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/src/time/internal_test.go b/src/time/internal_test.go +index 76d5524124..e81ace5f64 100644 +--- a/src/time/internal_test.go ++++ b/src/time/internal_test.go @@ -4,13 +4,15 @@ package time @@ -29,9 +42,10 @@ diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/internal_test.go.t if zipOnly { zoneSources = zoneSources[len(zoneSources)-1:] } -diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go.time go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go ---- go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go.time 2017-12-05 01:10:10.000000000 +0100 -+++ go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go 2017-12-05 14:58:09.823109248 +0100 +diff --git a/src/time/zoneinfo_test.go b/src/time/zoneinfo_test.go +index 7a55d4f618..6063ca1195 100644 +--- a/src/time/zoneinfo_test.go ++++ b/src/time/zoneinfo_test.go @@ -8,6 +8,7 @@ import ( "fmt" "os" @@ -40,7 +54,7 @@ diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go.t "testing" "time" ) -@@ -128,7 +129,7 @@ func TestLoadLocationFromTZData(t *testi +@@ -128,7 +129,7 @@ func TestLoadLocationFromTZData(t *testing.T) { t.Fatal(err) } @@ -49,9 +63,10 @@ diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go.t if err != nil { t.Fatal(err) } -diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_unix.go.time go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_unix.go ---- go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_unix.go.time 2017-12-05 01:10:10.000000000 +0100 -+++ go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_unix.go 2017-12-05 14:55:10.574637475 +0100 +diff --git a/src/time/zoneinfo_unix.go b/src/time/zoneinfo_unix.go +index 88313aa0ed..d9596115ef 100644 +--- a/src/time/zoneinfo_unix.go ++++ b/src/time/zoneinfo_unix.go @@ -12,7 +12,6 @@ package time @@ -68,3 +83,6 @@ diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_unix.go.t } func initLocal() { +-- +2.14.3 + diff --git a/s390x-expose-IfInfomsg-X__ifi_pad.patch b/0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch similarity index 69% rename from s390x-expose-IfInfomsg-X__ifi_pad.patch rename to 0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch index ec53077..072440d 100644 --- a/s390x-expose-IfInfomsg-X__ifi_pad.patch +++ b/0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch @@ -1,7 +1,7 @@ -From 84b8c9ceaa5257f7ff4ab059ff208246ecdfe9d9 Mon Sep 17 00:00:00 2001 +From 817407fc2d6a861e65086388766f58082d38bc0b 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 2/3] 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/golang-1.10-pkgconfig-fix.patch b/0003-cmd-go-internal-work-improve-pkgconfig-support-to-wo.patch similarity index 96% rename from golang-1.10-pkgconfig-fix.patch rename to 0003-cmd-go-internal-work-improve-pkgconfig-support-to-wo.patch index 24f454a..933244b 100644 --- a/golang-1.10-pkgconfig-fix.patch +++ b/0003-cmd-go-internal-work-improve-pkgconfig-support-to-wo.patch @@ -1,8 +1,8 @@ -From 09581ca4826b6d67b1c3a3c8597038b28a37f52d Mon Sep 17 00:00:00 2001 +From 18385565374c36eda8306c57715332d5ae6eb9a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Fri, 5 Jan 2018 13:38:55 +0100 -Subject: [PATCH] cmd/go/internal/work : improve pkgconfig support to work with - latest(1.4+) pkgconf +Subject: [PATCH 3/3] cmd/go/internal/work : improve pkgconfig support to work + with latest(1.4+) pkgconf Fixes #23373 @@ -72,7 +72,7 @@ index 3f5ba37c64..c3c63a97a4 100644 t.Errorf("splitPkgConfigOutput(%v) = %v; want %v", test.in, got, test.want) } diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go -index a5ab75f6a8..8774be1385 100644 +index a50c996041..5596638e48 100644 --- a/src/cmd/go/internal/work/exec.go +++ b/src/cmd/go/internal/work/exec.go @@ -900,36 +900,62 @@ func (b *Builder) PkgconfigCmd() string { @@ -160,7 +160,7 @@ index a5ab75f6a8..8774be1385 100644 } // Calls pkg-config if needed and returns the cflags/ldflags needed to build the package. -@@ -948,7 +974,10 @@ func (b *Builder) getPkgConfigFlags(p *load.Package) (cflags, ldflags []string, +@@ -961,7 +987,10 @@ func (b *Builder) getPkgConfigFlags(p *load.Package) (cflags, ldflags []string, return nil, nil, errPrintedOutput } if len(out) > 0 { 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/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 c97f8aa..54ed39b 100644 --- a/golang.spec +++ b/golang.spec @@ -102,10 +102,10 @@ %endif %global go_api 1.10 -%global go_version 1.10.1 +%global go_version 1.10.2 Name: golang -Version: 1.10.1 +Version: 1.10.2 Release: 1%{?dist} Summary: The Go Programming Language # source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain @@ -175,15 +175,9 @@ Requires: %{name}-bin = %{version}-%{release} Requires: %{name}-src = %{version}-%{release} Requires: go-srpm-macros -# 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 - -# Proposed patch by jcajka https://golang.org/cl/86541 -Patch221: golang-1.10-pkgconfig-fix.patch +Patch1: 0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch +Patch2: 0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch +Patch3: 0003-cmd-go-internal-work-improve-pkgconfig-support-to-wo.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -307,11 +301,9 @@ Requires: %{name} = %{version}-%{release} %prep %setup -q -n go -%patch215 -p1 - -%patch219 -p1 - -%patch221 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 cp %{SOURCE1} ./src/runtime/ @@ -548,6 +540,9 @@ fi %endif %changelog +* Wed May 02 2018 Jakub Čajka - 1.10.2-1 +- Rebase to 1.10.2 + * Wed Apr 04 2018 Jakub Čajka - 1.10.1-1 - Rebase to 1.10.1 - Resolves: BZ#1562270 diff --git a/sources b/sources index ade4700..ac95b0f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.10.1.src.tar.gz) = 13f6b0643a4f92eeca04444b9fa10de38fc3427daea9aa3227cf9a5738ffee1a3f2e355ba5faf711b8506f7de118bdcd3b9064b65407a22613523e29ffd73415 +SHA512 (go1.10.2.src.tar.gz) = 754e60bce1ea3479ebb57bbbb625e3d7875a151e7a6d7a1067478a9e45bde5423f47123d084832bb838acf7675a9d05057b76c1d773e43cae0fb4e7a52acf4a9