diff --git a/CHANGES b/CHANGES index 1036ce4e92..29a71ca209 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,10 @@ +2.6-404 | 2019-06-12 15:10:19 -0700 + + * Rename directories from bro to zeek (Daniel Thayer) + + The new default installation prefix is /usr/local/zeek + 2.6-400 | 2019-06-07 20:06:33 -0700 * Adapt bro_plugin CMake macros to use zeek_plugin (Jon Siwek, Corelight) diff --git a/CMakeLists.txt b/CMakeLists.txt index f5edf896c0..5f0cbd6d29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ endif () set(ZEEK_ROOT_DIR ${CMAKE_INSTALL_PREFIX}) if (NOT ZEEK_SCRIPT_INSTALL_PATH) # set the default Zeek script installation path (user did not specify one) - set(ZEEK_SCRIPT_INSTALL_PATH ${ZEEK_ROOT_DIR}/share/bro) + set(ZEEK_SCRIPT_INSTALL_PATH ${ZEEK_ROOT_DIR}/share/zeek) endif () if (NOT ZEEK_MAN_INSTALL_PATH) @@ -37,7 +37,7 @@ endif () get_filename_component(ZEEK_SCRIPT_INSTALL_PATH ${ZEEK_SCRIPT_INSTALL_PATH} ABSOLUTE) -set(BRO_PLUGIN_INSTALL_PATH ${ZEEK_ROOT_DIR}/lib/bro/plugins CACHE STRING "Installation path for plugins" FORCE) +set(BRO_PLUGIN_INSTALL_PATH ${ZEEK_ROOT_DIR}/lib/zeek/plugins CACHE STRING "Installation path for plugins" FORCE) configure_file(zeek-path-dev.in ${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev) @@ -72,6 +72,34 @@ if(${ENABLE_DEBUG}) set(VERSION_C_IDENT "${VERSION_C_IDENT}_debug") endif() +if ( NOT BINARY_PACKAGING_MODE ) + macro(_make_install_dir_symlink _target _link) + install(CODE " + if ( \"\$ENV{DESTDIR}\" STREQUAL \"\" ) + if ( EXISTS \"${_target}\" AND NOT EXISTS \"${_link}\" ) + message(STATUS \"WARNING: installed ${_link} as symlink to ${_target}\") + execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink + \"${_target}\" \"${_link}\") + endif () + endif () + ") + endmacro() + + if ( "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local/zeek" ) + # If we're installing into the default prefix, check if the + # old default prefix already exists and symlink to it. + # This is done to help keep custom user configuration/installation + # if they're upgrading from a version before Zeek 3.0. + _make_install_dir_symlink("/usr/local/bro" "/usr/local/zeek") + endif () + + # Check whether we need to symlink directories used by versions + # 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") +endif () + ######################################################################## ## Dependency Configuration @@ -257,7 +285,7 @@ string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zeek-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/zeek-config.h) include_directories(${CMAKE_CURRENT_BINARY_DIR}) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/zeek-config.h DESTINATION include/bro) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/zeek-config.h DESTINATION include/zeek) if ( CAF_ROOT_DIR ) set(ZEEK_CONFIG_CAF_ROOT_DIR ${CAF_ROOT_DIR}) @@ -281,7 +309,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zeek-config.in ${CMAKE_CURRENT_BINARY_DIR}/zeek-config @ONLY) install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/zeek-config DESTINATION bin) -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake DESTINATION share/bro +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake DESTINATION share/zeek USE_SOURCE_PERMISSIONS) # Install wrapper script for Bro-to-Zeek renaming. @@ -289,7 +317,7 @@ include(InstallShellScript) include(InstallSymlink) InstallShellScript("bin" "zeek-wrapper.in" "zeek-wrapper") InstallSymlink("${CMAKE_INSTALL_PREFIX}/bin/zeek-wrapper" "${CMAKE_INSTALL_PREFIX}/bin/bro-config") -InstallSymlink("${CMAKE_INSTALL_PREFIX}/include/bro/zeek-config.h" "${CMAKE_INSTALL_PREFIX}/include/bro/bro-config.h") +InstallSymlink("${CMAKE_INSTALL_PREFIX}/include/zeek/zeek-config.h" "${CMAKE_INSTALL_PREFIX}/include/zeek/bro-config.h") ######################################################################## ## Recurse on sub-directories diff --git a/NEWS b/NEWS index 6abb21c055..0b22bc3f1e 100644 --- a/NEWS +++ b/NEWS @@ -116,6 +116,13 @@ Changed Functionality installation, installing the newer Zeek version over it will retain that file and even symlink the new ``zeekctl.cfg`` to it. +- The default install prefix is now ``/usr/local/zeek`` instead of + ``/usr/local/bro``. If you have an existing installation that used + the previous default and are still using the new default when upgrading, + we'll crate ``/usr/local/zeek`` as a symlink to ``/usr/local/bro``. + Certain subdirectories will also get similar treatment: ``share/bro``, + ``include/bro``, and ``lib/bro``. + - ``$prefix/share/bro/site/local.bro`` has been renamed to ``local.zeek``. If you have a ``local.bro`` file from a previous installation, possibly with customizations made to it, the new diff --git a/VERSION b/VERSION index 348104bb60..f3764461d6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.6-400 +2.6-404 diff --git a/aux/bifcl b/aux/bifcl index ce92264d71..699ffb13c9 160000 --- a/aux/bifcl +++ b/aux/bifcl @@ -1 +1 @@ -Subproject commit ce92264d711553c54d0bbc523ce829c0669a8b16 +Subproject commit 699ffb13c986aca599b70735b368a515c2149982 diff --git a/aux/binpac b/aux/binpac index 97a855fc52..baabe22a2b 160000 --- a/aux/binpac +++ b/aux/binpac @@ -1 +1 @@ -Subproject commit 97a855fc5200506fe0ad0d4a0a7af765d72bb1b2 +Subproject commit baabe22a2b8a68fac448e862e1c2acc46f89c5fc diff --git a/aux/broker b/aux/broker index 1b249dc995..d884db29a7 160000 --- a/aux/broker +++ b/aux/broker @@ -1 +1 @@ -Subproject commit 1b249dc995c6e31314cc2a0559d36460ae37bd75 +Subproject commit d884db29a72ba88c7992e17a253524d1505b8f78 diff --git a/aux/netcontrol-connectors b/aux/netcontrol-connectors index 43da5d80fd..8a6f3f7c50 160000 --- a/aux/netcontrol-connectors +++ b/aux/netcontrol-connectors @@ -1 +1 @@ -Subproject commit 43da5d80fdf0923e790af3c21749f6e6241cda80 +Subproject commit 8a6f3f7c506ac483265afc77d3c1b0861db79601 diff --git a/aux/zeek-aux b/aux/zeek-aux index 892b9e720e..e0689c1c95 160000 --- a/aux/zeek-aux +++ b/aux/zeek-aux @@ -1 +1 @@ -Subproject commit 892b9e720e0770c51bb90ba179522ea504bda7d3 +Subproject commit e0689c1c9565ba7ffcab011e9f22f6a17a67e40a diff --git a/aux/zeekctl b/aux/zeekctl index a72205e04b..5efa2d0c29 160000 --- a/aux/zeekctl +++ b/aux/zeekctl @@ -1 +1 @@ -Subproject commit a72205e04bb007ddf5226202cde852937bdb85a5 +Subproject commit 5efa2d0c29bf52c3c64d5f61e39501a9c7b9dd80 diff --git a/cmake b/cmake index 310498b448..58e4eebe3a 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 310498b44868cde4e9a75c399865549d02a0a318 +Subproject commit 58e4eebe3aebd0cf608e51046805a9ab1ffa6c1b diff --git a/configure b/configure index b1ea7bdff5..eb6a38f1a0 100755 --- a/configure +++ b/configure @@ -31,9 +31,9 @@ Usage: $0 [OPTION]... [VAR=VALUE]... (useful for cross-compiling) Installation Directories: - --prefix=PREFIX installation directory [/usr/local/bro] + --prefix=PREFIX installation directory [/usr/local/zeek] --scriptdir=PATH root installation directory for Zeek scripts - [PREFIX/share/bro] + [PREFIX/share/zeek] --localstatedir=PATH when using ZeekControl, path to store log files and run-time data (within log/ and spool/ subdirs) [PREFIX] @@ -127,12 +127,12 @@ remove_cache_entry () { # set defaults builddir=build -prefix=/usr/local/bro +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/bro +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 append_cache_entry ENABLE_PERFTOOLS BOOL false @@ -321,7 +321,7 @@ while [ $# -ne 0 ]; do done if [ "$user_set_scriptdir" != "true" ]; then - append_cache_entry ZEEK_SCRIPT_INSTALL_PATH STRING $prefix/share/bro + append_cache_entry ZEEK_SCRIPT_INSTALL_PATH STRING $prefix/share/zeek fi if [ "$user_set_conffilesdir" != "true" ]; then diff --git a/doc b/doc index f8869ea5f7..abf68ae3b4 160000 --- a/doc +++ b/doc @@ -1 +1 @@ -Subproject commit f8869ea5f72cda06d5acf0fbeefd5af102f7d77e +Subproject commit abf68ae3b4c924c79d441ed16c9e0207ba0164aa diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 19d3799719..4176bc3c8f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -418,7 +418,7 @@ install(CODE " ") install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ - DESTINATION include/bro + DESTINATION include/zeek FILES_MATCHING PATTERN "*.h" PATTERN "*.pac" @@ -426,7 +426,7 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ ) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ - DESTINATION include/bro + DESTINATION include/zeek FILES_MATCHING PATTERN "*.bif.func_h" PATTERN "*.bif.netvar_h" @@ -435,5 +435,5 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ ) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/sqlite3.h - DESTINATION include/bro/3rdparty + DESTINATION include/zeek/3rdparty ) diff --git a/zeek-config.in b/zeek-config.in index 5afafb56ec..50d99b6645 100755 --- a/zeek-config.in +++ b/zeek-config.in @@ -8,8 +8,8 @@ site_dir=@ZEEK_SCRIPT_INSTALL_PATH@/site plugin_dir=@BRO_PLUGIN_INSTALL_PATH@ config_dir=@ZEEK_ETC_INSTALL_DIR@ python_dir=@PY_MOD_INSTALL_DIR@ -cmake_dir=@CMAKE_INSTALL_PREFIX@/share/bro/cmake -include_dir=@CMAKE_INSTALL_PREFIX@/include/bro +cmake_dir=@CMAKE_INSTALL_PREFIX@/share/zeek/cmake +include_dir=@CMAKE_INSTALL_PREFIX@/include/zeek zeekpath=@DEFAULT_ZEEKPATH@ zeek_dist=@ZEEK_DIST@ binpac_root=@ZEEK_CONFIG_BINPAC_ROOT_DIR@