File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818FROM gcr.io/oss-fuzz-base/base-builder
1919
2020# install required packages to build your project
21- RUN apt-get update && apt-get install -y autoconf automake bison dh-autoreconf flex libluajit-5.1-dev libedit-dev libprotobuf-dev libssl-dev libtool make pkg-config protobuf-compiler ragel
21+ RUN apt-get update && apt-get install -y autoconf automake bison dh-autoreconf flex libluajit-5.1-dev libedit-dev libprotobuf-dev libssl-dev libtool make pkg-config protobuf-compiler ragel meson ninja-build
2222RUN wget https://archives.boost.io/release/1.84.0/source/boost_1_84_0.tar.bz2 # Temporarily use manual installation over the outdated libboost-dev package
2323
2424# checkout all sources needed to build your project
Original file line number Diff line number Diff line change @@ -58,19 +58,29 @@ cp fuzz_target_* "${OUT}/"
5858# build the dnsdist fuzzing target, if any
5959if [ -f dnsdistdist/fuzz_dnsdistcache.cc ]; then
6060 cd dnsdistdist
61- sed -i ' s/AC_CC_PIE//' configure.ac
62- autoreconf -vi
63- ./configure \
64- --enable-fuzz-targets \
65- --disable-dependency-tracking \
66- --disable-silent-rules || /bin/bash
67- if [ -d ext/arc4random/ ]; then
68- make -j$( nproc) -C ext/arc4random/
61+ build_dir=' .'
62+ if [ -f configure.ac ]; then
63+ sed -i ' s/AC_CC_PIE//' configure.ac
64+ autoreconf -vi
65+ ./configure \
66+ --enable-fuzz-targets \
67+ --disable-dependency-tracking \
68+ --disable-silent-rules || /bin/bash
69+ if [ -d ext/arc4random/ ]; then
70+ make -j$( nproc) -C ext/arc4random/
71+ fi
72+ make -j$( nproc) fuzz_targets
73+ else
74+ build_dir=' build'
75+ sed -i " /'b_pie=true',/d" meson.build
76+ meson setup \
77+ -D fuzz-targets=true \
78+ ${build_dir}
79+ meson compile -C ${build_dir} fuzz-targets
6980 fi
70- make -j$( nproc) fuzz_targets
7181
7282 # copy the fuzzing target binaries
73- cp fuzz_target_* " ${OUT} /"
83+ cp ${build_dir} / fuzz_target_* " ${OUT} /"
7484
7585 # back to the pdns/ directory
7686 cd ..
You can’t perform that action at this time.
0 commit comments