Bro Plugin cmake can break plugins in a cluster environment.

Description

cmake/BroPluginDynamic.cmake can cause Bro plugins (via bro-pkg) to create a link of their scripts/ directory that points to the .bro-pkg environment. In a cluster setup, the workers do not have .bro-pkg.

In particular, this causes Seth's sethhall/bro-myricom to fail in a cluster if you don't jump through some additional hoops and it's really hard to debug for anyone that makes that switch. There is potential for this to break other plugins people write as well. See https://github.com/sethhall/bro-myricom/issues/1 for more details.

We believe the fix should be to simply change 'ln -s' to cp -R' as such:
157 #COMMAND test -d ${BRO_PLUGIN_SCRIPTS_SRC} && rm -f ${BRO_PLUGIN_SCRIPTS} && ln -s ${BRO_PLUGIN_SCRIPTS_SRC} ${BRO_PLUGIN_SCRIPTS} || true)
158 COMMAND test -d ${BRO_PLUGIN_SCRIPTS_SRC} && rm -f ${BRO_PLUGIN_SCRIPTS} && cp -R ${BRO_PLUGIN_SCRIPTS_SRC} ${BRO_PLUGIN_SCRIPTS} || true)

I've set this priority to "High" because the current state will break anyone's installation using the plugin when they try to upgrade.

Environment

CentOS 7 cluster.

Assignee

Unassigned

Reporter

MichaelD

Labels

External issue ID

None

Components

Affects versions

Priority

Normal
Configure