golang-fips/go

Setup initial patch errors

Closed this issue · 1 comments

I cloned the repo and ran ./scripts/setup-initial-patch.sh release-branch.go1.20 . it is erroring out. Are there updated instructions on how to setup?

++ pwd
+ ROOT=/home/gopi/git/go
+ trap cleanup EXIT
+ replacement=
+ getopts r: o
+ shift 0
+ ./scripts/setup-go-submodule.sh release-branch.go1.20
+ GIT_REF=release-branch.go1.20
+++ dirname ./scripts/setup-go-submodule.sh
++ readlink -f ./scripts
+ SCRIPT_DIR=/home/gopi/git/go/scripts
+++ dirname ./scripts/setup-go-submodule.sh
++ readlink -f ./scripts/../config
+ CONFIG_DIR=/home/gopi/git/go/config
+ '[' -z release-branch.go1.20 ']'
+ git submodule add --force https://github.com/golang/go.git
Reactivating local git directory for submodule 'go'
+ git submodule update
+ pushd go
~/git/go/go ~/git/go
+ git fetch
+ git checkout release-branch.go1.20
Switched to branch 'release-branch.go1.20'
Your branch is up to date with 'origin/release-branch.go1.20'.
++ git branch --show-current
++ wc -l
+ [[ 1 == \1 ]]
+ git fetch
+ git reset origin/release-branch.go1.20 --hard
HEAD is now at d5b8518043 [release-branch.go1.20] go1.20.8
+ popd
~/git/go
+ cd ./go
++ git rev-parse HEAD
+ ORIGINAL_GIT_SHA=d5b851804329aa547dafa278a0c35dd62298d651
+ pushd ./src
~/git/go/go/src ~/git/go/go
+ ./make.bash
Building Go cmd/dist using /usr/local/go. (go1.20.6 linux/amd64)
Building Go toolchain1 using /usr/local/go.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building packages and commands for linux/amd64.
---
Installed Go for linux/amd64 in /home/gopi/git/go/go
Installed commands in /home/gopi/git/go/go/bin
+ popd
~/git/go/go
+ /home/gopi/git/go/scripts/apply-initial-patch.sh
+ git apply -v ../patches/000-initial-setup.patch
Checking patch api/go1.19.txt...
Checking patch src/cmd/go/testdata/script/gopath_std_vendor.txt...
Checking patch src/crypto/ecdh/ecdh_test.go...
Checking patch src/crypto/ecdsa/ecdsa_hashsignverify.go...
Checking patch src/crypto/ecdsa/ecdsa_hashsignverify_test.go...
Checking patch src/crypto/ecdsa/ecdsa_test.go...
Checking patch src/crypto/ecdsa/equal_test.go...
Checking patch src/crypto/ed25519/ed25519_test.go...
Checking patch src/crypto/ed25519/ed25519vectors_test.go...
Checking patch src/crypto/internal/backend/bbig/big.go...
Checking patch src/crypto/internal/backend/boringtest/config.go...
Checking patch src/crypto/internal/backend/dummy.s...
Checking patch src/crypto/internal/backend/nobackend.go...
Checking patch src/crypto/internal/backend/openssl.go...
Checking patch src/crypto/rsa/pkcs1v15_test.go...
Checking patch src/crypto/rsa/pss_test.go...
Checking patch src/crypto/rsa/rsa.go...
Checking patch src/crypto/rsa/rsa_test.go...
Checking patch src/crypto/tls/boring.go...
Checking patch src/crypto/tls/boring_test.go...
Checking patch src/crypto/tls/cipher_suites.go...
Checking patch src/crypto/tls/common.go...
Checking patch src/crypto/tls/handshake_client.go...
error: while searching for:
                if len(hello.supportedVersions) == 1 {
                        hello.cipherSuites = nil
                }
                if hasAESGCMHardwareSupport {
                        hello.cipherSuites = append(hello.cipherSuites, defaultCipherSuitesTLS13...)
                } else {
                        hello.cipherSuites = append(hello.cipherSuites, defaultCipherSuitesTLS13NoAES...)

error: patch failed: src/crypto/tls/handshake_client.go:127
error: src/crypto/tls/handshake_client.go: patch does not apply
Checking patch src/crypto/tls/handshake_client_test.go...
Checking patch src/crypto/tls/handshake_client_tls13.go...
Checking patch src/crypto/tls/handshake_server_tls13.go...
Checking patch src/crypto/tls/key_schedule.go...
Checking patch src/crypto/x509/boring_test.go...
Checking patch src/crypto/x509/x509_test.go...
Checking patch src/go/build/deps_test.go...
Checking patch src/runtime/pprof/proto_test.go...
Checking patch src/runtime/runtime_boring.go...
+ cleanup
+ '[' 0 '!=' 1 ']'
+ cd /home/gopi/git/go
+ rm -rf go

nevermidn, works when i do git checkout go1.20.7-1-openssl-fips and run the ./scripts/setup-initial-patch.sh release-branch.go1.20