aboutsummaryrefslogtreecommitdiff
path: root/projects/gdbm
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2021-09-01 17:26:27 +0300
committerGitHub <noreply@github.com>2021-09-01 07:26:27 -0700
commit2df776b9a92facff4064b6cf9a57463bf17f7ed0 (patch)
treee3425aa24d4ede489cca0c1655a9a5ae12a7d290 /projects/gdbm
parentb57fcacfb3eef11d14f9902eccc6a92eff1c2a12 (diff)
downloadoss-fuzz-2df776b9a92facff4064b6cf9a57463bf17f7ed0.tar.gz
gdbm: initial integration (#6258)
* gdbm: initial integration * gdbm: add main_repo attribute. * gdbm: Add Dockerfile and build.sh * gdbm: move seed generation and runcom script to upstream * gdbm: remove blank lines
Diffstat (limited to 'projects/gdbm')
-rw-r--r--projects/gdbm/Dockerfile32
-rw-r--r--projects/gdbm/build.sh33
-rw-r--r--projects/gdbm/project.yaml4
3 files changed, 69 insertions, 0 deletions
diff --git a/projects/gdbm/Dockerfile b/projects/gdbm/Dockerfile
new file mode 100644
index 000000000..1e6bdd0bd
--- /dev/null
+++ b/projects/gdbm/Dockerfile
@@ -0,0 +1,32 @@
+# Copyright 2021 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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.
+#
+################################################################################
+
+FROM gcr.io/oss-fuzz-base/base-builder
+RUN apt-get -qq update && \
+ apt-get install -qq \
+ build-essential\
+ git\
+ autopoint\
+ automake\
+ autoconf\
+ bison\
+ flex\
+ libtool\
+ texinfo\
+ gettext
+RUN git clone --depth 1 --branch fuzz https://git.gnu.org.ua/gdbm.git
+WORKDIR gdbm
+COPY build.sh $SRC/
diff --git a/projects/gdbm/build.sh b/projects/gdbm/build.sh
new file mode 100644
index 000000000..9c21c8e96
--- /dev/null
+++ b/projects/gdbm/build.sh
@@ -0,0 +1,33 @@
+#!/bin/bash -eu
+# Copyright 2021 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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.
+#
+################################################################################
+
+# Bootstrap and configure project
+./bootstrap --no-po
+./configure --disable-shared --enable-debug --disable-nls
+# Build project
+make -j$(nproc) all
+# Build fuzzer
+cd fuzz
+$CC $CFLAGS -c -I.. -I../src -ogdbm_fuzzer.o gdbm_fuzzer.c
+$CXX $CFLAGS -ogdbm_fuzzer gdbm_fuzzer.o ../src/libgdbmapp.a ../src/.libs/libgdbm.a $LIB_FUZZING_ENGINE
+
+cp gdbm_fuzzer $OUT
+cp gdbm_fuzzer.rc $OUT
+
+# Create seed
+PATH=$SRC/gdbm/src:$PATH sh ./build_seed.sh -C seed
+zip -rj "$OUT/gdbm_fuzzer_seed_corpus.zip" seed/
diff --git a/projects/gdbm/project.yaml b/projects/gdbm/project.yaml
new file mode 100644
index 000000000..dcb777212
--- /dev/null
+++ b/projects/gdbm/project.yaml
@@ -0,0 +1,4 @@
+homepage: "https://www.gnu.org.ua/software/gdbm"
+language: c
+primary_contact: "gray@gnu.org"
+main_repo: "https://git.gnu.org.ua/gdbm.git"