r60 - in multipath-tools/trunk: . debian debian/scripts libdevmapper libsysfs multipathd

Bastian Blank pkg-lvm-maintainers@lists.alioth.debian.org
Fri, 04 Mar 2005 15:14:47 +0100


Author: waldi
Date: Fri Mar  4 15:14:44 2005
New Revision: 60

Added:
   multipath-tools/trunk/debian/
   multipath-tools/trunk/debian/README.Debian
   multipath-tools/trunk/debian/changelog
   multipath-tools/trunk/debian/conffiles
   multipath-tools/trunk/debian/control
   multipath-tools/trunk/debian/copyright
   multipath-tools/trunk/debian/multipath-tools.config
   multipath-tools/trunk/debian/multipath-tools.dirs
   multipath-tools/trunk/debian/multipath-tools.init
   multipath-tools/trunk/debian/multipath-tools.postinst
   multipath-tools/trunk/debian/multipath-tools.preinst
   multipath-tools/trunk/debian/multipath-tools.substvars
   multipath-tools/trunk/debian/rules   (contents, props changed)
   multipath-tools/trunk/debian/scripts/
   multipath-tools/trunk/debian/scripts/vars
Modified:
   multipath-tools/trunk/Makefile
   multipath-tools/trunk/libdevmapper/Makefile
   multipath-tools/trunk/libsysfs/Makefile
   multipath-tools/trunk/multipathd/main.c
Log:
Add debian patch from 0.4.2.4-1.


Modified: multipath-tools/trunk/Makefile
==============================================================================
--- multipath-tools/trunk/Makefile	(original)
+++ multipath-tools/trunk/Makefile	Fri Mar  4 15:14:44 2005
@@ -39,7 +39,7 @@
 	@for dir in $(BUILDDIRS); do\
 	$(MAKE) -C $$dir BUILD=klibc clean || exit $?; \
 	done
-	$(MAKE) -C klibc spotless
+#	$(MAKE) -C klibc spotless
 
 recurse_install:
 	@for dir in $(INSTALLDIRS); do\

Added: multipath-tools/trunk/debian/README.Debian
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/README.Debian	Fri Mar  4 15:14:44 2005
@@ -0,0 +1,97 @@
+Dependencies :
+==============
+
+These libs have been dropped in the multipath tree :
+  
+o libdevmapper : comes with device-mapper-XXXX.tar.gz
+  See www.sistina.com
+o libsysfs : comes with sysutils or udev
+  See ftp.kernel.org/pub/linux/utils/kernel/hotplug/
+o klibc
+  See ftp.kernel.org/pub/linux/libs/klibc/
+
+External :
+
+o Linux kernel 2.6.0 with udm5 patchset (or greater)
+  http://people.sistina.com/~thornber/dm/ (deprecated)
+  ftp://sources.redhat.com/pub/dm/
+  
+How it works :
+==============
+
+Fill the all_paths array. Each path store this info :
+
+struct path {
+        char dev[FILE_NAME_SIZE];
+        char sg_dev[FILE_NAME_SIZE];
+        struct scsi_idlun scsi_id;
+        struct sg_id sg_id;
+        int state;
+        char wwid[WWID_SIZE];
+};
+
+scsi_id, sg_dev and sg_id are only really useful for 2.4 
+kernels, for which SG cmnds must go through sg devs.
+In 2.5+ we have the nice opportunity to send SG cmnds
+through SCSI bdevs.
+
+For 2.4 compat, we pivot on idlun tupple to map sg devs
+to SCSI bdevs.
+
+2.4 does not do device enumeration, so we must scan a
+defined number of sg devs and scsi bdevs. Good enough.
+In 2.5+, we rely on libsysfs (sysutils) to access to
+sysfs device enums.
+
+the wwid is retrieved by a switch fonction. Only White
+Listed HW can filled this field. For now every FC array 
+HW listed in kernel's devinfo.c is White Listed, assuming
+the WWID is stored is the SCSI-3 standard 0x83 EVPD page.
+
+When all_paths is filled, we coalesce the paths and store
+the result in mp array. Each mp is a struct like this :
+
+struct multipath {
+        char wwid[WWID_SIZE];
+        int npaths;
+        int pindex[MAX_MP_PATHS];
+};
+
+When mp is filled, the device maps are fed to the kernel
+through libdevmapper.
+
+The naming of the corresponding block device is handeld 
+by udev with the help of the devmap_name proggy. It is 
+called by the following rule in /etc/udev/udev.rules :
+KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", \
+NAME="%k", SYMLINK="%c"
+
+Notes :
+=======
+
+o On 2.4, make sure you have enough /dev/sg* nodes
+  (/dev/MAKEDEV if necessary). Same goes for /dev/sd*
+
+o path coalescing relies on a path unique id being found.
+  This unique id, lacking a standard method, is vendor
+  specific. A switch function (get_unique_id) is present
+  and an example function is provided for storageworks
+  arrays (get_evpd_wwid). Feel free to enrich
+  with hardware you have at hand :)
+
+o The kernel does NOT manage properly ghosts paths
+  with StorageWorks HW. Seems nobody cares after a load
+  of posts to linux-scsi.
+
+o 2.4.21 version of DM does not like even segment size.
+  if you enconter pbs with this, upgrade DM.
+
+Credits :
+=========
+
+o Heavy cut'n paste from sg_utils. Thanks goes to D. 
+  Gilbert.
+o Light cut'n paste from dmsetup. Thanks Joe Thornber.
+o Greg KH for the nice sysfs API.
+o The klibc guys (Starving Linux Artists :), espacially
+  for their nice Makefiles and specfile

