import UBI golang-1.20.10-1.el9_3

This commit is contained in:
eabdullin 2023-11-07 13:44:14 +00:00
parent 02cd992a60
commit 5b951e9b31
4 changed files with 66 additions and 86 deletions

4
.gitignore vendored
View File

@ -1,2 +1,2 @@
SOURCES/go1.19.13-2-openssl-fips.tar.gz
SOURCES/go1.19.13.tar.gz
SOURCES/go1.20.10-1-openssl-fips.tar.gz
SOURCES/go1.20.10.tar.gz

View File

@ -1,2 +1,2 @@
3335b6ee2baab3a616b7a969b62ac1c9ed136b74 SOURCES/go1.19.13-2-openssl-fips.tar.gz
5627a7cd27f73a12c909dd818d310deda7146b86 SOURCES/go1.19.13.tar.gz
a16d4c1ed23caee22e90f86027d861cadb634993 SOURCES/go1.20.10-1-openssl-fips.tar.gz
f919ce5ad523ccba39500cab7ccd1ebbfde70021 SOURCES/go1.20.10.tar.gz

View File

@ -1,36 +1,13 @@
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index da5b179..6a772df 100644
index 9f26606..2408505 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -1247,18 +1247,20 @@ func (t *tester) cgoTest(dt *distTest) error {
fmt.Println("No support for static linking found (lacks libc.a?), skip cgo static linking test.")
@@ -1259,7 +1259,7 @@ func (t *tester) registerCgoTests() {
} else {
if goos != "android" {
- t.addCmd(dt, "misc/cgo/testtls", t.goTest(), "-ldflags", `-linkmode=external -extldflags "-static -pthread"`, ".")
+ t.addCmd(dt, "misc/cgo/testtls", t.goTest(), "-ldflags", `-linkmode=external -extldflags "-static -pthread"`, "-tags=no_openssl")
}
t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), ".")
t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-ldflags", `-linkmode=external`, ".")
if goos != "android" {
- t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-ldflags", `-linkmode=external -extldflags "-static -pthread"`, ".")
+ t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-ldflags", `-linkmode=external -extldflags "-static -pthread"`, "-tags=no_openssl")
+ /*
t.addCmd(dt, "misc/cgo/test", t.goTest(), "-tags=static", "-ldflags", `-linkmode=external -extldflags "-static -pthread"`, ".")
// -static in CGO_LDFLAGS triggers a different code path
// than -static in -extldflags, so test both.
// See issue #16651.
cmd := t.addCmd(dt, "misc/cgo/test", t.goTest(), "-tags=static", ".")
setEnv(cmd, "CGO_LDFLAGS", "-static -pthread")
+ */
panic("unknown linkmode with static build: " + linkmode)
}
- gt.tags = append(gt.tags, "static")
+ gt.tags = append(gt.tags, "static", "no_openssl")
}
@@ -1268,7 +1270,7 @@ func (t *tester) cgoTest(dt *distTest) error {
t.addCmd(dt, "misc/cgo/test", t.goTest(), "-buildmode=pie", "-ldflags=-linkmode=internal", "-tags=internal,internal_pie", ".")
}
t.addCmd(dt, "misc/cgo/testtls", t.goTest(), "-buildmode=pie", ".")
- t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-buildmode=pie", ".")
+ t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-buildmode=pie", "-tags=no_openssl")
}
}
}
t.registerTest("cgo:"+name, "../misc/cgo/test", gt, opts...)

View File

