mirror of https://github.com/eLvErDe/hwraid.git
Update mpt-status packaging (based on buster's one + rewritten using explicit debhelper for old releases)
This commit is contained in:
parent
9c9aa47dc9
commit
56d9155d3c
|
@ -1,11 +1,62 @@
|
||||||
mpt-status (1.2.0-4.2.hwraid1) unstable; urgency=low
|
mpt-status (1.2.0-8+hwraid1) unstable; urgency=medium
|
||||||
|
|
||||||
* Non-maintainer upload.
|
* Use lsb-release to generate unique distribution tag in pkgs version.
|
||||||
* Based on debian's 1.2.0-4.2 release.
|
* Relax debhelper compat from 9 to 5 to support very old distributions.
|
||||||
* Relax debhelper bdep to allow sarge builds.
|
* Rewrite rules to use regular legacy debhelper.
|
||||||
* Allow pciutils-dev bdep as libpci-dev alternative.
|
* Re-add dependency on bsd-mail | mailx.
|
||||||
|
* Add pciutils-dev alternative to libpci-dev for old releases.
|
||||||
|
* Switch source/format to 1.0 and introduce dpatch for patch mgmt.
|
||||||
|
|
||||||
-- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Thu, 21 Aug 2008 16:09:53 +0200
|
-- Adam Cecile <acecile@le-vert.net> Wed, 03 Jul 2019 11:27:15 +0200
|
||||||
|
|
||||||
|
mpt-status (1.2.0-8) unstable; urgency=medium
|
||||||
|
|
||||||
|
* QA Upload.
|
||||||
|
* Set maintainer to Debian QA Group.
|
||||||
|
* Bump standards to 3.9.5 and compat to 9 (no changes needed).
|
||||||
|
* Build using hardening flags.
|
||||||
|
* Add a patch marking --debug as having a mandatory argument
|
||||||
|
(closes: #716283, #615638).
|
||||||
|
* mpt-status.init: check_mpt(): kill the sleep child process upon SIGTERM
|
||||||
|
(closes: #620186).
|
||||||
|
* mpt-status.init: implement status support (closes: #679070)
|
||||||
|
* mpt-status.init: try loading mptctl if /dev/mptctl is missing
|
||||||
|
(closes: #646863).
|
||||||
|
* mpt-status.init: add LSB description (lintian info).
|
||||||
|
|
||||||
|
-- Apollon Oikonomopoulos <apoikos@gmail.com> Tue, 17 Dec 2013 21:49:43 +0200
|
||||||
|
|
||||||
|
mpt-status (1.2.0-7) unstable; urgency=low
|
||||||
|
|
||||||
|
* Remove set -e stanza from init-script to not interrupt update of
|
||||||
|
Raid-Controller statusfile (Closes: #590691)
|
||||||
|
* Extend init script to suppress warnings if mpt-status is already
|
||||||
|
terminated (Closes: #586152)
|
||||||
|
* Bump Standards to 3.9.1.0
|
||||||
|
|
||||||
|
-- Stefan Bauer <stefan.bauer@cubewerk.de> Wed, 28 Jul 2010 19:46:56 +0200
|
||||||
|
|
||||||
|
mpt-status (1.2.0-6) unstable; urgency=low
|
||||||
|
|
||||||
|
* Switch to dpkg-source 3.0 (quilt) format
|
||||||
|
* Merge 2 patches
|
||||||
|
* Bump Standards to 3.9.0
|
||||||
|
* Daemon does not double-fork on startup (Closes: #500040)
|
||||||
|
|
||||||
|
-- Stefan Bauer <stefan.bauer@cubewerk.de> Wed, 30 Jun 2010 11:45:09 +0200
|
||||||
|
|
||||||
|
mpt-status (1.2.0-5) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Maintainer (Closes: #535798)
|
||||||
|
* Acknowledge NMU changes
|
||||||
|
* Bump Standards to 3.8.4
|
||||||
|
* Let package not depend on mailx anymore but offer it as Suggested
|
||||||
|
Idea taken from Andre Cruz (Closes: #540762)
|
||||||
|
* Adjust license information as package is distributed under GPL-2
|
||||||
|
* Fix lintian error and several warnings
|
||||||
|
* add watch-file
|
||||||
|
|
||||||
|
-- Stefan Bauer <stefan.bauer@cubewerk.de> Wed, 30 Jun 2010 11:44:50 +0200
|
||||||
|
|
||||||
mpt-status (1.2.0-4.2) unstable; urgency=low
|
mpt-status (1.2.0-4.2) unstable; urgency=low
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
4
|
5
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
Source: mpt-status
|
Source: mpt-status
|
||||||
Section: admin
|
Section: admin
|
||||||
Priority: extra
|
Priority: optional
|
||||||
Maintainer: Steffen Joeris <white@debian.org>
|
Maintainer: Debian QA Group <packages@qa.debian.org>
|
||||||
Build-Depends: cdbs, debhelper (>= 4), libpci-dev | pciutils-dev
|
Build-Depends: debhelper (>= 5), libpci-dev | pciutils-dev, lsb-release, dpatch
|
||||||
Standards-Version: 3.7.2
|
Standards-Version: 3.9.5
|
||||||
|
|
||||||
Package: mpt-status
|
Package: mpt-status
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base, daemon, mailx
|
Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base, daemon, bsd-mailx | mailx
|
||||||
Description: get RAID status out of mpt (and other) HW RAID controllers
|
Description: get RAID status out of mpt (and other) HW RAID controllers
|
||||||
The mpt-status software is a query tool to access the running
|
The mpt-status software is a query tool to access the running
|
||||||
configuration and status of LSI SCSI HBAs. mpt-status allows you to
|
configuration and status of LSI SCSI HBAs. mpt-status allows you to
|
||||||
|
|
|
@ -23,5 +23,5 @@ MERCHANDABILITY of FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
See the GNU General Public License for details.
|
See the GNU General Public License for details.
|
||||||
|
|
||||||
On Debian GNU/Linux systems, the complete text of the GNU General
|
On Debian GNU/Linux systems, the complete text of the GNU General
|
||||||
Public License can be found in `/usr/share/common-licenses/GPL'.
|
Public License can be found in `/usr/share/common-licenses/GPL-2'.
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#
|
#
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: mpt-statusd
|
# Provides: mpt-statusd
|
||||||
|
# Description: Fusion MPT RAID controller diagnostic tool
|
||||||
# Required-Start: $remote_fs $syslog
|
# Required-Start: $remote_fs $syslog
|
||||||
# Required-Stop: $remote_fs $syslog
|
# Required-Stop: $remote_fs $syslog
|
||||||
# Default-Start: 2 3 4 5
|
# Default-Start: 2 3 4 5
|
||||||
|
@ -12,8 +13,6 @@
|
||||||
# Short-Description: Check mpt-status values in the background.
|
# Short-Description: Check mpt-status values in the background.
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
DESC="mpt-status monitor"
|
DESC="mpt-status monitor"
|
||||||
NAME=mpt-statusd
|
NAME=mpt-statusd
|
||||||
|
@ -35,7 +34,7 @@ ID=0
|
||||||
test -x /usr/sbin/mpt-status || exit 0
|
test -x /usr/sbin/mpt-status || exit 0
|
||||||
|
|
||||||
. /lib/lsb/init-functions
|
. /lib/lsb/init-functions
|
||||||
. /etc/default/rcS
|
[ -e /etc/default/rcS ] && . /etc/default/rcS
|
||||||
|
|
||||||
if [ $RUN_DAEMON = "no" ] ; then
|
if [ $RUN_DAEMON = "no" ] ; then
|
||||||
log_begin_msg "mpt-statusd is disabled in /etc/default/mpt-statusd, not starting."
|
log_begin_msg "mpt-statusd is disabled in /etc/default/mpt-statusd, not starting."
|
||||||
|
@ -43,12 +42,6 @@ if [ $RUN_DAEMON = "no" ] ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [ -e "/proc/mpt/version" ] ; then
|
|
||||||
log_failure_msg "The mptctl module is missing. Please have a look at the README.Debian.gz."
|
|
||||||
log_end_msg 0
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
check_mpt() {
|
check_mpt() {
|
||||||
echo $$ > $PIDFILE.new && mv $PIDFILE.new $PIDFILE
|
echo $$ > $PIDFILE.new && mv $PIDFILE.new $PIDFILE
|
||||||
while true ; do
|
while true ; do
|
||||||
|
@ -109,7 +102,12 @@ EOF
|
||||||
echo "Report from $0 on $hostname"
|
echo "Report from $0 on $hostname"
|
||||||
) | mail -s "info: mpt raid status change on $hostname" $MAILTO
|
) | mail -s "info: mpt raid status change on $hostname" $MAILTO
|
||||||
fi
|
fi
|
||||||
sleep $PERIOD
|
sleep $PERIOD &
|
||||||
|
# Kill sleep if we're signaled to exit, otherwise we will stay defunct
|
||||||
|
# until sleep terminates.
|
||||||
|
trap "kill $!; exit" TERM
|
||||||
|
wait $!
|
||||||
|
trap - TERM
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +132,7 @@ d_start() {
|
||||||
elif check_daemon ; then
|
elif check_daemon ; then
|
||||||
# Use the daemon package to turn this script into a daemon
|
# Use the daemon package to turn this script into a daemon
|
||||||
start-stop-daemon --start --quiet --pidfile $PIDFILE \
|
start-stop-daemon --start --quiet --pidfile $PIDFILE \
|
||||||
--oknodo --exec /usr/bin/daemon $SCRIPTNAME check_mpt
|
--oknodo --exec /usr/bin/daemon /usr/bin/daemon $SCRIPTNAME check_mpt
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
log_progress_msg "Daemon is already running. Refusing to start another"
|
log_progress_msg "Daemon is already running. Refusing to start another"
|
||||||
|
@ -147,9 +145,8 @@ d_start() {
|
||||||
#
|
#
|
||||||
d_stop() {
|
d_stop() {
|
||||||
if [ -f $PIDFILE ] ; then
|
if [ -f $PIDFILE ] ; then
|
||||||
start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE
|
start-stop-daemon --stop --oknodo --quiet --pidfile $PIDFILE > /dev/null 2>&1
|
||||||
rm -f $PIDFILE
|
rm -f $PIDFILE
|
||||||
return 0
|
|
||||||
else
|
else
|
||||||
log_progress_msg "Daemon is already stopped."
|
log_progress_msg "Daemon is already stopped."
|
||||||
return 0
|
return 0
|
||||||
|
@ -171,7 +168,13 @@ d_stop_by_restart() {
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo -n ""
|
if ! [ -e "/dev/mptctl" ] ; then
|
||||||
|
modprobe -q mptctl 2>/dev/null
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
log_failure_msg "Starting $DESC: failed to load mptctl."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
log_begin_msg "Starting $DESC: $NAME"
|
log_begin_msg "Starting $DESC: $NAME"
|
||||||
d_start ; CODE=$?
|
d_start ; CODE=$?
|
||||||
log_end_msg $CODE
|
log_end_msg $CODE
|
||||||
|
@ -184,6 +187,10 @@ case "$1" in
|
||||||
check_mpt)
|
check_mpt)
|
||||||
check_mpt
|
check_mpt
|
||||||
;;
|
;;
|
||||||
|
status)
|
||||||
|
status_of_proc /usr/bin/daemon $NAME
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
restart|force-reload)
|
restart|force-reload)
|
||||||
log_begin_msg "Restarting $DESC: $NAME"
|
log_begin_msg "Restarting $DESC: $NAME"
|
||||||
d_stop_by_restart
|
d_stop_by_restart
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
mpt-status /usr/sbin/
|
20
packaging/debian/mpt-status/patches/10-include.patch → packaging/debian/mpt-status/patches/0001-include.headers.patch
Normal file → Executable file
20
packaging/debian/mpt-status/patches/10-include.patch → packaging/debian/mpt-status/patches/0001-include.headers.patch
Normal file → Executable file
|
@ -1,6 +1,18 @@
|
||||||
--- mpt-status.h.orig 2007-01-16 15:07:36.000000000 +0100
|
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||||
+++ mpt-status.h 2007-01-16 22:43:15.000000000 +0100
|
|
||||||
@@ -15,13 +15,13 @@
|
--- mpt-status-1.2.0.orig/mpt-status.h 2010-06-30 11:46:49.000000000 +0200
|
||||||
|
+++ mpt-status-1.2.0/mpt-status.h 2010-06-30 11:48:58.000000000 +0200
|
||||||
|
@@ -2,9 +2,6 @@
|
||||||
|
#define _MPT_STATUS_H
|
||||||
|
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
-#ifdef __linux__
|
||||||
|
-#include <linux/compiler.h>
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
#ifdef SANITIZED_KERNEL_HEADERS
|
||||||
|
#include "mpt-sanitized.h"
|
||||||
|
@@ -15,13 +12,13 @@
|
||||||
#ifndef __kernel
|
#ifndef __kernel
|
||||||
#define __kernel
|
#define __kernel
|
||||||
#endif
|
#endif
|
||||||
|
@ -11,7 +23,7 @@
|
||||||
-#include "lsi/mpi_cnfg.h"
|
-#include "lsi/mpi_cnfg.h"
|
||||||
-#include "lsi/mpi_raid.h"
|
-#include "lsi/mpi_raid.h"
|
||||||
-#include "mptctl.h"
|
-#include "mptctl.h"
|
||||||
+#include <pci/pci.h> // config.h and header.h from pciutils package
|
+#include <pci/pci.h> // config.h and header.h from pciutils package
|
||||||
+#include "debian/includes/mpi_type.h"
|
+#include "debian/includes/mpi_type.h"
|
||||||
+#include "debian/includes/mpi.h"
|
+#include "debian/includes/mpi.h"
|
||||||
+#include "debian/includes/mpi_ioc.h"
|
+#include "debian/includes/mpi_ioc.h"
|
|
@ -0,0 +1,3 @@
|
||||||
|
0001-include.headers.patch
|
||||||
|
fix_debug_crash.patch
|
||||||
|
use_dpkg-buildflags.patch
|
|
@ -1,13 +0,0 @@
|
||||||
--- mpt-status-1.2.0.orig/mpt-status.h
|
|
||||||
+++ mpt-status-1.2.0/mpt-status.h
|
|
||||||
@@ -2,9 +2,6 @@
|
|
||||||
#define _MPT_STATUS_H
|
|
||||||
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
-#ifdef __linux__
|
|
||||||
-#include <linux/compiler.h>
|
|
||||||
-#endif
|
|
||||||
|
|
||||||
#ifdef SANITIZED_KERNEL_HEADERS
|
|
||||||
#include "mpt-sanitized.h"
|
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||||
|
#
|
||||||
|
# DP: Fix segfault when invoked with --debug
|
||||||
|
# Author: Apollon Oikonomopoulos <apoikos@gmail.com>
|
||||||
|
# Last-Update: 2013-12-17
|
||||||
|
#
|
||||||
|
# The short form of -d is marked as requiring an argument, while the long option
|
||||||
|
# (--debug) was marked as taking an optional argument. Since the code really
|
||||||
|
# doesn't handle the optional argument, we change --debug to require an argument
|
||||||
|
# and update the help message accordingly.
|
||||||
|
|
||||||
|
--- a/mpt-status.c
|
||||||
|
+++ b/mpt-status.c
|
||||||
|
@@ -57,7 +57,7 @@
|
||||||
|
static const struct option long_options[] = {
|
||||||
|
{ "autoload", no_argument, &sel, ARG_M_A },
|
||||||
|
{ "controller", required_argument, NULL, 'u' },
|
||||||
|
- { "debug", optional_argument, NULL, 'd' },
|
||||||
|
+ { "debug", required_argument, NULL, 'd' },
|
||||||
|
{ "help", no_argument, NULL, 'h' },
|
||||||
|
{ "newstyle", no_argument, NULL, 'n' },
|
||||||
|
{ "probe_id", no_argument, NULL, 'p' },
|
||||||
|
@@ -74,7 +74,7 @@
|
||||||
|
"\n"
|
||||||
|
" --autoload This will try to automatically load the \n"
|
||||||
|
" mptctl kernel module\n"
|
||||||
|
- " -d, --debug [<int>] Enable debugging and set level optionally\n"
|
||||||
|
+ " -d, --debug <int> Enable debugging and set level\n"
|
||||||
|
" NOTE: This is not fully implemented yet\n"
|
||||||
|
" -h, --help Print this help information page\n"
|
||||||
|
" -n, --newstyle Use the new style output. This parameter was\n"
|
|
@ -0,0 +1,24 @@
|
||||||
|
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||||
|
#
|
||||||
|
# DP: Use hardened build flags
|
||||||
|
# Author: Apollon Oikonomopoulos <apoikos@gmail.com>
|
||||||
|
# Last-Update: 2013-12-17
|
||||||
|
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -3,12 +3,12 @@
|
||||||
|
KERNEL_PATH := /usr/src/linux
|
||||||
|
KERNEL_PATH_B := /lib/modules/`uname -r`/build
|
||||||
|
KERNEL_PATH_S := /lib/modules/`uname -r`/source
|
||||||
|
-CFLAGS := -Iincl -Wall -W -O2 \
|
||||||
|
+CFLAGS := $(shell dpkg-buildflags --get CFLAGS) \
|
||||||
|
-I${KERNEL_PATH}/drivers/message/fusion \
|
||||||
|
-I${KERNEL_PATH_B}/drivers/message/fusion \
|
||||||
|
-I${KERNEL_PATH_S}/drivers/message/fusion
|
||||||
|
-DFLAGS := #-DSANITIZED_KERNEL_HEADERS
|
||||||
|
-LDFLAGS :=
|
||||||
|
+DFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
|
||||||
|
+LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
|
||||||
|
DESTDIR :=
|
||||||
|
MANDIR := /usr/share/man
|
||||||
|
CC := gcc
|
|
@ -1,14 +1,61 @@
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
# Uncomment this to turn on verbose mode.
|
||||||
include /usr/share/cdbs/1/class/makefile.mk
|
#export DH_VERBOSE=1
|
||||||
include /usr/share/cdbs/1/rules/debhelper.mk
|
|
||||||
include /usr/share/cdbs/1/rules/simple-patchsys.mk
|
include /usr/share/dpatch/dpatch.make
|
||||||
|
|
||||||
DESTDIR = $(CURDIR)/debian/mpt-status
|
DESTDIR = $(CURDIR)/debian/mpt-status
|
||||||
DEB_MAKE_BUILD_TARGET := REDHAT=true
|
|
||||||
DEB_DH_INSTALLINIT_ARGS = --init-script=mpt-statusd
|
|
||||||
|
|
||||||
common-install-arch::
|
# Get version from changelog as well as lsb_release
|
||||||
install -D -m 755 mpt-status $(DESTDIR)/usr/sbin/mpt-status
|
# to compute unique build version (useful for repo mirroring systems doing file pooling)
|
||||||
|
PKG_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f2 -d' ')
|
||||||
|
DIST_NAME := $(shell lsb_release -si)
|
||||||
|
DIST_RELEASE := $(shell lsb_release -sc)
|
||||||
|
DIST_VERSION := $(shell lsb_release -sr)
|
||||||
|
PKG_VERSION_TAG := $(PKG_VERSION)+$(DIST_NAME).$(DIST_RELEASE).$(DIST_VERSION)
|
||||||
|
SUBSTVARS_BINARY_VERSION := -Vbinary:Version="$(PKG_VERSION_TAG)"
|
||||||
|
SUBSTVARS_SOURCE_VERSION := -Vsource:Version="$(PKG_VERSION_TAG)"
|
||||||
|
|
||||||
common-binary-post-install-arch::
|
|
||||||
cd $(DESTDIR)/usr/share/doc/mpt-status && mv Changelog changelog
|
build: build-arch build-indep
|
||||||
|
build-indep:
|
||||||
|
build-arch: build-stamp
|
||||||
|
build-stamp: patch-stamp
|
||||||
|
dh_testdir
|
||||||
|
$(MAKE)
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
clean: unpatch
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
dh_clean
|
||||||
|
rm -f build-stamp
|
||||||
|
rm -f mpt-status
|
||||||
|
|
||||||
|
install:
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
dh_clean -k
|
||||||
|
dh_installdirs
|
||||||
|
|
||||||
|
binary-indep: build install
|
||||||
|
binary-arch: build install
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
dh_install
|
||||||
|
dh_installchangelogs
|
||||||
|
dh_installdocs
|
||||||
|
mv -v $(DESTDIR)/usr/share/doc/mpt-status/Changelog $(DESTDIR)/usr/share/doc/mpt-status/changelog
|
||||||
|
dh_installinit --init-script=mpt-statusd
|
||||||
|
dh_link
|
||||||
|
dh_strip
|
||||||
|
dh_compress
|
||||||
|
dh_fixperms
|
||||||
|
dh_installdeb
|
||||||
|
dh_shlibdeps
|
||||||
|
dh_gencontrol -- -v"$(PKG_VERSION_TAG)" $(SUBSTVARS_BINARY_VERSION) $(SUBSTVARS_SOURCE_VERSION)
|
||||||
|
dh_md5sums
|
||||||
|
dh_builddeb
|
||||||
|
|
||||||
|
binary: binary-indep binary-arch
|
||||||
|
.PHONY: build clean binary-indep binary-arch binary install
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
1.0
|
|
@ -0,0 +1,2 @@
|
||||||
|
version=3
|
||||||
|
http://www.drugphish.ch/~ratz/mpt-status/mpt-status-([0-9.]+)\.tar\.gz debian uupdate
|
Loading…
Reference in New Issue