diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index 4127c4e..8c50056 100644 --- a/.gitignore +++ b/.gitignore @@ -1,98 +1,9 @@ -*.rpm -/go1.1.1.src.tar.gz -/go1.1.2.src.tar.gz -/go1.2.1.src.tar.gz -/go1.2.2.src.tar.gz -/go1.2.src.tar.gz -/go1.3.1.src.tar.gz -/go1.3.2.src.tar.gz -/go1.3.3.src.tar.gz -/go1.3.src.tar.gz -/go1.3beta2.src.tar.gz -/go1.3rc1.src.tar.gz -/go1.3rc2.src.tar.gz -/go1.4.1.src.tar.gz -/go1.4.2.src.tar.gz -/go1.4.src.tar.gz -/go1.4beta1.src.tar.gz -/go1.4rc1.src.tar.gz -/go1.4rc2.src.tar.gz -/go1.5beta1.src.tar.gz -/golang-19087:a15f344a9efa-xattrs.tar -/go1.5beta2.src.tar.gz -/go1.5beta3.src.tar.gz -/go1.5rc1.src.tar.gz -/go1.5.src.tar.gz -/go1.5.1.src.tar.gz -/go1.5.2.src.tar.gz -/Mark.Twain-Tom.Sawyer.txt.bz2 -/go1.5.3.src.tar.gz -/go1.6rc1.src.tar.gz -/go1.6.src.tar.gz -/go1.6.1.src.tar.gz -/go1.6.2.src.tar.gz -/go1.7rc2.src.tar.gz -/go1.7rc5.src.tar.gz -/go1.7.src.tar.gz -/go1.7.1.src.tar.gz -/go1.7.3.src.tar.gz -/go1.7.4.src.tar.gz -/go1.8rc3.src.tar.gz -/go1.8.src.tar.gz -/go1.8.1.src.tar.gz -/go1.8.3.src.tar.gz -/go1.9beta2.src.tar.gz -/go1.9.src.tar.gz -/go1.9.1.src.tar.gz -/go1.9.2.src.tar.gz -/go1.10beta1.src.tar.gz -/go1.10beta2.src.tar.gz -/go1.10rc1.src.tar.gz -/go1.10rc2.src.tar.gz -/go1.10.src.tar.gz -/go1.10.1.src.tar.gz -/go1.10.2.src.tar.gz -/go1.10.3.src.tar.gz -/go1.11beta1.src.tar.gz -/go1.11beta2.src.tar.gz -/go1.11beta3.src.tar.gz -/go1.11rc1.src.tar.gz -/go1.11rc2.src.tar.gz -/go1.11.src.tar.gz -/go1.11.1.src.tar.gz -/go1.11.2.src.tar.gz -/go1.11.4.src.tar.gz -/go1.12beta2.src.tar.gz -/go1.12rc1.src.tar.gz -/go1.12.src.tar.gz -/go1.12.1.src.tar.gz -/go1.12.2.src.tar.gz -/go1.12.5.src.tar.gz -/go1.12.6.src.tar.gz -/go1.12.7.src.tar.gz -/go1.13beta1.src.tar.gz -/go1.13rc1.src.tar.gz -/go1.13rc2.src.tar.gz -/go1.13.src.tar.gz -/go1.13.1.src.tar.gz -/go1.13.3.src.tar.gz -/go1.13.4.src.tar.gz -/go1.13.5.src.tar.gz -/go1.13.6.src.tar.gz -/go1.14beta1.src.tar.gz -/go1.14rc1.src.tar.gz -/go1.14.src.tar.gz -/go1.14.2.src.tar.gz -/go1.14.3.src.tar.gz -/go1.14.4.src.tar.gz -/go1.14.6.src.tar.gz -/go1.15beta1.src.tar.gz -/go1.15rc1.src.tar.gz -/go1.15rc2.src.tar.gz -/go1.15.src.tar.gz -/go1.15.1.src.tar.gz -/go1.15.2.src.tar.gz -/go1.15.3.src.tar.gz -/go1.15.4.src.tar.gz -/go1.15.5.src.tar.gz -/go1.15.6.src.tar.gz +*.README +rhel8-* +bodhi* +/go1.19.13-2-openssl-fips.tar.gz +/go1.19.13.tar.gz +/go1.20.10-1-openssl-fips.tar.gz +/go1.20.10.tar.gz +/go1.20.12.tar.gz +/go1.20.12-1-openssl-fips.tar.gz 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 deleted file mode 100644 index 422ca2b..0000000 --- a/0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch +++ /dev/null @@ -1,88 +0,0 @@ -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/0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch b/0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch deleted file mode 100644 index 072440d..0000000 --- a/0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 817407fc2d6a861e65086388766f58082d38bc0b Mon Sep 17 00:00:00 2001 -From: Michael Munday -Date: Tue, 17 Jan 2017 11:33:38 -0500 -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. - -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 63c4a83b19..b5894255df 100644 ---- a/src/syscall/ztypes_linux_s390x.go -+++ b/src/syscall/ztypes_linux_s390x.go -@@ -449,12 +449,12 @@ type RtAttr struct { - } - - type IfInfomsg struct { -- Family uint8 -- _ uint8 -- Type uint16 -- Index int32 -- Flags uint32 -- Change uint32 -+ Family uint8 -+ X__ifi_pad uint8 -+ Type uint16 -+ Index int32 -+ Flags uint32 -+ Change uint32 - } - - type IfAddrmsg struct { --- -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 deleted file mode 100644 index a6235e4..0000000 --- a/0003-cmd-go-disable-Google-s-proxy-and-sumdb.patch +++ /dev/null @@ -1,54 +0,0 @@ -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/disable_static_tests_part1.patch b/disable_static_tests_part1.patch new file mode 100644 index 0000000..5b99e48 --- /dev/null +++ b/disable_static_tests_part1.patch @@ -0,0 +1,288 @@ +diff --git a/src/crypto/internal/backend/nobackend.go b/src/crypto/internal/backend/nobackend.go +index 5f258a2..5dbbc42 100644 +--- a/src/crypto/internal/backend/nobackend.go ++++ b/src/crypto/internal/backend/nobackend.go +@@ -2,8 +2,8 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build !linux || !cgo || android || cmd_go_bootstrap || msan || no_openssl +-// +build !linux !cgo android cmd_go_bootstrap msan no_openssl ++//go:build !linux || !cgo || android || cmd_go_bootstrap || msan || no_openssl || static ++// +build !linux !cgo android cmd_go_bootstrap msan no_openssl static + + package backend + +diff --git a/src/crypto/internal/boring/goboringcrypto.h b/src/crypto/internal/boring/goboringcrypto.h +index d6d99b1..f2fe332 100644 +--- a/src/crypto/internal/boring/goboringcrypto.h ++++ b/src/crypto/internal/boring/goboringcrypto.h +@@ -1,4 +1,5 @@ + // Copyright 2017 The Go Authors. All rights reserved. ++// +build !static + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +diff --git a/src/crypto/internal/boring/syso/syso.go b/src/crypto/internal/boring/syso/syso.go +index b338754..db5ea1e 100644 +--- a/src/crypto/internal/boring/syso/syso.go ++++ b/src/crypto/internal/boring/syso/syso.go +@@ -2,7 +2,7 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build boringcrypto ++//go:build boringcrypto && !static + + // This package only exists with GOEXPERIMENT=boringcrypto. + // It provides the actual syso file. +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/aes.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/aes.go +index 079fc3c..e826d0b 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/aes.go ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/aes.go +@@ -2,8 +2,8 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl +-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl ++//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static ++// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static + + package openssl + +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdh.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdh.go +index 0b61e79..94d0c98 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdh.go ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdh.go +@@ -2,8 +2,8 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl +-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl ++//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static ++// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static + + package openssl + +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdsa.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdsa.go +index afec529..d822152 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdsa.go ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdsa.go +@@ -2,8 +2,8 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl +-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl ++//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static ++// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static + + package openssl + +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/goopenssl.h b/src/vendor/github.com/golang-fips/openssl-fips/openssl/goopenssl.h +index 6d6a562..17cc314 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/goopenssl.h ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/goopenssl.h +@@ -1,4 +1,5 @@ + // Copyright 2017 The Go Authors. All rights reserved. ++// +build !static + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + // +build linux +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/hkdf.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/hkdf.go +index ae40b93..17bc075 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/hkdf.go ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/hkdf.go +@@ -2,8 +2,8 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl +-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl ++//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static ++// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static + + package openssl + +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/hmac.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/hmac.go +index 6f00177..f466b18 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/hmac.go ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/hmac.go +@@ -2,8 +2,8 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl +-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl ++//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static ++// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static + + package openssl + +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/notboring.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/notboring.go +index 7c0b5d6..262af07 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/notboring.go ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/notboring.go +@@ -2,8 +2,8 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build !linux || !cgo || android || cmd_go_bootstrap || msan || no_openssl +-// +build !linux !cgo android cmd_go_bootstrap msan no_openssl ++//go:build !linux || !cgo || android || cmd_go_bootstrap || msan || no_openssl || static ++// +build !linux !cgo android cmd_go_bootstrap msan no_openssl static + + package openssl + +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl.go +index d49194d..ff15054 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl.go ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl.go +@@ -2,8 +2,8 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl +-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl ++//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static ++// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static + + package openssl + +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_ecdsa_signature.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_ecdsa_signature.c +index 2349db1..57fbb04 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_ecdsa_signature.c ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_ecdsa_signature.c +@@ -1,4 +1,5 @@ + // +build linux ++// +build !static + // +build !android + // +build !no_openssl + // +build !cmd_go_bootstrap +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_evp.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_evp.c +index 4379019..5034c46 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_evp.c ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_evp.c +@@ -1,4 +1,5 @@ + // +build linux ++// +build !static + // +build !android + // +build !no_openssl + // +build !cmd_go_bootstrap +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_lock_setup.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_lock_setup.c +index 49d40a7..3b3dbf8 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_lock_setup.c ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_lock_setup.c +@@ -1,4 +1,5 @@ + // +build linux ++// +build !static + // +build !android + // +build !no_openssl + // +build !cmd_go_bootstrap +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_aead_gcm.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_aead_gcm.c +index 7eb645e..1c3225a 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_aead_gcm.c ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_aead_gcm.c +@@ -1,4 +1,5 @@ + // This file contains a port of the BoringSSL AEAD interface. ++// +build !static + // +build linux + // +build !android + // +build !no_openssl +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_ctr128.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_ctr128.c +index df4ebe3..876393b 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_ctr128.c ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_ctr128.c +@@ -1,4 +1,5 @@ + // +build linux ++// +build !static + // +build !android + // +build !no_openssl + // +build !cmd_go_bootstrap +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_evp_md5_sha1.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_evp_md5_sha1.c +index 2eedd5b..04510d3 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_evp_md5_sha1.c ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_evp_md5_sha1.c +@@ -1,4 +1,5 @@ + // This file contains a backport of the EVP_md5_sha1 method. ++// +build !static + // +build linux + // +build !android + // +build !no_openssl +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_hmac.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_hmac.c +index 362d9e5..bebafef 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_hmac.c ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_hmac.c +@@ -1,4 +1,5 @@ + // This file contains HMAC portability wrappers. ++// +build !static + // +build linux + // +build !android + // +build !no_openssl +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_rsa.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_rsa.c +index 2824147..8bc1d85 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_rsa.c ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_rsa.c +@@ -1,4 +1,5 @@ + // This file contains RSA portability wrappers. ++// +build !static + // +build linux + // +build !android + // +build !no_openssl +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_stub_rand.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_stub_rand.c +index 22bd865..b7aa26b 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_stub_rand.c ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_stub_rand.c +@@ -1,4 +1,5 @@ + // +build linux ++// +build !static + // +build !android + // +build !no_openssl + // +build !cmd_go_bootstrap +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/rand.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/rand.go +index b3668b8..dcdae70 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/rand.go ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/rand.go +@@ -2,8 +2,8 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl +-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl ++//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static ++// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static + + package openssl + +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/rsa.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/rsa.go +index 915c840..8623d9d 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/rsa.go ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/rsa.go +@@ -2,8 +2,8 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl +-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl ++//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static ++// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static + + package openssl + +diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/sha.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/sha.go +index 0b55ced..57309c0 100644 +--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/sha.go ++++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/sha.go +@@ -2,8 +2,8 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl +-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl ++//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static ++// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static + + package openssl + diff --git a/disable_static_tests_part2.patch b/disable_static_tests_part2.patch new file mode 100644 index 0000000..aa2d91c --- /dev/null +++ b/disable_static_tests_part2.patch @@ -0,0 +1,13 @@ +diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go +index 9f26606..2408505 100644 +--- a/src/cmd/dist/test.go ++++ b/src/cmd/dist/test.go +@@ -1259,7 +1259,7 @@ func (t *tester) registerCgoTests() { + } else { + panic("unknown linkmode with static build: " + linkmode) + } +- gt.tags = append(gt.tags, "static") ++ gt.tags = append(gt.tags, "static", "no_openssl") + } + + t.registerTest("cgo:"+name, "../misc/cgo/test", gt, opts...) diff --git a/do-not-reuse-far-trampolines.patch b/do-not-reuse-far-trampolines.patch new file mode 100644 index 0000000..8d8d806 --- /dev/null +++ b/do-not-reuse-far-trampolines.patch @@ -0,0 +1,160 @@ +From 63dd776220bb3a443e6b5c0766a389ec33dc4b69 Mon Sep 17 00:00:00 2001 +From: "Paul E. Murphy" +Date: Wed, 16 Nov 2022 14:53:39 -0600 +Subject: [PATCH] [release-branch.go1.18] cmd/link/internal/ppc64: fix + trampoline reuse distance calculation + +If a compatible trampoline has been inserted by a previously laid +function in the same section, and is known to be sufficiently close, +it can be reused. + +When testing if the trampoline can be reused, the addend of the direct +call should be ignored. It is already encoded in the trampoline. If the +addend is non-zero, and the target sufficiently far away, and just +beyond direct call reach, this may cause the trampoline to be +incorrectly reused. + +This was observed on go1.17.13 and openshift-installer commit f3c53b382 +building in release mode with the following error: + +github.com/aliyun/alibaba-cloud-sdk-go/services/cms.(*Client).DescribeMonitoringAgentAccessKeyWithChan.func1: direct call too far: runtime.duffzero+1f0-tramp0-1 -2000078 + +Fixes #56833 + +Change-Id: I54af957302506d4e3cd5d3121542c83fe980e912 +Reviewed-on: https://go-review.googlesource.com/c/go/+/451415 +Reviewed-by: Cherry Mui +Run-TryBot: Paul Murphy +TryBot-Result: Gopher Robot +Reviewed-by: Lynn Boger +Reviewed-by: Than McIntosh +Reviewed-on: https://go-review.googlesource.com/c/go/+/451916 +Reviewed-by: Joedian Reid +--- + .../testdata/script/trampoline_reuse_test.txt | 100 ++++++++++++++++++ + src/cmd/link/internal/ppc64/asm.go | 5 +- + 2 files changed, 103 insertions(+), 2 deletions(-) + create mode 100644 src/cmd/go/testdata/script/trampoline_reuse_test.txt + +diff --git a/src/cmd/go/testdata/script/trampoline_reuse_test.txt b/src/cmd/go/testdata/script/trampoline_reuse_test.txt +new file mode 100644 +index 0000000000000..bca897c16d054 +--- /dev/null ++++ b/src/cmd/go/testdata/script/trampoline_reuse_test.txt +@@ -0,0 +1,100 @@ ++# Verify PPC64 does not reuse a trampoline which is too far away. ++# This tests an edge case where the direct call relocation addend should ++# be ignored when computing the distance from the direct call to the ++# already placed trampoline ++[short] skip ++[!ppc64] [!ppc64le] skip ++[aix] skip ++ ++# Note, this program does not run. Presumably, 'DWORD $0' is simpler to ++# assembly 2^26 or so times. ++# ++# We build something which should be laid out as such: ++# ++# bar.Bar ++# main.Func1 ++# bar.Bar+400-tramp0 ++# main.BigAsm ++# main.Func2 ++# bar.Bar+400-tramp1 ++# ++# bar.Bar needs to be placed far enough away to generate relocations ++# from main package calls. and main.Func1 and main.Func2 are placed ++# a bit more than the direct call limit apart, but not more than 0x400 ++# bytes beyond it (to verify the reloc calc). ++ ++go build ++ ++-- go.mod -- ++ ++module foo ++ ++go 1.19 ++ ++-- main.go -- ++ ++package main ++ ++import "foo/bar" ++ ++func Func1() ++ ++func main() { ++ Func1() ++ bar.Bar2() ++} ++ ++-- foo.s -- ++ ++TEXT main·Func1(SB),0,$0-0 ++ CALL bar·Bar+0x400(SB) ++ CALL main·BigAsm(SB) ++// A trampoline will be placed here to bar.Bar ++ ++// This creates a gap sufficiently large to prevent trampoline reuse ++#define NOP64 DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0; ++#define NOP256 NOP64 NOP64 NOP64 NOP64 ++#define NOP2S10 NOP256 NOP256 NOP256 NOP256 ++#define NOP2S12 NOP2S10 NOP2S10 NOP2S10 NOP2S10 ++#define NOP2S14 NOP2S12 NOP2S12 NOP2S12 NOP2S12 ++#define NOP2S16 NOP2S14 NOP2S14 NOP2S14 NOP2S14 ++#define NOP2S18 NOP2S16 NOP2S16 NOP2S16 NOP2S16 ++#define NOP2S20 NOP2S18 NOP2S18 NOP2S18 NOP2S18 ++#define NOP2S22 NOP2S20 NOP2S20 NOP2S20 NOP2S20 ++#define NOP2S24 NOP2S22 NOP2S22 NOP2S22 NOP2S22 ++#define BIGNOP NOP2S24 NOP2S24 ++TEXT main·BigAsm(SB),0,$0-0 ++ // Fill to the direct call limit so Func2 must generate a new trampoline. ++ // As the implicit trampoline above is just barely unreachable. ++ BIGNOP ++ MOVD $main·Func2(SB), R3 ++ ++TEXT main·Func2(SB),0,$0-0 ++ CALL bar·Bar+0x400(SB) ++// Another trampoline should be placed here. ++ ++-- bar/bar.s -- ++ ++#define NOP64 DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0; ++#define NOP256 NOP64 NOP64 NOP64 NOP64 ++#define NOP2S10 NOP256 NOP256 NOP256 NOP256 ++#define NOP2S12 NOP2S10 NOP2S10 NOP2S10 NOP2S10 ++#define NOP2S14 NOP2S12 NOP2S12 NOP2S12 NOP2S12 ++#define NOP2S16 NOP2S14 NOP2S14 NOP2S14 NOP2S14 ++#define NOP2S18 NOP2S16 NOP2S16 NOP2S16 NOP2S16 ++#define NOP2S20 NOP2S18 NOP2S18 NOP2S18 NOP2S18 ++#define NOP2S22 NOP2S20 NOP2S20 NOP2S20 NOP2S20 ++#define NOP2S24 NOP2S22 NOP2S22 NOP2S22 NOP2S22 ++#define BIGNOP NOP2S24 NOP2S24 NOP2S10 ++// A very big not very interesting function. ++TEXT bar·Bar(SB),0,$0-0 ++ BIGNOP ++ ++-- bar/bar.go -- ++ ++package bar ++ ++func Bar() ++ ++func Bar2() { ++} +diff --git a/src/cmd/link/internal/ppc64/asm.go b/src/cmd/link/internal/ppc64/asm.go +index 73c2718a3369f..879adaa965050 100644 +--- a/src/cmd/link/internal/ppc64/asm.go ++++ b/src/cmd/link/internal/ppc64/asm.go +@@ -809,8 +809,9 @@ func trampoline(ctxt *ld.Link, ldr *loader.Loader, ri int, rs, s loader.Sym) { + if ldr.SymValue(tramp) == 0 { + break + } +- +- t = ldr.SymValue(tramp) + r.Add() - (ldr.SymValue(s) + int64(r.Off())) ++ // Note, the trampoline is always called directly. The addend of the original relocation is accounted for in the ++ // trampoline itself. ++ t = ldr.SymValue(tramp) - (ldr.SymValue(s) + int64(r.Off())) + + // With internal linking, the trampoline can be used if it is not too far. + // With external linking, the trampoline must be in this section for it to be reused. diff --git a/fix_TestScript_list_std.patch b/fix_TestScript_list_std.patch new file mode 100644 index 0000000..ade3711 --- /dev/null +++ b/fix_TestScript_list_std.patch @@ -0,0 +1,13 @@ +diff --git a/src/cmd/go/testdata/script/list_std.txt b/src/cmd/go/testdata/script/list_std.txt +index 6ab1bd1..4a00e43 100644 +--- a/src/cmd/go/testdata/script/list_std.txt ++++ b/src/cmd/go/testdata/script/list_std.txt +@@ -6,7 +6,7 @@ env GO111MODULE=off + # Listing GOROOT should only find standard packages. + cd $GOROOT/src + go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' ./... +-! stdout . ++stdout _$GOROOT + + # Standard packages should include cmd, but not cmd/vendor. + go list ./... diff --git a/golang-gdbinit b/golang-gdbinit index ecddca6..4ef690b 100644 --- a/golang-gdbinit +++ b/golang-gdbinit @@ -1 +1 @@ -add-auto-load-safe-path /usr/lib/golang/src/runtime/runtime-gdb.py +add-auto-load-safe-path /usr/lib/golang/src/pkg/runtime/runtime-gdb.py diff --git a/golang-prelink.conf b/golang-prelink.conf new file mode 100644 index 0000000..471e8e6 --- /dev/null +++ b/golang-prelink.conf @@ -0,0 +1,3 @@ +# there are ELF files in src which are testdata and shouldn't be modified +-b /usr/lib/golang/src +-b /usr/lib64/golang/src diff --git a/golang.spec b/golang.spec index 4f1c9df..56d444b 100644 --- a/golang.spec +++ b/golang.spec @@ -1,11 +1,7 @@ -%bcond_with bootstrap -# temporalily ignore test failures -# due to https://github.com/golang/go/issues/39466 -%ifarch aarch64 -%bcond_without ignore_tests -%else +%undefine _missing_build_ids_terminate_build + +%bcond_with strict_fips %bcond_with ignore_tests -%endif # build ids are not currently generated: # https://code.google.com/p/go/issues/detail?id=5238 @@ -31,64 +27,59 @@ %global __spec_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot \ /usr/lib/rpm/brp-compress -%global golibdir %{_libdir}/golang - -# This macro may not always be defined, ensure it is -%{!?gopath: %global gopath %{_datadir}/gocode} +# Define GOROOT macros +%global goroot %{_prefix}/lib/%{name} +%global gopath %{_datadir}/gocode +%global golang_arches x86_64 aarch64 ppc64le s390x +%global golibdir %{_libdir}/%{name} # Golang build options. # Build golang using external/internal(close to cgo disabled) linking. -%ifarch %{ix86} x86_64 ppc64le %{arm} aarch64 s390x +%ifarch x86_64 ppc64le %{arm} aarch64 s390x %global external_linker 1 %else %global external_linker 0 %endif # Build golang with cgo enabled/disabled(later equals more or less to internal linking). -%ifarch %{ix86} x86_64 ppc64le %{arm} aarch64 s390x +%ifarch 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 +%ifarch %{golang_arches} %global golang_bootstrap 1 +%else +%global golang_bootstrap 0 %endif # Controls what ever we fail on failed tests +%ifarch x86_64 %{arm} aarch64 ppc64le s390x %if %{with ignore_tests} %global fail_on_tests 0 %else %global fail_on_tests 1 %endif +%else +%global fail_on_tests 0 +%endif # Build golang shared objects for stdlib -%ifarch %{ix86} x86_64 ppc64le %{arm} aarch64 +%ifarch 0 %global shared 1 %else %global shared 0 %endif -# Pre build std lib with -race enabled -%ifarch x86_64 -%global race 1 -%else +# Disabled due to 1.20 new cache usage, see 1.20 upstream release notes %global race 0 -%endif - -# Fedora GOROOT -%global goroot /usr/lib/%{name} %ifarch x86_64 %global gohostarch amd64 %endif -%ifarch %{ix86} -%global gohostarch 386 -%endif %ifarch %{arm} %global gohostarch arm %endif @@ -105,138 +96,69 @@ %global gohostarch s390x %endif -%global go_api 1.15 -%global go_version 1.15.6 +%global go_api 1.20 +%global version 1.20.12 +%global pkg_release 1 Name: golang -Version: 1.15.6 +Version: %{version} 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: http://golang.org/ -Source0: https://storage.googleapis.com/golang/go%{go_version}.src.tar.gz +Source0: https://github.com/golang/go/archive/refs/tags/go%{version}.tar.gz +# Go's FIPS mode bindings are now provided as a standalone +# module instead of in tree. This makes it easier to see +# the actual changes vs upstream Go. The module source is +# located at https://github.com/golang-fips/openssl-fips, +# And pre-genetated patches to set up the module for a given +# Go release are located at https://github.com/golang-fips/go. +Source1: https://github.com/golang-fips/go/archive/refs/tags/go%{version}-%{pkg_release}-openssl-fips.tar.gz # make possible to override default traceback level at build time by setting build tag rpm_crashtraceback -Source1: fedora.go +Source2: fedora.go # The compiler is written in Go. Needs go(1.4+) compiler for build. +# Actual Go based bootstrap compiler provided by above source. %if !%{golang_bootstrap} BuildRequires: gcc-go >= 5 %else -BuildRequires: golang > 1.4 +BuildRequires: golang %endif %if 0%{?rhel} > 6 || 0%{?fedora} > 0 BuildRequires: hostname %else BuildRequires: net-tools %endif +# For OpenSSL FIPS +BuildRequires: openssl-devel # for tests -BuildRequires: pcre-devel, glibc-static, perl-interpreter, procps-ng +BuildRequires: pcre-devel, glibc-static, perl 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/chacha20)) -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/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/nettest)) -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/bidi)) -Provides: bundled(golang(golang.org/x/text/unicode/norm)) -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/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)) -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/ed25519)) -Provides: bundled(golang(golang.org/x/crypto/ed25519/internal/edwards25519)) -Provides: bundled(golang(golang.org/x/crypto/ssh/terminal)) -Provides: bundled(golang(golang.org/x/mod/internal/lazyregexp)) -Provides: bundled(golang(golang.org/x/mod/modfile)) -Provides: bundled(golang(golang.org/x/mod/module)) -Provides: bundled(golang(golang.org/x/mod/semver)) -Provides: bundled(golang(golang.org/x/mod/sumdb)) -Provides: bundled(golang(golang.org/x/mod/sumdb/dirhash)) -Provides: bundled(golang(golang.org/x/mod/sumdb/note)) -Provides: bundled(golang(golang.org/x/mod/sumdb/tlog)) -Provides: bundled(golang(golang.org/x/mod/zip)) -Provides: bundled(golang(golang.org/x/sys/internal/unsafeheader)) -Provides: bundled(golang(golang.org/x/sys/unix)) -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/ifaceassert)) -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/stringintconv)) -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)) -Provides: bundled(golang(golang.org/x/tools/internal/analysisinternal)) -Provides: bundled(golang(golang.org/x/xerrors)) -Provides: bundled(golang(golang.org/x/xerrors/internal)) - +%if 0%{?rhel} == 7 +Provides: go-srpm-macros +Requires: go-srpm-macros +%endif Requires: %{name}-bin = %{version}-%{release} Requires: %{name}-src = %{version}-%{release} -Requires: go-srpm-macros +Requires: openssl-devel +Requires: diffutils -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 + +# Proposed patch by jcajka https://golang.org/cl/86541 +Patch221: fix_TestScript_list_std.patch +Patch222: skip-test-overlong-message.patch + +Patch1939923: skip_test_rhbz1939923.patch + +Patch2: disable_static_tests_part1.patch +Patch3: disable_static_tests_part2.patch + +%if 0%{?rhel} == 7 +Patch64: skip_ppc64le_cgo_inline_plt.patch +%endif # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -244,14 +166,17 @@ 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 +# We don't build golang-race anymore, rhbz#2230599 +Obsoletes: golang-race < 1.20.0 # These are the only RHEL/Fedora architectures that we compile this package for ExclusiveArch: %{golang_arches} Source100: golang-gdbinit +Source101: golang-prelink.conf +%if 0%{?rhel} == 7 +Source102: macros.golang +%endif %description %{summary}. @@ -284,54 +209,18 @@ BuildArch: noarch %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 +Requires: %{name} = %{version}-%{release} # 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 +Requires: /usr/bin/gcc %description bin %{summary} @@ -364,11 +253,37 @@ Requires: %{name} = %{version}-%{release} %endif %prep -%autosetup -p1 -n go +%setup -q -n go-go%{version} -cp %{SOURCE1} ./src/runtime/ +pushd .. +tar -xf %{SOURCE1} +popd +patch -p1 < ../go-go%{version}-%{pkg_release}-openssl-fips/patches/000-initial-setup.patch +patch -p1 < ../go-go%{version}-%{pkg_release}-openssl-fips/patches/001-initial-openssl-for-fips.patch +patch -p1 < ../go-go%{version}-%{pkg_release}-openssl-fips/patches/002-strict-fips-runtime-detection.patch + +# Configure crypto tests +pushd ../go-go%{version}-%{pkg_release}-openssl-fips +ln -s ../go-go%{version} go +./scripts/configure-crypto-tests.sh +popd + +%patch2 -p1 +%patch3 -p1 + +%if 0%{?rhel} == 7 +%patch64 -p1 +%endif + +%patch221 -p1 +%patch222 -p1 + +%patch1939923 -p1 + +cp %{SOURCE2} ./src/runtime/ %build +set -xe # print out system information uname -a cat /proc/cpuinfo @@ -378,7 +293,7 @@ cat /proc/meminfo %if !%{golang_bootstrap} export GOROOT_BOOTSTRAP=/ %else -export GOROOT_BOOTSTRAP=%{goroot} +export GOROOT_BOOTSTRAP=/opt/rh/go-toolset-1.10/root/usr/lib/go-toolset-1.10-golang %endif # set up final install location @@ -395,36 +310,46 @@ export CC="gcc" export CC_FOR_TARGET="gcc" export GOOS=linux export GOARCH=%{gohostarch} + +DEFAULT_GO_LD_FLAGS="" %if !%{external_linker} -export GO_LDFLAGS="-linkmode internal" +export GO_LDFLAGS="-linkmode internal $DEFAULT_GO_LD_FLAGS" +%else +# Only pass a select subset of the external hardening flags. We do not pass along +# the default $RPM_LD_FLAGS as on certain arches Go does not fully, correctly support +# building in PIE mode. +export GO_LDFLAGS="\"-extldflags=-Wl,-z,now,-z,relro\" $DEFAULT_GO_LD_FLAGS" %endif %if !%{cgo_enabled} export CGO_ENABLED=0 %endif -./make.bash --no-clean -v +./make.bash --no-clean popd # build shared std lib %if %{shared} -GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -buildmode=shared -v -x std +GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -buildmode=shared std %endif %if %{race} -GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -race -v -x std +GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -race std %endif + %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} mkdir -p $RPM_BUILD_ROOT%{goroot} +# remove bootstrap binaries +rm -rf pkg/bootstrap/bin + # 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 \ +cp -apv api bin doc lib pkg src misc test VERSION \ $RPM_BUILD_ROOT%{goroot} # bz1099206 @@ -437,15 +362,14 @@ cwd=$(pwd) src_list=$cwd/go-src.list pkg_list=$cwd/go-pkg.list shared_list=$cwd/go-shared.list -race_list=$cwd/go-race.list misc_list=$cwd/go-misc.list 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 +rm -f $src_list $pkg_list $docs_list $misc_list $tests_list $shared_list +touch $src_list $pkg_list $docs_list $misc_list $tests_list $shared_list 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 + find src/ ! -type d -a \( ! -ipath '*/testdata/*' -a ! -name '*_test*.go' \) -printf '%{goroot}/%p\n' >> $src_list find bin/ pkg/ -type d -a ! -path '*_dynlink/*' -a ! -path '*_race/*' -printf '%%%dir %{goroot}/%p\n' >> $pkg_list find bin/ pkg/ ! -type d -a ! -path '*_dynlink/*' -a ! -path '*_race/*' -printf '%{goroot}/%p\n' >> $pkg_list @@ -473,17 +397,10 @@ pushd $RPM_BUILD_ROOT%{goroot} find pkg/*_dynlink/ ! -type d -printf '%{goroot}/%p\n' >> $shared_list %endif -%if %{race} - - find pkg/*_race/ -type d -printf '%%%dir %{goroot}/%p\n' >> $race_list - find pkg/*_race/ ! -type d -printf '%{goroot}/%p\n' >> $race_list - -%endif - find test/ -type d -printf '%%%dir %{goroot}/%p\n' >> $tests_list find test/ ! -type d -printf '%{goroot}/%p\n' >> $tests_list find src/ -type d -a \( -name testdata -o -ipath '*/testdata/*' \) -printf '%%%dir %{goroot}/%p\n' >> $tests_list - find src/ ! -type d -a \( -ipath '*/testdata/*' -o -name '*_test.go' \) -printf '%{goroot}/%p\n' >> $tests_list + find src/ ! -type d -a \( -ipath '*/testdata/*' -o -name '*_test*.go' \) -printf '%{goroot}/%p\n' >> $tests_list # this is only the zoneinfo.zip find lib/ -type d -printf '%%%dir %{goroot}/%p\n' >> $tests_list find lib/ ! -type d -printf '%{goroot}/%p\n' >> $tests_list @@ -495,8 +412,8 @@ rm -rfv $RPM_BUILD_ROOT%{goroot}/doc/Makefile # 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 +ln -sf %{goroot}/bin/go $RPM_BUILD_ROOT%{_bindir}/go +ln -sf %{goroot}/bin/gofmt $RPM_BUILD_ROOT%{_bindir}/gofmt # ensure these exist and are owned mkdir -p $RPM_BUILD_ROOT%{gopath}/src/github.com @@ -504,72 +421,97 @@ 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 -# 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 - # gdbinit mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d cp -av %{SOURCE100} $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d/golang.gdb +# prelink blacklist +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d +cp -av %{SOURCE101} $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d/golang.conf + +%if 0%{?rhel} == 7 +# rpm macros +mkdir -p %{buildroot} +mkdir -p $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d +cp -av %{SOURCE102} $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d/macros.golang +%endif + +# Quick fix for the rhbz#2014704 +sed -i 's/const defaultGO_LDSO = `.*`/const defaultGO_LDSO = ``/' $RPM_BUILD_ROOT%{goroot}/src/internal/buildcfg/zbootstrap.go + %check export GOROOT=$(pwd -P) export PATH="$GOROOT"/bin:"$PATH" cd src +# Add some sanity checks. +echo "GO VERSION:" +go version + +echo "GO ENVIRONMENT:" +go env + export CC="gcc" export CFLAGS="$RPM_OPT_FLAGS" export LDFLAGS="$RPM_LD_FLAGS" %if !%{external_linker} export GO_LDFLAGS="-linkmode internal" +%else +export GO_LDFLAGS="-extldflags '$RPM_LD_FLAGS'" %endif %if !%{cgo_enabled} || !%{external_linker} export CGO_ENABLED=0 %endif -# 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 -#ifarch aarch64 -#export CGO_CFLAGS="-mno-outline-atomics" -#endif # make sure to not timeout export GO_TEST_TIMEOUT_SCALE=2 +export GO_TEST_RUN="" +%ifarch aarch64 + export GO_TEST_RUN="-run=!testshared" +%endif + %if %{fail_on_tests} -./run.bash --no-rebuild -v -v -v -k + +# TestEd25519Vectors needs network connectivity but it should be cover by +# this test https://pkgs.devel.redhat.com/cgit/tests/golang/tree/Regression/internal-testsuite/runtest.sh#n127 + +./run.bash --no-rebuild -v -v -v -k $GO_TEST_RUN + +# Run tests with FIPS enabled. +export GOLANG_FIPS=1 +pushd crypto + # Run all crypto tests but skip TLS, we will run FIPS specific TLS tests later + go test $(go list ./... | grep -v tls) -v + # Check that signature functions have parity between boring and notboring + CGO_ENABLED=0 go test $(go list ./... | grep -v tls) -v +popd +# Run all FIPS specific TLS tests +pushd crypto/tls + go test -v -run "Boring" +popd %else ./run.bash --no-rebuild -v -v -v -k || : %endif cd .. - -%post bin -%{_sbindir}/update-alternatives --install %{_bindir}/go \ - go %{goroot}/bin/go 90 \ - --slave %{_bindir}/gofmt gofmt %{goroot}/bin/gofmt - -%preun bin -if [ $1 = 0 ]; then - %{_sbindir}/update-alternatives --remove go %{goroot}/bin/go -fi - - %files -%license LICENSE PATENTS -%doc AUTHORS CONTRIBUTORS + +%doc LICENSE PATENTS # 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} -%{goroot}/api/ -%{goroot}/lib/time/ -%{goroot}/favicon.ico -%{goroot}/robots.txt +%exclude %{goroot}/bin/ +%exclude %{goroot}/pkg/ +%exclude %{goroot}/src/ +%exclude %{goroot}/doc/ +%exclude %{goroot}/misc/ +%exclude %{goroot}/test/ +%{goroot}/* # ensure directory ownership, so they are cleaned up if empty %dir %{gopath} @@ -581,287 +523,169 @@ fi %dir %{gopath}/src/golang.org %dir %{gopath}/src/golang.org/x - # gdbinit (for gdb debugging) %{_sysconfdir}/gdbinit.d -%files src -f go-src.list +# prelink blacklist +%{_sysconfdir}/prelink.conf.d -%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 +%if 0%{?rhel} ==7 +%{_rpmconfigdir}/macros.d/macros.golang %endif -%if %{race} -%files race -f go-race.list +%files -f go-src.list src + +%files -f go-docs.list docs + +%files -f go-misc.list misc + +%files -f go-tests.list tests + +%files -f go-pkg.list bin +%{_bindir}/go +%{_bindir}/gofmt + +%if %{shared} +%files -f go-shared.list shared %endif %changelog -* Fri Dec 04 2020 Jakub Čajka - 1.15.6-1 -- Rebase to go1.15.6 -- Resolves: BZ#1904238 +* Tue Mar 5 2024 Dave Dykstra - 1.20.12-1 +- Update to 1.20.12 by doing the equivalent changes done in RedHat ubi8's + golang-1.20.12-2 +- Restore the "--with ignore_tests" rpmbuild option -* Fri Nov 13 2020 Jakub Čajka - 1.15.5-1 +* Thu Nov 23 2023 Dave Dykstra - 1.20.10-3 +- Skip ppc64le_cgo_inline_plt test which is failing on el7. + +* Thu Nov 23 2023 Dave Dykstra - 1.20.10-2 +- Rebuild to correct day of week on 1.19.13 changelog. + +* Thu Nov 23 2023 Dave Dykstra - 1.20.10-1 +- Update to 1.20.10 by doing the equivalent changes done in RedHat ubi8. + +* Mon Oct 16 2023 Dave Dykstra - 1.19.13-1 +- Update to 1.19.13 by doing the equivalent changes done in RedHat ubi8. + +* Thu Jun 29 2023 Dave Dykstra - 1.19.10-1 +- Update to 1.19.10 by doing the equivalent changes done in RedHat ubi8. + +* Fri May 26 2023 Dave Dykstra - 1.19.9-1 +- Update to 1.19.9 by doing the equivalent changes as centos8-stream. + +* Tue May 16 2023 Dave Dykstra - 1.19.6-1 +- Update to 1.19.6 by doing the equivalent changes as centos8-stream. + +* Tue May 16 2023 Dave Dykstra - 1.19.4-1 +- Update to 1.19.4 by doing the equivalent changes as centos8-stream. + +* Wed Jan 25 2023 Dave Dykstra - 1.18.9-1 +- Update to 1.18.9 by doing the equivalent changes as centos8-stream. + +* Wed Nov 30 2022 Dave Dykstra - 1.18.4-1 +- Update to 1.18.4 by doing the equivalent changes as centos8-stream. + +* Mon Aug 1 2022 Dave Dykstra - 1.17.12-1 +- Update to 1.17.12 by doing the equivalent changes as centos8-stream. + +* Thu Jun 30 2022 Dave Dykstra - 1.17.10-1 +- Update to 1.17.10 by cherry-picking the commit from centos8-stream. + +* Tue May 10 2022 Dave Dykstra - 1.17.7-1 +- Update to 1.17.7, based on centos8-stream packaging except keeping + go-srpm-macros and the "--with ignore_tests" rpmbuild option + +* Thu Jan 20 2022 Dave Dykstra - 1.16.13-2 +- Add back providing go-srpm-macros on rhel 7 + +* Tue Jan 18 2022 Dave Dykstra - 1.16.13-1 +- Update to go1.16.13, copied from f35 + +* Tue Jul 27 2021 Jakub Čajka - 1.15.14-1 +- Update to go1.15.14 +- Fix crash in VDSO calls on ppc64le +- Security fix for CVE-2020-28851, CVE-2020-28852, CVE-2021-3114, CVE-2021-3115, CVE-2021-27918, CVE-2021-31525, CVE-2021-33198, CVE-2021-33197, CVE-2021-33195 and CVE-2021-34558 +- Resolves: BZ#1913336, BZ#1913365, BZ#1918752, BZ#1918762, BZ#1937902, BZ#1958342, BZ#1989576, BZ#1989571, BZ#1989565 and BZ#1986200 + +* Mon Nov 16 2020 Jakub Čajka - 1.15.5-1 - Rebase to go1.15.5 - Security fix for CVE-2020-28362, CVE-2020-28367 and CVE-2020-28366 -- Resolves: BZ#1897342, BZ#1897636, BZ#1897644, BZ#1897647 - -* Fri Nov 06 2020 Jakub Čajka - 1.15.4-1 -- Rebase to go1.15.4 -- Resolves: BZ#1895189 - -* Thu Oct 15 2020 Jakub Čajka - 1.15.3-1 -- Rebase to go1.15.3 -- Resolves: BZ#1888443 +- Resolves: BZ#1897637, BZ#1897645 and BZ#1897648 * Thu Sep 10 2020 Jakub Čajka - 1.15.2-1 - Rebase to go1.15.2 -- Resolves: BZ#1877565 - -* Thu Sep 03 2020 Jakub Čajka - 1.15.1-1 -- Rebase to go1.15.1 - Security fix for CVE-2020-24553 -- Resolves: BZ#1874858, BZ#1866892 +- Resolves: BZ#1874859 -* Wed Aug 12 2020 Jakub Čajka - 1.15-1 -- Rebase to go1.15 proper -- Resolves: BZ#1859241, BZ#1866892 +* Tue Aug 25 2020 Jakub Čajka - 1.15-1 +- Rebase to go1.15 +- Security fix for CVE-2020-16845 and CVE-2020-14040 +- Resolves BZ#1867100 and BZ#1853654 -* Mon Aug 10 2020 Jakub Čajka - 1.15-0.rc2.0 -- Rebase to go1.15rc1 -- Security fix for CVE-2020-16845 -- Resolves: BZ#1867101 -- Related: BZ#1859241 +* Mon Jul 20 2020 Jakub Čajka - 1.13.14-1 +- Rebase to go1.13.14 +- Fix for CVE-2020-15586 +- Resolves: BZ#1856956 -* Mon Jul 27 2020 Fedora Release Engineering - 1.15-0.rc1.0.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild +* Mon May 18 2020 Álex Sáez - 1.13.11-1 +- Rebase to go1.13.11 -* Mon Jul 27 2020 Jakub Čajka - 1.15-0.rc1.0 -- Rebase to go1.15rc1 -- Related: BZ#1859241 - -* Mon Jul 20 2020 Jakub Čajka - 1.15-0.beta1.0 -- Rebase to go1.15beta1 - -* 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 +* Mon Feb 03 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 +* Wed Nov 13 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 +* Wed Oct 30 2019 Jakub Čajka - 1.13.3-1 - Rebase to go1.13.3 - Fix for CVE-2019-17596 -- Resolves: BZ#1755639, BZ#1763312 +- Resolves: BZ#1763311 -* Fri Sep 27 2019 Jakub Čajka - 1.13.1-1 +* Sat Oct 5 2019 Jakub Čajka - 1.13.1-1 - Rebase to go1.13.1 - Fix for CVE-2019-16276 -- Resolves: BZ#1755970 +- Resolves: BZ#1755971 -* 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 +* Tue Sep 10 2019 Jakub Čajka - 1.13-1 - Rebase to go1.13 +- Fix for CVE-2019-9512, CVE-2019-9514, CVE-2019-14809 +- Resolves: BZ#1741815, BZ#1741826, BZ#1743130 -* 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 +* Thu Aug 08 2019 Jakub Čajka - 1.11.12-1 +- Rebase to 1.11.12 -* 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 +* Mon Feb 04 2019 Jakub Čajka - 1.11.5-1 +- Rebase to go1.11.5 - Fix for CVE-2019-6486 -- Resolves: BZ#1668973 - -* Fri Jan 11 2019 Jakub Čajka - 1.12-0.beta2.1 -- Rebase to go1.12beta2 +- Resolves: BZ#1668975 * 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 +- Resolves: BZ#1664332 -* Mon Nov 05 2018 Jakub Čajka - 1.11.2-1 +* Fri Nov 30 2018 Jakub Čajka - 1.11.2-3 +- add ppc64le proper + +* Mon Nov 26 2018 Jakub Čajka - 1.11.2-2 +- fix up macros file for aarch64 + +* Fri Nov 23 2018 Jakub Čajka - 1.11.2-1 - Rebase to go1.11.2 -* Thu Oct 04 2018 Jakub Čajka - 1.11.1-1 +* Sun Oct 07 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 +* Mon Jun 11 2018 Jakub Čajka - 1.9.7-1 +- Rebase to 1.9.7 -* Thu Aug 23 2018 Jakub Čajka - 1.11-0.rc2.1 -- Rebase to go1.11rc2 -- Reduce size of bin package +* Thu May 10 2018 Jakub Čajka - 1.9.6-1 +- Rebase to 1.9.6 -* 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 +* Tue Mar 20 2018 Jakub Čajka - 1.9.4-1 +- Rebase to 1.9.4 +- Fix CVE-2018-6574 and CVE-2018-7187 +- Resolves: BZ#1543561, BZ#1543563, BZ#1546386, BZ#1546387 * Thu Oct 26 2017 Jakub Čajka - 1.9.2-1 - Rebase to 1.9.2 diff --git a/macros.golang b/macros.golang new file mode 100644 index 0000000..de6c610 --- /dev/null +++ b/macros.golang @@ -0,0 +1,8 @@ +# Where to set GOPATH for builds. Like: +# export GOPATH=$(pwd)/_build:%{gopath} +%gopath %{_datadir}/gocode + +# for use like: +# ExclusiveArch: %{go_arches} +%go_arches %{ix86} x86_64 %{arm} aarch64 ppc64le + diff --git a/skip-test-overlong-message.patch b/skip-test-overlong-message.patch new file mode 100644 index 0000000..1e14393 --- /dev/null +++ b/skip-test-overlong-message.patch @@ -0,0 +1,15 @@ +diff --git a/src/crypto/rsa/pkcs1v15_test.go b/src/crypto/rsa/pkcs1v15_test.go +index 0853178e3a..16eb37734b 100644 +--- a/src/crypto/rsa/pkcs1v15_test.go ++++ b/src/crypto/rsa/pkcs1v15_test.go +@@ -247,6 +247,10 @@ func TestVerifyPKCS1v15(t *testing.T) { + } + + func TestOverlongMessagePKCS1v15(t *testing.T) { ++ // OpenSSL now returns a random string instead of an error ++ if boring.Enabled() { ++ t.Skip("Not relevant in boring mode") ++ } + ciphertext := decodeBase64("fjOVdirUzFoLlukv80dBllMLjXythIf22feqPrNo0YoIjzyzyoMFiLjAc/Y4krkeZ11XFThIrEvw\nkRiZcCq5ng==") + _, err := DecryptPKCS1v15(nil, rsaPrivateKey, ciphertext) + if err == nil { diff --git a/skip_ppc64le_cgo_inline_plt.patch b/skip_ppc64le_cgo_inline_plt.patch new file mode 100644 index 0000000..4d9621f --- /dev/null +++ b/skip_ppc64le_cgo_inline_plt.patch @@ -0,0 +1,11 @@ +--- go-go1.20.10/src/cmd/go/testdata/script/test_ppc64le_cgo_inline_plt.txt.O 2023-11-23 18:00:03.852336353 -0600 ++++ go-go1.20.10/src/cmd/go/testdata/script/test_ppc64le_cgo_inline_plt.txt 2023-11-23 18:00:23.014888719 -0600 +@@ -12,6 +12,8 @@ + [!cgo] skip + [!GOARCH:ppc64le] skip + ++skip # does not work on el7 ++ + env CGO_CFLAGS='-fno-plt -O2 -g' + + go build -ldflags='-linkmode=internal' diff --git a/skip_test_rhbz1939923.patch b/skip_test_rhbz1939923.patch new file mode 100644 index 0000000..555ed3b --- /dev/null +++ b/skip_test_rhbz1939923.patch @@ -0,0 +1,12 @@ +diff --git a/src/crypto/x509/x509_test.go b/src/crypto/x509/x509_test.go +index b1cdabb..09eaace 100644 +--- a/src/crypto/x509/x509_test.go ++++ b/src/crypto/x509/x509_test.go +@@ -2993,6 +2993,7 @@ func (bs *brokenSigner) Sign(_ io.Reader, _ []byte, _ crypto.SignerOpts) ([]byte + } + + func TestCreateCertificateBrokenSigner(t *testing.T) { ++ t.Skip("TODO Fix me: rhbz#1939923") + template := &Certificate{ + SerialNumber: big.NewInt(10), + DNSNames: []string{"example.com"}, diff --git a/sources b/sources index d81e4cd..052e19b 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (go1.15.6.src.tar.gz) = f20e495204f32170d6554e8f4b64763dae8302a7859005020f650d1d53a5b15de3afbaff28e0b6418287396166c67bdc4c6bee7a0fd7ba8a87bb79b6c1d38326 +SHA512 (go1.20.12.tar.gz) = d991638d4aa6705abd5ebb9ef8c9dc648a2b720d194cfc4343e5432d0c2fed264c296f64771673258527ccfaac5183c4e6822b1c13df7ed805b910e4d61dbec5 +SHA512 (go1.20.12-1-openssl-fips.tar.gz) = 4befbe4532cfb49e400ad097373cfad63c49ae9dae40d78fd703695ba8b9b29e2f9f6df668dd33b7c8706ddba8e3480aa1e7655dd80727907931797004e25598