mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 20:48:21 +00:00
Merge remote-tracking branch 'origin/topic/christian/libdir-improvements'
* origin/topic/christian/libdir-improvements: Update CMakeLists.txt to make portability symlink absolute Improve support for custom libdir locations
This commit is contained in:
commit
499cb11dc3
14 changed files with 94 additions and 57 deletions
15
CHANGES
15
CHANGES
|
@ -1,4 +1,19 @@
|
|||
|
||||
3.3.0-dev.564 | 2020-11-24 15:23:50 -0800
|
||||
|
||||
* Improve support for custom libdir locations (Christian Kreibich, Corelight)
|
||||
|
||||
- Remove hardwiring of $ZEEK_ROOT/lib throughout the three and
|
||||
defaults the name of Zeek's library directory to the default on the
|
||||
given platform (e.g. lib64), via GNUInstallDirs.
|
||||
|
||||
- Consistently use that lib directory, instead of two lib folders
|
||||
resulting when using a custom libdir.
|
||||
|
||||
- Remove the old lib directory in the installation prefix, if one exists
|
||||
|
||||
- Add --lib_dir to zeek-config (and sort its options a bit).
|
||||
|
||||
3.3.0-dev.561 | 2020-11-23 21:50:19 -0800
|
||||
|
||||
* Move implementation of internal_{type,var,etc} methods back into global namespace.
|
||||
|
|
|
@ -4,14 +4,7 @@ cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
|
|||
|
||||
project(Zeek C CXX)
|
||||
|
||||
if ( NOT CMAKE_INSTALL_LIBDIR )
|
||||
# Currently, some sub-projects may use GNUInstallDirs.cmake to choose the
|
||||
# library install dir, while others just default to "lib". For sake of
|
||||
# consistency, this just overrides the former to always use "lib" in case
|
||||
# it would have chosen something else, like "lib64", but a thing for the
|
||||
# future may be to standardize all sub-projects to use GNUInstallDirs.
|
||||
set(CMAKE_INSTALL_LIBDIR lib)
|
||||
endif ()
|
||||
include(GNUInstallDirs)
|
||||
|
||||
include(cmake/CommonCMakeConfig.cmake)
|
||||
include(cmake/FindClangTidy.cmake)
|
||||
|
@ -60,7 +53,8 @@ endif ()
|
|||
get_filename_component(ZEEK_SCRIPT_INSTALL_PATH ${ZEEK_SCRIPT_INSTALL_PATH}
|
||||
ABSOLUTE)
|
||||
|
||||
set(BRO_PLUGIN_INSTALL_PATH ${ZEEK_ROOT_DIR}/lib/zeek/plugins CACHE STRING "Installation path for plugins" FORCE)
|
||||
set(BRO_PLUGIN_INSTALL_PATH ${CMAKE_INSTALL_FULL_LIBDIR}/zeek/plugins CACHE STRING "Installation path for plugins" FORCE)
|
||||
set(PY_MOD_INSTALL_DIR ${CMAKE_INSTALL_FULL_LIBDIR}/zeekctl CACHE STRING "Installation path for Python modules" FORCE)
|
||||
|
||||
configure_file(zeek-path-dev.in ${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev)
|
||||
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink
|
||||
|
@ -126,7 +120,7 @@ if ( NOT BINARY_PACKAGING_MODE )
|
|||
# before Zeek 3.0.
|
||||
_make_install_dir_symlink("${CMAKE_INSTALL_PREFIX}/include/bro" "${CMAKE_INSTALL_PREFIX}/include/zeek")
|
||||
_make_install_dir_symlink("${CMAKE_INSTALL_PREFIX}/share/bro" "${CMAKE_INSTALL_PREFIX}/share/zeek")
|
||||
_make_install_dir_symlink("${CMAKE_INSTALL_PREFIX}/lib/bro" "${CMAKE_INSTALL_PREFIX}/lib/zeek")
|
||||
_make_install_dir_symlink("${CMAKE_INSTALL_PREFIX}/lib/bro" "${CMAKE_INSTALL_FULL_LIBDIR}/zeek")
|
||||
endif ()
|
||||
|
||||
if ( ZEEK_SANITIZERS )
|
||||
|
@ -514,6 +508,23 @@ CheckOptionalBuildSources(auxil/zeekctl ZeekControl INSTALL_ZEEKCTL)
|
|||
CheckOptionalBuildSources(auxil/zeek-aux Zeek-Aux INSTALL_AUX_TOOLS)
|
||||
CheckOptionalBuildSources(auxil/zeek-archiver ZeekArchiver INSTALL_ZEEK_ARCHIVER)
|
||||
|
||||
########################################################################
|
||||
## Transitions and cleanups
|
||||
|
||||
if ( NOT BINARY_PACKAGING_MODE )
|
||||
# Remove pre-existing libdir of the old hardwired name if it is not
|
||||
# the name we're now installing under.
|
||||
set(_old_libdir ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
|
||||
install(CODE "
|
||||
if ( EXISTS \"${_old_libdir}\" AND IS_DIRECTORY \"${_old_libdir}\"
|
||||
AND NOT \"${_old_libdir}\" STREQUAL \"${CMAKE_INSTALL_FULL_LIBDIR}\" )
|
||||
message(STATUS \"WARNING: removing old library directory ${_old_libdir}\")
|
||||
execute_process(COMMAND \"${CMAKE_COMMAND}\" -E remove_directory \"${_old_libdir}\")
|
||||
endif ()
|
||||
")
|
||||
endif ()
|
||||
|
||||
########################################################################
|
||||
## Packaging Setup
|
||||
|
||||
|
|
9
NEWS
9
NEWS
|
@ -127,6 +127,15 @@ Changed Functionality
|
|||
to a behavior that favors consistency. For reference, see
|
||||
https://github.com/zeek/zeek/pull/251#issuecomment-713956976
|
||||
|
||||
- The Zeek installation tree is now more consistent in using a ``lib64/``
|
||||
(rather than ``lib/``) subdirectory for platforms where that's the common
|
||||
convention. If the old hardcoded ``lib/`` path exists while installing Zeek
|
||||
4.0 and the new subdirectory differs, then the old ``lib/`` will be removed.
|
||||
This potentially wipes out binary plugins that have already been installed
|
||||
there, but Zeek plugins generally have to be re-built/re-installed upon any
|
||||
Zeek upgrade anyway, so no part of the usual upgrade process is expected to
|
||||
be complicated by this cleanup operation.
|
||||
|
||||
Removed Functionality
|
||||
---------------------
|
||||
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
3.3.0-dev.561
|
||||
3.3.0-dev.564
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 1eaa6aff1d991307b134d85b64e1ab7b68c89c92
|
||||
Subproject commit 535228510006085b8300630200de318a9d7583ab
|
|
@ -1 +1 @@
|
|||
Subproject commit bc719c1565de9454b04a4b9aade14460268bcfbe
|
||||
Subproject commit 893861a62e51e6b86e3ca5f9df497cf7834019fb
|
|
@ -1 +1 @@
|
|||
Subproject commit 28fbb63d06c9192923effc930a4b60226c35fb0e
|
||||
Subproject commit 2ce76b8bda0db04d807fe85f7b959191eac84fe2
|
|
@ -1 +1 @@
|
|||
Subproject commit 512c911c27aeb319430093187f85c70610d80035
|
||||
Subproject commit aecd540164c0a8488417cb7b588b44e3c9ca7ac8
|
|
@ -1 +1 @@
|
|||
Subproject commit fbb5a21719d4d00244bdd9f0d0a2f8543580a016
|
||||
Subproject commit fccfd7d95d7c6e5b93325365bca85734502a1b21
|
|
@ -1 +1 @@
|
|||
Subproject commit f99e3265c5e7d6c45361b7d8dc03e772f66b0d4b
|
||||
Subproject commit d8391deb06e77515cfd73687eda74870f20e342a
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
|||
Subproject commit cf652b845908a15c02e11dca3162f3eecca0a9c5
|
||||
Subproject commit 3ee51ab5515f0f3089602d766aad737eb8b2c093
|
2
configure
vendored
2
configure
vendored
|
@ -148,7 +148,6 @@ prefix=/usr/local/zeek
|
|||
CMakeCacheEntries=""
|
||||
append_cache_entry CMAKE_INSTALL_PREFIX PATH $prefix
|
||||
append_cache_entry ZEEK_ROOT_DIR PATH $prefix
|
||||
append_cache_entry PY_MOD_INSTALL_DIR PATH $prefix/lib/zeekctl
|
||||
append_cache_entry ZEEK_SCRIPT_INSTALL_PATH STRING $prefix/share/zeek
|
||||
append_cache_entry ZEEK_ETC_INSTALL_DIR PATH $prefix/etc
|
||||
append_cache_entry ENABLE_DEBUG BOOL false
|
||||
|
@ -203,7 +202,6 @@ while [ $# -ne 0 ]; do
|
|||
prefix=$optarg
|
||||
append_cache_entry CMAKE_INSTALL_PREFIX PATH $optarg
|
||||
append_cache_entry ZEEK_ROOT_DIR PATH $optarg
|
||||
append_cache_entry PY_MOD_INSTALL_DIR PATH $optarg/lib/zeekctl
|
||||
;;
|
||||
--libdir=*)
|
||||
append_cache_entry CMAKE_INSTALL_LIBDIR PATH $optarg
|
||||
|
|
2
doc
2
doc
|
@ -1 +1 @@
|
|||
Subproject commit 88b48fe09d355239afd74a36d4f948629ee0e95d
|
||||
Subproject commit d76c85f56ff7d64603eebbc49ed06ef2b816ab06
|
|
@ -5,6 +5,7 @@ build_type=@CMAKE_BUILD_TYPE_LOWER@
|
|||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
script_dir=@ZEEK_SCRIPT_INSTALL_PATH@
|
||||
site_dir=@ZEEK_SCRIPT_INSTALL_PATH@/site
|
||||
lib_dir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
plugin_dir=@BRO_PLUGIN_INSTALL_PATH@
|
||||
config_dir=@ZEEK_ETC_INSTALL_DIR@
|
||||
python_dir=@PY_MOD_INSTALL_DIR@
|
||||
|
@ -24,7 +25,7 @@ include_dir=${include_dir}:@ZEEK_CONFIG_LibKrb5_INCLUDE_DIR@
|
|||
include_dir=${include_dir}:@ZEEK_CONFIG_GooglePerftools_INCLUDE_DIR@
|
||||
|
||||
usage="\
|
||||
Usage: zeek-config [--version] [--build_type] [--prefix] [--script_dir] [--site_dir] [--plugin_dir] [--config_dir] [--python_dir] [--include_dir] [--cmake_dir] [--zeekpath] [--zeek_dist] [--binpac_root] [--caf_root] [--broker_root]"
|
||||
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]"
|
||||
|
||||
if [ $# -eq 0 ] ; then
|
||||
echo "${usage}" 1>&2
|
||||
|
@ -38,14 +39,44 @@ while [ $# -ne 0 ]; do
|
|||
esac
|
||||
|
||||
case $1 in
|
||||
--version)
|
||||
echo $version
|
||||
--binpac_root)
|
||||
echo $binpac_root
|
||||
;;
|
||||
--bro_dist) # For compatibility with legacy Bro plugins.
|
||||
echo $zeek_dist
|
||||
;;
|
||||
--broker_root)
|
||||
echo $broker_root
|
||||
;;
|
||||
--bropath) # For compatibility with legacy Bro plugins.
|
||||
echo $zeekpath
|
||||
;;
|
||||
--build_type)
|
||||
echo $build_type
|
||||
;;
|
||||
--caf_root)
|
||||
echo $caf_root
|
||||
;;
|
||||
--cmake_dir)
|
||||
echo $cmake_dir
|
||||
;;
|
||||
--config_dir)
|
||||
echo $config_dir
|
||||
;;
|
||||
--include_dir)
|
||||
echo $include_dir
|
||||
;;
|
||||
--lib_dir)
|
||||
echo $lib_dir
|
||||
;;
|
||||
--plugin_dir)
|
||||
echo $plugin_dir
|
||||
;;
|
||||
--prefix)
|
||||
echo $prefix
|
||||
;;
|
||||
--build_type)
|
||||
echo $build_type
|
||||
--python_dir)
|
||||
echo $python_dir
|
||||
;;
|
||||
--script_dir)
|
||||
echo $script_dir
|
||||
|
@ -53,41 +84,14 @@ while [ $# -ne 0 ]; do
|
|||
--site_dir)
|
||||
echo $site_dir
|
||||
;;
|
||||
--plugin_dir)
|
||||
echo $plugin_dir
|
||||
;;
|
||||
--config_dir)
|
||||
echo $config_dir
|
||||
;;
|
||||
--python_dir)
|
||||
echo $python_dir
|
||||
;;
|
||||
--cmake_dir)
|
||||
echo $cmake_dir
|
||||
;;
|
||||
--include_dir)
|
||||
echo $include_dir
|
||||
;;
|
||||
--bropath) # For compatibility with legacy Bro plugins.
|
||||
echo $zeekpath
|
||||
;;
|
||||
--zeekpath)
|
||||
echo $zeekpath
|
||||
;;
|
||||
--bro_dist) # For compatibility with legacy Bro plugins.
|
||||
echo $zeek_dist
|
||||
--version)
|
||||
echo $version
|
||||
;;
|
||||
--zeek_dist)
|
||||
echo $zeek_dist
|
||||
;;
|
||||
--binpac_root)
|
||||
echo $binpac_root
|
||||
;;
|
||||
--caf_root)
|
||||
echo $caf_root
|
||||
;;
|
||||
--broker_root)
|
||||
echo $broker_root
|
||||
--zeekpath)
|
||||
echo $zeekpath
|
||||
;;
|
||||
*)
|
||||
echo "${usage}" 1>&2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue