public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/golang] eln: Update Go to 1.27.2 (hostfips-1)
@ 2026-10-21 13:26 David Benoit
  0 siblings, 0 replies; only message in thread
From: David Benoit @ 2026-10-21 13:26 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/golang
            Branch : eln
            Commit : 7a25bc591154029864e086c641f0d34e1f93a929
            Author : David Benoit <dbenoit@redhat.com>
            Date   : 2026-10-12T16:42:06-04:00
            Stats  : +36/-36 in 5 file(s)
            URL    : https://src.fedoraproject.org/rpms/golang/c/7a25bc591154029864e086c641f0d34e1f93a929?branch=eln

            Log:
            Update Go to 1.27.2 (hostfips-1)

* Update Go to 1.27.2
* Switch to hostfips tag scheme
* Migrate %check to use crypto-test.sh
* Add env lookup in testenv.MustHaveExternalNetwork()
* Resolves: RHEL-281449

---
diff --git a/.gitignore b/.gitignore
index f6db9f9..6ce3cd1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -189,3 +189,5 @@
 /go1.26.5-1-openssl-fips.tar.gz
 /go1.26.7.src.tar.gz
 /go1.26.7-1-openssl-fips.tar.gz
+/go1.27.2.src.tar.gz
+/go1.27.2-1-hostfips-release.tar.gz

diff --git a/golang.spec b/golang.spec
index 9516b7c..e3725eb 100644
--- a/golang.spec
+++ b/golang.spec
@@ -113,10 +113,10 @@
 %endif
 %endif
 
-%global go_api 1.26
+%global go_api 1.27
 # Use only for prerelease versions
 #global go_prerelease rc3
-%global go_patch 7
+%global go_patch 2
 %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
@@ -143,7 +143,7 @@ Source0:        https://go.dev/dl/go%{go_source}.src.tar.gz
 # And pre-genetated patches to set up the module for a given
 # Go release are located at https://github.com/golang-fips/go.
 # making a source conditional creates odd behaviors so for now, include FIPS always
-Source1:        https://github.com/golang-fips/go/archive/refs/tags/go%{go_source}-%{pkg_release}-openssl-fips.tar.gz
+Source1:        https://github.com/golang-fips/go/archive/refs/tags/go%{go_source}-%{pkg_release}-hostfips-release.tar.gz
 # make possible to override default traceback level at build time by setting build tag rpm_crashtraceback
 Source2:        fedora.go
 Source3:       https://github.com/llvm/llvm-project/releases/download/llvmorg-%{llvm_compiler_rt_version}/compiler-rt-%{llvm_compiler_rt_version}.src.tar.xz
@@ -214,6 +214,7 @@ Patch1:         0001-Modify-go.env.patch
 # Related: https://sourceware.org/bugzilla/show_bug.cgi?id=33204
 Patch7:         revert_dwarf5.patch
 Patch8:         skip-TestTerminalSignal-in-container.patch
+Patch9:		skip-external-net-tests.patch
 
 # Having documentation separate was broken
 Obsoletes:      %{name}-docs < 1.1-4
@@ -378,7 +379,7 @@ rm -rf src/crypto/internal/boring/syso
     # TODO Check here, this is failing due to the external linker flag? maybe, but it's clearly related to that according tho this commit:
     # https://github.com/golang-fips/go/blob/main/patches/000-initial-setup.patch#L48
     # Add --no-backup-if-mismatch option to avoid creating .orig temp files
