Commit graph

159 commits

Author SHA1 Message Date
Tim Wojtulewicz
60953e14e7 Deprecate --with-binpac/--with-bifcl configure options 2025-06-24 12:50:35 -07:00
Tim Wojtulewicz
60a4aef941 Remove deprecated --disable-archiver configure argument 2025-06-24 12:50:35 -07:00
Tim Wojtulewicz
9db9861f75 Remove obsolete --with-bind configure flag 2025-05-27 17:55:49 -07:00
Tim Wojtulewicz
c1dd1e991e Add ability to enable iwyu and clang-tidy at configure time 2025-03-07 11:00:44 -07:00
Arne Welzel
b93a4f5d2f configure: Add --disable-cluster-backend-zeromq 2024-12-10 20:33:02 +01:00
Johanna Amann
4acd0297b0 Merge remote-tracking branch 'origin/master' into topic/johanna/spicy-tls
* origin/master: (89 commits)
  Update doc submodule [nomail] [skip ci]
  Bump cmake submodule [nomail]
  testing/btest: Default to HILTI_JIT_PARALLELISM=1
  Revert "CI: Use ccache and a single CPU when building spicy analyzers for btests"
  Update doc submodule [nomail] [skip ci]
  CI: Use ccache and a single CPU when building spicy analyzers for btests
  Extend btest for logging of disabled analyzers
  Update zeek-aux submodule [nomail]
  Add logging of disabled analyzers to analyzer.log
  Bump auxil/spicy to latest development snapshot
  Management framework: bump cluster testsuite to pull in telemetry tests
  Management framework: bump zeek-client
  Management framework: augment deployed configs with instance IP addresses
  Management framework: add auto-enumeration of metrics ports
  Management framework: propagate metrics port from agent
  Management framework: add metrics port in management & Supervisor node records
  Harden the telemetry manager against unset Telemetry::metrics_address
  Comment-only tweaks for telemetry-related settings.
  Fix for --display-cmake in configure Moved build directory creation further down in the script so that --display-cmake has a chance to happen before build tree setup.
  Update submodules [nomail]
  ...
2024-07-11 14:02:28 +01:00
cknill
8dc120df1d Fix for --display-cmake in configure
Moved build directory creation further down in the script so that --display-cmake
has a chance to happen before build tree setup.
2024-07-08 19:24:40 -06:00
Johanna Amann
4cce4a4c5f Add configure option to enable/disable spicy SSL
Spicy SSL is now only enabled when specifying the --enable-spicy-ssl
configure-time option.

This should allow merging this into Zeek on an experimental basis.
2024-06-04 14:13:59 +01:00
Christian Kreibich
9743023d48 Remove zeek-archiver from build config, deprecate --disable-archiver in configure 2024-04-19 12:10:55 -07:00
Peter Cullen
d57679e3dd Support for configurable localversion
Adds a new --localversion option to configure.
The value of localversion becomes part of the Zeek version string.
Docker builds allow an environment variable (LOCALVERSION) to set
the localversion string.
2024-04-17 14:16:47 -07:00
Johanna Amann
83ee47d769 Address review feedback for configure error change
See GH-3669
2024-04-02 16:49:43 +01:00
Johanna Amann
b1ee78faf8 Raise configure error message for unsupported archives
Github lets users download archives of our repos. These do not contain
the necessary submodules. We regularly encounter users who stumble
across this.

We already do have an error message that is raised when a non-recursive
git checkout was done. This commit adds an error message for a non-git
download that does not contain the necessary files.
2024-04-02 15:25:15 +01:00
Vern Paxson
dc376953fa framework for --enable-ZAM-profiling configuration
profiles go to zprof.log rather than stdout
2024-03-19 10:59:49 -07:00
Christian Kreibich
b97907daed Show --disable-javascript in configure --help
This is already supported and just missing from the help output.
2024-01-18 15:52:19 -08:00
Tim Wojtulewicz
bbcc4b00fb Set -Werror / /WX via target_compile_options to force warnings as errors 2024-01-08 13:25:05 -07:00
Arne Welzel
09b7caf986 configure/CMakelists: Use Python_EXECUTABLE as hint for interpreter
The PYTHON_EXECUTABLE variable was only interpreted by our own FindPythonDev.
cmake's FindPython uses Python_EXECUTABLE instead.

Also, if --with-python is not used, prefer unversioned executables that
match the version requirement. Further, remove Python_ADDITIONAL_VERSIONS
that is interpreted by FindPythonInterp which we're not using anymore.

https://cmake.org/cmake/help/latest/module/FindPython.html#artifacts-specification
https://cmake.org/cmake/help/latest/module/FindPythonInterp.html

Closes #3275
2023-09-07 12:48:37 +02:00
Robin Sommer
0040111955
Integrate the Spicy plugin into Zeek proper.
This reflects the `spicy-plugin` code as of `d8c296b81cc2a11`.

In addition to moving the code into Zeek's source tree, this comes
with a couple small functional changes:

- `spicyz` no longer tries to infer if it's running from the build
  directory. Instead `ZEEK_SPICY_LIBRARY` can be set to a custom
  location. `zeek-set-path.sh` does that now.

- ZEEK_CONFIG can be set to change what `spicyz -z` print out. This is
  primarily for backwards compatibility.

Some further notes on specifics:

- We raise the minimum Spicy version to 1.8 (i.e., current `main`
  branch).

- Renamed the `compiler/` subdirectory to `spicyz` to avoid
  include-path conflicts with the Spicy headers.

- In `cmake/`, the corresponding PR brings a new/extended version of
  `FindZeek`, which Spicy analyzer packages need. We also now install
  some of the files that the Spicy plugin used to bring for testing,
  so that existing packages keep working.

- For now, this all remains backwards compatible with the current
  `zkg` analyzer templates so that they work with both external and
  integrated Spicy support. Later, once we don't need to support any
  external Spicy plugin versions anymore, we can clean up the
  templates as well.

- All the plugin's tests have moved into the standard test suite. They
  are skipped if configure with `--disable-spicy`.

This holds off on adapting the new code further to Zeek's coding
conventions, so that it remains easier to maintain it in parallel to
the (now legacy) external plugin. We'll make a pass over the
formatting for (presumable) Zeek 6.1.
2023-05-16 10:17:45 +02:00
Tim Wojtulewicz
44b7e91f87 Merge remote-tracking branch 'origin/topic/neverlord/gh-2711'
* origin/topic/neverlord/gh-2711:
  Integrate review feedback
  Include compiler in --show-config output
  Fix CMake option defaults on Windows
  Move build defaults from configure to CMake
2023-05-04 10:56:46 -07:00
Dominik Charousset
7b35d471ad Include compiler in --show-config output 2023-05-02 20:44:48 +02:00
Dominik Charousset
7af3611807 Move build defaults from configure to CMake
Moving the defaults for build variables from the `configure` script to
`CMakeLists.txt` gives the same default behavior on platforms where the
`configure` script is not available (Windows) and also allows a pure
CMake-based work flow (e.g., the standard `cmake -S . -B build`) without
having to manually adjust the defaults.

The `configure` script also becomes much simpler as a result.
2023-04-29 11:04:30 +02:00
Arne Welzel
f0b9c59adb Add experimental JavaScript support when libnode is available
zeek.on('zeek_init', () => {
        console.log('Hello, Zeek!');
    });

For interaction with external systems and HTTP APIs, JavaScript and the
Node.js ecosystem beat Zeek script. Make it more easily accessible by
including ZeekJS with Zeek directly.

When a recent enough libnode version is found on the build system, ZeekJS is
added as a builtin plugin. This behavior can be disabled via
``--disable-javascript``. Linux distributions providing such a package are
Ubuntu (22.10) and Debian (testing/bookworm) as libnode-dev.
Fedora provides it as nodejs-devel.

This plugin takes over loading of .js or .cjs files. When no such files
are provided to Zeek, Node and the V8 engine are not initialized and
should not get into the way.

