Commit graph

368 commits

Author SHA1 Message Date
Jon Siwek
17fd371eae Merge remote-tracking branch 'origin/topic/neverlord/doctest'
- Minor whitespace tweaks
- Add line to build summary output for whether unit tests are enabled

* origin/topic/neverlord/doctest:
  Add doctest license and copyright
  Integrate review feedback
  Fix submodule reference for doctest
  Add initial scaffold for unit testing via doctest
2019-11-14 19:17:37 -08:00
Dominik Charousset
773adab76b Integrate review feedback 2019-11-14 09:15:50 +01:00
Dominik Charousset
f6407a4e0f Add initial scaffold for unit testing via doctest 2019-11-12 10:03:49 +01:00
Jon Siwek
b182c35762 Fix undefined symbols loading libbroker on OpenBSD
python3.7:/usr/local/lib/libbroker.so.2: undefined symbol '__inet_ntop'
python3.7:/usr/local/lib/libbroker.so.2: undefined symbol '__inet_pton'

An independent Broker build doesn't have that problem because it
usually picks up those functions from libc.  But when building Broker
as part of Zeek, include search paths were already modified to reflect
Zeek's libbind dependency and Broker ends up using libbind headers
which defines its own version of these, but then does not link to
libbind (since it's a dependency of Zeek, not Broker) to actually get
those symbols (e.g. when dlopen'ing independently from Zeek, like for
the Python bindings).  Solution is to re-order include_directories()
for Zeek dependencies such that they won't effect sub-projects.
2019-11-08 12:30:56 -08:00
Dominik Charousset
24d5ffa7a1 Fix position of project(), require CMake 3
The call to `project` must come after `cmake_minimum_required` in CMake
in order to get the correct policy settings.
2019-10-28 13:31:46 +01:00
Jon Siwek
2c6cb6e5f3 GH-585: Require C++17 2019-10-24 12:51:06 -07:00
Dominik Charousset
b618c7d0e2 Fix build with external CAF but bundled Broker 2019-10-01 21:08:14 +02:00
Jon Siwek
7613ab0af0 GH-602: fix paraglob header inclusion, installation, and search paths 2019-09-26 17:39:25 -07:00
Dominik Charousset
68bb0e21a3 Fix overly specific include_directories usage
Calling `find_package(CAF)` puts all include directory paths into a
single variable. Picking the paths individually is not only error prone
and cumbersome, but can also lead to bulid errors. For example, when
using a build directory for CAF_ROOT then CAF_INCLUDE_DIRS will have one
extra path to find CAF's `config.hpp` (which is part of the build
directory).
2019-09-21 11:46:06 +02:00
Jon Siwek
f6f471f4b7 Update Broker include dir search path
Related to https://github.com/zeek/broker/issues/51
2019-09-04 16:29:04 -07:00
Robin Sommer
00987c4411 Merge remote-tracking branch 'origin/topic/timw/clang-tidy'
* origin/topic/timw/clang-tidy:
  Change over to whitelisting clang-tidy options instead of blacklisting
  Use FindClangTidy in the cmake submodule to make things easier
2019-08-13 23:45:16 +00:00
Jon Siwek
55fb48d04d GH-533: use consistent "lib" install dir
Previously, some sub-projects, like binpac, use GNUInstallDirs.cmake
to choose the default name of the library install directory while
others hard-code "lib" as the default.  The former may pick "lib64"
on some platforms, so for now, when installing such sub-projects as
part of Zeek, it's overridden to consistently be "lib".
2019-08-12 18:19:27 -07:00
Tim Wojtulewicz
b42e726a8e Use FindClangTidy in the cmake submodule to make things easier 2019-08-12 13:59:17 -07:00
Johanna Amann
fd22c4e29a Abort when --enable-jemalloc is given, but JeMalloc is not found
At the moment this also already aborts in this case - much later, with
an ugly error message.
2019-07-22 10:37:49 -07:00
Johanna Amann
d24fb97b53 Merge remote-tracking branch 'origin/topic/jsiwek/gh-475-no-default-tcmalloc'
* origin/topic/jsiwek/gh-475-no-default-tcmalloc:
  GH-475: Require --enable-perftools to link in tcmalloc

I added an error message is --enable-perftools is given, but perftools
is not found - it does not seem great to not abort in these cases.
2019-07-22 10:31:55 -07:00
Jon Siwek
7a664ccc10 GH-475: Require --enable-perftools to link in tcmalloc
Before, Linux systems would automatically use tcmalloc if found.

Remove --disable-perftools since there's no longer any case where
it's used by default.
2019-07-19 14:07:19 -07:00
Jon Siwek
4bdcde52bd Support old plugins that use files within the source/build tree
Plugins that were made using an older skeleton (e.g. from Bro 2.5.x)
may still reference "bro-config.h", "bro-path-dev", or "bro" from the
build tree, so we can simply provide compatibility symlinks/wrappers
for the new files that use "zeek" in their names.
2019-07-16 10:10:37 -07:00
Zeke Medley
a5f6757d7d Merge remote-tracking branch 'upstream/master' into paraglob 2019-06-20 14:14:48 -07:00
Jon Siwek
fcceba5ece Merge remote-tracking branch 'origin/topic/timw/asan'
* origin/topic/timw/asan:
  Fix potential null-dereference in current_time()
  Add --sanitizers flag to configure script to enable Clang sanitizers
2019-06-13 11:20:49 -07:00
Jon Siwek
b33926a8e1 Merge remote-tracking branch 'origin/topic/dnthayer/gh-313'
* origin/topic/dnthayer/gh-313:
  Create local.zeek as symlink for upgrade installs
  Rename directories from bro to zeek
2019-06-12 15:11:04 -07:00
Tim Wojtulewicz
7efc39d228 Add --sanitizers flag to configure script to enable Clang sanitizers 2019-06-12 14:46:29 -07:00
ZekeMedley
e1520a0d67 Initial paraglob integration. 2019-06-04 14:24:51 -07:00
Daniel Thayer
5a253d355b Rename directories from bro to zeek 2019-05-24 03:32:14 -05:00
Daniel Thayer
1a74516db1 Rename all BRO-prefixed environment variables
For backward compatibility when reading values, we first check
the ZEEK-prefixed value, and if not set, then check the corresponding
BRO-prefixed value.
2019-05-22 00:12:31 -05:00
Daniel Thayer
fe3d508796 Additional Bro to Zeek renaming
Most of these changes are either cmake-related or plugin-related.
Added a new test "plugins/legacy.zeek" to test that legacy Bro plugins
still work.

Also added a symlink bro-path-dev.in because some legacy Bro packages
won't install without it.
2019-05-19 16:51:36 -05:00
Daniel Thayer
be182aac83 More bro-to-zeek renaming in scripts and other files 2019-05-16 02:36:41 -05:00
Jon Siwek
385a3a5ae8 Update CMake to use aux/zeekctl and aux/zeek-aux submodules
Instead of the old "bro" versions of those which are no symlinks.
2019-05-14 17:48:18 -07:00
Jon Siwek
6ad7099f7e Merge remote-tracking branch 'origin/topic/robin/gh-239'
* origin/topic/robin/gh-239:
  Undo a change to btest.cfg from a recent commit
  Updating submodule.
  Fix zeek-wrapper
  Update for renaming BroControl to ZeekControl.
  Updating submodule.
  GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev.
2019-05-14 13:27:40 -07:00
Robin Sommer
89b8d6e7ba Update for renaming BroControl to ZeekControl. 2019-05-06 21:22:19 +00:00
Johanna Amann
dcd6454530 Remove RemoteSerializer and related code/types.
Also removes broccoli from the source tree.
2019-05-03 15:00:13 -07:00
Robin Sommer
789cb376fd GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev.
This also installs symlinks from "zeek" and "bro-config" to a wrapper
script that prints a deprecation warning.

The btests pass, but this is still WIP. broctl renaming is still
missing.

#239
2019-05-01 21:43:45 +00:00
Jon Siwek
eb9a05cd25 GH-307: Build binpac as a shared lib, not static by default 2019-03-18 14:00:54 -07:00
Jon Siwek
9345ff346a Add missing libkrb5 include dir to CMake config 2019-02-22 14:35:54 -06:00
Jon Siwek
2ff746fea7 Change doc/ subdir into a git submodule
The docs now live at https://github.com/zeek/zeek-docs
2019-01-17 14:15:45 -06:00
Jon Siwek
002191ab62 Merge remote-tracking branch 'origin/topic/jsiwek/alpine-support'
* origin/topic/jsiwek/alpine-support:
  Add FTS dependency when building on Alpine
  Remove unnecessary header include
  Improve default DNS resolution support for Alpine/musl
  Add dns_resolver option
2018-12-10 11:55:40 -06:00
Johanna Amann
f7ad94f757 Introduce --enable-static-broker configuration option.
This option will build the bundled broker (and caf) statically.
2018-12-06 11:53:50 -08:00
Jon Siwek
3b1024a439 Add FTS dependency when building on Alpine
Addresses GH-216
2018-11-30 19:29:28 -06:00
Jon Siwek
0f55080625 GH-184: add bro-config --build_type, outputs CMake build type 2018-10-05 14:27:12 -05:00
Daniel Thayer
7739aaf780 Fix finding of kerberos and libmaxminddb in CMakeLists.txt
On an older system (CentOS 7), there was a bug where although the
headers and libraries for kerberos and maxminddb were found correctly,
both of those components were listed as "false" in the "Bro Build Summary"
output from cmake.
2018-08-23 15:59:35 -05:00
Jon Siwek
9121c0436f Add --with-broker configure option 2018-08-21 15:55:56 -05:00
Jon Siwek
08a1480fd9 Fix --with-binpac configure option 2018-08-01 11:26:04 -05:00
Jon Siwek
4243a5d5b0 Update CAF-finding logic 2018-08-01 11:21:24 -05:00
Jon Siwek
a71d84c968 Merge branch 'topic/feature/upstream/geoip' of https://github.com/corelight/bro
* 'topic/feature/upstream/geoip' of https://github.com/corelight/bro:
  Replace GeoIP Legacy DB support with MaxMind DB support
2018-07-31 16:50:15 -05:00
Johanna Amann
a251b32d85 Merge remote-tracking branch 'origin/topic/jsiwek/openssl-1.1'
* origin/topic/jsiwek/openssl-1.1:
  Update install instructions for OpenSSL 1.1 compat
  Remove requestorName parameter of ocsp_request event
  Adjust x509 unit tests to work around OpenSSL 1.0 vs. 1.1 differences
  Fixes for OpenSSL 1.1 support
2018-07-31 13:13:06 +02:00
Jonathan Perkins
1ae7d3b349 Replace GeoIP Legacy DB support with MaxMind DB support
This updates the "lookup_location" and "lookup_asn" BIFs to use
libmaxminddb.  The motivation for this is that MaxMind is discontinuing
GeoLite Legacy databases: no updates after April 1, 2018, no downloads
after January 2, 2019.  It's also noted that all GeoIP Legacy databases
may be discontinued as they are superseded by GeoIP2.
2018-07-30 16:04:58 -05:00
Jon Siwek
026f78e5a3 Add broker/binpac/caf dirs to bro-config script 2018-07-24 16:46:59 -05:00
Jon Siwek
2ffaa1cdb1 Support building plugins from Bro installation root
As opposed to plugins depending on a Bro source/build tree.  This
required installing various Bro headers, BinPAC and it's headers,
bifcl, and Bro's custom CMake modules.
2018-07-13 17:23:08 -05:00
Jon Siwek
e1b7820b01 Move bifcl to a separate repo 2018-07-12 17:51:23 -05:00
Jon Siwek
2e0edd7416 Adjust x509 unit tests to work around OpenSSL 1.0 vs. 1.1 differences 2018-06-29 16:01:23 -05:00
Jon Siwek
da593e7aaa GH-131: disable krb ticket decryption on non-Linux
A test case fails on macOS and FreeBSD fails to build.
2018-06-07 13:58:01 -05:00