Added: multipath-tools/trunk/debian/changelog
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/changelog	Fri Mar  4 15:14:44 2005
@@ -0,0 +1,63 @@
+multipath-tools (0.4.2.4-1) unstable; urgency=low
+
+  * New upstream.
+    NOTE: This is actually upstream's 0.4.2 but 0.4.2.3 came first for some
+    reason.
+  * Use start-stop-daemon to control the multipathd daemon and do it's own
+    PID file handling (which is now commented out of the daemon itself)
+
+ -- Patrick Caulfield <patrick@debian.org>  Fri, 28 Jan 2005 15:15:01 +0000
+
+multipath-tools (0.4.2.3-1) unstable; urgency=low
+
+  * New upstream
+  * Remove initrd files as they break things.
+    Closes: #288150
+  * Fix some duplicate patching.
+
+ -- Patrick Caulfield <patrick@debian.org>  Mon, 17 Jan 2005 11:19:20 +0000
+
+multipath-tools (0.4.1-1) unstable; urgency=low
+
+  * New upstream
+    Closes: #295926, #286789
+  * Include initrd scripts contributed by Guido Guenther
+    Closes: #286791
+
+ -- Patrick Caulfield <patrick@debian.org>  Thu, 13 Jan 2005 09:25:42 +0000
+
+multipath-tools (0.4.0-1) unstable; urgency=low
+
+  * New upstream
+
+ -- Patrick Caulfield <patrick@debian.org>  Fri, 24 Dec 2004 11:54:44 +0000
+
+multipath-tools (0.3.9-1) unstable; urgency=low
+
+  * New upstream
+
+ -- Patrick Caulfield <patrick@debian.org>  Tue,  7 Dec 2004 13:15:15 +0000
+
+multipath-tools (0.3.8-1) unstable; urgency=low
+
+  * New upstream
+  * Fix error in preinst, when upgrading.
+  * Don't clean klibc directory. 
+    Closes: #283043
+
+ -- Patrick Caulfield <patrick@debian.org>  Mon, 29 Nov 2004 08:56:50 +0000
+
+multipath-tools (0.3.7-1) unstable; urgency=low
+
+  * New upstream
+
+ -- Patrick Caulfield <patrick@debian.org>  Sat, 13 Nov 2004 11:14:35 +0000
+
+multipath-tools (0.3.6-1) unstable; urgency=low
+
+  * Initial upload. Based loosely on upstream's work
+    Closes: #277898
+
+ -- Patrick Caulfield <patrick@debian.org>  Wed,  3 Nov 2004 10:16:34 +0000
+
+

Added: multipath-tools/trunk/debian/conffiles
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/conffiles	Fri Mar  4 15:14:44 2005
@@ -0,0 +1,2 @@
+/etc/dev.d/block/multipath.dev
+/etc/init.d/multipath-tools

