package-manager icon indicating copy to clipboard operation
package-manager copied to clipboard

Allow zkg's config knowledge to be available in plugin configure scripts

Open philrz opened this issue 3 years ago • 10 comments

I discussed this one on Slack with @ckreibich.

In my case, I'd already successfully/previously completed zkg autoconfig at a time when zeek-config was in my path. Now I was circling back on another day when I didn't happen to have zeek-config in my path, and I was and using zkg install to try to install the zeek-community-id package, but it failed with the error Either 'zeek-config' must be in PATH or '--zeek-dist=<path>' used. While I was able to force it to work by once again adding zeek-config to my path, the reference to --zeek-dist made me pause because the value that I'd have sent via that flag if I was calling the configure script directly is already present in zkg config (see the last line):

# zkg config
[sources]
zeek = https://github.com/zeek/packages
[paths]
state_dir = /root/.zkg
script_dir = /usr/local/zeek-3.1.4/share/zeek/site
plugin_dir = /usr/local/zeek-3.1.4/lib/zeek/plugins
zeek_dist = /root/zeek-3.1.4

As @ckreibich noted in the Slack thread:

So, it's not a bug, but I think a very reasonable feature request: allow zkg's config knowledge to be available in the plugin's configure script. We can look into that.

philrz avatar Jul 27 '20 17:07 philrz