From b6df1a5f5b292b5ec3e1ea5c78b122c304a36646 Mon Sep 17 00:00:00 2001 From: DavidKorczynski Date: Wed, 15 Sep 2021 14:30:27 +0100 Subject: [PATCH] osquery: switch to ubuntu 20.04 build (#6446) * osquery: switch to ubuntu20.04 build * openquery: cleanup fix * osquery: reomve whitespace --- projects/osquery/Dockerfile | 8 ++------ projects/osquery/build.sh | 7 +++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/projects/osquery/Dockerfile b/projects/osquery/Dockerfile index de433c8f6..dc8a7156d 100755 --- a/projects/osquery/Dockerfile +++ b/projects/osquery/Dockerfile @@ -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 diff --git a/projects/osquery/build.sh b/projects/osquery/build.sh index 6b4ae9b80..936301156 100755 --- a/projects/osquery/build.sh +++ b/projects/osquery/build.sh @@ -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