From 70abe8f33c302acdeaebf50d70450aeebf18ea2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 12 Aug 2020 23:16:48 +0200 Subject: [PATCH] [bind9] Adjust the Dockerfile and build.sh for main branch (#4309) --- projects/bind9/Dockerfile | 2 +- projects/bind9/build.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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" \