From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Aug 21 09:20:03 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE790106566B for ; Thu, 21 Aug 2008 09:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9DD638FC29 for ; Thu, 21 Aug 2008 09:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7L9K3Yh090356 for ; Thu, 21 Aug 2008 09:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7L9K3FH090355; Thu, 21 Aug 2008 09:20:03 GMT (envelope-from gnats) Resent-Date: Thu, 21 Aug 2008 09:20:03 GMT Resent-Message-Id: <200808210920.m7L9K3FH090355@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Eygene Ryabinkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58C7D1065677 for ; 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 ; 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 To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/126710: New-port: net-mgmt/nagios-portaudit X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 09:20:03 -0000 >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 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 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: