-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing scripts is broken for Spicy analyzers. #97
Comments
This reproduces with the default template. To expand on this, we install cmake/ZeekSpicyAnalyzerSupport.cmake Lines 75 to 84 in cc92336
The original code in zeek/spicy-plugin populated this from That flag now returns nothing for the version on the Zeek master branch, https://github.com/zeek/spicy-plugin/blob/a3e38215e7eb3ee733132c43cc3942379b038fc4/cmake/ZeekSpicyAnalyzerSupport.cmake#L161-L163 I am not really sure where the right location would be. Any ideas @rsmmr? |
The default package template for Spicy analyzers should set a I looked and the Spicy analyzers have behaved this way since the 5.x timeframe so the CMake code under that conditional has been dead code for some time. |
I'm not following here. Doing a Long story short: |
Sorry, that was me adding to the confusion because I thought that didn't quite work with normal plugins either. But that was about a non-default scripts_dir in zkg.meta. The https://zeekorg.slack.com/archives/CSZBXF6TH/p1687910485598759?thread_ts=1687887010.223089&cid=CSZBXF6TH
Re-opening is the right call. Pinging @rsmmr again, if he had a preferred solution. |
Iirc these used to go into a scripts directory associated with the plugin, which the plugin would automatically add to ZEEK_PATH so that they would be found. With the the plugin now part of Zeek, I''m thinking these should probably now just install into Zeek's |
I'm circling back here since I just ended up in a support thread where this issue came up again and it still makes my head spin, plus I labeled this Zeek 7 above. :-) I'm not sure I understand the use-case for the files specified in So I'm wondering — is there really a need for these scripts, or does the usual Fwiw, there are packages in the standard source (like |
The SCRIPTS parameter for spicy_add_analyzer() is not functional, so rendering it into CMakeLists.txt is confusing [1]. Remove it. These scripts are installed via zkg.meta's script_dir here in the template. [1] zeek/cmake#97
As discussed yesterday, to me this actually seems a valid approach, too. I've opened a PR to remove the rendering from the package-template as that seems confusing/misleading today given it's not working anyhow. Emitting a deprecation warning if SCRIPTS are used (as it hasn't been functional) and advise users to leverage For the latter, maybe a separate cmake function to install scripts into |
Makes sense.
Likewise agree.
Yeah, in principle people could just use normal CMake installation tools, but the trick is finding the destination path. Providing help with that would be good. Though the next question then is if the template should include such installation logic as well ... |
Yep, |
I'm still confused about how scripts are supposed to be loaded in a spicy plugin, a la zeek/cmake#97 It's just weird and unintuitive.
Looks like
SPICY_SCRIPTS_OUTPUT_DIR_INSTALL
is never set.The text was updated successfully, but these errors were encountered: