rpms/cpqarrayd/EL-5 cpqarrayd-2.3.no_ida.patch, NONE, 1.1 cpqarrayd-2.3.sysVinit.patch, NONE, 1.1 cpqarrayd.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

David Juran (djuran) fedora-extras-commits at redhat.com
Fri Jul 18 10:34:11 UTC 2008


Author: djuran

Update of /cvs/pkgs/rpms/cpqarrayd/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30612/EL-5

Modified Files:
	.cvsignore sources 
Added Files:
	cpqarrayd-2.3.no_ida.patch cpqarrayd-2.3.sysVinit.patch 
	cpqarrayd.spec import.log 
Log Message:
Initial import


cpqarrayd-2.3.no_ida.patch:

--- NEW FILE cpqarrayd-2.3.no_ida.patch ---
diff -up cpqarrayd-2.3/status.c.no_ida cpqarrayd-2.3/status.c
--- cpqarrayd-2.3/status.c.no_ida	2007-12-03 19:06:22.000000000 +0200
+++ cpqarrayd-2.3/status.c	2008-07-18 11:43:59.000000000 +0300
@@ -33,9 +33,13 @@
 #endif
 
 #include <sys/ioctl.h>
+
+#ifdef HAVE_IDA
 #include <ida_ioctl.h>
 #include <ida_cmd.h>
 #include <cpqarray.h>
+#endif
+
 #include <syslog.h>
 
 #include "cpqarrayd.h"
@@ -45,7 +49,8 @@
 #include "cciss_structs.h"
 #include "cciss_functions.h"
 
-int status_check (struct opts opts) 
+#ifdef HAVE_IDA
+int status_check (struct opts opts)
 {
   
   int devicefd;
@@ -183,6 +188,7 @@ int status_check (struct opts opts) 
   return 1;
  
 }
+#endif
 
 int cciss_status_check (struct opts opts) 
 {
@@ -190,7 +196,6 @@ int cciss_status_check (struct opts opts
   int devicefd;
   int ctrl_cntr, result;
   int logd_cntr;
-  ida_ioctl_t io, io2;
   int status, nr_blks, blks_tr, trap_stat;
   float pvalue;
   char statusmsg[1024];
diff -up cpqarrayd-2.3/discover.c.no_ida cpqarrayd-2.3/discover.c
--- cpqarrayd-2.3/discover.c.no_ida	2007-12-03 19:06:22.000000000 +0200
+++ cpqarrayd-2.3/discover.c	2008-07-18 11:49:23.000000000 +0300
@@ -33,12 +33,14 @@
   #include <linux/compiler.h>
 #endif
 
+#ifdef WITH_IDA
 #if defined(__linux__)
   #include <ida_ioctl.h>
   #include <ida_ioctl.h>
   #include <ida_cmd.h>
   #include <cpqarray.h>
 #endif
+#endif
 
 #if defined(__freebsd__)
   #include <idavar.h>
@@ -52,8 +54,12 @@
 
 
 int discover_controllers (struct opts);
+
+#ifdef WITH_IDA
 int interrogate_controller (struct opts, const char *);
 int interrogate_logical(struct opts, int, int);
+#endif
+
 void boardid2str (unsigned long , char *);
 
 /* Added devfs devices 
@@ -84,6 +90,7 @@ discover_controllers (struct opts opts)
   int cntr;
   int foundone = 0;
 
+#ifdef WITH_IDA
   for (cntr = 0; cntr < 8; cntr++)
     {
       /* does this device exist ? */
@@ -104,6 +111,8 @@ discover_controllers (struct opts opts)
 	  perror ("DEBUG: reason");
 	}
     }
+#endif
+
   for (cntr = 0; cntr < 16; cntr++)
     {
       /* does this device exist ? */
@@ -127,6 +136,7 @@ discover_controllers (struct opts opts)
    return foundone;
 }
 
+#ifdef WITH_IDA
 int
 interrogate_controller (struct opts opts, const char *devicefile)
 {
@@ -227,6 +237,7 @@ interrogate_logical (struct opts opts, i
 
   return 1;
 }
+#endif
 
 void
 boardid2str (unsigned long board_id, char *name)
diff -up cpqarrayd-2.3/configure.ac.no_ida cpqarrayd-2.3/configure.ac
--- cpqarrayd-2.3/configure.ac.no_ida	2005-12-16 13:17:44.000000000 +0200
+++ cpqarrayd-2.3/configure.ac	2008-07-18 11:41:27.000000000 +0300
@@ -16,35 +16,35 @@ AC_PROG_MAKE_SET
 AC_HEADER_STDC
 AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h syslog.h unistd.h])
 
-dnl Check for pathed kernel sources with ida_ioctl.h
-AC_MSG_CHECKING(for kernel sources)
-found_kernel_dir=""
-for kernel_dir in /usr/src/linux /usr/src/linux-2.4
-do
-  if test -d $kernel_dir ; then
-    CFLAGS="$CFLAGS -I$kernel_dir/include -I$kernel_dir/drivers/block"
-    CPPFLAGS="$CPPFLAGS -I$kernel_dir/include -I$kernel_dir/drivers/block"
-    found_kernel_dir="$kernel_dir"
-  fi
-done
-
-if test "$found_kernel_dir" != "" ; then
-  AC_MSG_RESULT(found $found_kernel_dir )
-else
-  AC_MSG_ERROR(Kernel sources not found)
-fi
+dnl dnl Check for pathed kernel sources with ida_ioctl.h
+dnl AC_MSG_CHECKING(for kernel sources)
+dnl found_kernel_dir=""
+dnl for kernel_dir in /usr/src/linux /usr/src/linux-2.4
+dnl do
+dnl   if test -d $kernel_dir ; then
+dnl     CFLAGS="$CFLAGS -I$kernel_dir/include -I$kernel_dir/drivers/block"
+dnl     CPPFLAGS="$CPPFLAGS -I$kernel_dir/include -I$kernel_dir/drivers/block"
+dnl     found_kernel_dir="$kernel_dir"
+dnl   fi
+dnl done
+
+dnl if test "$found_kernel_dir" != "" ; then
+dnl   AC_MSG_RESULT(found $found_kernel_dir )
+dnl else
+dnl   AC_MSG_ERROR(Kernel sources not found)
+dnl fi
 
 dnl Check for compile.h (2.6.x kernels only?
 AC_CHECK_HEADERS(linux/compiler.h)
                                                                        
-dnl Check Headers
-AC_CHECK_HEADERS(ida_ioctl.h ida_cmd.h cpqarray.h,, 
-  AC_MSG_ERROR(You need to have the SmartArray driver in the kernel.))
-
-dnl Check version of SmartArray driver
-AC_MSG_CHECKING(SmartArray driver version)
-AC_EGREP_HEADER(blk_cnt, ida_ioctl.h,AC_MSG_RESULT(ok), 
-  AC_MSG_ERROR(You need to have the SmartArray driver version 1.0.1 or higher installed.))
+dnl dnl Check Headers
+dnl AC_CHECK_HEADERS(ida_ioctl.h ida_cmd.h cpqarray.h,, 
+dnl   AC_MSG_ERROR(You need to have the SmartArray driver in the kernel.))
+
+dnl dnl Check version of SmartArray driver
+dnl AC_MSG_CHECKING(SmartArray driver version)
+dnl AC_EGREP_HEADER(blk_cnt, ida_ioctl.h,AC_MSG_RESULT(ok), 
+dnl   AC_MSG_ERROR(You need to have the SmartArray driver version 1.0.1 or higher installed.))
 
 dnl Check for CCISS header file
 AC_CHECK_HEADERS(linux/cciss_ioctl.h,,
--- cpqarrayd-2.3/cpqarrayd.c.no_ida	2007-12-03 19:06:22.000000000 +0200
+++ cpqarrayd-2.3/cpqarrayd.c	2008-07-18 13:02:17.000000000 +0300
@@ -35,9 +35,11 @@
   #include <linux/compiler.h>
 #endif
 
+#ifdef WITH_IDA
 #if defined(__linux__)
   #include <ida_ioctl.h>
 #endif
+#endif
 
 #if defined(__freebsd__)
   #include <idavar.h>
@@ -249,7 +251,10 @@
   syslog(LOG_INFO, "Logging Enabled...");
   
   while (keeprunning) {
+
+#ifdef WITH_IDA
     status_check(opts);
+#endif
     cciss_status_check(opts);
     if (keeprunning) { sleep(30); }
   }

cpqarrayd-2.3.sysVinit.patch:

--- NEW FILE cpqarrayd-2.3.sysVinit.patch ---
diff -up cpqarrayd-2.3/scripts/cpqarrayd.orig cpqarrayd-2.3/scripts/cpqarrayd
--- cpqarrayd-2.3/scripts/cpqarrayd.orig	2008-07-09 17:55:59.000000000 +0300
+++ cpqarrayd-2.3/scripts/cpqarrayd	2008-07-14 16:43:49.000000000 +0300
@@ -2,7 +2,7 @@
 #
 # cpqarrayd    Start/Stop Compaq Array monitor
 #
-# chkconfig: 345 15 90
+# chkconfig: - 51 90
 # description: The cpqarrayd monitors the status of Compaq Raid Arrays, \
 #              and reports via syslog or traps
 # processname: cpqarrayd
@@ -23,8 +23,9 @@ RETVAL=0
 case "$1" in
   start)
         echo -n "Starting cpqarrayd: "
-        daemon /usr/sbin/cpqarrayd $CPQ_PARAMS
-        RETVAL=$?
+#        daemon /usr/sbin/cpqarrayd $CPQ_PARAMS |grep -v ^DEBUG:
+        { daemon /usr/sbin/cpqarrayd $CPQ_PARAMS 
+        RETVAL=$?; } |grep -v ^DEBUG:
         echo
         [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cpqarrayd
         ;;
@@ -39,13 +40,22 @@ case "$1" in
         status cpqarrayd
         RETVAL=$?
         ;;
-  restart|reload)
+  restart|force-reload)
         $0 stop
         $0 start
         RETVAL=$?
         ;;
