installing the net-mgmt/nagios-plugins results in all the perl based plugins to be broken in the same way: # /usr/local/libexec/nagios/check_mailq -h Can't locate utils.pm in @INC (@INC contains: nagios /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 .) at /usr/local/libexec/nagios/check_mailq line 36. BEGIN failed--compilation aborted at /usr/local/libexec/nagios/check_mailq line 36. Fix: the problem is caused by incorrect/missing substitution of the path to the perl module utils.pm at build time. simply changing: use lib "nagios"; to use lib "/usr/local/libexec/nagios"; in each of the affected plugins solves the problem. How-To-Repeat: simply install the net-mgmt/nagios-plugins and try to use one of the perl (not C) based plugins
State Changed From-To: open->closed I'm sorry, but I've had to axe the net-mgmt/netsaint and net-mgmt/netsaint-plugins ports. Please migrate to net-mgmt/nagios since that one is still being developed.
edwin@FreeBSD.org wrote: > Synopsis: net-mgmt/netsaint-plugins - incorrect library path in perl based nagios-plugins > > State-Changed-From-To: open->closed > State-Changed-By: edwin > State-Changed-When: Sat Sep 8 12:48:59 UTC 2007 > State-Changed-Why: > I'm sorry, but I've had to axe the net-mgmt/netsaint and > net-mgmt/netsaint-plugins ports. > > Please migrate to net-mgmt/nagios since that one is still being > developed. I'm actually using net-mgmt/nagios-plugins here - my usage of "netsaint-plugins" was incorrect. the current version of net-mgmt/nagios-plugins still has the same problem: nagios-plugins-1.4.9_1,1 Plugins for Nagios # /usr/local/libexec/nagios/check_mailq --help Can't locate utils.pm in @INC (@INC contains: nagios /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 .) at /usr/local/libexec/nagios/check_mailq line 36. BEGIN failed--compilation aborted at /usr/local/libexec/nagios/check_mailq line 36. Stefan
State Changed From-To: closed->open Reopen after submitter made it clear it was nagios-plugins he mentioed.
State Changed From-To: open->feedback Dear submitter, With fresh installation of nagios-plugins-1.4.9_1,1, the library path in perl based scripts is correct. If this still does not work for you, please provide me and maintainer in more details. Thanks.
Responsible Changed From-To: freebsd-ports-bugs->rafan I'll take it.
Propose this patch. Index: Makefile =================================================================== RCS file: /home/pcvs/ports/net-mgmt/nagios-plugins/Makefile,v retrieving revision 1.63 diff -u -r1.63 Makefile --- Makefile 30 Sep 2007 04:47:19 -0000 1.63 +++ Makefile 30 Sep 2007 06:29:05 -0000 @@ -7,7 +7,7 @@ PORTNAME= nagios-plugins PORTVERSION= 1.4.9 -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 1 CATEGORIES= net-mgmt MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED} Index: files/patch-plugins-scripts__subst.in =================================================================== RCS file: files/patch-plugins-scripts__subst.in diff -N files/patch-plugins-scripts__subst.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-plugins-scripts__subst.in 30 Sep 2007 06:29:05 -0000 @@ -0,0 +1,13 @@ +--- plugins-scripts/subst.in.orig Sun Sep 30 14:23:17 2007 ++++ plugins-scripts/subst.in Sun Sep 30 14:26:28 2007 +@@ -62,8 +62,8 @@ + # subst will replace the fully qualified command with whatever is + # returned from the which subroutine + # +-/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// { +- match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/); ++/^[^#]/ && /(\/.*)?\/(bin|sbin)\// { ++ match($0,/(\/.*)?\/(bin|sbin)\/[-_a-zA-Z0-9]+/); + c=substr($0,RSTART,RLENGTH); + sub(c,which(c,path)); + }
rafan 2007-10-08 04:14:54 UTC FreeBSD ports repository Modified files: net-mgmt/nagios-plugins Makefile Added files: net-mgmt/nagios-plugins/files patch-plugins-scripts__subst.in Log: - When libexecdir does not exist, the installed perl based plugins gets wrong use lib directive. This is due to the installation procedure assumes the existence of libexecdir. Fix this problem and bump PORTREVISION. PR: ports/115443 Reported by: Stefan Kaltenbrunner <stefan at kaltenbrunner.cc> Patched by: Jarrod Sayers <jarrod at netleader.com.au> (maintainer) Revision Changes Path 1.64 +1 -1 ports/net-mgmt/nagios-plugins/Makefile 1.1 +11 -0 ports/net-mgmt/nagios-plugins/files/patch-plugins-scripts__subst.in (new) _______________________________________________ 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"
State Changed From-To: feedback->closed Fixed by maintainer's patch via private mail. Thanks.
State Changed From-To: closed->feedback Changed to feedback again to trick gnats.
State Changed From-To: feedback->closed Close this again.