mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge branch 'topic/christian/more-feature-tests'
* topic/christian/more-feature-tests: Default to setting ZEEK_HAVE_JAVASCRIPT=no in CMakeLists.txt Show --disable-javascript in `configure --help` Show AF_PACKET support status in cmake output, and sort features Add feature tests for AF_PACKET, GeoIP, and JavaScript to zeek-config
This commit is contained in:
commit
832ce9f9a1
5 changed files with 47 additions and 17 deletions
7
CHANGES
7
CHANGES
|
@ -1,3 +1,10 @@
|
|||
6.2.0-dev.419 | 2024-01-19 10:25:52 -0800
|
||||
|
||||
* Default to setting ZEEK_HAVE_JAVASCRIPT=no in CMakeLists.txt (Christian Kreibich, Corelight)
|
||||
* Show --disable-javascript in `configure --help` (Christian Kreibich, Corelight)
|
||||
* Show AF_PACKET support status in cmake output, and sort features (Christian Kreibich, Corelight)
|
||||
* Add feature tests for AF_PACKET, GeoIP, and JavaScript to zeek-config (Christian Kreibich, Corelight)
|
||||
|
||||
6.2.0-dev.414 | 2024-01-19 12:27:39 +0100
|
||||
|
||||
* GH-3177: Merge branch 'topic/bbannier/issue-3177' (Benjamin Bannier, Corelight)
|
||||
|
|
|
@ -1103,6 +1103,7 @@ endif ()
|
|||
# Tell the plugin code that we're building as part of the main tree.
|
||||
set(ZEEK_PLUGIN_INTERNAL_BUILD true CACHE INTERNAL "" FORCE)
|
||||
|
||||
set(ZEEK_HAVE_AF_PACKET no)
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES Linux)
|
||||
if (NOT DISABLE_AF_PACKET)
|
||||
if (NOT AF_PACKET_PLUGIN_PATH)
|
||||
|
@ -1110,9 +1111,11 @@ if (${CMAKE_SYSTEM_NAME} MATCHES Linux)
|
|||
endif ()
|
||||
|
||||
list(APPEND ZEEK_INCLUDE_PLUGINS ${AF_PACKET_PLUGIN_PATH})
|
||||
set(ZEEK_HAVE_AF_PACKET yes)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
set(ZEEK_HAVE_JAVASCRIPT no)
|
||||
if (NOT DISABLE_JAVASCRIPT)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/auxil/zeekjs/cmake)
|
||||
find_package(Nodejs)
|
||||
|
@ -1123,14 +1126,11 @@ if (NOT DISABLE_JAVASCRIPT)
|
|||
STATUS
|
||||
"Node.js version ${NODEJS_VERSION} is too old, need 16.13 or later. Not enabling JavaScript support."
|
||||
)
|
||||
set(ZEEK_HAVE_JAVASCRIPT no)
|
||||
else ()
|
||||
set(ZEEKJS_PLUGIN_PATH ${CMAKE_SOURCE_DIR}/auxil/zeekjs)
|
||||
list(APPEND ZEEK_INCLUDE_PLUGINS ${ZEEKJS_PLUGIN_PATH})
|
||||
set(ZEEK_HAVE_JAVASCRIPT yes)
|
||||
endif ()
|
||||
else ()
|
||||
set(ZEEK_HAVE_JAVASCRIPT no)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
@ -1435,18 +1435,19 @@ message(
|
|||
"\nCXXFLAGS: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BuildType}}"
|
||||
"\nCPP: ${CMAKE_CXX_COMPILER}"
|
||||
"\n"
|
||||
"\nzeek-client: ${INSTALL_ZEEK_CLIENT}"
|
||||
"\nZeekControl: ${INSTALL_ZEEKCTL}"
|
||||
"\nAF_PACKET: ${ZEEK_HAVE_AF_PACKET}"
|
||||
"\nAux. Tools: ${INSTALL_AUX_TOOLS}"
|
||||
"\nBifCL: ${_bifcl_exe_path}"
|
||||
"\nBinPAC: ${_binpac_exe_path}"
|
||||
"\nBTest: ${INSTALL_BTEST}"
|
||||
"\nBTest tooling: ${_install_btest_tools_msg}"
|
||||
"\nGen-ZAM: ${_gen_zam_exe_path}"
|
||||
"\nzkg: ${INSTALL_ZKG}"
|
||||
"\nJavaScript: ${ZEEK_HAVE_JAVASCRIPT}"
|
||||
"\nSpicy: ${_spicy}"
|
||||
"\nSpicy analyzers: ${USE_SPICY_ANALYZERS}"
|
||||
"\nJavaScript: ${ZEEK_HAVE_JAVASCRIPT}"
|
||||
"\nzeek-client: ${INSTALL_ZEEK_CLIENT}"
|
||||
"\nZeekControl: ${INSTALL_ZEEKCTL}"
|
||||
"\nzkg: ${INSTALL_ZKG}"
|
||||
"\n"
|
||||
"\nlibmaxminddb: ${USE_GEOIP}"
|
||||
"\nKerberos: ${USE_KRB5}"
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
6.2.0-dev.414
|
||||
6.2.0-dev.419
|
||||
|
|
|
@ -6,6 +6,9 @@ btest_tools_dir="@ZEEK_CONFIG_BTEST_TOOLS_DIR@"
|
|||
build_type="@CMAKE_BUILD_TYPE_LOWER@"
|
||||
cmake_dir="@ZEEK_CMAKE_CONFIG_DIR@"
|
||||
config_dir="@ZEEK_ETC_INSTALL_DIR@"
|
||||
have_af_packet="@ZEEK_HAVE_AF_PACKET@"
|
||||
have_geoip="@USE_GEOIP@"
|
||||
have_javascript="@ZEEK_HAVE_JAVASCRIPT@"
|
||||
have_spicy="@USE_SPICY_ANALYZERS@"
|
||||
include_dir="@CMAKE_INSTALL_PREFIX@/include"
|
||||
lib_dir="@CMAKE_INSTALL_FULL_LIBDIR@"
|
||||
|
@ -18,6 +21,18 @@ version="@ZEEK_VERSION_FULL@"
|
|||
zeek_dist="@ZEEK_DIST@"
|
||||
zeekpath="@DEFAULT_ZEEKPATH@"
|
||||
|
||||
report_feature() {
|
||||
# $1: cmake feature flag value
|
||||
input=$(echo "$1" | tr '[:lower:]' '[:upper:]')
|
||||
if [ "$input" = "1" ] || [ "$input" = "ON" ] || [ "$input" = "YES" ] || [ "$input" = "TRUE" ] || [ "$input" = "Y" ]; then
|
||||
echo "yes"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "no"
|
||||
exit 1
|
||||
}
|
||||
|
||||
add_path() {
|
||||
# $1: existing path
|
||||
# $2: path to add
|
||||
|
@ -67,9 +82,12 @@ Toplevel installation directories for third-party components:
|
|||
--binpac_root BinPAC compiler
|
||||
--broker_root Broker communication framework
|
||||
|
||||
Feature tests:
|
||||
Feature tests (prints 'yes' if supported; exit code reflects result):
|
||||
|
||||
--have-spicy-analyzers Prints 'yes' if built-in Spicy analyzers are available; exit code reflects result
|
||||
--have-af-packet Native AF_PACKET support
|
||||
--have-geoip IP address geolocation & AS lookups
|
||||
--have-javascript JavaScript support
|
||||
--have-spicy-analyzers built-in Spicy analyzers
|
||||
"
|
||||
}
|
||||
|
||||
|
@ -109,14 +127,17 @@ while [ $# -ne 0 ]; do
|
|||
--config_dir)
|
||||
echo $config_dir
|
||||
;;
|
||||
--have-af-packet)
|
||||
report_feature "$have_af_packet"
|
||||
;;
|
||||
--have-geoip)
|
||||
report_feature "$have_geoip"
|
||||
;;
|
||||
--have-javascript)
|
||||
report_feature "$have_javascript"
|
||||
;;
|
||||
--have-spicy-analyzers)
|
||||
if [ "$have_spicy" = "yes" ]; then
|
||||
echo "yes"
|
||||
exit 0
|
||||
else
|
||||
echo "no"
|
||||
exit 1
|
||||
fi
|
||||
report_feature "$have_spicy"
|
||||
;;
|
||||
--include_dir)
|
||||
echo $include_dir
|
||||
|
|
1
configure
vendored
1
configure
vendored
|
@ -72,6 +72,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
|
|||
--disable-btest don't install BTest
|
||||
--disable-btest-pcaps don't install Zeek's BTest input pcaps
|
||||
--disable-cpp-tests don't build Zeek's C++ unit tests
|
||||
--disable-javascript don't build Zeek's JavaScript support
|
||||
--disable-port-prealloc disable pre-allocating the PortVal array in ValManager
|
||||
--disable-python don't try to build python bindings for Broker
|
||||
--disable-spicy don't include Spicy
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue