aboutsummaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorCatena cyber <35799796+catenacyber@users.noreply.github.com>2021-02-21 16:40:36 +0100
committerGitHub <noreply@github.com>2021-02-21 07:40:36 -0800
commit60e9a661f97e6d2dc89acd981f319a731b337ef5 (patch)
tree277e96f2008ee9f6eaa3c16d7f4753e524ca1823 /projects
parent3a5a485b72f1cd1f1bd770c746392b3314c5c745 (diff)
downloadoss-fuzz-60e9a661f97e6d2dc89acd981f319a731b337ef5.tar.gz
Go 1.16 build fix with right parentheses (#5228)
* go: right bash condition for changing directory * go-json-iterator: uses git clone So as to copy fuzz target in right directory * go: uses tags when running go list * go-redis: uses git clone and builds local fuzz target * cascadia: uses git clone instead of go get
Diffstat (limited to 'projects')
-rw-r--r--projects/cascadia/Dockerfile6
-rw-r--r--projects/go-json-iterator/Dockerfile5
-rw-r--r--projects/go-redis/Dockerfile4
-rw-r--r--projects/go-redis/build.sh5
4 files changed, 12 insertions, 8 deletions
diff --git a/projects/cascadia/Dockerfile b/projects/cascadia/Dockerfile
index 7c6f58d87..7836a0b9c 100644
--- a/projects/cascadia/Dockerfile
+++ b/projects/cascadia/Dockerfile
@@ -15,7 +15,9 @@
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder
-RUN go get github.com/andybalholm/cascadia
+RUN git clone https://github.com/andybalholm/cascadia
COPY build.sh $SRC/
-WORKDIR $SRC/
+WORKDIR $SRC/cascadia
+# no idea why this is needed
+RUN go mod download golang.org/x/net
diff --git a/projects/go-json-iterator/Dockerfile b/projects/go-json-iterator/Dockerfile
index 3d6a90c56..5d4cf02f3 100644
--- a/projects/go-json-iterator/Dockerfile
+++ b/projects/go-json-iterator/Dockerfile
@@ -15,7 +15,8 @@
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder
-RUN go get github.com/json-iterator/go
+RUN git clone https://github.com/json-iterator/go json-iterator
-COPY fuzz_json.go $GOPATH/src/github.com/json-iterator/go/
+COPY fuzz_json.go $SRC/json-iterator/
COPY build.sh $SRC/
+WORKDIR $SRC/json-iterator/
diff --git a/projects/go-redis/Dockerfile b/projects/go-redis/Dockerfile
index 3bdaf63ad..b0ad17734 100644
--- a/projects/go-redis/Dockerfile
+++ b/projects/go-redis/Dockerfile
@@ -15,7 +15,7 @@
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder
-RUN go get github.com/go-redis/redis
+RUN git clone https://github.com/go-redis/redis redis
COPY build.sh $SRC/
-WORKDIR $SRC
+WORKDIR $SRC/redis
diff --git a/projects/go-redis/build.sh b/projects/go-redis/build.sh
index b130c457e..e297cd37c 100644
--- a/projects/go-redis/build.sh
+++ b/projects/go-redis/build.sh
@@ -12,5 +12,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
-compile_go_fuzzer github.com/go-redis/redis/fuzz Fuzz fuzz gofuzz
+
+#github.com/go-redis/redis/fuzz is not a module, so needs local build
+compile_go_fuzzer ./fuzz Fuzz fuzz gofuzz