This should be considered experimental.
2023-04-14 11:26:41 +02:00
Tim Wojtulewicz
4f902c0f39 Add configure option for preallocating PortVal objects 2023-03-15 10:12:32 -07:00
Arne Welzel
bfd182f583 configure: Quote --include-plugins argument
This is allowed and documented to use `;` for separation. The newer
eval functionality then sees that as a command terminator.
2023-03-08 20:57:26 +01:00
Dominik Charousset
c4d5e3cda7 Configure script: drop --with-caf, add -D option 2022-11-05 09:00:13 +01:00
Tim Wojtulewicz
04ba6033c6 Add configure --display-cmake argument 2022-11-02 12:29:47 -07:00
Arne Welzel
0bc7d0905e Include in Jan's AF_PACKET plugin as builtin plugin
This has come up a few times and the motivation is mainly better "first timer"
experience with Zeek. Concretely, if one wants to run a Zeek cluster with
multiple workers and reasonable load balancing on Linux, AF_PACKET is a decent
start. Without AF_PACKET support being built into Zeek, however, a new user's
next experience is that of setting up a development environment in order
to compile an external plugin (think compiler, kernel headers, zkg, ...).
Only to get what could be termed basic functionality.

This is using the ZEEK_INCLUDE_PLUGINS infrastructure. I've used the all
upper case spelling of AF_PACKET in the help output because it seems everyone
else references/writes it like that. I think we should also write it
like that in the docs.
2022-10-13 13:29:27 +02:00
Benjamin Bannier
13d011da66 Use correct variable to pass existing Spicy root to spicy-plugin.
spicy-plugin can find Spicy in paths given by `SPICY_ROOT_DIR` while
`./configure` instead set `SPICY_ROOT`. With this patch we now set the
correct variable.

We also adjust variations of the previous variable name with different
capitalization which caused us to not properly configure spicy-plugin
(which triggers finding Spicy in its given prefix).

Closes #2363.
2022-08-23 09:10:57 +02:00
Tim Wojtulewicz
d3169e48c0 Remove deprecated --enable-mobile-ipv6 configure argument 2022-06-30 17:42:18 +00:00
Christian Kreibich
0be74a0aa8 Provide zeek-client by default
The user so far had to configure with --enable-zeek-client to trigger
installation of the client (from auxil/zeek-client). This flips it around to
allow disabling the installation, and removes --enable-zeek-client from the
Docker build in CI, where we've already been using it to allow the cluster
testsuite to run tests with that image.
2022-06-21 18:17:51 -07:00
Christian Kreibich
9860b5686d Ensure presence of Zeek-related directories in toplevel CMakeLists.txt
This establishes several of the Zeek installation's directories in
CMakeLists.txt, and adds a new ZEEK_STATE_DIR (via `configure --state-dir`) for
arbitrary Zeek-related variable state. It defaults to ZEEK_ROOT/var/lib.

This leaves the existing, zeekctl-related ZEEK_LOCAL_STATE_DIR unchanged and
does not use it. We'll likely deprecate it when removal of zeekctl approaches.
2022-05-23 14:16:59 -07:00
Benjamin Bannier
95aff9a1e3 Include spicy in build. 2022-05-16 09:07:11 +02:00
Tim Wojtulewicz
824bc372c5 Update doc gen VM to ubuntu-latest, output cmake version during configure 2022-04-22 13:10:37 -07:00
Christian Kreibich
e403dd5fe1 Build Gen-ZAM from a submodule and support use of pre-existing executable
This separates Gen-ZAM from the main Zeek distribution and places it in a
submodule at auxil/gen-zam, reflecting binpac and bifcl. Configuring with
--with-gen-zam=... allws reuse of an existing executable.
2022-03-21 15:30:07 -07:00
Tim Wojtulewicz
7a6501296b Restore --disable-zeekctl configure argument 2021-12-08 09:18:54 -07:00
Christian Kreibich
5c44dfbb9e Flip unit tests to being enabled by default
This flips --enable-cpp-tests to --disable-cpp-tests, enabling unit testing by
default. The help output has a minor corresponding tweak as well.
2021-12-06 12:17:22 -08:00
Christian Kreibich
f8b8401d84 Alphabetically sort configure's enable/disable/with options 2021-12-06 12:17:20 -08:00
Benjamin Bannier
1f388e3f40 Format shell scripts with shfmt.
All changes in this patch were performed automatically with `shfmt` with
configuration flags specified in `.pre-commit-config.yaml`.

