diff --git a/CHANGES b/CHANGES index 1ac3d4e2dd..e7fef8b4cb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,17 @@ +6.1.0-dev.272 | 2023-08-07 09:41:34 -0700 + + * Change VERSION variable in CMake config to ZEEK_VERSION_FULL (Tim Wojtulewicz, Corelight) + + * Update bifcl and binpac for FindPackage fixes (Tim Wojtulewicz, Corelight) + + * Remove usage of FindRequiredPackage (Tim Wojtulewicz, Corelight) + + * Update zeekctl and cmake to deprecate FindRequiredPackage (Tim Wojtulewicz, Corelight) + + * Update broker submodule for pybind11 + cmake changes (Tim Wojtulewicz, Corelight) + + * ci: Bump centos-7 (Arne Welzel, Corelight) + 6.1.0-dev.264 | 2023-08-07 10:22:18 +0200 * Suppress new tsan findings from Ubuntu 22 upgrade (Tim Wojtulewicz) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ed58d3b99..f8e4982347 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -531,7 +531,7 @@ file( "setenv ZEEK_SPICY_LIBRARY_PATH \"${cmake_source_dir}/scripts/spicy\"\n" "setenv SPICY_BUILD_DIRECTORY \"${cmake_binary_dir}/auxil/spicy\"\n") -file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" VERSION LIMIT_COUNT 1) +file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" ZEEK_VERSION_FULL LIMIT_COUNT 1) execute_process( COMMAND grep "^constexpr int PLUGIN_API_VERSION" INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/plugin/Plugin.h @@ -541,7 +541,7 @@ execute_process( string(REGEX MATCH "^constexpr int PLUGIN_API_VERSION = ([0-9]+);" API_VERSION "${API_VERSION}") set(API_VERSION "${CMAKE_MATCH_1}") -string(REGEX REPLACE "[.-]" " " version_numbers ${VERSION}) +string(REGEX REPLACE "[.-]" " " version_numbers ${ZEEK_VERSION_FULL}) separate_arguments(version_numbers) list(GET version_numbers 0 VERSION_MAJOR) list(GET version_numbers 1 VERSION_MINOR) @@ -550,7 +550,7 @@ set(VERSION_MAJ_MIN "${VERSION_MAJOR}.${VERSION_MINOR}") math(EXPR ZEEK_VERSION_NUMBER "${VERSION_MAJOR} * 10000 + ${VERSION_MINOR} * 100 + ${VERSION_PATCH}") -set(VERSION_C_IDENT "${VERSION}_plugin_${API_VERSION}") +set(VERSION_C_IDENT "${ZEEK_VERSION_FULL}_plugin_${API_VERSION}") string(REGEX REPLACE "-[0-9]*$" "_git" VERSION_C_IDENT "${VERSION_C_IDENT}") string(REGEX REPLACE "[^a-zA-Z0-9_\$]" "_" VERSION_C_IDENT "${VERSION_C_IDENT}") @@ -721,8 +721,6 @@ endif () # ############################################################################## # Dependency Configuration -include(FindRequiredPackage) - # Check cache value first to avoid displaying "Found sed" messages everytime if (NOT SED_EXE) find_program(SED_EXE sed) @@ -734,15 +732,16 @@ if (NOT SED_EXE) endif () list(APPEND Python_ADDITIONAL_VERSIONS 3) -FindRequiredPackage(PythonInterp) -FindRequiredPackage(FLEX) -FindRequiredPackage(BISON) -FindRequiredPackage(PCAP) -FindRequiredPackage(OpenSSL) +set(ZEEK_PYTHON_MIN 3.5.0) +find_package(Python ${ZEEK_PYTHON_MIN} REQUIRED COMPONENTS Interpreter) +find_package(FLEX REQUIRED) +find_package(BISON 2.5 REQUIRED) +find_package(PCAP REQUIRED) +find_package(OpenSSL REQUIRED) if (NOT MSVC) - FindRequiredPackage(BIND) + find_package(BIND REQUIRED) endif () -FindRequiredPackage(ZLIB) +find_package(ZLIB REQUIRED) if (NOT BINARY_PACKAGING_MODE) # TODO: Broker seems to always turn on static libraries. We don't want that for Spicy by default. @@ -773,7 +772,7 @@ endif () if (ZEEK_PYTHON_DIR) set(py_mod_install_dir ${ZEEK_PYTHON_DIR}) elseif (ZEEK_PYTHON_PREFIX) - set(pyver ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) + set(pyver ${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}) set(py_mod_install_dir ${ZEEK_PYTHON_PREFIX}/lib/python${pyver}/site-packages) elseif (ZEEK_PYTHON_HOME) set(py_mod_install_dir ${ZEEK_PYTHON_HOME}/lib/python) @@ -801,7 +800,8 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/auxil/binpac/CMakeLists.txt) # TODO in ZeekPluginConfig.cmake.in. set(BINPAC_EXE_PATH "${CMAKE_BINARY_DIR}/auxil/binpac/src/binpac${CMAKE_EXECUTABLE_SUFFIX}") endif () -FindRequiredPackage(BinPAC) + +find_package(BinPAC REQUIRED) # Add an alias (used by our plugin setup). add_executable(Zeek::BinPAC ALIAS binpac) @@ -841,25 +841,6 @@ if (ENABLE_JEMALLOC) endif () endif () -if (BISON_VERSION AND BISON_VERSION VERSION_LESS 2.5) - set(MISSING_PREREQS true) - list(APPEND MISSING_PREREQ_DESCS - " Could not find prerequisite package Bison >= 2.5, found: ${BISON_VERSION}") -endif () - -if (MISSING_PREREQS) - foreach (prereq ${MISSING_PREREQ_DESCS}) - message(SEND_ERROR ${prereq}) - endforeach () - message(FATAL_ERROR "Configuration aborted due to missing prerequisites") -endif () - -set(ZEEK_PYTHON_MIN 3.5.0) - -if (PYTHON_VERSION_STRING VERSION_LESS ${ZEEK_PYTHON_MIN}) - message(FATAL_ERROR "Python ${ZEEK_PYTHON_MIN} or greater is required.") -endif () - add_subdirectory(auxil/paraglob) if (MSVC) cmake_policy(SET CMP0079 NEW) @@ -1307,7 +1288,7 @@ endif () # has already configured packaging if ("${PROJECT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") include(ConfigurePackaging) - ConfigurePackaging(${VERSION}) + ConfigurePackaging(${ZEEK_VERSION_FULL}) endif () # Refers back to the "distribution prefix". This is the source tree when diff --git a/VERSION b/VERSION index 43026a2513..5c7d0d66e9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.1.0-dev.264 +6.1.0-dev.272 diff --git a/auxil/bifcl b/auxil/bifcl index a4aadc5d64..c7bf54c587 160000 --- a/auxil/bifcl +++ b/auxil/bifcl @@ -1 +1 @@ -Subproject commit a4aadc5d644e9b13dd2ff76f3d1ed269c575ce90 +Subproject commit c7bf54c587439d3bcb16d53b0d77a702e48d2526 diff --git a/auxil/binpac b/auxil/binpac index 1e0a4a7e77..84b730fdcc 160000 --- a/auxil/binpac +++ b/auxil/binpac @@ -1 +1 @@ -Subproject commit 1e0a4a7e77ace47a73205973cb896ad5027f62af +Subproject commit 84b730fdcc5b983c65c6226ec092aee66c486680 diff --git a/auxil/broker b/auxil/broker index f338a5f6db..8dacaa3582 160000 --- a/auxil/broker +++ b/auxil/broker @@ -1 +1 @@ -Subproject commit f338a5f6db54d0cf8db4708d6656b1856c8d59b4 +Subproject commit 8dacaa358299a95e3c38fe479dbc348a69ed60a4 diff --git a/auxil/zeekctl b/auxil/zeekctl index 625b169862..81e8c48fea 160000 --- a/auxil/zeekctl +++ b/auxil/zeekctl @@ -1 +1 @@ -Subproject commit 625b1698628efbf72629624e0352280de9784422 +Subproject commit 81e8c48fea6171d49e66e371ae46437c7ee63a74 diff --git a/cmake b/cmake index 50c5bf96c3..7a8069c2ee 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 50c5bf96c32038014f8517479c5ce3908c3b6100 +Subproject commit 7a8069c2ee84a82119ce83033454e22942043570 diff --git a/cmake_templates/zeek-config.in b/cmake_templates/zeek-config.in index 0940f6fe09..c78ea5e855 100755 --- a/cmake_templates/zeek-config.in +++ b/cmake_templates/zeek-config.in @@ -14,7 +14,7 @@ prefix="@CMAKE_INSTALL_PREFIX@" python_dir="@PY_MOD_INSTALL_DIR@" script_dir="@ZEEK_SCRIPT_INSTALL_PATH@" site_dir="@ZEEK_SCRIPT_INSTALL_PATH@/site" -version="@VERSION@" +version="@ZEEK_VERSION_FULL@" zeek_dist="@ZEEK_DIST@" zeekpath="@DEFAULT_ZEEKPATH@" diff --git a/cmake_templates/zeek-version.h.in b/cmake_templates/zeek-version.h.in index f09f9ce5a7..95668aa1f8 100644 --- a/cmake_templates/zeek-version.h.in +++ b/cmake_templates/zeek-version.h.in @@ -3,7 +3,7 @@ #pragma once /* Version number of package */ -#define VERSION "@VERSION@" +#define VERSION "@ZEEK_VERSION_FULL@" // Zeek version number. // This is the result of (major * 10000 + minor * 100 + patch) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3029445631..8552ad3105 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -256,7 +256,7 @@ cmake_policy(POP) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DebugCmdConstants.h ${CMAKE_CURRENT_BINARY_DIR}/DebugCmdInfoConstants.cc - COMMAND ${PYTHON_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.py + COMMAND ${Python_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.py ${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.py ${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in diff --git a/src/version.c.in b/src/version.c.in index e7508c8415..9c129253a5 100644 --- a/src/version.c.in +++ b/src/version.c.in @@ -1,7 +1,7 @@ #include "zeek/zeek-version.h" -char version[] = "@VERSION@"; +char version[] = "@ZEEK_VERSION_FULL@"; // A C function that has the current version built into its name. // One can link a shared library against this to ensure that it won't