diff options
author | matthew <matthew@FreeBSD.org> | 2014-03-18 15:31:13 +0800 |
---|---|---|
committer | matthew <matthew@FreeBSD.org> | 2014-03-18 15:31:13 +0800 |
commit | bdea57fb60e1e2a903a5d33d2247a36274d252de (patch) | |
tree | ff8ac63afc79c83bfc3798d4bbd3efbfe1883921 /net-mgmt | |
parent | a87dac0d06eedd2e6b35ef9e74949cb84d216686 (diff) | |
download | freebsd-ports-gnome-bdea57fb60e1e2a903a5d33d2247a36274d252de.tar.gz freebsd-ports-gnome-bdea57fb60e1e2a903a5d33d2247a36274d252de.tar.zst freebsd-ports-gnome-bdea57fb60e1e2a903a5d33d2247a36274d252de.zip |
Update to 0.7
* maintainer has forked the upstream onto github
* consequently patches have been applied upstream
* add pkg(8) for FreeBSD 10.0 and above
PR: ports/184011
Submitted by: maintainer
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/nagios-check_ports/Makefile | 20 | ||||
-rw-r--r-- | net-mgmt/nagios-check_ports/distinfo | 4 | ||||
-rw-r--r-- | net-mgmt/nagios-check_ports/files/patch-check_ports | 108 | ||||
-rw-r--r-- | net-mgmt/nagios-check_ports/pkg-descr | 4 |
4 files changed, 16 insertions, 120 deletions
diff --git a/net-mgmt/nagios-check_ports/Makefile b/net-mgmt/nagios-check_ports/Makefile index 6d223e2cc1a3..1c38607bb94b 100644 --- a/net-mgmt/nagios-check_ports/Makefile +++ b/net-mgmt/nagios-check_ports/Makefile @@ -2,24 +2,28 @@ # $FreeBSD$ PORTNAME= check_ports -PORTVERSION= 0.6.1 -PORTREVISION= 1 +PORTVERSION= 0.7 CATEGORIES= net-mgmt -MASTER_SITES= http://code.adminlife.net/check_ports/files/ PKGNAMEPREFIX= nagios- MAINTAINER= ryanrfrederick@gmail.com -COMMENT= Nagios Plugin to monitor your FreeBSD Ports +COMMENT= monitor FreeBSD ports for updates or vulnerabilities -RUN_DEPENDS= portaudit:${PORTSDIR}/ports-mgmt/portaudit +USE_GITHUB= yes +GH_ACCOUNT= rfrederick +GH_TAGNAME= v${PORTVERSION} +GH_COMMIT= 7cee15a NO_BUILD= yes -NO_STAGE= yes .include <bsd.port.pre.mk> +.if ${OSVERSION} < 1000000 +RUN_DEPENDS= portaudit:${PORTSDIR}/ports-mgmt/portaudit +.endif + do-install: - @${MKDIR} ${PREFIX}/libexec/nagios - ${INSTALL_SCRIPT} ${WRKSRC}/check_ports ${PREFIX}/libexec/nagios/ + @${MKDIR} ${STAGEDIR}${PREFIX}/libexec/nagios + ${INSTALL_SCRIPT} ${WRKSRC}/check_ports ${STAGEDIR}${PREFIX}/libexec/nagios/ .include <bsd.port.post.mk> diff --git a/net-mgmt/nagios-check_ports/distinfo b/net-mgmt/nagios-check_ports/distinfo index 079a3f46efdd..8d3f95247ecc 100644 --- a/net-mgmt/nagios-check_ports/distinfo +++ b/net-mgmt/nagios-check_ports/distinfo @@ -1,2 +1,2 @@ -SHA256 (check_ports-0.6.1.tar.gz) = c519e5168810909c0a64fe1628edba7d2ea919aa14390a2c07c28f404f6f3006 -SIZE (check_ports-0.6.1.tar.gz) = 3731 +SHA256 (check_ports-0.7.tar.gz) = 9c16c50ceb78315b41a2f82af5799f0bfaaa6780aeefe3eaacf503bb4fb62cf9 +SIZE (check_ports-0.7.tar.gz) = 4710 diff --git a/net-mgmt/nagios-check_ports/files/patch-check_ports b/net-mgmt/nagios-check_ports/files/patch-check_ports deleted file mode 100644 index 5574d07ff03c..000000000000 --- a/net-mgmt/nagios-check_ports/files/patch-check_ports +++ /dev/null @@ -1,108 +0,0 @@ ---- check_ports 2011-08-23 07:01:14.000000000 +0000 -+++ check_ports 2011-08-24 02:32:14.000000000 +0000 -@@ -30,20 +30,15 @@ - # - - # please change locations appropriate --PORTAUDIT=/usr/local/sbin/portaudit - PKG_VERSION=/usr/sbin/pkg_version - JEXEC=/usr/sbin/jexec - JLS=/usr/sbin/jls --PORTDIR=/usr/ports - # TMP_PATH will be created by check_ports, needs to be writable - TMP_PATH=/tmp/jailaudit - - ###### global vars - don't touch ###### - --RELEASE=$(uname -r | awk -F. '{ print $1 }') --PORTINDEX=${PORTDIR}/INDEX-${RELEASE} -- --PROGNAME=$(basename $0) -+PROGNAME="${0##*/}" - VERSION=0.6.1 - DATE="10 Mar 2009" - PROJECTURL=http://code.adminlife.net/check_ports -@@ -68,7 +63,7 @@ - - # print help msg and exit - print_help() { -- printf "usage: ${PROGNAME} [options] [-j jailname ]\n\n" -+ printf "usage: ${PROGNAME} [options] [-j jailname] [-I <path>] [-P <path>]\n\n" - printf "options:\n" - printf " -h\t\tshow this help message and exit.\n\n" - printf " -a\t\tshows if any updates are available.\n" -@@ -82,7 +77,9 @@ - printf " \t\tHighly recommended before first run.\n\n" - printf " -u \t\trun check_ports in unprivileged mode.\n" - printf " \t\tMuch slower but more secure.\n\n" -- printf " -v\t\tshow version number.\n" -+ printf " -v\t\tshow version number.\n\n" -+ printf " -I <path>\tPath to INDEX file.\n\n" -+ printf " -P <path>\tPath to portaudit.\n" - exit 0 - } - -@@ -254,13 +251,13 @@ - # count lines from portversion if asked - if [ ${ANY_UPDATE} -eq 1 -o ${WARN_ON_ANY_UPDATE} -eq 1 ] - then -- UPDATES=$(${PKG_VERSION} ${PKGVERSION_OPTS} | grep -c "needs updating" -) -+ UPDATES=$(${PKG_VERSION} ${PKGVERSION_OPTS} ${PORTINDEX} | grep -c "needs updating") - fi - - # count lines from find - if [ ${CHECK_PORTS_AGE} -eq 1 ] - then -- PORTSAGE=$(find ${PORTINDEX} -name INDEX-${RELEASE} -mtime +1 | grep -c INDEX-${RELEASE} -) -+ PORTSAGE=$(find ${PORTINDEX} -name ${PORTINDEX##*/} -mtime +1 | grep -c ${PORTINDEX##*/}) - fi - - # count lines from portaudit -@@ -291,13 +288,13 @@ - # count lines from pkg_version if asked and set PKG_DBDIR - if [ ${ANY_UPDATE} -eq 1 -o ${WARN_ON_ANY_UPDATE} -eq 1 ] - then -- UPDATES=$(PKG_DBDIR=${JAIL_PATH}/var/db/pkg ${PKG_VERSION} ${PKGVERSION_OPTS} | grep -c "needs updating" -) -+ UPDATES=$(PKG_DBDIR=${JAIL_PATH}/var/db/pkg ${PKG_VERSION} ${PKGVERSION_OPTS} ${JAIL_PATH}${PORTINDEX} | grep -c "needs updating") - fi - - # count lines from find - if [ ${CHECK_PORTS_AGE} -eq 1 ] - then -- PORTSAGE=$(find ${JAIL_PATH}${PORTINDEX} -name INDEX-${RELEASE} -mtime +1 | grep -c INDEX-${RELEASE} -) -+ PORTSAGE=$(find ${JAIL_PATH}${PORTINDEX} -name ${PORTINDEX##*/} -mtime +1 | grep -c ${PORTINDEX##*/}) - fi - - run_gen_state -@@ -305,12 +302,14 @@ - - ###### main ###### - --while getopts hvcrawpuj: opt 2>/dev/null -+while getopts I:P:hvcrawpuj: opt 2>/dev/null - do - case $opt in -+ I) PORTINDEX="$OPTARG" ;; -+ P) PORTAUDIT="$OPTARG" ;; - h) print_help;; - v) print_version;; -- c) check_env;; -+ c) run_check_env=run_check_env;; - r) ;; # parameter -r is now obsolete, we don't use portversion anymore - a) ANY_UPDATE=1;; - w) WARN_ON_ANY_UPDATE=1;; -@@ -321,6 +320,14 @@ - esac - done - -+PORTDIR=/usr/ports -+RELEASE=$(uname -r) -+RELEASE="${RELEASE%%.*}" -+: ${PORTINDEX:="${PORTDIR}/INDEX-${RELEASE}"} -+: ${PORTAUDIT:=/usr/local/sbin/portaudit} -+ -+[ -n "$run_check_env" ] && check_env -+ - # check for improper usage - if [ ${WARN_ON_ANY_UPDATE} -eq 1 -a ${ANY_UPDATE} -eq 1 ] - then diff --git a/net-mgmt/nagios-check_ports/pkg-descr b/net-mgmt/nagios-check_ports/pkg-descr index 030d9486a684..0aef7721f140 100644 --- a/net-mgmt/nagios-check_ports/pkg-descr +++ b/net-mgmt/nagios-check_ports/pkg-descr @@ -1,2 +1,2 @@ -Nagios Plugin to monitor your FreeBSD Ports Tree for updates or -installed packages with known security vulnerabilities. +Nagios plugin to monitor the local FreeBSD ports tree for updates or +known security vulnerabilities in installed packages. |