Author: oden
Date: Fri Feb  2 18:35:19 2007
New Revision: 115983

Added:
   packages/cooker/snmppd/current/SOURCES/check_snmpp.conf.README
   packages/cooker/snmppd/current/SOURCES/snmppd-0.5.2.tar.bz2   (contents, 
props changed)
   packages/cooker/snmppd/current/SOURCES/snmppd-compile_fix.diff
   packages/cooker/snmppd/current/SOURCES/snmppd.init
Removed:
   packages/cooker/snmppd/current/SOURCES/check_snmpp.conf.README.bz2
   packages/cooker/snmppd/current/SOURCES/snmppd-0.5.1.tar.bz2
   packages/cooker/snmppd/current/SOURCES/snmppd-0.5.1_v3.diff
   packages/cooker/snmppd/current/SOURCES/snmppd.init.bz2
Modified:
   packages/cooker/snmppd/current/SPECS/snmppd.spec

Log:
- 0.5.2
- drop P0, it's implemented upstream
- added P4 to make it compile
- bunzip sources


Added: packages/cooker/snmppd/current/SOURCES/check_snmpp.conf.README
==============================================================================
--- (empty file)
+++ packages/cooker/snmppd/current/SOURCES/check_snmpp.conf.README      Fri Feb 
 2 18:35:19 2007
@@ -0,0 +1,38 @@
+http://www.nagiosexchange.org/Wiki_Home.wiki.0.html?&tx_drwiki_pi1[keyword]=HP%20Switches
+
+1 Julian Hein's Configuration
+
+Use the check_snmp plugin at these OID's:
+
+ Hpmemoryfree = .1.3.6.1.4.1.11.2.14.11.5.1.1.2.1.1.1.6.1 
+ Cpu = .1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0 
+ Fan = .1.3.6.1.4.1.11.2.14.11.1.2.6.1.4.1 
+ Power = .1.3.6.1.4.1.11.2.14.11.1.2.6.1.4.2 
+ Temprature = .1.3.6.1.4.1.11.2.14.11.1.2.6.1.4.4 
+
+My check_commands are like this:
+
+ define command{ 
+  command_name check_hpmemoryfree 
+  command_line $USER1$/check_snmpp -H $HOSTADDRESS$ -C $ARG1$ -o 
.1.3.6.1.4.1.11.2.14.11.5.1.1.2.1.1.1.6.1 -t 5 -w $ARG2$ -c $ARG3$ -u bytes -l 
free 
+ } 
+  
+ define command{ 
+  command_name hpsw_cpu 
+  command_line $USER1$/check_snmpp -H $HOSTADDRESS$ -o 
.1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0 -t 5 -w '95:90' -c '100:95' -C $ARG1$ -u % 
-l "5min cpu" 
+ } 
+  
+ define command{ 
+  command_name check_hpfan 
+  command_line $USER1$/check_snmpp -H 192.168.33.10 -C chero -o 
.1.3.6.1.4.1.11.2.14.11.1.2.6.1.4.1 -w 4 -c 3:5 -l 'Fan status' 
+ } 
+  
+ define command{ 
+  command_name check_hppower 
+  command_line $USER1$/check_snmpp -H 192.168.33.10 -C chero -o 
.1.3.6.1.4.1.11.2.14.11.1.2.6.1.4.2 -w 4 -c 3:5 -l 'Power Supply status' 
+ } 
+  
+ define command{ 
+  command_name check_hptemp 
+  command_line $USER1$/check_snmpp -H 192.168.33.10 -C chero -o 
.1.3.6.1.4.1.11.2.14.11.1.2.6.1.4.4 -w 4 -c 3:5 -l 'Temprature status' 
+ } 

Added: packages/cooker/snmppd/current/SOURCES/snmppd-0.5.2.tar.bz2
==============================================================================
Binary file. No diff available.

Added: packages/cooker/snmppd/current/SOURCES/snmppd-compile_fix.diff
==============================================================================
--- (empty file)
+++ packages/cooker/snmppd/current/SOURCES/snmppd-compile_fix.diff      Fri Feb 
 2 18:35:19 2007
@@ -0,0 +1,39 @@
+--- configure.in       2006-05-10 16:59:41.000000000 +0200
++++ configure.in.oden  2007-02-02 18:18:03.000000000 +0100
+@@ -13,36 +13,6 @@
+ AC_PROG_LN_S
+ AC_PROG_RANLIB
+ 
+-
+-dnl Compilation Setup
+-AC_MSG_CHECKING([whether to enable -Wall])
+-AC_ARG_ENABLE(warnings,
+-  [  --enable-warnings       Enable -Wall if using gcc.],
+-  [ if test -n "$GCC"; then
+-    AC_MSG_RESULT(adding -Wall to CFLAGS.)
+-    PROG_CFLAGS="$PROG_CFLAGS -Wall"
+-    fi],AC_MSG_RESULT(no))
+-
+-AC_ARG_ENABLE(more-warnings,
+-[  --enable-more-warnings  Enable maximum compiler warnings [default=yes]],
+-set_more_warnings="$enableval", set_more_warnings=yes)
+-
+-if test "$GCC" = "yes" -a "$set_more_warnings" = "yes"; then
+-        PROG_CFLAGS="$PROG_CFLAGS \
+--Wall -Wno-uninitialized \
+--Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
+--Wnested-externs -Wpointer-arith \
+--Wno-sign-compare -Werror"
+-fi
+-
+-AC_MSG_CHECKING([whether to enable debug])
+-AC_ARG_ENABLE(debug,
+-  [  --enable-debug       Enable debug],
+-  [  if test -n "$GCC"; then
+-    AC_MSG_RESULT(adding -DDEBUG -g -ggdb to CFLAGS.)
+-    PROG_CFLAGS="$PROG_CFLAGS -DDEBUG -g -ggdb"
+-    fi], [AC_MSG_RESULT(no) PROG_CFLAGS="$PROG_CFLAGS -O2" LDFLAGS="$LDFLAGS 
-s"])
+-
+ AC_ARG_WITH(snmp,
+    [  --with-snmp=PATH        SNMP path [default=/usr/local]],,)
+ 

Added: packages/cooker/snmppd/current/SOURCES/snmppd.init
==============================================================================
--- (empty file)
+++ packages/cooker/snmppd/current/SOURCES/snmppd.init  Fri Feb  2 18:35:19 2007
@@ -0,0 +1,54 @@
+#!/bin/sh
+#
+# snmppd       This shell script takes care of starting and stopping
+# the snmp proxy daemon
+#
+# chkconfig: 345 80 30
+# description: snmppd is a deamon which loads MIBs upon startup, \
+# listens on TCP socket for SNMP GET requests, polls specified host \
+# and returns value to caller process.
+#
+# processname: snmppd
+# pidfile: /var/run/snmppd/snmppd.pid
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+# Check that networking is up.
+[ "${NETWORKING}" = "no" ] && exit 0
+
+# See how we were called.
+case "$1" in
+  start)
+       # Start daemons.
+       echo -n "Starting snmppd: "
+       daemon snmppd
+       echo
+       touch /var/lock/subsys/snmppd
+       ;;
+  stop)
+       # Stop daemons.
+       echo -n "Shutting down snmppd: "
+       killproc snmppd
+       echo
+       rm -f /var/lock/subsys/snmppd
+       ;;
+  status)
+       status snmppd
+       ;;
+  restart|reload)
+       $0 stop
+       $0 start
+       ;;
+  condrestart)
+       [ -f /var/lock/subsys/snmppd ] && restart
+       ;;
+  *)
+       echo "Usage: snmppd {start|stop|status|restart|condrestart|reload}"
+       exit 1
+esac
+
+exit 0

Modified: packages/cooker/snmppd/current/SPECS/snmppd.spec
==============================================================================
--- packages/cooker/snmppd/current/SPECS/snmppd.spec    (original)
+++ packages/cooker/snmppd/current/SPECS/snmppd.spec    Fri Feb  2 18:35:19 2007
@@ -1,18 +1,18 @@
 Summary:       SNMP proxy daemon
 Name:          snmppd
-Version:       0.5.1
-Release:       %mkrel 2
+Version:       0.5.2
+Release:       %mkrel 1
 License:       GPL
 Group:         System/Servers
 URL:           http://bubble.nsys.by/
 Source0:       http://bubble.nsys.by/projects/snmppd/%{name}-%{version}.tar.bz2
-Source1:       %{name}.init.bz2
+Source1:       %{name}.init
 Source2:       http://bubble.nsys.by/projects/libsplit/libsplit-0.2.tar.bz2
-Source3:       check_snmpp.conf.README.bz2
-Patch0:                snmppd-0.5.1_v3.diff
+Source3:       check_snmpp.conf.README
 Patch1:                snmppd-0.5.1-pidfile_location_fix.diff
 Patch2:                snmppd-0.5.1-config_file_location_fix.diff
 Patch3:                snmppd-0.5.1-antibork_1.diff
+Patch4:                snmppd-compile_fix.diff
 BuildRequires: autoconf2.5
 BuildRequires: automake1.7
 BuildRequires: net-snmp-devel
@@ -50,13 +50,13 @@
 %prep
 
 %setup -q -a2
-%patch0 -p1
 %patch1 -p0
 %patch2 -p0
 %patch3 -p0
+%patch4 -p0
 
-bzcat %{SOURCE1} > snmppd.init
-bzcat %{SOURCE3} > check_snmpp.conf.README
+cp %{SOURCE1} snmppd.init
+cp %{SOURCE3} check_snmpp.conf.README
 
 # lib64 fix
 perl -pi -e "s|/lib\b|/%{_lib}|g" configure*
@@ -69,15 +69,17 @@
 %make C_FLAGS="%{optflags} -fPIC" libsplit.a
 popd
 
-export PROG_CFLAGS="%{optflags} -I`pwd`/libsplit-0.2 -L`pwd`/libsplit-0.2"
+#export PROG_CFLAGS="%{optflags} -I`pwd`/libsplit-0.2 -L`pwd`/libsplit-0.2"
+export CFLAGS="%{optflags} -I`pwd`/libsplit-0.2 -L`pwd`/libsplit-0.2"
 export SPLITTERLIBS="`pwd`/libsplit-0.2/libsplit.a"
 
 %configure2_5x \
-    --disable-more-warnings \
     --libdir=%{_libdir}/nagios/plugins \
     --libexecdir=%{_libdir}/nagios/plugins
 
-%make
+make \
+    CFLAGS="%{optflags} -I`pwd`/libsplit-0.2 -L`pwd`/libsplit-0.2" \
+    SPLITTERLIBS="`pwd`/libsplit-0.2/libsplit.a"
 
 %install
 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

Reply via email to