Bug 147345 - sysutils/munin-node pulls in all files in config directory
Summary: sysutils/munin-node pulls in all files in config directory
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Florian Smeets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-03 00:10 UTC by rbyrnes
Modified: 2011-02-16 23:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rbyrnes 2010-06-03 00:10:07 UTC
sysutils/munin-node appears to pull in all files in /usr/local/etc/munin/ directory

This causes a problem for some plugins.  In the case of postfix_mailstats (included in the default port), the env.logfile variable ends up as /var/log//var/log/maillog and the plugin no longer functions.

This can be verified by running:

munin-run --debug postfix_mailstats autoconf
# Processing plugin configuration from
/usr/local/etc/munin/plugin-conf.d/plugins.conf
# Processing plugin configuration from
/usr/local/etc/munin/plugin-conf.d/plugins.conf.sample
                              ^^^^^^^^^^^ <-- The cause

# Warning: Root privileges are required to change user/group.  The
plugin may not behave as expected.
# Setting up environment
# Environment logfile = /var/log/maillog
# About to run '/usr/local/etc/munin/plugins/postfix_mailstats autoconf'
no (logfile '/var/log//var/log/maillog' not found)
              ^^^^^^^^^^ <-- The result

Fix: 

Since the port already changes the default munin-node.conf, the line:

ignore_file \.sample$ 

needs to be added to files/patch-munin-node.conf.in
How-To-Repeat: 
*Install munin-node
*Copy /usr/local/etc/munin/plugin-conf.d/plugins.conf.sample to /usr/local/etc/munin/plugin-conf.d/plugins.conf
*Enable the postfix_mailstats plugin and configure thus:

[postfix*]
user root
env.logfile maillog
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-06-03 00:10:16 UTC
Responsible Changed
From-To: freebsd-ports-bugs->des

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Dag-Erling Smørgrav 2010-06-03 12:15:44 UTC
Rob B <rbyrnes@gmail.com> writes:
> Since the port already changes the default munin-node.conf, the line:
>
> ignore_file \.sample$=20
>
> needs to be added to files/patch-munin-node.conf.in=20

I would prefer the reverse - patching Munin to ignore everything
*except* *.conf.  That's probably what most users would expect - it's
what *I* would expect, anyway, and it's what e.g. Apache does, so you
can easily disable a part of your configuration by renaming foo.conf to,
say, foo.conf.disabled.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2011-02-13 19:46:09 UTC
Responsible Changed
From-To: des->flo

Over to new maintainer.
Comment 4 dfilter service freebsd_committer freebsd_triage 2011-02-16 23:47:49 UTC
flo         2011-02-16 23:47:43 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/munin-node/files patch-munin-node.conf.in 
  Log:
  - also ignore .sample files as these can confuse plugins by overwriting values
  defined in the .conf files.
  
  It would be best if munin would only include .conf files, but until that happens
  use this as a workaroud.
  
  PR:             ports/147345
  Submitted by:   Rob B <rbyrnes@gmail.com>
  
  Revision  Changes    Path
  1.4       +10 -2     ports/sysutils/munin-node/files/patch-munin-node.conf.in
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Florian Smeets freebsd_committer freebsd_triage 2011-02-16 23:48:29 UTC
State Changed
From-To: open->closed

Committed. Thanks!