-  *)
-        echo "Usage: cpqarrayd {start|stop|status|restart|reload}"
+    reload)
+	exit 3
+	;;
+  condrestart|try-restart)
+	if status cpqarrayd > /dev/null; then
+ 	    $0 stop
+ 	    $0 start
+	fi
+	;;
+    *)
+        echo "Usage: cpqarrayd {start|stop|status|restart|force-reolad|reload|cond-restart|try-restart}"
         exit 1
 esac
 


--- NEW FILE cpqarrayd.spec ---
Name:           cpqarrayd
Version:        2.3        
Release:        5%{?dist}
Summary:        Cpqarrayd is a daemon to monitor HP (compaq) arraycontrollers
Group:          System Environment/Base
License:        GPLv2+
URL:            http://www.strocamp.net/opensource/cpqarrayd.php
Source0:        http://www.strocamp.net/opensource/compaq/downloads/cpqarrayd-2.3.tar.gz
Patch0:         cpqarrayd-2.3.no_ida.patch
Patch1:         cpqarrayd-2.3.sysVinit.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: autoconf, automake
BuildRequires: net-snmp-devel

Requires(post): chkconfig
Requires(postun): initscripts
Requires(preun): chkconfig
Requires(preun): initscripts

%description
Cpqarrayd is a daemon to monitor HP (compaq) arraycontrollers. It reports any 
status changes, like failing disks, to the syslog and optionally to a remote 
host using SNMP traps. Note that support for the old(?) IDA Arrays have been 
disabled in this package due to build issues and lack of testing hardware.

%prep
%setup -q
%patch0 -p1 -b .no_ida
%patch1 -p1 -b .sysVinit

%build
autoreconf -si
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p  $RPM_BUILD_ROOT/%{_initrddir}
cp scripts/cpqarrayd $RPM_BUILD_ROOT/%{_initrddir}
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
cp scripts/cpqarrayd.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cpqarrayd
                                              
%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/chkconfig --add cpqarrayd

%preun
if [ $1 = 0 ] ; then
    /sbin/service cpqarrayd stop >/dev/null 2>&1
    /sbin/chkconfig --del cpqarrayd
fi

%postun
if [ "$1" -ge "1" ] ; then
    /sbin/service cpqarrayd condrestart >/dev/null 2>&1 || :
fi

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog DEVEL NEWS README
%_sbindir/cpqarrayd
%config(noreplace) %_sysconfdir/sysconfig/cpqarrayd
%_initrddir/cpqarrayd
%doc %_mandir/man1/cpqarrayd*

%changelog
* Fri Jul 18 2008 David Juran <djuran at redhat.com> - 2.3-5
- More tagging sillyness

* Fri Jul 18 2008 David Juran <djuran at redhat.com> - 2.3-4
- Cleanup no-ida patch

* Thu Jul 17 2008  <djuran at redhat.com> - 2.3-3
- fix rpmlint warnings

* Mon Jul 14 2008  <djuran at redhat.com> - 2.3-2
- Make SysVinit script compliant with Fedora Packaging Guidelines

* Wed Jul  9 2008  <djuran at redhat.com> - 2.3-1
- Initial packaging



--- NEW FILE import.log ---
cpqarrayd-2_3-5_fc10:EL-5:cpqarrayd-2.3-5.fc10.src.rpm:1216377173


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/cpqarrayd/EL-5/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	17 Jul 2008 18:33:19 -0000	1.1
+++ .cvsignore	18 Jul 2008 10:33:26 -0000	1.2
@@ -0,0 +1 @@
+cpqarrayd-2.3.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/cpqarrayd/EL-5/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	17 Jul 2008 18:33:19 -0000	1.1
+++ sources	18 Jul 2008 10:33:26 -0000	1.2
@@ -0,0 +1 @@
+55421afe4817863efab45c59a9486a60  cpqarrayd-2.3.tar.gz




More information about the fedora-extras-commits mailing list