osquery: switch to ubuntu 20.04 build (#6446)

* osquery: switch to ubuntu20.04 build

* openquery: cleanup fix

* osquery: reomve whitespace
This commit is contained in:
DavidKorczynski 2021-09-15 14:30:27 +01:00 committed by GitHub
parent 215d3efa3d
commit b6df1a5f5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View File

@ -14,13 +14,9 @@
#
################################################################################
# Using Ubuntu 16.04 because of breakage on Ubuntu 20.04.
# See https://github.com/google/oss-fuzz/issues/6291 for more details.
FROM gcr.io/oss-fuzz-base/base-builder:xenial
# Delete line above and uncomment line below to upgrade to 20.04.
# FROM gcr.io/oss-fuzz-base/base-builder
FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update
RUN apt-get install -y --no-install-recommends python python3 bison flex make wget xz-utils libunwind-dev
RUN apt-get install -y --no-install-recommends python python3 bison flex make wget xz-utils libunwind-dev lsb-release build-essential libssl-dev
RUN git clone --depth 1 https://github.com/osquery/osquery osquery

View File

@ -17,6 +17,9 @@
PROJECT=osquery
# Ensure xlocale.h is found.
ln -s /usr/include/locale.h /usr/include/xlocale.h
# Move the project content into the current overlay.
# CMake builtin 'rename' will attempt a hardlink.
( cd / &&\
@ -39,6 +42,10 @@ cmake \
"-DCMAKE_EXE_LINKER_FLAGS=${LIB_FUZZING_ENGINE} -Wl,-rpath,'\$ORIGIN/lib'" \
..
# Fix circular definitions
# See: https://github.com/osquery/osquery/issues/6551
sed -i 's/AUDIT_FILTER_EXCLUDE/AUDIT_FILTER_EXCLUDE1/g' /src/osquery/libraries/cmake/source/libaudit/src/lib/libaudit.h
# Build harnesses
cmake --build . -j$(nproc) --target osqueryfuzz-config
cmake --build . -j$(nproc) --target osqueryfuzz-sqlquery