mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/christian/install-btest-tooling'
* origin/topic/christian/install-btest-tooling: Explain zeek-config options in help output Sort variables at top of zeek-config alphabetically Install Zeek's btest tooling with the distribution
This commit is contained in:
commit
f76a95a2c2
7 changed files with 95 additions and 16 deletions
18
CHANGES
18
CHANGES
|
@ -1,3 +1,21 @@
|
||||||
|
|
||||||
|
4.1.0-dev.593 | 2021-05-10 10:17:34 +0100
|
||||||
|
|
||||||
|
* Explain zeek-config options in help output (Christian Kreibich, Corelight)
|
||||||
|
|
||||||
|
* Sort variables at top of zeek-config alphabetically (Christian Kreibich, Corelight)
|
||||||
|
|
||||||
|
* Install Zeek's btest tooling with the distribution
|
||||||
|
|
||||||
|
This creates $PREFIX/share/btest in the install tree, with the
|
||||||
|
following folders:
|
||||||
|
|
||||||
|
- scripts/ for the canonifiers
|
||||||
|
- data/ for random.seed
|
||||||
|
- data/pcaps for the test pcaps
|
||||||
|
|
||||||
|
The pcaps can be skipped by configuring with --disable-btest-pcaps. (Christian Kreibich, Corelight)
|
||||||
|
|
||||||
4.1.0-dev.587 | 2021-05-05 14:05:51 +0000
|
4.1.0-dev.587 | 2021-05-05 14:05:51 +0000
|
||||||
|
|
||||||
* Merge remote-tracking branch 'origin/topic/timw/session-coverity'
|
* Merge remote-tracking branch 'origin/topic/timw/session-coverity'
|
||||||
|
|
|
@ -539,6 +539,9 @@ if ( GooglePerftools_INCLUDE_DIR )
|
||||||
set(ZEEK_CONFIG_GooglePerftools_INCLUDE_DIR ${GooglePerftools_INCLUDE_DIR})
|
set(ZEEK_CONFIG_GooglePerftools_INCLUDE_DIR ${GooglePerftools_INCLUDE_DIR})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
set(ZEEK_CONFIG_BTEST_TOOLS_DIR ${ZEEK_ROOT_DIR}/share/btest)
|
||||||
|
install(DIRECTORY DESTINATION ${ZEEK_CONFIG_BTEST_TOOLS_DIR})
|
||||||
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zeek-config.in
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zeek-config.in
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/zeek-config @ONLY)
|
${CMAKE_CURRENT_BINARY_DIR}/zeek-config @ONLY)
|
||||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/zeek-config DESTINATION bin)
|
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/zeek-config DESTINATION bin)
|
||||||
|
@ -576,6 +579,7 @@ endif ()
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(scripts)
|
add_subdirectory(scripts)
|
||||||
add_subdirectory(man)
|
add_subdirectory(man)
|
||||||
|
add_subdirectory(testing)
|
||||||
|
|
||||||
include(CheckOptionalBuildSources)
|
include(CheckOptionalBuildSources)
|
||||||
|
|
||||||
|
@ -608,6 +612,12 @@ if (CMAKE_BUILD_TYPE)
|
||||||
string(TOUPPER ${CMAKE_BUILD_TYPE} BuildType)
|
string(TOUPPER ${CMAKE_BUILD_TYPE} BuildType)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if ( INSTALL_BTEST_PCAPS )
|
||||||
|
set(_install_btest_tools_msg "all")
|
||||||
|
else ()
|
||||||
|
set(_install_btest_tools_msg "no pcaps")
|
||||||
|
endif ()
|
||||||
|
|
||||||
message(
|
message(
|
||||||
"\n====================| Zeek Build Summary |===================="
|
"\n====================| Zeek Build Summary |===================="
|
||||||
"\n"
|
"\n"
|
||||||
|
@ -629,6 +639,7 @@ message(
|
||||||
"\nZeekControl: ${INSTALL_ZEEKCTL}"
|
"\nZeekControl: ${INSTALL_ZEEKCTL}"
|
||||||
"\nAux. Tools: ${INSTALL_AUX_TOOLS}"
|
"\nAux. Tools: ${INSTALL_AUX_TOOLS}"
|
||||||
"\nBTest: ${INSTALL_BTEST}"
|
"\nBTest: ${INSTALL_BTEST}"
|
||||||
|
"\nBTest tooling: ${_install_btest_tools_msg}"
|
||||||
"\nzkg: ${INSTALL_ZKG}"
|
"\nzkg: ${INSTALL_ZKG}"
|
||||||
"\n"
|
"\n"
|
||||||
"\nlibmaxminddb: ${USE_GEOIP}"
|
"\nlibmaxminddb: ${USE_GEOIP}"
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
4.1.0-dev.587
|
4.1.0-dev.593
|
||||||
|
|
5
configure
vendored
5
configure
vendored
|
@ -66,6 +66,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
--disable-auxtools don't build or install auxiliary tools
|
--disable-auxtools don't build or install auxiliary tools
|
||||||
--disable-archiver don't build or install zeek-archiver tool
|
--disable-archiver don't build or install zeek-archiver tool
|
||||||
--disable-btest don't install BTest
|
--disable-btest don't install BTest
|
||||||
|
--disable-btest-pcaps don't install Zeek's BTest input pcaps
|
||||||
--disable-python don't try to build python bindings for Broker
|
--disable-python don't try to build python bindings for Broker
|
||||||
--disable-broker-tests don't try to build Broker unit tests
|
--disable-broker-tests don't try to build Broker unit tests
|
||||||
--disable-zkg don't install zkg
|
--disable-zkg don't install zkg
|
||||||
|
@ -162,6 +163,7 @@ append_cache_entry ENABLE_JEMALLOC BOOL false
|
||||||
append_cache_entry BUILD_SHARED_LIBS BOOL true
|
append_cache_entry BUILD_SHARED_LIBS BOOL true
|
||||||
append_cache_entry INSTALL_AUX_TOOLS BOOL true
|
append_cache_entry INSTALL_AUX_TOOLS BOOL true
|
||||||
append_cache_entry INSTALL_BTEST BOOL true
|
append_cache_entry INSTALL_BTEST BOOL true
|
||||||
|
append_cache_entry INSTALL_BTEST_PCAPS BOOL true
|
||||||
append_cache_entry INSTALL_ZEEK_ARCHIVER BOOL true
|
append_cache_entry INSTALL_ZEEK_ARCHIVER BOOL true
|
||||||
append_cache_entry INSTALL_ZEEKCTL BOOL true
|
append_cache_entry INSTALL_ZEEKCTL BOOL true
|
||||||
append_cache_entry INSTALL_ZKG BOOL true
|
append_cache_entry INSTALL_ZKG BOOL true
|
||||||
|
@ -293,6 +295,9 @@ while [ $# -ne 0 ]; do
|
||||||
--disable-btest)
|
--disable-btest)
|
||||||
append_cache_entry INSTALL_BTEST BOOL false
|
append_cache_entry INSTALL_BTEST BOOL false
|
||||||
;;
|
;;
|
||||||
|
--disable-btest-pcaps)
|
||||||
|
append_cache_entry INSTALL_BTEST_PCAPS BOOL false
|
||||||
|
;;
|
||||||
--disable-python)
|
--disable-python)
|
||||||
append_cache_entry DISABLE_PYTHON_BINDINGS BOOL true
|
append_cache_entry DISABLE_PYTHON_BINDINGS BOOL true
|
||||||
;;
|
;;
|
||||||
|
|
8
testing/CMakeLists.txt
Normal file
8
testing/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
install(DIRECTORY scripts/ DESTINATION ${ZEEK_CONFIG_BTEST_TOOLS_DIR}/scripts
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
FILES_MATCHING PATTERN "diff-*")
|
||||||
|
install(FILES btest/random.seed DESTINATION ${ZEEK_CONFIG_BTEST_TOOLS_DIR}/data)
|
||||||
|
|
||||||
|
if ( INSTALL_BTEST_PCAPS )
|
||||||
|
install(DIRECTORY btest/Traces/ DESTINATION ${ZEEK_CONFIG_BTEST_TOOLS_DIR}/data/pcaps)
|
||||||
|
endif ()
|
5
testing/btest/Traces/README
Normal file
5
testing/btest/Traces/README
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
These are the trace files that are used by the Zeek test suite.
|
||||||
|
|
||||||
|
Note to maintainers: please take care when modyfing/removing files from here.
|
||||||
|
We install these traces with the Zeek distribution and external packages might
|
||||||
|
depend on them for tests.
|
|
@ -1,21 +1,22 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
version=@VERSION@
|
binpac_root=@ZEEK_CONFIG_BINPAC_ROOT_DIR@
|
||||||
|
broker_root=@ZEEK_CONFIG_BROKER_ROOT_DIR@
|
||||||
|
btest_tools_dir=@ZEEK_CONFIG_BTEST_TOOLS_DIR@
|
||||||
build_type=@CMAKE_BUILD_TYPE_LOWER@
|
build_type=@CMAKE_BUILD_TYPE_LOWER@
|
||||||
prefix=@CMAKE_INSTALL_PREFIX@
|
caf_root=@ZEEK_CONFIG_CAF_ROOT_DIR@
|
||||||
script_dir=@ZEEK_SCRIPT_INSTALL_PATH@
|
cmake_dir=@CMAKE_INSTALL_PREFIX@/share/zeek/cmake
|
||||||
site_dir=@ZEEK_SCRIPT_INSTALL_PATH@/site
|
config_dir=@ZEEK_ETC_INSTALL_DIR@
|
||||||
|
include_dir=@CMAKE_INSTALL_PREFIX@/include
|
||||||
lib_dir=@CMAKE_INSTALL_FULL_LIBDIR@
|
lib_dir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||||
plugin_dir=@BRO_PLUGIN_INSTALL_PATH@
|
plugin_dir=@BRO_PLUGIN_INSTALL_PATH@
|
||||||
config_dir=@ZEEK_ETC_INSTALL_DIR@
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
python_dir=@PY_MOD_INSTALL_DIR@
|
python_dir=@PY_MOD_INSTALL_DIR@
|
||||||
cmake_dir=@CMAKE_INSTALL_PREFIX@/share/zeek/cmake
|
script_dir=@ZEEK_SCRIPT_INSTALL_PATH@
|
||||||
include_dir=@CMAKE_INSTALL_PREFIX@/include
|
site_dir=@ZEEK_SCRIPT_INSTALL_PATH@/site
|
||||||
zeekpath=@DEFAULT_ZEEKPATH@
|
version=@VERSION@
|
||||||
zeek_dist=@ZEEK_DIST@
|
zeek_dist=@ZEEK_DIST@
|
||||||
binpac_root=@ZEEK_CONFIG_BINPAC_ROOT_DIR@
|
zeekpath=@DEFAULT_ZEEKPATH@
|
||||||
caf_root=@ZEEK_CONFIG_CAF_ROOT_DIR@
|
|
||||||
broker_root=@ZEEK_CONFIG_BROKER_ROOT_DIR@
|
|
||||||
|
|
||||||
add_path() {
|
add_path() {
|
||||||
# $1: existing path
|
# $1: existing path
|
||||||
|
@ -37,11 +38,39 @@ include_dir=$(add_path "$include_dir" "@ZEEK_CONFIG_OPENSSL_INCLUDE_DIR@")
|
||||||
include_dir=$(add_path "$include_dir" "@ZEEK_CONFIG_LibKrb5_INCLUDE_DIR@")
|
include_dir=$(add_path "$include_dir" "@ZEEK_CONFIG_LibKrb5_INCLUDE_DIR@")
|
||||||
include_dir=$(add_path "$include_dir" "@ZEEK_CONFIG_GooglePerftools_INCLUDE_DIR@")
|
include_dir=$(add_path "$include_dir" "@ZEEK_CONFIG_GooglePerftools_INCLUDE_DIR@")
|
||||||
|
|
||||||
usage="\
|
usage() {
|
||||||
Usage: zeek-config [--version] [--build_type] [--prefix] [--lib_dir] [--script_dir] [--site_dir] [--plugin_dir] [--config_dir] [--python_dir] [--include_dir] [--cmake_dir] [--zeekpath] [--zeek_dist] [--binpac_root] [--caf_root] [--broker_root]"
|
echo "Usage: zeek-config [OPTIONS]
|
||||||
|
|
||||||
|
Basic options:
|
||||||
|
|
||||||
|
--build_type Zeek build type as per cmake, lower case (e.g. 'relwithdebinfo')
|
||||||
|
--prefix Toplevel Zeek distribution installation directory
|
||||||
|
--version Zeek version number
|
||||||
|
--zeek_dist Toplevel directory of source tree the distribution built from
|
||||||
|
--zeekpath ZEEKPATH environment variable paths for this distribution
|
||||||
|
|
||||||
|
Specific directories in the Zeek distribution:
|
||||||
|
|
||||||
|
--btest_tools_dir Zeek-related BTest tooling
|
||||||
|
--cmake_dir Zeek's cmake modules
|
||||||
|
--config_dir Configuration files for cluster topology, zkg, etc
|
||||||
|
--include_dir C/C++ header folders for Zeek and related components, colon-separated
|
||||||
|
--lib_dir Toplevel folder for shared libraries, Python packages, etc
|
||||||
|
--plugin_dir Native-code Zeek plugins
|
||||||
|
--python_dir Python packages (Broker, ZeekControl, zkg, etc)
|
||||||
|
--script_dir Toplevel folder for Zeek scripts
|
||||||
|
--site_dir Site-specific Zeek scripts
|
||||||
|
|
||||||
|
Toplevel installation directories for third-party components:
|
||||||
|
|
||||||
|
--binpac_root BinPAC compiler
|
||||||
|
--broker_root Broker communication framework
|
||||||
|
--caf_root C++ Actor Framework
|
||||||
|
"
|
||||||
|
}
|
||||||
|
|
||||||
if [ $# -eq 0 ] ; then
|
if [ $# -eq 0 ] ; then
|
||||||
echo "${usage}" 1>&2
|
usage 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -64,6 +93,9 @@ while [ $# -ne 0 ]; do
|
||||||
--bropath) # For compatibility with legacy Bro plugins.
|
--bropath) # For compatibility with legacy Bro plugins.
|
||||||
echo $zeekpath
|
echo $zeekpath
|
||||||
;;
|
;;
|
||||||
|
--btest_tools_dir)
|
||||||
|
echo $btest_tools_dir
|
||||||
|
;;
|
||||||
--build_type)
|
--build_type)
|
||||||
echo $build_type
|
echo $build_type
|
||||||
;;
|
;;
|
||||||
|
@ -107,7 +139,7 @@ while [ $# -ne 0 ]; do
|
||||||
echo $zeekpath
|
echo $zeekpath
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "${usage}" 1>&2
|
usage 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue