Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 582366

Summary: net-analyzer/munin-2.0.19-r1 prefers net-analyzer/netcat6 but needs net-analyzer/netcat
Product: Gentoo Linux Reporter: Mark Wood <mhwood>
Component: Current packagesAssignee: Sysadmin Bugs <sysadmin>
Status: RESOLVED FIXED    
Severity: minor    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/munin-monitoring/munin/commit/3e2d31bdd561cda549084dcf4eaebb1e93bfe6a3
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info output

Description Mark Wood 2016-05-07 19:10:50 UTC
Created attachment 433542 [details]
emerge --info output

The jmx_ plugin to Munin uses 'nc' during "autoconf" to test for an open port, and so Munin has a dependency:

    java? (
           >=virtual/jre-1.5
           || ( net-analyzer/netcat6 net-analyzer/netcat )
          )

But what the plugin does with it is (effectively) "nc -n -z $ip $port >/dev/null 2>&1".  netcat6 does not recognize the -z option, so autoconf always fails, as it did when I recently installed munin and for the first time tried to set up JMX monitoring.  netcat does recognize -z and autoconf succeeded when I installed it (which uninstalled netcat6).  I *think* that autoconf failure is what causes the munin-node-configure script to omit a symlink for a given plugin.

BTW see https://bugs.gentoo.org/show_bug.cgi?id=361553 for more confusion w.r.t. netcat flavors.

I'm going to submit a patch to upstream Munin which replaces this trivial use of netcat with a dab of Perl code (since that is the language of the plugin), but I thought I should report this here as well.

As near as I can tell, the only other use of netcat in the Gentoo Munin package is the squeezebox_ plugin, which uses no options and should like either flavor of netcat.



mwood@boyer ~ $ emerge -pv net-analyzer/munin

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] net-analyzer/munin-2.0.19-r1::gentoo  USE="http ipv6 java minimal ssl -apache -asterisk -cgi -dhcpd -doc -ipmi -irc -memcached -mysql -postgres -syslog {-test}" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Comment 1 Mark Wood 2016-05-07 21:17:31 UTC
*sigh*  Correction:  the plugin is not Perl, but a shell script.  I still intend to send a patch upstream but will have to rethink it a bit.
Comment 2 Hans de Graaff gentoo-dev Security 2017-07-22 07:07:39 UTC
I see that you did create that patch and that it got included in munin 2.0.28. Thanks!

Closing this as fixed since we now have munin 2.0.33 in the tree and this will be marked stable shortly.