[bind9] Adjust the Dockerfile and build.sh for main branch (#4309)

This commit is contained in:
Ondřej Surý 2020-08-12 23:16:48 +02:00 committed by GitHub
parent 014e070f99
commit 70abe8f33c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -29,6 +29,6 @@ RUN apt-get -y install \
libuv1-dev \
pkg-config \
zip
RUN git clone --depth 1 --branch ondrej/oss-fuzz https://gitlab.isc.org/isc-projects/bind9.git
RUN git clone --depth 1 https://gitlab.isc.org/isc-projects/bind9.git
WORKDIR bind9
COPY build.sh $SRC/

View File

@ -17,8 +17,9 @@
# build the project
autoreconf -fi
./configure --disable-shared --enable-static --enable-developer --without-cmocka --without-zlib --disable-linux-caps --prefix="$WORK"
./configure --disable-shared --enable-static --enable-developer --without-cmocka --without-zlib --disable-linux-caps --prefix="$WORK" --enable-fuzzing=ossfuzz
make -j"$(nproc)" all
(cd fuzz && TESTS='' make -e -j"$(nproc)" check)
LIBISC_CFLAGS="-Ilib/isc/unix/include -Ilib/isc/pthreads/include -Ilib/isc/include"
LIBDNS_CFLAGS="-Ilib/dns/include"
@ -28,7 +29,7 @@ LIBDNS_LIBS="lib/dns/.libs/libdns.a -Wl,-Bstatic -lcrypto -Wl,-Bdynamic"
for fuzzer in fuzz/*.c; do
output=$(basename "${fuzzer%.c}")
[ "$output" = "main" ] && continue
(cd fuzz && make "${output}.o")
# We need to try little bit harder to link everything statically
${CXX} ${CXXFLAGS} \
-o "${OUT}/${output}_fuzzer" \
"fuzz/${output}.o" \