mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00

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.
30 lines
1.1 KiB
Text
30 lines
1.1 KiB
Text
# Load these frameworks here because they use fairly deep integration with
|
|
# BiFs and script-land defined types. They are also more likely to
|
|
# make use of calling BIFs for variable initializations, and that
|
|
# can't be done until init-bare.zeek has been loaded completely (hence
|
|
# the separate file).
|
|
@load base/frameworks/logging
|
|
@load base/frameworks/broker
|
|
@load base/frameworks/supervisor
|
|
@load base/frameworks/input
|
|
@load base/frameworks/cluster
|
|
@load base/frameworks/config
|
|
@load base/frameworks/analyzer
|
|
@load base/frameworks/files
|
|
|
|
@load base/bif
|
|
|
|
# Load BiFs defined by plugins.
|
|
@load base/bif/plugins
|
|
|
|
@load base/frameworks/spicy/init-framework
|
|
|
|
# This sets up secondary/subdir BIFs such that they can be used by any
|
|
# further scripts within their global initializations and is intended to be
|
|
# the last thing done within this script. It's called within @if simply so
|
|
# that it executes at parse-time. An alternative way to do that is to call
|
|
# it during a global variable assignment/initialization. Formally adding a
|
|
# @run directive to the language whose sole purpose is parse-time code
|
|
# execution would be another idea.
|
|
@if ( __init_secondary_bifs() )
|
|
@endif
|