wok rev 8330

Add: nagios, nagios-dev, nagios-doc
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Wed Feb 02 01:16:56 2011 +0100 (2011-02-02)
parents 17676b7585e6
children f898e6080f92
files nagios-dev/receipt nagios-doc/receipt nagios/receipt nagios/stuff/htpasswd.users nagios/stuff/nagios nagios/stuff/nagios-3.2.1-Makefiles.u nagios/stuff/nagios-3.2.3-Makefiles.u nagios/stuff/nagios.desktop nagios/stuff/nagios.png
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nagios-dev/receipt	Wed Feb 02 01:16:56 2011 +0100
     1.3 @@ -0,0 +1,18 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="nagios-dev"
     1.7 +VERSION="3.2.3"
     1.8 +CATEGORY="developement"
     1.9 +SHORT_DESC="Nagios developement files"
    1.10 +MAINTAINER="erjo@slitaz.org"
    1.11 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.12 +WEB_SITE="http://www.nagios.org/"
    1.13 +WANTED="nagios"
    1.14 +
    1.15 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.16 +genpkg_rules()
    1.17 +{
    1.18 +	mkdir -p $fs/usr
    1.19 +	cp -pa $src/include $fs/usr
    1.20 +}
    1.21 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/nagios-doc/receipt	Wed Feb 02 01:16:56 2011 +0100
     2.3 @@ -0,0 +1,20 @@
     2.4 +# SliTaz package receipt.
     2.5 +
     2.6 +PACKAGE="nagios-doc"
     2.7 +VERSION="3.2.3"
     2.8 +CATEGORY="misc"
     2.9 +SHORT_DESC="Nagios documentation"
    2.10 +MAINTAINER="erjo@slitaz.org"
    2.11 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    2.12 +WEB_SITE="http://www.nagios.org/"
    2.13 +WANTED="nagios"
    2.14 +
    2.15 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.16 +genpkg_rules()
    2.17 +{
    2.18 +	mkdir -p $fs/usr/share/nagios
    2.19 +	
    2.20 +	# Put doc in separate package
    2.21 +	cp -pa $_pkg/usr/share/nagios/docs $fs/usr/share/nagios
    2.22 +}
    2.23 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/nagios/receipt	Wed Feb 02 01:16:56 2011 +0100
     3.3 @@ -0,0 +1,102 @@
     3.4 +# SliTaz package receipt.
     3.5 +
     3.6 +PACKAGE="nagios"
     3.7 +VERSION="3.2.3"
     3.8 +CATEGORY="network"
     3.9 +SHORT_DESC="Host and network monitoring"
    3.10 +MAINTAINER="erjo@slitaz.org"
    3.11 +DEPENDS="apache nagios-plugins libpng libjpeg"
    3.12 +BUILD_DEPENDS="libgd-dev libpng-dev libjpeg-dev"
    3.13 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    3.14 +WEB_SITE="http://www.nagios.org/"
    3.15 +WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
    3.16 +SUGGESTED="nagios-nrpe"
    3.17 +
    3.18 +# Rules to configure and make the package.
    3.19 +compile_rules()
    3.20 +{
    3.21 +	cd $src
    3.22 +	while read patch_file; do
    3.23 +		if [ ! -f done.$patch_file ]; then
    3.24 +			patch -p1 < ../stuff/$patch_file || exit 1
    3.25 +			touch done.$patch_file
    3.26 +		fi
    3.27 +	done <<EOT
    3.28 +$PACKAGE-$VERSION-Makefiles.u
    3.29 +EOT
    3.30 +	#patch -p1 < ../stuff/nagios-3.2.1-Makefiles.u || exit 1
    3.31 +	./configure \
    3.32 +		--prefix=/usr \
    3.33 +		--infodir=/usr/share/info \
    3.34 +		--mandir=/usr/share/man \
    3.35 +		--with-nagios-user=nagios \
    3.36 +		--with-nagios-group=nagios \
    3.37 +		--with-lockfile=/var/run/nagios/nagios.pid \
    3.38 +		--with-checkresult-dir=/var/spool/nagios/checkresults \
    3.39 +		--sysconfdir=/etc/nagios \
    3.40 +		--with-httpd-conf=/etc/apache/conf.d \
    3.41 +		--libexecdir=/usr/lib/nagios/plugins \
    3.42 +		--sbindir=/usr/lib/nagios/cgi \
    3.43 +		--datadir=/usr/share/nagios \
    3.44 +		--localstatedir=/var/log/nagios \
    3.45 +		$CONFIGURE_ARGS 
    3.46 +		
    3.47 +	make all && make DESTDIR=$PWD/_pkg fullinstall \
    3.48 +	&& make DESTDIR=$PWD/_pkg install-config
    3.49 +}
    3.50 +
    3.51 +# Rules to gen a SliTaz package suitable for Tazpkg.
    3.52 +genpkg_rules()
    3.53 +{
    3.54 +	mkdir -p $fs/usr $fs/etc/init.d \
    3.55 +	  $fs/var/log/nagios/rw \
    3.56 +	  $fs/var/run/nagios \
    3.57 +	  $fs/var/spool/nagios/checkresults \
    3.58 +	  $fs/etc/apache
    3.59 +		
    3.60 +	cp -a $_pkg/etc/apache $fs/etc
    3.61 +	cp -a $_pkg/etc/nagios $fs/etc
    3.62 +	cp -a stuff/nagios  $fs/etc/init.d
    3.63 +	install -o root -g root -m 644 stuff/htpasswd.users  $fs/etc/nagios/
    3.64 +	
    3.65 +	cp -a $_pkg/usr/bin $fs/usr
    3.66 +	cp -a $_pkg/usr/lib $fs/usr
    3.67 +	cp -a $_pkg/usr/share $fs/usr
    3.68 +	
    3.69 +	# Put doc in separate package
    3.70 +	rm -rf $fs/usr/share/nagios/docs
    3.71 +	
    3.72 +	# Fix Apache config for Nagvis
    3.73 +	sed -i 's/Options None/Options FollowSymLinks/' $fs/etc/apache/conf.d/nagios.conf
    3.74 +}
    3.75 +
    3.76 +post_install()
    3.77 +{
    3.78 +	if ! grep -q nagios $1/etc/passwd; then
    3.79 +		echo -n "Adding user/group nagios..."
    3.80 +		chroot $1/ addgroup -S nagios
    3.81 +		chroot $1/ adduser -S -D -H -G nagios nagios
    3.82 +		status
    3.83 +	fi
    3.84 +	
    3.85 +	# Fix perms for files and directories
    3.86 +	chroot $1/ chown -R nagios.nagios /var/log/nagios \
    3.87 +	  /var/run/nagios \
    3.88 +	  /var/spool/nagios \
    3.89 +	  /usr/share/nagios \
    3.90 +	  /etc/nagios/*
    3.91 +	  
    3.92 +	
    3.93 +	chmod 2775 $1/var/log/nagios/rw
    3.94 +	chroot $1/ addgroup www nagios
    3.95 +	
    3.96 +	# Start Nagios daemon if we are  on running system
    3.97 +	[ -z $1 ] && /etc/init.d/nagios start
    3.98 +	
    3.99 +	# post_install messges
   3.100 +	echo -e "\nTo starts $PACKAGE server you can run :\n"
   3.101 +	echo "/etc/init.d/$PACKAGE start"
   3.102 +	echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n"
   3.103 +	echo -e "Default login/password for the Web GUI is nagiosadmin/nagios"
   3.104 +}
   3.105 +
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/nagios/stuff/htpasswd.users	Wed Feb 02 01:16:56 2011 +0100
     4.3 @@ -0,0 +1,1 @@
     4.4 +nagiosadmin:GMfLGuUhzkBu6
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/nagios/stuff/nagios	Wed Feb 02 01:16:56 2011 +0100
     5.3 @@ -0,0 +1,64 @@
     5.4 +#!/bin/sh
     5.5 +# /etc/init.d/nagios : Start, stop and restart SSH server on SliTaz, at 
     5.6 +# boot time or with the command line.
     5.7 +#
     5.8 +# To start SSH server at boot time, just put nagios in the $RUN_DAEMONS
     5.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf
    5.10 +#
    5.11 +. /etc/init.d/rc.functions
    5.12 +. /etc/daemons.conf
    5.13 +
    5.14 +NAME=Nagios
    5.15 +DESC="Network Monitoring Server"
    5.16 +DAEMON=/usr/bin/nagios
    5.17 +CONFIG_FILE="/etc/nagios/nagios.cfg"
    5.18 +OPTIONS="-d $CONFIG_FILE"
    5.19 +PIDFILE=/var/run/nagios/nagios.pid
    5.20 +
    5.21 +configtest()
    5.22 +{
    5.23 +		$DAEMON -v $CONFIG_FILE
    5.24 +}
    5.25 +
    5.26 +case "$1" in
    5.27 +  start)
    5.28 +    if active_pidfile $PIDFILE nagios ; then
    5.29 +      echo "$NAME already running."
    5.30 +      exit 1
    5.31 +    fi
    5.32 +    echo -n "Starting $DESC: $NAME... "
    5.33 +	$DAEMON $OPTIONS
    5.34 +	#/usr/bin/nagios -d /etc/nagios/nagios.cfg
    5.35 +    status
    5.36 +    ;;
    5.37 +  stop)
    5.38 +    if ! active_pidfile $PIDFILE nagios ; then
    5.39 +      echo "$NAME is not running."
    5.40 +      exit 1
    5.41 +    fi
    5.42 +    echo -n "Stopping $DESC: $NAME... "
    5.43 +    kill `cat $PIDFILE`
    5.44 +    status
    5.45 +    ;;
    5.46 +  restart|reload)
    5.47 +    if ! active_pidfile $PIDFILE nagios ; then
    5.48 +      echo "$NAME is not running."
    5.49 +      exit 1
    5.50 +    fi
    5.51 +    echo -n "Restarting $DESC: $NAME... "
    5.52 +    kill `cat $PIDFILE`
    5.53 +    sleep 2
    5.54 +    $DAEMON $OPTIONS
    5.55 +    status
    5.56 +    ;;
    5.57 +  test)
    5.58 +	configtest ;;
    5.59 +  *)
    5.60 +    echo ""
    5.61 +    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart|reload]"
    5.62 +    echo ""
    5.63 +    exit 1
    5.64 +    ;;
    5.65 +esac
    5.66 +
    5.67 +exit 0
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/nagios/stuff/nagios-3.2.1-Makefiles.u	Wed Feb 02 01:16:56 2011 +0100
     6.3 @@ -0,0 +1,98 @@
     6.4 +--- nagios-3.2.1-ori/Makefile.in	Thu Dec 31 11:12:08 2009
     6.5 ++++ nagios-3.2.1/Makefile.in	Sun Jun  6 11:03:32 2010
     6.6 +@@ -30,8 +30,8 @@
     6.7 + LIBEXECDIR=@libexecdir@
     6.8 + HTMLDIR=@datarootdir@
     6.9 + INSTALL=@INSTALL@
    6.10 +-INSTALL_OPTS=@INSTALL_OPTS@
    6.11 +-COMMAND_OPTS=@COMMAND_OPTS@
    6.12 ++INSTALL_OPTS=
    6.13 ++COMMAND_OPTS=
    6.14 + HTTPD_CONF=@HTTPD_CONF@
    6.15 + INIT_DIR=@init_dir@
    6.16 + INIT_OPTS=-o root -g root
    6.17 +@@ -264,6 +264,7 @@
    6.18 + 	@echo ""
    6.19 + 
    6.20 + install-webconf:
    6.21 ++	$(INSTALL) -m 755 -d $(DESTDIR)$(HTTPD_CONF)
    6.22 + 	$(INSTALL) -m 644 sample-config/httpd.conf $(DESTDIR)$(HTTPD_CONF)/nagios.conf
    6.23 + 
    6.24 + 	@echo ""
    6.25 +--- nagios-3.2.1-ori/base/Makefile.in	Wed Jun 17 05:57:21 2009
    6.26 ++++ nagios-3.2.1/base/Makefile.in	Sun Jun  6 11:03:32 2010
    6.27 +@@ -39,8 +39,8 @@
    6.28 + CGIDIR=@sbindir@
    6.29 + HTMLDIR=@datarootdir@
    6.30 + INSTALL=@INSTALL@
    6.31 +-INSTALL_OPTS=@INSTALL_OPTS@
    6.32 +-COMMAND_OPTS=@COMMAND_OPTS@
    6.33 ++INSTALL_OPTS=
    6.34 ++COMMAND_OPTS=
    6.35 + STRIP=@STRIP@
    6.36 + 
    6.37 + CGIURL=@cgiurl@
    6.38 +--- nagios-3.2.1-ori/cgi/Makefile.in	Wed Jun 17 05:57:21 2009
    6.39 ++++ nagios-3.2.1/cgi/Makefile.in	Sun Jun  6 11:03:32 2010
    6.40 +@@ -18,8 +18,8 @@
    6.41 + CGIDIR=@sbindir@
    6.42 + HTMLDIR=@datarootdir@
    6.43 + INSTALL=@INSTALL@
    6.44 +-INSTALL_OPTS=@INSTALL_OPTS@
    6.45 +-COMMAND_OPTS=@COMMAND_OPTS@
    6.46 ++INSTALL_OPTS=
    6.47 ++COMMAND_OPTS=
    6.48 + STRIP=@STRIP@
    6.49 + 
    6.50 + CGIEXTRAS=@CGIEXTRAS@
    6.51 +--- nagios-3.2.1-ori/common/Makefile.in	Wed Jun 17 05:57:21 2009
    6.52 ++++ nagios-3.2.1/common/Makefile.in	Sun Jun  6 11:03:32 2010
    6.53 +@@ -20,8 +20,8 @@
    6.54 + CGIDIR=@sbindir@
    6.55 + HTMLDIR=@datarootdir@
    6.56 + INSTALL=@INSTALL@
    6.57 +-INSTALL_OPTS=@INSTALL_OPTS@
    6.58 +-COMMAND_OPTS=@COMMAND_OPTS@
    6.59 ++INSTALL_OPTS=
    6.60 ++COMMAND_OPTS=
    6.61 + 
    6.62 + CP=@CP@
    6.63 + 
    6.64 +--- nagios-3.2.1-ori/contrib/Makefile.in	Mon May 19 20:01:58 2008
    6.65 ++++ nagios-3.2.1/contrib/Makefile.in	Sun Jun  6 10:43:34 2010
    6.66 +@@ -15,7 +15,7 @@
    6.67 + # Generated automatically from configure script
    6.68 + SNPRINTF_O=@SNPRINTF_O@
    6.69 + INSTALL=@INSTALL@
    6.70 +-INSTALL_OPTS=@INSTALL_OPTS@
    6.71 ++INSTALL_OPTS=
    6.72 + 
    6.73 + 
    6.74 + prefix=@prefix@
    6.75 +--- nagios-3.2.1-ori/html/Makefile.in	Wed Jul  8 00:34:51 2009
    6.76 ++++ nagios-3.2.1/html/Makefile.in	Sun Jun  6 10:59:50 2010
    6.77 +@@ -10,8 +10,8 @@
    6.78 + CGIDIR=@sbindir@
    6.79 + HTMLDIR=@datadir@
    6.80 + INSTALL=@INSTALL@
    6.81 +-INSTALL_OPTS=@INSTALL_OPTS@
    6.82 +-COMMAND_OPTS=@COMMAND_OPTS@
    6.83 ++INSTALL_OPTS=
    6.84 ++COMMAND_OPTS=
    6.85 + 
    6.86 + CP=@CP@
    6.87 + 
    6.88 +--- nagios-3.2.1-ori/module/Makefile.in	Sat Dec 15 00:02:24 2007
    6.89 ++++ nagios-3.2.1/module/Makefile.in	Sun Jun  6 11:03:32 2010
    6.90 +@@ -19,9 +19,8 @@
    6.91 + exec_prefix=@exec_prefix@
    6.92 + BINDIR=@bindir@
    6.93 + INSTALL=@INSTALL@
    6.94 +-INSTALL_OPTS=@INSTALL_OPTS@
    6.95 +-COMMAND_OPTS=@COMMAND_OPTS@
    6.96 +-STRIP=@STRIP@
    6.97 ++INSTALL_OPTS=
    6.98 ++COMMAND_OPTS=
    6.99 + 
   6.100 + CP=@CP@
   6.101 + 
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/nagios/stuff/nagios-3.2.3-Makefiles.u	Wed Feb 02 01:16:56 2011 +0100
     7.3 @@ -0,0 +1,98 @@
     7.4 +--- nagios-3.2.1-ori/Makefile.in	Thu Dec 31 11:12:08 2009
     7.5 ++++ nagios-3.2.1/Makefile.in	Sun Jun  6 11:03:32 2010
     7.6 +@@ -30,8 +30,8 @@
     7.7 + LIBEXECDIR=@libexecdir@
     7.8 + HTMLDIR=@datarootdir@
     7.9 + INSTALL=@INSTALL@
    7.10 +-INSTALL_OPTS=@INSTALL_OPTS@
    7.11 +-COMMAND_OPTS=@COMMAND_OPTS@
    7.12 ++INSTALL_OPTS=
    7.13 ++COMMAND_OPTS=
    7.14 + HTTPD_CONF=@HTTPD_CONF@
    7.15 + INIT_DIR=@init_dir@
    7.16 + INIT_OPTS=-o root -g root
    7.17 +@@ -264,6 +264,7 @@
    7.18 + 	@echo ""
    7.19 + 
    7.20 + install-webconf:
    7.21 ++	$(INSTALL) -m 755 -d $(DESTDIR)$(HTTPD_CONF)
    7.22 + 	$(INSTALL) -m 644 sample-config/httpd.conf $(DESTDIR)$(HTTPD_CONF)/nagios.conf
    7.23 + 
    7.24 + 	@echo ""
    7.25 +--- nagios-3.2.1-ori/base/Makefile.in	Wed Jun 17 05:57:21 2009
    7.26 ++++ nagios-3.2.1/base/Makefile.in	Sun Jun  6 11:03:32 2010
    7.27 +@@ -39,8 +39,8 @@
    7.28 + CGIDIR=@sbindir@
    7.29 + HTMLDIR=@datarootdir@
    7.30 + INSTALL=@INSTALL@
    7.31 +-INSTALL_OPTS=@INSTALL_OPTS@
    7.32 +-COMMAND_OPTS=@COMMAND_OPTS@
    7.33 ++INSTALL_OPTS=
    7.34 ++COMMAND_OPTS=
    7.35 + STRIP=@STRIP@
    7.36 + 
    7.37 + CGIURL=@cgiurl@
    7.38 +--- nagios-3.2.1-ori/cgi/Makefile.in	Wed Jun 17 05:57:21 2009
    7.39 ++++ nagios-3.2.1/cgi/Makefile.in	Sun Jun  6 11:03:32 2010
    7.40 +@@ -18,8 +18,8 @@
    7.41 + CGIDIR=@sbindir@
    7.42 + HTMLDIR=@datarootdir@
    7.43 + INSTALL=@INSTALL@
    7.44 +-INSTALL_OPTS=@INSTALL_OPTS@
    7.45 +-COMMAND_OPTS=@COMMAND_OPTS@
    7.46 ++INSTALL_OPTS=
    7.47 ++COMMAND_OPTS=
    7.48 + STRIP=@STRIP@
    7.49 + 
    7.50 + CGIEXTRAS=@CGIEXTRAS@
    7.51 +--- nagios-3.2.1-ori/common/Makefile.in	Wed Jun 17 05:57:21 2009
    7.52 ++++ nagios-3.2.1/common/Makefile.in	Sun Jun  6 11:03:32 2010
    7.53 +@@ -20,8 +20,8 @@
    7.54 + CGIDIR=@sbindir@
    7.55 + HTMLDIR=@datarootdir@
    7.56 + INSTALL=@INSTALL@
    7.57 +-INSTALL_OPTS=@INSTALL_OPTS@
    7.58 +-COMMAND_OPTS=@COMMAND_OPTS@
    7.59 ++INSTALL_OPTS=
    7.60 ++COMMAND_OPTS=
    7.61 + 
    7.62 + CP=@CP@
    7.63 + 
    7.64 +--- nagios-3.2.1-ori/contrib/Makefile.in	Mon May 19 20:01:58 2008
    7.65 ++++ nagios-3.2.1/contrib/Makefile.in	Sun Jun  6 10:43:34 2010
    7.66 +@@ -15,7 +15,7 @@
    7.67 + # Generated automatically from configure script
    7.68 + SNPRINTF_O=@SNPRINTF_O@
    7.69 + INSTALL=@INSTALL@
    7.70 +-INSTALL_OPTS=@INSTALL_OPTS@
    7.71 ++INSTALL_OPTS=
    7.72 + 
    7.73 + 
    7.74 + prefix=@prefix@
    7.75 +--- nagios-3.2.1-ori/html/Makefile.in	Wed Jul  8 00:34:51 2009
    7.76 ++++ nagios-3.2.1/html/Makefile.in	Sun Jun  6 10:59:50 2010
    7.77 +@@ -10,8 +10,8 @@
    7.78 + CGIDIR=@sbindir@
    7.79 + HTMLDIR=@datadir@
    7.80 + INSTALL=@INSTALL@
    7.81 +-INSTALL_OPTS=@INSTALL_OPTS@
    7.82 +-COMMAND_OPTS=@COMMAND_OPTS@
    7.83 ++INSTALL_OPTS=
    7.84 ++COMMAND_OPTS=
    7.85 + 
    7.86 + CP=@CP@
    7.87 + 
    7.88 +--- nagios-3.2.1-ori/module/Makefile.in	Sat Dec 15 00:02:24 2007
    7.89 ++++ nagios-3.2.1/module/Makefile.in	Sun Jun  6 11:03:32 2010
    7.90 +@@ -19,9 +19,8 @@
    7.91 + exec_prefix=@exec_prefix@
    7.92 + BINDIR=@bindir@
    7.93 + INSTALL=@INSTALL@
    7.94 +-INSTALL_OPTS=@INSTALL_OPTS@
    7.95 +-COMMAND_OPTS=@COMMAND_OPTS@
    7.96 +-STRIP=@STRIP@
    7.97 ++INSTALL_OPTS=
    7.98 ++COMMAND_OPTS=
    7.99 + 
   7.100 + CP=@CP@
   7.101 + 
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/nagios/stuff/nagios.desktop	Wed Feb 02 01:16:56 2011 +0100
     8.3 @@ -0,0 +1,9 @@
     8.4 +[Desktop Entry]
     8.5 +Encoding=UTF-8
     8.6 +Name=Nagios
     8.7 +Comment=Network Monitoring
     8.8 +Comment[fr]=Supervision Réseaux
     8.9 +Icon=nagios.png
    8.10 +Exec=firefox http://localhost/nagios
    8.11 +Type=Application
    8.12 +Categories=System;Application;
     9.1 Binary file nagios/stuff/nagios.png has changed