[Pkg-nagios-changes] [SCM] Debian packaging for nagircbot branch, master, updated. f0aea80aa670697af6e60ce7600689f189279898

John Morrissey jwm at horde.net
Wed May 25 18:00:14 UTC 2011


The following commit has been merged in the master branch:
commit 88e9e9fa50b3280b8823811f5eee8375051fd30f
Merge: 7d0bbb5af2a4bc0ead722ab9b68326d19912757a d0787707144c865b8a14e423f7a06e94e2ce9d4f
Author: John Morrissey <jwm at horde.net>
Date:   Mon Dec 13 09:03:32 2010 -0500

    Imported Debian patch 0.0.32-1

diff --combined debian/changelog
index 0000000,0000000..4706bf6
new file mode 100644
--- /dev/null
+++ b/debian/changelog
@@@ -1,0 -1,0 +1,5 @@@
++nagircbot (0.0.32-1) unstable; urgency=low
++
++  * Initial release. (Closes: #546481)
++
++ -- John Morrissey <jwm at horde.net>  Mon, 13 Dec 2010 09:03:32 -0500
diff --combined debian/compat
index 0000000,0000000..7f8f011
new file mode 100644
--- /dev/null
+++ b/debian/compat
@@@ -1,0 -1,0 +1,1 @@@
++7
diff --combined debian/control
index 0000000,0000000..09c73b0
new file mode 100644
--- /dev/null
+++ b/debian/control
@@@ -1,0 -1,0 +1,18 @@@
++Source: nagircbot
++Section: net
++Priority: extra
++Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel at lists.alioth.debian.org>
++Uploaders: John Morrissey <jwm at horde.net>
++Build-Depends: debhelper (>= 7), libssl-dev
++Standards-Version: 3.9.1
++Homepage: http://www.vanheusden.com/nagircbot/
++
++Package: nagircbot
++Architecture: any
++Depends: ${shlibs:Depends}, ${misc:Depends}
++Description: IRC bot that announces Nagios status
++ An IRC (Internet Relay Chat) bot that reads Nagios' status information and
++ emits alerts to an IRC channel. It can filter alerts based on severity
++ (CRITICAL, HARD, SOFT, and/or UNKNOWN) or by regular expression. It can
++ connect to IRC servers protected by password or SSL, and can optionally set
++ the topic to the current Nagios status.
diff --combined debian/copyright
index 0000000,0000000..d041904
new file mode 100644
--- /dev/null
+++ b/debian/copyright
@@@ -1,0 -1,0 +1,8 @@@
++Format: http://dep.debian.net/deps/dep5/
++Upstream-Contact: Folkert van Heusden <folkert at vanheusden.com>
++Source: http://www.vanheusden.com/nagircbot/
++
++Files: *
++Copyright: 2006-2010 Folkert van Heusden <folkert at vanheusden.com>
++License: GPL-2 with OpenSSL exception
++ /usr/share/common-licenses/GPL-2
diff --combined debian/default
index 0000000,0000000..84e7e2f
new file mode 100644
--- /dev/null
+++ b/debian/default
@@@ -1,0 -1,0 +1,20 @@@
++# Run nagircbot on system startup?
++ENABLE=no
++
++# Location of Nagios/Icinga's status.dat.
++STATUSFILE=/var/cache/nagios3/status.dat
++
++# User to run as.
++USER=nagios
++
++# IRC server and port to connect to.
++SERVER=irc.example.com:6667
++
++# IRC nickname to use.
++NICK=nagircbot
++
++# IRC channel to connect to, including the leading "#".
++CHANNEL='#mychannel'
++
++# Additonal arguments (see nagircbot man page).
++OPTIONS=
diff --combined debian/dirs
index 0000000,0000000..e772481
new file mode 100644
--- /dev/null
+++ b/debian/dirs
@@@ -1,0 -1,0 +1,1 @@@
++usr/bin
diff --combined debian/docs
index 0000000,0000000..b2b2a78
new file mode 100644
--- /dev/null
+++ b/debian/docs
@@@ -1,0 -1,0 +1,1 @@@
++readme.txt
diff --combined debian/init.d
index 0000000,0000000..772543a
new file mode 100644
--- /dev/null
+++ b/debian/init.d
@@@ -1,0 -1,0 +1,320 @@@
++#!/bin/sh
++
++# Example init.d script with LSB support.
++# http://refspecs.freestandards.org/LSB_2.1.0/LSB-generic/LSB-generic/iniscrptact.html
++#
++# Please read this init.d carefully and modify the sections to
++# adjust it to the program you want to run.
++#
++# Copyright (c) 2007 Javier Fernandez-Sanguino <jfs at debian.org>
++# Copyright (c) 2010 John Morrissey <jwm at horde.net>
++#
++# This is free software; you may redistribute it and/or modify
++# it under the terms of the GNU General Public License as
++# published by the Free Software Foundation; either version 2,
++# or (at your option) any later version.
++#
++# This is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License with
++# the Debian operating system, in /usr/share/common-licenses/GPL; if
++# not, write to the Free Software Foundation, Inc., 59 Temple Place,
++# Suite 330, Boston, MA 02111-1307 USA
++
++### BEGIN INIT INFO
++# Provides:          nagircbot
++# Required-Start:    $network $remote_fs
++# Required-Stop:     $network $remote_fs
++# Should-Start:
++# Should-Stop:
++# Default-Start:     2 3 4 5
++# Default-Stop:      0 1 6
++# Short-Description: IRC bot that announces Nagios status
++# Description:       An IRC bot that reads Nagios' status information and
++#                    emits alerts to an IRC channel. It can filter alerts
++#                    based on severity (CRITICAL, HARD, SOFT, and/or
++#                    UNKNOWN) or by regular expression. It can connect to
++#                    IRC servers protected by password or SSL, and can
++#                    optionally set the topic to the current Nagios status.
++### END INIT INFO
++
++DAEMON=/usr/bin/nagircbot
++NAME=nagircbot
++DESC=nagircbot
++
++PIDFILE=/var/run/$NAME.pid
++
++if [ ! -x "$DAEMON" ]; then
++	exit 0
++fi
++
++. /lib/lsb/init-functions
++
++# How long to wait for the server to start, in seconds.
++# If set, each time the server is started (on start or restart),
++# wait to see if it starts successfully. If not set and the
++# daemon takes a while to write its pid file, we might incorrectly
++# state that the daemon did not start up.
++# This value should always be at least 1.
++STARTTIME=1
++
++# How long to wait for the server to stop, in seconds.
++# If set too low, some daemons may not stop gracefully
++# and 'restart' will not work.
++# This value should always be at least 1.
++DIETIME=1
++
++# Include defaults if available
++if [ -f "/etc/default/$NAME" ]; then
++	. "/etc/default/$NAME"
++fi
++
++# Check if pid's cmdline matches a given name.
++running_pid() {
++	local pid=$1
++	shift
++
++	local name=$1
++	shift
++
++	if [ -z "$pid" ]; then
++		return 1
++	fi
++	if [ ! -d "/proc/$pid" ]; then
++		return 1
++	fi
++
++	cmd=$(cat "/proc/$pid/cmdline" | tr "\000" "\n" | head -n1 | cut -d: -f1)
++	# Is this the expected server?
++	if [ "$cmd" != "$name" ]; then
++		return 1
++	fi
++
++	return 0
++}
++
++running() {
++	local pid
++
++	# No pidfile, probably no daemon present.
++	if [ ! -f "$PIDFILE" ]; then
++		return 1
++	fi
++	pid=$(cat "$PIDFILE")
++	if ! running_pid "$pid" "$DAEMON"; then
++		return 1
++	fi
++	return 0
++}
++
++start_server() {
++	start_daemon -p "$PIDFILE" "$DAEMON" -P /var/run/nagircbot.pid \
++		-z "$USER" -Xf "$STATUSFILE" \
++		-s "$SERVER" -n "$NICK" -c "$CHANNEL" $OPTIONS
++}
++
++stop_server() {
++	killproc -p "$PIDFILE" "$DAEMON"
++}
++
++reload_server() {
++	if [ ! -f "$PIDFILE" ]; then
++		return 1
++	fi
++	pid=$(pidofproc "$PIDFILE")
++	kill -HUP $pid
++	return
++}
++
++# Force the process to die. SIGTERM it at first,
++# then SIGKILL after $DIETIME.
++force_stop() {
++	if [ ! -e "$PIDFILE" ]; then
++		return 0
++	fi
++	if ! running; then
++		rm -f "$PIDFILE"
++		return 0
++	fi
++
++	kill -TERM "$pid"
++	if ! running; then
++		rm -f "$PIDFILE"
++		return
++	fi
++
++	sleep "${DIETIME:-1}"
++
++	kill -KILL $pid
++	sleep "${DIETIME:-1}"
++	if ! running; then
++		rm -f "$PIDFILE"
++		return
++	fi
++
++	echo "Cannot kill $NAME (pid=$pid)!"
++	return 1
++}
++
++case "$1" in
++start)
++	case $ENABLE in
++	[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee])
++		exit 0
++		;;
++	esac
++
++	log_daemon_msg "Starting $DESC " "$NAME"
++
++	if running; then
++		log_progress_msg "already running"
++		log_end_msg 0
++		exit
++	fi
++
++	if ! start_server; then
++		log_end_msg 1
++		exit
++	fi
++
++	if ! running; then
++		sleep "${STARTTIME:-1}"
++	fi
++	if ! running; then
++		log_end_msg 7
++		exit
++	fi
++
++	log_end_msg 0
++	exit
++	;;
++
++stop)
++	log_daemon_msg "Stopping $DESC" "$NAME"
++
++	if ! running; then
++		log_progress_msg "not running"
++		log_end_msg 0
++		exit
++	fi
++
++	stop_server
++	log_end_msg $?
++	exit
++	;;
++
++force-stop)
++	# First, try to gracefully stop the program.
++	"$0" stop
++	if ! running; then
++		exit 0
++	fi
++
++	# It's still running; try to kill it more forcefully.
++	log_daemon_msg "Stopping (force) $DESC" "$NAME"
++	force_stop
++	log_end_msg $?
++	exit
++	;;
++
++restart|force-reload)
++	case $ENABLE in
++	[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee])
++		exit 0
++		;;
++	esac
++
++	log_daemon_msg "Restarting $DESC" "$NAME"
++
++	if ! running; then
++		log_end_msg 0
++		exit
++	fi
++
++	stop_server
++	status=$?
++	if [ $status -ne 0 ]; then
++		if [ "$1" = 'force-reload' ]; then
++			log_end_msg 0
++		else
++			log_end_msg $status
++		fi
++		exit
++	fi
++
++	# Some servers take time to stop.
++	sleep "${DIETIME:-1}"
++
++	start_server
++	status=$?
++	if [ $status -ne 0 ]; then
++		if [ "$1" = "force-reload" ]; then
++			log_end_msg 0
++		else
++			log_end_msg $status
++		fi
++		exit
++	fi
++
++	sleep "${STARTTIME:-1}"
++
++	if ! running; then
++		if [ "$1" = "force-reload" ]; then
++			log_end_msg 0
++		else
++			log_end_msg 7
++		fi
++		exit
++	fi
++
++	log_end_msg 0
++	exit
++	;;
++
++status)
++	status_of_proc -p "$PIDFILE" "$DAEMON" "$NAME"
++	exit
++	;;
++
++# Use this if the daemon cannot reload...
++reload)
++	log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon"
++	log_warning_msg "cannot re-read the config file (use restart)."
++	exit 3
++	;;
++# ... and this if it can.
++#reload)
++	# If the daemon can reload its config files on the fly
++	# (for example, by sending it SIGHUP):
++	#log_daemon_msg "Reloading $DESC configuration" "$NAME"
++	#if ! running; then
++	#	log_progress_msg "not running"
++	#	log_end_msg 7
++	#	exit
++	#fi
++	#
++	#reload_server
++	#if ! running; then
++	#	log_progress_msg "died on reload"
++	#	log_end_msg 1
++	#	exit
++	#fi
++	#exit 0
++	#;;
++
++	# If the daemon responds to changes in its config file
++	# automatically, make this a do-nothing entry:
++	#exit 0
++	#;;
++
++*)
++	N=/etc/init.d/$NAME
++	echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2
++	exit 3
++	;;
++esac
++
++exit 0
diff --combined debian/manpages
index 0000000,0000000..5372681
new file mode 100644
--- /dev/null
+++ b/debian/manpages
@@@ -1,0 -1,0 +1,1 @@@
++debian/nagircbot.1
diff --combined debian/nagircbot.1
index 0000000,0000000..1acfa1b
new file mode 100644
--- /dev/null
+++ b/debian/nagircbot.1
@@@ -1,0 -1,0 +1,126 @@@
++.TH NAGIRCBOT 1 "December 13, 2010"
++.\" Please adjust this date whenever revising the manpage.
++.SH NAME
++nagircbot \- announce Nagios status to an IRC channel
++.SH SYNOPSIS
++.SY nagircbot
++.OP \-CdeHmRStxX
++.OP \-A REGEX
++.OP \-c CHANNEL
++.OP \-f FILE
++.OP \-F HOST[:PORT]
++.OP \-i INTERVAL
++.OP \-I INTERVAL
++.OP \-k KEYWORD
++.OP \-n NICK
++.OP \-N PREFIX
++.OP \-p PASSWORD
++.OP \-P FILE
++.OP \-s HOST[:PORT]
++.OP \-T LIST
++.OP \-u USERNAME
++.OP \-U NAME
++.OP \-z USER
++.br
++.SH DESCRIPTION
++.PP
++\fBnagircbot\fP is an IRC bot that reads Nagios' status information and
++emits alerts to an IRC channel. It can filter alerts based on severity
++(\fBCRITICAL\fP, \fBHARD\fP, \fBSOFT\fP, and/or \fBUNKNOWN\fP) or by regular
++expression. It can connect to IRC servers protected by password or SSL, and
++can optionally set the topic to the current Nagios status.
++.SH OPTIONS
++.TP
++.B \-A REGEX
++Filter (omit) lines that match a basic regular expression.
++.TP
++.B \-c CHANNEL
++Channel to connect to, including the leading "#" (default: "#nagircbot").
++.TP
++.B \-C
++Use colors in IRC messages.
++.TP
++.B \-d
++Do not fork into the background.
++.TP
++.B \-e
++Use encryption (SSL) when connecting to the IRC server.
++.TP
++.B \-f FILE
++Path to Nagios' status.log, indicated by the 'status_file' parameter in
++nagios.cfg (default: "/usr/local/nagios/var/status.log").
++.TP
++.B \-F HOST[:PORT]
++Retrieve status.log over the network. If no port is specified, the default
++is 33333.
++.TP
++.B \-H
++Only announce alerts in 'HARD' state. This is the default.
++.TP
++.B \-i INTERVAL
++Nagios alert check interval, in seconds (default: 60).
++.TP
++.B \-I INTERVAL
++How often to announce Nagios global status in the channel, in seconds.
++Specify an interval of 0 (the default) to disable. Do not specify an
++interval smaller than the alert check (\-i) interval.
++.TP
++.B \-k KEYWORD
++Keyword for the channel (default: no keyword).
++.TP
++.B \-m
++Display status information for an alert in separate IRC messages instead of
++combining on a single message.
++.TP
++.B \-n NICK
++IRC nick to use (default: "nagircbot").
++.TP
++.B \-N PREFIX
++Prefix for all in-channel IRC messages.
++.TP
++.B \-p PASSWORD
++IRC server password.
++.TP
++.B \-P FILE
++Write PID file.
++.TP
++.B \-R
++Only announce CRITICAL/UNKNOWN alerts.
++.TP
++.B \-s HOST[:PORT]
++IRC server to connect to. If not specified, the default is "localhost:6667".
++If no port is specified, the default is 33333.
++.TP
++.B \-S
++Also announce alerts in 'SOFT' state.
++.TP
++.B \-t
++Set the channel topic to an alert summary.
++.TP
++.B \-T LIST
++Enable checks to see if Nagios is still running. Send 'check' in a private
++message to invoke the check. Accepts a comma-seperated list (without spaces)
++with the following elements: max_time_last_host_update,
++max_time_oldest_host_update, max_time_last_host_check,
++max_time_oldest_host_check, max_time_last_service_check,
++max_time_oldest_service_check, and max_time_oldest_next_service_check.
++.TP
++.B \-u USERNAME
++Username to log into the IRC server as.
++.TP
++.B \-U NAME
++IRC "real" or full name (default: "nagircbot").
++.TP
++.B \-x
++status.log is in Nagios 1.0 format.
++.TP
++.B \-X
++status.log is in Nagios 2.0/3.0 format. This is the default.
++.TP
++.B \-z USER
++User to run as.
++.SH AUTHOR
++nagircbot was written by Folkert van Heusden <folkert at vanheusden.com>.
++.PP
++This manual page was written by John Morrissey <jwm at horde.net>,
++for the Debian project (and may be used by others).
diff --combined debian/patches/debian-changes-0.0.32-1
index 0000000,0000000..329c7b3
new file mode 100644
--- /dev/null
+++ b/debian/patches/debian-changes-0.0.32-1
@@@ -1,0 -1,0 +1,60 @@@
++Description: Upstream changes introduced in version 0.0.32-1
++ This patch has been created by dpkg-source during the package build.
++ Here's the last changelog entry, hopefully it gives details on why
++ those changes were made:
++ .
++ nagircbot (0.0.32-1) unstable; urgency=low
++ .
++   * Initial release. (Closes: #546481)
++ .
++ The person named in the Author field signed this changelog entry.
++Author: John Morrissey <jwm at horde.net>
++Bug-Debian: http://bugs.debian.org/546481
++
++---
++The information above should follow the Patch Tagging Guidelines, please
++checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
++are templates for supplementary fields that you might want to add:
++
++Origin: <vendor|upstream|other>, <url of original patch>
++Bug: <url in upstream bugtracker>
++Bug-Debian: http://bugs.debian.org/<bugnumber>
++Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
++Forwarded: <no|not-needed|url proving that it has been forwarded>
++Reviewed-By: <name and email of someone who approved the patch>
++Last-Update: <YYYY-MM-DD>
++
++--- nagircbot-0.0.32.orig/Makefile
+++++ nagircbot-0.0.32/Makefile
++@@ -2,12 +2,16 @@
++ 
++ VERSION=0.0.32
++ 
++-DEBUG= -g  -D_DEBUG #-fprofile-arcs -ftest-coverage # -pg -g
++-CXXFLAGS+=-Wall -O2 -DVERSION=\"${VERSION}\" $(DEBUG)
++-CFLAGS+=${CXXFLAGS}
++-LDFLAGS+=$(DEBUG) -lcrypto -lssl -lstdc++
+++DEBUG=-g -D_DEBUG #-fprofile-arcs -ftest-coverage #-pg -g
+++CXXFLAGS += -Wall -O2 -DVERSION=\"${VERSION}\" $(DEBUG)
+++CFLAGS += ${CXXFLAGS}
+++LDFLAGS += $(DEBUG) -lcrypto -lssl -lstdc++
+++
+++DESTDIR ?=
+++prefix ?= /usr/local
+++bindir ?= $(prefix)/bin
++ 
++-OBJS= ssl.o error.o log.o utils.o br.o pl.o anna.o
+++OBJS=ssl.o error.o log.o utils.o br.o pl.o anna.o
++ 
++ all: nagircbot
++ 
++@@ -15,7 +19,8 @@ nagircbot: $(OBJS)
++ 	$(CC) -Wall -W $(OBJS) $(LDFLAGS) -o nagircbot
++ 
++ install: nagircbot
++-	cp nagircbot /usr/local/bin
+++	cp nagircbot $(DESTDIR)$(bindir)/nagircbot
+++	chmod 0755 $(DESTDIR)$(bindir)/nagircbot
++ 
++ clean:
++ 	rm -f $(OBJS) nagircbot core *.da *.gcov *.bb*
diff --combined debian/patches/series
index 0000000,0000000..df321de
new file mode 100644
--- /dev/null
+++ b/debian/patches/series
@@@ -1,0 -1,0 +1,1 @@@
++debian-changes-0.0.32-1
diff --combined debian/postinst
index 0000000,0000000..6a2795d
new file mode 100755
--- /dev/null
+++ b/debian/postinst
@@@ -1,0 -1,0 +1,17 @@@
++#!/bin/sh
++
++set -e
++
++case "$1" in
++configure)
++	;;
++
++*)
++	echo "postinst called with unknown argument \`$1'" >&2
++	exit 1
++	;;
++esac
++
++#DEBHELPER#
++
++exit 0
diff --combined debian/postrm
index 0000000,0000000..8b8def5
new file mode 100755
--- /dev/null
+++ b/debian/postrm
@@@ -1,0 -1,0 +1,17 @@@
++#!/bin/sh
++
++set -e
++
++case "$1" in
++purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
++	;;
++
++*)
++	echo "postrm called with unknown argument \`$1'" >&2
++	exit 1
++	;;
++esac
++
++#DEBHELPER#
++
++exit 0
diff --combined debian/rules
index 0000000,0000000..1ee66b5
new file mode 100755
--- /dev/null
+++ b/debian/rules
@@@ -1,0 -1,0 +1,6 @@@
++#!/usr/bin/make -f
++
++#export DH_VERBOSE=1
++
++%:
++	prefix=/usr dh $@
diff --combined debian/source/format
index 0000000,0000000..163aaf8
new file mode 100644
--- /dev/null
+++ b/debian/source/format
@@@ -1,0 -1,0 +1,1 @@@
++3.0 (quilt)
diff --combined debian/watch
index 0000000,0000000..c6303d9
new file mode 100644
--- /dev/null
+++ b/debian/watch
@@@ -1,0 -1,0 +1,2 @@@
++version=3
++http://www.vanheusden.com/nagircbot/ nagircbot-(.*)\.tgz

-- 
Debian packaging for nagircbot



More information about the Pkg-nagios-changes mailing list