Added: multipath-tools/trunk/debian/control
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/control	Fri Mar  4 15:14:44 2005
@@ -0,0 +1,17 @@
+Source: multipath-tools
+Section: admin
+Priority: extra
+Maintainer: Patrick Caulfield <patrick@debian.org>
+Build-Depends: debhelper (>> 4.0.0), po-debconf, libdevmapper-dev, libsysfs-dev
+Standards-Version: 3.6.1
+
+Package: multipath-tools
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, hotplug, udev (>=0.034-1), initscripts (>= 2.85-16), makedev (>= 2.3.1-70)
+Description: Command-line utilities for administering multipath disk access
+ These tools are in charge of maintaining the disk multipath device maps and
+ react to path and map events.
+ .
+ They require a 2.6 kernel patched with the -udm patchset hosted at
+ http://sources.redhat.com/dm/
+ This patchset shouldn't be necessary from kernel 2.6.10 onwards.

Added: multipath-tools/trunk/debian/copyright
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/copyright	Fri Mar  4 15:14:44 2005
@@ -0,0 +1,12 @@
+This is the Debian GNU/Linux prepackaged version of multipath-tools.
+
+Copyright (C) 2003,2004 Christophe Varoqui <christophe.varoqui@free.fr>
+
+multipath-tools is licensed under the GNU GPL version 2.
+libsysfs is licensed under the GNU LGPL version 2.1 or later.
+libdevmapper is licensed under the GNU LGPL version 2.
+
+On Debian systems, the complete text of the GNU General Public License
+and of the GNU Lesser Public License can be found in
+/usr/share/common-licenses/GPL and /usr/share/common-licenses/LGPL .
+

Added: multipath-tools/trunk/debian/multipath-tools.config
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/multipath-tools.config	Fri Mar  4 15:14:44 2005
@@ -0,0 +1,6 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+
+db_go || true
+

Added: multipath-tools/trunk/debian/multipath-tools.dirs
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/multipath-tools.dirs	Fri Mar  4 15:14:44 2005
@@ -0,0 +1,4 @@
+/etc/
+/etc/hotplug.d/scsi/
+/sbin/
+/usr/bin/

Added: multipath-tools/trunk/debian/multipath-tools.init
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/multipath-tools.init	Fri Mar  4 15:14:44 2005
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/sbin/multipathd
+PIDFILE=/var/run/multipathd.pid
+
+test -x $DAEMON || exit 0
+
+case "$1" in
+  start)
+	echo -n "Starting multipath daemon:"
+	/sbin/modprobe sg || true
+        start-stop-daemon --start --exec $DAEMON
+	echo "multipathd."
+	;;
+  stop)
+	echo -n "Stopping multipath daemon: multipathd "
+        start-stop-daemon --stop --name multipathd 
+	echo "."
+	;;
+  force-reload|restart)
+	$0 stop
+	$0 start
+	;;
+  *)
+	echo "Usage: /etc/init.d/multipathd {start|stop|restart|force-reload}"
+	exit 1
+esac
+
+exit 0

Added: multipath-tools/trunk/debian/multipath-tools.postinst
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/multipath-tools.postinst	Fri Mar  4 15:14:44 2005
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+case "$1" in
+    configure)
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+    echo "postinst called with unknown argument '$1'" >&2
+    exit 1
+    ;;
+esac
+
+. /usr/share/debconf/confmodule
+
+#DEBHELPER#
+

Added: multipath-tools/trunk/debian/multipath-tools.preinst
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/multipath-tools.preinst	Fri Mar  4 15:14:44 2005
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+
+kill_multipathd() {
+   start-stop-daemon --stop --exec /sbin/multipathd --oknodo --quiet
+}
+
+case "$1" in
+  install)
+  ;;
+
+  upgrade|abort-upgrade)
+  kill_multipathd
+  ;;
+
+  *)
+  echo "preinst called with unknown argument '$1'" >&2
+  exit 1
+  ;;
+esac
+
+#DEBHELPER#
+

Added: multipath-tools/trunk/debian/multipath-tools.substvars
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/multipath-tools.substvars	Fri Mar  4 15:14:44 2005
@@ -0,0 +1,2 @@
+shlibs:Depends=libc6 (>= 2.3.2.ds1-4), libnewt0.51
+misc:Depends=debconf (>= 0.5) | debconf-2.0

