From d6bb6b5a952f142e68db9729f2de2fc1cfd79c31 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Tue, 17 Dec 2024 06:48:28 +0000 Subject: [PATCH] import UBI golang-1.22.9-1.module+el8.10.0+22500+aee717ef --- .gitignore | 4 +- .golang.metadata | 4 +- SOURCES/disable_static_tests_part1.patch | 351 ++------------------ SOURCES/evp-digest-sign-final.patch | 92 ----- SOURCES/skip_TestCrashDumpsAllThreads.patch | 27 ++ SPECS/golang.spec | 78 +++-- 6 files changed, 106 insertions(+), 450 deletions(-) delete mode 100644 SOURCES/evp-digest-sign-final.patch create mode 100644 SOURCES/skip_TestCrashDumpsAllThreads.patch diff --git a/.gitignore b/.gitignore index 56310c7..d6f8c56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/go1.21.13-4-openssl-fips.tar.gz -SOURCES/go1.21.13.tar.gz +SOURCES/go1.22.9-1-openssl-fips.tar.gz +SOURCES/go1.22.9.tar.gz diff --git a/.golang.metadata b/.golang.metadata index 6c7946e..8bce573 100644 --- a/.golang.metadata +++ b/.golang.metadata @@ -1,2 +1,2 @@ -cfcfc208c18ecffcebe3d6218537f495eb555395 SOURCES/go1.21.13-4-openssl-fips.tar.gz -a6aa471b6f806146bbd4ffec11b70ca834421a2e SOURCES/go1.21.13.tar.gz +af6e318112b0e4fa6f42978d5c80e2c4fc5ca02c SOURCES/go1.22.9-1-openssl-fips.tar.gz +3860690f8aee2de5da3cd46af6e84f4f94bfc5f0 SOURCES/go1.22.9.tar.gz diff --git a/SOURCES/disable_static_tests_part1.patch b/SOURCES/disable_static_tests_part1.patch index 4b27846..2f1adc0 100644 --- a/SOURCES/disable_static_tests_part1.patch +++ b/SOURCES/disable_static_tests_part1.patch @@ -1,18 +1,18 @@ -diff --git a/src/crypto/boring/boring.go b/src/crypto/boring/boring.go -index 47618fe..d93784d 100644 ---- a/src/crypto/boring/boring.go -+++ b/src/crypto/boring/boring.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 - - // Package boring exposes functions that are only available when building with - // Go+BoringCrypto. This package is available on all targets as long as the +From 24aac090069f79307aeceb8362f60a3cc5e60f7f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= +Date: Fri, 3 May 2024 17:25:19 +0200 +Subject: [PATCH] disable_static_tests_part1 + +--- + src/crypto/internal/backend/nobackend.go | 4 ++-- + src/crypto/internal/backend/openssl.go | 4 ++-- + src/crypto/internal/boring/goboringcrypto.h | 1 + + src/crypto/internal/boring/syso/syso.go | 2 +- + src/vendor/github.com/golang-fips/openssl/v2/goopenssl.h | 1 + + 5 files changed, 7 insertions(+), 5 deletions(-) + diff --git a/src/crypto/internal/backend/nobackend.go b/src/crypto/internal/backend/nobackend.go -index 33a53a8..f630ea5 100644 +index 5b0e356dff..a2e17f7fa5 100644 --- a/src/crypto/internal/backend/nobackend.go +++ b/src/crypto/internal/backend/nobackend.go @@ -2,8 +2,8 @@ @@ -21,13 +21,13 @@ index 33a53a8..f630ea5 100644 -//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 ++//go:build !linux || !cgo || android || cmd_go_bootstrap || msan || no_openssl || static || static ++// +build !linux !cgo android cmd_go_bootstrap msan no_openssl static static package backend diff --git a/src/crypto/internal/backend/openssl.go b/src/crypto/internal/backend/openssl.go -index 59370ec..eb81ef6 100644 +index 3d3a9a36ee..7e32d3b0fa 100644 --- a/src/crypto/internal/backend/openssl.go +++ b/src/crypto/internal/backend/openssl.go @@ -2,8 +2,8 @@ @@ -41,18 +41,8 @@ index 59370ec..eb81ef6 100644 // Package openssl provides access to OpenSSLCrypto implementation functions. // Check the variable Enabled to find out whether OpenSSLCrypto is available. -diff --git a/src/crypto/internal/boring/div_test.c b/src/crypto/internal/boring/div_test.c -index f909cc9..8530533 100644 ---- a/src/crypto/internal/boring/div_test.c -+++ b/src/crypto/internal/boring/div_test.c -@@ -1,4 +1,5 @@ - // Copyright 2022 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/goboringcrypto.h b/src/crypto/internal/boring/goboringcrypto.h -index 2b11049..dec1cb2 100644 +index 2b11049728..dec1cb2851 100644 --- a/src/crypto/internal/boring/goboringcrypto.h +++ b/src/crypto/internal/boring/goboringcrypto.h @@ -1,4 +1,5 @@ @@ -62,7 +52,7 @@ index 2b11049..dec1cb2 100644 // 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 +index b3387545e6..db5ea1e3d9 100644 --- a/src/crypto/internal/boring/syso/syso.go +++ b/src/crypto/internal/boring/syso/syso.go @@ -2,7 +2,7 @@ @@ -74,301 +64,16 @@ index b338754..db5ea1e 100644 // This package only exists with GOEXPERIMENT=boringcrypto. // It provides the actual syso file. -diff --git a/src/crypto/tls/fipsonly/fipsonly.go b/src/crypto/tls/fipsonly/fipsonly.go -index e5e4783..a0d9523 100644 ---- a/src/crypto/tls/fipsonly/fipsonly.go -+++ b/src/crypto/tls/fipsonly/fipsonly.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 - - // Package fipsonly restricts all TLS configuration to FIPS-approved settings. - // -diff --git a/src/crypto/tls/fipsonly/fipsonly_test.go b/src/crypto/tls/fipsonly/fipsonly_test.go -index f8485dc..6563ac4 100644 ---- a/src/crypto/tls/fipsonly/fipsonly_test.go -+++ b/src/crypto/tls/fipsonly/fipsonly_test.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 - - package fipsonly - -diff --git a/src/vendor/github.com/golang-fips/openssl/openssl/aes.go b/src/vendor/github.com/golang-fips/openssl/openssl/aes.go -index 079fc3c..e826d0b 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/aes.go -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/ecdh.go b/src/vendor/github.com/golang-fips/openssl/openssl/ecdh.go -index 9537870..c491628 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/ecdh.go -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/ecdsa.go b/src/vendor/github.com/golang-fips/openssl/openssl/ecdsa.go -index 9f46388..87feb18 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/ecdsa.go -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/evp.go b/src/vendor/github.com/golang-fips/openssl/openssl/evp.go -index 46d2bdd..34f4a43 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/evp.go -+++ b/src/vendor/github.com/golang-fips/openssl/openssl/evp.go -@@ -1,5 +1,5 @@ --//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/openssl/goopenssl.h b/src/vendor/github.com/golang-fips/openssl/openssl/goopenssl.h -index ac6c64f..5526db9 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/goopenssl.h -+++ b/src/vendor/github.com/golang-fips/openssl/openssl/goopenssl.h +diff --git a/src/vendor/github.com/golang-fips/openssl/v2/goopenssl.h b/src/vendor/github.com/golang-fips/openssl/v2/goopenssl.h +index e488bf2014..e776aa46a3 100644 +--- a/src/vendor/github.com/golang-fips/openssl/v2/goopenssl.h ++++ b/src/vendor/github.com/golang-fips/openssl/v2/goopenssl.h @@ -1,4 +1,5 @@ - // Copyright 2017 The Go Authors. All rights reserved. + // This header file describes the OpenSSL ABI as built for use in Go. +// +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/openssl/hkdf.go b/src/vendor/github.com/golang-fips/openssl/openssl/hkdf.go -index 2e21224..83da261 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/hkdf.go -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/hmac.go b/src/vendor/github.com/golang-fips/openssl/openssl/hmac.go -index 3af1924..57a525a 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/hmac.go -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/notboring.go b/src/vendor/github.com/golang-fips/openssl/openssl/notboring.go -index 5093cde..0610495 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/notboring.go -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/openssl.go b/src/vendor/github.com/golang-fips/openssl/openssl/openssl.go -index 17a9034..db51ced 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/openssl.go -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/openssl_ecdsa_signature.c b/src/vendor/github.com/golang-fips/openssl/openssl/openssl_ecdsa_signature.c -index 7ce9833..fe66288 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/openssl_ecdsa_signature.c -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/openssl_evp.c b/src/vendor/github.com/golang-fips/openssl/openssl/openssl_evp.c -index a45ed60..2b541fd 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/openssl_evp.c -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/openssl_lock_setup.c b/src/vendor/github.com/golang-fips/openssl/openssl/openssl_lock_setup.c -index 49d40a7..3b3dbf8 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/openssl_lock_setup.c -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/openssl_port_aead_gcm.c b/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_aead_gcm.c -index 7eb645e..1c3225a 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_aead_gcm.c -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/openssl_port_ctr128.c b/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_ctr128.c -index df4ebe3..876393b 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_ctr128.c -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/openssl_port_ecdh.c b/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_ecdh.c -index 8205b04..dcd751d 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_ecdh.c -+++ b/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_ecdh.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/openssl/openssl_port_evp_md5_sha1.c b/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_evp_md5_sha1.c -index 2eedd5b..04510d3 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_evp_md5_sha1.c -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/openssl_port_hmac.c b/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_hmac.c -index a5996d6..2552081 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_hmac.c -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/openssl_port_rsa.c b/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_rsa.c -index e214929..c9f6887 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_rsa.c -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/openssl_stub_rand.c b/src/vendor/github.com/golang-fips/openssl/openssl/openssl_stub_rand.c -index 22bd865..b7aa26b 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/openssl_stub_rand.c -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/rand.go b/src/vendor/github.com/golang-fips/openssl/openssl/rand.go -index b3668b8..dcdae70 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/rand.go -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/rsa.go b/src/vendor/github.com/golang-fips/openssl/openssl/rsa.go -index 7870b93..564db24 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/rsa.go -+++ b/src/vendor/github.com/golang-fips/openssl/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/openssl/sha.go b/src/vendor/github.com/golang-fips/openssl/openssl/sha.go -index 0b55ced..57309c0 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/sha.go -+++ b/src/vendor/github.com/golang-fips/openssl/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 + #include // size_t +-- +2.44.0 + diff --git a/SOURCES/evp-digest-sign-final.patch b/SOURCES/evp-digest-sign-final.patch deleted file mode 100644 index 928f707..0000000 --- a/SOURCES/evp-digest-sign-final.patch +++ /dev/null @@ -1,92 +0,0 @@ -diff --git a/src/vendor/github.com/golang-fips/openssl/openssl/goopenssl.h b/src/vendor/github.com/golang-fips/openssl/openssl/goopenssl.h -index ac6c64f86d..5213b841dc 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/goopenssl.h -+++ b/src/vendor/github.com/golang-fips/openssl/openssl/goopenssl.h -@@ -264,7 +264,7 @@ int _goboringcrypto_HMAC_Update(GO_HMAC_CTX *ctx, - int _goboringcrypto_HMAC_CTX_reset(GO_HMAC_CTX *ctx); - void _goboringcrypto_HMAC_CTX_free(GO_HMAC_CTX *ctx); - int _goboringcrypto_HMAC_Final(GO_HMAC_CTX *ctx, -- unsigned char *md, unsigned int *len); -+ unsigned char *md, unsigned int len); - - #include - #include -diff --git a/src/vendor/github.com/golang-fips/openssl/openssl/hmac.go b/src/vendor/github.com/golang-fips/openssl/openssl/hmac.go -index 3af1924884..c76d6690aa 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/hmac.go -+++ b/src/vendor/github.com/golang-fips/openssl/openssl/hmac.go -@@ -121,7 +121,9 @@ func (h *boringHMAC) finalize() { - - func (h *boringHMAC) Write(p []byte) (int, error) { - if len(p) > 0 { -- C._goboringcrypto_HMAC_Update(h.ctx, (*C.uint8_t)(unsafe.Pointer(&p[0])), C.size_t(len(p))) -+ if C._goboringcrypto_HMAC_Update(h.ctx, (*C.uint8_t)(unsafe.Pointer(&p[0])), C.size_t(len(p))) == 0 { -+ panic("boringcrypto: HMAC_Update failed") -+ } - } - runtime.KeepAlive(h) - return len(p), nil -@@ -136,10 +138,12 @@ func (h *boringHMAC) BlockSize() int { - } - - func (h *boringHMAC) Sum(in []byte) []byte { -+ size := h.Size() - if h.sum == nil { -- size := h.Size() - h.sum = make([]byte, size) - } -- C._goboringcrypto_HMAC_Final(h.ctx, (*C.uint8_t)(unsafe.Pointer(&h.sum[0])), nil) -+ if C._goboringcrypto_HMAC_Final(h.ctx, (*C.uint8_t)(unsafe.Pointer(&h.sum[0])), C.uint(size)) == 0 { -+ panic("boringcrypto: HMAC_Final failed") -+ } - return append(in, h.sum...) - } -diff --git a/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_hmac.c b/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_hmac.c -index d26ce90c82..f7dabb25e0 100644 ---- a/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_hmac.c -+++ b/src/vendor/github.com/golang-fips/openssl/openssl/openssl_port_hmac.c -@@ -115,10 +115,10 @@ void _goboringcrypto_HMAC_CTX_free(GO_HMAC_CTX *ctx) - } - - int _goboringcrypto_HMAC_Final(GO_HMAC_CTX *ctx, -- unsigned char *md, unsigned int *len) -+ unsigned char *md, unsigned int len) - { - EVP_MD_CTX *mdctx = NULL; -- size_t slen; -+ size_t slen = len; - int ret = 0; - - mdctx = _goboringcrypto_EVP_MD_CTX_create(); -@@ -128,9 +128,10 @@ int _goboringcrypto_HMAC_Final(GO_HMAC_CTX *ctx, - if (_goboringcrypto_internal_EVP_MD_CTX_copy_ex(mdctx, ctx->mdctx) != 1) - goto err; - -- ret = _goboringcrypto_EVP_DigestSignFinal(mdctx, md, &slen); -- if (ret == 1 && len) -- *len = slen; -+ if (_goboringcrypto_EVP_DigestSignFinal(mdctx, md, &slen) != 1) -+ goto err; -+ -+ ret = 1; - - err: - _goboringcrypto_EVP_MD_CTX_free(mdctx); -@@ -219,7 +220,7 @@ void _goboringcrypto_HMAC_CTX_free(GO_HMAC_CTX *ctx) - } - - int _goboringcrypto_HMAC_Final(GO_HMAC_CTX *ctx, -- unsigned char *md, unsigned int *len) -+ unsigned char *md, unsigned int len) - { - HMAC_CTX hctx; - int ret; -@@ -228,7 +229,7 @@ int _goboringcrypto_HMAC_Final(GO_HMAC_CTX *ctx, - if (ret != 1) - return ret; - -- ret = _goboringcrypto_internal_HMAC_Final(&hctx, md, len); -+ ret = _goboringcrypto_internal_HMAC_Final(&hctx, md, &len); - _goboringcrypto_internal_HMAC_CTX_cleanup(&hctx); - return ret; - } diff --git a/SOURCES/skip_TestCrashDumpsAllThreads.patch b/SOURCES/skip_TestCrashDumpsAllThreads.patch new file mode 100644 index 0000000..92e7eca --- /dev/null +++ b/SOURCES/skip_TestCrashDumpsAllThreads.patch @@ -0,0 +1,27 @@ +From fdcaf4e6876cfd910c3da672564be4a6e829047c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= +Date: Wed, 27 Mar 2024 17:15:48 +0100 +Subject: [PATCH] Skip TestCrashDumpsAllThreads + +--- + src/runtime/crash_unix_test.go | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/runtime/crash_unix_test.go b/src/runtime/crash_unix_test.go +index 123a462423..a0034d6455 100644 +--- a/src/runtime/crash_unix_test.go ++++ b/src/runtime/crash_unix_test.go +@@ -74,6 +74,10 @@ func TestCrashDumpsAllThreads(t *testing.T) { + t.Skip("skipping; SIGQUIT is blocked, see golang.org/issue/19196") + } + ++ if runtime.GOOS == "linux" && runtime.GOARCH == "s390x" { ++ t.Skip("skipping; frequent TestCrashDumpsAllThreads failures on linux/s390x, see golang.org/issue/64650") ++ } ++ + testenv.MustHaveGoBuild(t) + + if strings.Contains(os.Getenv("GOFLAGS"), "mayMoreStackPreempt") { +-- +2.44.0 + diff --git a/SPECS/golang.spec b/SPECS/golang.spec index 3413cd7..70d7fd4 100644 --- a/SPECS/golang.spec +++ b/SPECS/golang.spec @@ -91,13 +91,13 @@ %global gohostarch s390x %endif -%global go_api 1.21 -%global version 1.21.13 -%global pkg_release 4 +%global go_api 1.22 +%global version 1.22.9 +%global pkg_release 1 Name: golang Version: %{version} -Release: 3%{?dist} +Release: 1%{?dist} Summary: The Go Programming Language # source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain @@ -145,8 +145,7 @@ Patch1939923: skip_test_rhbz1939923.patch Patch2: disable_static_tests_part1.patch Patch3: disable_static_tests_part2.patch Patch5: modify_go.env.patch - -Patch231: evp-digest-sign-final.patch +Patch7: skip_TestCrashDumpsAllThreads.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -246,8 +245,8 @@ popd patch_dir="../go-go%{version}-%{pkg_release}-openssl-fips/patches" # Add --no-backup-if-mismatch option to avoid creating .orig temp files for p in "$patch_dir"/*.patch; do - echo "Applying $p" - patch -p1 --no-backup-if-mismatch < $p + echo "Applying $p" + patch -p1 --no-backup-if-mismatch < $p done # Configure crypto tests @@ -453,11 +452,12 @@ export GO_TEST_RUN="" # Run tests with FIPS enabled. export GOLANG_FIPS=1 +export OPENSSL_FORCE_FIPS_MODE=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 + go test -timeout 50m $(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 + CGO_ENABLED=0 go test -timeout 50m $(go list ./... | grep -v tls) -v popd # Run all FIPS specific TLS tests pushd crypto/tls @@ -521,37 +521,53 @@ cd .. %endif %changelog -* Tue Oct 01 2024 David Benoit - 1.21.13-3 -- Add evp-digest-sign-final.patch -- Resolves: RHEL-61109 +* Thu Nov 14 2024 David Benoit - 1.22.9-1 +- Update to Go 1.22.9 +- Resolves: RHEL-67668 -* Mon Sep 16 2024 David Benoit - 1.21.13-2 -- Rebuild Go with CVE Fixes -- Remove fix-memleak-setupRSA.patch (exists upstream) +* Mon Sep 16 2024 David Benoit - 1.22.7-1 +- Update to Go 1.22.7 - Resolves: RHEL-58223 - Resolves: RHEL-57961 - Resolves: RHEL-57847 - Resolves: RHEL-57860 -* Wed Aug 21 2024 Archana - 1.21.13-1 -- Update to Go1.21.13 to fix CVE-2024-24791 -- Resolves: RHEL-47198 +* Fri Sep 06 2024 Archana - 1.22.5-3 +- Update fix that loads Openssl in FIPS mode if fips==1 +- Related: RHEL-52485 -* Wed Jun 12 2024 Archana Ravindar - 1.21.11-1 -- Update to Go1.21.11 to address CVE-2024-24789 and CVE-2024-24790 -- Resolves: RHEL-40274 +* Mon Sep 02 2024 Archana - 1.22.5-2 +- Include fix that loads Openssl only in FIPS mode to avoid panic +- Resolves: RHEL-52485 -* Thu May 23 2024 David Benoit - 1.21.10 -- Update to Go 1.21.10 -- Resolves: RHEL-36993 +* Fri Jul 12 2024 Archana - 1.22.5-1 +- Rebase to Go1.22.5 to fix CVE-2024-24791 +- Resolves: RHEL-46972 -* Fri Apr 12 2024 David Benoit - 1.21.9-1 -- Fix CVE-2023-45288 -- Resolves: RHEL-31915 +* Fri Jun 07 2024 Archana - 1.22.4-1 +- Addresses CVEs-2024-24789 and CVE-2024-24790 +- Resolves: RHEL-40157 -* Mon Apr 1 2024 Archana Ravindar - 1.21.7-2 -- Fix CVE-2024-1394 -- Resolves RHEL-24300 +* Thu May 30 2024 Derek Parker - 1.22.3-3 +- Update openssl backend +- Resolves: RHEL-36102 + +* Thu May 23 2024 Derek Parker - 1.22.3-2 +- Restore HashSign / HashVerify API +- Resolves: RHEL-35884 + +* Thu May 23 2024 David Benoit - 1.22.3-1 +- Update to Go 1.22.3 +- Resolves: RHEL-35884 +- Resolves: RHEL-35075 +- Resolves: RHEL-35632 +- Resolves: RHEL-35901 + +* Thu May 02 2024 Alejandro Sáez - 1.22.2-1 +- Rebase to 1.22.2 +- Re-enable CGO +- Skip TestCrashDumpsAllThreads +- Resolves: RHEL-33157 * Tue Feb 13 2024 Alejandro Sáez - 1.21.7-1 - Rebase to Go 1.21.7