In addition to fixing whitespace the roundtrip through shfmt's AST also
transforms command substitutions

    `cmd`
    # becomes
    $(cmd)

and some redirects

    >&2 echo "msg"
    # becomes
    echo >&2 "msg"
2021-11-24 23:13:02 +01:00
Christian Kreibich
a6b0fde65f Add zeek-client via new submodule
The new module resides in auxil/zeek-client. It does not get installed unless
one configures with --enable-zeek-client.
2021-07-08 13:12:53 -07:00
Tim Wojtulewicz
b14cd1ef16 GH-1216: Enable Mobile IPv6 support by default
This removes the ENABLE_MOBILE_IPV6 #define variable. It also marks the
--enable-mobile-ipv6 configure argument as deprecated.
2021-06-28 11:11:55 -07:00
Seth Hall
e399b537ca Added --include-plugins configure argument 2021-06-10 10:39:13 -07:00
Johanna Amann
f76a95a2c2 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
2021-05-10 10:26:59 +01:00
Vlad Grigorescu
4557b0907c Expose a configure-time option to set the plugin path.
I believe that this is the last option presented during the build summary which wasn't available to be set by the user.
2021-03-12 21:22:01 -06:00
Christian Kreibich
463d159bfc 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.
2021-03-11 13:00:15 -08:00
Jon Siwek
3405b961b9 Remove RocksDB configure script options
Fixes GH-1399
2021-02-11 11:13:17 -08:00
Christian Kreibich
a6e086b662 Install BTest with Zeek
Configuring with --disable-btest skips the installation. The main
reason for doing this is that many Zeek packages come with testsuites
that nearly always require btest, so providing btest out of the box
makes sense. Note that zkg's recent additions to its PATH environment
variable management mean that this btest instance is automatically
found also when the Zeek installation's binary folder isn't in the
path.
2021-01-20 13:52:14 -08:00
Christian Kreibich
d1d218b5cc Install zkg as part of the Zeek distribution.
- Add auxil/package-manager submodule as an optional build
  source. When the submodule is present, zkg gets installed into the
  Zeek installation's bin directory, its config file into etc/zkg, and
  its state into var/lib/zkg. Like zeekctl, zkg finds its own module
  independently of any PYTHONPATH. Installation via pip remains
  supported. You can skip zkg explicitly via --disable-zkg. See the
  NEWS update for details.

- Establish a "zeek/python" subdirectory under libdir as the common place
  for Python modules in the Zeek distribution. This now separates out
  the Broker Python bindings, ZeekControl, and zkg's Python module.

- Add configure flags to allow customizing this Python folder, in
  three ways: --python-dir, --python-prefix, and --python-home. These
  differ in the logic they automatically add to the path, and build on
  the logic already used in Broker.

- Include a (comented-out) @load for zkg's packages folder in
  local.zeek.

- Bump zeekctl to move to this new location.

- Bump doc to include installation instructions

- Update NEWS accordingly.
2020-12-11 18:43:47 -08:00
Dominik Charousset
cf2b5f7e05 Migrate to CAF 0.18 2020-12-07 14:56:19 +01:00
Christian Kreibich
ec76b2510a Improve support for custom libdir locations
- 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).

- Bump submodules for corresponding changes
2020-11-19 23:27:10 -08:00
Jon Siwek
1a4990fc7e Add zeek-archiver tool as submodule
This is added to the default Zeek build as a convenience since it's the
new suggested method for archiving the logs produced by a Supervised
Zeek Cluster.
2020-07-20 16:06:44 -07:00
Jon Siwek
c55bbcfcda Merge remote-tracking branch 'origin/topic/timw/disable-broker-tests'
* origin/topic/timw/disable-broker-tests:
  Disable broker tests from building on the CI
  Disable broker documentation examples if disabling broker tests
2020-05-13 11:16:30 -07:00