From 3066666ea79943d780a955ee83b7036bbfa8857d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Wed, 20 Aug 2025 08:48:32 +0200 Subject: [PATCH 1/3] Update to Go 1.25.0 Set GOAMD64 to v3 and GOPPC64 to power9 to align with new architecture baselines Resolves: RHEL-109556 --- .gitignore | 2 ++ golang.spec | 38 ++++++++++++++++++++++++-------------- sources | 4 ++-- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index c493e91..cfc0ce5 100644 --- a/.gitignore +++ b/.gitignore @@ -167,3 +167,5 @@ /go1.24.4-1-openssl-fips.tar.gz /go1.24.6.src.tar.gz /go1.24.6-1-openssl-fips.tar.gz +/go1.25.0.src.tar.gz +/go1.25.0-1-openssl-fips.tar.gz diff --git a/golang.spec b/golang.spec index 2b37706..215e178 100644 --- a/golang.spec +++ b/golang.spec @@ -104,10 +104,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 0 %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 @@ -178,17 +178,21 @@ 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} @@ -397,7 +401,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 @@ -420,6 +424,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 @@ -429,6 +435,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} @@ -574,6 +582,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 diff --git a/sources b/sources index 4a81b56..c4b4206 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (go1.24.6.src.tar.gz) = 65f535c722f4a0f6111c9ed829677621e456a5bc969ccb99009da1ade096b2b1a648a44ccfa913543677c220baeaf1afe634ba8ba165d9474ac9433ac249c914 -SHA512 (go1.24.6-1-openssl-fips.tar.gz) = a166edc8f159dee3e2771c76fc98cb66c333166645705cf4b917016cc3650952e06c67cf7021ba3e82138909b2802ac922a530be5b568a1470fdfaa9f187343c +SHA512 (go1.25.0.src.tar.gz) = 45030cd02ab0ed4feb74e12ad9dde544bf2255c4d1a48655fca5b643bbe690c75ea3dfac74a0e3e3c707c5af5e9171ae383a7a322e70fe824f9a47b6ffd42201 +SHA512 (go1.25.0-1-openssl-fips.tar.gz) = 060e0d318a96585c61209cb0509d11df62ba47b0f681e3a7fc9448c5ba3f18a4dc672706bd5cf52ee8b433d7e07aaf3cf2f09ed02b69f0e49e5baaffc0cf2213 SHA512 (compiler-rt-18.1.8.src.tar.xz) = fb8795bd51c9b005c2ad1975591e9e2715740d6407ccad41379f136ef2e8d24ded8b97b01165a3ae4bd377119a6a1049ca05d3220404fc12bee86114ff2bff0d From 4f9820fb7d7ea6d1c233f0c9f0e0601bf5e38516 Mon Sep 17 00:00:00 2001 From: Edjunior Machado Date: Wed, 12 Mar 2025 11:10:40 +0000 Subject: [PATCH 2/3] rpminspect.yaml: Add preprofile binary as it contains debugging symbols Related: RHEL-61237 --- rpminspect.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rpminspect.yaml b/rpminspect.yaml index bbe0d5a..1fbe325 100644 --- a/rpminspect.yaml +++ b/rpminspect.yaml @@ -24,6 +24,8 @@ debuginfo: - /usr/lib/golang/pkg/tool/linux_*/test2json - /usr/lib/golang/pkg/tool/linux_*/trace - /usr/lib/golang/pkg/tool/linux_*/vet + # rpminspect: preprofile in golang package contains debugging symbols (RHEL-61237) + - /usr/lib/golang/pkg/tool/linux_*/preprofile # go testdata - /usr/lib/golang/src/debug/dwarf/testdata/*.elf - /usr/lib/golang/src/debug/elf/testdata/* From b47ae1736117f438a6d7c96646396cf8403dcbd6 Mon Sep 17 00:00:00 2001 From: Edjunior Machado Date: Thu, 22 May 2025 14:31:02 +0200 Subject: [PATCH 3/3] Update CI support --- plans/ci.fmf | 5 --- plans/tier0.fmf | 12 +++++ tests/Sanity/basic-smoke/Makefile | 64 --------------------------- tests/Sanity/basic-smoke/PURPOSE | 3 -- tests/Sanity/basic-smoke/main.fmf | 13 ------ tests/Sanity/basic-smoke/runtest.sh | 68 ----------------------------- 6 files changed, 12 insertions(+), 153 deletions(-) delete mode 100644 plans/ci.fmf create mode 100644 plans/tier0.fmf delete mode 100644 tests/Sanity/basic-smoke/Makefile delete mode 100644 tests/Sanity/basic-smoke/PURPOSE delete mode 100644 tests/Sanity/basic-smoke/main.fmf delete mode 100755 tests/Sanity/basic-smoke/runtest.sh diff --git a/plans/ci.fmf b/plans/ci.fmf deleted file mode 100644 index 3fd3ab7..0000000 --- a/plans/ci.fmf +++ /dev/null @@ -1,5 +0,0 @@ -summary: CI Gating Plan -discover: - how: fmf -execute: - how: tmt diff --git a/plans/tier0.fmf b/plans/tier0.fmf new file mode 100644 index 0000000..4b27223 --- /dev/null +++ b/plans/tier0.fmf @@ -0,0 +1,12 @@ +summary: tier0 tests +discover: + - name: rhel + how: fmf + url: https://gitlab.cee.redhat.com/toolchain-qe/tests/golang.git + filter: "tier:0" +execute: + how: tmt + +provision: + hardware: + memory: ">= 4 GB" diff --git a/tests/Sanity/basic-smoke/Makefile b/tests/Sanity/basic-smoke/Makefile deleted file mode 100644 index 801fdb1..0000000 --- a/tests/Sanity/basic-smoke/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /tools/golang/Sanity/basic-smoke -# Description: basic smoke test for go -# Author: Edjunior Machado -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/tools/golang/Sanity/basic-smoke -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Edjunior Machado " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: basic smoke test for go" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: golang" >> $(METADATA) - @echo "Requires: golang" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHEL6 -RHELClient5 -RHELServer5" >> $(METADATA) - @echo "Architectures: s390x x86_64 ppc64le aarch64" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Sanity/basic-smoke/PURPOSE b/tests/Sanity/basic-smoke/PURPOSE deleted file mode 100644 index 263fb91..0000000 --- a/tests/Sanity/basic-smoke/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /tools/golang/Sanity/basic-smoke -Description: basic smoke test for go -Author: Edjunior Machado diff --git a/tests/Sanity/basic-smoke/main.fmf b/tests/Sanity/basic-smoke/main.fmf deleted file mode 100644 index 3c6d036..0000000 --- a/tests/Sanity/basic-smoke/main.fmf +++ /dev/null @@ -1,13 +0,0 @@ -summary: basic smoke test for go -description: '' -contact: -- Edjunior Machado -component: -- golang -test: ./runtest.sh -framework: beakerlib -recommend: -- golang -duration: 5m -extra-summary: /tools/golang/Sanity/basic-smoke -extra-task: /tools/golang/Sanity/basic-smoke diff --git a/tests/Sanity/basic-smoke/runtest.sh b/tests/Sanity/basic-smoke/runtest.sh deleted file mode 100755 index e14b324..0000000 --- a/tests/Sanity/basic-smoke/runtest.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /tools/golang/Sanity/basic-smoke -# Description: basic smoke test for go -# Author: Edjunior Machado -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="$(rpm -qf $(which go))" - -# Conserve the non-zero return value through the pipe -set -o pipefail - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlPhaseEnd - - rlPhaseStartTest - cat << EOF > $TmpDir/hello.go -package main -import "fmt" -func main() { - fmt.Println("hello world") -} -EOF - rlAssertExists "$TmpDir/hello.go" - - rlRun "go run $TmpDir/hello.go |& tee $TmpDir/go-run-hello.out" 0 "Testing 'go run'" - rlAssertNotDiffer <(echo 'hello world') go-run-hello.out - - rlRun "go build -o $TmpDir/hello $TmpDir/hello.go" 0 "Testing 'go build'" - rlAssertExists "hello" - - rlRun "$TmpDir/hello |& tee $TmpDir/hello.out" 0 "Running binary" - rlAssertNotDiffer <(echo 'hello world') hello.out - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd