Provide infrastructure to migrate legacy analyzers to Spicy.

As initial examples, this branch ports the Syslog and Finger analyzers
over. We leave the old analyzers in place for now and activate them
iff we compile without any Spicy.

Needs `zeek-spicy-infra` branches in `spicy/`, `spicy-plugin/`,
`CMake/`, and `zeek/zeek-testing-private`.

Note that the analyzer events remain associated with the Spicy plugin
for now: that's where they will show up with `-NN`, and also inside
the Zeekygen documentation.

We switch CMake over to linking the runtime library into the plugin,
vs. at the top-level through object libraries.
This commit is contained in:
Robin Sommer 2022-11-08 09:54:08 +01:00
parent 283bea346b
commit 04a1ead978
No known key found for this signature in database
GPG key ID: 6BEDA4DA6B8B23E3
48 changed files with 359 additions and 124 deletions

View file

@ -25,5 +25,6 @@ $(dirname $0)/diff-remove-timestamps |
$(dirname $0)/diff-remove-x509-names |
$(dirname $0)/diff-sort-conn-service |
$(dirname $0)/diff-sort-set-elements |
$(dirname $0)/diff-remove-spicy-abspath |
$(dirname $0)/diff-sort |
eval $addl

View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
#
# Replace absolute paths in Spicy error message with the basename. This is more
# restrictive than diff-remove-abspath to avoid catching other stuff.
if [ $(uname) == "Linux" ]; then
sed="sed -r"
else
sed="sed -E"
fi
$sed 's#/([^:/]{1,}/){1,}([^:/]{1,}\.spicy[:,])#<...>/\2#g'

View file

@ -1,6 +1,2 @@
#!/bin/sh
if grep -q "DISABLE_SPICY:BOOL=true" "${BUILD}"/CMakeCache.txt; then
return 1
else
true
fi
"${BUILD}/zeek-config" --have-spicy-analyzers >/dev/null