Added: multipath-tools/trunk/debian/rules
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/rules	Fri Mar  4 15:14:44 2005
@@ -0,0 +1,59 @@
+#!/usr/bin/make -f
+SHELL+= -e
+
+#export DH_VERBOSE=1
+
+include debian/scripts/vars
+
+BUILD_DIR := $(SOURCE_DIR)
+B := $(BUILD_DIR)
+D := $(CURDIR)/debian/tmp
+
+DOCS := FAQ README TODO
+
+all: build
+
+clean:
+	$(MAKE) clean
+	dh_clean
+
+build:	
+	dh_testdir
+	$(MAKE) $(MAKE_VARIABLES) BUILD=glibc all
+	touch $@
+
+binary-arch: build
+	dh_testdir
+	dh_clean -k
+	dh_installdirs
+
+	cp $B/multipath/multipath $B/devmap_name/devmap_name \
+		$B/kpartx/kpartx \
+		$D/sbin/
+	cp $B/multipathd/multipathd $D/sbin
+
+	install -d $D/etc/dev.d/block
+	install --mode=755 $B/multipath/multipath.dev \
+		$D/etc/dev.d/block/
+
+	dh_installchangelogs $B/ChangeLog
+	dh_installdocs $(addprefix $B/,$(DOCS))
+	dh_installexamples $B/multipath.conf.annotated
+	dh_installexamples $B/multipath.conf.synthetic
+	dh_installman $B/*/*.8
+	dh_installinit --no-start --update-rcd-params='start 04 S .'
+
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_shlibdeps
+	dh_installdebconf
+	dh_installdeb
+	dh_gencontrol
+	dh_builddeb
+
+
+binary:	binary-arch
+
+
+.PHONY: binary binary-arch binary-indep unpack configure build clean 

Added: multipath-tools/trunk/debian/scripts/vars
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/scripts/vars	Fri Mar  4 15:14:44 2005
@@ -0,0 +1,31 @@
+# This file is NOT a shell script.
+#
+# This file gets included by both debian/rules (make) AND the scripts in
+# debian/scripts (bash)
+#
+
+# Where to cd to to unpack all the tarballs.
+SOURCE_DIR=.
+# For a single pkg, this is the directory that is embedded in the tarball.
+# For multiple pkgs, this is null.
+TAR_DIR=
+# Where to place all the stamp files.  This directory can be removed, and
+# all the targets will then be rerun.
+STAMP_DIR=debian/stampdir
+# When sys-build.mk is used to build the source, this is the target(s) to
+# run.
+BUILD_TARGET=
+# When cleaning the source, during diff generation, if this is set, this
+# target will be called in debian/rules.  This allows for pkgs that have
+# complicated cleaning rules.
+CLEAN_TARGET_EXTERNAL=extra-clean
+# Whether to die if the source cleaning fails.
+CLEAN_IGNORE=yes
+# The clean target to run.  Defaults to clean.
+CLEAN_TARGET=maintainer-clean
+# Files to exclude from the diff.
+DIFF_EXCLUDE=""
+# Where the patches are located(duh!).
+PATCH_DIR=debian/patches
+SRC_PATCH_DIR=upstream/patches
+SRC_TAR_DIR=upstream/tarballs

Modified: multipath-tools/trunk/libdevmapper/Makefile
==============================================================================
--- multipath-tools/trunk/libdevmapper/Makefile	(original)
+++ multipath-tools/trunk/libdevmapper/Makefile	Fri Mar  4 15:14:44 2005
@@ -2,7 +2,7 @@
 #
 # Copyright (C) 2003 Christophe Varoqui, <christophe.varoqui@free.fr>
 
-BUILD = klibc
+BUILD = glibc
 
 include ../Makefile.inc
 

Modified: multipath-tools/trunk/libsysfs/Makefile
==============================================================================
--- multipath-tools/trunk/libsysfs/Makefile	(original)
+++ multipath-tools/trunk/libsysfs/Makefile	Fri Mar  4 15:14:44 2005
@@ -2,7 +2,7 @@
 #
 # Copyright (C) 2003 Christophe Varoqui, <christophe.varoqui@free.fr>
 
-BUILD = klibc
+BUILD = glibc
 
 include ../Makefile.inc
 

Modified: multipath-tools/trunk/multipathd/main.c
==============================================================================
--- multipath-tools/trunk/multipathd/main.c	(original)
+++ multipath-tools/trunk/multipathd/main.c	Fri Mar  4 15:14:44 2005
@@ -828,7 +828,7 @@
 	setlogmask(LOG_UPTO(LOGLEVEL));
 	syslog(LOG_NOTICE, "--------start up--------");
 
-	pidfile(getpid());
+	/* pidfile(getpid()); */
 	signal_init();
 	setscheduler();
 	allpaths = initpaths();