AlmaLinux changes: Update env var for v2
Disable race for riscv64
This commit is contained in:
commit
31a22d81db
2
.gitignore
vendored
2
.gitignore
vendored
@ -167,3 +167,5 @@
|
|||||||
/go1.24.4-1-openssl-fips.tar.gz
|
/go1.24.4-1-openssl-fips.tar.gz
|
||||||
/go1.24.6.src.tar.gz
|
/go1.24.6.src.tar.gz
|
||||||
/go1.24.6-1-openssl-fips.tar.gz
|
/go1.24.6-1-openssl-fips.tar.gz
|
||||||
|
/go1.25.0.src.tar.gz
|
||||||
|
/go1.25.0-1-openssl-fips.tar.gz
|
||||||
|
|||||||
60
golang.spec
60
golang.spec
@ -109,10 +109,10 @@
|
|||||||
%global gohostarch riscv64
|
%global gohostarch riscv64
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global go_api 1.24
|
%global go_api 1.25
|
||||||
# Use only for prerelease versions
|
# Use only for prerelease versions
|
||||||
#global go_prerelease rc3
|
#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_version %{go_api}%{?go_patch:.%{go_patch}}%{?go_prerelease:~%{go_prerelease}}
|
||||||
%global go_source %{go_api}%{?go_patch:.%{go_patch}}%{?go_prerelease}
|
%global go_source %{go_api}%{?go_patch:.%{go_patch}}%{?go_prerelease}
|
||||||
# Go FIPS package release
|
# Go FIPS package release
|
||||||
@ -183,17 +183,21 @@ Provides: go = %{version}-%{release}
|
|||||||
|
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
# Bundled/Vendored provides generated by bundled-deps.sh based on the in tree module data
|
# 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/google/pprof)) = 0.0.0.20250208200701.d0013a598941
|
||||||
Provides: bundled(golang(github.com/ianlancetaylor/demangle)) = 0.0.0.20220319035150.800ac71e25c2
|
Provides: bundled(golang(github.com/ianlancetaylor/demangle)) = 0.0.0.20240912202439.0a2b6291aafd
|
||||||
Provides: bundled(golang(golang.org/x/arch)) = 0.4.0
|
Provides: bundled(golang(golang.org/x/arch)) = 0.18.1.0.20250605182141.b2f4e2807dec
|
||||||
Provides: bundled(golang(golang.org/x/crypto)) = 0.11.1.0.20230711161743.2e82bdd1719d
|
Provides: bundled(golang(golang.org/x/build)) = 0.0.0.20250606033421.8c8ff6f34a83
|
||||||
Provides: bundled(golang(golang.org/x/mod)) = 0.12.0
|
Provides: bundled(golang(golang.org/x/crypto)) = 0.39.0
|
||||||
Provides: bundled(golang(golang.org/x/net)) = 0.12.1.0.20230712162946.57553cbff163
|
Provides: bundled(golang(golang.org/x/mod)) = 0.25.0
|
||||||
Provides: bundled(golang(golang.org/x/sync)) = 0.3.0
|
Provides: bundled(golang(golang.org/x/net)) = 0.41.0
|
||||||
Provides: bundled(golang(golang.org/x/sys)) = 0.10.0
|
Provides: bundled(golang(golang.org/x/sync)) = 0.15.0
|
||||||
Provides: bundled(golang(golang.org/x/term)) = 0.10.0
|
Provides: bundled(golang(golang.org/x/sys)) = 0.33.0
|
||||||
Provides: bundled(golang(golang.org/x/text)) = 0.11.0
|
Provides: bundled(golang(golang.org/x/telemetry)) = 0.0.0.20250606142133.60998feb31a8
|
||||||
Provides: bundled(golang(golang.org/x/tools)) = 0.11.1.0.20230712164437.1ca21856af7b
|
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
|
%endif
|
||||||
|
|
||||||
Requires: %{name}-bin = %{version}-%{release}
|
Requires: %{name}-bin = %{version}-%{release}
|
||||||
@ -405,12 +409,20 @@ export GOARCH=$(go env GOARCH)
|
|||||||
%if %{race}
|
%if %{race}
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
pushd "${tsan_go_dir}"
|
pushd "${tsan_go_dir}"
|
||||||
CFLAGS="%{tsan_buildflags} %{tsan_optflag}" CC=clang GOAMD64=v3 ./buildgo.sh
|
%ifarch x86_64_v2
|
||||||
|
CFLAGS="%{tsan_buildflags} %{tsan_optflag}" CC=clang GOAMD64=v2 ./buildgo.sh
|
||||||
|
%else
|
||||||
|
CFLAGS="%{tsan_buildflags} %{tsan_optflag}" CC=clang GOAMD64=v3 ./buildgo.sh
|
||||||
|
%endif
|
||||||
popd
|
popd
|
||||||
cp "${tsan_go_dir}"/race_linux_amd64.syso ./src/runtime/race/internal/amd64v3/race_linux.syso
|
cp "${tsan_go_dir}"/race_linux_amd64.syso ./src/runtime/race/internal/amd64v3/race_linux.syso
|
||||||
|
|
||||||
pushd "${tsan_go_dir}"
|
pushd "${tsan_go_dir}"
|
||||||
CFLAGS="%{tsan_buildflags} %{tsan_optflag}" CC=clang GOAMD64=v1 ./buildgo.sh
|
%ifarch x86_64_v2
|
||||||
|
CFLAGS="%{tsan_buildflags} %{tsan_optflag}" CC=clang GOAMD64=v2 ./buildgo.sh
|
||||||
|
%else
|
||||||
|
CFLAGS="%{tsan_buildflags} %{tsan_optflag}" CC=clang GOAMD64=v3 ./buildgo.sh
|
||||||
|
%endif
|
||||||
popd
|
popd
|
||||||
cp "${tsan_go_dir}"/race_linux_amd64.syso ./src/runtime/race/internal/amd64v1/race_linux.syso
|
cp "${tsan_go_dir}"/race_linux_amd64.syso ./src/runtime/race/internal/amd64v1/race_linux.syso
|
||||||
|
|
||||||
@ -434,6 +446,12 @@ export GOROOT_FINAL=%{goroot}
|
|||||||
|
|
||||||
export GOHOSTOS=linux
|
export GOHOSTOS=linux
|
||||||
export GOHOSTARCH=%{gohostarch}
|
export GOHOSTARCH=%{gohostarch}
|
||||||
|
%ifarch x86_64_v2
|
||||||
|
export GOAMD64=v2
|
||||||
|
%else
|
||||||
|
export GOAMD64=v3
|
||||||
|
%endif
|
||||||
|
export GOPPC64='power9'
|
||||||
|
|
||||||
pushd src
|
pushd src
|
||||||
# use our gcc options for this build, but store gcc as default for compiler
|
# use our gcc options for this build, but store gcc as default for compiler
|
||||||
@ -443,6 +461,12 @@ export CC="gcc"
|
|||||||
export CC_FOR_TARGET="gcc"
|
export CC_FOR_TARGET="gcc"
|
||||||
export GOOS=linux
|
export GOOS=linux
|
||||||
export GOARCH=%{gohostarch}
|
export GOARCH=%{gohostarch}
|
||||||
|
%ifarch x86_64_v2
|
||||||
|
export GOAMD64=v2
|
||||||
|
%else
|
||||||
|
export GOAMD64=v3
|
||||||
|
%endif
|
||||||
|
export GOPPC64='power9'
|
||||||
|
|
||||||
DEFAULT_GO_LD_FLAGS=""
|
DEFAULT_GO_LD_FLAGS=""
|
||||||
%if !%{external_linker}
|
%if !%{external_linker}
|
||||||
@ -590,6 +614,12 @@ go env
|
|||||||
export CC="gcc"
|
export CC="gcc"
|
||||||
export CFLAGS="$RPM_OPT_FLAGS"
|
export CFLAGS="$RPM_OPT_FLAGS"
|
||||||
export LDFLAGS="$RPM_LD_FLAGS"
|
export LDFLAGS="$RPM_LD_FLAGS"
|
||||||
|
%ifarch x86_64_v2
|
||||||
|
export GOAMD64=v2
|
||||||
|
%else
|
||||||
|
export GOAMD64=v3
|
||||||
|
%endif
|
||||||
|
export GOPPC64='power9'
|
||||||
%if !%{external_linker}
|
%if !%{external_linker}
|
||||||
export GO_LDFLAGS="-linkmode internal"
|
export GO_LDFLAGS="-linkmode internal"
|
||||||
%else
|
%else
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
summary: CI Gating Plan
|
|
||||||
discover:
|
|
||||||
how: fmf
|
|
||||||
execute:
|
|
||||||
how: tmt
|
|
||||||
12
plans/tier0.fmf
Normal file
12
plans/tier0.fmf
Normal file
@ -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"
|
||||||
@ -24,6 +24,8 @@ debuginfo:
|
|||||||
- /usr/lib/golang/pkg/tool/linux_*/test2json
|
- /usr/lib/golang/pkg/tool/linux_*/test2json
|
||||||
- /usr/lib/golang/pkg/tool/linux_*/trace
|
- /usr/lib/golang/pkg/tool/linux_*/trace
|
||||||
- /usr/lib/golang/pkg/tool/linux_*/vet
|
- /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
|
# go testdata
|
||||||
- /usr/lib/golang/src/debug/dwarf/testdata/*.elf
|
- /usr/lib/golang/src/debug/dwarf/testdata/*.elf
|
||||||
- /usr/lib/golang/src/debug/elf/testdata/*
|
- /usr/lib/golang/src/debug/elf/testdata/*
|
||||||
|
|||||||
4
sources
4
sources
@ -1,3 +1,3 @@
|
|||||||
SHA512 (go1.24.6.src.tar.gz) = 65f535c722f4a0f6111c9ed829677621e456a5bc969ccb99009da1ade096b2b1a648a44ccfa913543677c220baeaf1afe634ba8ba165d9474ac9433ac249c914
|
SHA512 (go1.25.0.src.tar.gz) = 45030cd02ab0ed4feb74e12ad9dde544bf2255c4d1a48655fca5b643bbe690c75ea3dfac74a0e3e3c707c5af5e9171ae383a7a322e70fe824f9a47b6ffd42201
|
||||||
SHA512 (go1.24.6-1-openssl-fips.tar.gz) = a166edc8f159dee3e2771c76fc98cb66c333166645705cf4b917016cc3650952e06c67cf7021ba3e82138909b2802ac922a530be5b568a1470fdfaa9f187343c
|
SHA512 (go1.25.0-1-openssl-fips.tar.gz) = 060e0d318a96585c61209cb0509d11df62ba47b0f681e3a7fc9448c5ba3f18a4dc672706bd5cf52ee8b433d7e07aaf3cf2f09ed02b69f0e49e5baaffc0cf2213
|
||||||
SHA512 (compiler-rt-18.1.8.src.tar.xz) = fb8795bd51c9b005c2ad1975591e9e2715740d6407ccad41379f136ef2e8d24ded8b97b01165a3ae4bd377119a6a1049ca05d3220404fc12bee86114ff2bff0d
|
SHA512 (compiler-rt-18.1.8.src.tar.xz) = fb8795bd51c9b005c2ad1975591e9e2715740d6407ccad41379f136ef2e8d24ded8b97b01165a3ae4bd377119a6a1049ca05d3220404fc12bee86114ff2bff0d
|
||||||
|
|||||||
@ -1,64 +0,0 @@
|
|||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Makefile of /tools/golang/Sanity/basic-smoke
|
|
||||||
# Description: basic smoke test for go
|
|
||||||
# Author: Edjunior Machado <emachado@redhat.com>
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# 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 <emachado@redhat.com>" > $(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)
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
PURPOSE of /tools/golang/Sanity/basic-smoke
|
|
||||||
Description: basic smoke test for go
|
|
||||||
Author: Edjunior Machado <emachado@redhat.com>
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
summary: basic smoke test for go
|
|
||||||
description: ''
|
|
||||||
contact:
|
|
||||||
- Edjunior Machado <emachado@redhat.com>
|
|
||||||
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
|
|
||||||
@ -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 <emachado@redhat.com>
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
Loading…
Reference in New Issue
Block a user