diff --git a/projects/bind9/Dockerfile b/projects/bind9/Dockerfile index a62fb4108..1c0a233c6 100644 --- a/projects/bind9/Dockerfile +++ b/projects/bind9/Dockerfile @@ -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/ diff --git a/projects/bind9/build.sh b/projects/bind9/build.sh index d9ad8d551..af6f26b96 100644 --- a/projects/bind9/build.sh +++ b/projects/bind9/build.sh @@ -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" \