aboutsummaryrefslogtreecommitdiff
path: root/infra
diff options
context:
space:
mode:
authorCatena cyber <35799796+catenacyber@users.noreply.github.com>2021-02-23 00:25:47 +0100
committerGitHub <noreply@github.com>2021-02-22 15:25:47 -0800
commit1e03eb94af68c9821d95ca4760055e7f996bb005 (patch)
tree0010f4962599ad9bbb93d02bbf6e74a3496c4f7f /infra
parentafb9e09ae21bf861faed3d473ab4aad5e4a94921 (diff)
downloadoss-fuzz-1e03eb94af68c9821d95ca4760055e7f996bb005.tar.gz
Go 1.16 more fixes (#5239)
* Fixes cilium build * Fixes dragonfly build * Fixes fasthttp build * Fixes fastjson build * golang build: change directory only temporary * Fixes gitea build * Fixes grpc-gateway build * Fixes hugo project build * Fixes ipfs build * Fixes jsonparser build * Fixes kubernetes build * Fixes loki build * Fixes minify build * Fixes nats build * Removes go get from the docs * Fixes quic-go build * Fixes radon build * Fixes syzkaller build * Fixes tidb build * Fixes vitess build
Diffstat (limited to 'infra')
-rwxr-xr-xinfra/base-images/base-builder/compile_go_fuzzer5
1 files changed, 4 insertions, 1 deletions
diff --git a/infra/base-images/base-builder/compile_go_fuzzer b/infra/base-images/base-builder/compile_go_fuzzer
index 9c56efd64..1903e4532 100755
--- a/infra/base-images/base-builder/compile_go_fuzzer
+++ b/infra/base-images/base-builder/compile_go_fuzzer
@@ -23,11 +23,13 @@ if [[ $# -eq 4 ]]; then
tags="-tags $4"
fi
+# makes directory change temporary
+(
cd $GOPATH/src/$path || true
# in the case we are in the right directory, with go.mod but no go.sum
go mod tidy || true
# project was downloaded with go get if go list fails
-go list $tags $path || (cd $GOPATH/pkg/mod/ && cd `echo $path | cut -d/ -f1-3 | awk '{print $1"*"}'`)
+go list $tags $path || { cd $GOPATH/pkg/mod/ && cd `echo $path | cut -d/ -f1-3 | awk '{print $1"@*"}'`; }
# project does not have go.mod if go list fails again
go list $tags $path || go mod init $path
@@ -52,3 +54,4 @@ else
# Link Go code ($fuzzer.a) with fuzzing engine to produce fuzz target binary.
$CXX $CXXFLAGS $LIB_FUZZING_ENGINE $fuzzer.a -o $OUT/$fuzzer
fi
+)