From 92fd322c5dbf4bf5b6488be506d3c8ec9c0598de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Wed, 27 Sep 2023 13:17:40 +0200 Subject: [PATCH] Rebase to Go 1.20.8 Remove fix-memory-leak-evp-sign-verify.patch as it is already included in the source Resolves: RHEL-2775 --- .gitignore | 2 ++ fix-memory-leak-evp-sign-verify.patch | 48 --------------------------- golang.spec | 11 +++--- sources | 4 +-- 4 files changed, 11 insertions(+), 54 deletions(-) delete mode 100644 fix-memory-leak-evp-sign-verify.patch diff --git a/.gitignore b/.gitignore index c872a72..24d5a7f 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,5 @@ /go1.20.4-3-openssl-fips.tar.gz /go1.20.6.tar.gz /go1.20.6-1-openssl-fips.tar.gz +/go1.20.8.tar.gz +/go1.20.8-1-openssl-fips.tar.gz diff --git a/fix-memory-leak-evp-sign-verify.patch b/fix-memory-leak-evp-sign-verify.patch deleted file mode 100644 index f2eae14..0000000 --- a/fix-memory-leak-evp-sign-verify.patch +++ /dev/null @@ -1,48 +0,0 @@ -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 76bac5b..24a9615 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 -@@ -43,7 +43,11 @@ int _goboringcrypto_EVP_sign_raw(EVP_MD *md, EVP_PKEY_CTX *ctx, const uint8_t *m - GO_RSA *rsa_key) { - int ret = 0; - GO_EVP_PKEY *pk = _goboringcrypto_EVP_PKEY_new(); -- _goboringcrypto_EVP_PKEY_assign_RSA(pk, rsa_key); -+ if (!pk) -+ return 0; -+ -+ if (!(_goboringcrypto_EVP_PKEY_set1_RSA(pk, rsa_key))) -+ goto err; - - if (!ctx && !(ctx = _goboringcrypto_EVP_PKEY_CTX_new(pk, NULL))) - goto err; -@@ -63,6 +67,8 @@ int _goboringcrypto_EVP_sign_raw(EVP_MD *md, EVP_PKEY_CTX *ctx, const uint8_t *m - err: - if (ctx) - _goboringcrypto_EVP_PKEY_CTX_free(ctx); -+ if (pk) -+ _goboringcrypto_EVP_PKEY_free(pk); - - return ret; - } -@@ -103,7 +109,11 @@ int _goboringcrypto_EVP_verify_raw(const uint8_t *msg, size_t msgLen, - int ret = 0; - EVP_PKEY_CTX *ctx; - GO_EVP_PKEY *pk = _goboringcrypto_EVP_PKEY_new(); -- _goboringcrypto_EVP_PKEY_assign_RSA(pk, rsa_key); -+ if (!pk) -+ return 0; -+ -+ if (!(_goboringcrypto_EVP_PKEY_set1_RSA(pk, rsa_key))) -+ goto err; - - if (!(ctx = _goboringcrypto_EVP_PKEY_CTX_new(pk, NULL))) - goto err; -@@ -123,6 +133,8 @@ int _goboringcrypto_EVP_verify_raw(const uint8_t *msg, size_t msgLen, - err: - if (ctx) - _goboringcrypto_EVP_PKEY_CTX_free(ctx); -+ if (pk) -+ _goboringcrypto_EVP_PKEY_free(pk); - - return ret; - } diff --git a/golang.spec b/golang.spec index eca52d1..a92c999 100644 --- a/golang.spec +++ b/golang.spec @@ -93,13 +93,13 @@ %endif %global go_api 1.20 -%global go_version 1.20.6 +%global go_version 1.20.8 %global version %{go_version} %global pkg_release 1 Name: golang Version: %{version} -Release: 5%{?dist} +Release: 1%{?dist} Summary: The Go Programming Language # source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain License: BSD and Public Domain @@ -149,8 +149,6 @@ Patch1939923: skip_test_rhbz1939923.patch Patch2: disable_static_tests_part1.patch Patch3: disable_static_tests_part2.patch -Patch4: fix-memory-leak-evp-sign-verify.patch - # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -527,6 +525,11 @@ cd .. %files -n go-toolset %changelog +* Wed Sep 27 2023 Alejandro Sáez - 1.20.8-1 +- Rebase to Go 1.20.8 +- Remove fix-memory-leak-evp-sign-verify.patch as it is already included in the source +- Resolves: RHEL-2775 + * Mon Aug 14 2023 Alejandro Sáez - 1.20.6-5 - Retire golang-race package - Resolves: rhbz#2230705 diff --git a/sources b/sources index d98d526..5e61697 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (go1.20.6.tar.gz) = 45990e2bb4ddf84646ecca5814a62b4330063188238b5ab3f9d47f517a227ea7a981fe3d50681f4187462d01d0c1601cb01375f940569a5465b78065a4371cd4 -SHA512 (go1.20.6-1-openssl-fips.tar.gz) = 7e1f9a61b8d419233b41d4592e8741a9d3039120c1fb444cfd7ac229d65a8031ecf1644e1161bc6cf5739ac7ec84e6405eb101f63b5a972ecb6b2ea69cea39e2 +SHA512 (go1.20.8.tar.gz) = 4a5f916551ae3d243e6dc195c0f0b364c39db3888f1ebdcd3edde64c74a99a28d1d26a502d264d4757c12d2b79175a63e9985cbc7166848686374cf28f02c23e +SHA512 (go1.20.8-1-openssl-fips.tar.gz) = 26bc4ebfa1fcc1504e99c971976fcb20f390e9245a56f15485da07c98d7813834bd036262e92e9e40977cfc304c183cc90ad6472323aefeddc0c76f2b8237aa4