From f35e03efa005366f5f1bdfe90cb613563c3f8515 Mon Sep 17 00:00:00 2001 From: Sergey Bronnikov Date: Fri, 19 Apr 2024 03:07:34 +0300 Subject: [PATCH] [freerdp] install dependencies from nightly control (#11813) * install apt dependencies from nightly package control file * get CMake configuration from toolchain file --- projects/freerdp/Dockerfile | 18 +++++++----------- projects/freerdp/build.sh | 19 +------------------ projects/freerdp/project.yaml | 1 + 3 files changed, 9 insertions(+), 29 deletions(-) diff --git a/projects/freerdp/Dockerfile b/projects/freerdp/Dockerfile index b52803374..4c0a0649a 100644 --- a/projects/freerdp/Dockerfile +++ b/projects/freerdp/Dockerfile @@ -17,19 +17,15 @@ FROM gcr.io/oss-fuzz-base/base-builder # See https://github.com/FreeRDP/FreeRDP/wiki/Compilation -RUN apt-get update && apt-get install -y \ - build-essential git-core cmake ninja-build pkg-config zlib1g-dev ccache \ - libx11-dev libxext-dev libxinerama-dev libxcursor-dev libxkbfile-dev \ - libxv-dev libxi-dev libxdamage-dev libxrender-dev libxrandr-dev \ - libssl-dev libasound2-dev libcups2-dev libpulse-dev libcairo2-dev \ - libavutil-dev libavcodec-dev libusb-1.0-0-dev libicu-dev \ - libpkcs11-helper1-dev libpkcs11-helper1 libsdl2-ttf-dev \ - libwayland-dev libpam0g-dev libxcb-damage0-dev ccache libxtst-dev \ - libfuse-dev libsystemd-dev libsoxr-dev libsdl2-dev docbook-xsl \ - libkrb5-dev krb5-multidev libcjson-dev libswscale-dev libswresample-dev \ - libpcsclite-dev xsltproc libsdl2-dev +# Install Git and base dependences. +RUN apt-get update && apt-get install -y devscripts equivs \ + build-essential git-core cmake ninja-build pkg-config ccache RUN git clone --depth 1 https://github.com/FreeRDP/FreeRDP.git WORKDIR FreeRDP + +# Install all dependencies required by the nightly package. +RUN mk-build-deps --install --tool 'apt-get --yes --no-remove --no-install-recommends' packaging/deb/freerdp-nightly/control + COPY build.sh $SRC/ diff --git a/projects/freerdp/build.sh b/projects/freerdp/build.sh index dc56d402e..ab5d683b2 100755 --- a/projects/freerdp/build.sh +++ b/projects/freerdp/build.sh @@ -34,20 +34,6 @@ esac : ${LDFLAGS:="${CXXFLAGS}"} # to make sure we link with sanitizer runtime cmake_args=( - # Specific to FreeRDP. - -DWITH_SAMPLE=OFF - -DWITH_SERVER=ON - -DWITH_PROXY=OFF - -DWITH_SHADOW=OFF - -DWITH_CLIENT=OFF - -DWITH_ALSA=OFF - -DWITH_X11=OFF - -DWITH_LIBSYSTEMD=OFF - -DWITH_FUSE=OFF - -DWITH_AAD=OFF - -DWITH_FFMPEG=OFF - -DWITH_SWSCALE=OFF - # clang-15 segfaults on linking binaries when LTO is enabled, # see https://github.com/google/oss-fuzz/pull/10448#issuecomment-1578160436 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF @@ -56,9 +42,6 @@ cmake_args=( -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF - -DOSS_FUZZ=ON - -DBUILD_FUZZERS=ON - -DBUILD_TESTING=ON # C compiler -DCMAKE_C_COMPILER="${CC}" @@ -77,7 +60,7 @@ cmake_args=( # Build the project and fuzzers. rm -rf build -cmake "${cmake_args[@]}" -S . -B build -G Ninja +cmake "${cmake_args[@]}" -S . -B build -G Ninja -C ci/cmake-preloads/config-oss-fuzz.cmake cmake --build build --parallel --target fuzzers for f in $(find build/Testing/ -name 'TestFuzz*' -type f); diff --git a/projects/freerdp/project.yaml b/projects/freerdp/project.yaml index 437e62abf..76fd8710a 100644 --- a/projects/freerdp/project.yaml +++ b/projects/freerdp/project.yaml @@ -13,5 +13,6 @@ fuzzing_engines: - libfuzzer sanitizers: - address + - undefined architectures: - x86_64