[Nagiosplug-devel] Integrating Nagios::Plugin into thedistribution

Patrick Proy nagios at proy.org
Tue Apr 24 00:00:29 CEST 2007


Hi,

As a plugin dev I think using a specific directory for Perl module will
create the same problem that I had with the config.pm file : the plugin
won't run on all systems without changing the include path in the plugin.

The easy thing about perl standard lib directory is that the plugin doesn't
have to know the system specific directory of the perl modules.
I don't know about possible breakages on distro upgrades, but I think Perl
should be able handle this.

I had quite the same problem with the Net::SNMP library, but setting my own
copy in a specific directory ended up with big problems (especially for
dependancies).

Patrick 
http://nagios.manubulon.com

-----Message d'origine-----
De : nagiosplug-devel-bounces at lists.sourceforge.net
[mailto:nagiosplug-devel-bounces at lists.sourceforge.net] De la part de Thomas
Guyot-Sionnest
Envoyé : lundi 23 avril 2007 22:41
À : Nagios Plugin Development Mailing List
Objet : Re: [Nagiosplug-devel] Integrating Nagios::Plugin into
thedistribution

> -----Original Message-----
> From: nagiosplug-devel-bounces at lists.sourceforge.net
> [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On Behalf Of 
> Ton Voon
> Sent: April 23, 2007 12:25
> To: Nagios Plugin Development Mailing List
> Subject: [Nagiosplug-devel] Integrating Nagios::Plugin into the 
> distribution
> 
> Hi!
> 
> I promised to start this discussion, so apologies for not doing it 
> earlier.
> 
> I think Nagios::Plugin is at a state where it is good enough to start 
> using for the plugins in distribution. The main question is: how?
> 
> The current utils.pm has problems because of the parsing of the 
> location of this module. We want to fix this so it is not an issue 
> with N::P.
> 
> If N::P is installed in the perl system libraries, no paths need 
> changing. If N::P is installed elsewhere, the perl plugins need to 
> know where to find N::P.
> 
> I think it comes down to two choices:
> 
> 1. Expect N::P to be installed from an external mechanism, either 
> manually installed via CPAN, or using a OS specific package. We'd have 
> to make sure the Nagios Plugins requires these packages (amend various 
> spec files, update REQUIREMENTS file, etc)
> 
> 2. Install N::P (and other dependent perl modules) in a (./configure 
> chosen) location.

My personal preference is #2, though we may need to rename it slightly to
avoid Perl complaining (AFAIK Perl complains when you have a lib with the
same name in more than one INC path).

The reason of this preference is that we can properly test all Perl plugins
with the released version so that we'll avoid bug reports due to newer/older
N::P libs and also avoid having to ask which version of N::P users have when
they report bugs. IMO this will save us a lot of time in the long run. It is
also simpler for the user to just "make install" (which should install the
lib locally) and get everything in place and will avoid possible breakages
on distro upgrades (i.e. if Perl libdir change).

Thomas





More information about the Devel mailing list