--- arrayprobe-2.0.orig/debian/changelog
+++ arrayprobe-2.0/debian/changelog
@@ -0,0 +1,41 @@
+arrayprobe (2.0-3.1) unstable; urgency=high
+
+ * Non-maintainer upload with maintainer's consent.
+ * Avoid leaking memory by allocating a structure multiple times.
+ * Allocate arrays of the correct size to avoid crashes due to malloc
+ errors. (Closes: #610248)
+
+ -- Adam D. Barratt <adam@adam-barratt.org.uk> Wed, 19 Jan 2011 19:36:34 +0000
+
+arrayprobe (2.0-3) unstable; urgency=low
+
+ * probe.c: add a newline to the end of the help output. closes: #387571
+ * apply fix to debian/watch, thanks Raphael Geissert. closes: #449857
+ * have cronjob check for existance of devices before scanning.
+ closes: #396347
+ * change cronjob to check all controllers. closes: #385107
+ * update to policy 3.8.0
+
+ -- Matt Taggart <taggart@debian.org> Sun, 27 Jul 2008 00:35:50 -0700
+
+arrayprobe (2.0-2) unstable; urgency=medium
+
+ * Fix manpage typo, thanks intrigeri. closes: #361041
+ * Fix linux-source build-dep, buildd hints are no longer needed.
+ closes: #359254, #359779
+ * Add build-deps on autoconf and automake1.9. closes: #358340
+
+ -- Matt Taggart <taggart@debian.org> Fri, 21 Apr 2006 02:01:15 -0700
+
+arrayprobe (2.0-1) unstable; urgency=low
+
+ * Initial release
+ * dh_make -c gpl --single
+ * add ability to specify kernel source dir (just like cpqarrayd and
+ array-util)
+ * we hack configure.ac, so add an autogen.sh and use it
+ * created cron.daily
+ * created arrayprobe.1
+
+ -- Matt Taggart <taggart@debian.org> Wed, 22 Feb 2006 16:05:30 -0800
+
--- arrayprobe-2.0.orig/debian/watch
+++ arrayprobe-2.0/debian/watch
@@ -0,0 +1,21 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# See uscan(1) for format
+
+# Compulsory line, this is a version 3 file
+version=3
+
+# Uncomment to examine a Webpage
+# <Webpage URL> <string match>
+#http://www.example.com/downloads.php arrayprobe-(.*)\.tar\.gz
+
+# Uncomment to examine a Webserver directory
+#http://www.example.com/pub/arrayprobe-(.*)\.tar\.gz
+http://www.strocamp.net/opensource/compaq/downloads/arrayprobe-(.*).tar.gz
+
+# Uncommment to examine a FTP server
+#ftp://ftp.example.com/pub/arrayprobe-(.*)\.tar\.gz debian uupdate
+
+# Uncomment to find new files on sourceforge, for debscripts >= 2.9
+# http://sf.net/arrayprobe/arrayprobe-(.*)\.tar\.gz
--- arrayprobe-2.0.orig/debian/arrayprobe.1
+++ arrayprobe-2.0/debian/arrayprobe.1
@@ -0,0 +1,48 @@
+.TH "arrayprobe" "1" "2.0" "Hugo Trippaers" "Compaq Array Contoller Status Tool"
+.SH "NAME"
+.LP
+arrayprobe \- command line HP (Compaq) SmartArray status checker
+.SH "SYNTAX"
+.LP
+arrayprobe [\fI\-f\fP device] [\fI\-r\fP] [\fI\-o\fP] [\fI\-i\fP]
+
+.SH "DESCRIPTION"
+.LP
+This program is capable of checking the status HP (Compaq) array controllers (devices using the Linux cciss and ida drivers). By default it runs in a non verbose mode that can be used as a nagios check or periodic cron job.
+.SH "OPTIONS"
+.LP
+.TP
+\fB\-f\fR <device>
+Device to open.
+.TP
+\fB\-r\fR
+Report (verbose) mode.
+.TP
+\fB\-o\fR
+Only read new events (since last run, CCISS devices only).
+.TP
+\fB\-i\fR <host>
+Force ida ioctls. (use with -f if the device is supported by the ida driver)
+
+.SH "STATUS"
+.LP
+The output is a single line of information about the worst state found. (If one logical drive is recovering and a second drive is in interim recovery mode. It will only report the failing drive.) The exitcodes can be used to determine the severity.
+The following exit values are returned:
+.LP
+.TP
+\fB0\fR
+Normal.
+.TP
+\fB1\fR
+Warning.
+.TP
+\fB2\fR
+Critical.
+
+.SH "BUGS"
+.LP
+.TP
+None known.
+.SH "AUTHORS"
+.LP
+Hugo Trippaers <spark@knoware.nl>
--- arrayprobe-2.0.orig/debian/copyright
+++ arrayprobe-2.0/debian/copyright
@@ -0,0 +1,27 @@
+This package was debianized by Matt Taggart <taggart@debian.org> on
+Wed, 22 Feb 2006 16:05:30 -0800.
+
+It was downloaded from http://www.strocamp.net/opensource/arrayprobe-latest.tgz
+
+Copyright Holder: Copyright (C) 2003 Hugo Trippaers <spark@knoware.nl>
+
+License:
+
+ This package is free software; you can 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 of the License, or
+ (at your option) any later version.
+
+ This package 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
+ along with this package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
--- arrayprobe-2.0.orig/debian/rules
+++ arrayprobe-2.0/debian/rules
@@ -0,0 +1,128 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+CFLAGS = -Wall -g
+
+# find our linux source version
+# we can't just use the headers because the build actually needs
+# stuff from the linux tree :( thus the build-dep on linux-source
+# this is sucky way to do it but we don't have the shell's nice % and
+# here and I can't be bothered to do it "the make way". Patches welcome.
+KSRC=$(shell ls -d /usr/src/linux-source-2.6*.tar.bz2 | tail -n1 |awk -F/usr/src/ '{print $$2}' |awk -F.tar.bz2 '{print $$1}')
+# If you need to build on 2.4 use this line and the one further down instead
+#KSRC=$(shell ls -d /usr/src/linux-source-2.4*.tar.bz2 | tail -n1 |awk -F/usr/src/ '{print $$2}' |awk -F.tar.bz2 '{print $$1}')
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+unpack: unpack-stamp
+unpack-stamp:
+ if [ -e debian/linux ]; then rm -rf debian/linux; fi
+ mkdir debian/linux
+ cd debian/linux && tar jxvf /usr/src/$(KSRC).tar.bz2 && cd $(KSRC) && $(MAKE) include/asm
+ # If you need to build on 2.4 use this line and the one further up
+ # instead
+ #cd debian/linux && tar jxvf /usr/src/$(KSRC).tar.bz2 && cd $(KSRC) && $(MAKE) symlinks
+ touch unpack-stamp
+
+config.status: configure unpack
+ dh_testdir
+ . ./autogen.sh
+ # Add here commands to configure the package.
+ CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --with-kernel=$(CURDIR)/debian/linux/$(KSRC) --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
+
+
+build: build-stamp
+
+build-stamp: config.status
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+ #docbook-to-man debian/arrayprobe.sgml > arrayprobe.1
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp unpack-stamp
+
+ # Add here commands to clean up after the build process.
+ rm -rf debian/linux
+ rm -f mkinstalldirs
+ [ ! -f Makefile ] || $(MAKE) distclean
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+ cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+ cp -f /usr/share/misc/config.guess config.guess
+endif
+
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/arrayprobe.
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/arrayprobe
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs ChangeLog
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_installinit
+ dh_installcron
+# dh_installinfo
+ dh_installman debian/arrayprobe.1
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_python
+# dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: unpack build clean binary-indep binary-arch binary install
--- arrayprobe-2.0.orig/debian/control
+++ arrayprobe-2.0/debian/control
@@ -0,0 +1,18 @@
+Source: arrayprobe
+Section: admin
+Priority: extra
+Maintainer: Matt Taggart <taggart@debian.org>
+Build-Depends: debhelper (>= 4.0.0), autotools-dev, automake1.9, autoconf, linux-source-2.6
+Standards-Version: 3.8.0
+
+Package: arrayprobe
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: command line HP (Compaq) SmartArray status checker
+ By default it runs in a non verbose mode that can be used as a nagios
+ check or periodic cron job. The output is a single line of information
+ about the worst state found. (If one logical drive is recovering and a
+ second drive is in interim recovery mode. It will only report the
+ failing drive.) The exitcodes can be used to determine the severity.
+ Critical = 2; Warning = 1; Normal = 0
+
--- arrayprobe-2.0.orig/debian/docs
+++ arrayprobe-2.0/debian/docs
@@ -0,0 +1 @@
+README
--- arrayprobe-2.0.orig/debian/arrayprobe.cron.daily
+++ arrayprobe-2.0/debian/arrayprobe.cron.daily
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+test -x /usr/bin/arrayprobe || exit 0
+
+STATUS=0
+
+if [ -d /proc/driver/cciss ]; then
+ for id in `grep -h cciss/ /proc/driver/cciss/cciss* |awk -F: '{print $1}'`; do
+ OUTPUT=`/usr/bin/arrayprobe -f /dev/$id`
+ if [ $? -ne 0 ]
+ then
+ echo $OUTPUT
+ STATUS=1
+ fi
+ done
+fi
+
+if [ -d /proc/driver/ida ]; then
+ for id in `grep -h ida/ /proc/driver/ida/ida* |awk -F: '{print $1}'`; do
+ OUTPUT=`/usr/bin/arrayprobe -f /dev/$id`
+ if [ $? -ne 0 ]
+ then
+ echo $OUTPUT
+ STATUS=1
+ fi
+ done
+fi
+
+exit $STATUS
--- arrayprobe-2.0.orig/debian/compat
+++ arrayprobe-2.0/debian/compat
@@ -0,0 +1 @@
+4