Skip to content

Commit

Permalink
Merge pull request #1 from philrz/plugins
Browse files Browse the repository at this point in the history
Remove plugin references
  • Loading branch information
philrz authored Jan 3, 2024
2 parents 30c178a + 92efab3 commit 9320e5a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- master
- main
tags:
- v*brim*
workflow_dispatch:
Expand Down
8 changes: 2 additions & 6 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ install_zeek_package() {

build_command=$(zkg_meta package build_command)
if [ "$build_command" ]; then
if [ "$OS" = Windows_NT ]; then
export LDFLAGS='-static -Wl,--allow-multiple-definition'
fi
sh -c "$build_command"
$sudo tar -xf build/*.tgz -C /usr/local/zeek/lib/zeek/plugins
echo "building plugins not currently supported"
exit 1
fi

test_command=$(zkg_meta package test_command)
Expand Down Expand Up @@ -85,7 +82,6 @@ echo "@load policy/protocols/conn/community-id-logging" | $sudo tee -a /usr/loca
mkdir -p zeek/bin zeek/lib/zeek zeek/share/zeek
cp zeekrunner$exe zeek/
cp /usr/local/zeek/bin/zeek$exe zeek/bin/
cp -R /usr/local/zeek/lib/zeek/plugins zeek/lib/zeek/
for d in base policy site builtin-plugins; do
cp -R /usr/local/zeek/share/zeek/$d zeek/share/zeek/
done
Expand Down
1 change: 0 additions & 1 deletion zeekrunner
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

export ZEEKPATH=$dir/share/zeek:$dir/share/zeek/policy:$dir/share/zeek/site
export ZEEK_PLUGIN_PATH=$dir/lib/zeek/plugins

# The packet filter and loaded scripts are disabled because they emit either
# timeless logs or logs with timestamp set to execution time rather than time
Expand Down
6 changes: 1 addition & 5 deletions zeekrunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ var (
"share/zeek/policy",
"share/zeek/site",
}
zeekPluginRelPaths = []string{
"lib/zeek/plugins",
}
)

func pathEnvVar(name, topDir string, subdirs []string) string {
Expand All @@ -46,13 +43,12 @@ event zeek_init() {

func launchZeek(zdepsZeekDir, zeekExecPath string) error {
zeekPath := pathEnvVar("ZEEKPATH", zdepsZeekDir, zeekPathRelPaths)
zeekPlugin := pathEnvVar("ZEEK_PLUGIN_PATH", zdepsZeekDir, zeekPluginRelPaths)

cmd := exec.Command(zeekExecPath, "-C", "-r", "-", "--exec", ExecScript, "local")
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Env = append(os.Environ(), zeekPath, zeekPlugin)
cmd.Env = append(os.Environ(), zeekPath)

return cmd.Run()
}
Expand Down

0 comments on commit 9320e5a

Please sign in to comment.