From: Bdale Garbee Date: Tue, 16 Dec 2003 17:04:26 +0000 (-0700) Subject: Imported Debian patch 1.2.16rel-3 X-Git-Tag: debian/1.2.16rel-3^0 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=c6b29233ce34e76ac21835a4c0677bd063ffd638;p=debian%2Fmtx Imported Debian patch 1.2.16rel-3 --- diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..22afc9f --- /dev/null +++ b/debian/changelog @@ -0,0 +1,110 @@ +mtx (1.2.16rel-3) unstable; urgency=low + + * apply patch from Torsten Werner that elminates + hard-coding of the value of HZ, closes: #224147 + + -- Bdale Garbee Tue, 16 Dec 2003 10:04:26 -0700 + +mtx (1.2.16rel-2) unstable; urgency=low + + * apply patch from R.A.Owen that fixes the "staggered" + output from the status command on some changers, closes: #129910 + + -- Bdale Garbee Tue, 9 Apr 2002 19:30:06 -0600 + +mtx (1.2.16rel-1) unstable; urgency=low + + * new upstream version, bug-fixing release, reportedly fixes timeout + problem with some drives, closes: #113947 + + -- Bdale Garbee Mon, 4 Mar 2002 01:27:48 -0700 + +mtx (1.2.15-1) unstable; urgency=low + + * new upstream source + * update standards version, rebuild rules file + * man pages all included now, mtx-changer and other pieces from contrib + provided as examples, though chg-mtx in the amanda package is probably + a better choice for use with amanda, closes: #113728 + * apply diffs to correct "spelling errors" (actually hyphenation) in the + descriptions in the control file, closes: #125160 + + -- Bdale Garbee Sun, 30 Dec 2001 21:28:46 -0700 + +mtx (1.2.10-1) unstable; urgency=low + + * new upstream source + + -- Bdale Garbee Mon, 11 Dec 2000 17:34:13 -0700 + +mtx (1.0-10) frozen unstable; urgency=low + + * deliver mtx.doc, lost when the package was made FHS compliant, + closes: #56276 Target frozen since including the documentation + is worthwhile for potato, and there is no added risk. + + -- Bdale Garbee Wed, 9 Feb 2000 12:27:58 -0700 + +mtx (1.0-9) unstable; urgency=low + + * fix postinst/postrm scripts to be executable again + + -- Bdale Garbee Tue, 11 Jan 2000 23:00:17 -0700 + +mtx (1.0-8) unstable; urgency=low + + * update to latest standards revision, add Build-Depends + * fix all the lintian errors that aren't intentional, override the two + permissions warnings since they're precisely what is needed + + -- Bdale Garbee Fri, 7 Jan 2000 02:47:08 -0700 + +mtx (1.0-7) unstable; urgency=low + + * grab a local copy of scsi_ioctl.h from the 2.2.10 kernel source tree. This + doesn't change often in any way we care about, and this is much simpler + than having to reference a live kernel tree somewhere... + * move to debhelper and CVS + + -- Bdale Garbee Sun, 20 Jun 1999 10:42:39 -0600 + +mtx (1.0-6) unstable; urgency=low + + * put mtx in group backup, setuid root, perms set so that only members of + group backup can run mtx. This makes mtx compatible with amanda. + + -- Bdale Garbee Tue, 27 Jan 1998 15:06:13 -0700 + +mtx (1.0-5) unstable; urgency=low + + * explicit include path to find in the + /usr/src/linux/include tree. closes bug 16877 + + -- Bdale Garbee Sun, 25 Jan 1998 23:02:46 -0700 + +mtx (1.0-4) unstable; urgency=low + + * actually install the mtx.doc file that's referenced in the man page /o\ + + -- Bdale Garbee Sun, 21 Sep 1997 02:38:50 -0600 + +mtx (1.0-3) unstable; urgency=low + + * libc6 + + -- Bdale Garbee Thu, 4 Sep 1997 02:56:39 -0600 + +mtx (1.0-2) unstable; urgency=low + + * Add an 'mtx-changer' wrapper script from the amanda-users mailing list + to make this more useful with Amanda. + * Hack mtx-changer to report 6 slots instead of 4, since I have an HP + SureStore 12000e. Should make it configurable, someday. + + -- Bdale Garbee Sun, 10 Aug 1997 03:50:42 -0600 + +mtx (1.0-1) unstable; urgency=low + + * Initial Release. + + -- Bdale Garbee Sun, 10 Aug 1997 03:05:18 -0600 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..410a6e9 --- /dev/null +++ b/debian/control @@ -0,0 +1,16 @@ +Source: mtx +Section: admin +Priority: extra +Maintainer: Bdale Garbee +Build-Depends: debhelper (>> 3.0.0) +Standards-Version: 3.6.1.0 + +Package: mtx +Architecture: any +Depends: ${shlibs:Depends} +Description: controls tape autochangers + MTX can be used to manipulate tape auto-changers, also known as "jukeboxes", + such that backup software can make use of the multiple tape capabilities of + the auto-changer. In particular, this is necessary glue for using a backup + system like Amanda with a DDS auto-changer like the HP Surestore 12000e. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..68d5153 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,14 @@ +This package was debianized by Bdale Garbee bdale@gag.com on +Sun, 10 Aug 1997 03:05:18 -0600. + +mtx was downloaded from http://mtx.sourceforge.net/ + +Copyright: + + Copyright 1997, 1998 Leonard Zubkoff + Changes copyright 2000 Eric Green + + GPL, version 2 + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..236670a --- /dev/null +++ b/debian/dirs @@ -0,0 +1 @@ +usr/sbin diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..a6b3ef8 --- /dev/null +++ b/debian/rules @@ -0,0 +1,65 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=3 + +configure: configure-stamp +configure-stamp: + dh_testdir + ./configure --prefix=/usr + touch configure-stamp + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + $(MAKE) + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + -$(MAKE) distclean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + make install bindir=`pwd`/debian/mtx/bin prefix=`pwd`/debian/mtx/usr \ + mandir=`pwd`/debian/mtx/usr/share/man + +# Build architecture-independent files here. +binary-indep: build install + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installdocs + dh_installexamples contrib/* + dh_installmenu + dh_installcron + dh_installman + dh_installinfo + dh_installchangelogs CHANGES + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/mtxl.c b/mtxl.c index 1ad050d..f2350a4 100644 --- a/mtxl.c +++ b/mtxl.c @@ -438,7 +438,7 @@ static ElementStatus_T *AllocateElementData(ElementModeSense_T *mode_sense) { void copy_barcode(unsigned char *src, unsigned char *dest) { int i; - for (i=0; i < 37; i++) { + for (i=0; i < 36; i++) { *dest++ = *src++; } *dest=0; /* null-terminate, sigh. */ diff --git a/scsi_linux.c b/scsi_linux.c index e5378d3..e637184 100644 --- a/scsi_linux.c +++ b/scsi_linux.c @@ -15,11 +15,15 @@ $Revision: 1.2 $ */ +#include +#include + /* this is the SCSI commands for Linux. Note that changed * it from using SCSI_IOCTL_SEND_COMMAND to using the SCSI generic interface. */ #ifndef HZ +#warning "HZ is not defined, mtx might not work correctly!" #define HZ 100 #endif @@ -52,7 +56,7 @@ $Revision: 1.2 $ #define STILL_A_VALID_READ(s) (HIT_FILEMARK(s) || SHORT_READ(s) || HIT_EOD(s) || HIT_EOP(s) || HIT_EOM(s)) -#define SG_SCSI_DEFAULT_TIMEOUT HZ*60*5 /* 5 minutes? */ +#define SG_SCSI_DEFAULT_TIMEOUT SG_DEFAULT_TIMEOUT DEVICE_TYPE SCSI_OpenDevice(char *DeviceName) {