svn commit: r411472 - in branches/2016Q1/net-mgmt/victorops-nagios: . files

Mark Felder feld at FreeBSD.org
Sun Mar 20 18:18:22 UTC 2016


Author: feld
Date: Sun Mar 20 18:18:20 2016
New Revision: 411472
URL: https://svnweb.freebsd.org/changeset/ports/411472

Log:
  MFH: r411471
  
  net-mgmt/victorops-nagios: Unbreak port
  
  - Update to 1.4.20
  - Port modernization
  
  PR:		206350
  Approved by:	ports-secteam (with hat)

Deleted:
  branches/2016Q1/net-mgmt/victorops-nagios/files/patch-check_victorops_cmds
  branches/2016Q1/net-mgmt/victorops-nagios/files/patch-check_victorops_forwarder
  branches/2016Q1/net-mgmt/victorops-nagios/files/patch-do_victorops_heartbeat
  branches/2016Q1/net-mgmt/victorops-nagios/files/patch-enqueue_alert
  branches/2016Q1/net-mgmt/victorops-nagios/files/patch-forward_alerts
  branches/2016Q1/net-mgmt/victorops-nagios/files/patch-support_collect.sh
  branches/2016Q1/net-mgmt/victorops-nagios/files/patch-utils
  branches/2016Q1/net-mgmt/victorops-nagios/files/patch-victorops.cron
Modified:
  branches/2016Q1/net-mgmt/victorops-nagios/Makefile
  branches/2016Q1/net-mgmt/victorops-nagios/distinfo
  branches/2016Q1/net-mgmt/victorops-nagios/files/qpage-patch
  branches/2016Q1/net-mgmt/victorops-nagios/pkg-plist
Directory Properties:
  branches/2016Q1/   (props changed)

Modified: branches/2016Q1/net-mgmt/victorops-nagios/Makefile
==============================================================================
--- branches/2016Q1/net-mgmt/victorops-nagios/Makefile	Sun Mar 20 18:16:58 2016	(r411471)
+++ branches/2016Q1/net-mgmt/victorops-nagios/Makefile	Sun Mar 20 18:18:20 2016	(r411472)
@@ -2,18 +2,19 @@
 # $FreeBSD$
 
 PORTNAME=	victorops-nagios
-PORTVERSION=	1.1.8
+PORTVERSION=	1.4.20
 CATEGORIES=	net-mgmt
 MASTER_SITES=	http://software.victorops.com/
-DISTNAME=	${PORTNAME}_${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}
 
 MAINTAINER=	rand at iteris.com
 COMMENT=	Nagios integration for VictorOps incident notification service
 
-BROKEN=		Unfetchable
+USES=		shebangfix
+SHEBANG_FILES=	${WRKSRC}/opt/victorops/nagios_plugin/bin/*
 
 NO_WRKSUBDIR=	YES
 NO_BUILD=	YES
+NO_ARCH=	YES
 
 RESTRICTED=	Redistribution of software prohibited by VictorOps
 
@@ -21,29 +22,25 @@ OPTIONS_DEFINE=	QPAGE
 OPTIONS_DEFAULT=
 QPAGE_DESC=	Integrate qpage for victorops server problems
 
-RUN_DEPENDS+=	bash:${PORTSDIR}/shells/bash
+RUN_DEPENDS+=	bash:${PORTSDIR}/shells/bash \
+		curl:${PORTSDIR}/ftp/curl
 
-.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MQPAGE}
-RUN_DEPENDS+=	qpage:${PORTSDIR}/comms/qpage
-EXTRA_PATCHES+=	${FILESDIR}/qpage-patch
-.endif
-
-post-patch:
-	@${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} \
-		-e '1s|#!/bin/bash|#!/usr/local/bin/bash|'
+QPAGE_RUN_DEPENDS+=	qpage:${PORTSDIR}/comms/qpage
+QPAGE_EXTRA_PATCHES+=	${FILESDIR}/qpage-patch
 
 do-install:
 	${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily
 	${INSTALL_DATA} ${WRKSRC}/etc/cron.daily/victorops ${STAGEDIR}${PREFIX}/etc/periodic/daily/400.victorops
 	${MKDIR} ${STAGEDIR}${PREFIX}/etc/nagios
-.for i in victorops victorops_email vo_test_svc vo_test_svc_cmd
-	${INSTALL_DATA} ${WRKSRC}/opt/victorops/nagios_plugin/nagios_conf/${i}.cfg ${STAGEDIR}${PREFIX}/etc/nagios/${i}.cfg-sample
-.endfor
 	${MKDIR} ${STAGEDIR}${PREFIX}/libexec/victorops
+	${MKDIR} ${STAGEDIR}${PREFIX}/etc/victorops
+	${MKDIR} ${STAGEDIR}/var/log/victorops
+	${INSTALL_DATA} ${WRKSRC}/opt/victorops/nagios_plugin/nagios_conf/victorops.cfg ${STAGEDIR}${PREFIX}/etc/nagios/victorops.cfg-sample
+	${INSTALL_DATA} ${WRKSRC}/opt/victorops/nagios_plugin/conf/env.sh.sample ${STAGEDIR}${PREFIX}/etc/victorops
+	${INSTALL_DATA} ${WRKSRC}/opt/victorops/nagios_plugin/conf/proxy.sh.sample ${STAGEDIR}${PREFIX}/etc/victorops
 .for i in check_test_svc check_victorops_cmds check_victorops_forwarder \
 	do_victorops_heartbeat enqueue_alert forward_alert_file forward_alerts \
-	send_email_alert send_status stop_forwarder support_collect.sh \
+	send_email_alert send_status stop_forwarder \
 	url_encode.sed utils
 	${INSTALL_SCRIPT} ${WRKSRC}/opt/victorops/nagios_plugin/bin/${i} ${STAGEDIR}${PREFIX}/libexec/victorops/${i}
 .endfor

Modified: branches/2016Q1/net-mgmt/victorops-nagios/distinfo
==============================================================================
--- branches/2016Q1/net-mgmt/victorops-nagios/distinfo	Sun Mar 20 18:16:58 2016	(r411471)
+++ branches/2016Q1/net-mgmt/victorops-nagios/distinfo	Sun Mar 20 18:18:20 2016	(r411472)
@@ -1,2 +1,2 @@
-SHA256 (victorops-nagios_1.1.8.tar.gz) = 796e146552e27b45d0339c9c74883ba8048125887461f9e69a1e36cbd752e1a2
-SIZE (victorops-nagios_1.1.8.tar.gz) = 12838
+SHA256 (victorops-nagios-1.4.20.tar.gz) = 87d8c87182e8945357cb9b602d19452754a4decb4809a8594a2495a04f3d9664
+SIZE (victorops-nagios-1.4.20.tar.gz) = 1678731

Modified: branches/2016Q1/net-mgmt/victorops-nagios/files/qpage-patch
==============================================================================
--- branches/2016Q1/net-mgmt/victorops-nagios/files/qpage-patch	Sun Mar 20 18:16:58 2016	(r411471)
+++ branches/2016Q1/net-mgmt/victorops-nagios/files/qpage-patch	Sun Mar 20 18:18:20 2016	(r411472)
@@ -1,38 +1,27 @@
---- opt/victorops/nagios_plugin/bin/send_email_alert.orig	2014-06-11 10:39:13.918151547 -0500
-+++ opt/victorops/nagios_plugin/bin/send_email_alert	2014-06-11 11:20:43.930977406 -0500
-@@ -31,6 +31,7 @@
+--- opt/victorops/nagios_plugin/bin/send_email_alert.orig	2016-01-16 21:20:46 UTC
++++ opt/victorops/nagios_plugin/bin/send_email_alert
+@@ -34,6 +34,7 @@ fi
  # Build the contact email list
  ORG_SLUG="$(getVal _CONTACTVO_ORGANIZATION_ID unkonwn_org)"
  CONTACTEMAIL="$(getVal _CONTACTVO_CONTACTEMAIL)"
 +CONTACTPAGER="$(getVal CONTACTPAGER)"
  VO_CONTACT="failsafe+$ORG_SLUG at victorops.net"
- WGET_LOG=/tmp/victorops_forward_wget.out
- STDERR_LOG=/tmp/victorops_forward_wget.err
-@@ -42,10 +43,16 @@
+ WGET_LOG=$LOG_DIR/victorops_forward_wget.out
+ STDERR_LOG=$LOG_DIR/victorops_forward_wget.err
+@@ -45,10 +46,16 @@ if (( $IS_SERVICE )); then
      if [ "$CONTACTEMAIL" != "" ]; then
-         $PRINTF "%b" "***** Alert *****\n\nNotification Type: $(getVal NOTIFICATIONTYPE)\n\nService: $(getVal SERVICEDESC)\nHost: $(getVal HOSTALIAS)\nAddress: $(getVal HOSTADDRESS)\nState: $(getVal SERVICESTATE)\n\nDate/Time: $(getVal LONGDATETIME)\n\nAdditional Info:\n\n$(getVal SERVICEOUTPUT)\n\n" | $MAIL -s "** $(getVal NOTIFICATIONTYPE) Service Alert: $(getVal HOSTALIAS)/$(getVal SERVICEDESC) is $(getVal SERVICESTATE) **" $CONTACTEMAIL
+         printf "%b" "***** Alert *****\n\nNotification Type: $(getVal NOTIFICATIONTYPE)\n\nService: $(getVal SERVICEDESC)\nHost: $(getVal HOSTALIAS)\nAddress: $(getVal HOSTADDRESS)\nState: $(getVal SERVICESTATE)\n\nDate/Time: $(getVal LONGDATETIME)\n\nAdditional Info:\n\n$(getVal SERVICEOUTPUT)\n\n" | mail -s "** $(getVal NOTIFICATIONTYPE) Service Alert: $(getVal HOSTALIAS)/$(getVal SERVICEDESC) is $(getVal SERVICESTATE) **" $CONTACTEMAIL
      fi
 +    if [ "$CONTACTPAGER" != "" ]; then
-+        $PRINTF "%b" "$(getVal SERVICEDESC) $(getVal NOTIFICATIONTYPE) for $(getVal HOSTNAME) is $(getVal SERVICESTATE) at $(getVal TIME) $(getVal SERVICEOUTPUT)" | $QPAGE -f icinga $CONTACTPAGER
++        printf "%b" "$(getVal SERVICEDESC) $(getVal NOTIFICATIONTYPE) for $(getVal HOSTNAME) is $(getVal SERVICESTATE) at $(getVal TIME) $(getVal SERVICEOUTPUT)" | qpage -f icinga $CONTACTPAGER
 +    fi
  else
      if [ "$CONTACTEMAIL" != "" ]; then
-         $PRINTF "%b" "***** Alert *****\n\nNotification Type: $(getVal NOTIFICATIONTYPE)\nHost: $(getVal HOSTNAME)\nState: $(getVal HOSTSTATE)\nAddress: $(getVal HOSTADDRESS)\nInfo: $(getVal HOSTOUTPUT)\n\nDate/Time: $(getVal LONGDATETIME)\n" | $MAIL -s "** $(getVal NOTIFICATIONTYPE) Host Alert: $(getVal HOSTNAME) is $(getVal HOSTSTATE) **" $CONTACTEMAIL
+         printf "%b" "***** Alert *****\n\nNotification Type: $(getVal NOTIFICATIONTYPE)\nHost: $(getVal HOSTNAME)\nState: $(getVal HOSTSTATE)\nAddress: $(getVal HOSTADDRESS)\nInfo: $(getVal HOSTOUTPUT)\n\nDate/Time: $(getVal LONGDATETIME)\n" | mail -s "** $(getVal NOTIFICATIONTYPE) Host Alert: $(getVal HOSTNAME) is $(getVal HOSTSTATE) **" $CONTACTEMAIL
      fi
 +    if [ "$CONTACTPAGER" != "" ]; then
-+        $PRINTF "%b" "$(getVal HOSTNAME) is $(getVal HOSTSTATE) at $(getVal TIME) -- $(getVal HOSTOUTPUT)" | $QPAGE -f icinga $CONTACTPAGER
++        printf "%b" "$(getVal HOSTNAME) is $(getVal HOSTSTATE) at $(getVal TIME) -- $(getVal HOSTOUTPUT)" | qpage -f icinga $CONTACTPAGER
 +    fi
  fi
  # ***
  # *** Make sure the mail command is the last thing in this file so the including file can check the exit code
---- opt/victorops/nagios_plugin/bin/utils.orig   2014-06-16 20:12:16.713013963 -0500
-+++ opt/victorops/nagios_plugin/bin/utils        2014-06-16 20:12:58.533005832 -0500
-@@ -110,6 +110,7 @@
- MV=$(findApp mv)
- PRINTF=$(findApp printf)
- PS=$(findApp ps)
-+QPAGE=$(findApp qpage)
- SED=$(findApp sed)
- SLEEP=$(findApp sleep)
- TAR=$(findApp tar)
-

Modified: branches/2016Q1/net-mgmt/victorops-nagios/pkg-plist
==============================================================================
--- branches/2016Q1/net-mgmt/victorops-nagios/pkg-plist	Sun Mar 20 18:16:58 2016	(r411471)
+++ branches/2016Q1/net-mgmt/victorops-nagios/pkg-plist	Sun Mar 20 18:18:20 2016	(r411472)
@@ -1,7 +1,6 @@
-etc/nagios/victorops.cfg-sample
-etc/nagios/victorops_email.cfg-sample
-etc/nagios/vo_test_svc.cfg-sample
-etc/nagios/vo_test_svc_cmd.cfg-sample
+ at sample etc/victorops/env.sh.sample
+ at sample etc/victorops/proxy.sh.sample
+ at sample etc/nagios/victorops.cfg-sample
 etc/periodic/daily/400.victorops
 libexec/victorops/check_test_svc
 libexec/victorops/check_victorops_cmds
@@ -13,6 +12,8 @@ libexec/victorops/forward_alerts
 libexec/victorops/send_email_alert
 libexec/victorops/send_status
 libexec/victorops/stop_forwarder
-libexec/victorops/support_collect.sh
 libexec/victorops/url_encode.sed
 libexec/victorops/utils
+ at dir etc/nagios
+ at dir etc/victorops
+ at dir /var/log/victorops


More information about the svn-ports-all mailing list