debian/0000755000000000000000000000000012156066301007166 5ustar debian/README.Debian0000644000000000000000000000067712152457412011244 0ustar * /dev/tape has gone away Please note that the default tape device "/dev/tape" may no longer be valid if you are running a sufficiently recent version of udev. udev has replaced this historic symlink with a directory - see Debian bug #499152 for the whole story. As there is no sensible default mt-st could fall back to you will have to set the $TAPE environment variable in these cases. -- Jan Christoph Nordholz debian/patches/0000755000000000000000000000000012152457412010620 5ustar debian/patches/25kernel_newer_than_2.6.patch0000644000000000000000000000074612152457412016076 0ustar Description: Don't show warning for kernels newer than 2.6 Author: Ivo De Decker Forwarded: no Last-Update: 2013-06-01 --- a/mt.c +++ b/mt.c @@ -712,7 +712,8 @@ return 2; } sscanf(uts.release, "%d.%d.%d", &i, &tapeno, &tapemode); - if (i < 2 || tapeno < 6 || tapemode < 26) + if ((i < 3) && + (i < 2 || tapeno < 6 || tapemode < 26)) printf("Your kernel (%d.%d.%d) may be too old for this command.\n", i, tapeno, tapemode); debian/patches/series0000644000000000000000000000014212152457412012032 0ustar 10makefile_flags.patch 15fix_gcc_warnings.patch 20showoptions.patch 25kernel_newer_than_2.6.patch debian/patches/20showoptions.patch0000644000000000000000000000101012152457412014367 0ustar Description: support stshowoptions command The manpage lists the stshowoptions command, while the code has the stshowopt command. This patch enables support for both. Author: Ivo De Decker Forwarded: no Last-Update: 2013-06-01 --- a/mt.c +++ b/mt.c @@ -164,6 +164,8 @@ ET_ONLINE }, { "stshowopt", 0, do_show_options, 0, FD_RDONLY, ONE_ARG, 0 }, + { "stshowoptions", 0, do_show_options, 0, FD_RDONLY, ONE_ARG, + 0 }, { NULL, 0, 0, 0, 0, 0, 0 } }; debian/patches/10makefile_flags.patch0000644000000000000000000000104012152457412014726 0ustar Description: use CFLAGS and LDFLAGS from environment Author: Ivo De Decker Forwarded: no Last-Update: 2013-06-01 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CFLAGS= -Wall -O2 +#CFLAGS= -Wall -O2 SBINDIR= /sbin BINDIR= /bin USRBINDIR= /usr/bin @@ -9,10 +9,10 @@ all: mt stinit mt: mt.c - $(CC) $(CFLAGS) -o mt mt.c + $(CC) $(CFLAGS) $(LDFLAGS) -o mt mt.c stinit: stinit.c - $(CC) $(CFLAGS) -o stinit stinit.c + $(CC) $(CFLAGS) $(LDFLAGS) -o stinit stinit.c install: mt stinit install -s mt $(MTDIR) debian/patches/15fix_gcc_warnings.patch0000644000000000000000000000355612152457412015332 0ustar ## 15fix_gcc_warnings.dpatch by ## ## DP: Get rid of all those gcc warnings. ## DP: (stinit.c hunk) buflen is positive in all cases. --- a/mt.c +++ b/mt.c @@ -164,7 +164,7 @@ ET_ONLINE }, { "stshowopt", 0, do_show_options, 0, FD_RDONLY, ONE_ARG, 0 }, - { NULL, 0, 0, 0 } + { NULL, 0, 0, 0, 0, 0, 0 } }; @@ -269,7 +269,8 @@ #endif {"sili", MT_ST_SILI, "enable SILI for variable block mode"}, {"cleaning", MT_ST_SET_CLN, "set the cleaning bit location and mask"}, - {NULL, 0}}; + {NULL, 0, NULL} +}; static char *tape_name; /* The tape name for messages */ @@ -277,7 +278,8 @@ int main(int argc, char **argv) { - int mtfd, cmd_code, i, argn, len, oflags; + int mtfd, cmd_code, i, argn, oflags; + unsigned int len; char *cmdstr; cmdef_tr *comp, *comp2; @@ -474,7 +476,8 @@ static int do_options(int mtfd, cmdef_tr *cmd, int argc, char **argv) { - int i, an, len; + int i, an; + unsigned int len; struct mtop mt_com; mt_com.mt_op = MTSETDRVBUFFER; @@ -594,7 +597,8 @@ do_status(int mtfd, cmdef_tr *cmd, int argc, char **argv) { struct mtget status; - int dens, i; + int dens; + unsigned int i; char *type, *density; if (ioctl(mtfd, MTIOCGET, (char *)&status) < 0) { @@ -753,7 +757,7 @@ static int print_densities(int fd, cmdef_tr *cmd, int argc, char **argv) { - int i, offset; + unsigned int i, offset; printf("Some SCSI tape density codes:\ncode explanation code explanation\n"); offset = (NBR_DENSITIES + 1) / 2; --- a/stinit.c +++ b/stinit.c @@ -164,7 +164,7 @@ if (buf == NULL) buf = strdup(argp); else { - if (strlen(argp) < buflen) + if (strlen(argp) < (unsigned int)buflen) strcpy(buf, argp); else { strncpy(buf, argp, buflen); debian/changelog0000644000000000000000000002155012156066045011050 0ustar mt-st (1.1-5ubuntu1) saucy; urgency=low * Merge from Debian unstable. (LP: #1190083) Remaining changes: - debian/mt-st.modprobe: Pass command-line options to the modprobe call -- Alessandro Losavio Wed, 12 Jun 2013 00:17:26 +0100 mt-st (1.1-5) unstable; urgency=low * QA upload. * Set Maintainer to Debian QA Group (cf. #698986). * Update standards version to 3.9.4 (no changes). * Switch to dh. * Rebuilding with a newer debhelper moves the udev rule to /lib/udev. Closes: #622566. * Support stshowoptions command. Closes: #650236. * Don't show warning for kernels newer than 2.6. -- Ivo De Decker Sat, 01 Jun 2013 22:52:07 +0200 mt-st (1.1-4ubuntu1) karmic; urgency=low * Merge from debian unstable (LP: #380353), remaining changes: - debian/mt-st.modprobe: Pass command-line options to the modprobe call - debian/control: Add Breaks on udev to get correct version -- Andres Rodriguez Mon, 25 May 2009 13:57:44 -0500 mt-st (1.1-4) unstable; urgency=low * Add ".conf" suffix to modprobe.d snippet. Closes: #518245. (Just rely on a recent debhelper version to do this.) * Bump Standards version to 3.8.1 (no changes). * Add a remark for mtio.h (taken from glibc) to debian/copyright. -- Jan Christoph Nordholz Fri, 20 Mar 2009 02:28:53 +0100 mt-st (1.1-3) unstable; urgency=low * Document that udev has invalidated both glibc and kernel documentation by changing the /dev/tape symlink into a directory. Talk about backwards-compatible changes. As there's no sensible default left, this is all I can do. Closes: #499152. * Minor packaging cleanup changes. -- Jan Christoph Nordholz Sun, 01 Mar 2009 16:36:22 +0100 mt-st (1.1-2ubuntu2) jaunty; urgency=low * Bump build-depend on debhelper again to migrate modprobe conf file to correct new path. * debian/mt-st.modprobe: Pass command-line options to the modprobe call -- Scott James Remnant Thu, 05 Mar 2009 16:47:08 +0000 mt-st (1.1-2ubuntu1) jaunty; urgency=low * Bump build-depend on debhelper to install udev rules into /lib/udev/rules.d, add Breaks on udev to get correct version. -- Scott James Remnant Tue, 13 Jan 2009 02:26:02 +0000 mt-st (1.1-2) unstable; urgency=low * Update debian/copyright. * Bump Standards version to 3.8.0. * Switch to debhelper v7. * Drop build-dep on obsolete linux-kernel-headers package. -- Jan Christoph Nordholz Wed, 11 Jun 2008 23:22:29 +0200 mt-st (1.1-1) unstable; urgency=low * New upstream version. * Patches 10,12,14 have been applied upstream, 11 is obsolete; dropped. * New patch 15 to fix a couple of gcc warnings. -- Jan Christoph Nordholz Tue, 27 May 2008 15:19:12 +0200 mt-st (0.9b-6) unstable; urgency=low * Bump Standards version to 3.7.3 (no changes) and debhelper to v6. * Drop update-modules support. Closes: #440700. * Reformat and clarify copyright file. -- Jan Christoph Nordholz Fri, 11 Apr 2008 22:47:32 +0200 mt-st (0.9b-5) unstable; urgency=low * Introduce dpatch. * Fix an off-by-one error when reporting mode numbers. Closes: #437259. Thanks to Joerg Sommrey for noticing! * Prevent upstream from stripping the binaries. Closes: #437588. * Do not ignore errors from 'make clean' (upstream only does one rm -f there, so there's nothing to ignore anyway). -- Jan Christoph Nordholz Mon, 20 Aug 2007 01:12:09 +0200 mt-st (0.9b-4) unstable; urgency=medium * Fix #include statements to accommodate the linux-kernel-headers / linux-libc-dev transition. This closes an FTBFS bug, so raised urgency. Closes: #428948. Thanks to Lucas Nussbaum. * Add density code for LTO-3 drives. Closes: #429589. Thanks to Mike Castleman. * Add LSB header to initscript. -- Jan Christoph Nordholz Fri, 15 Jun 2007 10:48:05 +0200 mt-st (0.9b-3) unstable; urgency=low * Work around something I believe to be a debhelper issue: Fix postrm exit status, closes: #381901, forwarded as #381940. Thanks to Eric Lavarde. -- Jan Christoph Nordholz Sat, 12 Aug 2006 15:01:23 +0200 mt-st (0.9b-2) unstable; urgency=low * linux-kernel-headers was meant to be a _build_-dependency. Sorry. Adjust dependencies, closes: #378391. * Introduce udev rules to augment the list of scripts that may be triggered by module load/unload and device insertion; thanks to Alex Owen. Closes: #251114. * Entrust most of the installation/removal package scripts' content to debhelper. * Update upstream hostname in debian/copyright in order to match upstream's license file. * Include a debian/watch file. -- Jan Christoph Nordholz Mon, 17 Jul 2006 00:58:55 +0200 mt-st (0.9b-1) unstable; urgency=low * Take over the orphaned package. Closes: #374122. * New upstream version, closes: #294646. * Copy SG 3.x protocol definitions from the (2.6-)kernel scsi/sg.h header. The stinit code provides a fallback, so this is safe when running on kernels < 2.6. * Introduce a new build-dependency on linux-kernel-headers for the copied kernel header. * Supply modprobe.d/ snippet in analogy to the already existing modutils config file. Closes: #251114. * Bump debhelper to version 5, clean up package build process. * Remove -g from the compiler options. -- Jan Christoph Nordholz Sun, 9 Jul 2006 02:47:08 +0200 mt-st (0.8-2) unstable; urgency=low * QA Upload * Set Maintainer to QA Group (Orphaned, #374122) * Fix short package description (Closes: #374877) * Bump up compat level, depend on at least dh 4.0.0 * Prefer using invoke-rc.d instead of directly calling the init script in postinst. * Call update-modules only if command exists, otherwise package fails to install on module-less kernels (Closes: #271230) * Conforms to latest Standards Version -- Michael Ablassmeier Thu, 6 Jul 2006 11:11:04 +0200 mt-st (0.8-1) unstable; urgency=low * New upstream version. * Updated copyright to specify both copyrights and licensing terms. * Dropped the .lsm from mt-st.docs, it's redundant. -- Philippe Troin Wed, 14 Apr 2004 16:20:38 -0700 mt-st (0.7-3) unstable; urgency=low * Run update-modules for purge, not remove in postrm; closes: #145646. * Update debian/rules with the new rules for DEB_BUILD_OPTIONS (noopt). * Now compliant with Standards-Version 3.6.1.0. * Applied a patch from upstream to fix a bug when stinit fails to initialize the second of two identical drives. * Changed build-depends on debhelper for v 3.0.0 instead of 2.2.0. * Removed debian/mt-st.conffiles since debhelper does it for us. -- Philippe Troin Fri, 12 Mar 2004 17:14:20 -0800 mt-st (0.7-2) unstable; urgency=low * Allow stinit to detect tapes when /dev/tape does not match the st driver's idea of tape number . This can happen with a modularized st driver that is inserted and removed more than once. -- Philippe Troin Fri, 15 Mar 2002 20:11:47 -0800 mt-st (0.7-1) unstable; urgency=low * Fixed upstream version detection in debian/rules. * New upstream release. -- Philippe Troin Mon, 26 Nov 2001 19:34:37 -0800 mt-st (0.6-5) unstable; urgency=low * Added debhelper to build-depends; closes: #104631. * Upgraded to standards version 3.5.5.0. * Added support for DEB_BUILD_OPTIONS. * Added support for debian/rules get-orig-source. -- Philippe Troin Tue, 17 Jul 2001 22:38:40 -0700 mt-st (0.6-4) unstable; urgency=low * Add a patch from "merlin" for devfs compatibility; closes: #99906. * Updated copyright to reflect current upstream sources location. -- Philippe Troin Mon, 2 Jul 2001 14:02:56 -0700 mt-st (0.6-3) unstable; urgency=low * Add a "eject" command for better compatibility with GNU mt; closes: #86664. -- Philippe Troin Tue, 20 Feb 2001 14:38:38 -0800 mt-st (0.6-2) unstable; urgency=low * Avoid stat()'ing all devices to prevent loading all possible modules, we now stat only st* and nst* devices (at the expense of missing some device files, but a Debian system ought to have devices named as they should...); closes: #85978. -- Philippe Troin Thu, 15 Feb 2001 11:55:43 -0800 mt-st (0.6-1.1) unstable; urgency=low * Experimental release... -- Philippe Troin Wed, 14 Feb 2001 11:55:50 -0800 mt-st (0.6-1) unstable; urgency=low * New package; closes: #83810. -- Philippe Troin Sat, 27 Jan 2001 18:30:45 -0800 debian/rules0000755000000000000000000000044212152457412010251 0ustar #!/usr/bin/make -f DESTDIR = $(CURDIR)/debian/mt-st %: dh $@ override_dh_auto_install: install -m 644 debian/stinit.def $(DESTDIR)/etc/ install mt $(DESTDIR)/bin/mt-st install stinit $(DESTDIR)/sbin/ override_dh_installman: cp mt.1 debian/mt-st.1 dh_installman rm debian/mt-st.1 debian/mt-st.postrm0000644000000000000000000000004212152457412011477 0ustar #!/bin/sh -e #DEBHELPER# exit 0 debian/mt-st.docs0000644000000000000000000000002512152457412011104 0ustar README README.stinit debian/control0000644000000000000000000000127212156066041010574 0ustar Source: mt-st Section: admin Priority: extra Maintainer: Ubuntu MOTU Developers XSBC-Original-Maintainer: Debian QA Group Build-Depends: debhelper (>= 9) Standards-Version: 3.9.4 Package: mt-st Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Linux SCSI tape driver aware magnetic tape control (aka mt) Mt-st contains a version of "mt" that is aware of Linux's SCSI tape driver. Mt-st is able to set some esoteric control flags like tape partitions. . Mt-st diverts (replaces) the GNU version of mt, in the cpio package. . It also comes with stinit, a program to be run at boot time to set up tape defaults. debian/mt-st.files0000644000000000000000000000007212152457412011260 0ustar sbin/stinit bin/mt-st usr/share/man/man?/* etc/stinit.def debian/stinit.def0000644000000000000000000000042412152457412011163 0ustar # This file contains example definitions for different kinds of tape # devices. # # You can find some examples in /usr/share/doc/mt-st/examples. # # Common definitions to be applied to all tape devices # (This is the driver's default) {buffer-writes read-ahead async-writes} debian/mt-st.modprobe0000644000000000000000000000016012156066032011761 0ustar install st /sbin/modprobe --ignore-install st $CMDLINE_OPTS && /etc/init.d/mt-st modload >/dev/null 2>/dev/null debian/mt-st.dirs0000644000000000000000000000001512152457412011114 0ustar sbin bin etc debian/mt-st.init0000644000000000000000000000242312152457412011123 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: mt-st # Required-Start: $local_fs $remote_fs # Required-Stop: # Default-Start: S # Default-Stop: # Short-Description: tape device initialization # Description: tape device initialization # (calls stinit to set device parameters) ### END INIT INFO PATH=/usr/sbin:/sbin:/usr/bin:/bin export PATH # Check for package existence test -x /sbin/stinit || exit 0 # Check for package configuration test -f /etc/stinit.def || exit 0 # Run the thing eventually case "$1" in start) # Only start stinit if the st module is not loaded but the st device # is in the kernel # => only when we have st in the kernel # When modules are used, modprobe takes care of doing things right. if ! grep -q '^st[[:space:]]' /proc/modules \ && grep -q '[[:space:]]st$' /proc/devices then echo 'Initializing SCSI tapes...' stinit || exit $? fi ;; modload) # modload may be called with a second argument (from udev), so just # pass it on to stinit if it exists if [ -n "$2" ]; then stinit "$2" else stinit fi exit $? ;; reload|restart|force-reload) stinit || exit $? ;; stop) ;; *) echo "usage: $0 start|stop|reload|force-reload|restart|modload" 1>&2 exit 1 esac debian/copyright0000644000000000000000000000320612152457412011125 0ustar This is the Debian packaged version of "mt-st" as found on: ftp://ftp.ibiblio.org/pub/linux/system/backup/ Copyright for mt-st source (except qic117.h and mtio.h): Copyright (C) 1996-2008 Kai Mäkisara Copyright for qic117.h: Copyright (C) 1993-1996 Bas Laarhoven, (C) 1997 Claus-Justus Heine. Copyright for mtio.h (modified copy of ): Copyright (C) 1996-1997 Free Software Foundation, Inc. Copyright (C) 2007 Kai Mäkisara License: This program 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 program 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 program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Packaging Copyright: Copyright (C) 2001,2004 Philippe Troin 2006-2008 Jan Christoph Nordholz Packaging License: GNU General Public License version 2. On Debian GNU/Linux systems, the complete text of the GNU General Public License, version 2, can be found in "/usr/share/common-licenses/GPL-2". debian/mt-st.examples0000644000000000000000000000002412152457412011771 0ustar stinit.def.examples debian/watch0000644000000000000000000000011212152457412010214 0ustar version=3 ftp://ftp.ibiblio.org/pub/linux/system/backup/mt-st-(.*).tar.gz debian/mt-st.manpages0000644000000000000000000000003012152457412011743 0ustar debian/mt-st.1 stinit.8 debian/mt-st.udev0000644000000000000000000000026712152457412011127 0ustar # Use stinit to set default parameters on st device creation KERNEL=="st[0-9]", RUN+="/etc/init.d/mt-st modload %n" KERNEL=="st[0-9]*[0-9]", RUN+="/etc/init.d/mt-st modload %n" debian/compat0000644000000000000000000000000212152457412010367 0ustar 9 debian/mt-st.prerm0000644000000000000000000000015012152457412011300 0ustar #!/bin/sh -eu #DEBHELPER# if [ "$1" = remove ] then update-alternatives --remove mt /bin/mt-st fi debian/source/0000755000000000000000000000000012152457412010471 5ustar debian/source/format0000644000000000000000000000001412152457412011677 0ustar 3.0 (quilt) debian/mt-st.postinst0000644000000000000000000000031612152457412012042 0ustar #!/bin/sh -eu #DEBHELPER# if [ "$1" = configure ]; then update-alternatives --install /bin/mt mt /bin/mt-st 20 \ --slave \ /usr/share/man/man1/mt.1.gz mt.1.gz /usr/share/man/man1/mt-st.1.gz fi