Skip to content
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

Builtin plugins do not play nicely with zkg.meta's depends field #2243

Open
bbannier opened this issue Jul 7, 2022 · 5 comments
Open

Builtin plugins do not play nicely with zkg.meta's depends field #2243

bbannier opened this issue Jul 7, 2022 · 5 comments

Comments

@bbannier
Copy link
Contributor

bbannier commented Jul 7, 2022

Since some time Zeek supports adding external plugins as builtin plugins so they will be handled like any other builtin plugin. This doesn't play nicely with the Zeek package manager's depends field; while a package might be available as a builtin plugin, zkg will not see this and instead try to install it as not builtin as well which is wrong.

It would be nice if zkg was able to detect which packages are available as builtin plugins. I could image that this would not only require work in the package manager, but also in Zeek proper to expose that information in a way the package manager can consume.

@ckreibich
Copy link
Member

ckreibich commented Jul 7, 2022

This is tricky stuff. Zeek knows nothing about packages, only plugins. I agree with the idea of having Zeek expose plugin detail. With that, a Zeek package's build setup could use this output to adjust its build. There are details there that would need care (version compatibility, for example), but I think it would work, potentially even in a future where Zeek packages include built stuff.

@ckreibich
Copy link
Member

A workaround for this right now would be to provide multiple versions in a package, aware of the fact that a dependency might be resolved via a built-in plugin. So, a Spicy-enabled Zeek package requiring Zeek < 5 would have the spicy-plugin dependency, while one requiring Zeek 5+ would not. This is imperfect since it wouldn't accommodate e.g. a Zeek 5 build without Spicy.

@bbannier
Copy link
Contributor Author

bbannier commented Feb 1, 2023

Tagging this as a bug since it actually can create incorrect runtime behavior. The same plugin might be installed multiple times in different versions; this could either produce "weird" behavior or even lead to a Zeek installation which cannot be started anymore (e.g., for binary plugins loading incompatible symbols).

@awelzel
Copy link
Contributor

awelzel commented Feb 2, 2023

The same plugin might be installed multiple times in different versions; this could either produce "weird" behavior or even lead to a Zeek installation which cannot be started anymore (e.g., for binary plugins loading incompatible symbols).

This should be covered through #2416. A builtin plugin and dynamically loaded plugin with the same name can not co-exist and Zeek will hard exit.

@awelzel awelzel self-assigned this Feb 9, 2023
@awelzel
Copy link
Contributor

awelzel commented Mar 16, 2023

With #2767 added, the current zkg change/proposal is at zeek/package-manager#157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants