From 2df38b16b0b0b4994b3e55b8b08d4f84bafb1080 Mon Sep 17 00:00:00 2001 From: David Benoit Date: Thu, 2 Nov 2023 15:55:37 -0400 Subject: [PATCH] Fix missin go.env in Go 1.21 Related: RHEL-12624 --- 0001-fedora-Modify-go.env.patch | 30 ++++++++++++++++++++++++++++++ golang.spec | 11 +++++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 0001-fedora-Modify-go.env.patch diff --git a/0001-fedora-Modify-go.env.patch b/0001-fedora-Modify-go.env.patch new file mode 100644 index 0000000..d0b18c7 --- /dev/null +++ b/0001-fedora-Modify-go.env.patch @@ -0,0 +1,30 @@ +From 52d9cfec8124a9c7382bed5284246d9b18a21eb4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= +Date: Wed, 16 Aug 2023 07:06:38 +0200 +Subject: [PATCH] Modify go.env + +Change GOPROXY, GOSUMDB, and GOTOOLCHAIN +--- + go.env | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/go.env b/go.env +index 6ff2b921d4..087208cd7c 100644 +--- a/go.env ++++ b/go.env +@@ -4,9 +4,9 @@ + + # Use the Go module mirror and checksum database by default. + # See https://proxy.golang.org for details. +-GOPROXY=https://proxy.golang.org,direct +-GOSUMDB=sum.golang.org ++GOPROXY=direct ++GOSUMDB=off + + # Automatically download newer toolchains as directed by go.mod files. + # See https://go.dev/doc/toolchain for details. +-GOTOOLCHAIN=auto ++GOTOOLCHAIN=local +-- +2.41.0 + diff --git a/golang.spec b/golang.spec index 2558e4f..c3b98ff 100644 --- a/golang.spec +++ b/golang.spec @@ -99,7 +99,7 @@ Name: golang Version: %{version} -Release: 3%{?dist} +Release: 4%{?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 @@ -138,6 +138,8 @@ Requires: %{name}-src = %{version}-%{release} Requires: openssl-devel Requires: diffutils +Patch0001: 0001-fedora-Modify-go.env.patch + # Proposed patch by jcajka https://golang.org/cl/86541 Patch221: fix_TestScript_list_std.patch @@ -335,7 +337,7 @@ 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 lib pkg src misc test VERSION \ +cp -apv api bin doc lib pkg src misc test go.env VERSION \ $RPM_BUILD_ROOT%{goroot} # bz1099206 @@ -518,6 +520,7 @@ cd .. %files -f go-pkg.list bin %{_bindir}/go %{_bindir}/gofmt +%{goroot}/go.env %if %{shared} %files -f go-shared.list shared @@ -526,6 +529,10 @@ cd .. %files -n go-toolset %changelog +* Thu Nov 02 2023 David Benoit - 1.21.3-4 +- Fix missin go.env in Go 1.21 +- Related: RHEL-12624 + * Tue Oct 31 2023 Archana Ravindar - 1.21.3-3 - Add missing strict fips runtime detection patch - Temporarily disable FIPS tests on aarch64 due to builder kernel bugs