diff --git a/0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch b/0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch new file mode 100644 index 0000000000000000000000000000000000000000..422ca2b75ad013b63ef52a21f2c08e5118b11e52 --- /dev/null +++ b/0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch @@ -0,0 +1,88 @@ +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 + ++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 --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" + "reflect" ++ "runtime" + "testing" + "time" + ) +@@ -128,7 +129,7 @@ func TestLoadLocationFromTZData(t *testing.T) { + 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 --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 + + 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", + } + + func initLocal() { +-- +2.14.3 + diff --git a/0003-cmd-go-disable-Google-s-proxy-and-sumdb.patch b/0003-cmd-go-disable-Google-s-proxy-and-sumdb.patch new file mode 100644 index 0000000000000000000000000000000000000000..a6235e4823463877b1e81203b4cab11903653490 --- /dev/null +++ b/0003-cmd-go-disable-Google-s-proxy-and-sumdb.patch @@ -0,0 +1,54 @@ +From b38cd2374c2395f5a77802ef8ea3d7ac5b8a86ad Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jakub=20=C4=8Cajka?= +Date: Mon, 27 May 2019 15:12:53 +0200 +Subject: [PATCH 3/3] cmd/go: disable Google's proxy and sumdb + +--- + src/cmd/go/internal/cfg/cfg.go | 10 +++++----- + src/cmd/go/testdata/script/mod_sumdb_golang.txt | 6 +++--- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go +index 61dc6bdda6..e8658dc56c 100644 +--- a/src/cmd/go/internal/cfg/cfg.go ++++ b/src/cmd/go/internal/cfg/cfg.go +@@ -245,11 +245,11 @@ var ( + GOPPC64 = envOr("GOPPC64", fmt.Sprintf("%s%d", "power", objabi.GOPPC64)) + GOWASM = envOr("GOWASM", fmt.Sprint(objabi.GOWASM)) + +- GOPROXY = envOr("GOPROXY", "https://proxy.golang.org,direct") +- GOSUMDB = envOr("GOSUMDB", "sum.golang.org") +- GOPRIVATE = Getenv("GOPRIVATE") +- GONOPROXY = envOr("GONOPROXY", GOPRIVATE) +- GONOSUMDB = envOr("GONOSUMDB", GOPRIVATE) ++ GOPROXY = envOr("GOPROXY", "direct") ++ GOSUMDB = envOr("GOSUMDB", "off") ++ GOPRIVATE = Getenv("GOPRIVATE") ++ GONOPROXY = envOr("GONOPROXY", GOPRIVATE) ++ GONOSUMDB = envOr("GONOSUMDB", GOPRIVATE) + GOINSECURE = Getenv("GOINSECURE") + ) + +diff --git a/src/cmd/go/testdata/script/mod_sumdb_golang.txt b/src/cmd/go/testdata/script/mod_sumdb_golang.txt +index 40a07fc7e9..50436e32d7 100644 +--- a/src/cmd/go/testdata/script/mod_sumdb_golang.txt ++++ b/src/cmd/go/testdata/script/mod_sumdb_golang.txt +@@ -2,12 +2,12 @@ + env GOPROXY= + env GOSUMDB= + go env GOPROXY +-stdout '^https://proxy.golang.org,direct$' ++stdout '^direct$' + go env GOSUMDB +-stdout '^sum.golang.org$' ++stdout '^off$' + env GOPROXY=https://proxy.golang.org + go env GOSUMDB +-stdout '^sum.golang.org$' ++stdout '^off$' + + # download direct from github + [!net] skip +-- +2.21.0 + diff --git a/0003-golang-delete-pem-files.patch b/0003-golang-delete-pem-files.patch deleted file mode 100644 index a4114a192f5856aababbc7e97cf93fffc0125ed9..0000000000000000000000000000000000000000 --- a/0003-golang-delete-pem-files.patch +++ /dev/null @@ -1,44 +0,0 @@ -From de4a8f2f1c0e7c30dc5f54d19212eb29d01871ed Mon Sep 17 00:00:00 2001 -From: jingrui -Date: Wed, 27 Nov 2019 10:46:52 +0800 -Subject: [PATCH 6/6] golang: delete pem files - -Signed-off-by: jingrui ---- - src/crypto/tls/testdata/example-cert.pem | 11 ----------- - src/crypto/tls/testdata/example-key.pem | 5 ----- - 2 files changed, 16 deletions(-) - delete mode 100644 src/crypto/tls/testdata/example-cert.pem - delete mode 100644 src/crypto/tls/testdata/example-key.pem - -diff --git a/src/crypto/tls/testdata/example-cert.pem b/src/crypto/tls/testdata/example-cert.pem -deleted file mode 100644 -index e0bf7db..0000000 ---- a/src/crypto/tls/testdata/example-cert.pem -+++ /dev/null -@@ -1,11 +0,0 @@ -------BEGIN CERTIFICATE----- --MIIBhTCCASugAwIBAgIQIRi6zePL6mKjOipn+dNuaTAKBggqhkjOPQQDAjASMRAw --DgYDVQQKEwdBY21lIENvMB4XDTE3MTAyMDE5NDMwNloXDTE4MTAyMDE5NDMwNlow --EjEQMA4GA1UEChMHQWNtZSBDbzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABD0d --7VNhbWvZLWPuj/RtHFjvtJBEwOkhbN/BnnE8rnZR8+sbwnc/KhCk3FhnpHZnQz7B --5aETbbIgmuvewdjvSBSjYzBhMA4GA1UdDwEB/wQEAwICpDATBgNVHSUEDDAKBggr --BgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdEQQiMCCCDmxvY2FsaG9zdDo1 --NDUzgg4xMjcuMC4wLjE6NTQ1MzAKBggqhkjOPQQDAgNIADBFAiEA2zpJEPQyz6/l --Wf86aX6PepsntZv2GYlA5UpabfT2EZICICpJ5h/iI+i341gBmLiAFQOyTDT+/wQc --6MF9+Yw1Yy0t -------END CERTIFICATE----- -diff --git a/src/crypto/tls/testdata/example-key.pem b/src/crypto/tls/testdata/example-key.pem -deleted file mode 100644 -index 104fb09..0000000 ---- a/src/crypto/tls/testdata/example-key.pem -+++ /dev/null -@@ -1,5 +0,0 @@ -------BEGIN EC PRIVATE KEY----- --MHcCAQEEIIrYSSNQFaA2Hwf1duRSxKtLYX5CB04fSeQ6tF1aY/PuoAoGCCqGSM49 --AwEHoUQDQgAEPR3tU2Fta9ktY+6P9G0cWO+0kETA6SFs38GecTyudlHz6xvCdz8q --EKTcWGekdmdDPsHloRNtsiCa697B2O9IFA== -------END EC PRIVATE KEY----- --- -2.17.1 - diff --git a/0004-syscall-implement-rawVforkSyscall-for-linux-arm64.patch b/0004-syscall-implement-rawVforkSyscall-for-linux-arm64.patch deleted file mode 100644 index bb83fced3b9a42c3a75e18d8b7bede43e96eee3d..0000000000000000000000000000000000000000 --- a/0004-syscall-implement-rawVforkSyscall-for-linux-arm64.patch +++ /dev/null @@ -1,101 +0,0 @@ -From fa95a1d8e7eda9ab90a7fd29785cad0ae7d816e2 Mon Sep 17 00:00:00 2001 -From: jingrui -Date: Wed, 27 Nov 2019 09:54:22 +0800 -Subject: [PATCH 1/6] syscall: implement rawVforkSyscall for linux/arm64 - -This allows the use of CLONE_VFORK and CLONE_VM for fork/exec, preventing -"fork/exec ...: cannot allocate memory" failures from occuring when attempting -to execute commands from a Go process that has a large memory footprint. -Additionally, this should reduce the latency of fork/exec on linux/arm64. - -With CLONE_VM the child process shares the same memory with the parent -process. On its own this would lead to conflicting use of the same -memory, so CLONE_VFORK is used to suspend the parent process until the -child releases the memory when switching to the new program binary -via the exec syscall. When the parent process continues to run, one -has to consider the changes to memory that the child process did, -namely the return address of the syscall function needs to be restored -from a register. - -exec.Command() callers can start in a faster manner, as child process who -do exec commands job can be cloned faster via vfork than via fork on arm64. - -The same problem was addressed on linux/amd64 via issue #5838. - -Updates #31936 -Contributed by Howard Zhang and Bin Lu - -Change-Id: Ia99d81d877f564ec60d19f17e596276836576eaf -Reviewed-on: https://go-review.googlesource.com/c/go/+/189418 -Run-TryBot: Tobias Klauser -TryBot-Result: Gobot Gobot -Reviewed-by: Tobias Klauser -Reviewed-by: Cherry Zhang ---- - src/syscall/asm_linux_arm64.s | 23 +++++++++++++++++++++++ - src/syscall/exec_linux.go | 2 +- - src/syscall/syscall_linux_arm64.go | 4 +--- - 3 files changed, 25 insertions(+), 4 deletions(-) - -diff --git a/src/syscall/asm_linux_arm64.s b/src/syscall/asm_linux_arm64.s -index 7edeafc..fb22f8d 100644 ---- a/src/syscall/asm_linux_arm64.s -+++ b/src/syscall/asm_linux_arm64.s -@@ -103,6 +103,29 @@ ok: - MOVD ZR, err+72(FP) // errno - RET - -+// func rawVforkSyscall(trap, a1 uintptr) (r1, err uintptr) -+TEXT ·rawVforkSyscall(SB),NOSPLIT,$0-32 -+ MOVD a1+8(FP), R0 -+ MOVD $0, R1 -+ MOVD $0, R2 -+ MOVD $0, R3 -+ MOVD $0, R4 -+ MOVD $0, R5 -+ MOVD trap+0(FP), R8 // syscall entry -+ SVC -+ CMN $4095, R0 -+ BCC ok -+ MOVD $-1, R4 -+ MOVD R4, r1+16(FP) // r1 -+ NEG R0, R0 -+ MOVD R0, err+24(FP) // errno -+ RET -+ok: -+ MOVD R0, r1+16(FP) // r1 -+ MOVD ZR, err+24(FP) // errno -+ RET -+ -+ - // func rawSyscallNoError(trap uintptr, a1, a2, a3 uintptr) (r1, r2 uintptr); - TEXT ·rawSyscallNoError(SB),NOSPLIT,$0-48 - MOVD a1+8(FP), R0 -diff --git a/src/syscall/exec_linux.go b/src/syscall/exec_linux.go -index a2242b2..3540d51 100644 ---- a/src/syscall/exec_linux.go -+++ b/src/syscall/exec_linux.go -@@ -196,7 +196,7 @@ func forkAndExecInChild1(argv0 *byte, argv, envv []*byte, chroot, dir *byte, att - } - } - -- hasRawVforkSyscall := runtime.GOARCH == "amd64" || runtime.GOARCH == "ppc64" || runtime.GOARCH == "s390x" -+ hasRawVforkSyscall := runtime.GOARCH == "amd64" || runtime.GOARCH == "ppc64" || runtime.GOARCH == "s390x" || runtime.GOARCH == "arm64" - - // About to call fork. - // No more allocation or calls of non-assembly functions. -diff --git a/src/syscall/syscall_linux_arm64.go b/src/syscall/syscall_linux_arm64.go -index 48ad0bb..89b2ab2 100644 ---- a/src/syscall/syscall_linux_arm64.go -+++ b/src/syscall/syscall_linux_arm64.go -@@ -154,6 +154,4 @@ const ( - SYS_EPOLL_WAIT = 1069 - ) - --func rawVforkSyscall(trap, a1 uintptr) (r1 uintptr, err Errno) { -- panic("not implemented") --} -+func rawVforkSyscall(trap, a1 uintptr) (r1 uintptr, err Errno) --- -2.17.1 - diff --git a/0005-runtime-fix-crash-during-VDSO-calls-on-arm.patch b/0005-runtime-fix-crash-during-VDSO-calls-on-arm.patch deleted file mode 100644 index 5106d5a3b822adfc0c2c36e06eb9275a975a191d..0000000000000000000000000000000000000000 --- a/0005-runtime-fix-crash-during-VDSO-calls-on-arm.patch +++ /dev/null @@ -1,191 +0,0 @@ -From 8a755c0f0389dca42ec8caef0efa9b6ebe9d1e3c Mon Sep 17 00:00:00 2001 -From: Yuichi Nishiwaki -Date: Wed, 11 Sep 2019 02:26:02 +0000 -Subject: [PATCH 2/6] runtime: fix crash during VDSO calls on arm - -As discussed in #32912, a crash occurs when go runtime calls a VDSO function (say -__vdso_clock_gettime) and a signal arrives to that thread. -Since VDSO functions temporarily destroy the G register (R10), -Go functions asynchronously executed in that thread (i.e. Go's signal -handler) can try to load data from the destroyed G, which causes -segmentation fault. - -To fix the issue a guard is inserted in front of sigtrampgo, so that the control escapes from -signal handlers without touching G in case the signal occurred in the VDSO context. -The test case included in the patch is take from discussion in a relevant thread on github: -https://github.com/golang/go/issues/32912#issuecomment-517874531. -This patch not only fixes the issue on AArch64 but also that on 32bit ARM. - -Fixes #32912 - -Change-Id: I657472e54b7aa3c617fabc5019ce63aa4105624a -GitHub-Last-Rev: 28ce42c4a02a060f08c1b0dd1c9a392123fd2ee9 -GitHub-Pull-Request: golang/go#34030 -Reviewed-on: https://go-review.googlesource.com/c/go/+/192937 -Run-TryBot: Ian Lance Taylor -TryBot-Result: Gobot Gobot -Reviewed-by: Ian Lance Taylor ---- - src/runtime/crash_test.go | 9 +++++ - src/runtime/signal_unix.go | 27 ++++++++++--- - src/runtime/testdata/testprog/vdso.go | 55 +++++++++++++++++++++++++++ - src/runtime/vdso_linux.go | 1 + - 4 files changed, 86 insertions(+), 6 deletions(-) - create mode 100644 src/runtime/testdata/testprog/vdso.go - -diff --git a/src/runtime/crash_test.go b/src/runtime/crash_test.go -index c54bb57..c2cab7c 100644 ---- a/src/runtime/crash_test.go -+++ b/src/runtime/crash_test.go -@@ -143,6 +143,15 @@ func buildTestProg(t *testing.T, binary string, flags ...string) (string, error) - return exe, nil - } - -+func TestVDSO(t *testing.T) { -+ t.Parallel() -+ output := runTestProg(t, "testprog", "SignalInVDSO") -+ want := "success\n" -+ if output != want { -+ t.Fatalf("output:\n%s\n\nwanted:\n%s", output, want); -+ } -+} -+ - var ( - staleRuntimeOnce sync.Once // guards init of staleRuntimeErr - staleRuntimeErr error -diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go -index ad51dc1..63fb07f 100644 ---- a/src/runtime/signal_unix.go -+++ b/src/runtime/signal_unix.go -@@ -274,6 +274,21 @@ func sigpipe() { - dieFromSignal(_SIGPIPE) - } - -+// sigFetchG fetches the value of G safely when running in a signal handler. -+// On some architectures, the g value may be clobbered when running in a VDSO. -+// See issue #32912. -+// -+//go:nosplit -+func sigFetchG(c *sigctxt) *g { -+ switch GOARCH { -+ case "arm", "arm64", "ppc64", "ppc64le": -+ if inVDSOPage(c.sigpc()) { -+ return nil -+ } -+ } -+ return getg() -+} -+ - // sigtrampgo is called from the signal handler function, sigtramp, - // written in assembly code. - // This is called by the signal handler, and the world may be stopped. -@@ -289,9 +304,9 @@ func sigtrampgo(sig uint32, info *siginfo, ctx unsafe.Pointer) { - if sigfwdgo(sig, info, ctx) { - return - } -- g := getg() -+ c := &sigctxt{info, ctx} -+ g := sigFetchG(c) - if g == nil { -- c := &sigctxt{info, ctx} - if sig == _SIGPROF { - sigprofNonGoPC(c.sigpc()) - return -@@ -347,7 +362,6 @@ func sigtrampgo(sig uint32, info *siginfo, ctx unsafe.Pointer) { - signalDuringFork(sig) - } - -- c := &sigctxt{info, ctx} - c.fixsigcode(sig) - sighandler(sig, info, ctx, g) - setg(g) -@@ -650,9 +664,10 @@ func sigfwdgo(sig uint32, info *siginfo, ctx unsafe.Pointer) bool { - return false - } - // Determine if the signal occurred inside Go code. We test that: -- // (1) we were in a goroutine (i.e., m.curg != nil), and -- // (2) we weren't in CGO. -- g := getg() -+ // (1) we weren't in VDSO page, -+ // (2) we were in a goroutine (i.e., m.curg != nil), and -+ // (3) we weren't in CGO. -+ g := sigFetchG(c) - if g != nil && g.m != nil && g.m.curg != nil && !g.m.incgo { - return false - } -diff --git a/src/runtime/testdata/testprog/vdso.go b/src/runtime/testdata/testprog/vdso.go -new file mode 100644 -index 0000000..6036f45 ---- /dev/null -+++ b/src/runtime/testdata/testprog/vdso.go -@@ -0,0 +1,55 @@ -+// Copyright 2019 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. -+ -+// Invoke signal hander in the VDSO context (see issue 32912). -+ -+package main -+ -+import ( -+ "fmt" -+ "io/ioutil" -+ "os" -+ "runtime/pprof" -+ "time" -+) -+ -+func init() { -+ register("SignalInVDSO", signalInVDSO) -+} -+ -+func signalInVDSO() { -+ f, err := ioutil.TempFile("", "timeprofnow") -+ if err != nil { -+ fmt.Fprintln(os.Stderr, err) -+ os.Exit(2) -+ } -+ -+ if err := pprof.StartCPUProfile(f); err != nil { -+ fmt.Fprintln(os.Stderr, err) -+ os.Exit(2) -+ } -+ -+ t0 := time.Now() -+ t1 := t0 -+ // We should get a profiling signal 100 times a second, -+ // so running for 1 second should be sufficient. -+ for t1.Sub(t0) < time.Second { -+ t1 = time.Now() -+ } -+ -+ pprof.StopCPUProfile() -+ -+ name := f.Name() -+ if err := f.Close(); err != nil { -+ fmt.Fprintln(os.Stderr, err) -+ os.Exit(2) -+ } -+ -+ if err := os.Remove(name); err != nil { -+ fmt.Fprintln(os.Stderr, err) -+ os.Exit(2) -+ } -+ -+ fmt.Println("success"); -+} -diff --git a/src/runtime/vdso_linux.go b/src/runtime/vdso_linux.go -index 71ba4ce..8518276 100644 ---- a/src/runtime/vdso_linux.go -+++ b/src/runtime/vdso_linux.go -@@ -281,6 +281,7 @@ func vdsoauxv(tag, val uintptr) { - } - - // vdsoMarker reports whether PC is on the VDSO page. -+//go:nosplit - func inVDSOPage(pc uintptr) bool { - for _, k := range vdsoSymbolKeys { - if *k.ptr != 0 { --- -2.17.1 - diff --git a/0006-runtime-save-fetch-g-register-during-VDSO-on-ARM-and.patch b/0006-runtime-save-fetch-g-register-during-VDSO-on-ARM-and.patch deleted file mode 100644 index 717fcd96e70b5c1c5ef1ae804e7c5a042e0bc7f9..0000000000000000000000000000000000000000 --- a/0006-runtime-save-fetch-g-register-during-VDSO-on-ARM-and.patch +++ /dev/null @@ -1,253 +0,0 @@ -From 4717d9a1a21dfe051a14f033615218d833371d68 Mon Sep 17 00:00:00 2001 -From: jingrui -Date: Wed, 27 Nov 2019 10:19:13 +0800 -Subject: [PATCH 3/6] runtime: save/fetch g register during VDSO on ARM and - ARM64 - -On ARM and ARM64, during a VDSO call, the g register may be -temporarily clobbered by the VDSO code. If a signal is received -during the execution of VDSO code, we may not find a valid g -reading the g register. In CL 192937, we conservatively assume -g is nil. But this approach has a problem: we cannot handle -the signal in this case. Further, if the signal is not a -profiling signal, we'll call badsignal, which calls needm, which -wants to get an extra m, but we don't have one in a non-cgo -binary, which cuases the program to hang. - -This is even more of a problem with async preemption, where we -will receive more signals than before. I ran into this problem -while working on async preemption support on ARM64. - -In this CL, before making a VDSO call, we save the g on the -gsignal stack. When we receive a signal, we will be running on -the gsignal stack, so we can fetch the g from there and move on. - -We probably want to do the same for PPC64. Currently we rely on -that the VDSO code doesn't actually clobber the g register, but -this is not guaranteed and we don't have control with. - -Idea from discussion with Dan Cross and Austin. - -Should fix #34391. - -Change-Id: Idbefc5e4c2f4373192c2be797be0140ae08b26e3 -Reviewed-on: https://go-review.googlesource.com/c/go/+/202759 -Run-TryBot: Cherry Zhang -Reviewed-by: Austin Clements ---- - src/os/signal/signal_test.go | 49 +++++++++++++++++++++++++++++++++++ - src/runtime/proc.go | 3 +++ - src/runtime/signal_unix.go | 24 ++++++++++++----- - src/runtime/sys_linux_arm.s | 32 +++++++++++++++++++++++ - src/runtime/sys_linux_arm64.s | 28 ++++++++++++++++++++ - 5 files changed, 129 insertions(+), 7 deletions(-) - -diff --git a/src/os/signal/signal_test.go b/src/os/signal/signal_test.go -index 6ea59f4..c8274ea 100644 ---- a/src/os/signal/signal_test.go -+++ b/src/os/signal/signal_test.go -@@ -453,3 +453,52 @@ func atomicStopTestProgram() { - - os.Exit(0) - } -+ -+func TestTime(t *testing.T) { -+ // Test that signal works fine when we are in a call to get time, -+ // which on some platforms is using VDSO. See issue #34391. -+ dur := 3 * time.Second -+ if testing.Short() { -+ dur = 100 * time.Millisecond -+ } -+ defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(4)) -+ done := make(chan bool) -+ finished := make(chan bool) -+ go func() { -+ sig := make(chan os.Signal, 1) -+ Notify(sig, syscall.SIGUSR1) -+ defer Stop(sig) -+ Loop: -+ for { -+ select { -+ case <-sig: -+ case <-done: -+ break Loop -+ } -+ } -+ finished <- true -+ }() -+ go func() { -+ Loop: -+ for { -+ select { -+ case <-done: -+ break Loop -+ default: -+ syscall.Kill(syscall.Getpid(), syscall.SIGUSR1) -+ runtime.Gosched() -+ } -+ } -+ finished <- true -+ }() -+ t0 := time.Now() -+ for t1 := t0; t1.Sub(t0) < dur; t1 = time.Now() { -+ } // hammering on getting time -+ close(done) -+ <-finished -+ <-finished -+ // When run with 'go test -cpu=1,2,4' SIGUSR1 from this test can slip -+ // into subsequent TestSignal() causing failure. -+ // Sleep for a while to reduce the possibility of the failure. -+ time.Sleep(10 * time.Millisecond) -+} -diff --git a/src/runtime/proc.go b/src/runtime/proc.go -index 93d329d..1487647 100644 ---- a/src/runtime/proc.go -+++ b/src/runtime/proc.go -@@ -3237,6 +3237,9 @@ func malg(stacksize int32) *g { - }) - newg.stackguard0 = newg.stack.lo + _StackGuard - newg.stackguard1 = ^uintptr(0) -+ // Clear the bottom word of the stack. We record g -+ // there on gsignal stack during VDSO on ARM and ARM64. -+ *(*uintptr)(unsafe.Pointer(newg.stack.lo)) = 0 - } - return newg - } -diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go -index 63fb07f..2cf1e3b 100644 ---- a/src/runtime/signal_unix.go -+++ b/src/runtime/signal_unix.go -@@ -280,13 +280,23 @@ func sigpipe() { - // - //go:nosplit - func sigFetchG(c *sigctxt) *g { -- switch GOARCH { -- case "arm", "arm64", "ppc64", "ppc64le": -- if inVDSOPage(c.sigpc()) { -- return nil -- } -- } -- return getg() -+ switch GOARCH { -+ case "arm", "arm64": -+ if inVDSOPage(c.sigpc()) { -+ // Before making a VDSO call we save the g to the bottom of the -+ // signal stack. Fetch from there. -+ // TODO: in efence mode, stack is sysAlloc'd, so this wouldn't -+ // work. -+ sp := getcallersp() -+ s := spanOf(sp) -+ if s != nil && s.state == mSpanManual && s.base() < sp && sp < s.limit { -+ gp := *(**g)(unsafe.Pointer(s.base())) -+ return gp -+ } -+ return nil -+ } -+ } -+ return getg() - } - - // sigtrampgo is called from the signal handler function, sigtramp, -diff --git a/src/runtime/sys_linux_arm.s b/src/runtime/sys_linux_arm.s -index 9c73984..26e12a8 100644 ---- a/src/runtime/sys_linux_arm.s -+++ b/src/runtime/sys_linux_arm.s -@@ -246,7 +246,23 @@ noswitch: - CMP $0, R11 - B.EQ fallback - -+ // Store g on gsignal's stack, so if we receive a signal -+ // during VDSO code we can find the g. -+ // If we don't have a signal stack, we won't receive signal, -+ // so don't bother saving g. -+ MOVW m_gsignal(R5), R6 // g.m.gsignal -+ CMP $0, R6 -+ BEQ 3(PC) -+ MOVW (g_stack+stack_lo)(R6), R6 // g.m.gsignal.stack.lo -+ MOVW g, (R6) -+ - BL (R11) -+ -+ CMP $0, R6 // R6 is unchanged by C code -+ BEQ 3(PC) -+ MOVW $0, R1 -+ MOVW R1, (R6) // clear g slot -+ - JMP finish - - fallback: -@@ -297,7 +313,23 @@ noswitch: - CMP $0, R11 - B.EQ fallback - -+ // Store g on gsignal's stack, so if we receive a signal -+ // during VDSO code we can find the g. -+ // If we don't have a signal stack, we won't receive signal, -+ // so don't bother saving g. -+ MOVW m_gsignal(R5), R6 // g.m.gsignal -+ CMP $0, R6 -+ BEQ 3(PC) -+ MOVW (g_stack+stack_lo)(R6), R6 // g.m.gsignal.stack.lo -+ MOVW g, (R6) -+ - BL (R11) -+ -+ CMP $0, R6 // R6 is unchanged by C code -+ BEQ 3(PC) -+ MOVW $0, R1 -+ MOVW R1, (R6) // clear g slot -+ - JMP finish - - fallback: -diff --git a/src/runtime/sys_linux_arm64.s b/src/runtime/sys_linux_arm64.s -index 2835b6c..fd40bf9 100644 ---- a/src/runtime/sys_linux_arm64.s -+++ b/src/runtime/sys_linux_arm64.s -@@ -207,7 +207,21 @@ noswitch: - MOVW $CLOCK_REALTIME, R0 - MOVD runtime·vdsoClockgettimeSym(SB), R2 - CBZ R2, fallback -+ -+ // Store g on gsignal's stack, so if we receive a signal -+ // during VDSO code we can find the g. -+ // If we don't have a signal stack, we won't receive signal, -+ // so don't bother saving g. -+ MOVD m_gsignal(R21), R22 // g.m.gsignal -+ CBZ R22, 3(PC) -+ MOVD (g_stack+stack_lo)(R22), R22 // g.m.gsignal.stack.lo -+ MOVD g, (R22) -+ - BL (R2) -+ -+ CBZ R22, 2(PC) // R22 is unchanged by C code -+ MOVD ZR, (R22) // clear g slot -+ - B finish - - fallback: -@@ -250,7 +264,21 @@ noswitch: - MOVW $CLOCK_MONOTONIC, R0 - MOVD runtime·vdsoClockgettimeSym(SB), R2 - CBZ R2, fallback -+ -+ // Store g on gsignal's stack, so if we receive a signal -+ // during VDSO code we can find the g. -+ // If we don't have a signal stack, we won't receive signal, -+ // so don't bother saving g. -+ MOVD m_gsignal(R21), R22 // g.m.gsignal -+ CBZ R22, 3(PC) -+ MOVD (g_stack+stack_lo)(R22), R22 // g.m.gsignal.stack.lo -+ MOVD g, (R22) -+ - BL (R2) -+ -+ CBZ R22, 2(PC) // R22 is unchanged by C code -+ MOVD ZR, (R22) // clear g slot -+ - B finish - - fallback: --- -2.17.1 - diff --git a/0007-runtime-don-t-fetch-G-from-signal-stack-when-using-c.patch b/0007-runtime-don-t-fetch-G-from-signal-stack-when-using-c.patch deleted file mode 100644 index 0db9c7078fa0d164bd6c235f558e24816342f01c..0000000000000000000000000000000000000000 --- a/0007-runtime-don-t-fetch-G-from-signal-stack-when-using-c.patch +++ /dev/null @@ -1,179 +0,0 @@ -From fce0a59fc370634fcd7de8f8691e918cdf122f7d Mon Sep 17 00:00:00 2001 -From: Cherry Zhang -Date: Thu, 31 Oct 2019 10:32:31 -0400 -Subject: [PATCH 4/6] runtime: don't fetch G from signal stack when using cgo - -When using cgo, we save G to TLS, and when a signal happens, we -load G from TLS in sigtramp. This should give us a valid G. Don't -try to fetch from the signal stack. In particular, C code may -change the signal stack or call our signal handler directly (e.g. -TSAN), so we are not necessarily running on the original gsignal -stack where we saved G. - -Also skip saving G on the signal stack when using cgo. - -Updates #35249. - -Change-Id: I40749ce6682709bd4ebfdfd9f23bd0f317fc197d -Reviewed-on: https://go-review.googlesource.com/c/go/+/204519 -Reviewed-by: Ian Lance Taylor ---- - src/runtime/signal_unix.go | 8 +++++--- - src/runtime/sys_linux_arm.s | 30 ++++++++++++++++++++++-------- - src/runtime/sys_linux_arm64.s | 26 ++++++++++++++++++++------ - 3 files changed, 47 insertions(+), 17 deletions(-) - -diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go -index 2cf1e3b..721edb5 100644 ---- a/src/runtime/signal_unix.go -+++ b/src/runtime/signal_unix.go -@@ -282,9 +282,11 @@ func sigpipe() { - func sigFetchG(c *sigctxt) *g { - switch GOARCH { - case "arm", "arm64": -- if inVDSOPage(c.sigpc()) { -- // Before making a VDSO call we save the g to the bottom of the -- // signal stack. Fetch from there. -+ if !iscgo && inVDSOPage(c.sigpc()) { -+ // When using cgo, we save the g on TLS and load it from there -+ // in sigtramp. Just use that. -+ // Otherwise, before making a VDSO call we save the g to the -+ // bottom of the signal stack. Fetch from there. - // TODO: in efence mode, stack is sysAlloc'd, so this wouldn't - // work. - sp := getcallersp() -diff --git a/src/runtime/sys_linux_arm.s b/src/runtime/sys_linux_arm.s -index 26e12a8..a47ac5f 100644 ---- a/src/runtime/sys_linux_arm.s -+++ b/src/runtime/sys_linux_arm.s -@@ -250,21 +250,28 @@ noswitch: - // during VDSO code we can find the g. - // If we don't have a signal stack, we won't receive signal, - // so don't bother saving g. -+ // When using cgo, we already saved g on TLS, also don't save -+ // g here. -+ MOVB runtime·iscgo(SB), R6 -+ CMP $0, R6 -+ BNE nosaveg - MOVW m_gsignal(R5), R6 // g.m.gsignal - CMP $0, R6 -- BEQ 3(PC) -+ BEQ nosaveg - MOVW (g_stack+stack_lo)(R6), R6 // g.m.gsignal.stack.lo - MOVW g, (R6) - - BL (R11) - -- CMP $0, R6 // R6 is unchanged by C code -- BEQ 3(PC) - MOVW $0, R1 -- MOVW R1, (R6) // clear g slot -+ MOVW R1, (R6) // clear g slot, R6 is unchanged by C code - - JMP finish - -+nosaveg: -+ BL (R11) -+ JMP finish -+ - fallback: - MOVW $SYS_clock_gettime, R7 - SWI $0 -@@ -317,21 +324,28 @@ noswitch: - // during VDSO code we can find the g. - // If we don't have a signal stack, we won't receive signal, - // so don't bother saving g. -+ // When using cgo, we already saved g on TLS, also don't save -+ // g here. -+ MOVB runtime·iscgo(SB), R6 -+ CMP $0, R6 -+ BNE nosaveg - MOVW m_gsignal(R5), R6 // g.m.gsignal - CMP $0, R6 -- BEQ 3(PC) -+ BEQ nosaveg - MOVW (g_stack+stack_lo)(R6), R6 // g.m.gsignal.stack.lo - MOVW g, (R6) - - BL (R11) - -- CMP $0, R6 // R6 is unchanged by C code -- BEQ 3(PC) - MOVW $0, R1 -- MOVW R1, (R6) // clear g slot -+ MOVW R1, (R6) // clear g slot, R6 is unchanged by C code - - JMP finish - -+nosaveg: -+ BL (R11) -+ JMP finish -+ - fallback: - MOVW $SYS_clock_gettime, R7 - SWI $0 -diff --git a/src/runtime/sys_linux_arm64.s b/src/runtime/sys_linux_arm64.s -index fd40bf9..94c93ca 100644 ---- a/src/runtime/sys_linux_arm64.s -+++ b/src/runtime/sys_linux_arm64.s -@@ -212,18 +212,25 @@ noswitch: - // during VDSO code we can find the g. - // If we don't have a signal stack, we won't receive signal, - // so don't bother saving g. -+ // When using cgo, we already saved g on TLS, also don't save -+ // g here. -+ MOVBU runtime·iscgo(SB), R22 -+ CBNZ R22, nosaveg - MOVD m_gsignal(R21), R22 // g.m.gsignal -- CBZ R22, 3(PC) -+ CBZ R22, nosaveg - MOVD (g_stack+stack_lo)(R22), R22 // g.m.gsignal.stack.lo - MOVD g, (R22) - - BL (R2) - -- CBZ R22, 2(PC) // R22 is unchanged by C code -- MOVD ZR, (R22) // clear g slot -+ MOVD ZR, (R22) // clear g slot, R22 is unchanged by C code - - B finish - -+nosaveg: -+ BL (R2) -+ B finish -+ - fallback: - MOVD $SYS_clock_gettime, R8 - SVC -@@ -269,18 +276,25 @@ noswitch: - // during VDSO code we can find the g. - // If we don't have a signal stack, we won't receive signal, - // so don't bother saving g. -+ // When using cgo, we already saved g on TLS, also don't save -+ // g here. -+ MOVBU runtime·iscgo(SB), R22 -+ CBNZ R22, nosaveg - MOVD m_gsignal(R21), R22 // g.m.gsignal -- CBZ R22, 3(PC) -+ CBZ R22, nosaveg - MOVD (g_stack+stack_lo)(R22), R22 // g.m.gsignal.stack.lo - MOVD g, (R22) - - BL (R2) - -- CBZ R22, 2(PC) // R22 is unchanged by C code -- MOVD ZR, (R22) // clear g slot -+ MOVD ZR, (R22) // clear g slot, R22 is unchanged by C code - - B finish - -+nosaveg: -+ BL (R2) -+ B finish -+ - fallback: - MOVD $SYS_clock_gettime, R8 - SVC --- -2.17.1 - diff --git a/0008-runtime-don-t-save-G-during-VDSO-if-we-re-handling-s.patch b/0008-runtime-don-t-save-G-during-VDSO-if-we-re-handling-s.patch deleted file mode 100644 index e71d11fd6dd51b1f63fbdab1b03293b5792021c0..0000000000000000000000000000000000000000 --- a/0008-runtime-don-t-save-G-during-VDSO-if-we-re-handling-s.patch +++ /dev/null @@ -1,107 +0,0 @@ -From e83074ea52287115b85002a6b72137c72f6d7ecc Mon Sep 17 00:00:00 2001 -From: Cherry Zhang -Date: Sun, 10 Nov 2019 13:18:06 -0500 -Subject: [PATCH 5/6] runtime: don't save G during VDSO if we're handling - signal - -On some platforms (currently ARM and ARM64), when calling into -VDSO we store the G to the gsignal stack, if there is one, so if -we receive a signal during VDSO we can find the G. - -If we receive a signal during VDSO, and within the signal handler -we call nanotime again (e.g. when handling profiling signal), -we'll save/clear the G slot on the gsignal stack again, which -clobbers the original saved G. If we receive a second signal -during the same VDSO execution, we will fetch a nil G, which will -lead to bad things such as deadlock. - -Don't save G if we're calling VDSO code from the gsignal stack. -Saving G is not necessary as we won't receive a nested signal. - -Fixes #35473. - -Change-Id: Ibfd8587a3c70c2f1533908b056e81b94d75d65a5 -Reviewed-on: https://go-review.googlesource.com/c/go/+/206397 -Run-TryBot: Cherry Zhang -TryBot-Result: Gobot Gobot -Reviewed-by: Bryan C. Mills ---- - src/runtime/sys_linux_arm.s | 8 ++++++++ - src/runtime/sys_linux_arm64.s | 8 ++++++++ - 2 files changed, 16 insertions(+) - -diff --git a/src/runtime/sys_linux_arm.s b/src/runtime/sys_linux_arm.s -index a47ac5f..577faac 100644 ---- a/src/runtime/sys_linux_arm.s -+++ b/src/runtime/sys_linux_arm.s -@@ -252,12 +252,16 @@ noswitch: - // so don't bother saving g. - // When using cgo, we already saved g on TLS, also don't save - // g here. -+ // Also don't save g if we are already on the signal stack. -+ // We won't get a nested signal. - MOVB runtime·iscgo(SB), R6 - CMP $0, R6 - BNE nosaveg - MOVW m_gsignal(R5), R6 // g.m.gsignal - CMP $0, R6 - BEQ nosaveg -+ CMP g, R6 -+ BEQ nosaveg - MOVW (g_stack+stack_lo)(R6), R6 // g.m.gsignal.stack.lo - MOVW g, (R6) - -@@ -326,12 +330,16 @@ noswitch: - // so don't bother saving g. - // When using cgo, we already saved g on TLS, also don't save - // g here. -+ // Also don't save g if we are already on the signal stack. -+ // We won't get a nested signal. - MOVB runtime·iscgo(SB), R6 - CMP $0, R6 - BNE nosaveg - MOVW m_gsignal(R5), R6 // g.m.gsignal - CMP $0, R6 - BEQ nosaveg -+ CMP g, R6 -+ BEQ nosaveg - MOVW (g_stack+stack_lo)(R6), R6 // g.m.gsignal.stack.lo - MOVW g, (R6) - -diff --git a/src/runtime/sys_linux_arm64.s b/src/runtime/sys_linux_arm64.s -index 94c93ca..a076744 100644 ---- a/src/runtime/sys_linux_arm64.s -+++ b/src/runtime/sys_linux_arm64.s -@@ -214,10 +214,14 @@ noswitch: - // so don't bother saving g. - // When using cgo, we already saved g on TLS, also don't save - // g here. -+ // Also don't save g if we are already on the signal stack. -+ // We won't get a nested signal. - MOVBU runtime·iscgo(SB), R22 - CBNZ R22, nosaveg - MOVD m_gsignal(R21), R22 // g.m.gsignal - CBZ R22, nosaveg -+ CMP g, R22 -+ BEQ nosaveg - MOVD (g_stack+stack_lo)(R22), R22 // g.m.gsignal.stack.lo - MOVD g, (R22) - -@@ -278,10 +282,14 @@ noswitch: - // so don't bother saving g. - // When using cgo, we already saved g on TLS, also don't save - // g here. -+ // Also don't save g if we are already on the signal stack. -+ // We won't get a nested signal. - MOVBU runtime·iscgo(SB), R22 - CBNZ R22, nosaveg - MOVD m_gsignal(R21), R22 // g.m.gsignal - CBZ R22, nosaveg -+ CMP g, R22 -+ BEQ nosaveg - MOVD (g_stack+stack_lo)(R22), R22 // g.m.gsignal.stack.lo - MOVD g, (R22) - --- -2.17.1 - diff --git a/0013-drop-hard-code-cert.patch b/0013-drop-hard-code-cert.patch deleted file mode 100644 index 1af1acc73a346d0e546ae1f4be3c0f0bd6c55841..0000000000000000000000000000000000000000 --- a/0013-drop-hard-code-cert.patch +++ /dev/null @@ -1,135 +0,0 @@ -From 2720067ebfb7568792bb0c8fe3fbf095c89b77a9 Mon Sep 17 00:00:00 2001 -From: jingrui -Date: Tue, 17 Mar 2020 17:43:33 +0800 -Subject: [PATCH] drop hard-code cert - -Signed-off-by: jingrui ---- - src/crypto/x509/test-file.crt | 32 --------------------------- - src/crypto/x509/testdata/test-dir.crt | 31 -------------------------- - src/net/http/internal/testcert.go | 31 ++------------------------ - 3 files changed, 2 insertions(+), 92 deletions(-) - delete mode 100644 src/crypto/x509/test-file.crt - delete mode 100644 src/crypto/x509/testdata/test-dir.crt - -diff --git a/src/crypto/x509/test-file.crt b/src/crypto/x509/test-file.crt -deleted file mode 100644 -index caa83b9..0000000 ---- a/src/crypto/x509/test-file.crt -+++ /dev/null -@@ -1,32 +0,0 @@ -------BEGIN CERTIFICATE----- --MIIFbTCCA1WgAwIBAgIJAN338vEmMtLsMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV --BAYTAlVLMRMwEQYDVQQIDApUZXN0LVN0YXRlMRUwEwYDVQQKDAxHb2xhbmcgVGVz --dHMxEjAQBgNVBAMMCXRlc3QtZmlsZTAeFw0xNzAyMDEyMzUyMDhaFw0yNzAxMzAy --MzUyMDhaME0xCzAJBgNVBAYTAlVLMRMwEQYDVQQIDApUZXN0LVN0YXRlMRUwEwYD --VQQKDAxHb2xhbmcgVGVzdHMxEjAQBgNVBAMMCXRlc3QtZmlsZTCCAiIwDQYJKoZI --hvcNAQEBBQADggIPADCCAgoCggIBAPMGiLjdiffQo3Xc8oUe7wsDhSaAJFOhO6Qs --i0xYrYl7jmCuz9rGD2fdgk5cLqGazKuQ6fIFzHXFU2BKs4CWXt9KO0KFEhfvZeuW --jG5d7C1ZUiuKOrPqjKVu8SZtFPc7y7Ke7msXzY+Z2LLyiJJ93LCMq4+cTSGNXVlI --KqUxhxeoD5/QkUPyQy/ilu3GMYfx/YORhDP6Edcuskfj8wRh1UxBejP8YPMvI6St --cE2GkxoEGqDWnQ/61F18te6WI3MD29tnKXOkXVhnSC+yvRLljotW2/tAhHKBG4tj --iQWT5Ri4Wrw2tXxPKRLsVWc7e1/hdxhnuvYpXkWNhKsm002jzkFXlzfEwPd8nZdw --5aT6gPUBN2AAzdoqZI7E200i0orEF7WaSoMfjU1tbHvExp3vyAPOfJ5PS2MQ6W03 --Zsy5dTVH+OBH++rkRzQCFcnIv/OIhya5XZ9KX9nFPgBEP7Xq2A+IjH7B6VN/S/bv --8lhp2V+SQvlew9GttKC4hKuPsl5o7+CMbcqcNUdxm9gGkN8epGEKCuix97bpNlxN --fHZxHE5+8GMzPXMkCD56y5TNKR6ut7JGHMPtGl5lPCLqzG/HzYyFgxsDfDUu2B0A --GKj0lGpnLfGqwhs2/s3jpY7+pcvVQxEpvVTId5byDxu1ujP4HjO/VTQ2P72rE8Ft --C6J2Av0tAgMBAAGjUDBOMB0GA1UdDgQWBBTLT/RbyfBB/Pa07oBnaM+QSJPO9TAf --BgNVHSMEGDAWgBTLT/RbyfBB/Pa07oBnaM+QSJPO9TAMBgNVHRMEBTADAQH/MA0G --CSqGSIb3DQEBCwUAA4ICAQB3sCntCcQwhMgRPPyvOCMyTcQ/Iv+cpfxz2Ck14nlx --AkEAH2CH0ov5GWTt07/ur3aa5x+SAKi0J3wTD1cdiw4U/6Uin6jWGKKxvoo4IaeK --SbM8w/6eKx6UbmHx7PA/eRABY9tTlpdPCVgw7/o3WDr03QM+IAtatzvaCPPczake --pbdLwmBZB/v8V+6jUajy6jOgdSH0PyffGnt7MWgDETmNC6p/Xigp5eh+C8Fb4NGT --xgHES5PBC+sruWp4u22bJGDKTvYNdZHsnw/CaKQWNsQqwisxa3/8N5v+PCff/pxl --r05pE3PdHn9JrCl4iWdVlgtiI9BoPtQyDfa/OEFaScE8KYR8LxaAgdgp3zYncWls --BpwQ6Y/A2wIkhlD9eEp5Ib2hz7isXOs9UwjdriKqrBXqcIAE5M+YIk3+KAQKxAtd --4YsK3CSJ010uphr12YKqlScj4vuKFjuOtd5RyyMIxUG3lrrhAu2AzCeKCLdVgA8+ --75FrYMApUdvcjp4uzbBoED4XRQlx9kdFHVbYgmE/+yddBYJM8u4YlgAL0hW2/D8p --z9JWIfxVmjJnBnXaKGBuiUyZ864A3PJndP6EMMo7TzS2CDnfCYuJjvI0KvDjFNmc --rQA04+qfMSEz3nmKhbbZu4eYLzlADhfH8tT4GMtXf71WLA5AUHGf2Y4+HIHTsmHG --vQ== -------END CERTIFICATE----- -diff --git a/src/crypto/x509/testdata/test-dir.crt b/src/crypto/x509/testdata/test-dir.crt -deleted file mode 100644 -index b7fc9c5..0000000 ---- a/src/crypto/x509/testdata/test-dir.crt -+++ /dev/null -@@ -1,31 +0,0 @@ -------BEGIN CERTIFICATE----- --MIIFazCCA1OgAwIBAgIJAL8a/lsnspOqMA0GCSqGSIb3DQEBCwUAMEwxCzAJBgNV --BAYTAlVLMRMwEQYDVQQIDApUZXN0LVN0YXRlMRUwEwYDVQQKDAxHb2xhbmcgVGVz --dHMxETAPBgNVBAMMCHRlc3QtZGlyMB4XDTE3MDIwMTIzNTAyN1oXDTI3MDEzMDIz --NTAyN1owTDELMAkGA1UEBhMCVUsxEzARBgNVBAgMClRlc3QtU3RhdGUxFTATBgNV --BAoMDEdvbGFuZyBUZXN0czERMA8GA1UEAwwIdGVzdC1kaXIwggIiMA0GCSqGSIb3 --DQEBAQUAA4ICDwAwggIKAoICAQDzBoi43Yn30KN13PKFHu8LA4UmgCRToTukLItM --WK2Je45grs/axg9n3YJOXC6hmsyrkOnyBcx1xVNgSrOAll7fSjtChRIX72Xrloxu --XewtWVIrijqz6oylbvEmbRT3O8uynu5rF82Pmdiy8oiSfdywjKuPnE0hjV1ZSCql --MYcXqA+f0JFD8kMv4pbtxjGH8f2DkYQz+hHXLrJH4/MEYdVMQXoz/GDzLyOkrXBN --hpMaBBqg1p0P+tRdfLXuliNzA9vbZylzpF1YZ0gvsr0S5Y6LVtv7QIRygRuLY4kF --k+UYuFq8NrV8TykS7FVnO3tf4XcYZ7r2KV5FjYSrJtNNo85BV5c3xMD3fJ2XcOWk --+oD1ATdgAM3aKmSOxNtNItKKxBe1mkqDH41NbWx7xMad78gDznyeT0tjEOltN2bM --uXU1R/jgR/vq5Ec0AhXJyL/ziIcmuV2fSl/ZxT4ARD+16tgPiIx+welTf0v27/JY --adlfkkL5XsPRrbSguISrj7JeaO/gjG3KnDVHcZvYBpDfHqRhCgrosfe26TZcTXx2 --cRxOfvBjMz1zJAg+esuUzSkerreyRhzD7RpeZTwi6sxvx82MhYMbA3w1LtgdABio --9JRqZy3xqsIbNv7N46WO/qXL1UMRKb1UyHeW8g8btboz+B4zv1U0Nj+9qxPBbQui --dgL9LQIDAQABo1AwTjAdBgNVHQ4EFgQUy0/0W8nwQfz2tO6AZ2jPkEiTzvUwHwYD --VR0jBBgwFoAUy0/0W8nwQfz2tO6AZ2jPkEiTzvUwDAYDVR0TBAUwAwEB/zANBgkq --hkiG9w0BAQsFAAOCAgEAvEVnUYsIOt87rggmLPqEueynkuQ+562M8EDHSQl82zbe --xDCxeg3DvPgKb+RvaUdt1362z/szK10SoeMgx6+EQLoV9LiVqXwNqeYfixrhrdw3 --ppAhYYhymdkbUQCEMHypmXP1vPhAz4o8Bs+eES1M+zO6ErBiD7SqkmBElT+GixJC --6epC9ZQFs+dw3lPlbiZSsGE85sqc3VAs0/JgpL/pb1/Eg4s0FUhZD2C2uWdSyZGc --g0/v3aXJCp4j/9VoNhI1WXz3M45nysZIL5OQgXymLqJElQa1pZ3Wa4i/nidvT4AT --Xlxc/qijM8set/nOqp7hVd5J0uG6qdwLRILUddZ6OpXd7ZNi1EXg+Bpc7ehzGsDt --3UFGzYXDjxYnK2frQfjLS8stOQIqSrGthW6x0fdkVx0y8BByvd5J6+JmZl4UZfzA --m99VxXSt4B9x6BvnY7ktzcFDOjtuLc4B/7yg9fv1eQuStA4cHGGAttsCg1X/Kx8W --PvkkeH0UWDZ9vhH9K36703z89da6MWF+bz92B0+4HoOmlVaXRkvblsNaynJnL0LC --Ayry7QBxuh5cMnDdRwJB3AVJIiJ1GVpb7aGvBOnx+s2lwRv9HWtghb+cbwwktx1M --JHyBf3GZNSWTpKY7cD8V+NnBv3UuioOVVo+XAU4LF/bYUjdRpxWADJizNtZrtFo= -------END CERTIFICATE----- -diff --git a/src/net/http/internal/testcert.go b/src/net/http/internal/testcert.go -index 2284a83..a33d06b 100644 ---- a/src/net/http/internal/testcert.go -+++ b/src/net/http/internal/testcert.go -@@ -10,36 +10,9 @@ import "strings" - // "127.0.0.1" and "[::1]", expiring at Jan 29 16:00:00 2084 GMT. - // generated from src/crypto/tls: - // go run generate_cert.go --rsa-bits 1024 --host 127.0.0.1,::1,example.com --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h --var LocalhostCert = []byte(`-----BEGIN CERTIFICATE----- --MIICEzCCAXygAwIBAgIQMIMChMLGrR+QvmQvpwAU6zANBgkqhkiG9w0BAQsFADAS --MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw --MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB --iQKBgQDuLnQAI3mDgey3VBzWnB2L39JUU4txjeVE6myuDqkM/uGlfjb9SjY1bIw4 --iA5sBBZzHi3z0h1YV8QPuxEbi4nW91IJm2gsvvZhIrCHS3l6afab4pZBl2+XsDul --rKBxKKtD1rGxlG4LjncdabFn9gvLZad2bSysqz/qTAUStTvqJQIDAQABo2gwZjAO --BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw --AwEB/zAuBgNVHREEJzAlggtleGFtcGxlLmNvbYcEfwAAAYcQAAAAAAAAAAAAAAAA --AAAAATANBgkqhkiG9w0BAQsFAAOBgQCEcetwO59EWk7WiJsG4x8SY+UIAA+flUI9 --tyC4lNhbcF2Idq9greZwbYCqTTTr2XiRNSMLCOjKyI7ukPoPjo16ocHj+P3vZGfs --h1fIw3cSS2OolhloGw/XM6RWPWtPAlGykKLciQrBru5NAPvCMsb/I1DAceTiotQM --fblo6RBxUQ== -------END CERTIFICATE-----`) -+var LocalhostCert = []byte(``) - - // LocalhostKey is the private key for localhostCert. --var LocalhostKey = []byte(testingKey(`-----BEGIN RSA TESTING KEY----- --MIICXgIBAAKBgQDuLnQAI3mDgey3VBzWnB2L39JUU4txjeVE6myuDqkM/uGlfjb9 --SjY1bIw4iA5sBBZzHi3z0h1YV8QPuxEbi4nW91IJm2gsvvZhIrCHS3l6afab4pZB --l2+XsDulrKBxKKtD1rGxlG4LjncdabFn9gvLZad2bSysqz/qTAUStTvqJQIDAQAB --AoGAGRzwwir7XvBOAy5tM/uV6e+Zf6anZzus1s1Y1ClbjbE6HXbnWWF/wbZGOpet --3Zm4vD6MXc7jpTLryzTQIvVdfQbRc6+MUVeLKwZatTXtdZrhu+Jk7hx0nTPy8Jcb --uJqFk541aEw+mMogY/xEcfbWd6IOkp+4xqjlFLBEDytgbIECQQDvH/E6nk+hgN4H --qzzVtxxr397vWrjrIgPbJpQvBsafG7b0dA4AFjwVbFLmQcj2PprIMmPcQrooz8vp --jy4SHEg1AkEA/v13/5M47K9vCxmb8QeD/asydfsgS5TeuNi8DoUBEmiSJwma7FXY --fFUtxuvL7XvjwjN5B30pNEbc6Iuyt7y4MQJBAIt21su4b3sjXNueLKH85Q+phy2U --fQtuUE9txblTu14q3N7gHRZB4ZMhFYyDy8CKrN2cPg/Fvyt0Xlp/DoCzjA0CQQDU --y2ptGsuSmgUtWj3NM9xuwYPm+Z/F84K6+ARYiZ6PYj013sovGKUFfYAqVXVlxtIX --qyUBnu3X9ps8ZfjLZO7BAkEAlT4R5Yl6cGhaJQYZHOde3JEMhNRcVFMO8dJDaFeo --f9Oeos0UUothgiDktdQHxdNEwLjQf7lJJBzV+5OtwswCWA== -------END RSA TESTING KEY-----`)) -+var LocalhostKey = []byte(testingKey(``)) - - func testingKey(s string) string { return strings.ReplaceAll(s, "TESTING KEY", "PRIVATE KEY") } --- -2.17.1 - diff --git a/fedora.go b/fedora.go new file mode 100644 index 0000000000000000000000000000000000000000..81b28ba3b69ea8e55fd400a0bcf2e7e5fe19f78b --- /dev/null +++ b/fedora.go @@ -0,0 +1,7 @@ +// +build rpm_crashtraceback + +package runtime + +func init() { + setTraceback("crash") +} diff --git a/go1.13.15.src.tar.gz b/go1.14.6.src.tar.gz similarity index 68% rename from go1.13.15.src.tar.gz rename to go1.14.6.src.tar.gz index 2b551e218945996fbd6a6ca5354030983e2d87f2..d2b3c1b3ef626002247330e3818de9af58a1a424 100644 Binary files a/go1.13.15.src.tar.gz and b/go1.14.6.src.tar.gz differ diff --git a/golang-gdbinit b/golang-gdbinit new file mode 100644 index 0000000000000000000000000000000000000000..ecddca6d67c41fa3f5f8e3f1a47b4cedcb4afd3c --- /dev/null +++ b/golang-gdbinit @@ -0,0 +1 @@ +add-auto-load-safe-path /usr/lib/golang/src/runtime/runtime-gdb.py diff --git a/golang.spec b/golang.spec index 0e87dee82da0af8e9caf7cbc2b1d6b880e01b02b..2cd642be89e150a7cdd8fa8536df3e3d76178597 100644 --- a/golang.spec +++ b/golang.spec @@ -1,118 +1,158 @@ +%bcond_with bootstrap +# temporalily ignore test failures +%ifarch %{ix86} aarch64 %{arm} +%bcond_without ignore_tests +%else +%bcond_with ignore_tests +%endif + +# build ids are not currently generated: +# https://code.google.com/p/go/issues/detail?id=5238 +# +# also, debuginfo extraction currently fails with +# "Failed to write file: invalid section alignment" %global debug_package %{nil} + +# we are shipping the full contents of src in the data subpackage, which +# contains binary-like things (ELF data for tests, etc) %global _binaries_in_noarch_packages_terminate_build 0 -%global golibdir %{_libdir}/golang -%global goroot /usr/lib/%{name} -%global go_api 1.13 -%global go_version 1.13 -%global __spec_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot /usr/lib/rpm/brp-compress + +# Do not check any files in doc or src for requires %global __requires_exclude_from ^(%{_datadir}|/usr/lib)/%{name}/(doc|src)/.*$ + +# Don't alter timestamps of especially the .a files (or else go will rebuild later) +# Actually, don't strip at all since we are not even building debug packages and this corrupts the dwarf testdata %global __strip /bin/true + +# rpmbuild magic to keep from having meta dependency on libc.so.6 %define _use_internal_dependency_generator 0 %define __find_requires %{nil} +%global __spec_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot \ + /usr/lib/rpm/brp-compress -%bcond_with bootstrap -%ifarch x86_64 aarch64 -%bcond_without ignore_tests -%else -%bcond_with ignore_tests -%endif +%global golibdir %{_libdir}/golang + +# This macro may not always be defined, ensure it is +%{!?gopath: %global gopath %{_datadir}/gocode} -%ifarch x86_64 aarch64 +# Golang build options. + +# Build golang using external/internal(close to cgo disabled) linking. +%ifarch %{ix86} x86_64 ppc64le %{arm} aarch64 s390x %global external_linker 1 %else %global external_linker 0 %endif -%ifarch x86_64 aarch64 +# Build golang with cgo enabled/disabled(later equals more or less to internal linking). +%ifarch %{ix86} x86_64 ppc64le %{arm} aarch64 s390x %global cgo_enabled 1 %else %global cgo_enabled 0 %endif +# Use golang/gcc-go as bootstrap compiler %if %{with bootstrap} %global golang_bootstrap 0 %else %global golang_bootstrap 1 %endif +# Controls what ever we fail on failed tests %if %{with ignore_tests} %global fail_on_tests 0 %else %global fail_on_tests 1 %endif -%ifarch x86_64 aarch64 +# Build golang shared objects for stdlib +%ifarch %{ix86} x86_64 ppc64le %{arm} aarch64 %global shared 1 %else %global shared 0 %endif +# Pre build std lib with -race enabled %ifarch x86_64 %global race 1 %else %global race 0 %endif +# Fedora GOROOT +%global goroot /usr/lib/%{name} + %ifarch x86_64 -%global gohostarch amd64 +%global gohostarch amd64 +%endif +%ifarch %{ix86} +%global gohostarch 386 +%endif +%ifarch %{arm} +%global gohostarch arm %endif %ifarch aarch64 -%global gohostarch arm64 +%global gohostarch arm64 +%endif +%ifarch ppc64 +%global gohostarch ppc64 +%endif +%ifarch ppc64le +%global gohostarch ppc64le +%endif +%ifarch s390x +%global gohostarch s390x %endif +%global go_api 1.14 +%global go_version 1.14.6 + Name: golang -Version: 1.13.15 -Release: 1 +Version: 1.14.6 +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 -URL: https://golang.org/ -Source0: https://dl.google.com/go/go1.13.15.src.tar.gz +URL: http://golang.org/ +Source0: https://storage.googleapis.com/golang/go%{go_version}.src.tar.gz +# make possible to override default traceback level at build time by setting build tag rpm_crashtraceback +Source1: fedora.go +# The compiler is written in Go. Needs go(1.4+) compiler for build. %if !%{golang_bootstrap} BuildRequires: gcc-go >= 5 %else BuildRequires: golang > 1.4 %endif +%if 0%{?rhel} > 6 || 0%{?fedora} > 0 BuildRequires: hostname +%else +BuildRequires: net-tools +%endif # for tests BuildRequires: pcre-devel, glibc-static, perl-interpreter, procps-ng Provides: go = %{version}-%{release} -Requires: %{name}-devel = %{version}-%{release} - -Obsoletes: %{name}-pkg-bin-linux-386 < 1.4.99 -Obsoletes: %{name}-pkg-bin-linux-amd64 < 1.4.99 -Obsoletes: %{name}-pkg-bin-linux-arm < 1.4.99 -Obsoletes: %{name}-pkg-linux-386 < 1.4.99 -Obsoletes: %{name}-pkg-linux-amd64 < 1.4.99 -Obsoletes: %{name}-pkg-linux-arm < 1.4.99 -Obsoletes: %{name}-vet < 0-12.1 -Obsoletes: %{name}-cover < 0-12.1 -Requires(post): %{_sbindir}/update-alternatives -Requires(postun): %{_sbindir}/update-alternatives -Requires: glibc gcc git subversion - - -# generated by: +# 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/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/hkdf)) Provides: bundled(golang(golang.org/x/crypto/internal/chacha20)) +Provides: bundled(golang(golang.org/x/crypto/internal/subtle)) 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/nettest)) -Provides: bundled(golang(golang.org/x/text/secure)) +Provides: bundled(golang(golang.org/x/sys/cpu)) 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/driver)) @@ -122,10 +162,10 @@ 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/internal/transport)) Provides: bundled(golang(github.com/google/pprof/profile)) Provides: bundled(golang(github.com/google/pprof/third.party/d3)) Provides: bundled(golang(github.com/google/pprof/third.party/d3flamegraph)) @@ -138,59 +178,146 @@ 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)) - -Provides: %{name}-bin = %{version}-%{release} -Obsoletes: %{name}-bin -Obsoletes: %{name}-shared -Obsoletes: %{name}-docs +Provides: bundled(golang(golang.org/x/tools/go/analysis)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/internal/analysisflags)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/internal/facts)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/asmdecl)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/assign)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/atomic)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/bools)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/buildtag)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/cgocall)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/composite)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/copylock)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/ctrlflow)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/errorsas)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/httpresponse)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/inspect)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/internal/analysisutil)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/loopclosure)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/lostcancel)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/nilfunc)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/printf)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/shift)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/stdmethods)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/structtag)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/tests)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/unmarshal)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/unreachable)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/unsafeptr)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/passes/unusedresult)) +Provides: bundled(golang(golang.org/x/tools/go/analysis/unitchecker)) +Provides: bundled(golang(golang.org/x/tools/go/ast/astutil)) +Provides: bundled(golang(golang.org/x/tools/go/ast/inspector)) +Provides: bundled(golang(golang.org/x/tools/go/cfg)) +Provides: bundled(golang(golang.org/x/tools/go/types/objectpath)) +Provides: bundled(golang(golang.org/x/tools/go/types/typeutil)) + +Requires: %{name}-bin = %{version}-%{release} +Requires: %{name}-src = %{version}-%{release} +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-disable-Google-s-proxy-and-sumdb.patch + +# Having documentation separate was broken +Obsoletes: %{name}-docs < 1.1-4 + +# RPM can't handle symlink -> dir with subpackages, so merge back Obsoletes: %{name}-data < 1.1.1-4 + +# go1.4 deprecates a few packages Obsoletes: %{name}-vim < 1.4 Obsoletes: emacs-%{name} < 1.4 -Requires: openEuler-rpm-config - -Patch6002: 0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch -Patch6003: 0003-golang-delete-pem-files.patch -Patch6004: 0004-syscall-implement-rawVforkSyscall-for-linux-arm64.patch -Patch6005: 0005-runtime-fix-crash-during-VDSO-calls-on-arm.patch -Patch6006: 0006-runtime-save-fetch-g-register-during-VDSO-on-ARM-and.patch -Patch6007: 0007-runtime-don-t-fetch-G-from-signal-stack-when-using-c.patch -Patch6008: 0008-runtime-don-t-save-G-during-VDSO-if-we-re-handling-s.patch -Patch6014: 0013-drop-hard-code-cert.patch +# These are the only RHEL/Fedora architectures that we compile this package for ExclusiveArch: %{golang_arches} +Source100: golang-gdbinit %description %{summary}. -%package help -Summary: Golang compiler helps and manual docs +%package docs +Summary: Golang compiler docs Requires: %{name} = %{version}-%{release} BuildArch: noarch -Provides: %{name}-docs = %{version}-%{release} -Obsoletes: %{name}-docs -Provides: %{name}-shared = %{version}-%{release} -Obsoletes: %{name}-shared +Obsoletes: %{name}-docs < 1.1-4 -%description help +%description docs %{summary}. -%package devel -Summary: Golang compiler devel +%package misc +Summary: Golang compiler miscellaneous sources +Requires: %{name} = %{version}-%{release} BuildArch: noarch + +%description misc +%{summary}. + +%package tests +Summary: Golang compiler tests for stdlib Requires: %{name} = %{version}-%{release} -Provides: %{name}-src = %{version}-%{release} -Obsoletes: %{name}-src -Provides: %{name}-tests = %{version}-%{release} -Obsoletes: %{name}-tests -Provides: %{name}-misc = %{version}-%{release} -Obsoletes: %{name}-misc -Obsoletes: %{name}-race = %{version}-%{release} - -%description devel +BuildArch: noarch + +%description tests %{summary}. +%package src +Summary: Golang compiler source tree +BuildArch: noarch +%description src +%{summary} + +%package bin +Summary: Golang core compiler tools +# Some distributions refer to this package by this name +Provides: %{name}-go = %{version}-%{release} +Requires: go = %{version}-%{release} +# Pre-go1.5, all arches had to be bootstrapped individually, before usable, and +# env variables to compile for the target os-arch. +# Now the host compiler needs only the GOOS and GOARCH environment variables +# set to compile for the target os-arch. +Obsoletes: %{name}-pkg-bin-linux-386 < 1.4.99 +Obsoletes: %{name}-pkg-bin-linux-amd64 < 1.4.99 +Obsoletes: %{name}-pkg-bin-linux-arm < 1.4.99 +Obsoletes: %{name}-pkg-linux-386 < 1.4.99 +Obsoletes: %{name}-pkg-linux-amd64 < 1.4.99 +Obsoletes: %{name}-pkg-linux-arm < 1.4.99 +Obsoletes: %{name}-pkg-darwin-386 < 1.4.99 +Obsoletes: %{name}-pkg-darwin-amd64 < 1.4.99 +Obsoletes: %{name}-pkg-windows-386 < 1.4.99 +Obsoletes: %{name}-pkg-windows-amd64 < 1.4.99 +Obsoletes: %{name}-pkg-plan9-386 < 1.4.99 +Obsoletes: %{name}-pkg-plan9-amd64 < 1.4.99 +Obsoletes: %{name}-pkg-freebsd-386 < 1.4.99 +Obsoletes: %{name}-pkg-freebsd-amd64 < 1.4.99 +Obsoletes: %{name}-pkg-freebsd-arm < 1.4.99 +Obsoletes: %{name}-pkg-netbsd-386 < 1.4.99 +Obsoletes: %{name}-pkg-netbsd-amd64 < 1.4.99 +Obsoletes: %{name}-pkg-netbsd-arm < 1.4.99 +Obsoletes: %{name}-pkg-openbsd-386 < 1.4.99 +Obsoletes: %{name}-pkg-openbsd-amd64 < 1.4.99 + +Obsoletes: golang-vet < 0-12.1 +Obsoletes: golang-cover < 0-12.1 + +Requires(post): %{_sbindir}/update-alternatives +Requires(preun): %{_sbindir}/update-alternatives + +# We strip the meta dependency, but go does require glibc. +# This is an odd issue, still looking for a better fix. +Requires: glibc +Requires: gcc +%if 0%{?rhel} && 0%{?rhel} < 8 +Requires: git, subversion, mercurial +%else +Recommends: git, subversion, mercurial +%endif +%description bin +%{summary} + # Workaround old RPM bug of symlink-replaced-with-dir failure %pretrans -p for _,d in pairs({"api", "doc", "include", "lib", "src"}) do @@ -201,25 +328,50 @@ for _,d in pairs({"api", "doc", "include", "lib", "src"}) do end end +%if %{shared} +%package shared +Summary: Golang shared object libraries + +%description shared +%{summary}. +%endif + +%if %{race} +%package race +Summary: Golang std library with -race enabled + +Requires: %{name} = %{version}-%{release} + +%description race +%{summary} +%endif + %prep -%autosetup -n go -p1 +%autosetup -p1 -n go + +cp %{SOURCE1} ./src/runtime/ %build +# print out system information uname -a cat /proc/cpuinfo cat /proc/meminfo +# bootstrap compiler GOROOT %if !%{golang_bootstrap} export GOROOT_BOOTSTRAP=/ %else export GOROOT_BOOTSTRAP=%{goroot} %endif +# set up final install location export GOROOT_FINAL=%{goroot} + export GOHOSTOS=linux export GOHOSTARCH=%{gohostarch} pushd src +# use our gcc options for this build, but store gcc as default for compiler export CFLAGS="$RPM_OPT_FLAGS" export LDFLAGS="$RPM_LD_FLAGS" export CC="gcc" @@ -232,14 +384,10 @@ export GO_LDFLAGS="-linkmode internal" %if !%{cgo_enabled} export CGO_ENABLED=0 %endif - -%ifarch aarch64 -export GO_LDFLAGS="-s -w" -%endif - ./make.bash --no-clean -v popd +# build shared std lib %if %{shared} GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -buildmode=shared -v -x std %endif @@ -249,20 +397,24 @@ GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -race -v -x std %endif %install -rm -rf %{buildroot} +rm -rf $RPM_BUILD_ROOT +# remove GC build cache rm -rf pkg/obj/go-build/* -mkdir -p %{buildroot}%{_bindir} -mkdir -p %{buildroot}%{goroot} +# create the top level directories +mkdir -p $RPM_BUILD_ROOT%{_bindir} +mkdir -p $RPM_BUILD_ROOT%{goroot} +# install everything into libdir (until symlink problems are fixed) +# https://code.google.com/p/go/issues/detail?id=5830 cp -apv api bin doc favicon.ico lib pkg robots.txt src misc test VERSION \ - %{buildroot}%{goroot} + $RPM_BUILD_ROOT%{goroot} # bz1099206 -find %{buildroot}%{goroot}/src -exec touch -r %{buildroot}%{goroot}/VERSION "{}" \; +find $RPM_BUILD_ROOT%{goroot}/src -exec touch -r $RPM_BUILD_ROOT%{goroot}/VERSION "{}" \; # and level out all the built archives -touch %{buildroot}%{goroot}/pkg -find %{buildroot}%{goroot}/pkg -exec touch -r %{buildroot}%{goroot}/pkg "{}" \; +touch $RPM_BUILD_ROOT%{goroot}/pkg +find $RPM_BUILD_ROOT%{goroot}/pkg -exec touch -r $RPM_BUILD_ROOT%{goroot}/pkg "{}" \; # generate the spec file ownership of this source tree and packages cwd=$(pwd) src_list=$cwd/go-src.list @@ -274,7 +426,7 @@ docs_list=$cwd/go-docs.list tests_list=$cwd/go-tests.list rm -f $src_list $pkg_list $docs_list $misc_list $tests_list $shared_list $race_list touch $src_list $pkg_list $docs_list $misc_list $tests_list $shared_list $race_list -pushd %{buildroot}%{goroot} +pushd $RPM_BUILD_ROOT%{goroot} find src/ -type d -a \( ! -name testdata -a ! -ipath '*/testdata/*' \) -printf '%%%dir %{goroot}/%p\n' >> $src_list find src/ ! -type d -a \( ! -ipath '*/testdata/*' -a ! -name '*_test.go' \) -printf '%{goroot}/%p\n' >> $src_list @@ -300,8 +452,8 @@ pushd %{buildroot}%{goroot} echo "%%{golibdir}/$(basename $file)" >> $shared_list done - find pkg/*_dynlink/ -type d -printf '%%%dir %{goroot}/%p\n' >> $shared_list - find pkg/*_dynlink/ ! -type d -printf '%{goroot}/%p\n' >> $shared_list + find pkg/*_dynlink/ -type d -printf '%%%dir %{goroot}/%p\n' >> $shared_list + find pkg/*_dynlink/ ! -type d -printf '%{goroot}/%p\n' >> $shared_list %endif %if %{race} @@ -320,62 +472,65 @@ pushd %{buildroot}%{goroot} find lib/ ! -type d -printf '%{goroot}/%p\n' >> $tests_list popd -rm -rfv %{buildroot}%{goroot}/doc/Makefile +# remove the doc Makefile +rm -rfv $RPM_BUILD_ROOT%{goroot}/doc/Makefile -mkdir -p %{buildroot}%{goroot}/bin/linux_%{gohostarch} -ln -sf %{goroot}/bin/go %{buildroot}%{goroot}/bin/linux_%{gohostarch}/go -ln -sf %{goroot}/bin/gofmt %{buildroot}%{goroot}/bin/linux_%{gohostarch}/gofmt +# put binaries to bindir, linked to the arch we're building, +# leave the arch independent pieces in {goroot} +mkdir -p $RPM_BUILD_ROOT%{goroot}/bin/linux_%{gohostarch} +ln -sf %{goroot}/bin/go $RPM_BUILD_ROOT%{goroot}/bin/linux_%{gohostarch}/go +ln -sf %{goroot}/bin/gofmt $RPM_BUILD_ROOT%{goroot}/bin/linux_%{gohostarch}/gofmt -mkdir -p %{buildroot}%{gopath}/src/github.com -mkdir -p %{buildroot}%{gopath}/src/bitbucket.org -mkdir -p %{buildroot}%{gopath}/src/code.google.com/p -mkdir -p %{buildroot}%{gopath}/src/golang.org/x +# ensure these exist and are owned +mkdir -p $RPM_BUILD_ROOT%{gopath}/src/github.com +mkdir -p $RPM_BUILD_ROOT%{gopath}/src/bitbucket.org +mkdir -p $RPM_BUILD_ROOT%{gopath}/src/code.google.com/p +mkdir -p $RPM_BUILD_ROOT%{gopath}/src/golang.org/x -%check -export GOROOT=$(pwd -P) -export PATH="$GOROOT"/bin:"$PATH" -cd src +# make sure these files exist and point to alternatives +rm -f $RPM_BUILD_ROOT%{_bindir}/go +ln -sf /etc/alternatives/go $RPM_BUILD_ROOT%{_bindir}/go +rm -f $RPM_BUILD_ROOT%{_bindir}/gofmt +ln -sf /etc/alternatives/gofmt $RPM_BUILD_ROOT%{_bindir}/gofmt -export CC="gcc" -export CFLAGS="$RPM_OPT_FLAGS" -export LDFLAGS="$RPM_LD_FLAGS" -%if !%{external_linker} -export GO_LDFLAGS="-linkmode internal" -%endif -%if !%{cgo_enabled} || !%{external_linker} -export CGO_ENABLED=0 -%endif +# gdbinit +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d +cp -av %{SOURCE100} $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d/golang.gdb -export GO_TEST_TIMEOUT_SCALE=2 +# workaround for https://github.com/golang/go/issues/39466 until it gests fixed +# Commented until the patch is ready, this work around suggested in the link avobe +# doesn't work properly +#export CGO_CFLAGS="-mno-outline-atomics" -%if %{fail_on_tests} -echo tests ignored -%else -./run.bash --no-rebuild -v -v -v -k || : -%endif cd .. -%post + +%post bin %{_sbindir}/update-alternatives --install %{_bindir}/go \ go %{goroot}/bin/go 90 \ --slave %{_bindir}/gofmt gofmt %{goroot}/bin/gofmt -%preun +%preun bin if [ $1 = 0 ]; then %{_sbindir}/update-alternatives --remove go %{goroot}/bin/go fi -%files -f go-pkg.list -%doc AUTHORS CONTRIBUTORS LICENSE PATENTS + +%files +%license LICENSE PATENTS +%doc AUTHORS CONTRIBUTORS +# VERSION has to be present in the GOROOT, for `go install std` to work %doc %{goroot}/VERSION %dir %{goroot}/doc -%doc %{goroot}/doc/* + +# go files %dir %{goroot} -%exclude %{goroot}/src/ -%exclude %{goroot}/doc/ -%exclude %{goroot}/misc/ -%exclude %{goroot}/test/ -%{goroot}/* +%{goroot}/api/ +%{goroot}/lib/time/ +%{goroot}/favicon.ico +%{goroot}/robots.txt + +# ensure directory ownership, so they are cleaned up if empty %dir %{gopath} %dir %{gopath}/src %dir %{gopath}/src/github.com/ @@ -385,37 +540,689 @@ fi %dir %{gopath}/src/golang.org %dir %{gopath}/src/golang.org/x -%files help -f go-docs.list -f go-shared.list -%files devel -f go-tests.list -f go-misc.list -f go-src.list +# gdbinit (for gdb debugging) +%{_sysconfdir}/gdbinit.d + +%files src -f go-src.list + +%files docs -f go-docs.list + +%files misc -f go-misc.list + +%files tests -f go-tests.list + +%files bin -f go-pkg.list +%{_bindir}/go +%{_bindir}/gofmt +%{goroot}/bin/linux_%{gohostarch}/go +%{goroot}/bin/linux_%{gohostarch}/gofmt + +%if %{shared} +%files shared -f go-shared.list +%endif + +%if %{race} +%files race -f go-race.list +%endif %changelog -* Tue Aug 18 xiadanni - 1.13.15-1 -- upgrade to 1.13.15 +* Mon Jul 20 2020 Jakub Čajka - 1.14.6-1 +- Rebase to go1.14.6 +- Security fix for CVE-2020-14040 and CVE-2020-15586 +- Resolves: BZ#1842708, BZ#1856957, BZ#1853653 + +* Tue Jun 30 2020 Alejandro Sáez - 1.14.4-1 +- Rebase to go1.14.4 +- Add patch that fixes: https://golang.org/issue/39991 +- Related: BZ#1842708 + +* Mon May 18 2020 Álex Sáez - 1.14.3-1 +- Rebase to go1.14.3 +- Resolves: BZ#1836015 + +* Mon Apr 20 2020 Jakub Čajka - 1.14.2-1 +- Rebase to go1.14.2 +- Resolves: BZ#1815282 + +* Wed Feb 26 2020 Jakub Čajka - 1.14-1 +- Rebase to go1.14 proper +- Resolves: BZ#1792475 + +* Thu Feb 06 2020 Jakub Čajka - 1.14-0.rc1.0 +- Rebase to go1.14.rc1 +- Related: BZ#1792475 + +* Tue Jan 28 2020 Fedora Release Engineering - 1.14-0.beta1.0.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Jan 20 2020 Jakub Čajka - 1.14-0.beta1.0 +- Rebase to go1.14beta1 +- Resolves: BZ#1792475 + +* Mon Jan 13 2020 Jakub Čajka - 1.13.6-1 +- Rebase to go1.13.6 + +* Thu Dec 05 2019 Jakub Čajka - 1.13.5-1 +- Rebase to go1.13.5 + +* Tue Nov 26 2019 Neal Gompa - 1.13.4-2 +- Small fixes to the spec and tighten up the file list + +* Fri Nov 01 2019 Jakub Čajka - 1.13.4-1 +- Rebase to go1.13.4 +- Resolves BZ#1767673 + +* Sat Oct 19 2019 Jakub Čajka - 1.13.3-1 +- Rebase to go1.13.3 +- Fix for CVE-2019-17596 +- Resolves: BZ#1755639, BZ#1763312 + +* Fri Sep 27 2019 Jakub Čajka - 1.13.1-1 +- Rebase to go1.13.1 +- Fix for CVE-2019-16276 +- Resolves: BZ#1755970 + +* Thu Sep 05 2019 Jakub Čajka - 1.13-2 +- Back to go1.13 tls1.3 behavior + +* Wed Sep 04 2019 Jakub Čajka - 1.13-1 +- Rebase to go1.13 + +* Fri Aug 30 2019 Jakub Čajka - 1.13-0.rc2.1 +- Rebase to go1.13rc2 +- Do not enable tls1.3 by default +- Related: BZ#1737471 + +* Wed Aug 28 2019 Jakub Čajka - 1.13-0.rc1.2 +- Actually fix CVE-2019-9514 and CVE-2019-9512 +- Related: BZ#1741816, BZ#1741827 + +* Mon Aug 26 2019 Jakub Čajka - 1.13-0.rc1.1 +- Rebase to 1.13rc1 +- Fix for CVE-2019-14809, CVE-2019-9514 and CVE-2019-9512 +- Resolves: BZ#1741816, BZ#1741827 and BZ#1743131 + +* Thu Aug 01 2019 Jakub Čajka - 1.13-0.beta1.2.2 +- Fix ICE affecting aarch64 +- Resolves: BZ#1735290 + +* Thu Jul 25 2019 Fedora Release Engineering - 1.13-0.beta1.2.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Jul 24 2019 Jakub Čajka - 1.13-0.beta1.2 +- De-configure sumdb and go proxy + +* Wed Jul 24 2019 Jakub Čajka - 1.13-0.beta1.1 +- Rebase to 1.13beta1 +- Related: BZ#1732118 + +* Tue Jul 09 2019 Jakub Čajka - 1.12.7-1 +- Rebase to 1.12.7 +- Resolves: BZ#1728056 + +* Wed Jun 12 2019 Jakub Čajka - 1.12.6-1 +- Rebase to 1.12.6 +- Resolves: BZ#1719483 + +* Tue May 07 2019 Jakub Čajka - 1.12.5-1 +- Rebase to 1.12.5 +- Resolves: BZ#1707187 + +* Mon Apr 08 2019 Jakub Čajka - 1.12.2-1 +- Rebase to 1.12.2 +- Resolves: BZ#1688996 + +* Mon Apr 01 2019 Jakub Čajka - 1.12.1-2 +- Fix up change log, respective CVE has been fixed in go1.12rc1 + +* Fri Mar 15 2019 Jakub Čajka - 1.12.1-1 +- Rebase to 1.12.1 +- Fix requirement for %%preun (instead of %%postun) scriptlet thanks to Tim Landscheidt +- Use weak deps for SCM deps + +* Wed Feb 27 2019 Jakub Čajka - 1.12-1 +- Rebase to go1.12 proper +- Resolves: BZ#1680040 + +* Mon Feb 18 2019 Jakub Čajka - 1.12-0.rc1.1 +- Rebase to go1.12rc1 + +* Thu Jan 31 2019 Fedora Release Engineering - 1.12-0.beta2.2.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sun Jan 27 2019 Jakub Čajka - 1.12-0.beta2.2 +- Fix for CVE-2019-6486 +- Resolves: BZ#1668973 + +* Fri Jan 11 2019 Jakub Čajka - 1.12-0.beta2.1 +- Rebase to go1.12beta2 + +* Wed Jan 02 2019 Jakub Čajka - 1.11.4-1 +- Rebase to go1.11.4 +- Fix for CVE-2018-16875, CVE-2018-16874 and CVE-2018-16873 +- Resolves: BZ#1659290, BZ#1659289, BZ#1659288 + +* Mon Nov 05 2018 Jakub Čajka - 1.11.2-1 +- Rebase to go1.11.2 + +* 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 + +* 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 + +* 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 +- Resolves: BZ#1607270 +- Related: BZ#1602096 + +* 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 + +* 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 + +* 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 + +* 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 + +* 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 +- 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 + +* 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 + +* 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 + +* Thu Oct 26 2017 Jakub Čajka - 1.9.2-1 +- Rebase to 1.9.2 +- execute correctly pie tests +- allow to ignore tests via bcond +- reduce size of golang package + +* Fri Oct 06 2017 Jakub Čajka - 1.9.1-1 +- fix CVE-2017-15041 and CVE-2017-15042 + +* Fri Sep 15 2017 Jakub Čajka - 1.9-1 +- bump to the relased version + +* Wed Aug 02 2017 Fedora Release Engineering - 1.9-0.beta2.1.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.9-0.beta2.1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue Jul 11 2017 Jakub Čajka - 1.9-0.beta2.1 +- bump to beta2 + +* Thu May 25 2017 Jakub Čajka - 1.8.3-1 +- bump to 1.8.3 +- fix for CVE-2017-8932 +- make possible to use 31bit OID in ASN1 +- Resolves: BZ#1454978, BZ#1455191 + +* Fri Apr 21 2017 Jakub Čajka - 1.8.1-2 +- fix uint64 constant codegen on s390x +- Resolves: BZ#1441078 + +* Tue Apr 11 2017 Jakub Čajka - 1.8.1-1 +- bump to Go 1.8.1 +- Resolves: BZ#1440345 + +* Fri Feb 24 2017 Jakub Čajka - 1.8-2 +- avoid possibly stale packages due to chacha test file not being test file + +* Fri Feb 17 2017 Jakub Čajka - 1.8-1 +- bump to released version +- Resolves: BZ#1423637 +- Related: BZ#1411242 + +* Fri Feb 10 2017 Fedora Release Engineering - 1.8-0.rc3.2.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Jan 27 2017 Jakub Čajka - 1.8-0.rc3.2 +- make possible to override default traceback level at build time +- add sub-package race containing std lib built with -race enabled +- Related: BZ#1411242 + +* Fri Jan 27 2017 Jakub Čajka - 1.8-0.rc3.1 +- rebase to go1.8rc3 +- Resolves: BZ#1411242 + +* Fri Jan 20 2017 Jakub Čajka - 1.7.4-2 +- Resolves: BZ#1404679 +- expose IfInfomsg.X__ifi_pad on s390x + +* Fri Dec 02 2016 Jakub Čajka - 1.7.4-1 +- Bump to 1.7.4 +- Resolves: BZ#1400732 + +* Thu Nov 17 2016 Tom Callaway - 1.7.3-2 +- re-enable the NIST P-224 curve + +* Thu Oct 20 2016 Jakub Čajka - 1.7.3-1 +- Resolves: BZ#1387067 - golang-1.7.3 is available +- added fix for tests failing with latest tzdata + +* Fri Sep 23 2016 Jakub Čajka - 1.7.1-2 +- fix link failure due to relocation overflows on PPC64X + +* Thu Sep 08 2016 Jakub Čajka - 1.7.1-1 +- rebase to 1.7.1 +- Resolves: BZ#1374103 + +* Tue Aug 23 2016 Jakub Čajka - 1.7-1 +- update to released version +- related: BZ#1342090, BZ#1357394 + +* Mon Aug 08 2016 Jakub Čajka - 1.7-0.3.rc5 +- Obsolete golang-vet and golang-cover from golang-googlecode-tools package + vet/cover binaries are provided by golang-bin rpm (thanks to jchaloup) +- clean up exclusive arch after s390x boostrap +- resolves: #1268206 + +* Wed Aug 03 2016 Jakub Čajka - 1.7-0.2.rc5 +- rebase to go1.7rc5 +- Resolves: BZ#1342090 + +* Thu Jul 21 2016 Fedora Release Engineering - 1.7-0.1.rc2 +- https://fedoraproject.org/wiki/Changes/golang1.7 + +* Tue Jul 19 2016 Jakub Čajka - 1.7-0.0.rc2 +- rebase to 1.7rc2 +- added s390x build +- improved shared lib packaging +- Resolves: bz1357602 - CVE-2016-5386 +- Resolves: bz1342090, bz1342090 + +* Tue Apr 26 2016 Jakub Čajka - 1.6.2-1 +- rebase to 1.6.2 +- Resolves: bz1329206 - golang-1.6.2.src is available + +* Wed Apr 13 2016 Jakub Čajka - 1.6.1-1 +- rebase to 1.6.1 +- Resolves: bz1324344 - CVE-2016-3959 +- Resolves: bz1324951 - prelink is gone, /etc/prelink.conf.d/* is no longer used +- Resolves: bz1326366 - wrong epoll_event struct for ppc64le/ppc64 + +* Mon Feb 22 2016 Jakub Čajka - 1.6-1 +- Resolves: bz1304701 - rebase to go1.6 release +- Resolves: bz1304591 - fix possible stack miss-alignment in callCgoMmap + +* Wed Feb 03 2016 Fedora Release Engineering - 1.6-0.3.rc1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jan 29 2016 Jakub Čajka - 1.6-0.2.rc1 +- disabled cgo and external linking on ppc64 + +* Thu Jan 28 2016 Jakub Čajka - 1.6-0.1.rc1 +- Resolves bz1292640, rebase to pre-release 1.6 +- bootstrap for PowerPC +- fix rpmlint errors/warning + +* Thu Jan 14 2016 Jakub Čajka - 1.5.3-1 +- rebase to 1.5.3 +- resolves bz1293451, CVE-2015-8618 +- apply timezone patch, avoid using bundled data +- print out rpm build system info + +* Fri Dec 11 2015 Jakub Čajka - 1.5.2-2 +- bz1290543 Accept x509 certs with negative serial + +* Tue Dec 08 2015 Jakub Čajka - 1.5.2-1 +- bz1288263 rebase to 1.5.2 +- spec file clean up +- added build options +- scrubbed "Project Gutenberg License" + +* Mon Oct 19 2015 Vincent Batts - 1.5.1-1 +- bz1271709 include patch from upstream fix + +* Wed Sep 09 2015 Vincent Batts - 1.5.1-0 +- update to go1.5.1 + +* Fri Sep 04 2015 Vincent Batts - 1.5-8 +- bz1258166 remove srpm macros, for go-srpm-macros + +* Thu Sep 03 2015 Vincent Batts - 1.5-7 +- bz1258166 remove srpm macros, for go-srpm-macros + +* Thu Aug 27 2015 Vincent Batts - 1.5-6 +- starting a shared object subpackage. This will be x86_64 only until upstream supports more arches shared objects. + +* Thu Aug 27 2015 Vincent Batts - 1.5-5 +- bz991759 gdb path fix + +* Wed Aug 26 2015 Vincent Batts - 1.5-4 +- disable shared object until linux/386 is ironned out +- including the test/ directory for tests + +* Tue Aug 25 2015 Vincent Batts - 1.5-3 +- bz1256910 only allow the golang zoneinfo.zip to be used in tests +- bz1166611 add golang.org/x directory +- bz1256525 include stdlib shared object. This will let other libraries and binaries + build with `go build -buildmode=shared -linkshared ...` or similar. + +* Sun Aug 23 2015 Peter Robinson 1.5-2 +- Enable aarch64 +- Minor cleanups + +* Thu Aug 20 2015 Vincent Batts - 1.5-1 +- updating to go1.5 + +* Thu Aug 06 2015 Vincent Batts - 1.5-0.11.rc1 +- fixing the sources reference + +* Thu Aug 06 2015 Vincent Batts - 1.5-0.10.rc1 +- updating to go1.5rc1 +- checks are back in place + +* Tue Aug 04 2015 Vincent Batts - 1.5-0.9.beta3 +- pull in upstream archive/tar fix + +* Thu Jul 30 2015 Vincent Batts - 1.5-0.8.beta3 +- updating to go1.5beta3 + +* Thu Jul 30 2015 Vincent Batts - 1.5-0.7.beta2 +- add the patch .. + +* Thu Jul 30 2015 Vincent Batts - 1.5-0.6.beta2 +- increase ELFRESERVE (bz1248071) + +* Tue Jul 28 2015 Lokesh Mandvekar - 1.5-0.5.beta2 +- correct package version and release tags as per naming guidelines + +* Fri Jul 17 2015 Vincent Batts - 1.4.99-4.1.5beta2 +- adding test output, for visibility + +* Fri Jul 10 2015 Vincent Batts - 1.4.99-3.1.5beta2 +- updating to go1.5beta2 + +* Fri Jul 10 2015 Vincent Batts - 1.4.99-2.1.5beta1 +- add checksum to sources and fixed one patch + +* Fri Jul 10 2015 Vincent Batts - 1.4.99-1.1.5beta1 +- updating to go1.5beta1 + +* Wed Jun 17 2015 Fedora Release Engineering - 1.4.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Mar 18 2015 Vincent Batts - 1.4.2-2 +- obsoleting deprecated packages + +* Wed Feb 18 2015 Vincent Batts - 1.4.2-1 +- updating to go1.4.2 + +* Fri Jan 16 2015 Vincent Batts - 1.4.1-1 +- updating to go1.4.1 + +* Fri Jan 02 2015 Vincent Batts - 1.4-2 +- doc organizing + +* Thu Dec 11 2014 Vincent Batts - 1.4-1 +- update to go1.4 release + +* Wed Dec 03 2014 Vincent Batts - 1.3.99-3.1.4rc2 +- update to go1.4rc2 + +* Mon Nov 17 2014 Vincent Batts - 1.3.99-2.1.4rc1 +- update to go1.4rc1 + +* Thu Oct 30 2014 Vincent Batts - 1.3.99-1.1.4beta1 +- update to go1.4beta1 + +* Thu Oct 30 2014 Vincent Batts - 1.3.3-3 +- macros will need to be in their own rpm + +* Fri Oct 24 2014 Vincent Batts - 1.3.3-2 +- split out rpm macros (bz1156129) +- progress on gccgo accomodation + +* Wed Oct 01 2014 Vincent Batts - 1.3.3-1 +- update to go1.3.3 (bz1146882) + +* Mon Sep 29 2014 Vincent Batts - 1.3.2-1 +- update to go1.3.2 (bz1147324) + +* Thu Sep 11 2014 Vincent Batts - 1.3.1-3 +- patching the tzinfo failure + +* Sat Aug 16 2014 Fedora Release Engineering - 1.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Wed Aug 13 2014 Vincent Batts - 1.3.1-1 +- update to go1.3.1 + +* Wed Aug 13 2014 Vincent Batts - 1.3-11 +- merged a line wrong + +* Wed Aug 13 2014 Vincent Batts - 1.3-10 +- more work to get cgo.a timestamps to line up, due to build-env +- explicitly list all the files and directories for the source and packages trees +- touch all the built archives to be the same + +* Mon Aug 11 2014 Vincent Batts - 1.3-9 +- make golang-src 'noarch' again, since that was not a fix, and takes up more space + +* Mon Aug 11 2014 Vincent Batts - 1.3-8 +- update timestamps of source files during %%install bz1099206 + +* Fri Aug 08 2014 Vincent Batts - 1.3-7 +- update timestamps of source during %%install bz1099206 + +* Wed Aug 06 2014 Vincent Batts - 1.3-6 +- make the source subpackage arch'ed, instead of noarch + +* Mon Jul 21 2014 Vincent Batts - 1.3-5 +- fix the writing of pax headers + +* Tue Jul 15 2014 Vincent Batts - 1.3-4 +- fix the loading of gdb safe-path. bz981356 + +* Tue Jul 08 2014 Vincent Batts - 1.3-3 +- `go install std` requires gcc, to build cgo. bz1105901, bz1101508 + +* Mon Jul 07 2014 Vincent Batts - 1.3-2 +- archive/tar memory allocation improvements + +* Thu Jun 19 2014 Vincent Batts - 1.3-1 +- update to go1.3 + +* Fri Jun 13 2014 Vincent Batts - 1.3rc2-1 +- update to go1.3rc2 + +* Sat Jun 07 2014 Fedora Release Engineering - 1.3rc1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Jun 03 2014 Vincent Batts 1.3rc1-1 +- update to go1.3rc1 +- new arch file shuffling + +* Wed May 21 2014 Vincent Batts 1.3beta2-1 +- update to go1.3beta2 +- no longer provides go-mode for xemacs (emacs only) + +* Wed May 21 2014 Vincent Batts 1.2.2-7 +- bz1099206 ghost files are not what is needed + +* Tue May 20 2014 Vincent Batts 1.2.2-6 +- bz1099206 more fixing. The packages %%post need golang-bin present first + +* Tue May 20 2014 Vincent Batts 1.2.2-5 +- bz1099206 more fixing. Let go fix its own timestamps and freshness + +* Tue May 20 2014 Vincent Batts 1.2.2-4 +- fix the existence and alternatives of `go` and `gofmt` + +* Mon May 19 2014 Vincent Batts 1.2.2-3 +- bz1099206 fix timestamp issue caused by koji builders + +* Fri May 09 2014 Vincent Batts 1.2.2-2 +- more arch file shuffling + +* Fri May 09 2014 Vincent Batts 1.2.2-1 +- update to go1.2.2 + +* Thu May 08 2014 Vincent Batts 1.2.1-8 +- RHEL6 rpm macros can't %%exlude missing files + +* Wed May 07 2014 Vincent Batts 1.2.1-7 +- missed two arch-dependent src files + +* Wed May 07 2014 Vincent Batts 1.2.1-6 +- put generated arch-dependent src in their respective RPMs + +* Fri Apr 11 2014 Vincent Batts 1.2.1-5 +- skip test that is causing a SIGABRT on fc21 bz1086900 + +* Thu Apr 10 2014 Vincent Batts 1.2.1-4 +- fixing file and directory ownership bz1010713 + +* Wed Apr 09 2014 Vincent Batts 1.2.1-3 +- including more to macros (%%go_arches) +- set a standard goroot as /usr/lib/golang, regardless of arch +- include sub-packages for compiler toolchains, for all golang supported architectures + +* Wed Mar 26 2014 Vincent Batts 1.2.1-2 +- provide a system rpm macros. Starting with gopath + +* Tue Mar 04 2014 Adam Miller 1.2.1-1 +- Update to latest upstream + +* Thu Feb 20 2014 Adam Miller 1.2-7 +- Remove _BSD_SOURCE and _SVID_SOURCE, they are deprecated in recent + versions of glibc and aren't needed + +* Wed Feb 19 2014 Adam Miller 1.2-6 +- pull in upstream archive/tar implementation that supports xattr for + docker 0.8.1 + +* Tue Feb 18 2014 Vincent Batts 1.2-5 +- provide 'go', so users can yum install 'go' + +* Fri Jan 24 2014 Vincent Batts 1.2-4 +- skip a flaky test that is sporadically failing on the build server + +* Thu Jan 16 2014 Vincent Batts 1.2-3 +- remove golang-godoc dependency. cyclic dependency on compiling godoc + +* Wed Dec 18 2013 Vincent Batts - 1.2-2 +- removing P224 ECC curve + +* Mon Dec 2 2013 Vincent Batts - 1.2-1 +- Update to upstream 1.2 release +- remove the pax tar patches + +* Tue Nov 26 2013 Vincent Batts - 1.1.2-8 +- fix the rpmspec conditional for rhel and fedora + +* Thu Nov 21 2013 Vincent Batts - 1.1.2-7 +- patch tests for testing on rawhide +- let the same spec work for rhel and fedora + +* Wed Nov 20 2013 Vincent Batts - 1.1.2-6 +- don't symlink /usr/bin out to ../lib..., move the file +- seperate out godoc, to accomodate the go.tools godoc + +* Fri Sep 20 2013 Adam Miller - 1.1.2-5 +- Pull upstream patches for BZ#1010271 +- Add glibc requirement that got dropped because of meta dep fix + +* Fri Aug 30 2013 Adam Miller - 1.1.2-4 +- fix the libc meta dependency (thanks to vbatts [at] redhat.com for the fix) + +* Tue Aug 27 2013 Adam Miller - 1.1.2-3 +- Revert incorrect merged changelog + +* Tue Aug 27 2013 Adam Miller - 1.1.2-2 +- This was reverted, just a placeholder changelog entry for bad merge + +* Tue Aug 20 2013 Adam Miller - 1.1.2-1 +- Update to latest upstream + +* Sat Aug 03 2013 Fedora Release Engineering - 1.1.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jul 17 2013 Petr Pisar - 1.1.1-6 +- Perl 5.18 rebuild + +* Wed Jul 10 2013 Adam Goode - 1.1.1-5 +- Blacklist testdata files from prelink +- Again try to fix #973842 + +* Fri Jul 5 2013 Adam Goode - 1.1.1-4 +- Move src to libdir for now (#973842) (upstream issue https://code.google.com/p/go/issues/detail?id=5830) +- Eliminate noarch data package to work around RPM bug (#975909) +- Try to add runtime-gdb.py to the gdb safe-path (#981356) -* Fri Jul 31 xiadanni - 1.13.14-2 -- add yaml file +* Wed Jun 19 2013 Adam Goode - 1.1.1-3 +- Use lua for pretrans (http://fedoraproject.org/wiki/Packaging:Guidelines#The_.25pretrans_scriptlet) -* Thu Jul 30 xiadanni - 1.13.14-1 -- upgrade to 1.13.14 +* Mon Jun 17 2013 Adam Goode - 1.1.1-2 +- Hopefully really fix #973842 +- Fix update from pre-1.1.1 (#974840) -* Thu Jul 23 xiadanni - 1.13-4.1 -- bump to 1.13.4 +* Thu Jun 13 2013 Adam Goode - 1.1.1-1 +- Update to 1.1.1 +- Fix basically useless package (#973842) -* Tue May 12 2020 lixiang - 1.13-3.6 -- rename tar name and make it same with upstream +* Sat May 25 2013 Dan Horák - 1.1-3 +- set ExclusiveArch -* Tue Mar 17 2020 jingrui - 1.13-3.5 -- drop hard code cert +* Fri May 24 2013 Adam Goode - 1.1-2 +- Fix noarch package discrepancies -* Mon Mar 23 2020 jingrui - 1.13-3.4 -- fix CVE-2020-7919 +* Fri May 24 2013 Adam Goode - 1.1-1 +- Initial Fedora release. +- Update to 1.1 -* Thu Feb 20 2020 openEuler Buildteam - 1.13-3.2 -- requires remove mercurial +* Thu May 9 2013 Adam Goode - 1.1-0.3.rc3 +- Update to rc3 -* Tue Dec 10 2019 jingrui - 1.13-3.1 -- upgrade to golang 1.13.3 +* Thu Apr 11 2013 Adam Goode - 1.1-0.2.beta2 +- Update to beta2 -* Tue Sep 03 2019 leizhongkai - 1.11-1 -- backport fix CVE-2019-9512 and CVE-2019-9514 +* Tue Apr 9 2013 Adam Goode - 1.1-0.1.beta1 +- Initial packaging. diff --git a/golang.yaml b/golang.yaml deleted file mode 100644 index 73d095a10f43977bbf4052fd1e397d8309ab3c1d..0000000000000000000000000000000000000000 --- a/golang.yaml +++ /dev/null @@ -1,4 +0,0 @@ -version_control: github -src_repo: golang/go -tag_prefix: ^go -seperator: .