From 4bc73c764a018dc6b5f0fb80f4b175358d90cc3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Wed, 6 Dec 2017 12:22:23 +0100 Subject: [PATCH 01/22] Add bundled provides --- golang.spec | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/golang.spec b/golang.spec index d40ba69..1ae52f7 100644 --- a/golang.spec +++ b/golang.spec @@ -130,6 +130,29 @@ BuildRequires: net-tools BuildRequires: pcre-devel, glibc-static, perl-interpreter, procps-ng Provides: go = %{version}-%{release} + +# Bundled/Vendored provides +Provides: bundled(golang(golang.org/x/crypto/chacha20poly1305)) +Provides: bundled(golang(golang.org/x/crypto/curve25519)) +Provides: bundled(golang(golang.org/x/crypto/poly1305)) +Provides: bundled(golang(golang.org/x/net/http2)) +Provides: bundled(golang(golang.org/x/net/http2/hpack)) +Provides: bundled(golang(golang.org/x/net/idna)) +Provides: bundled(golang(golang.org/x/net/lex)) +Provides: bundled(golang(golang.org/x/net/lex/httplex)) +Provides: bundled(golang(golang.org/x/net/lif)) +Provides: bundled(golang(golang.org/x/net/route)) +Provides: bundled(golang(golang.org/x/text/transform)) +Provides: bundled(golang(golang.org/x/text/unicode)) +Provides: bundled(golang(golang.org/x/text/unicode/norm)) +Provides: bundled(golang(golang.org/x/text/width)) +Provides: bundled(golang(golang.org/x/arch/arm)) +Provides: bundled(golang(golang.org/x/arch/arm/armasm)) +Provides: bundled(golang(golang.org/x/arch/ppc64)) +Provides: bundled(golang(golang.org/x/arch/ppc64/ppc64asm)) +Provides: bundled(golang(golang.org/x/arch/x86)) +Provides: bundled(golang(golang.org/x/arch/x86/x86asm)) + Requires: %{name}-bin = %{version}-%{release} Requires: %{name}-src = %{version}-%{release} Requires: go-srpm-macros @@ -329,7 +352,7 @@ popd # build shared std lib %if %{shared} -GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -buildmode=shared std +GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -buildmode=shared -v -x std %endif %if %{race} From d37b3b5006518b65ba09728daa690caa39f0244f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Wed, 3 Jan 2018 13:22:17 +0100 Subject: [PATCH 02/22] Rebase to 1.10beta1 Drop verbose patch as most of it is now implemented by bootstrap tool and is easily toggled by passing -v flag to make.bash --- .gitignore | 1 + go1.5-zoneinfo_testing_only.patch | 79 +++++++++--- golang-1.10-pkgconfig-fix.patch | 155 ++++++++++++++++++++++++ golang-1.2-verbose-build.patch | 21 ---- golang.spec | 100 +++++++-------- s390x-ignore-L0syms.patch | 18 --- sources | 2 +- use-buildmode-pie-for-pie-testing.patch | 51 -------- use-no-pie-where-needed.patch | 63 ---------- 9 files changed, 273 insertions(+), 217 deletions(-) create mode 100644 golang-1.10-pkgconfig-fix.patch delete mode 100644 golang-1.2-verbose-build.patch delete mode 100644 s390x-ignore-L0syms.patch delete mode 100644 use-buildmode-pie-for-pie-testing.patch delete mode 100644 use-no-pie-where-needed.patch diff --git a/.gitignore b/.gitignore index 0b3a44f..89ba499 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ /go1.9.src.tar.gz /go1.9.1.src.tar.gz /go1.9.2.src.tar.gz +/go1.10beta1.src.tar.gz diff --git a/go1.5-zoneinfo_testing_only.patch b/go1.5-zoneinfo_testing_only.patch index 3e9cb5f..581cb94 100644 --- a/go1.5-zoneinfo_testing_only.patch +++ b/go1.5-zoneinfo_testing_only.patch @@ -1,21 +1,70 @@ -diff --git a/src/time/zoneinfo_unix.go b/src/time/zoneinfo_unix.go -index ed9502d..c2569e7 100644 ---- a/src/time/zoneinfo_unix.go -+++ b/src/time/zoneinfo_unix.go -@@ -32,14 +32,14 @@ var zoneDirs = []string{ +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 +@@ -4,13 +4,15 @@ + + package time + ++import "runtime" ++ + func init() { + // force US/Pacific for time zone tests + ForceUSPacificForTesting() + } + + func initTestingZone() { +- z, err := loadLocation("America/Los_Angeles", zoneSources[len(zoneSources)-1:]) ++ z, err := loadLocation("America/Los_Angeles", zoneSources) + if err != nil { + panic("cannot load America/Los_Angeles for testing: " + err.Error()) + } +@@ -21,8 +23,9 @@ func initTestingZone() { + var OrigZoneSources = zoneSources + + func forceZipFileForTesting(zipOnly bool) { +- zoneSources = make([]string, len(OrigZoneSources)) ++ zoneSources = make([]string, len(OrigZoneSources)+1) + copy(zoneSources, OrigZoneSources) ++ zoneSources = append(zoneSources, runtime.GOROOT()+"/lib/time/zoneinfo.zip") + 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 +@@ -8,6 +8,7 @@ import ( + "fmt" + "os" + "reflect" ++ "runtime" + "testing" + "time" + ) +@@ -128,7 +129,7 @@ func TestLoadLocationFromTZData(t *testi + t.Fatal(err) + } + +- tzinfo, err := time.LoadTzinfo(locationName, time.OrigZoneSources[len(time.OrigZoneSources)-1]) ++ tzinfo, err := time.LoadTzinfo(locationName, runtime.GOROOT()+"/lib/time/zoneinfo.zip") + 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 +@@ -12,7 +12,6 @@ + package time + + import ( +- "runtime" + "syscall" + ) + +@@ -22,7 +21,6 @@ var zoneSources = []string{ "/usr/share/zoneinfo/", "/usr/share/lib/zoneinfo/", "/usr/lib/locale/TZ/", - runtime.GOROOT() + "/lib/time/zoneinfo.zip", } - var origZoneDirs = zoneDirs - - func forceZipFileForTesting(zipOnly bool) { -- zoneDirs = make([]string, len(origZoneDirs)) -+ zoneDirs = make([]string, len(origZoneDirs)+1) - copy(zoneDirs, origZoneDirs) -+ zoneDirs = append(zoneDirs, runtime.GOROOT()+"/lib/time/zoneinfo.zip") - if zipOnly { - for i := 0; i < len(zoneDirs)-1; i++ { - zoneDirs[i] = "/XXXNOEXIST" + func initLocal() { diff --git a/golang-1.10-pkgconfig-fix.patch b/golang-1.10-pkgconfig-fix.patch new file mode 100644 index 0000000..9236466 --- /dev/null +++ b/golang-1.10-pkgconfig-fix.patch @@ -0,0 +1,155 @@ +From b17b0c7d9b1d7bffd90a83fb887c66b421193eb8 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 + +Fixes #23373 + +Fix interfacing with latest(1.4+) pkgconf versions, as they have change the output format, by extending parsing function splitPkgConfigOutput to accommodate more possible fragment escaping formats. Function is based on pkgconfigs own implementation at https://github.com/pkgconf/pkgconf/blob/master/libpkgconf/argvsplit.c. Along with this change test case TestSplitPkgConfigOutput have been expanded. Thanks to ignatenko for help on test cases and insights in to the pkgconfig. + +Change-Id: I55301bb564b07128d5564ec1454dd247f84a95c3 +--- + src/cmd/go/internal/work/build_test.go | 15 ++++++- + src/cmd/go/internal/work/exec.go | 79 +++++++++++++++++++++++++--------- + 2 files changed, 72 insertions(+), 22 deletions(-) + +diff --git a/src/cmd/go/internal/work/build_test.go b/src/cmd/go/internal/work/build_test.go +index 3f5ba37c64..be9857ade7 100644 +--- a/src/cmd/go/internal/work/build_test.go ++++ b/src/cmd/go/internal/work/build_test.go +@@ -43,10 +43,23 @@ func TestSplitPkgConfigOutput(t *testing.T) { + {[]byte(`-r:foo -L/usr/white\ space/lib -lfoo\ bar -lbar\ baz`), []string{"-r:foo", "-L/usr/white space/lib", "-lfoo bar", "-lbar baz"}}, + {[]byte(`-lextra\ fun\ arg\\`), []string{`-lextra fun arg\`}}, + {[]byte(`broken flag\`), []string{"broken", "flag"}}, ++ {[]byte(`extra broken flag \`), []string{"extra", "broken", "flag"}}, + {[]byte("\textra whitespace\r\n"), []string{"extra", "whitespace"}}, + {[]byte(" \r\n "), nil}, ++ {[]byte(`"-r:foo" "-L/usr/white space/lib" "-lfoo bar" "-lbar baz"`), []string{"-r:foo", "-L/usr/white space/lib", "-lfoo bar", "-lbar baz"}}, ++ {[]byte(`"-lextra fun arg\\"`), []string{`-lextra fun arg\`}}, ++ {[]byte(`" \r\n "`), []string{` \r\n `}}, ++ {[]byte(`""`), nil}, ++ {[]byte(`-fPIC -I/test/include/foo -DQUOTED='"/test/share/doc"'`), []string{"-fPIC", "-I/test/include/foo", "-DQUOTED=\"/test/share/doc\""}}, ++ {[]byte(`-fPIC -I/test/include/foo -DQUOTED="/test/share/doc"`), []string{"-fPIC", "-I/test/include/foo", "-DQUOTED=/test/share/doc"}}, ++ {[]byte(`-fPIC -I/test/include/foo -DQUOTED=\"/test/share/doc\"`), []string{"-fPIC", "-I/test/include/foo", "-DQUOTED=\"/test/share/doc\""}}, ++ {[]byte(`-fPIC -I/test/include/foo -DQUOTED='/test/share/doc'`), []string{"-fPIC", "-I/test/include/foo", "-DQUOTED=/test/share/doc"}}, ++ {[]byte(`-Dhello=10 -Dworld=+32 -DDEFINED_FROM_PKG_CONFIG=hello\ world`), []string{"-Dhello=10", "-Dworld=+32", "-DDEFINED_FROM_PKG_CONFIG=hello world"}}, + } { +- got := splitPkgConfigOutput(test.in) ++ got, err := splitPkgConfigOutput(test.in) ++ if err != nil { ++ t.Errorf("splitPkgConfigOutput(%v) = %v; function returned error %v", test.in, got, err) ++ } + if !reflect.DeepEqual(got, test.want) { + 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 60e2a3aa48..c5a438aac9 100644 +--- a/src/cmd/go/internal/work/exec.go ++++ b/src/cmd/go/internal/work/exec.go +@@ -855,36 +855,67 @@ func (b *Builder) PkgconfigCmd() string { + } + + // splitPkgConfigOutput parses the pkg-config output into a slice of +-// flags. pkg-config always uses \ to escape special characters. +-func splitPkgConfigOutput(out []byte) []string { ++// flags. Implementing algorithm from pkgconf/libpkgconf/argvsplit.c ++func splitPkgConfigOutput(out []byte) ([]string, error) { + if len(out) == 0 { +- return nil ++ return nil, nil + } + var flags []string +- flag := make([]byte, len(out)) +- r, w := 0, 0 ++ flag := make([]byte, 0, len(out)) ++ r := 0 ++ escaped := false ++ var quote byte = 0 ++ + for r < len(out) { +- switch out[r] { +- case ' ', '\t', '\r', '\n': +- if w > 0 { +- flags = append(flags, string(flag[:w])) ++ if escaped { ++ if quote == '"' { ++ switch out[r] { ++ case '$', '`', '"', '\\': ++ default: ++ flag = append(flag, '\\') ++ } ++ flag = append(flag, out[r]) ++ } else { ++ flag = append(flag, out[r]) + } +- w = 0 +- case '\\': +- r++ +- fallthrough +- default: +- if r < len(out) { +- flag[w] = out[r] +- w++ ++ escaped = false ++ } else if quote != 0 { ++ if out[r] == quote { ++ quote = 0 ++ } else { ++ switch out[r] { ++ case '\\': ++ if quote == '\'' { ++ break ++ } ++ escaped = true ++ default: ++ flag = append(flag, out[r]) ++ } ++ } ++ } else if !(strings.IndexByte(" \t\n\v\f\r", out[r]) >= 0) { ++ switch out[r] { ++ case '\\': ++ escaped = true ++ case '\'', '"': ++ quote = out[r] ++ default: ++ flag = append(flag, out[r]) + } ++ } else if len(flag) != 0 { ++ flags = append(flags, string(flag)) ++ flag = flag[:0] + } + r++ + } +- if w > 0 { +- flags = append(flags, string(flag[:w])) ++ ++ if quote != 0 { ++ return flags, errors.New("unterminated quoted string in pkgconf output " + string(out)) ++ } else if len(flag) != 0 { ++ flags = append(flags, string(flag)) + } +- return flags ++ ++ return flags, nil + } + + // Calls pkg-config if needed and returns the cflags/ldflags needed to build the package. +@@ -899,7 +930,13 @@ func (b *Builder) getPkgConfigFlags(p *load.Package) (cflags, ldflags []string, + return + } + if len(out) > 0 { +- cflags = splitPkgConfigOutput(out) ++ cflags, err = splitPkgConfigOutput(out) ++ if err != nil { ++ b.showOutput(nil, p.Dir, b.PkgconfigCmd()+" --libs "+strings.Join(pkgs, " "), string(out)) ++ b.Print(err.Error() + "\n") ++ err = errPrintedOutput ++ return ++ } + } + out, err = b.runOut(p.Dir, p.ImportPath, nil, b.PkgconfigCmd(), "--libs", pkgs) + if err != nil { +-- +2.14.3 + diff --git a/golang-1.2-verbose-build.patch b/golang-1.2-verbose-build.patch deleted file mode 100644 index c9dbba2..0000000 --- a/golang-1.2-verbose-build.patch +++ /dev/null @@ -1,21 +0,0 @@ -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 - # 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 \ -- "$GOTOOLDIR"/go_bootstrap install -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd -+ "$GOTOOLDIR"/go_bootstrap install -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v -x std cmd - echo - fi - -@@ -175,7 +175,7 @@ echo "##### Building packages and comman - - old_bin_files=$(cd $GOROOT/bin && echo *) - --CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd -+CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v -x std cmd - - # Check that there are no new files in $GOROOT/bin other than go and gofmt - # and $GOOS_$GOARCH (a directory used when cross-compiling). diff --git a/golang.spec b/golang.spec index 1ae52f7..bb3fdee 100644 --- a/golang.spec +++ b/golang.spec @@ -101,12 +101,12 @@ %global gohostarch s390x %endif -%global go_api 1.9 -%global go_version 1.9.2 +%global go_api 1.10 +%global go_version 1.10beta1 Name: golang -Version: 1.9.2 -Release: 1%{?dist} +Version: 1.10 +Release: 0.beta1.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 @@ -131,37 +131,50 @@ BuildRequires: pcre-devel, glibc-static, perl-interpreter, procps-ng Provides: go = %{version}-%{release} -# Bundled/Vendored provides -Provides: bundled(golang(golang.org/x/crypto/chacha20poly1305)) -Provides: bundled(golang(golang.org/x/crypto/curve25519)) -Provides: bundled(golang(golang.org/x/crypto/poly1305)) -Provides: bundled(golang(golang.org/x/net/http2)) -Provides: bundled(golang(golang.org/x/net/http2/hpack)) -Provides: bundled(golang(golang.org/x/net/idna)) -Provides: bundled(golang(golang.org/x/net/lex)) -Provides: bundled(golang(golang.org/x/net/lex/httplex)) -Provides: bundled(golang(golang.org/x/net/lif)) -Provides: bundled(golang(golang.org/x/net/route)) -Provides: bundled(golang(golang.org/x/text/transform)) -Provides: bundled(golang(golang.org/x/text/unicode)) -Provides: bundled(golang(golang.org/x/text/unicode/norm)) -Provides: bundled(golang(golang.org/x/text/width)) -Provides: bundled(golang(golang.org/x/arch/arm)) -Provides: bundled(golang(golang.org/x/arch/arm/armasm)) -Provides: bundled(golang(golang.org/x/arch/ppc64)) -Provides: bundled(golang(golang.org/x/arch/ppc64/ppc64asm)) -Provides: bundled(golang(golang.org/x/arch/x86)) -Provides: bundled(golang(golang.org/x/arch/x86/x86asm)) +# Bundled/Vendored provides generated by +# go list -f {{.ImportPath}} ./src/vendor/... | sed "s:_$PWD/src/vendor/::g;s:_:.:;s:.*:Provides\: bundled(golang(&)):" && go list -f {{.ImportPath}} ./src/cmd/vendor/... | sed "s:_$PWD/src/cmd/vendor/::g;s:_:.:;s:.*:Provides\: bundled(golang(&)):" +Provides: bundled(golang(golang.org/x/crypto/chacha20poly1305)) +Provides: bundled(golang(golang.org/x/crypto/chacha20poly1305/internal/chacha20)) +Provides: bundled(golang(golang.org/x/crypto/cryptobyte)) +Provides: bundled(golang(golang.org/x/crypto/cryptobyte/asn1)) +Provides: bundled(golang(golang.org/x/crypto/curve25519)) +Provides: bundled(golang(golang.org/x/crypto/poly1305)) +Provides: bundled(golang(golang.org/x/net/http2/hpack)) +Provides: bundled(golang(golang.org/x/net/idna)) +Provides: bundled(golang(golang.org/x/net/internal/nettest)) +Provides: bundled(golang(golang.org/x/net/lex/httplex)) +Provides: bundled(golang(golang.org/x/net/nettest)) +Provides: bundled(golang(golang.org/x/net/proxy)) +Provides: bundled(golang(golang.org/x/text/secure)) +Provides: bundled(golang(golang.org/x/text/secure/bidirule)) +Provides: bundled(golang(golang.org/x/text/transform)) +Provides: bundled(golang(golang.org/x/text/unicode)) +Provides: bundled(golang(golang.org/x/text/unicode/bidi)) +Provides: bundled(golang(golang.org/x/text/unicode/norm)) +Provides: bundled(golang(github.com/google/pprof)) +Provides: bundled(golang(github.com/google/pprof/driver)) +Provides: bundled(golang(github.com/google/pprof/internal/binutils)) +Provides: bundled(golang(github.com/google/pprof/internal/driver)) +Provides: bundled(golang(github.com/google/pprof/internal/elfexec)) +Provides: bundled(golang(github.com/google/pprof/internal/graph)) +Provides: bundled(golang(github.com/google/pprof/internal/measurement)) +Provides: bundled(golang(github.com/google/pprof/internal/plugin)) +Provides: bundled(golang(github.com/google/pprof/internal/proftest)) +Provides: bundled(golang(github.com/google/pprof/internal/report)) +Provides: bundled(golang(github.com/google/pprof/internal/symbolizer)) +Provides: bundled(golang(github.com/google/pprof/internal/symbolz)) +Provides: bundled(golang(github.com/google/pprof/profile)) +Provides: bundled(golang(github.com/google/pprof/third.party/svg)) +Provides: bundled(golang(github.com/ianlancetaylor/demangle)) +Provides: bundled(golang(golang.org/x/arch/arm/armasm)) +Provides: bundled(golang(golang.org/x/arch/arm64/arm64asm)) +Provides: bundled(golang(golang.org/x/arch/ppc64/ppc64asm)) +Provides: bundled(golang(golang.org/x/arch/x86/x86asm)) 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 @@ -169,12 +182,8 @@ 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 +# Proposed patch by jcajka https://golang.org/cl/86541 +Patch221: golang-1.10-pkgconfig-fix.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -297,20 +306,11 @@ 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 +%patch221 -p1 cp %{SOURCE1} ./src/runtime/ @@ -347,7 +347,7 @@ export GO_LDFLAGS="-linkmode internal" %if !%{cgo_enabled} export CGO_ENABLED=0 %endif -./make.bash --no-clean +./make.bash --no-clean -v popd # build shared std lib @@ -356,7 +356,7 @@ GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -buildmode=shared -v -x std %endif %if %{race} -GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -race std +GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -race -v -x std %endif %install @@ -547,6 +547,10 @@ fi %endif %changelog +* Mon Jan 08 2018 Jakub Čajka - 1.9.2-0.beta1.1 +- Rebase to 1.10beta1 +- Drop verbose patch as most of it is now implemented by bootstrap tool and is easily toggled by passing -v flag to make.bash + * Thu Oct 26 2017 Jakub Čajka - 1.9.2-1 - Rebase to 1.9.2 - execute correctly pie tests diff --git a/s390x-ignore-L0syms.patch b/s390x-ignore-L0syms.patch deleted file mode 100644 index a6c65e0..0000000 --- a/s390x-ignore-L0syms.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/src/cmd/link/internal/ld/ldelf.go b/src/cmd/link/internal/ld/ldelf.go -index d4f9fc4..87dabaa 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) { - continue - } - -+ if sect.name == ".debug_str" && sym.name == "L0" && sym.type_ == 0 { -+ // introduced by https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=49fced1206db40c71208c201165d65f92c69cebe on s390x -+ // TODO investigate from where they are actually coming from, could be possible issue with elf parsing as seeing 0x1 in name is weird -+ // See issue https://github.com/golang/go/issues/20996 -+ continue -+ } -+ - if strings.HasPrefix(sym.name, ".LASF") { // gcc on s390x does this - continue - } diff --git a/sources b/sources index 757bcda..d7beae5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.9.2.src.tar.gz) = 1034098575c317eeaf648629690a4dea0c479a69c3b80d9917f6b96c8781ce79c0f29859f667dc4e07d47a44972aa09bd0163a458f897cf45f9d09eb03e4abb5 +SHA512 (go1.10beta1.src.tar.gz) = ad479336f2ad90ca3dfb782e96c954d3c876fac69664666310817e31b471b6591f983aa8ab8eb321be8354fb0de7f5a901c10a192a06333535ccaebc14184d9b diff --git a/use-buildmode-pie-for-pie-testing.patch b/use-buildmode-pie-for-pie-testing.patch deleted file mode 100644 index 9f0db0e..0000000 --- a/use-buildmode-pie-for-pie-testing.patch +++ /dev/null @@ -1,51 +0,0 @@ -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 - return true - } - return false -+ case "pie": -+ switch pair { -+ case "linux-386", "linux-amd64", "linux-arm", "linux-arm64", "linux-ppc64le", "linux-s390x", -+ "android-amd64", "android-arm", "android-arm64", "android-386": -+ return true -+ case "darwin-amd64": -+ return true -+ } -+ return false -+ - default: - log.Fatalf("internal error: unknown buildmode %s", mode) - return false -@@ -953,24 +963,16 @@ func (t *tester) cgoTest(dt *distTest) e - } - } - -- if pair != "freebsd-amd64" { // clang -pie fails to link misc/cgo/test -- cmd := t.dirCmd("misc/cgo/test", -- cc, "-xc", "-o", "/dev/null", "-pie", "-") -+ if t.supportedBuildmode("pie") { -+ cmd = t.addCmd(dt, "misc/cgo/test", "go", "test", "-buildmode=pie") - cmd.Env = env -- cmd.Stdin = strings.NewReader("int main() {}") -- if err := cmd.Run(); err != nil { -- fmt.Println("No support for -pie found, skip cgo PIE test.") -- } else { -- cmd = t.addCmd(dt, "misc/cgo/test", "go", "test", "-ldflags", `-linkmode=external -extldflags "-pie"`) -- cmd.Env = env - -- cmd = t.addCmd(dt, "misc/cgo/testtls", "go", "test", "-ldflags", `-linkmode=external -extldflags "-pie"`) -- cmd.Env = env -+ cmd = t.addCmd(dt, "misc/cgo/testtls", "go", "test", "-buildmode=pie") -+ cmd.Env = env - -- cmd = t.addCmd(dt, "misc/cgo/nocgo", "go", "test", "-ldflags", `-linkmode=external -extldflags "-pie"`) -- cmd.Env = env -+ cmd = t.addCmd(dt, "misc/cgo/nocgo", "go", "test", "-buildmode=pie") -+ cmd.Env = env - -- } - } - } - } diff --git a/use-no-pie-where-needed.patch b/use-no-pie-where-needed.patch deleted file mode 100644 index e970498..0000000 --- a/use-no-pie-where-needed.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 3502496d03bcd842fd7aac95ec0d7096d581cd26 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 - -Starting in gcc 6, -pie is passed to the linker by default -on some platforms, including ppc64le. If the objects -being linked are not built for -pie then in some cases the -executable could be in error. To avoid that problem, -no-pie -should be used with gcc to override the default -pie option -and generate a correct executable that can be run without error. - -Fixes #22126 - -Change-Id: I4a052bba8b9b3bd6706f5d27ca9a7cebcb504c95 -Reviewed-on: https://go-review.googlesource.com/70072 -Run-TryBot: Lynn Boger -TryBot-Result: Gobot Gobot -Reviewed-by: Ian Lance Taylor ---- - misc/cgo/testcarchive/carchive_test.go | 20 +++++++++++++++++++- - 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 ---- a/misc/cgo/testcarchive/carchive_test.go -+++ b/misc/cgo/testcarchive/carchive_test.go -@@ -6,6 +6,7 @@ package carchive_test - - import ( - "bufio" -+ "bytes" - "debug/elf" - "fmt" - "io/ioutil" -@@ -609,9 +610,26 @@ func TestCompileWithoutShared(t *testing.T) { - } - - exe := "./testnoshared" + exeSuffix -- ccArgs := append(cc, "-o", exe, "main5.c", "libgo2.a") -+ -+ // In some cases, -no-pie is needed here, but not accepted everywhere. First try -+ // if -no-pie is accepted. See #22126. -+ ccArgs := append(cc, "-o", exe, "-no-pie", "main5.c", "libgo2.a") - t.Log(ccArgs) - out, err = exec.Command(ccArgs[0], ccArgs[1:]...).CombinedOutput() -+ -+ // If -no-pie unrecognized, try -nopie if this is possibly clang -+ if err != nil && bytes.Contains(out, []byte("unknown")) && !strings.Contains(cc[0], "gcc") { -+ ccArgs = append(cc, "-o", exe, "-nopie", "main5.c", "libgo2.a") -+ t.Log(ccArgs) -+ out, err = exec.Command(ccArgs[0], ccArgs[1:]...).CombinedOutput() -+ } -+ -+ // Don't use either -no-pie or -nopie -+ if err != nil && bytes.Contains(out, []byte("unrecognized")) { -+ ccArgs := append(cc, "-o", exe, "main5.c", "libgo2.a") -+ t.Log(ccArgs) -+ out, err = exec.Command(ccArgs[0], ccArgs[1:]...).CombinedOutput() -+ } - t.Logf("%s", out) - if err != nil { - t.Fatal(err) From 77baa559ba498f05501cfbdbd754c7b8af06dee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Fri, 12 Jan 2018 12:47:23 +0100 Subject: [PATCH 03/22] Rebase to 1.10beta2 --- .gitignore | 1 + golang.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 89ba499..e53fa09 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ /go1.9.1.src.tar.gz /go1.9.2.src.tar.gz /go1.10beta1.src.tar.gz +/go1.10beta2.src.tar.gz diff --git a/golang.spec b/golang.spec index bb3fdee..6719222 100644 --- a/golang.spec +++ b/golang.spec @@ -102,11 +102,11 @@ %endif %global go_api 1.10 -%global go_version 1.10beta1 +%global go_version 1.10beta2 Name: golang Version: 1.10 -Release: 0.beta1.1%{?dist} +Release: 0.beta2.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 @@ -547,7 +547,10 @@ fi %endif %changelog -* Mon Jan 08 2018 Jakub Čajka - 1.9.2-0.beta1.1 +* Fri Jan 12 2018 Jakub Čajka - 1.10-0.beta2.1 +- Rebase to 1.10beta2 + +* Mon Jan 08 2018 Jakub Čajka - 1.10-0.beta1.1 - Rebase to 1.10beta1 - Drop verbose patch as most of it is now implemented by bootstrap tool and is easily toggled by passing -v flag to make.bash diff --git a/sources b/sources index d7beae5..905dccd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.10beta1.src.tar.gz) = ad479336f2ad90ca3dfb782e96c954d3c876fac69664666310817e31b471b6591f983aa8ab8eb321be8354fb0de7f5a901c10a192a06333535ccaebc14184d9b +SHA512 (go1.10beta2.src.tar.gz) = 7719dd542e0d49cba89aedd356edb521268f8370876fe6aff780683931c7d0c4256d4a141f06b17337050a850fc26732913532bd71290329ab7cd5a0830a79ae From 63e3cb4201c618bf4be45912252d99cf3941ae98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Sat, 27 Jan 2018 09:34:18 +0100 Subject: [PATCH 04/22] Rebase to 1.10rc1 --- .gitignore | 1 + golang.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e53fa09..8091eb9 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ /go1.9.2.src.tar.gz /go1.10beta1.src.tar.gz /go1.10beta2.src.tar.gz +/go1.10rc1.src.tar.gz diff --git a/golang.spec b/golang.spec index 6719222..999c23a 100644 --- a/golang.spec +++ b/golang.spec @@ -102,11 +102,11 @@ %endif %global go_api 1.10 -%global go_version 1.10beta2 +%global go_version 1.10rc1 Name: golang Version: 1.10 -Release: 0.beta2.1%{?dist} +Release: 0.rc1.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 @@ -547,6 +547,9 @@ fi %endif %changelog +* Fri Jan 26 2018 Jakub Čajka - 1.10-0.rc1.1 +- Rebase to 1.10rc1 + * Fri Jan 12 2018 Jakub Čajka - 1.10-0.beta2.1 - Rebase to 1.10beta2 diff --git a/sources b/sources index 905dccd..2fc6058 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.10beta2.src.tar.gz) = 7719dd542e0d49cba89aedd356edb521268f8370876fe6aff780683931c7d0c4256d4a141f06b17337050a850fc26732913532bd71290329ab7cd5a0830a79ae +SHA512 (go1.10rc1.src.tar.gz) = 097fae8c161338922bd1b5e6d8e990eaa47aaa034daab56a2d8edc7a1750bfcc16d80fb5a4b2a5a9b444d29cdc926d0cfaf258052e6b891abd634c37edcd0421 From 13bb238b09560fb75c34b0d5e0d28fdf2c1bedfc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 13:48:58 +0000 Subject: [PATCH 05/22] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- golang.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/golang.spec b/golang.spec index 999c23a..23ed049 100644 --- a/golang.spec +++ b/golang.spec @@ -106,7 +106,7 @@ Name: golang Version: 1.10 -Release: 0.rc1.1%{?dist} +Release: 0.rc1.1%{?dist}.1 Summary: The Go Programming Language # source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain License: BSD and Public Domain @@ -547,6 +547,9 @@ fi %endif %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 1.10-0.rc1.1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Fri Jan 26 2018 Jakub Čajka - 1.10-0.rc1.1 - Rebase to 1.10rc1 From 5f45ed12c2e39f247a0f70bdf5bd44f6211dfc94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Thu, 8 Feb 2018 14:50:08 +0100 Subject: [PATCH 06/22] Rebase to 1.10rc2 Fix CVE-2018-6574 Resolves: BZ#1543561, BZ#1543562 --- .gitignore | 1 + golang-1.10-pkgconfig-fix.patch | 138 ++++++++++++++++++-------------- golang.spec | 9 ++- sources | 2 +- 4 files changed, 89 insertions(+), 61 deletions(-) diff --git a/.gitignore b/.gitignore index 8091eb9..e73d6c9 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,4 @@ /go1.10beta1.src.tar.gz /go1.10beta2.src.tar.gz /go1.10rc1.src.tar.gz +/go1.10rc2.src.tar.gz diff --git a/golang-1.10-pkgconfig-fix.patch b/golang-1.10-pkgconfig-fix.patch index 9236466..24f454a 100644 --- a/golang-1.10-pkgconfig-fix.patch +++ b/golang-1.10-pkgconfig-fix.patch @@ -1,4 +1,4 @@ -From b17b0c7d9b1d7bffd90a83fb887c66b421193eb8 Mon Sep 17 00:00:00 2001 +From 09581ca4826b6d67b1c3a3c8597038b28a37f52d 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 @@ -10,50 +10,78 @@ Fix interfacing with latest(1.4+) pkgconf versions, as they have change the outp Change-Id: I55301bb564b07128d5564ec1454dd247f84a95c3 --- - src/cmd/go/internal/work/build_test.go | 15 ++++++- - src/cmd/go/internal/work/exec.go | 79 +++++++++++++++++++++++++--------- - 2 files changed, 72 insertions(+), 22 deletions(-) + src/cmd/go/internal/work/build_test.go | 44 +++++++++++++++++--- + src/cmd/go/internal/work/exec.go | 75 +++++++++++++++++++++++----------- + 2 files changed, 90 insertions(+), 29 deletions(-) diff --git a/src/cmd/go/internal/work/build_test.go b/src/cmd/go/internal/work/build_test.go -index 3f5ba37c64..be9857ade7 100644 +index 3f5ba37c64..c3c63a97a4 100644 --- a/src/cmd/go/internal/work/build_test.go +++ b/src/cmd/go/internal/work/build_test.go -@@ -43,10 +43,23 @@ func TestSplitPkgConfigOutput(t *testing.T) { - {[]byte(`-r:foo -L/usr/white\ space/lib -lfoo\ bar -lbar\ baz`), []string{"-r:foo", "-L/usr/white space/lib", "-lfoo bar", "-lbar baz"}}, - {[]byte(`-lextra\ fun\ arg\\`), []string{`-lextra fun arg\`}}, - {[]byte(`broken flag\`), []string{"broken", "flag"}}, -+ {[]byte(`extra broken flag \`), []string{"extra", "broken", "flag"}}, - {[]byte("\textra whitespace\r\n"), []string{"extra", "whitespace"}}, - {[]byte(" \r\n "), nil}, -+ {[]byte(`"-r:foo" "-L/usr/white space/lib" "-lfoo bar" "-lbar baz"`), []string{"-r:foo", "-L/usr/white space/lib", "-lfoo bar", "-lbar baz"}}, -+ {[]byte(`"-lextra fun arg\\"`), []string{`-lextra fun arg\`}}, -+ {[]byte(`" \r\n "`), []string{` \r\n `}}, -+ {[]byte(`""`), nil}, -+ {[]byte(`-fPIC -I/test/include/foo -DQUOTED='"/test/share/doc"'`), []string{"-fPIC", "-I/test/include/foo", "-DQUOTED=\"/test/share/doc\""}}, -+ {[]byte(`-fPIC -I/test/include/foo -DQUOTED="/test/share/doc"`), []string{"-fPIC", "-I/test/include/foo", "-DQUOTED=/test/share/doc"}}, -+ {[]byte(`-fPIC -I/test/include/foo -DQUOTED=\"/test/share/doc\"`), []string{"-fPIC", "-I/test/include/foo", "-DQUOTED=\"/test/share/doc\""}}, -+ {[]byte(`-fPIC -I/test/include/foo -DQUOTED='/test/share/doc'`), []string{"-fPIC", "-I/test/include/foo", "-DQUOTED=/test/share/doc"}}, -+ {[]byte(`-Dhello=10 -Dworld=+32 -DDEFINED_FROM_PKG_CONFIG=hello\ world`), []string{"-Dhello=10", "-Dworld=+32", "-DDEFINED_FROM_PKG_CONFIG=hello world"}}, +@@ -39,14 +39,46 @@ func TestSplitPkgConfigOutput(t *testing.T) { + for _, test := range []struct { + in []byte + want []string ++ pass bool + }{ +- {[]byte(`-r:foo -L/usr/white\ space/lib -lfoo\ bar -lbar\ baz`), []string{"-r:foo", "-L/usr/white space/lib", "-lfoo bar", "-lbar baz"}}, +- {[]byte(`-lextra\ fun\ arg\\`), []string{`-lextra fun arg\`}}, +- {[]byte(`broken flag\`), []string{"broken", "flag"}}, +- {[]byte("\textra whitespace\r\n"), []string{"extra", "whitespace"}}, +- {[]byte(" \r\n "), nil}, ++ {[]byte(`-r:foo -L/usr/white\ space/lib -lfoo\ bar -lbar\ baz`), []string{"-r:foo", "-L/usr/white space/lib", "-lfoo bar", "-lbar baz"}, true}, ++ {[]byte(`-lextra\ fun\ arg\\`), []string{`-lextra fun arg\`}, true}, ++ {[]byte(`broken flag\`), []string{"broken", "flag"}, true}, ++ {[]byte(`extra broken flag \`), []string{"extra", "broken", "flag"}, true}, ++ {[]byte(`\`), nil, true}, ++ {[]byte("\textra whitespace\r\n"), []string{"extra", "whitespace"}, true}, ++ {[]byte(" \r\n "), nil, true}, ++ {[]byte(`"-r:foo" "-L/usr/white space/lib" "-lfoo bar" "-lbar baz"`), []string{"-r:foo", "-L/usr/white space/lib", "-lfoo bar", "-lbar baz"}, true}, ++ {[]byte(`"-lextra fun arg\\"`), []string{`-lextra fun arg\`}, true}, ++ {[]byte(`" \r\n\ "`), []string{` \r\n\ `}, true}, ++ {[]byte(`""`), nil, true}, ++ {[]byte(``), nil, true}, ++ {[]byte(`"\\"`), []string{`\`}, true}, ++ {[]byte(`"\x"`), []string{`\x`}, true}, ++ {[]byte(`"\\x"`), []string{`\x`}, true}, ++ {[]byte(`'\\'`), []string{`\`}, true}, ++ {[]byte(`'\x'`), []string{`\x`}, true}, ++ {[]byte(`"\\x"`), []string{`\x`}, true}, ++ {[]byte(`-fPIC -I/test/include/foo -DQUOTED='"/test/share/doc"'`), []string{"-fPIC", "-I/test/include/foo", `-DQUOTED="/test/share/doc"`}, true}, ++ {[]byte(`-fPIC -I/test/include/foo -DQUOTED="/test/share/doc"`), []string{"-fPIC", "-I/test/include/foo", "-DQUOTED=/test/share/doc"}, true}, ++ {[]byte(`-fPIC -I/test/include/foo -DQUOTED=\"/test/share/doc\"`), []string{"-fPIC", "-I/test/include/foo", `-DQUOTED="/test/share/doc"`}, true}, ++ {[]byte(`-fPIC -I/test/include/foo -DQUOTED='/test/share/doc'`), []string{"-fPIC", "-I/test/include/foo", "-DQUOTED=/test/share/doc"}, true}, ++ {[]byte(`-DQUOTED='/te\st/share/d\oc'`), []string{`-DQUOTED=/te\st/share/d\oc`}, true}, ++ {[]byte(`-Dhello=10 -Dworld=+32 -DDEFINED_FROM_PKG_CONFIG=hello\ world`), []string{"-Dhello=10", "-Dworld=+32", "-DDEFINED_FROM_PKG_CONFIG=hello world"}, true}, ++ {[]byte(`" \r\n `), nil, false}, ++ {[]byte(`"-r:foo" "-L/usr/white space/lib "-lfoo bar" "-lbar baz"`), nil, false}, ++ {[]byte(`"-lextra fun arg\\`), nil, false}, } { - got := splitPkgConfigOutput(test.in) + got, err := splitPkgConfigOutput(test.in) + if err != nil { -+ t.Errorf("splitPkgConfigOutput(%v) = %v; function returned error %v", test.in, got, err) ++ if test.pass { ++ t.Errorf("splitPkgConfigOutput(%v) = %v; function returned error %v", test.in, got, err) ++ } ++ if got != nil { ++ t.Errorf("splitPkgConfigOutput failed with error %v and output has been non nil %v", err, got) ++ } ++ continue + } if !reflect.DeepEqual(got, test.want) { 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 60e2a3aa48..c5a438aac9 100644 +index a5ab75f6a8..8774be1385 100644 --- a/src/cmd/go/internal/work/exec.go +++ b/src/cmd/go/internal/work/exec.go -@@ -855,36 +855,67 @@ func (b *Builder) PkgconfigCmd() string { +@@ -900,36 +900,62 @@ func (b *Builder) PkgconfigCmd() string { } // splitPkgConfigOutput parses the pkg-config output into a slice of -// flags. pkg-config always uses \ to escape special characters. -func splitPkgConfigOutput(out []byte) []string { -+// flags. Implementing algorithm from pkgconf/libpkgconf/argvsplit.c ++// flags. This implements the algorithm from pkgconf/libpkgconf/argvsplit.c +func splitPkgConfigOutput(out []byte) ([]string, error) { if len(out) == 0 { - return nil @@ -62,26 +90,26 @@ index 60e2a3aa48..c5a438aac9 100644 var flags []string - flag := make([]byte, len(out)) - r, w := 0, 0 -+ flag := make([]byte, 0, len(out)) -+ r := 0 -+ escaped := false -+ var quote byte = 0 -+ - for r < len(out) { +- for r < len(out) { - switch out[r] { - case ' ', '\t', '\r', '\n': - if w > 0 { - flags = append(flags, string(flag[:w])) ++ flag := make([]byte, 0, len(out)) ++ escaped := false ++ quote := byte(0) ++ ++ for _, c := range out { + if escaped { -+ if quote == '"' { -+ switch out[r] { ++ if quote == '"' || quote == '\'' { ++ switch c { + case '$', '`', '"', '\\': + default: + flag = append(flag, '\\') + } -+ flag = append(flag, out[r]) ++ flag = append(flag, c) + } else { -+ flag = append(flag, out[r]) ++ flag = append(flag, c) } - w = 0 - case '\\': @@ -93,39 +121,36 @@ index 60e2a3aa48..c5a438aac9 100644 - w++ + escaped = false + } else if quote != 0 { -+ if out[r] == quote { ++ if c == quote { + quote = 0 + } else { -+ switch out[r] { ++ switch c { + case '\\': -+ if quote == '\'' { -+ break -+ } + escaped = true + default: -+ flag = append(flag, out[r]) ++ flag = append(flag, c) + } -+ } -+ } else if !(strings.IndexByte(" \t\n\v\f\r", out[r]) >= 0) { -+ switch out[r] { + } ++ } else if strings.IndexByte(" \t\n\v\f\r", c) < 0 { ++ switch c { + case '\\': + escaped = true + case '\'', '"': -+ quote = out[r] ++ quote = c + default: -+ flag = append(flag, out[r]) - } ++ flag = append(flag, c) ++ } + } else if len(flag) != 0 { + flags = append(flags, string(flag)) + flag = flag[:0] } - r++ +- r++ } - if w > 0 { - flags = append(flags, string(flag[:w])) + + if quote != 0 { -+ return flags, errors.New("unterminated quoted string in pkgconf output " + string(out)) ++ return nil, errors.New("unterminated quoted string in pkgconf output ") + } else if len(flag) != 0 { + flags = append(flags, string(flag)) } @@ -135,21 +160,18 @@ index 60e2a3aa48..c5a438aac9 100644 } // Calls pkg-config if needed and returns the cflags/ldflags needed to build the package. -@@ -899,7 +930,13 @@ func (b *Builder) getPkgConfigFlags(p *load.Package) (cflags, ldflags []string, - return +@@ -948,7 +974,10 @@ func (b *Builder) getPkgConfigFlags(p *load.Package) (cflags, ldflags []string, + return nil, nil, errPrintedOutput } if len(out) > 0 { - cflags = splitPkgConfigOutput(out) + cflags, err = splitPkgConfigOutput(out) + if err != nil { -+ b.showOutput(nil, p.Dir, b.PkgconfigCmd()+" --libs "+strings.Join(pkgs, " "), string(out)) -+ b.Print(err.Error() + "\n") -+ err = errPrintedOutput -+ return ++ return nil, nil, err + } - } - out, err = b.runOut(p.Dir, p.ImportPath, nil, b.PkgconfigCmd(), "--libs", pkgs) - if err != nil { + if err := checkCompilerFlags("CFLAGS", "pkg-config --cflags", cflags); err != nil { + return nil, nil, err + } -- 2.14.3 diff --git a/golang.spec b/golang.spec index 23ed049..b078d8b 100644 --- a/golang.spec +++ b/golang.spec @@ -102,11 +102,11 @@ %endif %global go_api 1.10 -%global go_version 1.10rc1 +%global go_version 1.10rc2 Name: golang Version: 1.10 -Release: 0.rc1.1%{?dist}.1 +Release: 0.rc2.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 @@ -547,6 +547,11 @@ fi %endif %changelog +* Thu Feb 08 2018 Jakub Čajka - 1.10-0.rc2.1 +- Rebase to 1.10rc2 +- Fix CVE-2018-6574 +- Resolves: BZ#1543561, BZ#1543562 + * Wed Feb 07 2018 Fedora Release Engineering - 1.10-0.rc1.1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources index 2fc6058..5908f7c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.10rc1.src.tar.gz) = 097fae8c161338922bd1b5e6d8e990eaa47aaa034daab56a2d8edc7a1750bfcc16d80fb5a4b2a5a9b444d29cdc926d0cfaf258052e6b891abd634c37edcd0421 +SHA512 (go1.10rc2.src.tar.gz) = 7610ff51fa2f333d939b61c8b120684a7dd33cf370e76ec68e4eb5ee8bd85ec9b9517b609ae661a0a8a00263994ee898bb6ed9c3e16a8e8fe62def3e70b9071e From 639f9ab37fdf31e8432af64f52bfe5107fa488b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Wed, 21 Feb 2018 13:01:34 +0100 Subject: [PATCH 07/22] Rebase to 1.10 --- .gitignore | 1 + golang.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e73d6c9..03efc44 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ /go1.10beta2.src.tar.gz /go1.10rc1.src.tar.gz /go1.10rc2.src.tar.gz +/go1.10.src.tar.gz diff --git a/golang.spec b/golang.spec index b078d8b..797d893 100644 --- a/golang.spec +++ b/golang.spec @@ -102,11 +102,11 @@ %endif %global go_api 1.10 -%global go_version 1.10rc2 +%global go_version 1.10 Name: golang Version: 1.10 -Release: 0.rc2.1%{?dist} +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 @@ -547,6 +547,9 @@ fi %endif %changelog +* Wed Feb 21 2018 Jakub Čajka - 1.10-1 +- Rebase to 1.10 + * Thu Feb 08 2018 Jakub Čajka - 1.10-0.rc2.1 - Rebase to 1.10rc2 - Fix CVE-2018-6574 diff --git a/sources b/sources index 5908f7c..af2085f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.10rc2.src.tar.gz) = 7610ff51fa2f333d939b61c8b120684a7dd33cf370e76ec68e4eb5ee8bd85ec9b9517b609ae661a0a8a00263994ee898bb6ed9c3e16a8e8fe62def3e70b9071e +SHA512 (go1.10.src.tar.gz) = 59f089e1ffb2d3aba5ada329d4f0d1181c3c4f01fa64f19d0b753f8a989cb59cf290ad88d215cadc18ef99aba8518e44c9bc258c07eaffc834c55e4a37bd4651 From e8abe4385feca18c5ec8f372d96896002771f6de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Wed, 21 Feb 2018 13:01:34 +0100 Subject: [PATCH 08/22] Add dependency on scm tools so go get works out of box in minimal envs --- golang.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/golang.spec b/golang.spec index 797d893..d7f1c69 100644 --- a/golang.spec +++ b/golang.spec @@ -272,6 +272,7 @@ Requires(postun): %{_sbindir}/update-alternatives # This is an odd issue, still looking for a better fix. Requires: glibc Requires: gcc +Requires: git, subversion, mercurial %description bin %{summary} From 2389428bde52e6c7fd39b2e509bdc03823764f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Sat, 3 Mar 2018 11:26:41 +0100 Subject: [PATCH 09/22] Fix CVE-2018-7187 Resolves: BZ#1546386, BZ#1546388 --- CVE-2018-7187.patch | 124 ++++++++++++++++++++++++++++++++++++++++++++ golang.spec | 10 +++- 2 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 CVE-2018-7187.patch diff --git a/CVE-2018-7187.patch b/CVE-2018-7187.patch new file mode 100644 index 0000000..591ba32 --- /dev/null +++ b/CVE-2018-7187.patch @@ -0,0 +1,124 @@ +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.spec b/golang.spec index d7f1c69..6da4d5c 100644 --- a/golang.spec +++ b/golang.spec @@ -106,7 +106,7 @@ Name: golang Version: 1.10 -Release: 1%{?dist} +Release: 2%{?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 @@ -185,6 +185,8 @@ Patch219: s390x-expose-IfInfomsg-X__ifi_pad.patch # Proposed patch by jcajka https://golang.org/cl/86541 Patch221: golang-1.10-pkgconfig-fix.patch +Patch222: CVE-2018-7187.patch + # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -313,6 +315,8 @@ Requires: %{name} = %{version}-%{release} %patch221 -p1 +%patch222 -p1 + cp %{SOURCE1} ./src/runtime/ %build @@ -548,6 +552,10 @@ fi %endif %changelog +* Sat Mar 03 2018 Jakub Čajka - 1.10-2 +- Fix CVE-2018-7187 +- Resolves: BZ#1546386, BZ#1546388 + * Wed Feb 21 2018 Jakub Čajka - 1.10-1 - Rebase to 1.10 From 66a92c4de7426b0fa8fc79f409395dd963ae6fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Wed, 4 Apr 2018 10:10:28 +0200 Subject: [PATCH 10/22] Rebase to 1.10.1 Resolves: BZ#1562270 --- .gitignore | 1 + CVE-2018-7187.patch | 124 -------------------------------------------- golang.spec | 14 ++--- sources | 2 +- 4 files changed, 9 insertions(+), 132 deletions(-) delete mode 100644 CVE-2018-7187.patch diff --git a/.gitignore b/.gitignore index 03efc44..4cbb603 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ /go1.10rc1.src.tar.gz /go1.10rc2.src.tar.gz /go1.10.src.tar.gz +/go1.10.1.src.tar.gz 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.spec b/golang.spec index 6da4d5c..c97f8aa 100644 --- a/golang.spec +++ b/golang.spec @@ -102,11 +102,11 @@ %endif %global go_api 1.10 -%global go_version 1.10 +%global go_version 1.10.1 Name: golang -Version: 1.10 -Release: 2%{?dist} +Version: 1.10.1 +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 @@ -185,8 +185,6 @@ Patch219: s390x-expose-IfInfomsg-X__ifi_pad.patch # Proposed patch by jcajka https://golang.org/cl/86541 Patch221: golang-1.10-pkgconfig-fix.patch -Patch222: CVE-2018-7187.patch - # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -315,8 +313,6 @@ Requires: %{name} = %{version}-%{release} %patch221 -p1 -%patch222 -p1 - cp %{SOURCE1} ./src/runtime/ %build @@ -552,6 +548,10 @@ fi %endif %changelog +* Wed Apr 04 2018 Jakub Čajka - 1.10.1-1 +- Rebase to 1.10.1 +- Resolves: BZ#1562270 + * Sat Mar 03 2018 Jakub Čajka - 1.10-2 - Fix CVE-2018-7187 - Resolves: BZ#1546386, BZ#1546388 diff --git a/sources b/sources index af2085f..ade4700 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.10.src.tar.gz) = 59f089e1ffb2d3aba5ada329d4f0d1181c3c4f01fa64f19d0b753f8a989cb59cf290ad88d215cadc18ef99aba8518e44c9bc258c07eaffc834c55e4a37bd4651 +SHA512 (go1.10.1.src.tar.gz) = 13f6b0643a4f92eeca04444b9fa10de38fc3427daea9aa3227cf9a5738ffee1a3f2e355ba5faf711b8506f7de118bdcd3b9064b65407a22613523e29ffd73415 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 11/22] 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 From c333e76e869a626eb5936d311dc4ba4c29a10e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Mon, 11 Jun 2018 09:04:52 +0200 Subject: [PATCH 12/22] Rebase to 1.10.3 --- .gitignore | 1 + golang.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c3bee51..5eb6010 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ /go1.10.src.tar.gz /go1.10.1.src.tar.gz /go1.10.2.src.tar.gz +/go1.10.3.src.tar.gz diff --git a/golang.spec b/golang.spec index 54ed39b..a697b93 100644 --- a/golang.spec +++ b/golang.spec @@ -102,10 +102,10 @@ %endif %global go_api 1.10 -%global go_version 1.10.2 +%global go_version 1.10.3 Name: golang -Version: 1.10.2 +Version: 1.10.3 Release: 1%{?dist} Summary: The Go Programming Language # source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain @@ -540,6 +540,9 @@ fi %endif %changelog +* Fri Jun 08 2018 Jakub Čajka - 1.10.3-1 +- Rebase to 1.10.3 + * Wed May 02 2018 Jakub Čajka - 1.10.2-1 - Rebase to 1.10.2 diff --git a/sources b/sources index ac95b0f..d66a8a7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.10.2.src.tar.gz) = 754e60bce1ea3479ebb57bbbb625e3d7875a151e7a6d7a1067478a9e45bde5423f47123d084832bb838acf7675a9d05057b76c1d773e43cae0fb4e7a52acf4a9 +SHA512 (go1.10.3.src.tar.gz) = fd2bd5fcb5c6d0a5336c4b1d2cacb368edbb01359297a83bdedc53f6018642598232f00633fc60fde879050f5f26a810c828d46b5d6626cbcc0702d93ad33fbb From 19d1adeab44ae2434ee16767bb8199fd6caaf9de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Wed, 4 Jul 2018 14:05:44 +0200 Subject: [PATCH 13/22] Rebase to go1.11beta1 --- .gitignore | 1 + ....Parse-to-properly-initialize-test-e.patch | 51 +++++ ...work-improve-pkgconfig-support-to-wo.patch | 177 ------------------ golang.spec | 31 +-- sources | 2 +- 5 files changed, 73 insertions(+), 189 deletions(-) create mode 100644 0001-cmd-go-call-flag.Parse-to-properly-initialize-test-e.patch delete mode 100644 0003-cmd-go-internal-work-improve-pkgconfig-support-to-wo.patch diff --git a/.gitignore b/.gitignore index 5eb6010..bdbb9b1 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ /go1.10.1.src.tar.gz /go1.10.2.src.tar.gz /go1.10.3.src.tar.gz +/go1.11beta1.src.tar.gz diff --git a/0001-cmd-go-call-flag.Parse-to-properly-initialize-test-e.patch b/0001-cmd-go-call-flag.Parse-to-properly-initialize-test-e.patch new file mode 100644 index 0000000..f0add07 --- /dev/null +++ b/0001-cmd-go-call-flag.Parse-to-properly-initialize-test-e.patch @@ -0,0 +1,51 @@ +From b55fe6a3702922f35b8d440f32fd5a54ee92f5f8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jakub=20=C4=8Cajka?= +Date: Mon, 25 Jun 2018 12:31:53 +0200 +Subject: [PATCH] cmd/go: call flag.Parse to properly initialize test + environment variables + +Executing tests in cmd/go/internal/modfetch/gitrepo/fetch_test.go in enviroment +witout outside connectivity in to the internet results in tests failure: + +2018/06/25 12:48:26 git clone --mirror https://vcs-test.golang.org/git/gitrepo1 /tmp/gitrepo-test-221822392/gitrepo2 in : exit status 128: + Cloning into bare repository '/tmp/gitrepo-test-221822392/gitrepo2'... + fatal: unable to access 'https://vcs-test.golang.org/git/gitrepo1/': Could not resolve host: vcs-test.golang.org +FAIL cmd/go/internal/modfetch/gitrepo 0.144s + +Call flag.Parse in TestMain to properly initialize test environment variables + +Fixes #26007 + +Change-Id: I059e27db69c0ca0e01db724035a25d6fefb094b5 +Reviewed-on: https://go-review.googlesource.com/120735 +Run-TryBot: Ian Lance Taylor +Reviewed-by: Brad Fitzpatrick +--- + src/cmd/go/internal/modfetch/gitrepo/fetch_test.go | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/cmd/go/internal/modfetch/gitrepo/fetch_test.go b/src/cmd/go/internal/modfetch/gitrepo/fetch_test.go +index ca932808e8..622249e67d 100644 +--- a/src/cmd/go/internal/modfetch/gitrepo/fetch_test.go ++++ b/src/cmd/go/internal/modfetch/gitrepo/fetch_test.go +@@ -7,6 +7,7 @@ package gitrepo + import ( + "archive/zip" + "bytes" ++ "flag" + "fmt" + "internal/testenv" + "io/ioutil" +@@ -23,6 +24,9 @@ import ( + ) + + func TestMain(m *testing.M) { ++ // needed for initializing the test environment variables as testing.Short ++ // and HasExternalNetwork ++ flag.Parse() + os.Exit(testMain(m)) + } + +-- +2.14.4 + diff --git a/0003-cmd-go-internal-work-improve-pkgconfig-support-to-wo.patch b/0003-cmd-go-internal-work-improve-pkgconfig-support-to-wo.patch deleted file mode 100644 index 933244b..0000000 --- a/0003-cmd-go-internal-work-improve-pkgconfig-support-to-wo.patch +++ /dev/null @@ -1,177 +0,0 @@ -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 3/3] cmd/go/internal/work : improve pkgconfig support to work - with latest(1.4+) pkgconf - -Fixes #23373 - -Fix interfacing with latest(1.4+) pkgconf versions, as they have change the output format, by extending parsing function splitPkgConfigOutput to accommodate more possible fragment escaping formats. Function is based on pkgconfigs own implementation at https://github.com/pkgconf/pkgconf/blob/master/libpkgconf/argvsplit.c. Along with this change test case TestSplitPkgConfigOutput have been expanded. Thanks to ignatenko for help on test cases and insights in to the pkgconfig. - -Change-Id: I55301bb564b07128d5564ec1454dd247f84a95c3 ---- - src/cmd/go/internal/work/build_test.go | 44 +++++++++++++++++--- - src/cmd/go/internal/work/exec.go | 75 +++++++++++++++++++++++----------- - 2 files changed, 90 insertions(+), 29 deletions(-) - -diff --git a/src/cmd/go/internal/work/build_test.go b/src/cmd/go/internal/work/build_test.go -index 3f5ba37c64..c3c63a97a4 100644 ---- a/src/cmd/go/internal/work/build_test.go -+++ b/src/cmd/go/internal/work/build_test.go -@@ -39,14 +39,46 @@ func TestSplitPkgConfigOutput(t *testing.T) { - for _, test := range []struct { - in []byte - want []string -+ pass bool - }{ -- {[]byte(`-r:foo -L/usr/white\ space/lib -lfoo\ bar -lbar\ baz`), []string{"-r:foo", "-L/usr/white space/lib", "-lfoo bar", "-lbar baz"}}, -- {[]byte(`-lextra\ fun\ arg\\`), []string{`-lextra fun arg\`}}, -- {[]byte(`broken flag\`), []string{"broken", "flag"}}, -- {[]byte("\textra whitespace\r\n"), []string{"extra", "whitespace"}}, -- {[]byte(" \r\n "), nil}, -+ {[]byte(`-r:foo -L/usr/white\ space/lib -lfoo\ bar -lbar\ baz`), []string{"-r:foo", "-L/usr/white space/lib", "-lfoo bar", "-lbar baz"}, true}, -+ {[]byte(`-lextra\ fun\ arg\\`), []string{`-lextra fun arg\`}, true}, -+ {[]byte(`broken flag\`), []string{"broken", "flag"}, true}, -+ {[]byte(`extra broken flag \`), []string{"extra", "broken", "flag"}, true}, -+ {[]byte(`\`), nil, true}, -+ {[]byte("\textra whitespace\r\n"), []string{"extra", "whitespace"}, true}, -+ {[]byte(" \r\n "), nil, true}, -+ {[]byte(`"-r:foo" "-L/usr/white space/lib" "-lfoo bar" "-lbar baz"`), []string{"-r:foo", "-L/usr/white space/lib", "-lfoo bar", "-lbar baz"}, true}, -+ {[]byte(`"-lextra fun arg\\"`), []string{`-lextra fun arg\`}, true}, -+ {[]byte(`" \r\n\ "`), []string{` \r\n\ `}, true}, -+ {[]byte(`""`), nil, true}, -+ {[]byte(``), nil, true}, -+ {[]byte(`"\\"`), []string{`\`}, true}, -+ {[]byte(`"\x"`), []string{`\x`}, true}, -+ {[]byte(`"\\x"`), []string{`\x`}, true}, -+ {[]byte(`'\\'`), []string{`\`}, true}, -+ {[]byte(`'\x'`), []string{`\x`}, true}, -+ {[]byte(`"\\x"`), []string{`\x`}, true}, -+ {[]byte(`-fPIC -I/test/include/foo -DQUOTED='"/test/share/doc"'`), []string{"-fPIC", "-I/test/include/foo", `-DQUOTED="/test/share/doc"`}, true}, -+ {[]byte(`-fPIC -I/test/include/foo -DQUOTED="/test/share/doc"`), []string{"-fPIC", "-I/test/include/foo", "-DQUOTED=/test/share/doc"}, true}, -+ {[]byte(`-fPIC -I/test/include/foo -DQUOTED=\"/test/share/doc\"`), []string{"-fPIC", "-I/test/include/foo", `-DQUOTED="/test/share/doc"`}, true}, -+ {[]byte(`-fPIC -I/test/include/foo -DQUOTED='/test/share/doc'`), []string{"-fPIC", "-I/test/include/foo", "-DQUOTED=/test/share/doc"}, true}, -+ {[]byte(`-DQUOTED='/te\st/share/d\oc'`), []string{`-DQUOTED=/te\st/share/d\oc`}, true}, -+ {[]byte(`-Dhello=10 -Dworld=+32 -DDEFINED_FROM_PKG_CONFIG=hello\ world`), []string{"-Dhello=10", "-Dworld=+32", "-DDEFINED_FROM_PKG_CONFIG=hello world"}, true}, -+ {[]byte(`" \r\n `), nil, false}, -+ {[]byte(`"-r:foo" "-L/usr/white space/lib "-lfoo bar" "-lbar baz"`), nil, false}, -+ {[]byte(`"-lextra fun arg\\`), nil, false}, - } { -- got := splitPkgConfigOutput(test.in) -+ got, err := splitPkgConfigOutput(test.in) -+ if err != nil { -+ if test.pass { -+ t.Errorf("splitPkgConfigOutput(%v) = %v; function returned error %v", test.in, got, err) -+ } -+ if got != nil { -+ t.Errorf("splitPkgConfigOutput failed with error %v and output has been non nil %v", err, got) -+ } -+ continue -+ } - if !reflect.DeepEqual(got, test.want) { - 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 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 { - } - - // splitPkgConfigOutput parses the pkg-config output into a slice of --// flags. pkg-config always uses \ to escape special characters. --func splitPkgConfigOutput(out []byte) []string { -+// flags. This implements the algorithm from pkgconf/libpkgconf/argvsplit.c -+func splitPkgConfigOutput(out []byte) ([]string, error) { - if len(out) == 0 { -- return nil -+ return nil, nil - } - var flags []string -- flag := make([]byte, len(out)) -- r, w := 0, 0 -- for r < len(out) { -- switch out[r] { -- case ' ', '\t', '\r', '\n': -- if w > 0 { -- flags = append(flags, string(flag[:w])) -+ flag := make([]byte, 0, len(out)) -+ escaped := false -+ quote := byte(0) -+ -+ for _, c := range out { -+ if escaped { -+ if quote == '"' || quote == '\'' { -+ switch c { -+ case '$', '`', '"', '\\': -+ default: -+ flag = append(flag, '\\') -+ } -+ flag = append(flag, c) -+ } else { -+ flag = append(flag, c) - } -- w = 0 -- case '\\': -- r++ -- fallthrough -- default: -- if r < len(out) { -- flag[w] = out[r] -- w++ -+ escaped = false -+ } else if quote != 0 { -+ if c == quote { -+ quote = 0 -+ } else { -+ switch c { -+ case '\\': -+ escaped = true -+ default: -+ flag = append(flag, c) -+ } - } -+ } else if strings.IndexByte(" \t\n\v\f\r", c) < 0 { -+ switch c { -+ case '\\': -+ escaped = true -+ case '\'', '"': -+ quote = c -+ default: -+ flag = append(flag, c) -+ } -+ } else if len(flag) != 0 { -+ flags = append(flags, string(flag)) -+ flag = flag[:0] - } -- r++ - } -- if w > 0 { -- flags = append(flags, string(flag[:w])) -+ -+ if quote != 0 { -+ return nil, errors.New("unterminated quoted string in pkgconf output ") -+ } else if len(flag) != 0 { -+ flags = append(flags, string(flag)) - } -- return flags -+ -+ return flags, nil - } - - // Calls pkg-config if needed and returns the cflags/ldflags needed to build the package. -@@ -961,7 +987,10 @@ func (b *Builder) getPkgConfigFlags(p *load.Package) (cflags, ldflags []string, - return nil, nil, errPrintedOutput - } - if len(out) > 0 { -- cflags = splitPkgConfigOutput(out) -+ cflags, err = splitPkgConfigOutput(out) -+ if err != nil { -+ return nil, nil, err -+ } - if err := checkCompilerFlags("CFLAGS", "pkg-config --cflags", cflags); err != nil { - return nil, nil, err - } --- -2.14.3 - diff --git a/golang.spec b/golang.spec index a697b93..811e77f 100644 --- a/golang.spec +++ b/golang.spec @@ -1,6 +1,6 @@ %bcond_with bootstrap # temporalily ignore test failures -%ifarch %{ix86} aarch64 +%ifarch %{ix86} aarch64 x86_64 %{arm} %bcond_without ignore_tests %else %bcond_with ignore_tests @@ -101,12 +101,12 @@ %global gohostarch s390x %endif -%global go_api 1.10 -%global go_version 1.10.3 +%global go_api 1.11 +%global go_version 1.11beta1 Name: golang -Version: 1.10.3 -Release: 1%{?dist} +Version: 1.11 +Release: 0.beta1.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 @@ -134,24 +134,24 @@ Provides: go = %{version}-%{release} # Bundled/Vendored provides generated by # go list -f {{.ImportPath}} ./src/vendor/... | sed "s:_$PWD/src/vendor/::g;s:_:.:;s:.*:Provides\: bundled(golang(&)):" && go list -f {{.ImportPath}} ./src/cmd/vendor/... | sed "s:_$PWD/src/cmd/vendor/::g;s:_:.:;s:.*:Provides\: bundled(golang(&)):" Provides: bundled(golang(golang.org/x/crypto/chacha20poly1305)) -Provides: bundled(golang(golang.org/x/crypto/chacha20poly1305/internal/chacha20)) Provides: bundled(golang(golang.org/x/crypto/cryptobyte)) Provides: bundled(golang(golang.org/x/crypto/cryptobyte/asn1)) Provides: bundled(golang(golang.org/x/crypto/curve25519)) +Provides: bundled(golang(golang.org/x/crypto/internal/chacha20)) Provides: bundled(golang(golang.org/x/crypto/poly1305)) +Provides: bundled(golang(golang.org/x/net/dns/dnsmessage)) +Provides: bundled(golang(golang.org/x/net/http/httpguts)) +Provides: bundled(golang(golang.org/x/net/http/httpproxy)) Provides: bundled(golang(golang.org/x/net/http2/hpack)) Provides: bundled(golang(golang.org/x/net/idna)) Provides: bundled(golang(golang.org/x/net/internal/nettest)) -Provides: bundled(golang(golang.org/x/net/lex/httplex)) Provides: bundled(golang(golang.org/x/net/nettest)) -Provides: bundled(golang(golang.org/x/net/proxy)) Provides: bundled(golang(golang.org/x/text/secure)) Provides: bundled(golang(golang.org/x/text/secure/bidirule)) Provides: bundled(golang(golang.org/x/text/transform)) Provides: bundled(golang(golang.org/x/text/unicode)) Provides: bundled(golang(golang.org/x/text/unicode/bidi)) Provides: bundled(golang(golang.org/x/text/unicode/norm)) -Provides: bundled(golang(github.com/google/pprof)) Provides: bundled(golang(github.com/google/pprof/driver)) Provides: bundled(golang(github.com/google/pprof/internal/binutils)) Provides: bundled(golang(github.com/google/pprof/internal/driver)) @@ -164,12 +164,18 @@ Provides: bundled(golang(github.com/google/pprof/internal/report)) Provides: bundled(golang(github.com/google/pprof/internal/symbolizer)) Provides: bundled(golang(github.com/google/pprof/internal/symbolz)) Provides: bundled(golang(github.com/google/pprof/profile)) -Provides: bundled(golang(github.com/google/pprof/third.party/svg)) +Provides: bundled(golang(github.com/google/pprof/third.party/d3)) +Provides: bundled(golang(github.com/google/pprof/third.party/d3flamegraph)) +Provides: bundled(golang(github.com/google/pprof/third.party/svgpan)) Provides: bundled(golang(github.com/ianlancetaylor/demangle)) Provides: bundled(golang(golang.org/x/arch/arm/armasm)) Provides: bundled(golang(golang.org/x/arch/arm64/arm64asm)) Provides: bundled(golang(golang.org/x/arch/ppc64/ppc64asm)) Provides: bundled(golang(golang.org/x/arch/x86/x86asm)) +Provides: bundled(golang(golang.org/x/crypto/ssh/terminal)) +Provides: bundled(golang(golang.org/x/sys/unix)) +Provides: bundled(golang(golang.org/x/sys/windows)) +Provides: bundled(golang(golang.org/x/sys/windows/registry)) Requires: %{name}-bin = %{version}-%{release} Requires: %{name}-src = %{version}-%{release} @@ -177,7 +183,7 @@ Requires: go-srpm-macros 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 +Patch3: 0001-cmd-go-call-flag.Parse-to-properly-initialize-test-e.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -540,6 +546,9 @@ fi %endif %changelog +* Wed Jul 04 2018 Jakub Čajka - 1.11-0.beta1.1 +* Rebase to 1.11beta1 + * Fri Jun 08 2018 Jakub Čajka - 1.10.3-1 - Rebase to 1.10.3 diff --git a/sources b/sources index d66a8a7..8bb3599 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.10.3.src.tar.gz) = fd2bd5fcb5c6d0a5336c4b1d2cacb368edbb01359297a83bdedc53f6018642598232f00633fc60fde879050f5f26a810c828d46b5d6626cbcc0702d93ad33fbb +SHA512 (go1.11beta1.src.tar.gz) = a7369cbb05429f0c2ac0aca27ec67a4fe931f4a496ecd77cb901cbb14f8db5f925736b2d7b1af24e0ad0860aa50334911444c4bef5b92c23d73918a3128a71f3 From 72a9f2e92168af21433c7d1f7e7ffd1f4918baff Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 03:12:06 +0000 Subject: [PATCH 14/22] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- golang.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/golang.spec b/golang.spec index 811e77f..7568ab6 100644 --- a/golang.spec +++ b/golang.spec @@ -106,7 +106,7 @@ Name: golang Version: 1.11 -Release: 0.beta1.1%{?dist} +Release: 0.beta1.1%{?dist}.1 Summary: The Go Programming Language # source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain License: BSD and Public Domain @@ -546,6 +546,9 @@ fi %endif %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 1.11-0.beta1.1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Wed Jul 04 2018 Jakub Čajka - 1.11-0.beta1.1 * Rebase to 1.11beta1 From 75f7f03cb68778053776cd99185805da8145d643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Wed, 18 Jul 2018 14:00:15 +0200 Subject: [PATCH 15/22] Turn off DWARF compression by default as it is not supported by rpm/debuginfo --- ...warf-by-derfault-as-rpm-debuginfo-is.patch | 26 +++++++++++++++++++ golang.spec | 8 +++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0003-Don-t-compress-dwarf-by-derfault-as-rpm-debuginfo-is.patch diff --git a/0003-Don-t-compress-dwarf-by-derfault-as-rpm-debuginfo-is.patch b/0003-Don-t-compress-dwarf-by-derfault-as-rpm-debuginfo-is.patch new file mode 100644 index 0000000..da9131a --- /dev/null +++ b/0003-Don-t-compress-dwarf-by-derfault-as-rpm-debuginfo-is.patch @@ -0,0 +1,26 @@ +From 6d0f113b34e323234eeb279984af83ba98e61c10 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jakub=20=C4=8Cajka?= +Date: Wed, 18 Jul 2018 09:42:28 +0200 +Subject: [PATCH 3/3] Don't compress dwarf by derfault as rpm/debuginfo is not + yet ready for it. + +--- + src/cmd/link/internal/ld/main.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cmd/link/internal/ld/main.go b/src/cmd/link/internal/ld/main.go +index 23462f1154..565da989dd 100644 +--- a/src/cmd/link/internal/ld/main.go ++++ b/src/cmd/link/internal/ld/main.go +@@ -123,7 +123,7 @@ func Main(arch *sys.Arch, theArch Arch) { + flag.BoolVar(&ctxt.linkShared, "linkshared", false, "link against installed Go shared libraries") + flag.Var(&ctxt.LinkMode, "linkmode", "set link `mode`") + flag.Var(&ctxt.BuildMode, "buildmode", "set build `mode`") +- flag.BoolVar(&ctxt.compressDWARF, "compressdwarf", true, "compress DWARF if possible") ++ flag.BoolVar(&ctxt.compressDWARF, "compressdwarf", false, "compress DWARF if possible") + objabi.Flagfn1("B", "add an ELF NT_GNU_BUILD_ID `note` when using ELF", addbuildinfo) + objabi.Flagfn1("L", "add specified `directory` to library path", func(a string) { Lflag(ctxt, a) }) + objabi.AddVersionFlag() // -V +-- +2.14.4 + diff --git a/golang.spec b/golang.spec index 7568ab6..303ef8b 100644 --- a/golang.spec +++ b/golang.spec @@ -106,7 +106,7 @@ Name: golang Version: 1.11 -Release: 0.beta1.1%{?dist}.1 +Release: 0.beta1.2%{?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 @@ -184,6 +184,7 @@ Requires: go-srpm-macros 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: 0001-cmd-go-call-flag.Parse-to-properly-initialize-test-e.patch +Patch4: 0003-Don-t-compress-dwarf-by-derfault-as-rpm-debuginfo-is.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -310,6 +311,7 @@ Requires: %{name} = %{version}-%{release} %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 cp %{SOURCE1} ./src/runtime/ @@ -546,6 +548,10 @@ fi %endif %changelog +* Wed Jul 18 2018 Jakub Čajka - 1.11-0.beta1.2 +- Turn off DWARF compression by default as it is not supported by rpm/debuginfo +- Related: BZ#1602096 + * Fri Jul 13 2018 Fedora Release Engineering - 1.11-0.beta1.1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 62f2ae0511be0fff1c8f8b941aee2def28f8d662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Fri, 20 Jul 2018 10:14:54 +0200 Subject: [PATCH 16/22] Rebase to 1.11beta2 --- .gitignore | 1 + ....Parse-to-properly-initialize-test-e.patch | 51 ------------------- golang.spec | 11 ++-- sources | 2 +- 4 files changed, 8 insertions(+), 57 deletions(-) delete mode 100644 0001-cmd-go-call-flag.Parse-to-properly-initialize-test-e.patch diff --git a/.gitignore b/.gitignore index bdbb9b1..6efcfaf 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ /go1.10.2.src.tar.gz /go1.10.3.src.tar.gz /go1.11beta1.src.tar.gz +/go1.11beta2.src.tar.gz diff --git a/0001-cmd-go-call-flag.Parse-to-properly-initialize-test-e.patch b/0001-cmd-go-call-flag.Parse-to-properly-initialize-test-e.patch deleted file mode 100644 index f0add07..0000000 --- a/0001-cmd-go-call-flag.Parse-to-properly-initialize-test-e.patch +++ /dev/null @@ -1,51 +0,0 @@ -From b55fe6a3702922f35b8d440f32fd5a54ee92f5f8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jakub=20=C4=8Cajka?= -Date: Mon, 25 Jun 2018 12:31:53 +0200 -Subject: [PATCH] cmd/go: call flag.Parse to properly initialize test - environment variables - -Executing tests in cmd/go/internal/modfetch/gitrepo/fetch_test.go in enviroment -witout outside connectivity in to the internet results in tests failure: - -2018/06/25 12:48:26 git clone --mirror https://vcs-test.golang.org/git/gitrepo1 /tmp/gitrepo-test-221822392/gitrepo2 in : exit status 128: - Cloning into bare repository '/tmp/gitrepo-test-221822392/gitrepo2'... - fatal: unable to access 'https://vcs-test.golang.org/git/gitrepo1/': Could not resolve host: vcs-test.golang.org -FAIL cmd/go/internal/modfetch/gitrepo 0.144s - -Call flag.Parse in TestMain to properly initialize test environment variables - -Fixes #26007 - -Change-Id: I059e27db69c0ca0e01db724035a25d6fefb094b5 -Reviewed-on: https://go-review.googlesource.com/120735 -Run-TryBot: Ian Lance Taylor -Reviewed-by: Brad Fitzpatrick ---- - src/cmd/go/internal/modfetch/gitrepo/fetch_test.go | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/cmd/go/internal/modfetch/gitrepo/fetch_test.go b/src/cmd/go/internal/modfetch/gitrepo/fetch_test.go -index ca932808e8..622249e67d 100644 ---- a/src/cmd/go/internal/modfetch/gitrepo/fetch_test.go -+++ b/src/cmd/go/internal/modfetch/gitrepo/fetch_test.go -@@ -7,6 +7,7 @@ package gitrepo - import ( - "archive/zip" - "bytes" -+ "flag" - "fmt" - "internal/testenv" - "io/ioutil" -@@ -23,6 +24,9 @@ import ( - ) - - func TestMain(m *testing.M) { -+ // needed for initializing the test environment variables as testing.Short -+ // and HasExternalNetwork -+ flag.Parse() - os.Exit(testMain(m)) - } - --- -2.14.4 - diff --git a/golang.spec b/golang.spec index 303ef8b..99b7f00 100644 --- a/golang.spec +++ b/golang.spec @@ -102,11 +102,11 @@ %endif %global go_api 1.11 -%global go_version 1.11beta1 +%global go_version 1.11beta2 Name: golang Version: 1.11 -Release: 0.beta1.2%{?dist} +Release: 0.beta2.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 @@ -183,8 +183,7 @@ Requires: go-srpm-macros 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: 0001-cmd-go-call-flag.Parse-to-properly-initialize-test-e.patch -Patch4: 0003-Don-t-compress-dwarf-by-derfault-as-rpm-debuginfo-is.patch +Patch3: 0003-Don-t-compress-dwarf-by-derfault-as-rpm-debuginfo-is.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -311,7 +310,6 @@ Requires: %{name} = %{version}-%{release} %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 cp %{SOURCE1} ./src/runtime/ @@ -548,6 +546,9 @@ fi %endif %changelog +* Fri Jul 20 2018 Jakub Čajka - 1.11-0.beta2.1 +- Rebase to 1.11beta2 + * Wed Jul 18 2018 Jakub Čajka - 1.11-0.beta1.2 - Turn off DWARF compression by default as it is not supported by rpm/debuginfo - Related: BZ#1602096 diff --git a/sources b/sources index 8bb3599..2666473 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.11beta1.src.tar.gz) = a7369cbb05429f0c2ac0aca27ec67a4fe931f4a496ecd77cb901cbb14f8db5f925736b2d7b1af24e0ad0860aa50334911444c4bef5b92c23d73918a3128a71f3 +SHA512 (go1.11beta2.src.tar.gz) = 0b88364f15c1b41c19c2dca3e69e4bb848d8534540f80b50e9cca00889398f464647530a972ec763b925e2d850ee4e88f08abda3ec01384462ff423e281e24aa From 4043bb182de77bb1a846e801461e5a6e645c736f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Fri, 27 Jul 2018 14:56:43 +0200 Subject: [PATCH 17/22] Turn on back DWARF compression by default Use less memory on 32bit targets during build --- ...stricter-inlining-threshold-in-large.patch | 1310 +++++++++++++++++ ...warf-by-derfault-as-rpm-debuginfo-is.patch | 26 - golang.spec | 10 +- 3 files changed, 1318 insertions(+), 28 deletions(-) create mode 100644 0001-cmd-compile-set-stricter-inlining-threshold-in-large.patch delete mode 100644 0003-Don-t-compress-dwarf-by-derfault-as-rpm-debuginfo-is.patch diff --git a/0001-cmd-compile-set-stricter-inlining-threshold-in-large.patch b/0001-cmd-compile-set-stricter-inlining-threshold-in-large.patch new file mode 100644 index 0000000..aaf9eb6 --- /dev/null +++ b/0001-cmd-compile-set-stricter-inlining-threshold-in-large.patch @@ -0,0 +1,1310 @@ +From 5fc70b6fac0664f3f9d2c2948ba78db420ba70c5 Mon Sep 17 00:00:00 2001 +From: Keith Randall +Date: Mon, 23 Jul 2018 13:09:48 -0700 +Subject: [PATCH] cmd/compile: set stricter inlining threshold in large + functions + +If we're compiling a large function, be more picky about how big +the function we're inlining is. If the function is >5000 nodes, +we lower the inlining threshold from a cost of 80 to 20. + +Turns out reflect.Value's cost is exactly 80. That's the function +at issue in #26546. + +20 was chosen as a proxy for "inlined body is smaller than the call would be". +Simple functions still get inlined, like this one at cost 7: + +func ifaceIndir(t *rtype) bool { + return t.kind&kindDirectIface == 0 +} + +5000 nodes was chosen as the big function size. Here are all the +5000+ node (~~1000+ lines) functions in the stdlib: + +5187 cmd/internal/obj/arm (*ctxt5).asmout +6879 cmd/internal/obj/s390x (*ctxtz).asmout +6567 cmd/internal/obj/ppc64 (*ctxt9).asmout +9643 cmd/internal/obj/arm64 (*ctxt7).asmout +5042 cmd/internal/obj/x86 (*AsmBuf).doasm +8768 cmd/compile/internal/ssa rewriteBlockAMD64 +8878 cmd/compile/internal/ssa rewriteBlockARM +8344 cmd/compile/internal/ssa rewriteValueARM64_OpARM64OR_20 +7916 cmd/compile/internal/ssa rewriteValueARM64_OpARM64OR_30 +5427 cmd/compile/internal/ssa rewriteBlockARM64 +5126 cmd/compile/internal/ssa rewriteValuePPC64_OpPPC64OR_50 +6152 cmd/compile/internal/ssa rewriteValuePPC64_OpPPC64OR_60 +6412 cmd/compile/internal/ssa rewriteValuePPC64_OpPPC64OR_70 +6486 cmd/compile/internal/ssa rewriteValuePPC64_OpPPC64OR_80 +6534 cmd/compile/internal/ssa rewriteValuePPC64_OpPPC64OR_90 +6534 cmd/compile/internal/ssa rewriteValuePPC64_OpPPC64OR_100 +6534 cmd/compile/internal/ssa rewriteValuePPC64_OpPPC64OR_110 +6675 cmd/compile/internal/gc typecheck1 +5433 cmd/compile/internal/gc walkexpr +14070 cmd/vendor/golang.org/x/arch/arm64/arm64asm decodeArg + +There are a lot more smaller (~1000 node) functions in the stdlib. +The function in #26546 has 12477 nodes. + +At some point it might be nice to have a better heuristic for "inlined +body is smaller than the call", a non-cliff way to scale down the cost +as the function gets bigger, doing cheaper inlined calls first, etc. +All that can wait for another release. I'd like to do this CL for +1.11. + +Fixes #26546 +Update #17566 + +Change-Id: Idda13020e46ec2b28d79a17217f44b189f8139ac +Reviewed-on: https://go-review.googlesource.com/125516 +Run-TryBot: Keith Randall +TryBot-Result: Gobot Gobot +Reviewed-by: David Chase +--- + src/cmd/compile/internal/gc/inl.go | 72 ++- + test/inline_big.go | 1029 ++++++++++++++++++++++++++++++++++++ + 2 files changed, 1082 insertions(+), 19 deletions(-) + create mode 100644 test/inline_big.go + +diff --git a/src/cmd/compile/internal/gc/inl.go b/src/cmd/compile/internal/gc/inl.go +index cb3ddaf2a5..feb3c8556a 100644 +--- a/src/cmd/compile/internal/gc/inl.go ++++ b/src/cmd/compile/internal/gc/inl.go +@@ -41,6 +41,9 @@ const ( + inlineExtraCallCost = inlineMaxBudget // default is do not inline, -l=4 enables by using 1 instead. + inlineExtraPanicCost = 1 // do not penalize inlining panics. + inlineExtraThrowCost = inlineMaxBudget // with current (2018-05/1.11) code, inlining runtime.throw does not help. ++ ++ inlineBigFunctionNodes = 5000 // Functions with this many nodes are considered "big". ++ inlineBigFunctionMaxCost = 20 // Max cost of inlinee when inlining into a "big" function. + ) + + // Get the function's package. For ordinary functions it's on the ->sym, but for imported methods +@@ -459,12 +462,38 @@ func inlcopy(n *Node) *Node { + return m + } + ++func countNodes(n *Node) int { ++ if n == nil { ++ return 0 ++ } ++ cnt := 1 ++ cnt += countNodes(n.Left) ++ cnt += countNodes(n.Right) ++ for _, n1 := range n.Ninit.Slice() { ++ cnt += countNodes(n1) ++ } ++ for _, n1 := range n.Nbody.Slice() { ++ cnt += countNodes(n1) ++ } ++ for _, n1 := range n.List.Slice() { ++ cnt += countNodes(n1) ++ } ++ for _, n1 := range n.Rlist.Slice() { ++ cnt += countNodes(n1) ++ } ++ return cnt ++} ++ + // Inlcalls/nodelist/node walks fn's statements and expressions and substitutes any + // calls made to inlineable functions. This is the external entry point. + func inlcalls(fn *Node) { + savefn := Curfn + Curfn = fn +- fn = inlnode(fn) ++ maxCost := int32(inlineMaxBudget) ++ if countNodes(fn) >= inlineBigFunctionNodes { ++ maxCost = inlineBigFunctionMaxCost ++ } ++ fn = inlnode(fn, maxCost) + if fn != Curfn { + Fatalf("inlnode replaced curfn") + } +@@ -505,10 +534,10 @@ func inlconv2list(n *Node) []*Node { + return s + } + +-func inlnodelist(l Nodes) { ++func inlnodelist(l Nodes, maxCost int32) { + s := l.Slice() + for i := range s { +- s[i] = inlnode(s[i]) ++ s[i] = inlnode(s[i], maxCost) + } + } + +@@ -525,7 +554,7 @@ func inlnodelist(l Nodes) { + // shorter and less complicated. + // The result of inlnode MUST be assigned back to n, e.g. + // n.Left = inlnode(n.Left) +-func inlnode(n *Node) *Node { ++func inlnode(n *Node, maxCost int32) *Node { + if n == nil { + return n + } +@@ -547,19 +576,19 @@ func inlnode(n *Node) *Node { + + lno := setlineno(n) + +- inlnodelist(n.Ninit) ++ inlnodelist(n.Ninit, maxCost) + for _, n1 := range n.Ninit.Slice() { + if n1.Op == OINLCALL { + inlconv2stmt(n1) + } + } + +- n.Left = inlnode(n.Left) ++ n.Left = inlnode(n.Left, maxCost) + if n.Left != nil && n.Left.Op == OINLCALL { + n.Left = inlconv2expr(n.Left) + } + +- n.Right = inlnode(n.Right) ++ n.Right = inlnode(n.Right, maxCost) + if n.Right != nil && n.Right.Op == OINLCALL { + if n.Op == OFOR || n.Op == OFORUNTIL { + inlconv2stmt(n.Right) +@@ -568,7 +597,7 @@ func inlnode(n *Node) *Node { + } + } + +- inlnodelist(n.List) ++ inlnodelist(n.List, maxCost) + switch n.Op { + case OBLOCK: + for _, n2 := range n.List.Slice() { +@@ -595,7 +624,7 @@ func inlnode(n *Node) *Node { + } + } + +- inlnodelist(n.Rlist) ++ inlnodelist(n.Rlist, maxCost) + if n.Op == OAS2FUNC && n.Rlist.First().Op == OINLCALL { + n.Rlist.Set(inlconv2list(n.Rlist.First())) + n.Op = OAS2 +@@ -614,7 +643,7 @@ func inlnode(n *Node) *Node { + } + } + +- inlnodelist(n.Nbody) ++ inlnodelist(n.Nbody, maxCost) + for _, n := range n.Nbody.Slice() { + if n.Op == OINLCALL { + inlconv2stmt(n) +@@ -637,12 +666,12 @@ func inlnode(n *Node) *Node { + fmt.Printf("%v:call to func %+v\n", n.Line(), n.Left) + } + if n.Left.Func != nil && n.Left.Func.Inl != nil && !isIntrinsicCall(n) { // normal case +- n = mkinlcall(n, n.Left) ++ n = mkinlcall(n, n.Left, maxCost) + } else if n.Left.isMethodExpression() && asNode(n.Left.Sym.Def) != nil { +- n = mkinlcall(n, asNode(n.Left.Sym.Def)) ++ n = mkinlcall(n, asNode(n.Left.Sym.Def), maxCost) + } else if n.Left.Op == OCLOSURE { + if f := inlinableClosure(n.Left); f != nil { +- n = mkinlcall(n, f) ++ n = mkinlcall(n, f, maxCost) + } + } else if n.Left.Op == ONAME && n.Left.Name != nil && n.Left.Name.Defn != nil { + if d := n.Left.Name.Defn; d.Op == OAS && d.Right.Op == OCLOSURE { +@@ -668,7 +697,7 @@ func inlnode(n *Node) *Node { + } + break + } +- n = mkinlcall(n, f) ++ n = mkinlcall(n, f, maxCost) + } + } + } +@@ -687,7 +716,7 @@ func inlnode(n *Node) *Node { + Fatalf("no function definition for [%p] %+v\n", n.Left.Type, n.Left.Type) + } + +- n = mkinlcall(n, asNode(n.Left.Type.FuncType().Nname)) ++ n = mkinlcall(n, asNode(n.Left.Type.FuncType().Nname), maxCost) + } + + lineno = lno +@@ -788,7 +817,7 @@ func (v *reassignVisitor) visitList(l Nodes) *Node { + + // The result of mkinlcall MUST be assigned back to n, e.g. + // n.Left = mkinlcall(n.Left, fn, isddd) +-func mkinlcall(n *Node, fn *Node) *Node { ++func mkinlcall(n *Node, fn *Node, maxCost int32) *Node { + save_safemode := safemode + + // imported functions may refer to unsafe as long as the +@@ -798,7 +827,7 @@ func mkinlcall(n *Node, fn *Node) *Node { + if pkg != localpkg && pkg != nil { + safemode = false + } +- n = mkinlcall1(n, fn) ++ n = mkinlcall1(n, fn, maxCost) + safemode = save_safemode + return n + } +@@ -824,11 +853,16 @@ var inlgen int + // parameters. + // The result of mkinlcall1 MUST be assigned back to n, e.g. + // n.Left = mkinlcall1(n.Left, fn, isddd) +-func mkinlcall1(n, fn *Node) *Node { ++func mkinlcall1(n, fn *Node, maxCost int32) *Node { + if fn.Func.Inl == nil { + // No inlinable body. + return n + } ++ if fn.Func.Inl.Cost > maxCost { ++ // The inlined function body is too big. Typically we use this check to restrict ++ // inlining into very big functions. See issue 26546 and 17566. ++ return n ++ } + + if fn == Curfn || fn.Name.Defn == Curfn { + // Can't recursively inline a function into itself. +@@ -1094,7 +1128,7 @@ func mkinlcall1(n, fn *Node) *Node { + // instead we emit the things that the body needs + // and each use must redo the inlining. + // luckily these are small. +- inlnodelist(call.Nbody) ++ inlnodelist(call.Nbody, maxCost) + for _, n := range call.Nbody.Slice() { + if n.Op == OINLCALL { + inlconv2stmt(n) +diff --git a/test/inline_big.go b/test/inline_big.go +new file mode 100644 +index 0000000000..c4af15b4e1 +--- /dev/null ++++ b/test/inline_big.go +@@ -0,0 +1,1029 @@ ++// errorcheck -0 -m=2 ++ ++// Copyright 2018 The Go Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style ++// license that can be found in the LICENSE file. ++ ++// Test that we restrict inlining into very large functions. ++// See issue #26546. ++ ++package foo ++ ++func small(a []int) int { // ERROR "can inline small as:.*" "small a does not escape" ++ // Cost 16 body (need cost < 20). ++ // See cmd/compile/internal/gc/inl.go:inlineBigFunction* ++ return a[0] + a[1] + a[2] + a[3] ++} ++func medium(a []int) int { // ERROR "can inline medium as:.*" "medium a does not escape" ++ // Cost 32 body (need cost > 20 and cost < 80). ++ // See cmd/compile/internal/gc/inl.go:inlineBigFunction* ++ return a[0] + a[1] + a[2] + a[3] + a[4] + a[5] + a[6] + a[7] ++} ++ ++func f(a []int) int { // ERROR "cannot inline f:.*" "f a does not escape" ++ // Add lots of nodes to f's body. We need >5000. ++ // See cmd/compile/internal/gc/inl.go:inlineBigFunction* ++ a[0] = 0 ++ a[1] = 0 ++ a[2] = 0 ++ a[3] = 0 ++ a[4] = 0 ++ a[5] = 0 ++ a[6] = 0 ++ a[7] = 0 ++ a[8] = 0 ++ a[9] = 0 ++ a[10] = 0 ++ a[11] = 0 ++ a[12] = 0 ++ a[13] = 0 ++ a[14] = 0 ++ a[15] = 0 ++ a[16] = 0 ++ a[17] = 0 ++ a[18] = 0 ++ a[19] = 0 ++ a[20] = 0 ++ a[21] = 0 ++ a[22] = 0 ++ a[23] = 0 ++ a[24] = 0 ++ a[25] = 0 ++ a[26] = 0 ++ a[27] = 0 ++ a[28] = 0 ++ a[29] = 0 ++ a[30] = 0 ++ a[31] = 0 ++ a[32] = 0 ++ a[33] = 0 ++ a[34] = 0 ++ a[35] = 0 ++ a[36] = 0 ++ a[37] = 0 ++ a[38] = 0 ++ a[39] = 0 ++ a[40] = 0 ++ a[41] = 0 ++ a[42] = 0 ++ a[43] = 0 ++ a[44] = 0 ++ a[45] = 0 ++ a[46] = 0 ++ a[47] = 0 ++ a[48] = 0 ++ a[49] = 0 ++ a[50] = 0 ++ a[51] = 0 ++ a[52] = 0 ++ a[53] = 0 ++ a[54] = 0 ++ a[55] = 0 ++ a[56] = 0 ++ a[57] = 0 ++ a[58] = 0 ++ a[59] = 0 ++ a[60] = 0 ++ a[61] = 0 ++ a[62] = 0 ++ a[63] = 0 ++ a[64] = 0 ++ a[65] = 0 ++ a[66] = 0 ++ a[67] = 0 ++ a[68] = 0 ++ a[69] = 0 ++ a[70] = 0 ++ a[71] = 0 ++ a[72] = 0 ++ a[73] = 0 ++ a[74] = 0 ++ a[75] = 0 ++ a[76] = 0 ++ a[77] = 0 ++ a[78] = 0 ++ a[79] = 0 ++ a[80] = 0 ++ a[81] = 0 ++ a[82] = 0 ++ a[83] = 0 ++ a[84] = 0 ++ a[85] = 0 ++ a[86] = 0 ++ a[87] = 0 ++ a[88] = 0 ++ a[89] = 0 ++ a[90] = 0 ++ a[91] = 0 ++ a[92] = 0 ++ a[93] = 0 ++ a[94] = 0 ++ a[95] = 0 ++ a[96] = 0 ++ a[97] = 0 ++ a[98] = 0 ++ a[99] = 0 ++ a[100] = 0 ++ a[101] = 0 ++ a[102] = 0 ++ a[103] = 0 ++ a[104] = 0 ++ a[105] = 0 ++ a[106] = 0 ++ a[107] = 0 ++ a[108] = 0 ++ a[109] = 0 ++ a[110] = 0 ++ a[111] = 0 ++ a[112] = 0 ++ a[113] = 0 ++ a[114] = 0 ++ a[115] = 0 ++ a[116] = 0 ++ a[117] = 0 ++ a[118] = 0 ++ a[119] = 0 ++ a[120] = 0 ++ a[121] = 0 ++ a[122] = 0 ++ a[123] = 0 ++ a[124] = 0 ++ a[125] = 0 ++ a[126] = 0 ++ a[127] = 0 ++ a[128] = 0 ++ a[129] = 0 ++ a[130] = 0 ++ a[131] = 0 ++ a[132] = 0 ++ a[133] = 0 ++ a[134] = 0 ++ a[135] = 0 ++ a[136] = 0 ++ a[137] = 0 ++ a[138] = 0 ++ a[139] = 0 ++ a[140] = 0 ++ a[141] = 0 ++ a[142] = 0 ++ a[143] = 0 ++ a[144] = 0 ++ a[145] = 0 ++ a[146] = 0 ++ a[147] = 0 ++ a[148] = 0 ++ a[149] = 0 ++ a[150] = 0 ++ a[151] = 0 ++ a[152] = 0 ++ a[153] = 0 ++ a[154] = 0 ++ a[155] = 0 ++ a[156] = 0 ++ a[157] = 0 ++ a[158] = 0 ++ a[159] = 0 ++ a[160] = 0 ++ a[161] = 0 ++ a[162] = 0 ++ a[163] = 0 ++ a[164] = 0 ++ a[165] = 0 ++ a[166] = 0 ++ a[167] = 0 ++ a[168] = 0 ++ a[169] = 0 ++ a[170] = 0 ++ a[171] = 0 ++ a[172] = 0 ++ a[173] = 0 ++ a[174] = 0 ++ a[175] = 0 ++ a[176] = 0 ++ a[177] = 0 ++ a[178] = 0 ++ a[179] = 0 ++ a[180] = 0 ++ a[181] = 0 ++ a[182] = 0 ++ a[183] = 0 ++ a[184] = 0 ++ a[185] = 0 ++ a[186] = 0 ++ a[187] = 0 ++ a[188] = 0 ++ a[189] = 0 ++ a[190] = 0 ++ a[191] = 0 ++ a[192] = 0 ++ a[193] = 0 ++ a[194] = 0 ++ a[195] = 0 ++ a[196] = 0 ++ a[197] = 0 ++ a[198] = 0 ++ a[199] = 0 ++ a[200] = 0 ++ a[201] = 0 ++ a[202] = 0 ++ a[203] = 0 ++ a[204] = 0 ++ a[205] = 0 ++ a[206] = 0 ++ a[207] = 0 ++ a[208] = 0 ++ a[209] = 0 ++ a[210] = 0 ++ a[211] = 0 ++ a[212] = 0 ++ a[213] = 0 ++ a[214] = 0 ++ a[215] = 0 ++ a[216] = 0 ++ a[217] = 0 ++ a[218] = 0 ++ a[219] = 0 ++ a[220] = 0 ++ a[221] = 0 ++ a[222] = 0 ++ a[223] = 0 ++ a[224] = 0 ++ a[225] = 0 ++ a[226] = 0 ++ a[227] = 0 ++ a[228] = 0 ++ a[229] = 0 ++ a[230] = 0 ++ a[231] = 0 ++ a[232] = 0 ++ a[233] = 0 ++ a[234] = 0 ++ a[235] = 0 ++ a[236] = 0 ++ a[237] = 0 ++ a[238] = 0 ++ a[239] = 0 ++ a[240] = 0 ++ a[241] = 0 ++ a[242] = 0 ++ a[243] = 0 ++ a[244] = 0 ++ a[245] = 0 ++ a[246] = 0 ++ a[247] = 0 ++ a[248] = 0 ++ a[249] = 0 ++ a[250] = 0 ++ a[251] = 0 ++ a[252] = 0 ++ a[253] = 0 ++ a[254] = 0 ++ a[255] = 0 ++ a[256] = 0 ++ a[257] = 0 ++ a[258] = 0 ++ a[259] = 0 ++ a[260] = 0 ++ a[261] = 0 ++ a[262] = 0 ++ a[263] = 0 ++ a[264] = 0 ++ a[265] = 0 ++ a[266] = 0 ++ a[267] = 0 ++ a[268] = 0 ++ a[269] = 0 ++ a[270] = 0 ++ a[271] = 0 ++ a[272] = 0 ++ a[273] = 0 ++ a[274] = 0 ++ a[275] = 0 ++ a[276] = 0 ++ a[277] = 0 ++ a[278] = 0 ++ a[279] = 0 ++ a[280] = 0 ++ a[281] = 0 ++ a[282] = 0 ++ a[283] = 0 ++ a[284] = 0 ++ a[285] = 0 ++ a[286] = 0 ++ a[287] = 0 ++ a[288] = 0 ++ a[289] = 0 ++ a[290] = 0 ++ a[291] = 0 ++ a[292] = 0 ++ a[293] = 0 ++ a[294] = 0 ++ a[295] = 0 ++ a[296] = 0 ++ a[297] = 0 ++ a[298] = 0 ++ a[299] = 0 ++ a[300] = 0 ++ a[301] = 0 ++ a[302] = 0 ++ a[303] = 0 ++ a[304] = 0 ++ a[305] = 0 ++ a[306] = 0 ++ a[307] = 0 ++ a[308] = 0 ++ a[309] = 0 ++ a[310] = 0 ++ a[311] = 0 ++ a[312] = 0 ++ a[313] = 0 ++ a[314] = 0 ++ a[315] = 0 ++ a[316] = 0 ++ a[317] = 0 ++ a[318] = 0 ++ a[319] = 0 ++ a[320] = 0 ++ a[321] = 0 ++ a[322] = 0 ++ a[323] = 0 ++ a[324] = 0 ++ a[325] = 0 ++ a[326] = 0 ++ a[327] = 0 ++ a[328] = 0 ++ a[329] = 0 ++ a[330] = 0 ++ a[331] = 0 ++ a[332] = 0 ++ a[333] = 0 ++ a[334] = 0 ++ a[335] = 0 ++ a[336] = 0 ++ a[337] = 0 ++ a[338] = 0 ++ a[339] = 0 ++ a[340] = 0 ++ a[341] = 0 ++ a[342] = 0 ++ a[343] = 0 ++ a[344] = 0 ++ a[345] = 0 ++ a[346] = 0 ++ a[347] = 0 ++ a[348] = 0 ++ a[349] = 0 ++ a[350] = 0 ++ a[351] = 0 ++ a[352] = 0 ++ a[353] = 0 ++ a[354] = 0 ++ a[355] = 0 ++ a[356] = 0 ++ a[357] = 0 ++ a[358] = 0 ++ a[359] = 0 ++ a[360] = 0 ++ a[361] = 0 ++ a[362] = 0 ++ a[363] = 0 ++ a[364] = 0 ++ a[365] = 0 ++ a[366] = 0 ++ a[367] = 0 ++ a[368] = 0 ++ a[369] = 0 ++ a[370] = 0 ++ a[371] = 0 ++ a[372] = 0 ++ a[373] = 0 ++ a[374] = 0 ++ a[375] = 0 ++ a[376] = 0 ++ a[377] = 0 ++ a[378] = 0 ++ a[379] = 0 ++ a[380] = 0 ++ a[381] = 0 ++ a[382] = 0 ++ a[383] = 0 ++ a[384] = 0 ++ a[385] = 0 ++ a[386] = 0 ++ a[387] = 0 ++ a[388] = 0 ++ a[389] = 0 ++ a[390] = 0 ++ a[391] = 0 ++ a[392] = 0 ++ a[393] = 0 ++ a[394] = 0 ++ a[395] = 0 ++ a[396] = 0 ++ a[397] = 0 ++ a[398] = 0 ++ a[399] = 0 ++ a[400] = 0 ++ a[401] = 0 ++ a[402] = 0 ++ a[403] = 0 ++ a[404] = 0 ++ a[405] = 0 ++ a[406] = 0 ++ a[407] = 0 ++ a[408] = 0 ++ a[409] = 0 ++ a[410] = 0 ++ a[411] = 0 ++ a[412] = 0 ++ a[413] = 0 ++ a[414] = 0 ++ a[415] = 0 ++ a[416] = 0 ++ a[417] = 0 ++ a[418] = 0 ++ a[419] = 0 ++ a[420] = 0 ++ a[421] = 0 ++ a[422] = 0 ++ a[423] = 0 ++ a[424] = 0 ++ a[425] = 0 ++ a[426] = 0 ++ a[427] = 0 ++ a[428] = 0 ++ a[429] = 0 ++ a[430] = 0 ++ a[431] = 0 ++ a[432] = 0 ++ a[433] = 0 ++ a[434] = 0 ++ a[435] = 0 ++ a[436] = 0 ++ a[437] = 0 ++ a[438] = 0 ++ a[439] = 0 ++ a[440] = 0 ++ a[441] = 0 ++ a[442] = 0 ++ a[443] = 0 ++ a[444] = 0 ++ a[445] = 0 ++ a[446] = 0 ++ a[447] = 0 ++ a[448] = 0 ++ a[449] = 0 ++ a[450] = 0 ++ a[451] = 0 ++ a[452] = 0 ++ a[453] = 0 ++ a[454] = 0 ++ a[455] = 0 ++ a[456] = 0 ++ a[457] = 0 ++ a[458] = 0 ++ a[459] = 0 ++ a[460] = 0 ++ a[461] = 0 ++ a[462] = 0 ++ a[463] = 0 ++ a[464] = 0 ++ a[465] = 0 ++ a[466] = 0 ++ a[467] = 0 ++ a[468] = 0 ++ a[469] = 0 ++ a[470] = 0 ++ a[471] = 0 ++ a[472] = 0 ++ a[473] = 0 ++ a[474] = 0 ++ a[475] = 0 ++ a[476] = 0 ++ a[477] = 0 ++ a[478] = 0 ++ a[479] = 0 ++ a[480] = 0 ++ a[481] = 0 ++ a[482] = 0 ++ a[483] = 0 ++ a[484] = 0 ++ a[485] = 0 ++ a[486] = 0 ++ a[487] = 0 ++ a[488] = 0 ++ a[489] = 0 ++ a[490] = 0 ++ a[491] = 0 ++ a[492] = 0 ++ a[493] = 0 ++ a[494] = 0 ++ a[495] = 0 ++ a[496] = 0 ++ a[497] = 0 ++ a[498] = 0 ++ a[499] = 0 ++ a[500] = 0 ++ a[501] = 0 ++ a[502] = 0 ++ a[503] = 0 ++ a[504] = 0 ++ a[505] = 0 ++ a[506] = 0 ++ a[507] = 0 ++ a[508] = 0 ++ a[509] = 0 ++ a[510] = 0 ++ a[511] = 0 ++ a[512] = 0 ++ a[513] = 0 ++ a[514] = 0 ++ a[515] = 0 ++ a[516] = 0 ++ a[517] = 0 ++ a[518] = 0 ++ a[519] = 0 ++ a[520] = 0 ++ a[521] = 0 ++ a[522] = 0 ++ a[523] = 0 ++ a[524] = 0 ++ a[525] = 0 ++ a[526] = 0 ++ a[527] = 0 ++ a[528] = 0 ++ a[529] = 0 ++ a[530] = 0 ++ a[531] = 0 ++ a[532] = 0 ++ a[533] = 0 ++ a[534] = 0 ++ a[535] = 0 ++ a[536] = 0 ++ a[537] = 0 ++ a[538] = 0 ++ a[539] = 0 ++ a[540] = 0 ++ a[541] = 0 ++ a[542] = 0 ++ a[543] = 0 ++ a[544] = 0 ++ a[545] = 0 ++ a[546] = 0 ++ a[547] = 0 ++ a[548] = 0 ++ a[549] = 0 ++ a[550] = 0 ++ a[551] = 0 ++ a[552] = 0 ++ a[553] = 0 ++ a[554] = 0 ++ a[555] = 0 ++ a[556] = 0 ++ a[557] = 0 ++ a[558] = 0 ++ a[559] = 0 ++ a[560] = 0 ++ a[561] = 0 ++ a[562] = 0 ++ a[563] = 0 ++ a[564] = 0 ++ a[565] = 0 ++ a[566] = 0 ++ a[567] = 0 ++ a[568] = 0 ++ a[569] = 0 ++ a[570] = 0 ++ a[571] = 0 ++ a[572] = 0 ++ a[573] = 0 ++ a[574] = 0 ++ a[575] = 0 ++ a[576] = 0 ++ a[577] = 0 ++ a[578] = 0 ++ a[579] = 0 ++ a[580] = 0 ++ a[581] = 0 ++ a[582] = 0 ++ a[583] = 0 ++ a[584] = 0 ++ a[585] = 0 ++ a[586] = 0 ++ a[587] = 0 ++ a[588] = 0 ++ a[589] = 0 ++ a[590] = 0 ++ a[591] = 0 ++ a[592] = 0 ++ a[593] = 0 ++ a[594] = 0 ++ a[595] = 0 ++ a[596] = 0 ++ a[597] = 0 ++ a[598] = 0 ++ a[599] = 0 ++ a[600] = 0 ++ a[601] = 0 ++ a[602] = 0 ++ a[603] = 0 ++ a[604] = 0 ++ a[605] = 0 ++ a[606] = 0 ++ a[607] = 0 ++ a[608] = 0 ++ a[609] = 0 ++ a[610] = 0 ++ a[611] = 0 ++ a[612] = 0 ++ a[613] = 0 ++ a[614] = 0 ++ a[615] = 0 ++ a[616] = 0 ++ a[617] = 0 ++ a[618] = 0 ++ a[619] = 0 ++ a[620] = 0 ++ a[621] = 0 ++ a[622] = 0 ++ a[623] = 0 ++ a[624] = 0 ++ a[625] = 0 ++ a[626] = 0 ++ a[627] = 0 ++ a[628] = 0 ++ a[629] = 0 ++ a[630] = 0 ++ a[631] = 0 ++ a[632] = 0 ++ a[633] = 0 ++ a[634] = 0 ++ a[635] = 0 ++ a[636] = 0 ++ a[637] = 0 ++ a[638] = 0 ++ a[639] = 0 ++ a[640] = 0 ++ a[641] = 0 ++ a[642] = 0 ++ a[643] = 0 ++ a[644] = 0 ++ a[645] = 0 ++ a[646] = 0 ++ a[647] = 0 ++ a[648] = 0 ++ a[649] = 0 ++ a[650] = 0 ++ a[651] = 0 ++ a[652] = 0 ++ a[653] = 0 ++ a[654] = 0 ++ a[655] = 0 ++ a[656] = 0 ++ a[657] = 0 ++ a[658] = 0 ++ a[659] = 0 ++ a[660] = 0 ++ a[661] = 0 ++ a[662] = 0 ++ a[663] = 0 ++ a[664] = 0 ++ a[665] = 0 ++ a[666] = 0 ++ a[667] = 0 ++ a[668] = 0 ++ a[669] = 0 ++ a[670] = 0 ++ a[671] = 0 ++ a[672] = 0 ++ a[673] = 0 ++ a[674] = 0 ++ a[675] = 0 ++ a[676] = 0 ++ a[677] = 0 ++ a[678] = 0 ++ a[679] = 0 ++ a[680] = 0 ++ a[681] = 0 ++ a[682] = 0 ++ a[683] = 0 ++ a[684] = 0 ++ a[685] = 0 ++ a[686] = 0 ++ a[687] = 0 ++ a[688] = 0 ++ a[689] = 0 ++ a[690] = 0 ++ a[691] = 0 ++ a[692] = 0 ++ a[693] = 0 ++ a[694] = 0 ++ a[695] = 0 ++ a[696] = 0 ++ a[697] = 0 ++ a[698] = 0 ++ a[699] = 0 ++ a[700] = 0 ++ a[701] = 0 ++ a[702] = 0 ++ a[703] = 0 ++ a[704] = 0 ++ a[705] = 0 ++ a[706] = 0 ++ a[707] = 0 ++ a[708] = 0 ++ a[709] = 0 ++ a[710] = 0 ++ a[711] = 0 ++ a[712] = 0 ++ a[713] = 0 ++ a[714] = 0 ++ a[715] = 0 ++ a[716] = 0 ++ a[717] = 0 ++ a[718] = 0 ++ a[719] = 0 ++ a[720] = 0 ++ a[721] = 0 ++ a[722] = 0 ++ a[723] = 0 ++ a[724] = 0 ++ a[725] = 0 ++ a[726] = 0 ++ a[727] = 0 ++ a[728] = 0 ++ a[729] = 0 ++ a[730] = 0 ++ a[731] = 0 ++ a[732] = 0 ++ a[733] = 0 ++ a[734] = 0 ++ a[735] = 0 ++ a[736] = 0 ++ a[737] = 0 ++ a[738] = 0 ++ a[739] = 0 ++ a[740] = 0 ++ a[741] = 0 ++ a[742] = 0 ++ a[743] = 0 ++ a[744] = 0 ++ a[745] = 0 ++ a[746] = 0 ++ a[747] = 0 ++ a[748] = 0 ++ a[749] = 0 ++ a[750] = 0 ++ a[751] = 0 ++ a[752] = 0 ++ a[753] = 0 ++ a[754] = 0 ++ a[755] = 0 ++ a[756] = 0 ++ a[757] = 0 ++ a[758] = 0 ++ a[759] = 0 ++ a[760] = 0 ++ a[761] = 0 ++ a[762] = 0 ++ a[763] = 0 ++ a[764] = 0 ++ a[765] = 0 ++ a[766] = 0 ++ a[767] = 0 ++ a[768] = 0 ++ a[769] = 0 ++ a[770] = 0 ++ a[771] = 0 ++ a[772] = 0 ++ a[773] = 0 ++ a[774] = 0 ++ a[775] = 0 ++ a[776] = 0 ++ a[777] = 0 ++ a[778] = 0 ++ a[779] = 0 ++ a[780] = 0 ++ a[781] = 0 ++ a[782] = 0 ++ a[783] = 0 ++ a[784] = 0 ++ a[785] = 0 ++ a[786] = 0 ++ a[787] = 0 ++ a[788] = 0 ++ a[789] = 0 ++ a[790] = 0 ++ a[791] = 0 ++ a[792] = 0 ++ a[793] = 0 ++ a[794] = 0 ++ a[795] = 0 ++ a[796] = 0 ++ a[797] = 0 ++ a[798] = 0 ++ a[799] = 0 ++ a[800] = 0 ++ a[801] = 0 ++ a[802] = 0 ++ a[803] = 0 ++ a[804] = 0 ++ a[805] = 0 ++ a[806] = 0 ++ a[807] = 0 ++ a[808] = 0 ++ a[809] = 0 ++ a[810] = 0 ++ a[811] = 0 ++ a[812] = 0 ++ a[813] = 0 ++ a[814] = 0 ++ a[815] = 0 ++ a[816] = 0 ++ a[817] = 0 ++ a[818] = 0 ++ a[819] = 0 ++ a[820] = 0 ++ a[821] = 0 ++ a[822] = 0 ++ a[823] = 0 ++ a[824] = 0 ++ a[825] = 0 ++ a[826] = 0 ++ a[827] = 0 ++ a[828] = 0 ++ a[829] = 0 ++ a[830] = 0 ++ a[831] = 0 ++ a[832] = 0 ++ a[833] = 0 ++ a[834] = 0 ++ a[835] = 0 ++ a[836] = 0 ++ a[837] = 0 ++ a[838] = 0 ++ a[839] = 0 ++ a[840] = 0 ++ a[841] = 0 ++ a[842] = 0 ++ a[843] = 0 ++ a[844] = 0 ++ a[845] = 0 ++ a[846] = 0 ++ a[847] = 0 ++ a[848] = 0 ++ a[849] = 0 ++ a[850] = 0 ++ a[851] = 0 ++ a[852] = 0 ++ a[853] = 0 ++ a[854] = 0 ++ a[855] = 0 ++ a[856] = 0 ++ a[857] = 0 ++ a[858] = 0 ++ a[859] = 0 ++ a[860] = 0 ++ a[861] = 0 ++ a[862] = 0 ++ a[863] = 0 ++ a[864] = 0 ++ a[865] = 0 ++ a[866] = 0 ++ a[867] = 0 ++ a[868] = 0 ++ a[869] = 0 ++ a[870] = 0 ++ a[871] = 0 ++ a[872] = 0 ++ a[873] = 0 ++ a[874] = 0 ++ a[875] = 0 ++ a[876] = 0 ++ a[877] = 0 ++ a[878] = 0 ++ a[879] = 0 ++ a[880] = 0 ++ a[881] = 0 ++ a[882] = 0 ++ a[883] = 0 ++ a[884] = 0 ++ a[885] = 0 ++ a[886] = 0 ++ a[887] = 0 ++ a[888] = 0 ++ a[889] = 0 ++ a[890] = 0 ++ a[891] = 0 ++ a[892] = 0 ++ a[893] = 0 ++ a[894] = 0 ++ a[895] = 0 ++ a[896] = 0 ++ a[897] = 0 ++ a[898] = 0 ++ a[899] = 0 ++ a[900] = 0 ++ a[901] = 0 ++ a[902] = 0 ++ a[903] = 0 ++ a[904] = 0 ++ a[905] = 0 ++ a[906] = 0 ++ a[907] = 0 ++ a[908] = 0 ++ a[909] = 0 ++ a[910] = 0 ++ a[911] = 0 ++ a[912] = 0 ++ a[913] = 0 ++ a[914] = 0 ++ a[915] = 0 ++ a[916] = 0 ++ a[917] = 0 ++ a[918] = 0 ++ a[919] = 0 ++ a[920] = 0 ++ a[921] = 0 ++ a[922] = 0 ++ a[923] = 0 ++ a[924] = 0 ++ a[925] = 0 ++ a[926] = 0 ++ a[927] = 0 ++ a[928] = 0 ++ a[929] = 0 ++ a[930] = 0 ++ a[931] = 0 ++ a[932] = 0 ++ a[933] = 0 ++ a[934] = 0 ++ a[935] = 0 ++ a[936] = 0 ++ a[937] = 0 ++ a[938] = 0 ++ a[939] = 0 ++ a[940] = 0 ++ a[941] = 0 ++ a[942] = 0 ++ a[943] = 0 ++ a[944] = 0 ++ a[945] = 0 ++ a[946] = 0 ++ a[947] = 0 ++ a[948] = 0 ++ a[949] = 0 ++ a[950] = 0 ++ a[951] = 0 ++ a[952] = 0 ++ a[953] = 0 ++ a[954] = 0 ++ a[955] = 0 ++ a[956] = 0 ++ a[957] = 0 ++ a[958] = 0 ++ a[959] = 0 ++ a[960] = 0 ++ a[961] = 0 ++ a[962] = 0 ++ a[963] = 0 ++ a[964] = 0 ++ a[965] = 0 ++ a[966] = 0 ++ a[967] = 0 ++ a[968] = 0 ++ a[969] = 0 ++ a[970] = 0 ++ a[971] = 0 ++ a[972] = 0 ++ a[973] = 0 ++ a[974] = 0 ++ a[975] = 0 ++ a[976] = 0 ++ a[977] = 0 ++ a[978] = 0 ++ a[979] = 0 ++ a[980] = 0 ++ a[981] = 0 ++ a[982] = 0 ++ a[983] = 0 ++ a[984] = 0 ++ a[985] = 0 ++ a[986] = 0 ++ a[987] = 0 ++ a[988] = 0 ++ a[989] = 0 ++ a[990] = 0 ++ a[991] = 0 ++ a[992] = 0 ++ a[993] = 0 ++ a[994] = 0 ++ a[995] = 0 ++ a[996] = 0 ++ a[997] = 0 ++ a[998] = 0 ++ a[999] = 0 ++ x := small(a) // ERROR "inlining call to small .*" ++ y := medium(a) // The crux of this test: medium is not inlined. ++ return x + y ++} +-- +2.14.4 + diff --git a/0003-Don-t-compress-dwarf-by-derfault-as-rpm-debuginfo-is.patch b/0003-Don-t-compress-dwarf-by-derfault-as-rpm-debuginfo-is.patch deleted file mode 100644 index da9131a..0000000 --- a/0003-Don-t-compress-dwarf-by-derfault-as-rpm-debuginfo-is.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 6d0f113b34e323234eeb279984af83ba98e61c10 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jakub=20=C4=8Cajka?= -Date: Wed, 18 Jul 2018 09:42:28 +0200 -Subject: [PATCH 3/3] Don't compress dwarf by derfault as rpm/debuginfo is not - yet ready for it. - ---- - src/cmd/link/internal/ld/main.go | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/cmd/link/internal/ld/main.go b/src/cmd/link/internal/ld/main.go -index 23462f1154..565da989dd 100644 ---- a/src/cmd/link/internal/ld/main.go -+++ b/src/cmd/link/internal/ld/main.go -@@ -123,7 +123,7 @@ func Main(arch *sys.Arch, theArch Arch) { - flag.BoolVar(&ctxt.linkShared, "linkshared", false, "link against installed Go shared libraries") - flag.Var(&ctxt.LinkMode, "linkmode", "set link `mode`") - flag.Var(&ctxt.BuildMode, "buildmode", "set build `mode`") -- flag.BoolVar(&ctxt.compressDWARF, "compressdwarf", true, "compress DWARF if possible") -+ flag.BoolVar(&ctxt.compressDWARF, "compressdwarf", false, "compress DWARF if possible") - objabi.Flagfn1("B", "add an ELF NT_GNU_BUILD_ID `note` when using ELF", addbuildinfo) - objabi.Flagfn1("L", "add specified `directory` to library path", func(a string) { Lflag(ctxt, a) }) - objabi.AddVersionFlag() // -V --- -2.14.4 - diff --git a/golang.spec b/golang.spec index 99b7f00..b08c366 100644 --- a/golang.spec +++ b/golang.spec @@ -106,7 +106,7 @@ Name: golang Version: 1.11 -Release: 0.beta2.1%{?dist} +Release: 0.beta2.2%{?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 @@ -183,7 +183,7 @@ Requires: go-srpm-macros 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-Don-t-compress-dwarf-by-derfault-as-rpm-debuginfo-is.patch +Patch3: 0001-cmd-compile-set-stricter-inlining-threshold-in-large.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -546,6 +546,12 @@ fi %endif %changelog +* Fri Jul 27 2018 Jakub Čajka - 1.11-0.beta2.2 +- Turn on back DWARF compression by default +- Use less memory on 32bit targets during build +- Resolves: BZ#1607270 +- Related: BZ#1602096 + * Fri Jul 20 2018 Jakub Čajka - 1.11-0.beta2.1 - Rebase to 1.11beta2 From c45c36333767627627f480813eea2e9c13de9692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Mon, 6 Aug 2018 12:28:08 +0200 Subject: [PATCH 18/22] Rebase to go 1.11beta3 --- .gitignore | 1 + ...stricter-inlining-threshold-in-large.patch | 1310 ----------------- golang.spec | 9 +- sources | 2 +- 4 files changed, 7 insertions(+), 1315 deletions(-) delete mode 100644 0001-cmd-compile-set-stricter-inlining-threshold-in-large.patch diff --git a/.gitignore b/.gitignore index 6efcfaf..dbc5a35 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,4 @@ /go1.10.3.src.tar.gz /go1.11beta1.src.tar.gz /go1.11beta2.src.tar.gz +/go1.11beta3.src.tar.gz diff --git a/0001-cmd-compile-set-stricter-inlining-threshold-in-large.patch b/0001-cmd-compile-set-stricter-inlining-threshold-in-large.patch deleted file mode 100644 index aaf9eb6..0000000 --- a/0001-cmd-compile-set-stricter-inlining-threshold-in-large.patch +++ /dev/null @@ -1,1310 +0,0 @@ -From 5fc70b6fac0664f3f9d2c2948ba78db420ba70c5 Mon Sep 17 00:00:00 2001 -From: Keith Randall -Date: Mon, 23 Jul 2018 13:09:48 -0700 -Subject: [PATCH] cmd/compile: set stricter inlining threshold in large - functions - -If we're compiling a large function, be more picky about how big -the function we're inlining is. If the function is >5000 nodes, -we lower the inlining threshold from a cost of 80 to 20. - -Turns out reflect.Value's cost is exactly 80. That's the function -at issue in #26546. - -20 was chosen as a proxy for "inlined body is smaller than the call would be". -Simple functions still get inlined, like this one at cost 7: - -func ifaceIndir(t *rtype) bool { - return t.kind&kindDirectIface == 0 -} - -5000 nodes was chosen as the big function size. Here are all the -5000+ node (~~1000+ lines) functions in the stdlib: - -5187 cmd/internal/obj/arm (*ctxt5).asmout -6879 cmd/internal/obj/s390x (*ctxtz).asmout -6567 cmd/internal/obj/ppc64 (*ctxt9).asmout -9643 cmd/internal/obj/arm64 (*ctxt7).asmout -5042 cmd/internal/obj/x86 (*AsmBuf).doasm -8768 cmd/compile/internal/ssa rewriteBlockAMD64 -8878 cmd/compile/internal/ssa rewriteBlockARM -8344 cmd/compile/internal/ssa rewriteValueARM64_OpARM64OR_20 -7916 cmd/compile/internal/ssa rewriteValueARM64_OpARM64OR_30 -5427 cmd/compile/internal/ssa rewriteBlockARM64 -5126 cmd/compile/internal/ssa rewriteValuePPC64_OpPPC64OR_50 -6152 cmd/compile/internal/ssa rewriteValuePPC64_OpPPC64OR_60 -6412 cmd/compile/internal/ssa rewriteValuePPC64_OpPPC64OR_70 -6486 cmd/compile/internal/ssa rewriteValuePPC64_OpPPC64OR_80 -6534 cmd/compile/internal/ssa rewriteValuePPC64_OpPPC64OR_90 -6534 cmd/compile/internal/ssa rewriteValuePPC64_OpPPC64OR_100 -6534 cmd/compile/internal/ssa rewriteValuePPC64_OpPPC64OR_110 -6675 cmd/compile/internal/gc typecheck1 -5433 cmd/compile/internal/gc walkexpr -14070 cmd/vendor/golang.org/x/arch/arm64/arm64asm decodeArg - -There are a lot more smaller (~1000 node) functions in the stdlib. -The function in #26546 has 12477 nodes. - -At some point it might be nice to have a better heuristic for "inlined -body is smaller than the call", a non-cliff way to scale down the cost -as the function gets bigger, doing cheaper inlined calls first, etc. -All that can wait for another release. I'd like to do this CL for -1.11. - -Fixes #26546 -Update #17566 - -Change-Id: Idda13020e46ec2b28d79a17217f44b189f8139ac -Reviewed-on: https://go-review.googlesource.com/125516 -Run-TryBot: Keith Randall -TryBot-Result: Gobot Gobot -Reviewed-by: David Chase ---- - src/cmd/compile/internal/gc/inl.go | 72 ++- - test/inline_big.go | 1029 ++++++++++++++++++++++++++++++++++++ - 2 files changed, 1082 insertions(+), 19 deletions(-) - create mode 100644 test/inline_big.go - -diff --git a/src/cmd/compile/internal/gc/inl.go b/src/cmd/compile/internal/gc/inl.go -index cb3ddaf2a5..feb3c8556a 100644 ---- a/src/cmd/compile/internal/gc/inl.go -+++ b/src/cmd/compile/internal/gc/inl.go -@@ -41,6 +41,9 @@ const ( - inlineExtraCallCost = inlineMaxBudget // default is do not inline, -l=4 enables by using 1 instead. - inlineExtraPanicCost = 1 // do not penalize inlining panics. - inlineExtraThrowCost = inlineMaxBudget // with current (2018-05/1.11) code, inlining runtime.throw does not help. -+ -+ inlineBigFunctionNodes = 5000 // Functions with this many nodes are considered "big". -+ inlineBigFunctionMaxCost = 20 // Max cost of inlinee when inlining into a "big" function. - ) - - // Get the function's package. For ordinary functions it's on the ->sym, but for imported methods -@@ -459,12 +462,38 @@ func inlcopy(n *Node) *Node { - return m - } - -+func countNodes(n *Node) int { -+ if n == nil { -+ return 0 -+ } -+ cnt := 1 -+ cnt += countNodes(n.Left) -+ cnt += countNodes(n.Right) -+ for _, n1 := range n.Ninit.Slice() { -+ cnt += countNodes(n1) -+ } -+ for _, n1 := range n.Nbody.Slice() { -+ cnt += countNodes(n1) -+ } -+ for _, n1 := range n.List.Slice() { -+ cnt += countNodes(n1) -+ } -+ for _, n1 := range n.Rlist.Slice() { -+ cnt += countNodes(n1) -+ } -+ return cnt -+} -+ - // Inlcalls/nodelist/node walks fn's statements and expressions and substitutes any - // calls made to inlineable functions. This is the external entry point. - func inlcalls(fn *Node) { - savefn := Curfn - Curfn = fn -- fn = inlnode(fn) -+ maxCost := int32(inlineMaxBudget) -+ if countNodes(fn) >= inlineBigFunctionNodes { -+ maxCost = inlineBigFunctionMaxCost -+ } -+ fn = inlnode(fn, maxCost) - if fn != Curfn { - Fatalf("inlnode replaced curfn") - } -@@ -505,10 +534,10 @@ func inlconv2list(n *Node) []*Node { - return s - } - --func inlnodelist(l Nodes) { -+func inlnodelist(l Nodes, maxCost int32) { - s := l.Slice() - for i := range s { -- s[i] = inlnode(s[i]) -+ s[i] = inlnode(s[i], maxCost) - } - } - -@@ -525,7 +554,7 @@ func inlnodelist(l Nodes) { - // shorter and less complicated. - // The result of inlnode MUST be assigned back to n, e.g. - // n.Left = inlnode(n.Left) --func inlnode(n *Node) *Node { -+func inlnode(n *Node, maxCost int32) *Node { - if n == nil { - return n - } -@@ -547,19 +576,19 @@ func inlnode(n *Node) *Node { - - lno := setlineno(n) - -- inlnodelist(n.Ninit) -+ inlnodelist(n.Ninit, maxCost) - for _, n1 := range n.Ninit.Slice() { - if n1.Op == OINLCALL { - inlconv2stmt(n1) - } - } - -- n.Left = inlnode(n.Left) -+ n.Left = inlnode(n.Left, maxCost) - if n.Left != nil && n.Left.Op == OINLCALL { - n.Left = inlconv2expr(n.Left) - } - -- n.Right = inlnode(n.Right) -+ n.Right = inlnode(n.Right, maxCost) - if n.Right != nil && n.Right.Op == OINLCALL { - if n.Op == OFOR || n.Op == OFORUNTIL { - inlconv2stmt(n.Right) -@@ -568,7 +597,7 @@ func inlnode(n *Node) *Node { - } - } - -- inlnodelist(n.List) -+ inlnodelist(n.List, maxCost) - switch n.Op { - case OBLOCK: - for _, n2 := range n.List.Slice() { -@@ -595,7 +624,7 @@ func inlnode(n *Node) *Node { - } - } - -- inlnodelist(n.Rlist) -+ inlnodelist(n.Rlist, maxCost) - if n.Op == OAS2FUNC && n.Rlist.First().Op == OINLCALL { - n.Rlist.Set(inlconv2list(n.Rlist.First())) - n.Op = OAS2 -@@ -614,7 +643,7 @@ func inlnode(n *Node) *Node { - } - } - -- inlnodelist(n.Nbody) -+ inlnodelist(n.Nbody, maxCost) - for _, n := range n.Nbody.Slice() { - if n.Op == OINLCALL { - inlconv2stmt(n) -@@ -637,12 +666,12 @@ func inlnode(n *Node) *Node { - fmt.Printf("%v:call to func %+v\n", n.Line(), n.Left) - } - if n.Left.Func != nil && n.Left.Func.Inl != nil && !isIntrinsicCall(n) { // normal case -- n = mkinlcall(n, n.Left) -+ n = mkinlcall(n, n.Left, maxCost) - } else if n.Left.isMethodExpression() && asNode(n.Left.Sym.Def) != nil { -- n = mkinlcall(n, asNode(n.Left.Sym.Def)) -+ n = mkinlcall(n, asNode(n.Left.Sym.Def), maxCost) - } else if n.Left.Op == OCLOSURE { - if f := inlinableClosure(n.Left); f != nil { -- n = mkinlcall(n, f) -+ n = mkinlcall(n, f, maxCost) - } - } else if n.Left.Op == ONAME && n.Left.Name != nil && n.Left.Name.Defn != nil { - if d := n.Left.Name.Defn; d.Op == OAS && d.Right.Op == OCLOSURE { -@@ -668,7 +697,7 @@ func inlnode(n *Node) *Node { - } - break - } -- n = mkinlcall(n, f) -+ n = mkinlcall(n, f, maxCost) - } - } - } -@@ -687,7 +716,7 @@ func inlnode(n *Node) *Node { - Fatalf("no function definition for [%p] %+v\n", n.Left.Type, n.Left.Type) - } - -- n = mkinlcall(n, asNode(n.Left.Type.FuncType().Nname)) -+ n = mkinlcall(n, asNode(n.Left.Type.FuncType().Nname), maxCost) - } - - lineno = lno -@@ -788,7 +817,7 @@ func (v *reassignVisitor) visitList(l Nodes) *Node { - - // The result of mkinlcall MUST be assigned back to n, e.g. - // n.Left = mkinlcall(n.Left, fn, isddd) --func mkinlcall(n *Node, fn *Node) *Node { -+func mkinlcall(n *Node, fn *Node, maxCost int32) *Node { - save_safemode := safemode - - // imported functions may refer to unsafe as long as the -@@ -798,7 +827,7 @@ func mkinlcall(n *Node, fn *Node) *Node { - if pkg != localpkg && pkg != nil { - safemode = false - } -- n = mkinlcall1(n, fn) -+ n = mkinlcall1(n, fn, maxCost) - safemode = save_safemode - return n - } -@@ -824,11 +853,16 @@ var inlgen int - // parameters. - // The result of mkinlcall1 MUST be assigned back to n, e.g. - // n.Left = mkinlcall1(n.Left, fn, isddd) --func mkinlcall1(n, fn *Node) *Node { -+func mkinlcall1(n, fn *Node, maxCost int32) *Node { - if fn.Func.Inl == nil { - // No inlinable body. - return n - } -+ if fn.Func.Inl.Cost > maxCost { -+ // The inlined function body is too big. Typically we use this check to restrict -+ // inlining into very big functions. See issue 26546 and 17566. -+ return n -+ } - - if fn == Curfn || fn.Name.Defn == Curfn { - // Can't recursively inline a function into itself. -@@ -1094,7 +1128,7 @@ func mkinlcall1(n, fn *Node) *Node { - // instead we emit the things that the body needs - // and each use must redo the inlining. - // luckily these are small. -- inlnodelist(call.Nbody) -+ inlnodelist(call.Nbody, maxCost) - for _, n := range call.Nbody.Slice() { - if n.Op == OINLCALL { - inlconv2stmt(n) -diff --git a/test/inline_big.go b/test/inline_big.go -new file mode 100644 -index 0000000000..c4af15b4e1 ---- /dev/null -+++ b/test/inline_big.go -@@ -0,0 +1,1029 @@ -+// errorcheck -0 -m=2 -+ -+// Copyright 2018 The Go Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style -+// license that can be found in the LICENSE file. -+ -+// Test that we restrict inlining into very large functions. -+// See issue #26546. -+ -+package foo -+ -+func small(a []int) int { // ERROR "can inline small as:.*" "small a does not escape" -+ // Cost 16 body (need cost < 20). -+ // See cmd/compile/internal/gc/inl.go:inlineBigFunction* -+ return a[0] + a[1] + a[2] + a[3] -+} -+func medium(a []int) int { // ERROR "can inline medium as:.*" "medium a does not escape" -+ // Cost 32 body (need cost > 20 and cost < 80). -+ // See cmd/compile/internal/gc/inl.go:inlineBigFunction* -+ return a[0] + a[1] + a[2] + a[3] + a[4] + a[5] + a[6] + a[7] -+} -+ -+func f(a []int) int { // ERROR "cannot inline f:.*" "f a does not escape" -+ // Add lots of nodes to f's body. We need >5000. -+ // See cmd/compile/internal/gc/inl.go:inlineBigFunction* -+ a[0] = 0 -+ a[1] = 0 -+ a[2] = 0 -+ a[3] = 0 -+ a[4] = 0 -+ a[5] = 0 -+ a[6] = 0 -+ a[7] = 0 -+ a[8] = 0 -+ a[9] = 0 -+ a[10] = 0 -+ a[11] = 0 -+ a[12] = 0 -+ a[13] = 0 -+ a[14] = 0 -+ a[15] = 0 -+ a[16] = 0 -+ a[17] = 0 -+ a[18] = 0 -+ a[19] = 0 -+ a[20] = 0 -+ a[21] = 0 -+ a[22] = 0 -+ a[23] = 0 -+ a[24] = 0 -+ a[25] = 0 -+ a[26] = 0 -+ a[27] = 0 -+ a[28] = 0 -+ a[29] = 0 -+ a[30] = 0 -+ a[31] = 0 -+ a[32] = 0 -+ a[33] = 0 -+ a[34] = 0 -+ a[35] = 0 -+ a[36] = 0 -+ a[37] = 0 -+ a[38] = 0 -+ a[39] = 0 -+ a[40] = 0 -+ a[41] = 0 -+ a[42] = 0 -+ a[43] = 0 -+ a[44] = 0 -+ a[45] = 0 -+ a[46] = 0 -+ a[47] = 0 -+ a[48] = 0 -+ a[49] = 0 -+ a[50] = 0 -+ a[51] = 0 -+ a[52] = 0 -+ a[53] = 0 -+ a[54] = 0 -+ a[55] = 0 -+ a[56] = 0 -+ a[57] = 0 -+ a[58] = 0 -+ a[59] = 0 -+ a[60] = 0 -+ a[61] = 0 -+ a[62] = 0 -+ a[63] = 0 -+ a[64] = 0 -+ a[65] = 0 -+ a[66] = 0 -+ a[67] = 0 -+ a[68] = 0 -+ a[69] = 0 -+ a[70] = 0 -+ a[71] = 0 -+ a[72] = 0 -+ a[73] = 0 -+ a[74] = 0 -+ a[75] = 0 -+ a[76] = 0 -+ a[77] = 0 -+ a[78] = 0 -+ a[79] = 0 -+ a[80] = 0 -+ a[81] = 0 -+ a[82] = 0 -+ a[83] = 0 -+ a[84] = 0 -+ a[85] = 0 -+ a[86] = 0 -+ a[87] = 0 -+ a[88] = 0 -+ a[89] = 0 -+ a[90] = 0 -+ a[91] = 0 -+ a[92] = 0 -+ a[93] = 0 -+ a[94] = 0 -+ a[95] = 0 -+ a[96] = 0 -+ a[97] = 0 -+ a[98] = 0 -+ a[99] = 0 -+ a[100] = 0 -+ a[101] = 0 -+ a[102] = 0 -+ a[103] = 0 -+ a[104] = 0 -+ a[105] = 0 -+ a[106] = 0 -+ a[107] = 0 -+ a[108] = 0 -+ a[109] = 0 -+ a[110] = 0 -+ a[111] = 0 -+ a[112] = 0 -+ a[113] = 0 -+ a[114] = 0 -+ a[115] = 0 -+ a[116] = 0 -+ a[117] = 0 -+ a[118] = 0 -+ a[119] = 0 -+ a[120] = 0 -+ a[121] = 0 -+ a[122] = 0 -+ a[123] = 0 -+ a[124] = 0 -+ a[125] = 0 -+ a[126] = 0 -+ a[127] = 0 -+ a[128] = 0 -+ a[129] = 0 -+ a[130] = 0 -+ a[131] = 0 -+ a[132] = 0 -+ a[133] = 0 -+ a[134] = 0 -+ a[135] = 0 -+ a[136] = 0 -+ a[137] = 0 -+ a[138] = 0 -+ a[139] = 0 -+ a[140] = 0 -+ a[141] = 0 -+ a[142] = 0 -+ a[143] = 0 -+ a[144] = 0 -+ a[145] = 0 -+ a[146] = 0 -+ a[147] = 0 -+ a[148] = 0 -+ a[149] = 0 -+ a[150] = 0 -+ a[151] = 0 -+ a[152] = 0 -+ a[153] = 0 -+ a[154] = 0 -+ a[155] = 0 -+ a[156] = 0 -+ a[157] = 0 -+ a[158] = 0 -+ a[159] = 0 -+ a[160] = 0 -+ a[161] = 0 -+ a[162] = 0 -+ a[163] = 0 -+ a[164] = 0 -+ a[165] = 0 -+ a[166] = 0 -+ a[167] = 0 -+ a[168] = 0 -+ a[169] = 0 -+ a[170] = 0 -+ a[171] = 0 -+ a[172] = 0 -+ a[173] = 0 -+ a[174] = 0 -+ a[175] = 0 -+ a[176] = 0 -+ a[177] = 0 -+ a[178] = 0 -+ a[179] = 0 -+ a[180] = 0 -+ a[181] = 0 -+ a[182] = 0 -+ a[183] = 0 -+ a[184] = 0 -+ a[185] = 0 -+ a[186] = 0 -+ a[187] = 0 -+ a[188] = 0 -+ a[189] = 0 -+ a[190] = 0 -+ a[191] = 0 -+ a[192] = 0 -+ a[193] = 0 -+ a[194] = 0 -+ a[195] = 0 -+ a[196] = 0 -+ a[197] = 0 -+ a[198] = 0 -+ a[199] = 0 -+ a[200] = 0 -+ a[201] = 0 -+ a[202] = 0 -+ a[203] = 0 -+ a[204] = 0 -+ a[205] = 0 -+ a[206] = 0 -+ a[207] = 0 -+ a[208] = 0 -+ a[209] = 0 -+ a[210] = 0 -+ a[211] = 0 -+ a[212] = 0 -+ a[213] = 0 -+ a[214] = 0 -+ a[215] = 0 -+ a[216] = 0 -+ a[217] = 0 -+ a[218] = 0 -+ a[219] = 0 -+ a[220] = 0 -+ a[221] = 0 -+ a[222] = 0 -+ a[223] = 0 -+ a[224] = 0 -+ a[225] = 0 -+ a[226] = 0 -+ a[227] = 0 -+ a[228] = 0 -+ a[229] = 0 -+ a[230] = 0 -+ a[231] = 0 -+ a[232] = 0 -+ a[233] = 0 -+ a[234] = 0 -+ a[235] = 0 -+ a[236] = 0 -+ a[237] = 0 -+ a[238] = 0 -+ a[239] = 0 -+ a[240] = 0 -+ a[241] = 0 -+ a[242] = 0 -+ a[243] = 0 -+ a[244] = 0 -+ a[245] = 0 -+ a[246] = 0 -+ a[247] = 0 -+ a[248] = 0 -+ a[249] = 0 -+ a[250] = 0 -+ a[251] = 0 -+ a[252] = 0 -+ a[253] = 0 -+ a[254] = 0 -+ a[255] = 0 -+ a[256] = 0 -+ a[257] = 0 -+ a[258] = 0 -+ a[259] = 0 -+ a[260] = 0 -+ a[261] = 0 -+ a[262] = 0 -+ a[263] = 0 -+ a[264] = 0 -+ a[265] = 0 -+ a[266] = 0 -+ a[267] = 0 -+ a[268] = 0 -+ a[269] = 0 -+ a[270] = 0 -+ a[271] = 0 -+ a[272] = 0 -+ a[273] = 0 -+ a[274] = 0 -+ a[275] = 0 -+ a[276] = 0 -+ a[277] = 0 -+ a[278] = 0 -+ a[279] = 0 -+ a[280] = 0 -+ a[281] = 0 -+ a[282] = 0 -+ a[283] = 0 -+ a[284] = 0 -+ a[285] = 0 -+ a[286] = 0 -+ a[287] = 0 -+ a[288] = 0 -+ a[289] = 0 -+ a[290] = 0 -+ a[291] = 0 -+ a[292] = 0 -+ a[293] = 0 -+ a[294] = 0 -+ a[295] = 0 -+ a[296] = 0 -+ a[297] = 0 -+ a[298] = 0 -+ a[299] = 0 -+ a[300] = 0 -+ a[301] = 0 -+ a[302] = 0 -+ a[303] = 0 -+ a[304] = 0 -+ a[305] = 0 -+ a[306] = 0 -+ a[307] = 0 -+ a[308] = 0 -+ a[309] = 0 -+ a[310] = 0 -+ a[311] = 0 -+ a[312] = 0 -+ a[313] = 0 -+ a[314] = 0 -+ a[315] = 0 -+ a[316] = 0 -+ a[317] = 0 -+ a[318] = 0 -+ a[319] = 0 -+ a[320] = 0 -+ a[321] = 0 -+ a[322] = 0 -+ a[323] = 0 -+ a[324] = 0 -+ a[325] = 0 -+ a[326] = 0 -+ a[327] = 0 -+ a[328] = 0 -+ a[329] = 0 -+ a[330] = 0 -+ a[331] = 0 -+ a[332] = 0 -+ a[333] = 0 -+ a[334] = 0 -+ a[335] = 0 -+ a[336] = 0 -+ a[337] = 0 -+ a[338] = 0 -+ a[339] = 0 -+ a[340] = 0 -+ a[341] = 0 -+ a[342] = 0 -+ a[343] = 0 -+ a[344] = 0 -+ a[345] = 0 -+ a[346] = 0 -+ a[347] = 0 -+ a[348] = 0 -+ a[349] = 0 -+ a[350] = 0 -+ a[351] = 0 -+ a[352] = 0 -+ a[353] = 0 -+ a[354] = 0 -+ a[355] = 0 -+ a[356] = 0 -+ a[357] = 0 -+ a[358] = 0 -+ a[359] = 0 -+ a[360] = 0 -+ a[361] = 0 -+ a[362] = 0 -+ a[363] = 0 -+ a[364] = 0 -+ a[365] = 0 -+ a[366] = 0 -+ a[367] = 0 -+ a[368] = 0 -+ a[369] = 0 -+ a[370] = 0 -+ a[371] = 0 -+ a[372] = 0 -+ a[373] = 0 -+ a[374] = 0 -+ a[375] = 0 -+ a[376] = 0 -+ a[377] = 0 -+ a[378] = 0 -+ a[379] = 0 -+ a[380] = 0 -+ a[381] = 0 -+ a[382] = 0 -+ a[383] = 0 -+ a[384] = 0 -+ a[385] = 0 -+ a[386] = 0 -+ a[387] = 0 -+ a[388] = 0 -+ a[389] = 0 -+ a[390] = 0 -+ a[391] = 0 -+ a[392] = 0 -+ a[393] = 0 -+ a[394] = 0 -+ a[395] = 0 -+ a[396] = 0 -+ a[397] = 0 -+ a[398] = 0 -+ a[399] = 0 -+ a[400] = 0 -+ a[401] = 0 -+ a[402] = 0 -+ a[403] = 0 -+ a[404] = 0 -+ a[405] = 0 -+ a[406] = 0 -+ a[407] = 0 -+ a[408] = 0 -+ a[409] = 0 -+ a[410] = 0 -+ a[411] = 0 -+ a[412] = 0 -+ a[413] = 0 -+ a[414] = 0 -+ a[415] = 0 -+ a[416] = 0 -+ a[417] = 0 -+ a[418] = 0 -+ a[419] = 0 -+ a[420] = 0 -+ a[421] = 0 -+ a[422] = 0 -+ a[423] = 0 -+ a[424] = 0 -+ a[425] = 0 -+ a[426] = 0 -+ a[427] = 0 -+ a[428] = 0 -+ a[429] = 0 -+ a[430] = 0 -+ a[431] = 0 -+ a[432] = 0 -+ a[433] = 0 -+ a[434] = 0 -+ a[435] = 0 -+ a[436] = 0 -+ a[437] = 0 -+ a[438] = 0 -+ a[439] = 0 -+ a[440] = 0 -+ a[441] = 0 -+ a[442] = 0 -+ a[443] = 0 -+ a[444] = 0 -+ a[445] = 0 -+ a[446] = 0 -+ a[447] = 0 -+ a[448] = 0 -+ a[449] = 0 -+ a[450] = 0 -+ a[451] = 0 -+ a[452] = 0 -+ a[453] = 0 -+ a[454] = 0 -+ a[455] = 0 -+ a[456] = 0 -+ a[457] = 0 -+ a[458] = 0 -+ a[459] = 0 -+ a[460] = 0 -+ a[461] = 0 -+ a[462] = 0 -+ a[463] = 0 -+ a[464] = 0 -+ a[465] = 0 -+ a[466] = 0 -+ a[467] = 0 -+ a[468] = 0 -+ a[469] = 0 -+ a[470] = 0 -+ a[471] = 0 -+ a[472] = 0 -+ a[473] = 0 -+ a[474] = 0 -+ a[475] = 0 -+ a[476] = 0 -+ a[477] = 0 -+ a[478] = 0 -+ a[479] = 0 -+ a[480] = 0 -+ a[481] = 0 -+ a[482] = 0 -+ a[483] = 0 -+ a[484] = 0 -+ a[485] = 0 -+ a[486] = 0 -+ a[487] = 0 -+ a[488] = 0 -+ a[489] = 0 -+ a[490] = 0 -+ a[491] = 0 -+ a[492] = 0 -+ a[493] = 0 -+ a[494] = 0 -+ a[495] = 0 -+ a[496] = 0 -+ a[497] = 0 -+ a[498] = 0 -+ a[499] = 0 -+ a[500] = 0 -+ a[501] = 0 -+ a[502] = 0 -+ a[503] = 0 -+ a[504] = 0 -+ a[505] = 0 -+ a[506] = 0 -+ a[507] = 0 -+ a[508] = 0 -+ a[509] = 0 -+ a[510] = 0 -+ a[511] = 0 -+ a[512] = 0 -+ a[513] = 0 -+ a[514] = 0 -+ a[515] = 0 -+ a[516] = 0 -+ a[517] = 0 -+ a[518] = 0 -+ a[519] = 0 -+ a[520] = 0 -+ a[521] = 0 -+ a[522] = 0 -+ a[523] = 0 -+ a[524] = 0 -+ a[525] = 0 -+ a[526] = 0 -+ a[527] = 0 -+ a[528] = 0 -+ a[529] = 0 -+ a[530] = 0 -+ a[531] = 0 -+ a[532] = 0 -+ a[533] = 0 -+ a[534] = 0 -+ a[535] = 0 -+ a[536] = 0 -+ a[537] = 0 -+ a[538] = 0 -+ a[539] = 0 -+ a[540] = 0 -+ a[541] = 0 -+ a[542] = 0 -+ a[543] = 0 -+ a[544] = 0 -+ a[545] = 0 -+ a[546] = 0 -+ a[547] = 0 -+ a[548] = 0 -+ a[549] = 0 -+ a[550] = 0 -+ a[551] = 0 -+ a[552] = 0 -+ a[553] = 0 -+ a[554] = 0 -+ a[555] = 0 -+ a[556] = 0 -+ a[557] = 0 -+ a[558] = 0 -+ a[559] = 0 -+ a[560] = 0 -+ a[561] = 0 -+ a[562] = 0 -+ a[563] = 0 -+ a[564] = 0 -+ a[565] = 0 -+ a[566] = 0 -+ a[567] = 0 -+ a[568] = 0 -+ a[569] = 0 -+ a[570] = 0 -+ a[571] = 0 -+ a[572] = 0 -+ a[573] = 0 -+ a[574] = 0 -+ a[575] = 0 -+ a[576] = 0 -+ a[577] = 0 -+ a[578] = 0 -+ a[579] = 0 -+ a[580] = 0 -+ a[581] = 0 -+ a[582] = 0 -+ a[583] = 0 -+ a[584] = 0 -+ a[585] = 0 -+ a[586] = 0 -+ a[587] = 0 -+ a[588] = 0 -+ a[589] = 0 -+ a[590] = 0 -+ a[591] = 0 -+ a[592] = 0 -+ a[593] = 0 -+ a[594] = 0 -+ a[595] = 0 -+ a[596] = 0 -+ a[597] = 0 -+ a[598] = 0 -+ a[599] = 0 -+ a[600] = 0 -+ a[601] = 0 -+ a[602] = 0 -+ a[603] = 0 -+ a[604] = 0 -+ a[605] = 0 -+ a[606] = 0 -+ a[607] = 0 -+ a[608] = 0 -+ a[609] = 0 -+ a[610] = 0 -+ a[611] = 0 -+ a[612] = 0 -+ a[613] = 0 -+ a[614] = 0 -+ a[615] = 0 -+ a[616] = 0 -+ a[617] = 0 -+ a[618] = 0 -+ a[619] = 0 -+ a[620] = 0 -+ a[621] = 0 -+ a[622] = 0 -+ a[623] = 0 -+ a[624] = 0 -+ a[625] = 0 -+ a[626] = 0 -+ a[627] = 0 -+ a[628] = 0 -+ a[629] = 0 -+ a[630] = 0 -+ a[631] = 0 -+ a[632] = 0 -+ a[633] = 0 -+ a[634] = 0 -+ a[635] = 0 -+ a[636] = 0 -+ a[637] = 0 -+ a[638] = 0 -+ a[639] = 0 -+ a[640] = 0 -+ a[641] = 0 -+ a[642] = 0 -+ a[643] = 0 -+ a[644] = 0 -+ a[645] = 0 -+ a[646] = 0 -+ a[647] = 0 -+ a[648] = 0 -+ a[649] = 0 -+ a[650] = 0 -+ a[651] = 0 -+ a[652] = 0 -+ a[653] = 0 -+ a[654] = 0 -+ a[655] = 0 -+ a[656] = 0 -+ a[657] = 0 -+ a[658] = 0 -+ a[659] = 0 -+ a[660] = 0 -+ a[661] = 0 -+ a[662] = 0 -+ a[663] = 0 -+ a[664] = 0 -+ a[665] = 0 -+ a[666] = 0 -+ a[667] = 0 -+ a[668] = 0 -+ a[669] = 0 -+ a[670] = 0 -+ a[671] = 0 -+ a[672] = 0 -+ a[673] = 0 -+ a[674] = 0 -+ a[675] = 0 -+ a[676] = 0 -+ a[677] = 0 -+ a[678] = 0 -+ a[679] = 0 -+ a[680] = 0 -+ a[681] = 0 -+ a[682] = 0 -+ a[683] = 0 -+ a[684] = 0 -+ a[685] = 0 -+ a[686] = 0 -+ a[687] = 0 -+ a[688] = 0 -+ a[689] = 0 -+ a[690] = 0 -+ a[691] = 0 -+ a[692] = 0 -+ a[693] = 0 -+ a[694] = 0 -+ a[695] = 0 -+ a[696] = 0 -+ a[697] = 0 -+ a[698] = 0 -+ a[699] = 0 -+ a[700] = 0 -+ a[701] = 0 -+ a[702] = 0 -+ a[703] = 0 -+ a[704] = 0 -+ a[705] = 0 -+ a[706] = 0 -+ a[707] = 0 -+ a[708] = 0 -+ a[709] = 0 -+ a[710] = 0 -+ a[711] = 0 -+ a[712] = 0 -+ a[713] = 0 -+ a[714] = 0 -+ a[715] = 0 -+ a[716] = 0 -+ a[717] = 0 -+ a[718] = 0 -+ a[719] = 0 -+ a[720] = 0 -+ a[721] = 0 -+ a[722] = 0 -+ a[723] = 0 -+ a[724] = 0 -+ a[725] = 0 -+ a[726] = 0 -+ a[727] = 0 -+ a[728] = 0 -+ a[729] = 0 -+ a[730] = 0 -+ a[731] = 0 -+ a[732] = 0 -+ a[733] = 0 -+ a[734] = 0 -+ a[735] = 0 -+ a[736] = 0 -+ a[737] = 0 -+ a[738] = 0 -+ a[739] = 0 -+ a[740] = 0 -+ a[741] = 0 -+ a[742] = 0 -+ a[743] = 0 -+ a[744] = 0 -+ a[745] = 0 -+ a[746] = 0 -+ a[747] = 0 -+ a[748] = 0 -+ a[749] = 0 -+ a[750] = 0 -+ a[751] = 0 -+ a[752] = 0 -+ a[753] = 0 -+ a[754] = 0 -+ a[755] = 0 -+ a[756] = 0 -+ a[757] = 0 -+ a[758] = 0 -+ a[759] = 0 -+ a[760] = 0 -+ a[761] = 0 -+ a[762] = 0 -+ a[763] = 0 -+ a[764] = 0 -+ a[765] = 0 -+ a[766] = 0 -+ a[767] = 0 -+ a[768] = 0 -+ a[769] = 0 -+ a[770] = 0 -+ a[771] = 0 -+ a[772] = 0 -+ a[773] = 0 -+ a[774] = 0 -+ a[775] = 0 -+ a[776] = 0 -+ a[777] = 0 -+ a[778] = 0 -+ a[779] = 0 -+ a[780] = 0 -+ a[781] = 0 -+ a[782] = 0 -+ a[783] = 0 -+ a[784] = 0 -+ a[785] = 0 -+ a[786] = 0 -+ a[787] = 0 -+ a[788] = 0 -+ a[789] = 0 -+ a[790] = 0 -+ a[791] = 0 -+ a[792] = 0 -+ a[793] = 0 -+ a[794] = 0 -+ a[795] = 0 -+ a[796] = 0 -+ a[797] = 0 -+ a[798] = 0 -+ a[799] = 0 -+ a[800] = 0 -+ a[801] = 0 -+ a[802] = 0 -+ a[803] = 0 -+ a[804] = 0 -+ a[805] = 0 -+ a[806] = 0 -+ a[807] = 0 -+ a[808] = 0 -+ a[809] = 0 -+ a[810] = 0 -+ a[811] = 0 -+ a[812] = 0 -+ a[813] = 0 -+ a[814] = 0 -+ a[815] = 0 -+ a[816] = 0 -+ a[817] = 0 -+ a[818] = 0 -+ a[819] = 0 -+ a[820] = 0 -+ a[821] = 0 -+ a[822] = 0 -+ a[823] = 0 -+ a[824] = 0 -+ a[825] = 0 -+ a[826] = 0 -+ a[827] = 0 -+ a[828] = 0 -+ a[829] = 0 -+ a[830] = 0 -+ a[831] = 0 -+ a[832] = 0 -+ a[833] = 0 -+ a[834] = 0 -+ a[835] = 0 -+ a[836] = 0 -+ a[837] = 0 -+ a[838] = 0 -+ a[839] = 0 -+ a[840] = 0 -+ a[841] = 0 -+ a[842] = 0 -+ a[843] = 0 -+ a[844] = 0 -+ a[845] = 0 -+ a[846] = 0 -+ a[847] = 0 -+ a[848] = 0 -+ a[849] = 0 -+ a[850] = 0 -+ a[851] = 0 -+ a[852] = 0 -+ a[853] = 0 -+ a[854] = 0 -+ a[855] = 0 -+ a[856] = 0 -+ a[857] = 0 -+ a[858] = 0 -+ a[859] = 0 -+ a[860] = 0 -+ a[861] = 0 -+ a[862] = 0 -+ a[863] = 0 -+ a[864] = 0 -+ a[865] = 0 -+ a[866] = 0 -+ a[867] = 0 -+ a[868] = 0 -+ a[869] = 0 -+ a[870] = 0 -+ a[871] = 0 -+ a[872] = 0 -+ a[873] = 0 -+ a[874] = 0 -+ a[875] = 0 -+ a[876] = 0 -+ a[877] = 0 -+ a[878] = 0 -+ a[879] = 0 -+ a[880] = 0 -+ a[881] = 0 -+ a[882] = 0 -+ a[883] = 0 -+ a[884] = 0 -+ a[885] = 0 -+ a[886] = 0 -+ a[887] = 0 -+ a[888] = 0 -+ a[889] = 0 -+ a[890] = 0 -+ a[891] = 0 -+ a[892] = 0 -+ a[893] = 0 -+ a[894] = 0 -+ a[895] = 0 -+ a[896] = 0 -+ a[897] = 0 -+ a[898] = 0 -+ a[899] = 0 -+ a[900] = 0 -+ a[901] = 0 -+ a[902] = 0 -+ a[903] = 0 -+ a[904] = 0 -+ a[905] = 0 -+ a[906] = 0 -+ a[907] = 0 -+ a[908] = 0 -+ a[909] = 0 -+ a[910] = 0 -+ a[911] = 0 -+ a[912] = 0 -+ a[913] = 0 -+ a[914] = 0 -+ a[915] = 0 -+ a[916] = 0 -+ a[917] = 0 -+ a[918] = 0 -+ a[919] = 0 -+ a[920] = 0 -+ a[921] = 0 -+ a[922] = 0 -+ a[923] = 0 -+ a[924] = 0 -+ a[925] = 0 -+ a[926] = 0 -+ a[927] = 0 -+ a[928] = 0 -+ a[929] = 0 -+ a[930] = 0 -+ a[931] = 0 -+ a[932] = 0 -+ a[933] = 0 -+ a[934] = 0 -+ a[935] = 0 -+ a[936] = 0 -+ a[937] = 0 -+ a[938] = 0 -+ a[939] = 0 -+ a[940] = 0 -+ a[941] = 0 -+ a[942] = 0 -+ a[943] = 0 -+ a[944] = 0 -+ a[945] = 0 -+ a[946] = 0 -+ a[947] = 0 -+ a[948] = 0 -+ a[949] = 0 -+ a[950] = 0 -+ a[951] = 0 -+ a[952] = 0 -+ a[953] = 0 -+ a[954] = 0 -+ a[955] = 0 -+ a[956] = 0 -+ a[957] = 0 -+ a[958] = 0 -+ a[959] = 0 -+ a[960] = 0 -+ a[961] = 0 -+ a[962] = 0 -+ a[963] = 0 -+ a[964] = 0 -+ a[965] = 0 -+ a[966] = 0 -+ a[967] = 0 -+ a[968] = 0 -+ a[969] = 0 -+ a[970] = 0 -+ a[971] = 0 -+ a[972] = 0 -+ a[973] = 0 -+ a[974] = 0 -+ a[975] = 0 -+ a[976] = 0 -+ a[977] = 0 -+ a[978] = 0 -+ a[979] = 0 -+ a[980] = 0 -+ a[981] = 0 -+ a[982] = 0 -+ a[983] = 0 -+ a[984] = 0 -+ a[985] = 0 -+ a[986] = 0 -+ a[987] = 0 -+ a[988] = 0 -+ a[989] = 0 -+ a[990] = 0 -+ a[991] = 0 -+ a[992] = 0 -+ a[993] = 0 -+ a[994] = 0 -+ a[995] = 0 -+ a[996] = 0 -+ a[997] = 0 -+ a[998] = 0 -+ a[999] = 0 -+ x := small(a) // ERROR "inlining call to small .*" -+ y := medium(a) // The crux of this test: medium is not inlined. -+ return x + y -+} --- -2.14.4 - diff --git a/golang.spec b/golang.spec index b08c366..8227086 100644 --- a/golang.spec +++ b/golang.spec @@ -102,11 +102,11 @@ %endif %global go_api 1.11 -%global go_version 1.11beta2 +%global go_version 1.11beta3 Name: golang Version: 1.11 -Release: 0.beta2.2%{?dist} +Release: 0.beta3.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 @@ -183,7 +183,6 @@ Requires: go-srpm-macros 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: 0001-cmd-compile-set-stricter-inlining-threshold-in-large.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -309,7 +308,6 @@ Requires: %{name} = %{version}-%{release} %patch1 -p1 %patch2 -p1 -%patch3 -p1 cp %{SOURCE1} ./src/runtime/ @@ -546,6 +544,9 @@ fi %endif %changelog +* Mon Aug 06 2018 Jakub Čajka - 1.11-0.beta3.1 +- Rebase to go1.11beta3 + * Fri Jul 27 2018 Jakub Čajka - 1.11-0.beta2.2 - Turn on back DWARF compression by default - Use less memory on 32bit targets during build diff --git a/sources b/sources index 2666473..9f8fc25 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.11beta2.src.tar.gz) = 0b88364f15c1b41c19c2dca3e69e4bb848d8534540f80b50e9cca00889398f464647530a972ec763b925e2d850ee4e88f08abda3ec01384462ff423e281e24aa +SHA512 (go1.11beta3.src.tar.gz) = af921a7879e148c70126bd56b7fb521931a73b13a904e801b5d2375e5a10ace9c8139840b9659dceb4366887966ca90d13a7e0151d52b8611e2e5aca3a1ab107 From a273a5236a8e08acc79ccc4dd226b63bd36dbcaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Tue, 14 Aug 2018 14:48:38 +0200 Subject: [PATCH 19/22] Rebase to go 1.11rc1 --- .gitignore | 1 + golang.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index dbc5a35..aff1663 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,4 @@ /go1.11beta1.src.tar.gz /go1.11beta2.src.tar.gz /go1.11beta3.src.tar.gz +/go1.11rc1.src.tar.gz diff --git a/golang.spec b/golang.spec index 8227086..a417cdc 100644 --- a/golang.spec +++ b/golang.spec @@ -1,6 +1,6 @@ %bcond_with bootstrap # temporalily ignore test failures -%ifarch %{ix86} aarch64 x86_64 %{arm} +%ifarch %{ix86} aarch64 %{arm} %bcond_without ignore_tests %else %bcond_with ignore_tests @@ -102,11 +102,11 @@ %endif %global go_api 1.11 -%global go_version 1.11beta3 +%global go_version 1.11rc1 Name: golang Version: 1.11 -Release: 0.beta3.1%{?dist} +Release: 0.rc1.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 @@ -544,6 +544,9 @@ fi %endif %changelog +* Tue Aug 14 2018 Jakub Čajka - 1.11-0.rc1.1 +- Rebase to go1.11rc1 + * Mon Aug 06 2018 Jakub Čajka - 1.11-0.beta3.1 - Rebase to go1.11beta3 diff --git a/sources b/sources index 9f8fc25..fe56ad7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.11beta3.src.tar.gz) = af921a7879e148c70126bd56b7fb521931a73b13a904e801b5d2375e5a10ace9c8139840b9659dceb4366887966ca90d13a7e0151d52b8611e2e5aca3a1ab107 +SHA512 (go1.11rc1.src.tar.gz) = 0ada53018ebed21fe421239087e0d36a2a892fa8584c0279cc61c49307b6130ea1cdd103aab373f44d4aeabed9e98e72bed7c06c4503aebcc09004ab5f213c6d From f1f6f5d515026af9aad116c35836444a948debcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Thu, 23 Aug 2018 11:20:46 +0200 Subject: [PATCH 20/22] Rebase to go1.11rc2 Reduce size of bin package --- .gitignore | 1 + golang.spec | 10 ++++++++-- sources | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index aff1663..c1557a2 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,4 @@ /go1.11beta2.src.tar.gz /go1.11beta3.src.tar.gz /go1.11rc1.src.tar.gz +/go1.11rc2.src.tar.gz diff --git a/golang.spec b/golang.spec index a417cdc..63afee9 100644 --- a/golang.spec +++ b/golang.spec @@ -102,11 +102,11 @@ %endif %global go_api 1.11 -%global go_version 1.11rc1 +%global go_version 1.11rc2 Name: golang Version: 1.11 -Release: 0.rc1.1%{?dist} +Release: 0.rc2.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 @@ -358,6 +358,8 @@ GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -race -v -x std %install rm -rf $RPM_BUILD_ROOT +# remove GC build cache +rm -rf pkg/obj/go-build/* # create the top level directories mkdir -p $RPM_BUILD_ROOT%{_bindir} @@ -544,6 +546,10 @@ fi %endif %changelog +* Thu Aug 23 2018 Jakub Čajka - 1.11-0.rc2.1 +- Rebase to go1.11rc2 +- Reduce size of bin package + * Tue Aug 14 2018 Jakub Čajka - 1.11-0.rc1.1 - Rebase to go1.11rc1 diff --git a/sources b/sources index fe56ad7..c12eae8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.11rc1.src.tar.gz) = 0ada53018ebed21fe421239087e0d36a2a892fa8584c0279cc61c49307b6130ea1cdd103aab373f44d4aeabed9e98e72bed7c06c4503aebcc09004ab5f213c6d +SHA512 (go1.11rc2.src.tar.gz) = b6d9dc14c5dc9dafb0d84ea3847038f5dd3bd3db4419e2105b0c3dfe848ded1a2c9223480f3bed0bea7a2dd7ca76f6a65d86fac2df22d39bade1aae7177046a0 From 3014b945690e2ff855ed96dc9736afed143a794c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Mon, 27 Aug 2018 16:21:42 +0200 Subject: [PATCH 21/22] Rebase to 1.11 release --- .gitignore | 1 + golang.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c1557a2..f61258c 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,4 @@ /go1.11beta3.src.tar.gz /go1.11rc1.src.tar.gz /go1.11rc2.src.tar.gz +/go1.11.src.tar.gz diff --git a/golang.spec b/golang.spec index 63afee9..77e3919 100644 --- a/golang.spec +++ b/golang.spec @@ -102,11 +102,11 @@ %endif %global go_api 1.11 -%global go_version 1.11rc2 +%global go_version 1.11 Name: golang Version: 1.11 -Release: 0.rc2.1%{?dist} +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 @@ -546,6 +546,9 @@ fi %endif %changelog +* Mon Aug 27 2018 Jakub Čajka - 1.11-1 +- Rebase to go1.11 release + * Thu Aug 23 2018 Jakub Čajka - 1.11-0.rc2.1 - Rebase to go1.11rc2 - Reduce size of bin package diff --git a/sources b/sources index c12eae8..3f685c9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.11rc2.src.tar.gz) = b6d9dc14c5dc9dafb0d84ea3847038f5dd3bd3db4419e2105b0c3dfe848ded1a2c9223480f3bed0bea7a2dd7ca76f6a65d86fac2df22d39bade1aae7177046a0 +SHA512 (go1.11.src.tar.gz) = 2758b7924b4b8cffc30b56fbf039b8e23d1a3c42506ed4997bd64531ba742e2c60e95d1fa70cae2ccda45d1959fadccfd2404af87d962530e4b1d3556c4aaf43 From eb7ec5ddc18a5dae364b8763d95ddc3d4a3a7c36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Sat, 6 Oct 2018 15:39:01 +0200 Subject: [PATCH 22/22] Rebase to 1.11.1 --- .gitignore | 1 + golang.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f61258c..6879e3c 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,4 @@ /go1.11rc1.src.tar.gz /go1.11rc2.src.tar.gz /go1.11.src.tar.gz +/go1.11.1.src.tar.gz diff --git a/golang.spec b/golang.spec index 77e3919..df13215 100644 --- a/golang.spec +++ b/golang.spec @@ -102,10 +102,10 @@ %endif %global go_api 1.11 -%global go_version 1.11 +%global go_version 1.11.1 Name: golang -Version: 1.11 +Version: 1.11.1 Release: 1%{?dist} Summary: The Go Programming Language # source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain @@ -546,6 +546,9 @@ fi %endif %changelog +* Thu Oct 04 2018 Jakub Čajka - 1.11.1-1 +- Rebase to go1.11.1 + * Mon Aug 27 2018 Jakub Čajka - 1.11-1 - Rebase to go1.11 release diff --git a/sources b/sources index 3f685c9..1ea8a32 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.11.src.tar.gz) = 2758b7924b4b8cffc30b56fbf039b8e23d1a3c42506ed4997bd64531ba742e2c60e95d1fa70cae2ccda45d1959fadccfd2404af87d962530e4b1d3556c4aaf43 +SHA512 (go1.11.1.src.tar.gz) = 9c19f40b24f2180563705511a5692932c0db3585939053e6d78eea1f394902d37f05b0386f0e7d0c0266178de7e9bd7b003324ed232ce2e5050c9faafafdd979