diff --git a/.mt-st.metadata b/.mt-st.metadata new file mode 100644 index 0000000..2c1b97d --- /dev/null +++ b/.mt-st.metadata @@ -0,0 +1 @@ +e42d7fb0f57ccbd5c791e3b968e0a4573e7f9857 SOURCES/mt-st-1.1.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/mt-st-0.7-config-files.patch b/SOURCES/mt-st-0.7-config-files.patch new file mode 100644 index 0000000..756261b --- /dev/null +++ b/SOURCES/mt-st-0.7-config-files.patch @@ -0,0 +1,172 @@ +--- mt-st-0.8/stinit.def.examples.configfiles 2002-09-23 19:02:21.000000000 +0200 ++++ mt-st-0.8/stinit.def.examples 2005-04-07 08:21:01.732633520 +0200 +@@ -56,3 +56,169 @@ + mode3 blocksize=0 density=1 # 800 bpi + } + ++# DLT2000 / 2000XT ++manufacturer="QUANTUM" model = "DLT2000" { ++scsi2logical=1 ++can-bsr ++auto-lock=0 ++two-fms=0 ++drive-buffering=1 ++buffer-writes ++read-ahead=1 ++async-writes=1 ++can-partitions=0 ++fast-mteom=1 ++# ++# If your stinit supports the timeouts: ++timeout=3600 # 1 hour ++long-timeout=14400 # 4 hours ++# ++mode1 blocksize=0 density=0x81 # 10GB + compression on DLTtape III, 15+ with DLTtape IIIXT in 2000XT ++mode2 blocksize=0 density=0x80 # 10GB, no compression on DLTtape III, 15 with DLTtape IIIXT in 2000XT ++mode3 blocksize=0 density=0x18 # 6GB, compression not available, on DLTtape III ++mode4 blocksize=0 density=0x17 #2.6GB, compression not available, on DLTtape III ++} ++ ++# DLT4000 ++manufacturer="QUANTUM" model = "DLT4000" { ++scsi2logical=1 ++can-bsr ++auto-lock=0 ++two-fms=0 ++drive-buffering=1 ++buffer-writes ++read-ahead=1 ++async-writes=1 ++can-partitions=0 ++fast-mteom=1 ++# ++# If your stinit supports the timeouts: ++timeout=3600 # 1 hour ++long-timeout=14400 # 4 hours ++# ++# Drive is backwards compatible, use older modes (e.g. from above) as required ++mode1 blocksize=0 density=0x83 # 20GB + compression ++mode2 blocksize=0 density=0x82 # 20GB, no compression ++mode3 blocksize=0 density=0x81 # 10GB + compression (DLT2000 mode) with DLTtape III, 15+ with DLTtape IIIXT in 2000XT ++mode4 blocksize=0 density=0x80 # 10GB, no compression (DLT2000 mode) with DLTtape III, 15 with DLTtape IIIXT in 2000XT ++} ++ ++# DLT7000 ++manufacturer="QUANTUM" model = "DLT7000" { ++scsi2logical=1 ++can-bsr ++auto-lock=0 ++two-fms=0 ++drive-buffering=1 ++buffer-writes ++read-ahead=1 ++async-writes=1 ++can-partitions=0 ++fast-mteom=1 ++# ++# If your stinit supports the timeouts: ++timeout=3600 # 1 hour ++long-timeout=14400 # 4 hours ++# ++# Drive is backwards compatible, use older modes (e.g. from above) as required. ++mode1 blocksize=0 density=0x85 # 35GB + compression ++mode2 blocksize=0 density=0x84 # 35GB, no compression ++mode3 blocksize=0 density=0x83 # 20GB + compression (DLT4000 mode) ++mode4 blocksize=0 density=0x82 # 20GB, no compression (DLT4000 mode) ++} ++ ++# DLT8000 ++manufacturer="QUANTUM" model = "DLT8000" { ++scsi2logical=1 ++can-bsr=1 ++auto-lock=0 ++two-fms=0 ++drive-buffering=1 ++buffer-writes ++read-ahead=1 ++async-writes=1 ++can-partitions=0 ++fast-mteom=1 ++# ++# If your stinit supports the timeouts: ++timeout=3600 # 1 hour ++long-timeout=14400 # 4 hours ++# ++# Drive is backwards compatible to DLT7000, use older modes (e.g. from above) as required. Modes <10GB (<0x19) not supported! ++mode1 blocksize=0 density=0x89 # 40GB + compression ++mode2 blocksize=0 density=0x88 # 40GB, no compression ++mode3 blocksize=0 density=0x85 # 35GB + compression (DLT7000 mode) ++mode4 blocksize=0 density=0x84 # 35GB, no compression (DLT7000 mode) ++} ++ ++ ++# SDLT220 ++manufacturer="QUANTUM" model = "SuperDLT1" { ++scsi2logical=1 ++can-bsr=1 ++auto-lock=0 ++two-fms=0 ++drive-buffering=1 ++buffer-writes ++read-ahead=1 ++async-writes=1 ++can-partitions=0 ++fast-mteom=1 ++# ++# If your stinit supports the timeouts: ++timeout=3600 # 1 hour ++long-timeout=14400 # 4 hours ++# ++# Drive is backwards read compatible to DLT4000/7000/8000. Mode settings are only required for writing, so no need to define any other modes here. ++mode1 blocksize=0 density=0x48 compression=1 # 110 GB + compression ++mode2 blocksize=0 density=0x48 compression=0 # 110 GB, no ompression ++} ++ ++# SDLT320 ++manufacturer="QUANTUM" model = "SDLT320" { ++scsi2logical=1 ++can-bsr=1 ++auto-lock=0 ++two-fms=0 ++drive-buffering=1 ++buffer-writes ++read-ahead=1 ++async-writes=1 ++can-partitions=0 ++fast-mteom=1 ++# ++# If your stinit supports the timeouts: ++timeout=3600 # 1 hour ++long-timeout=14400 # 4 hours ++# ++# Drive is backwards write compatible to SDLT220 and read compatible to DLT4000/7000/8000. Mode settings are only required for writing, so we need only the SDL220/320 modes here ++mode1 blocksize=0 density=0x49 compression=1 # 160 GB + compression ++mode2 blocksize=0 density=0x49 compression=0 # 160 GB, no ompression ++mode3 blocksize=0 density=0x48 compression=1 # 110 GB + compression ++mode4 blocksize=0 density=0x48 compression=0 # 110 GB, no ompression ++} ++ ++# SDLT600 ++manufacturer="QUANTUM" model = "SDLT600" { ++scsi2logical=1 ++can-bsr=1 ++auto-lock=0 ++two-fms=0 ++drive-buffering=1 ++buffer-writes ++read-ahead=1 ++async-writes=1 ++can-partitions=0 ++fast-mteom=1 ++# ++# If your stinit supports the timeouts: ++timeout=3600 # 1 hour ++long-timeout=14400 # 4 hours ++# ++# Drive is backwards read compatible to SDLT220/320 and VS160. Mode settings are only required for writing, so we need only the native SDLT600 mode here. ++mode1 blocksize=0 density=0x4a compression=1 # 300 GB + compression ++mode2 blocksize=0 density=0x4a compression=0 # 300 GB, no ompression ++mode3 blocksize=0 density=0x4a compression=1 # 300 GB + compression ++mode4 blocksize=0 density=0x4a compression=0 # 300 GB, no ompression ++} ++ diff --git a/SOURCES/mt-st-0.9b-manfix.patch b/SOURCES/mt-st-0.9b-manfix.patch new file mode 100644 index 0000000..d22acef --- /dev/null +++ b/SOURCES/mt-st-0.9b-manfix.patch @@ -0,0 +1,31 @@ +--- mt-st-0.9b/mt.1.manfix 2005-08-21 20:53:50.000000000 +0200 ++++ mt-st-0.9b/mt.1 2005-10-25 12:13:43.000000000 +0200 +@@ -48,20 +48,22 @@ + files. + The tape is positioned on the first block of the next file. + .IP fsfm +-Forward space ++Forward space past + .I count +-files. +-The tape is positioned on the last block of the previous file. ++file marks, then backward space one file record. ++This leaves the tape positioned on the last block of the file that is count-1 ++files past the current file. + .IP bsf + Backward space + .I count + files. + The tape is positioned on the last block of the previous file. + .IP bsfm +-Backward space ++Backward space past + .I count +-files. +-The tape is positioned on the first block of the next file. ++file marks, then forward space one file record. ++This leaves the tape positioned on the first block of the file that is count-1 ++files before the current file. + .IP asf + The tape is positioned at the beginning of the + .I count diff --git a/SOURCES/mt-st-1.1-SDLT.patch b/SOURCES/mt-st-1.1-SDLT.patch new file mode 100644 index 0000000..3979f7f --- /dev/null +++ b/SOURCES/mt-st-1.1-SDLT.patch @@ -0,0 +1,11 @@ +--- mt-st-1.1/mt.c.sdlt 2008-04-27 18:49:00.000000000 +0200 ++++ mt-st-1.1/mt.c 2008-08-04 08:21:54.000000000 +0200 +@@ -225,6 +225,8 @@ + {0x45, "QIC-3095-MC (TR-4)"}, + {0x46, "LTO-4"}, + {0x47, "DDS-5 or TR-5"}, ++ {0x48, "Quantum SDLT220"}, ++ {0x49, "Quantum SDLT320"}, + {0x51, "IBM 3592 J1A"}, + {0x52, "IBM 3592 E05"}, + {0x80, "DLT 15GB uncomp. or Ecrix"}, diff --git a/SOURCES/mt-st-1.1-mtio.patch b/SOURCES/mt-st-1.1-mtio.patch new file mode 100644 index 0000000..ce89704 --- /dev/null +++ b/SOURCES/mt-st-1.1-mtio.patch @@ -0,0 +1,22 @@ +--- mt-st-1.1/mt.c.mtio 2008-08-04 08:24:45.000000000 +0200 ++++ mt-st-1.1/mt.c 2008-08-04 08:24:45.000000000 +0200 +@@ -23,7 +23,7 @@ + #include + #include + +-#include "mtio.h" ++#include + + #ifndef DEFTAPE + #define DEFTAPE "/dev/tape" /* default tape device */ +--- mt-st-1.1/stinit.c.mtio 2008-04-27 13:24:16.000000000 +0200 ++++ mt-st-1.1/stinit.c 2008-08-04 08:24:45.000000000 +0200 +@@ -22,7 +22,7 @@ + #include + #include + +-#include "mtio.h" ++#include + + #ifndef FALSE + #define TRUE 1 diff --git a/SOURCES/mt-st-1.1-options.patch b/SOURCES/mt-st-1.1-options.patch new file mode 100644 index 0000000..cf856cd --- /dev/null +++ b/SOURCES/mt-st-1.1-options.patch @@ -0,0 +1,12 @@ +diff -up mt-st-1.1/stinit.c.options mt-st-1.1/stinit.c +--- mt-st-1.1/stinit.c.options 2013-07-23 11:55:33.000000000 +0200 ++++ mt-st-1.1/stinit.c 2013-07-23 11:56:09.000000000 +0200 +@@ -889,7 +889,7 @@ define_tape(int tapeno, FILE *dbf, devde + usage(int retval) + { + fprintf(stderr, +- "Usage: stinit [-h] [-v] [-f dbname] [-p] [drivename_or_number ...]\n"); ++ "Usage: stinit [-h] [-v] [--version] [-f dbname] [-p] [-r] [drivename_or_number ...]\n"); + exit(retval); + } + diff --git a/SOURCES/mt-st-1.1-redhat.patch b/SOURCES/mt-st-1.1-redhat.patch new file mode 100644 index 0000000..f2f4385 --- /dev/null +++ b/SOURCES/mt-st-1.1-redhat.patch @@ -0,0 +1,32 @@ +--- mt-st-1.1/Makefile.redhat 2008-03-01 11:50:12.000000000 +0100 ++++ mt-st-1.1/Makefile 2008-08-04 08:20:01.000000000 +0200 +@@ -1,8 +1,9 @@ +-CFLAGS= -Wall -O2 +-SBINDIR= /sbin +-BINDIR= /bin +-USRBINDIR= /usr/bin +-MANDIR= /usr/share/man ++CFLAGS= $(RPM_OPT_FLAGS) ++SBINDIR= $(RPM_BUILD_ROOT)/usr/sbin ++BINDIR= $(RPM_BUILD_ROOT)/usr/bin ++USRBINDIR= $(RPM_BUILD_ROOT)/usr/bin ++MANDIR= $(RPM_BUILD_ROOT)/usr/share/man ++CC=gcc + + MTDIR=$(BINDIR) + +@@ -15,11 +16,12 @@ + $(CC) $(CFLAGS) -o stinit stinit.c + + install: mt stinit +- install -s mt $(MTDIR) ++ mkdir -p $(BINDIR) $(SBINDIR) $(MANDIR)/man1 $(MANDIR)/man8 ++ install -m 755 mt $(BINDIR) + install -c -m 444 mt.1 $(MANDIR)/man1 + (if [ -f $(MANDIR)/man1/mt.1.gz ] ; then \ + rm -f $(MANDIR)/man1/mt.1.gz; gzip $(MANDIR)/man1/mt.1; fi) +- install -s stinit $(SBINDIR) ++ install -m 755 stinit $(SBINDIR) + install -c -m 444 stinit.8 $(MANDIR)/man8 + (if [ -f $(MANDIR)/man8/stinit.8.gz ] ; then \ + rm -f $(MANDIR)/man8/stinit.8.gz; gzip $(MANDIR)/man8/stinit.8; fi) diff --git a/SOURCES/stinit.service b/SOURCES/stinit.service new file mode 100644 index 0000000..2e95078 --- /dev/null +++ b/SOURCES/stinit.service @@ -0,0 +1,10 @@ +[Unit] +Description=Initialize SCSI Tape Drives + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/sbin/stinit -f /etc/stinit.def + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/mt-st.spec b/SPECS/mt-st.spec new file mode 100644 index 0000000..a53618b --- /dev/null +++ b/SPECS/mt-st.spec @@ -0,0 +1,253 @@ +Summary: Tool for controlling tape drives +Name: mt-st +Version: 1.1 +Release: 11%{?dist} +License: GPL+ +Group: Applications/System +URL: ftp://ftp.ibiblio.org/pub/linux/system/backup +Source0: ftp://metalab.unc.edu/pub/Linux/system/backup/mt-st-%{version}.tar.gz +Source1: stinit.service +Patch0: mt-st-1.1-redhat.patch +Patch1: mt-st-1.1-SDLT.patch +Patch2: mt-st-0.7-config-files.patch +Patch3: mt-st-0.9b-manfix.patch +Patch4: mt-st-1.1-mtio.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=948457 +Patch5: mt-st-1.1-options.patch +BuildRequires: systemd +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%description +The mt-st package contains the mt and st tape drive management +programs. Mt (for magnetic tape drives) and st (for SCSI tape devices) +can control rewinding, ejecting, skipping files and blocks and more. + +Install mt-st if you need a tool to manage tape drives. + + +%prep +%setup -q +%patch0 -p1 -b .redhat +%patch1 -p1 -b .sdlt +%patch2 -p1 -b .configfiles +%patch3 -p1 -b .manfix +%patch4 -p1 -b .mtio +%patch5 -p1 -b .options + +# fix encoding +f=README.stinit +iconv -f ISO8859-1 -t UTF-8 -o $f.new $f +touch -r $f $f.new +mv $f.new $f + + +%build +make CFLAGS="$RPM_OPT_FLAGS" + + +%install +make install +install -D -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/stinit.service + + +%post +%systemd_post stinit.service + +%preun +%systemd_preun stinit.service + +%postun +%systemd_postun_with_restart stinit.service + + +%files +%doc COPYING README README.stinit mt-st-1.1.lsm stinit.def.examples +%{_bindir}/mt +%{_sbindir}/stinit +%{_mandir}/man[18]/* +%{_unitdir}/stinit.service + + +%changelog +* Tue Jul 23 2013 Dan Horák - 1.1-11 +- print all options in stinit's help (#948457) +- switch to systemd scriptlet macros + +* Thu Feb 14 2013 Fedora Release Engineering - 1.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Nov 20 2012 Dan Horák - 1.1-9 +- spec cleanup + +* Fri Jul 20 2012 Fedora Release Engineering - 1.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Apr 19 2012 Jon Ciesla - 1.1-7 +- Migrate to systemd, BZ 789926. + +* Fri Jan 13 2012 Fedora Release Engineering - 1.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 1.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Nov 26 2009 Dan Horák - 1.1-4 +- stinit initscript updated (#541592) +- fixed License + +* Sat Jul 25 2009 Fedora Release Engineering - 1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Aug 4 2008 Dan Horak - 1.1-1 +- update to upstream version 1.1 +- rebase patches + +* Mon May 26 2008 Radek Brich - 0.9b-6 +- add init script to call /sbin/stinit (#249665) + +* Tue Feb 19 2008 Fedora Release Engineering - 0.9b-5 +- Autorebuild for GCC 4.3 + +* Thu Aug 23 2007 Jindrich Novy - 0.9b-4 +- update License +- rebuild for BuildID + +* Wed Feb 7 2007 Jindrich Novy - 0.9b-3 +- spec fixes +- use mtio.h from kernel-headers instead of the mt-st one + +* Wed Jul 12 2006 Jesse Keating - 0.9b-2.2.2 +- rebuild + +* Fri Feb 10 2006 Jesse Keating - 0.9b-2.2.1 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 0.9b-2.2 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Tue Oct 25 2005 Jindrich Novy 0.9b-2 +- fix misleading description of "fsfm" and "bsfm" commands (#171340) + +* Thu Sep 22 2005 Jindrich Novy 0.9b-1 +- update to mt-st 0.9b + +* Thu Apr 7 2005 Jindrich Novy 0.8-5 +- add SDLT600 entry to stinit.def.examples, + suggested by Ralf-Peter Rohbeck (#153305) + +* Fri Mar 4 2005 Jindrich Novy 0.8-4 +- rebuilt with gcc4 + +* Thu Feb 10 2005 Jindrich Novy 0.8-3 +- remove -D_FORTIFY_SOURCE=2 from CFLAGS, present in RPM_OPT_FLAGS + +* Wed Feb 9 2005 Jindrich Novy 0.8-2 +- rebuilt with -D_FORTIFY_SOURCE=2 + +* Mon Aug 09 2004 Jindrich Novy 0.8-1 +- updated to 0.8 +- updated .redhat patch +- license fixup to GPL + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Mon May 26 2003 Than Ngo 0.7-11.1 +- add config file for Quantum DLT drive bug #91550 + +* Mon Feb 24 2003 Elliot Lee +- rebuilt + +* Sat Feb 22 2003 Than Ngo 0.7-9 +- add density code for Quantum SDLT320 from tibbs@math.uh.edu (#84843) + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Wed Dec 11 2002 Tim Powers 0.7-7 +- rebuild on all arches + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Wed Jun 19 2002 Than Ngo 0.7-5 +- don't forcibly strip binaries +- clean up a patch file + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Tue Feb 26 2002 Than Ngo 0.7-3 +- rebuild + +* Wed Feb 20 2002 Bernhard Rosenkraenzer 0.7-2 +- Add density code 0x48 for Quantum SDLT220 tape drive (#59442) + +* Tue Feb 19 2002 Bernhard Rosenkraenzer 0.7-1 +- Update to 0.7 + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Tue Apr 24 2001 Than Ngo +- update to 0.6, supports all ioctls up to kernel 2.4.0 + +* Thu Aug 17 2000 Jeff Johnson +- summaries from specspo. + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Wed Jun 14 2000 Jeff Johnson +- FHS packaging. + +* Sat Apr 15 2000 Jeff Johnson +- permit leading whitespace in config file. +- cortrect spelling error. + +* Mon Feb 7 2000 Bill Nottingham +- handle compressed manpages + +* Fri Jan 14 2000 Jeff Johnson +- rebuild for Red Hat 6.2. + +* Sun Sep 5 1999 Jeff Johnson +- enable "datcompression" command (#3654). + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 3) + +* Wed Feb 10 1999 Preston Brown +- upgrade to .5b, which fixes some cmd. line arg issues (bugzilla #18) + +* Thu Jul 23 1998 Jeff Johnson +- package for 5.2. + +* Sun Jul 19 1998 Andrea Borgia +- updated to version 0.5 +- removed the touch to force the build: no binaries are included! +- added to the docs: README.stinit, stinit.def.examples +- made buildroot capable + +* Mon Apr 27 1998 Prospector System +- translations modified for de, fr, tr + +* Mon Oct 20 1997 Donnie Barnes +- spec file cleanups + +* Thu Jun 19 1997 Erik Troan +- built against glibc