From 1eb617eb19f6e69c1171f1705d51966c1cb484ba Mon Sep 17 00:00:00 2001 From: Seth Grover Date: Wed, 25 Oct 2023 10:38:55 -0600 Subject: [PATCH] fix zeek build in sensor (hopefully part 2) --- .../hooks/normal/0910-sensor-build.hook.chroot | 12 ++++++++++++ .../config/hooks/normal/0992-localepurge.hook.chroot | 3 +-- sensor-iso/zeek/Dockerfile | 2 ++ sensor-iso/zeek/build-zeek-deb.sh | 2 ++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/sensor-iso/config/hooks/normal/0910-sensor-build.hook.chroot b/sensor-iso/config/hooks/normal/0910-sensor-build.hook.chroot index a13c7c9a0..9337beb09 100755 --- a/sensor-iso/config/hooks/normal/0910-sensor-build.hook.chroot +++ b/sensor-iso/config/hooks/normal/0910-sensor-build.hook.chroot @@ -6,11 +6,23 @@ export CCACHE_DIR="/var/spool/ccache" export CCACHE_COMPRESS=1 export CMAKE_C_COMPILER="clang-14" +export CC="$CMAKE_C_COMPILER" export CMAKE_CXX_COMPILER="clang++-14" +export CXX="$CMAKE_CXX_COMPILER" export CXXFLAGS="-stdlib=libc++ -lc++abi" export PYTHONDONTWRITEBYTECODE=1 export PYTHONUNBUFFERED=1 +cat > /etc/environment << EOF +CMAKE_C_COMPILER="clang-14" +CC="clang-14" +CMAKE_CXX_COMPILER="clang++-14" +CXX="clang++-14" +CXXFLAGS="-stdlib=libc++ -lc++abi" +PYTHONDONTWRITEBYTECODE=1 +PYTHONUNBUFFERED=1 +EOF + # we'll use cURL to get release information and assets from GitHub using the GitHub API GITHUB_API_CURL_ARGS=() GITHUB_API_CURL_ARGS+=( -fsSL ) diff --git a/sensor-iso/config/hooks/normal/0992-localepurge.hook.chroot b/sensor-iso/config/hooks/normal/0992-localepurge.hook.chroot index 08f4e6a07..c5b518054 100755 --- a/sensor-iso/config/hooks/normal/0992-localepurge.hook.chroot +++ b/sensor-iso/config/hooks/normal/0992-localepurge.hook.chroot @@ -22,10 +22,9 @@ echo "en_US" >> /etc/locale.nopurge echo "en_US.UTF-8" >> /etc/locale.nopurge localepurge -cat > /etc/environment << EOF +cat >> /etc/environment << EOF LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 -PYTHONDONTWRITEBYTECODE=1 EOF cat > /etc/locale.conf << EOF diff --git a/sensor-iso/zeek/Dockerfile b/sensor-iso/zeek/Dockerfile index 3e07130ee..6086825ff 100644 --- a/sensor-iso/zeek/Dockerfile +++ b/sensor-iso/zeek/Dockerfile @@ -9,6 +9,8 @@ ENV TERM xterm ENV CMAKE_C_COMPILER clang-14 ENV CMAKE_CXX_COMPILER clang++-14 +ENV CC clang-14 +ENV CXX clang++-14 ENV CXXFLAGS "-stdlib=libc++ -lc++abi" RUN apt-get -q update && \ diff --git a/sensor-iso/zeek/build-zeek-deb.sh b/sensor-iso/zeek/build-zeek-deb.sh index d16c552db..be76ad437 100755 --- a/sensor-iso/zeek/build-zeek-deb.sh +++ b/sensor-iso/zeek/build-zeek-deb.sh @@ -5,7 +5,9 @@ export CCACHE_DIR="/var/spool/ccache" export CCACHE_COMPRESS=1 export CMAKE_C_COMPILER="clang-14" +export CC="$CMAKE_C_COMPILER" export CMAKE_CXX_COMPILER="clang++-14" +export CXX="$CMAKE_CXX_COMPILER" export CXXFLAGS="-stdlib=libc++ -lc++abi" export PYTHONDONTWRITEBYTECODE=1 export PYTHONUNBUFFERED=1