From rea-fbsd@codelabs.ru  Thu Aug 21 09:19:55 2008
Return-Path: <rea-fbsd@codelabs.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 58C7D1065677
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 21 Aug 2008 09:19:55 +0000 (UTC)
	(envelope-from rea-fbsd@codelabs.ru)
Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45])
	by mx1.freebsd.org (Postfix) with ESMTP id A4FDF8FC21
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 21 Aug 2008 09:19:54 +0000 (UTC)
	(envelope-from rea-fbsd@codelabs.ru)
Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25])
	by 0.mx.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256)
	id 1KW6Ke-000O6p-Ry for FreeBSD-gnats-submit@freebsd.org; Thu, 21 Aug 2008 13:19:52 +0400
Message-Id: <20080821091952.B10851AF41C@void.codelabs.ru>
Date: Thu, 21 Aug 2008 13:19:52 +0400 (MSD)
From: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Reply-To: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: New-port: net-mgmt/nagios-portaudit
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         126710
>Category:       ports
>Synopsis:       New port: net-mgmt/nagios-portaudit
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pgollucci
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 21 09:20:02 UTC 2008
>Closed-Date:    Fri Aug 22 16:45:19 UTC 2008
>Last-Modified:  Sun Mar 17 04:34:33 UTC 2013
>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 ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->pgollucci 
Responsible-Changed-By: pgollucci 
Responsible-Changed-When: Thu Aug 21 21:36:34 UTC 2008 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126710 
State-Changed-From-To: open->closed 
State-Changed-By: pgollucci 
State-Changed-When: Fri Aug 22 16:45:19 UTC 2008 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126710 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/126710: commit references a PR
Date: Fri, 22 Aug 2008 16:44:27 +0000 (UTC)

 pgollucci    2008-08-22 16:44:18 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net-mgmt             Makefile 
   Added files:
     net-mgmt/nagios-portaudit Makefile distinfo pkg-descr 
                               pkg-plist 
     net-mgmt/nagios-portaudit/files 
                                     patch-check_portaudit-add_perfdata 
   Log:
   This is a small Nagios plugin. This plugin relies on portaudit
   and/or portupgrade packages to be installed on your FreeBSD system.
   With these packages installed, the plugin will scan your system for
   either vulnerable packages, or obsolete packages - and display
   appropriate warnings to Nagios.
   
   Portaudit can also be successfully run remotely from nrpe, and does
   not require superuser privileges to operate.
   
   WWW: http://www.geocities.com/ntb4real/proj/portaudit.htm
   
   PR:             ports/126710
   Submitted by:   Eygene Ryabinkin <rea-fbsd@codelabs.ru>
   Approved by:    gabor (mentor)
   
   Revision  Changes    Path
   1.168     +1 -0      ports/net-mgmt/Makefile
   1.1       +52 -0     ports/net-mgmt/nagios-portaudit/Makefile (new)
   1.1       +3 -0      ports/net-mgmt/nagios-portaudit/distinfo (new)
   1.1       +20 -0     ports/net-mgmt/nagios-portaudit/files/patch-check_portaudit-add_perfdata (new)
   1.1       +10 -0     ports/net-mgmt/nagios-portaudit/pkg-descr (new)
   1.1       +2 -0      ports/net-mgmt/nagios-portaudit/pkg-plist (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"
 
>Unformatted:
