From 6b070242ee6b2cfbd28eadeb22aa5329cb931d79 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Thu, 20 Nov 2025 11:29:31 +0000 Subject: [PATCH] import UBI golang-1.25.3-1.el10_1 --- .gitignore | 4 +- golang.spec | 107 ++++++++++++++++++++++++++++++++++---------- revert_dwarf5.patch | 42 +++++++++++++++++ sources | 4 +- 4 files changed, 130 insertions(+), 27 deletions(-) create mode 100644 revert_dwarf5.patch diff --git a/.gitignore b/.gitignore index ef3e25a..690c123 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ compiler-rt-18.1.8.src.tar.xz -go1.24.6-1-openssl-fips.tar.gz -go1.24.6.src.tar.gz +go1.25.3-1-openssl-fips.tar.gz +go1.25.3.src.tar.gz diff --git a/golang.spec b/golang.spec index 04e2ac5..432ec6c 100644 --- a/golang.spec +++ b/golang.spec @@ -17,6 +17,14 @@ %bcond_with ignore_tests %endif +# Enable race by default +%global race 1 + +# Disable race on riscv64 as it's not supported +%ifarch riscv64 +%global race 0 +%endif + # build ids are not currently generated: # https://code.google.com/p/go/issues/detail?id=5238 # @@ -114,10 +122,10 @@ %global gohostarch riscv64 %endif -%global go_api 1.24 +%global go_api 1.25 # Use only for prerelease versions #global go_prerelease rc3 -%global go_patch 6 +%global go_patch 3 %global go_version %{go_api}%{?go_patch:.%{go_patch}}%{?go_prerelease:~%{go_prerelease}} %global go_source %{go_api}%{?go_patch:.%{go_patch}}%{?go_prerelease} # Go FIPS package release @@ -188,25 +196,33 @@ Provides: go = %{version}-%{release} %if 0%{?fedora} # Bundled/Vendored provides generated by bundled-deps.sh based on the in tree module data -Provides: bundled(golang(github.com/google/pprof)) = 0.0.0.20221118152302.e6195bd50e26 -Provides: bundled(golang(github.com/ianlancetaylor/demangle)) = 0.0.0.20220319035150.800ac71e25c2 -Provides: bundled(golang(golang.org/x/arch)) = 0.4.0 -Provides: bundled(golang(golang.org/x/crypto)) = 0.11.1.0.20230711161743.2e82bdd1719d -Provides: bundled(golang(golang.org/x/mod)) = 0.12.0 -Provides: bundled(golang(golang.org/x/net)) = 0.12.1.0.20230712162946.57553cbff163 -Provides: bundled(golang(golang.org/x/sync)) = 0.3.0 -Provides: bundled(golang(golang.org/x/sys)) = 0.10.0 -Provides: bundled(golang(golang.org/x/term)) = 0.10.0 -Provides: bundled(golang(golang.org/x/text)) = 0.11.0 -Provides: bundled(golang(golang.org/x/tools)) = 0.11.1.0.20230712164437.1ca21856af7b +Provides: bundled(golang(github.com/google/pprof)) = 0.0.0.20250208200701.d0013a598941 +Provides: bundled(golang(github.com/ianlancetaylor/demangle)) = 0.0.0.20240912202439.0a2b6291aafd +Provides: bundled(golang(golang.org/x/arch)) = 0.18.1.0.20250605182141.b2f4e2807dec +Provides: bundled(golang(golang.org/x/build)) = 0.0.0.20250606033421.8c8ff6f34a83 +Provides: bundled(golang(golang.org/x/crypto)) = 0.39.0 +Provides: bundled(golang(golang.org/x/mod)) = 0.25.0 +Provides: bundled(golang(golang.org/x/net)) = 0.41.0 +Provides: bundled(golang(golang.org/x/sync)) = 0.15.0 +Provides: bundled(golang(golang.org/x/sys)) = 0.33.0 +Provides: bundled(golang(golang.org/x/telemetry)) = 0.0.0.20250606142133.60998feb31a8 +Provides: bundled(golang(golang.org/x/term)) = 0.32.0 +Provides: bundled(golang(golang.org/x/text)) = 0.26.0 +Provides: bundled(golang(golang.org/x/tools)) = 0.27.0 +Provides: bundled(golang(golang.org/x/tools)) = 0.34.0 +Provides: bundled(golang(rsc.io/markdown)) = 0.0.0.20240306144322.0bf8f97ee8ef %endif Requires: %{name}-bin = %{version}-%{release} Requires: %{name}-src = %{version}-%{release} +%if %{race} Requires: %{name}-race = %{version}-%{release} +%endif Patch1: 0001-Modify-go.env.patch Patch6: 0006-Default-to-ld.bfd-on-ARM64.patch +# Related: https://sourceware.org/bugzilla/show_bug.cgi?id=33204 +Patch7: revert_dwarf5.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -334,12 +350,14 @@ Requires: delve %description -n go-toolset This is the main package for go-toolset. +%if %{race} %package race Summary: Race detetector library object files. Requires: %{name} = %{version}-%{release} %description race Binary library objects for Go's race detector. +%endif %prep @@ -400,6 +418,7 @@ tsan_go_dir="../llvm/compiler-rt-%{llvm_compiler_rt_version}.src/lib/tsan/go" # by just reading GOARCH directly from Go. export GOARCH=$(go env GOARCH) +%if %{race} %ifarch x86_64 pushd "${tsan_go_dir}" CFLAGS="%{tsan_buildflags} %{tsan_optflag}" CC=clang GOAMD64=v3 ./buildgo.sh @@ -407,7 +426,7 @@ popd cp "${tsan_go_dir}"/race_linux_amd64.syso ./src/runtime/race/internal/amd64v3/race_linux.syso pushd "${tsan_go_dir}" - CFLAGS="%{tsan_buildflags} %{tsan_optflag}" CC=clang GOAMD64=v1 ./buildgo.sh + CFLAGS="%{tsan_buildflags} %{tsan_optflag}" CC=clang GOAMD64=v3 ./buildgo.sh popd cp "${tsan_go_dir}"/race_linux_amd64.syso ./src/runtime/race/internal/amd64v1/race_linux.syso @@ -417,6 +436,7 @@ pushd "${tsan_go_dir}" popd cp "${tsan_go_dir}"/race_linux_%{gohostarch}.syso ./src/runtime/race/race_linux_%{gohostarch}.syso %endif +%endif # bootstrap compiler GOROOT %if !%{golang_bootstrap} @@ -430,6 +450,8 @@ export GOROOT_FINAL=%{goroot} export GOHOSTOS=linux export GOHOSTARCH=%{gohostarch} +export GOAMD64=v3 +export GOPPC64='power9' pushd src # use our gcc options for this build, but store gcc as default for compiler @@ -439,6 +461,8 @@ export CC="gcc" export CC_FOR_TARGET="gcc" export GOOS=linux export GOARCH=%{gohostarch} +export GOAMD64=v3 +export GOPPC64='power9' DEFAULT_GO_LD_FLAGS="" %if !%{external_linker} @@ -462,7 +486,9 @@ popd GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -buildmode=shared -v -x std %endif +%if %{race} GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -race std +%endif %install rm -rf $RPM_BUILD_ROOT @@ -584,6 +610,8 @@ go env export CC="gcc" export CFLAGS="$RPM_OPT_FLAGS" export LDFLAGS="$RPM_LD_FLAGS" +export GOAMD64=v3 +export GOPPC64='power9' %if !%{external_linker} export GO_LDFLAGS="-linkmode internal" %else @@ -670,12 +698,14 @@ fi %{_sysconfdir}/prelink.conf.d %files src -f go-src.list +%if %{race} %ifarch x86_64 %exclude %{goroot}/src/runtime/race/internal/amd64v1/race_linux.syso %exclude %{goroot}/src/runtime/race/internal/amd64v3/race_linux.syso %else %exclude %{goroot}/src/runtime/race/race_linux_%{gohostarch}.syso %endif +%endif %files docs -f go-docs.list @@ -696,6 +726,7 @@ fi %files -n go-toolset +%if %{race} %files race %ifarch x86_64 %{goroot}/src/runtime/race/internal/amd64v1/race_linux.syso @@ -703,24 +734,54 @@ fi %else %{goroot}/src/runtime/race/race_linux_%{gohostarch}.syso %endif +%endif %changelog ## START: Generated by rpmautospec +* Wed Oct 29 2025 Alejandro Sáez - 1.25.3-1 +- Update to Go 1.25.3 + +* Tue Sep 30 2025 Archana - 1.25.1-1 +- Update to Go1.25.1 -Resolves: RHEL-116849 + +* Thu Sep 11 2025 Louis Abel - 1.25.0-5 +- Disable race for risv64 + +* Wed Sep 10 2025 Alejandro Sáez - 1.25.0-4 +- Revert DWARF5 defaults + +* Fri Sep 05 2025 Edjunior Machado - 1.25.0-3 +- Update CI support + +* Fri Aug 29 2025 Edjunior Machado - 1.25.0-2 +- rpminspect.yaml: Add preprofile binary as it contains debugging symbols + +* Wed Aug 20 2025 Alejandro Sáez - 1.25.0-1 +- Update to Go 1.25.0 + * Wed Aug 13 2025 David Benoit - 1.24.6-1 - Update to Go 1.24.6 -* Tue Jul 01 2025 David Benoit - 1.24.4-1 -- Update to Go 1.24.4 +* Mon Jul 21 2025 David Benoit - 1.24.4-3 +- Re enable debuginfo in toolchain binaries -* Thu Jun 12 2025 Archana - 1.23.10-1 -- Update to Go 1.23.10 - Fix for CVE-2025-4673, CVE-2025-0913, and - CVE-2025-22874 - Resolves: RHEL-95999 +* Wed Jun 25 2025 Alejandro Sáez - 1.24.4-2 +- Add LD_FLAGS for stripping binaries -* Thu May 29 2025 Alejandro Sáez - 1.23.9-1 -- Update to Go 1.23.9 +* Fri Jun 13 2025 David Benoit - 1.24.4-1 +- Update to Go 1.24.4 (fips-1) -* Thu Apr 03 2025 Archana - 1.23.7-1 -- Fix negative openssl tests - Rebase to Go1.23.7 - Resolves: RHEL-61205 +* Tue Jun 03 2025 David Benoit - 1.24.3-3 +- Update to Go 1.24.3 (fips-3) + +* Thu May 29 2025 David Benoit - 1.24.3-2 +- Update to Go 1.24.3 (fips-2) + +* Mon May 19 2025 David Benoit - 1.24.3-1 +- Update to Go 1.24.3 + +* Wed Apr 02 2025 Songsong Zhang - 1.23.6-2 +- Enable riscv64 build * Fri Mar 07 2025 Alejandro Sáez - 1.23.6-1 - Update to Go 1.23.6 diff --git a/revert_dwarf5.patch b/revert_dwarf5.patch new file mode 100644 index 0000000..80a58bb --- /dev/null +++ b/revert_dwarf5.patch @@ -0,0 +1,42 @@ +From e90ae9076a108b83c645814f75a574c14a5a4b98 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= +Date: Wed, 27 Aug 2025 16:18:09 +0200 +Subject: [PATCH] Revert DWARF5 as default, use DWARF4 + +--- + src/internal/buildcfg/exp.go | 13 +------------ + 1 file changed, 1 insertion(+), 12 deletions(-) + +diff --git a/src/internal/buildcfg/exp.go b/src/internal/buildcfg/exp.go +index 689ca8ce58..b2ea97481b 100644 +--- a/src/internal/buildcfg/exp.go ++++ b/src/internal/buildcfg/exp.go +@@ -67,24 +67,13 @@ func ParseGOEXPERIMENT(goos, goarch, goexp string) (*ExperimentFlags, error) { + regabiSupported = true + } + +- // Older versions (anything before V16) of dsymutil don't handle +- // the .debug_rnglists section in DWARF5. See +- // https://github.com/golang/go/issues/26379#issuecomment-2677068742 +- // for more context. This disables all DWARF5 on mac, which is not +- // ideal (would be better to disable just for cases where we know +- // the build will use external linking). In the GOOS=aix case, the +- // XCOFF format (as far as can be determined) doesn't seem to +- // support the necessary section subtypes for DWARF-specific +- // things like .debug_addr (needed for DWARF 5). +- dwarf5Supported := (goos != "darwin" && goos != "ios" && goos != "aix") +- + baseline := goexperiment.Flags{ + RegabiWrappers: regabiSupported, + RegabiArgs: regabiSupported, + AliasTypeParams: true, + SwissMap: true, + SyncHashTrieMap: true, +- Dwarf5: dwarf5Supported, ++ Dwarf5: false, + } + + // Start with the statically enabled set of experiments. +-- +2.51.0 + diff --git a/sources b/sources index e2b136c..876bd10 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (compiler-rt-18.1.8.src.tar.xz) = fb8795bd51c9b005c2ad1975591e9e2715740d6407ccad41379f136ef2e8d24ded8b97b01165a3ae4bd377119a6a1049ca05d3220404fc12bee86114ff2bff0d -SHA512 (go1.24.6-1-openssl-fips.tar.gz) = a166edc8f159dee3e2771c76fc98cb66c333166645705cf4b917016cc3650952e06c67cf7021ba3e82138909b2802ac922a530be5b568a1470fdfaa9f187343c -SHA512 (go1.24.6.src.tar.gz) = 65f535c722f4a0f6111c9ed829677621e456a5bc969ccb99009da1ade096b2b1a648a44ccfa913543677c220baeaf1afe634ba8ba165d9474ac9433ac249c914 +SHA512 (go1.25.3-1-openssl-fips.tar.gz) = 4eb308049af031123a8d9745ced4d3d296362b8a5a65cef9542841ce880b0c1e682476f70291192d7ddf7a006bb65f5672019d2508216a448eaeca026402b45c +SHA512 (go1.25.3.src.tar.gz) = 91d32bbff864c06b5ee7b914d3d95c59462352a4c395adba85eaab72704a8aa4d19ac2a361ed64774dce3c8e01a8d4feadf1a788814f6d7b4072a3bdfefbb3b4