# Default tape device is: /dev/nst0
# edit or uncomment the following line to change the default device
-DEVICE=/dev/rmt0
+DEVICE=/dev/nst0
# Enable trace mode -- for debugging only
# TRACE=-DDDS_TRACE=1
#
# To configure the buffer size of dds2tar
# change or uncomment the following line :
-# BUFFER=-DST_BUFFER_BLOCKS=32
-BUFFER=-DST_BUFFER_BLOCKS=0
+BUFFER=-DST_BUFFER_BLOCKS=32
+# BUFFER=-DST_BUFFER_BLOCKS=0
# To include some experimental stuff
# uncomment the following line :
# EXP_STUFF=-DEXP_STUFF
# change this to where you want to install:
-BINDIR=/usr/bin
-MANDIR=/usr/man
+BINDIR=$(DESTDIR)/usr/bin
+MANDIR=$(DESTDIR)/usr/share/man
MANEXT=1
# place here your favorite C compiler and options
CC=cc -g
CCOPT=$(HPDAT) $(HPDAT4) $(EXP_STUFF) $(MATCH) $(BUFFER) \
- -DDEVICE=\"$(DEVICE)\" -O4 -Wall $(TRACE)
+ -DDEVICE=\"$(DEVICE)\" -O4 -Wall $(TRACE) -D_GNU_SOURCE
# -Wall \
# -Wstrict-prototypes \
install: dds2tar ddstool \
dds2tar.$(MANEXT) mt-dds.$(MANEXT) dds2index.$(MANEXT) dds-dd.$(MANEXT)
- install -c -s dds2tar $(BINDIR)
+ install -c dds2tar $(BINDIR)
install scsi_vendor $(BINDIR)
install -c ddstool $(BINDIR)
ls -l $(BINDIR)/dds2tar $(BINDIR)/ddstool
-rm -f dds2tar dds2index mt-dds dds-dd fio_test
-rm -f *~ *.$(MANEXT) *.ps
-rm -f tags *.bak
- chmod 644 *
+# chmod 644 *
doc:
a2ps -p -nP [A-Z]* *.h *.c *.lsm > a.ps
-.TH dds-dd 1L 2.4 \" -*- nroff -*-
+.TH dds-dd 1 2.4 \" -*- nroff -*-
.\"----------
.SH NAME
.\"----------
-.TH dds2index 1L 2.4 \" -*- nroff -*-
+.TH dds2index 1 2.4 \" -*- nroff -*-
.\"----------
.SH NAME
.\"----------
-.TH dds2tar 1L 2.3 \" -*- nroff -*-
+.TH dds2tar 1 2.3 \" -*- nroff -*-
.SH NAME
dds2tar \- tool for fast tape access
.SH SYNOPSIS
.B GNU tar-1.12
is available, adding the option
.B --record-file.
+This patch is not included in the version of tar that ships with Debian.
Alternatively there are some tricks to get the missing
information.
.PP
*/
dds_unquote(cur_line);
- /*
- * Set scanoffset
- */
- so = (0 == strncmp(cur_line, "block", 5))? 2 : 0 ;
-
- recno = atoi(cur_line + 4 + so );
- /*
- * tar-1.13 writes now the block number:
- */
- if ( so == 0 ){
- int x ;
- int n ;
+ if (0 == strncmp(cur_line, "block ", 6))
+ {
+ int x;
+ int n;
char c;
+
+ so = 6;
+ if (2 == sscanf(cur_line + so, "%d%c%n",
+ &x, &c, &n)) {
+ so += n + 1;
+ recno = x;
+#ifdef DDS_TRACE
+ fprintf(stderr,"Blocks found:%d\n",x);
+#endif
+ }
+ else
+ {
+ recno = 0;
+ }
+ }
+ else
+ {
+ int x;
+ int n;
+ char c;
+
+ recno = atoi(cur_line + 4);
+
+ so = 16;
if ( 2 == sscanf(
- cur_line+16,"block %d%c%n",&x,&c,&n
+ cur_line+so,"block %d%c%n",&x,&c,&n
) && c == ':' ) {
so += n + 1 ;
recno = x ;
#endif
}
}
+
/*
* Now we are fixing a bug of gnu tar ...
* The first number should be zero, othewise we
#ifdef DDS_TRACE
fprintf(stderr,"file-loc(%d:%d,%d)\n",tar_bs,blkno,recno);
#endif
- if (name == NULL) { /* calculate only once */
- if ( strlen(cur_line) >= (66) ) {
- name = cur_line + (65);
- while ( ( name[ 0] != '\0' )
- && (( ( name[-1] != ' ' )
- || ( name[-6] != ' ' )
- || ( name[-9] != ':' )
- )&&( ( name[-1] != ' ' )
- || ( name[-4] != ':' )
- || ( name[-7] != ' ' )
- || ( name[-10] != '-' )
- || ( name[-13] != '-' )
- ))
- ) name++ ;
- if ( name[0] == '\0' ) {
- name = cur_line + (16+so);
- }
- } else {
- if ( strlen(cur_line) <= (16+so) ) {
- strcat(cur_line,
- " ");
- }
- name = cur_line + (16+so);
+
+ /* skip file permissions */
+ name = strchr(cur_line + so, ' ');
+ if (name) {
+ /* skip owner/group */
+ name = strchr(name + 1, ' ');
+ if (name) {
+ /* skip size */
+ while (*++name == ' ');
+ name = strchr(name, ' ');
+ if (name) {
+ /* skip date */
+ name = strchr(name + 1, ' ');
+ if (name) {
+ /* skip time */
+ name = strchr(name + 1, ' ');
+
+ if (name) {
+ ++name;
}
+ }
+ }
+ }
+ }
+
+ if (!name || (name[-4] != ':'))
+ {
+ name = cur_line + so;
+ }
+
#ifdef DDS_TRACE
- fprintf(stderr,"%d\n",__LINE__);
- fprintf(stderr,"filename=%s\n",name);
+ fprintf(stderr,"%d\n",__LINE__);
+ fprintf(stderr,"filename=%s\n",name);
#endif
- }
- while ( ( name[ 0] != '\0' )
- && ( name != ( cur_line + (16+so) ) )
- && (( ( name[-1] != ' ' )
- || ( name[-6] != ' ' )
- || ( name[-9] != ':' )
- )&&( ( name[-1] != ' ' )
- || ( name[-4] != ':' )
- || ( name[-7] != ' ' )
- || ( name[-10] != '-' )
- || ( name[-13] != '-' )
- ))
- ) name++ ;
}
#ifdef DDS_TRACE
fprintf(stderr,"%d\n",__LINE__);
--- /dev/null
+dds2tar (2.5.2-4) unstable; urgency=low
+
+ * don't let Makefile strip binaries, closes: #436710
+ * update man pages to make it clear that Debian does not include the
+ --record-file option in our package of tar, so some of the functionality
+ of the dds2tar package will only work with a locally modified version
+ of the tar executable, closes: #220228, #285796
+ * accept patch for scsi_vendor csh->bash translation bugs, closes: #292066
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 16 Apr 2008 00:26:26 -0600
+
+dds2tar (2.5.2-3) unstable; urgency=low
+
+ * correct Kieren's email address here and in scsi_vendor script
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 2 Jul 2003 09:04:43 -0600
+
+dds2tar (2.5.2-2) unstable; urgency=low
+
+ * update control file to direct this to optional, not extra
+ * accept bash port of scsi_vendor script from Kieren Hynd <kieren@tigs.org>
+ to eliminate dependency on tcsh for this script to be useful.
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 1 Jul 2003 20:27:40 -0600
+
+dds2tar (2.5.2-1) unstable; urgency=low
+
+ * new upstream version
+ * apply fix for parsing of indexes from current Debian tar provided by
+ Christof Meerwald <cmeerw@web.de>, closes: #119692
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 11 Mar 2002 19:17:56 -0700
+
+dds2tar (2.4.21-3) unstable; urgency=low
+
+ * update to current policy
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 1 Dec 1999 23:27:00 -0700
+
+dds2tar (2.4.21-2) frozen unstable; urgency=low
+
+ * update dependencies, since scsi_vendor apparently needs tcsh, not just
+ c-shell... closes 30895
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 18 Jan 1999 22:38:05 -0700
+
+dds2tar (2.4.21-1) unstable; urgency=low
+
+ * new upstream version, closes 27551
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 7 Oct 1998 23:13:37 -0600
+
+dds2tar (2.4.15-3) frozen unstable; urgency=high
+
+ * another attempt to get this into hamm, rebuilding to get a good changes
+ file
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 23 Jun 1998 16:04:30 -0600
+
+dds2tar (2.4.15-2) frozen unstable; urgency=low
+
+ * reinstate package after having requested it be removed from the archive,
+ since the utilities here are still needed by DDS tape users to take
+ advantage of the patch which is now part of the base tar package... /o\
+ * update rules file to reflect debhelper changes and get a clean lintian
+ report
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 25 Apr 1998 22:28:41 -0600
+
+dds2tar (2.4.15-1) unstable; urgency=low
+
+ * new upstream version
+ * dds2tar now depends on tar being patched instead of providing a new tar
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 4 Feb 1998 04:20:37 -0700
+
+dds2tar (2.4.13-4) unstable; urgency=low
+
+ * make copyright reference the GPL instead of including it. Closes 14909.
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 21 Nov 1997 21:36:48 -0700
+
+dds2tar (2.4.13-3) unstable; urgency=low
+
+ * New maintainer.
+ * libc6
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 27 Oct 1997 08:08:41 -0700
+
+dds2tar (2.4.13-2) frozen unstable; urgency=low
+
+ * Rebuilt to change name of upstream changelog (#9641).
+ * Fixed source package to compile with bash 2.0
+ * Changed section to utils.
+ * Fixed typo in description.
+ * Upgrade to package standard 2.1.3.2.
+
+ -- Christian Schwarz <schwarz@debian.org> Sun, 11 May 1997 13:57:07 +0200
+
+dds2tar (2.4.13-1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Christian Schwarz <schwarz@debian.org> Thu, 9 Jan 1997 13:40:02 +0100
+
+Local variables:
+mode: debian-changelog
+End:
--- /dev/null
+Source: dds2tar
+Section: utils
+Priority: optional
+Maintainer: Bdale Garbee <bdale@gag.com>
+Build-Depends: debhelper (>= 5)
+Standards-Version: 3.7.3
+
+Package: dds2tar
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Tools for using DDS features of DAT drives with GNU tar
+ This tool makes use of the fast seek command of DAT devices.
+ Files from a selected file archive can be extracted within one minute.
+ .
+ A script scsi_vendor is provided which may help in learning more about
+ an unknown SCSI device. It is used by the mt-dds tool.
--- /dev/null
+Package built from sources acquired at
+ http://ibiblio.org/pub/Linux/system/backup/dds2tar-2.5.2.tar.gz
+
+Copyright 2000 by J"org Weule <weule@cs.uni-duesseldorf.de>
+
+This package is licensed under the GNU GENERAL PUBLIC LICENSE. A copy of the
+GPL is provided on Debian systems in the /usr/share/common-licenses directory.
+
--- /dev/null
+.TH DDSTOOL 1 "9 Januar 1997"\r
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection\r
+.\" other parms are allowed: see man(7), man(1)\r
+.SH NAME\r
+ddstool \- simple shell script to manage dds tapes\r
+.SH SYNOPSIS\r
+.B ddstool\r
+.I "<command> <options>"\r
+.SH "DESCRIPTION"\r
+This manual page documents briefly the\r
+.BR ddstool\r
+command.\r
+This manual page was written for the Debian GNU/Linux distribution\r
+(but may be used by others), because the original program does not\r
+have a manual page.\r
+.PP
+Since the version of tar now shipping in Debian does not contain the
+patch necessary to support the \-\-record-file option, this program
+will do nothing useful unless you're running a locally patched version
+of tar.
+.PP\r
+First label a tape:\r
+.RS\r
+.sp\r
+ddstool create-label 'unique-string and more'\r
+.sp\r
+.RE\r
+To archive something:\r
+.RS\r
+.sp\r
+ddstool append pathnames...\r
+.sp\r
+.RE\r
+To delete the old index-files and make a new label:\r
+.RS\r
+.sp\r
+ddstool new-label 'unique-string and more strings'\r
+.sp\r
+.RE\r
+Each index is stored by the pathnames:\r
+.RS\r
+.sp\r
+$A/$unique-string.$file-number (soft link)\r
+\r
+$A/$timestamp-of-the-tapelabel.$file-number (file)\r
+.sp\r
+.RE\r
+.SH AUTHOR\r
+This manual page was written by Christian Schwarz\r
+for the Debian GNU/Linux system.\r
--- /dev/null
+usr/bin
+usr/share/man/man1
--- /dev/null
+#!/usr/bin/make -f
+
+export DH_VERBOSE=1
+
+build: build-stamp
+build-stamp:
+ dh_testdir
+ make CFLAGS="-O2 -g -Wall"
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+ [ ! -f Makefile ] || make clean
+ dh_clean
+
+binary-indep: build
+
+binary-arch: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ make install DESTDIR=`pwd`/debian/dds2tar
+ install debian/scsi_vendor.bash debian/dds2tar/usr/bin/scsi_vendor
+ dh_installdocs
+ dh_installexamples
+ dh_installmenu
+ dh_installcron
+ dh_installmanpages
+ dh_undocumented
+ dh_installchangelogs
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_makeshlibs
+ dh_md5sums
+ dh_builddeb
+
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary
--- /dev/null
+.TH SCSI_VENDOR 1
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection\r
+.\" other parms are allowed: see man(7), man(1)\r
+.SH NAME\r
+scsi_vendor \- script displays SCSI vendors
+.SH SYNOPSIS\r
+.B scsi_vendor\r
+.I "[disk|tape|cd] [<num>] "\r
+.SH "DESCRIPTION"\r
+This manual page documents briefly the\r
+.BR scsi_vendor\r
+command.\r
+This manual page was written for the Debian GNU/Linux distribution\r
+(but may be used by others), because the original program does not\r
+have a manual page.\r
+.PP\r
+When run, the script will report the vendors of all or the specified types of
+SCSI devices on the system.
+.SH AUTHOR\r
+This manual page was written by Bdale Garbee
+for the Debian GNU/Linux system.\r
--- /dev/null
+#!/bin/bash
+#
+# Determine the Vendor of a device
+#
+# csh-Example:
+#
+# <1>scsi_vendor
+# Disks: SEAGATE SAMSUNG
+# Cdroms: TOSHIBA PHILIPS
+# Tapes: HP
+# <2>scsi_vendor disk
+# SEAGATE SAMSUNG
+# <383>scsi_vendor cd
+# TOSHIBA PHILIPS
+# <3>scsi_vendor tape
+# HP
+# <4>scsi_vendor tape 1
+# HP
+# <5>scsi_vendor disk 1
+# <6>scsi_vendor disk 1
+# SEAGATE
+# <7>scsi_vendor disk 2
+# SAMSUNG
+#
+# Ported to bash 01.07.03 <kieren@tigs.org>
+
+s=( )
+c=( )
+d=( )
+o=''
+v=''
+
+SCSIINFO=`grep '^ ' /proc/scsi/scsi | cut -c3-18`
+
+for i in $SCSIINFO
+do
+ if [ "$o" = "Vendor:" ]; then
+ v=$i
+ fi
+ if [[ "$o" == 'Type:' && "$i" == 'Sequenti' ]]; then
+ s=( $s $v )
+ fi
+ if [[ "$o" == 'Type:' && "$i" == 'CD-ROM' ]]; then
+ c=( $c $v )
+ fi
+ if [[ "$o" == 'Type:' && "$i" == 'Direct-A' ]]; then
+ d=( $d $v )
+ fi
+ o=$i
+done
+if [ $# == 0 ]; then
+ echo Disks: $d
+ echo Cdroms: $c
+ echo Tapes: $s
+ exit 0
+fi
+if [ $# == 1 ]; then
+ v='' ;
+ if [ "$1" == "disk" ]; then
+ echo $d
+ fi
+ if [ "$1" == "cd" ]; then
+ echo $c
+ fi
+ if [ "$1" == "tape" ]; then
+ echo $s
+ fi
+ exit 0
+fi
+if [ $# -eq 2 ]; then
+ v=''
+ if [[ "$1" == "disk" && ${#d[@]} -ge $2 ]]; then
+ v=$d[$2]
+ fi
+ if [[ "$1" == "cd" && ${#c[@]} -ge $2 ]]; then
+ v=$c[$2]
+ fi
+ if [[ "$1" == "tape" && ${#s[@]} -ge $2 ]]; then
+ v=${s[$2]}
+ fi
+ echo $v
+ exit 0
+fi
+if [ "$v" == "$3" ]; then
+ exit 2
+fi
+exit 1
+
-.TH mt-dds 1L 2.4 \" -*- nroff -*-
+.TH mt-dds 1 2.4 \" -*- nroff -*-
.\"----------
.SH NAME
.\"----------