-    patch_dir="../go-go%{version}-%{pkg_release}-openssl-fips/patches"
+    patch_dir="../go-go%{version}-%{pkg_release}-hostfips-release/patches"
     for p in "$patch_dir"/*.patch; do
       echo "Applying $p"
       patch --no-backup-if-mismatch -p1 < $p
@@ -386,7 +387,7 @@ rm -rf src/crypto/internal/boring/syso
 
     # Configure crypto tests
     echo "Configure crypto tests"
-    pushd ../go-go%{version}-%{pkg_release}-openssl-fips
+    pushd "../go-go%{version}-%{pkg_release}-hostfips-release"
     ln -s ../go go
     ./scripts/configure-crypto-tests.sh
     popd
@@ -641,25 +642,7 @@ echo "=== Start testing ==="
 %if %{fail_on_tests}
     ./run.bash --no-rebuild -v -v -v -k $GO_TEST_RUN
     %if %{fips}
-        echo "=== Running FIPS tests ==="
-        # tested25519vectors needs network connectivity but it should be cover by
-        # this test https://pkgs.devel.redhat.com/cgit/tests/golang/tree/regression/internal-testsuite/runtest.sh#n127
-
-        # run tests with fips enabled.
-        export GOLANG_FIPS=1
-        export OPENSSL_FORCE_FIPS_MODE=1
-        echo "=== Run all crypto test skipping tls ==="
-        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 -skip="TestEd25519Vectors|TestACVP|TestGCMNoncesFIPSV126|TestGCMNoncesFIPSV1|TestWithoutEnforcement|TestCASTPasses|TestCASTFailures|TestIntegrityCheck|TestBetterTLS"
-          # check that signature functions have parity between boring and notboring
-          CGO_ENABLED=0 go test $(go list ./... | grep -v tls) -v -skip="TestEd25519Vectors|TestACVP|TestGCMNoncesFIPSV126|TestGCMNoncesFIPSV1|TestWithoutEnforcement|TestCASTPasses|TestCASTFailures|TestIntegrityCheck|TestBetterTLS"
-        popd
-        echo "=== Run tls tests ==="
-        # run all fips specific tls tests
-        pushd crypto/tls
-          go test -v -run "Boring"
-        popd
+      GO_TEST_HAS_EXTERNAL_NETWORK=0 ../../go-go%{version}-%{pkg_release}-hostfips-release/scripts/crypto-test.sh
     %endif
 %else
     ./run.bash --no-rebuild -v -v -v -k || :

diff --git a/revert_dwarf5.patch b/revert_dwarf5.patch
index 939c7eb..c0fb2c4 100644
--- a/revert_dwarf5.patch
+++ b/revert_dwarf5.patch
@@ -1,8 +1,8 @@
 diff --git a/src/internal/buildcfg/exp.go b/src/internal/buildcfg/exp.go
-index aa41986..f1a8ba8 100644
+index bf411a8dbb..91709cd1ee 100644
 --- a/src/internal/buildcfg/exp.go
 +++ b/src/internal/buildcfg/exp.go
-@@ -69,21 +69,11 @@ func ParseGOEXPERIMENT(goos, goarch, goexp string) (*ExperimentFlags, error) {
+@@ -67,21 +67,10 @@ func ParseGOEXPERIMENT(goos, goarch, goexp string) (*ExperimentFlags, error) {
  		regabiSupported = true
  	}
  
@@ -16,12 +16,12 @@ index aa41986..f1a8ba8 100644
 -	// 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,
--		Dwarf5:               dwarf5Supported,
-+		Dwarf5:               false,
- 		RandomizedHeapBase64: true,
- 		GreenTeaGC:           true,
- 	}
+ 		RegabiWrappers:        regabiSupported,
+ 		RegabiArgs:            regabiSupported,
+-		Dwarf5:                dwarf5Supported,
++		Dwarf5:                false,
+ 		RandomizedHeapBase64:  true,
+ 		GreenTeaGC:            true,
+ 		JSONv2:                true,

diff --git a/skip-external-net-tests.patch b/skip-external-net-tests.patch
new file mode 100644
index 0000000..68b0a83
--- /dev/null
+++ b/skip-external-net-tests.patch
@@ -0,0 +1,15 @@
+diff --git a/src/internal/testenv/testenv.go b/src/internal/testenv/testenv.go
+index 5aeb5815ad..5bc39455dd 100644
+--- a/src/internal/testenv/testenv.go
++++ b/src/internal/testenv/testenv.go
+@@ -309,6 +309,10 @@ func HasExternalNetwork() bool {
+ // external (non-localhost) networks.
+ // If not, MustHaveExternalNetwork calls t.Skip with an explanation.
+ func MustHaveExternalNetwork(t testing.TB) {
++	if os.Getenv("GO_TEST_HAS_EXTERNAL_NETWORK") == "0" {
++		t.Helper()
++		t.Skipf("skipping test: env indicates no external network")
++	}
+ 	if runtime.GOOS == "js" || runtime.GOOS == "wasip1" {
+ 		t.Helper()
+ 		t.Skipf("skipping test: no external network on %s", runtime.GOOS)

diff --git a/sources b/sources
index 32ee8a1..e00cf95 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (go1.26.7.src.tar.gz) = 708c8f19d43c7f931287ee0c710eb7a0c4a3d7589f546a59fcdb276f2963d8eb1fba1599977613e751d6de95b8386b6bca8e7d2caf9c555a1d51d1ef0d40289b
-SHA512 (go1.26.7-1-openssl-fips.tar.gz) = 85cca9864a34138d002f610f4f5f42daa889014674e594107996cc8816fd372432bfef49f67170895641e91ec8f4ff1de5a6b73504a18eeb55b528ee62b2d4d8
+SHA512 (go1.27.2.src.tar.gz) = c6b7d28bf670cd01ddb0612e18e639719c423c2891da626393b58038b8fa99afd1511a7cfb8bfe8f4934cb7ddb7bd2b82a3d151fbd3be419d52e86157309a359
+SHA512 (go1.27.2-1-hostfips-release.tar.gz) = 699d58675d29401e013816760dcb6558011ee9bd0342d5c863bfa87965f8e8b796850427b42fdbf3e98c0877e5f6e931ae2e8d39d764bee8285a0aadf6e844cc
 SHA512 (compiler-rt-18.1.8.src.tar.xz) = fb8795bd51c9b005c2ad1975591e9e2715740d6407ccad41379f136ef2e8d24ded8b97b01165a3ae4bd377119a6a1049ca05d3220404fc12bee86114ff2bff0d

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-21 13:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-21 13:26 [rpms/golang] eln: Update Go to 1.27.2 (hostfips-1) David Benoit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox