|
|
@ -70,11 +70,8 @@
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
# Pre build std lib with -race enabled
|
|
|
|
# Pre build std lib with -race enabled
|
|
|
|
%ifarch x86_64
|
|
|
|
# Disabled due to 1.20 new cache usage, see 1.20 upstream release notes
|
|
|
|
%global race 1
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
%global race 0
|
|
|
|
%global race 0
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%ifarch x86_64
|
|
|
|
%ifarch x86_64
|
|
|
|
%global gohostarch amd64
|
|
|
|
%global gohostarch amd64
|
|
|
@ -95,14 +92,14 @@
|
|
|
|
%global gohostarch s390x
|
|
|
|
%global gohostarch s390x
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%global go_api 1.19
|
|
|
|
%global go_api 1.20
|
|
|
|
%global go_version 1.19.4
|
|
|
|
%global go_version 1.20.6
|
|
|
|
%global version %{go_version}
|
|
|
|
%global version %{go_version}
|
|
|
|
%global pkg_release 1
|
|
|
|
%global pkg_release 1
|
|
|
|
|
|
|
|
|
|
|
|
Name: golang
|
|
|
|
Name: golang
|
|
|
|
Version: %{version}
|
|
|
|
Version: %{version}
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Release: 5%{?dist}
|
|
|
|
Summary: The Go Programming Language
|
|
|
|
Summary: The Go Programming Language
|
|
|
|
# source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain
|
|
|
|
# source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain
|
|
|
|
License: BSD and Public Domain
|
|
|
|
License: BSD and Public Domain
|
|
|
@ -147,15 +144,12 @@ Patch221: fix_TestScript_list_std.patch
|
|
|
|
|
|
|
|
|
|
|
|
Patch1939923: skip_test_rhbz1939923.patch
|
|
|
|
Patch1939923: skip_test_rhbz1939923.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Disables libc static linking tests which
|
|
|
|
# Disables libc static linking tests which
|
|
|
|
# are incompatible with dlopen in golang-fips
|
|
|
|
# are incompatible with dlopen in golang-fips
|
|
|
|
Patch2: disable_static_tests_part1.patch
|
|
|
|
Patch2: disable_static_tests_part1.patch
|
|
|
|
Patch3: disable_static_tests_part2.patch
|
|
|
|
Patch3: disable_static_tests_part2.patch
|
|
|
|
|
|
|
|
|
|
|
|
# https://github.com/golang/go/issues/56834
|
|
|
|
Patch4: fix-memory-leak-evp-sign-verify.patch
|
|
|
|
# https://github.com/golang/go/commit/1b4db7e46365bbbba479d0689c5699e6c0ba1142
|
|
|
|
|
|
|
|
Patch4: ppc64le-internal-linker-fix.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Having documentation separate was broken
|
|
|
|
# Having documentation separate was broken
|
|
|
|
Obsoletes: %{name}-docs < 1.1-4
|
|
|
|
Obsoletes: %{name}-docs < 1.1-4
|
|
|
@ -163,6 +157,9 @@ Obsoletes: %{name}-docs < 1.1-4
|
|
|
|
# RPM can't handle symlink -> dir with subpackages, so merge back
|
|
|
|
# RPM can't handle symlink -> dir with subpackages, so merge back
|
|
|
|
Obsoletes: %{name}-data < 1.1.1-4
|
|
|
|
Obsoletes: %{name}-data < 1.1.1-4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# We don't build golang-race anymore, rhbz#2230705
|
|
|
|
|
|
|
|
Obsoletes: golang-race < 1.20.0
|
|
|
|
|
|
|
|
|
|
|
|
# These are the only RHEL/Fedora architectures that we compile this package for
|
|
|
|
# These are the only RHEL/Fedora architectures that we compile this package for
|
|
|
|
ExclusiveArch: %{golang_arches}
|
|
|
|
ExclusiveArch: %{golang_arches}
|
|
|
|
|
|
|
|
|
|
|
@ -243,6 +240,16 @@ Requires: %{name} = %{version}-%{release}
|
|
|
|
%{summary}
|
|
|
|
%{summary}
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n go-toolset
|
|
|
|
|
|
|
|
Summary: Package that installs go-toolset
|
|
|
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%ifarch x86_64
|
|
|
|
|
|
|
|
Requires: delve
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n go-toolset
|
|
|
|
|
|
|
|
This is the main package for go-toolset.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%setup -q -n go-go%{version}
|
|
|
|
%setup -q -n go-go%{version}
|
|
|
|
|
|
|
|
|
|
|
@ -252,13 +259,13 @@ popd
|
|
|
|
patch -p1 < ../go-go%{version}-%{pkg_release}-openssl-fips/patches/000-initial-setup.patch
|
|
|
|
patch -p1 < ../go-go%{version}-%{pkg_release}-openssl-fips/patches/000-initial-setup.patch
|
|
|
|
patch -p1 < ../go-go%{version}-%{pkg_release}-openssl-fips/patches/001-initial-openssl-for-fips.patch
|
|
|
|
patch -p1 < ../go-go%{version}-%{pkg_release}-openssl-fips/patches/001-initial-openssl-for-fips.patch
|
|
|
|
|
|
|
|
|
|
|
|
%patch2 -p1
|
|
|
|
# Configure crypto tests
|
|
|
|
%patch3 -p1
|
|
|
|
pushd ../go-go%{version}-%{pkg_release}-openssl-fips
|
|
|
|
%patch4 -p1
|
|
|
|
ln -s ../go-go%{version} go
|
|
|
|
|
|
|
|
./scripts/configure-crypto-tests.sh
|
|
|
|
%patch221 -p1
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
|
%patch1939923 -p1
|
|
|
|
%autopatch -p1
|
|
|
|
|
|
|
|
|
|
|
|
cp %{SOURCE2} ./src/runtime/
|
|
|
|
cp %{SOURCE2} ./src/runtime/
|
|
|
|
|
|
|
|
|
|
|
@ -342,12 +349,11 @@ cwd=$(pwd)
|
|
|
|
src_list=$cwd/go-src.list
|
|
|
|
src_list=$cwd/go-src.list
|
|
|
|
pkg_list=$cwd/go-pkg.list
|
|
|
|
pkg_list=$cwd/go-pkg.list
|
|
|
|
shared_list=$cwd/go-shared.list
|
|
|
|
shared_list=$cwd/go-shared.list
|
|
|
|
race_list=$cwd/go-race.list
|
|
|
|
|
|
|
|
misc_list=$cwd/go-misc.list
|
|
|
|
misc_list=$cwd/go-misc.list
|
|
|
|
docs_list=$cwd/go-docs.list
|
|
|
|
docs_list=$cwd/go-docs.list
|
|
|
|
tests_list=$cwd/go-tests.list
|
|
|
|
tests_list=$cwd/go-tests.list
|
|
|
|
rm -f $src_list $pkg_list $docs_list $misc_list $tests_list $shared_list $race_list
|
|
|
|
rm -f $src_list $pkg_list $docs_list $misc_list $tests_list $shared_list
|
|
|
|
touch $src_list $pkg_list $docs_list $misc_list $tests_list $shared_list $race_list
|
|
|
|
touch $src_list $pkg_list $docs_list $misc_list $tests_list $shared_list
|
|
|
|
pushd $RPM_BUILD_ROOT%{goroot}
|
|
|
|
pushd $RPM_BUILD_ROOT%{goroot}
|
|
|
|
find src/ -type d -a \( ! -name testdata -a ! -ipath '*/testdata/*' \) -printf '%%%dir %{goroot}/%p\n' >> $src_list
|
|
|
|
find src/ -type d -a \( ! -name testdata -a ! -ipath '*/testdata/*' \) -printf '%%%dir %{goroot}/%p\n' >> $src_list
|
|
|
|
find src/ ! -type d -a \( ! -ipath '*/testdata/*' -a ! -name '*_test*.go' \) -printf '%{goroot}/%p\n' >> $src_list
|
|
|
|
find src/ ! -type d -a \( ! -ipath '*/testdata/*' -a ! -name '*_test*.go' \) -printf '%{goroot}/%p\n' >> $src_list
|
|
|
@ -378,13 +384,6 @@ pushd $RPM_BUILD_ROOT%{goroot}
|
|
|
|
find pkg/*_dynlink/ ! -type d -printf '%{goroot}/%p\n' >> $shared_list
|
|
|
|
find pkg/*_dynlink/ ! -type d -printf '%{goroot}/%p\n' >> $shared_list
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%if %{race}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
find pkg/*_race/ -type d -printf '%%%dir %{goroot}/%p\n' >> $race_list
|
|
|
|
|
|
|
|
find pkg/*_race/ ! -type d -printf '%{goroot}/%p\n' >> $race_list
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
find test/ -type d -printf '%%%dir %{goroot}/%p\n' >> $tests_list
|
|
|
|
find test/ -type d -printf '%%%dir %{goroot}/%p\n' >> $tests_list
|
|
|
|
find test/ ! -type d -printf '%{goroot}/%p\n' >> $tests_list
|
|
|
|
find test/ ! -type d -printf '%{goroot}/%p\n' >> $tests_list
|
|
|
|
find src/ -type d -a \( -name testdata -o -ipath '*/testdata/*' \) -printf '%%%dir %{goroot}/%p\n' >> $tests_list
|
|
|
|
find src/ -type d -a \( -name testdata -o -ipath '*/testdata/*' \) -printf '%%%dir %{goroot}/%p\n' >> $tests_list
|
|
|
@ -458,18 +457,19 @@ export GO_TEST_RUN=""
|
|
|
|
|
|
|
|
|
|
|
|
# Run tests with FIPS enabled.
|
|
|
|
# Run tests with FIPS enabled.
|
|
|
|
export GOLANG_FIPS=1
|
|
|
|
export GOLANG_FIPS=1
|
|
|
|
#pushd crypto
|
|
|
|
export OPENSSL_FORCE_FIPS_MODE=1
|
|
|
|
# # Run all crypto tests but skip TLS, we will run FIPS specific TLS tests later
|
|
|
|
pushd crypto
|
|
|
|
# go test $(go list ./... | grep -v tls) -v
|
|
|
|
# Run all crypto tests but skip TLS, we will run FIPS specific TLS tests later
|
|
|
|
# # Check that signature functions have parity between boring and notboring
|
|
|
|
go test -timeout 50m $(go list ./... | grep -v tls) -v
|
|
|
|
# CGO_ENABLED=0 go test $(go list ./... | grep -v tls) -v
|
|
|
|
# Check that signature functions have parity between boring and notboring
|
|
|
|
#popd
|
|
|
|
CGO_ENABLED=0 go test -timeout 50m $(go list ./... | grep -v tls) -v
|
|
|
|
## Run all FIPS specific TLS tests
|
|
|
|
popd
|
|
|
|
#pushd crypto/tls
|
|
|
|
# Run all FIPS specific TLS tests
|
|
|
|
# go test -v -run "Boring"
|
|
|
|
pushd crypto/tls
|
|
|
|
#popd
|
|
|
|
go test -v -run "Boring"
|
|
|
|
|
|
|
|
popd
|
|
|
|
%else
|
|
|
|
%else
|
|
|
|
#./run.bash --no-rebuild -v -v -v -k || :
|
|
|
|
./run.bash --no-rebuild -v -v -v -k || :
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
cd ..
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
|
@ -524,11 +524,43 @@ cd ..
|
|
|
|
%files -f go-shared.list shared
|
|
|
|
%files -f go-shared.list shared
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%if %{race}
|
|
|
|
%files -n go-toolset
|
|
|
|
%files -f go-race.list race
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
|
|
|
|
* Mon Aug 14 2023 Alejandro Sáez <asm@redhat.com> - 1.20.6-5
|
|
|
|
|
|
|
|
- Retire golang-race package
|
|
|
|
|
|
|
|
- Resolves: rhbz#2230705
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Jul 18 2023 Alejandro Sáez <asm@redhat.com> - 1.20.6-1
|
|
|
|
|
|
|
|
- Rebase to Go 1.20.6
|
|
|
|
|
|
|
|
- Change to autopatch
|
|
|
|
|
|
|
|
- Resolves: rhbz#2222313
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jun 23 2023 Alejandro Sáez <asm@redhat.com> - 1.20.4-3
|
|
|
|
|
|
|
|
- Increase the timeout in the tests
|
|
|
|
|
|
|
|
- Related: rhbz#2204477
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jun 09 2023 Carl George <carl@redhat.com> - 1.20.4-2
|
|
|
|
|
|
|
|
- Add go-toolset subpackage to ensure golang and go-toolset are published together
|
|
|
|
|
|
|
|
- Resolves: rhbz#2117248
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon May 29 2023 Alejandro Sáez <asm@redhat.com> - 1.20.4-1
|
|
|
|
|
|
|
|
- Rebase to Go 1.20.4
|
|
|
|
|
|
|
|
- Resolves: rhbz#2204477
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Apr 11 2023 David Benoit <dbenoit@redhat.com> - 1.20.3-1
|
|
|
|
|
|
|
|
- Rebase to Go 1.20.3
|
|
|
|
|
|
|
|
- Remove race archives
|
|
|
|
|
|
|
|
- Update static test patches
|
|
|
|
|
|
|
|
- Resolves: rhbz#2185259
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Mar 01 2023 David Benoit <dbenoit@redhat.com> - 1.19.6-1
|
|
|
|
|
|
|
|
- Rebase to Go 1.19.6
|
|
|
|
|
|
|
|
- Resolves: rhbz#2174429
|
|
|
|
|
|
|
|
- Fix memory leak
|
|
|
|
|
|
|
|
- Resolves: rhbz#2157602
|
|
|
|
|
|
|
|
- Enable tests in check phase
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Dec 21 2022 David Benoit <dbenoit@redhat.com> - 1.19.4-1
|
|
|
|
* Wed Dec 21 2022 David Benoit <dbenoit@redhat.com> - 1.19.4-1
|
|
|
|
- Rebase to Go 1.19.4
|
|
|
|
- Rebase to Go 1.19.4
|
|
|
|
- Fix ppc64le linker issue
|
|
|
|
- Fix ppc64le linker issue
|
|
|
|