@ -70,11 +70,8 @@
%endif
# Pre build std lib with -race enabled
%ifarch x86_64
%global race 1
%else
# Disabled due to 1.20 new cache usage, see 1.20 upstream release notes
%global race 0
%endif
%ifarch x86_64
%global gohostarch amd64
@ -95,10 +92,10 @@
%global gohostarch s390x
%endif
%global go_api 1.19
%global go_version 1.19.13
%global go_api 1.20
%global go_version 1.20.10
%global version %{go_version}
%global pkg_release 2
%global pkg_release 1
Name: golang
Version: %{version}
@ -158,6 +155,9 @@ Obsoletes: %{name}-docs < 1.1-4
# RPM can't handle symlink -> dir with subpackages, so merge back
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
ExclusiveArch: %{golang_arches}
@ -238,6 +238,16 @@ Requires: %{name} = %{version}-%{release}
%{summary}
%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
%setup -q -n go-go%{version}
@ -247,7 +257,7 @@ 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/001-initial-openssl-for-fips.patch
patch -p1 < ../go-go%{version}-%{pkg_release}-openssl-fips/patches/002-strict-fips-runtime-detection.patch
patch -p1 < ../go-go%{version}-%{pkg_release}-openssl-fips/patches/003-h2-bundle-fix-CVE-2023-39325.patch
# Configure crypto tests
pushd ../go-go%{version}-%{pkg_release}-openssl-fips
@ -255,12 +265,7 @@ ln -s ../go-go%{version} go
./scripts/configure-crypto-tests.sh
popd
%patch2 -p1
%patch3 -p1
%patch221 -p1
%patch1939923 -p1
%autopatch -p1
cp %{SOURCE2} ./src/runtime/
@ -344,12 +349,11 @@ cwd=$(pwd)
src_list=$cwd/go-src.list
pkg_list=$cwd/go-pkg.list
shared_list=$cwd/go-shared.list
race_list=$cwd/go-race.list
misc_list=$cwd/go-misc.list
docs_list=$cwd/go-docs.list
tests_list=$cwd/go-tests.list
rm -f $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 $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
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 \( ! -ipath '*/testdata/*' -a ! -name '*_test*.go' \) -printf '%{goroot}/%p\n' >> $src_list
@ -380,13 +384,6 @@ pushd $RPM_BUILD_ROOT%{goroot}
find pkg/*_dynlink/ ! -type d -printf '%{goroot}/%p\n' >> $shared_list
%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 '%{goroot}/%p\n' >> $tests_list
find src/ -type d -a \( -name testdata -o -ipath '*/testdata/*' \) -printf '%%%dir %{goroot}/%p\n' >> $tests_list
@ -447,7 +444,7 @@ export CGO_ENABLED=0
%endif
# make sure to not timeout
export GO_TEST_TIMEOUT_SCALE=20
export GO_TEST_TIMEOUT_SCALE=2
export GO_TEST_RUN=""
%ifarch aarch64
@ -463,9 +460,9 @@ export GOLANG_FIPS=1
export OPENSSL_FORCE_FIPS_MODE=1
pushd crypto
# Run all crypto tests but skip TLS, we will run FIPS specific TLS tests later
go test $(go list ./... | grep -v tls) -v
go test -timeout 50m $(go list ./... | grep -v tls) -v
# Check that signature functions have parity between boring and notboring
CGO_ENABLED=0 go test $(go list ./... | grep -v tls) -v
CGO_ENABLED=0 go test -timeout 50m $(go list ./... | grep -v tls) -v
popd
# Run all FIPS specific TLS tests
pushd crypto/tls
@ -527,40 +524,46 @@ cd ..
%files -f go-shared.list shared
%endif
%if %{race}
%files -f go-race.list race
%endif
%files -n go-toolset
%changelog
* Thu Oct 12 2023 Derek Parker <deparker@redhat.com> - 1.19.13-1
* Fri Oct 13 2023 David Benoit <dbenoit@redhat.com> - 1.20.10-1
- Update to Go 1.20.10
- Fix CVE-2023-39325
- Resolves: RHEL-12622
- Midstream patches
- Resolves: RHEL-12623
* Wed Sep 13 2023 Archana Ravindar <aravinda@redhat.com> - 1.19.12-2
- Add strict fips runtime detection patch
- Related: rhbz#2223637
* Wed Sep 27 2023 Alejandro Sáez <asm@redhat.com> - 1.20.8-1
- Rebase to Go 1.20.8
- Remove fix-memory-leak-evp-sign-verify.patch as it is already included in the source
- Resolves: RHEL-2775
* Fri Sep 1 2023 Archana Ravindar <aravinda@redhat.com> - 1.19.12-1
- Update to Go 1.19.12
- Resolves: rhbz#2223637
* Mon Aug 14 2023 Alejandro Sáez <asm@redhat.com> - 1.20.6-5
- Retire golang-race package
- Resolves: rhbz#2230705
* Tue Jun 6 2023 David Benoit <dbenoit@redhat.com> - 1.19.10-1
- Update to Go 1.19.10
- Resolves: rhbz#2217626
- Resolves: rhbz#2217612
- Resolves: rhbz#2217584
* 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
* Tue May 23 2023 Alejandro Sáez <asm@redhat.com> - 1.19.9-2
- Fix TestEncryptOAEP and TLS failures in FIPS mode
- Resolves: rhbz#2204476
* Fri Jun 23 2023 Alejandro Sáez <asm@redhat.com> - 1.20.4-3
- Increase the timeout in the tests
- Related: rhbz#2204477
* Wed May 17 2023 Alejandro Sáez <asm@redhat.com> - 1.19.9-1
- Rebase to Go 1.19.9
- Resolves: rhbz#2204476
* 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
* Wed Mar 29 2023 David Benoit <dbenoit@redhat.com> - 1.19.6-2
- Rebuild without changes
- Related: rhbz#2175174
* 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