Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Aug 2008 13:19:52 +0400 (MSD)
From:      Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/126710: New-port: net-mgmt/nagios-portaudit
Message-ID:  <20080821091952.B10851AF41C@void.codelabs.ru>
Resent-Message-ID: <200808210920.m7L9K3FH090355@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         126710
>Category:       ports
>Synopsis:       New-port: net-mgmt/nagios-portaudit
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 21 09:20:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Eygene Ryabinkin
>Release:        FreeBSD 7.0-STABLE i386
>Organization:
Code Labs
>Environment:

System: FreeBSD XXX 7.0-STABLE FreeBSD 7.0-STABLE #18: Wed Aug 13 11:50:11 MSD 2008 root@XXX:/usr/obj/usr/src/sys/XXX i386

>Description:

Nagios plugin to monitor status of port vulnerabilities and/or ports
that can be upgraded.  Can be used with NRPE daemon to enable remote
checks.

>How-To-Repeat:

$ cut -f 1 -d '|' /usr/ports/INDEX-7 | grep -E 'port(audit|upgrade)'
portaudit-0.5.11
portaudit-db-0.2.3_1
portupgrade-2.3.1,2
portupgrade-devel-2.3.1

>Fix:

--- nagios-portaudit.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	nagios-portaudit
#	nagios-portaudit/Makefile
#	nagios-portaudit/distinfo
#	nagios-portaudit/pkg-plist
#	nagios-portaudit/pkg-descr
#	nagios-portaudit/files
#	nagios-portaudit/files/patch-check_portaudit-add_perfdata
#
echo c - nagios-portaudit
mkdir -p nagios-portaudit > /dev/null 2>&1
echo x - nagios-portaudit/Makefile
sed 's/^X//' >nagios-portaudit/Makefile << 'c69e439573bea7a9ff02b6fed030491a'
X# New ports collection makefile for:	nagios-portaudit
X# Date created:				19 August 2008
X# Whom:					rea-fbsd@codelabs.ru
X#
X# $FreeBSD$
X#
X
XPORTNAME=	portaudit
XPORTVERSION=	1.0
XCATEGORIES=	net-mgmt
XMASTER_SITES=	http://www.geocities.com/ntb4real/proj/
XPKGNAMEPREFIX=	nagios-
XDISTNAME=	check_portaudit
X
XMAINTAINER=	rea-fbsd@codelabs.ru
XCOMMENT=	Nagios plug-in to get portaudit/portupgrade status
X
XOPTIONS=	PORTAUDIT "Enable portaudit check" ON \
X		PORTUPGRADE "Enable portupgrade check" ON \
X		PORTUPGRADE_DEVEL "Use portupgrade-devel" OFF
X
XUSE_PERL5=	yes
XNO_WRKSUBDIR=	yes
XNO_BUILD=	yes
X
X.include <bsd.port.pre.mk>
X
X.if !defined(WITH_PORTUPGRADE) && !defined(WITH_PORTAUDIT) && !defined(WITH_PORTAUDIT_DEVEL)
XIGNORE=		unusable without portupgrade and portaudit
X.endif
X
X.if defined(WITH_PORTUPGRADE) && defined(WITH_PORTUPGRADE_DEVEL)
XIGNORE=		choose either portupgrade or portupgrade-devel, not both
X.endif
X
X.if defined(WITH_PORTAUDIT)
XRUN_DEPENDS+=	portaudit:${PORTSDIR}/ports-mgmt/portaudit
X.endif
X
X.if defined(WITH_PORTUPGRADE)
XRUN_DEPENDS+=	portupgrade:${PORTSDIR}/ports-mgmt/portupgrade
X.endif
X
X.if defined(WITH_PORTUPGRADE_DEVEL)
XRUN_DEPENDS+=	portupgrade:${PORTSDIR}/ports-mgmt/portupgrade-devel
X.endif
X
Xdo-install:
X	@${TEST} -d ${PREFIX}/libexec/nagios || \
X	    ${INSTALL} -d ${PREFIX}/libexec/nagios
X	${INSTALL_SCRIPT} ${WRKSRC}/check_portaudit ${PREFIX}/libexec/nagios
X
X.include <bsd.port.post.mk>
c69e439573bea7a9ff02b6fed030491a
echo x - nagios-portaudit/distinfo
sed 's/^X//' >nagios-portaudit/distinfo << 'c4a7070e832e2c9a926f250dcd006d4f'
XSIZE (check_portaudit.tar.gz) = 2483
XMD5 (check_portaudit.tar.gz) = 4080abff3089dbce2f1b1080705b8b6f
XSHA256 (check_portaudit.tar.gz) = d23d67f0be5d535cce35e3ff7cd4bb00277ec5821982b6843fbcbc573bcffec7
c4a7070e832e2c9a926f250dcd006d4f
echo x - nagios-portaudit/pkg-plist
sed 's/^X//' >nagios-portaudit/pkg-plist << '812a4debdf92e8692ae73e4409ca31d2'
Xlibexec/nagios/check_portaudit
X@dirrmtry libexec/nagios
812a4debdf92e8692ae73e4409ca31d2
echo x - nagios-portaudit/pkg-descr
sed 's/^X//' >nagios-portaudit/pkg-descr << '14e996d8ae086ed6158cd24bb03427bb'
XThis is a small Nagios plugin. This plugin relies on portaudit
Xand/or portupgrade packages to be installed on your FreeBSD system.
XWith these packages installed, the plugin will scan your system for
Xeither vulnerable packages, or obsolete packages - and display
Xappropriate warnings to Nagios.
X
XPortaudit can also be successfully run remotely from nrpe, and does
Xnot require superuser privileges to operate.
X
XWWW: http://www.geocities.com/ntb4real/proj/portaudit.htm
14e996d8ae086ed6158cd24bb03427bb
echo c - nagios-portaudit/files
mkdir -p nagios-portaudit/files > /dev/null 2>&1
echo x - nagios-portaudit/files/patch-check_portaudit-add_perfdata
sed 's/^X//' >nagios-portaudit/files/patch-check_portaudit-add_perfdata << 'dac58e62b728fd04473b3a7d3f2d0b2b'
X--- check_portaudit.orig	2007-06-07 11:54:21.000000000 +0400
X+++ check_portaudit	2008-08-19 21:23:03.000000000 +0400
X@@ -56,6 +56,7 @@
X my %ERRORS=('DEPENDENT'=>4,'UNKNOWN'=>3,'OK'=>0,'WARNING'=>1,'CRITICAL'=>2);
X my $state="UNKNOWN";
X my $msg="FAILURE";
X+my $perfdata="";
X 
X #################LOCATION OF IMPORTANT FILES#######################
X my $portauditloc="/usr/local/sbin/portaudit";
X@@ -192,6 +193,7 @@
X }
X 
X ### take this message to Nagios
X-$msg = sprintf "%s : %s %s %s\n", $command, $packcount, $pkgtype, $msglist;
X-print $state, " ", $msg;
X+$msg = sprintf "%s : %s %s %s", $command, $packcount, $pkgtype, $msglist;
X+$perfdata = sprintf "%s=%d;1;;0;", $pkgtype, $packcount;
X+print $state, " ", $msg, "|", $perfdata,"\n";
X exit ($ERRORS{$state});
dac58e62b728fd04473b3a7d3f2d0b2b
exit
--- nagios-portaudit.shar begins here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080821091952.B10851AF41C>