diff --git a/.gitignore b/.gitignore index 4a31338..e61bc97 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -mt-st-1.1.tar.gz +/mt-st-*.tar.gz diff --git a/mt-st-0.7-config-files.patch b/mt-st-0.7-config-files.patch deleted file mode 100644 index 756261b..0000000 --- a/mt-st-0.7-config-files.patch +++ /dev/null @@ -1,172 +0,0 @@ ---- 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/mt-st-0.9b-manfix.patch b/mt-st-0.9b-manfix.patch deleted file mode 100644 index d22acef..0000000 --- a/mt-st-0.9b-manfix.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- 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/mt-st-1.1-SDLT.patch b/mt-st-1.1-SDLT.patch deleted file mode 100644 index 3979f7f..0000000 --- a/mt-st-1.1-SDLT.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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/mt-st-1.1-include.patch b/mt-st-1.1-include.patch deleted file mode 100644 index 678fdda..0000000 --- a/mt-st-1.1-include.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- mt-st-1.1/mt.c.mtio 2018-05-29 08:26:16.874145539 +0200 -+++ mt-st-1.1/mt.c 2018-05-29 08:32:03.940573221 +0200 -@@ -22,8 +22,9 @@ - #include - #include - #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/mt-st-1.1-man.patch b/mt-st-1.1-man.patch deleted file mode 100644 index ae91b75..0000000 --- a/mt-st-1.1-man.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 78c0868407b59bbfdd1301fe5c1b57831b53c26e Mon Sep 17 00:00:00 2001 -From: Jan Chaloupka -Date: Thu, 21 Aug 2014 12:46:44 +0200 -Subject: [PATCH] mt missing options section - ---- - mt.1 | 33 ++++++++++++++++++--------------- - 1 file changed, 18 insertions(+), 15 deletions(-) - -diff --git a/mt.1 b/mt.1 -index 8ff5b63..7dccdee 100644 ---- a/mt.1 -+++ b/mt.1 -@@ -13,21 +13,7 @@ performs the given - which must be one of the tape operations listed below, on a tape - drive. The commands can also be listed by running the program with the - .I \-h --option. The version of mt is printed with the --.I \-v --or --.I \-\-version --option. The path of the tape device on which to operate can be given with --the --.I \-f --or --.I \-t --option. If neither of those options is given, and the environment --variable --.B TAPE --is set, it is used. Otherwise, a default device defined in the file --.I /usr/include/sys/mtio.h --is used. -+option. - .PP - Some operations optionally take an argument or repeat count, which can be given - after the operation name and defaults to 1. The postfix -@@ -275,6 +261,23 @@ set the cleaning request interpretation parameters. - exits with a status of 0 if the operation succeeded, 1 if the - operation or device name given was invalid, or 2 if the operation - failed. -+.SH OPTIONS -+.TP -+.B \-h, \-\-help -+Print a usage message on standard output and exit successfully. -+.TP -+.B \-v, \-\-version -+Print version of mt. -+.TP -+.B \-f, \-t -+The path of the tape device on which to operate. -+If neither of those options is given, -+and the environment variable -+.B TAPE -+is set, it is used. -+Otherwise, a default device defined in the file -+.I /usr/include/sys/mtio.h -+is used. - .SH AUTHOR - The program is written by Kai Makisara . - .SH COPYRIGHT --- -1.9.3 - diff --git a/mt-st-1.1-options.patch b/mt-st-1.1-options.patch deleted file mode 100644 index cf856cd..0000000 --- a/mt-st-1.1-options.patch +++ /dev/null @@ -1,12 +0,0 @@ -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/mt-st-1.1-redhat.patch b/mt-st-1.1-redhat.patch deleted file mode 100644 index f2f4385..0000000 --- a/mt-st-1.1-redhat.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- 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/mt-st-1.3-make.patch b/mt-st-1.3-make.patch new file mode 100644 index 0000000..c1ff296 --- /dev/null +++ b/mt-st-1.3-make.patch @@ -0,0 +1,83 @@ +From 006673f4a5abd301bb519cd20fbbf2b853af4065 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20Hor=C3=A1k?= +Date: Fri, 26 Jun 2020 11:24:03 +0200 +Subject: [PATCH 1/2] don't strip binaries on installation + +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 2a9aed5..2d0c0a3 100644 +--- a/Makefile ++++ b/Makefile +@@ -39,11 +39,11 @@ version.h: Makefile + + install: $(PROGS) + install -d $(BINDIR) $(SBINDIR) $(MANDIR) $(MANDIR)/man1 $(MANDIR)/man8 +- install -s mt $(BINDIR) ++ install mt $(BINDIR) + install -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 stinit $(SBINDIR) + install -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) +-- +2.21.3 + + +From 4b61902077bc4733f7043a5a372d3e91f17860d5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20Hor=C3=A1k?= +Date: Fri, 26 Jun 2020 11:26:30 +0200 +Subject: [PATCH 2/2] use a variable for the install tool + +--- + Makefile | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index 2d0c0a3..4d22f00 100644 +--- a/Makefile ++++ b/Makefile +@@ -6,6 +6,7 @@ BINDIR= $(DESTDIR)$(EXEC_PREFIX)/bin + DATAROOTDIR= $(DESTDIR)/$(PREFIX)/share + MANDIR= $(DATAROOTDIR)/man + DEFTAPE?= /dev/tape ++INSTALL= install + + PROGS=mt stinit + +@@ -38,13 +39,13 @@ version.h: Makefile + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DDEFTAPE='"$(DEFTAPE)"' -o $@ $< + + install: $(PROGS) +- install -d $(BINDIR) $(SBINDIR) $(MANDIR) $(MANDIR)/man1 $(MANDIR)/man8 +- install mt $(BINDIR) +- install -m 444 mt.1 $(MANDIR)/man1 ++ $(INSTALL) -d $(BINDIR) $(SBINDIR) $(MANDIR) $(MANDIR)/man1 $(MANDIR)/man8 ++ $(INSTALL) mt $(BINDIR) ++ $(INSTALL) -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 stinit $(SBINDIR) +- install -m 444 stinit.8 $(MANDIR)/man8 ++ $(INSTALL) stinit $(SBINDIR) ++ $(INSTALL) -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) + +@@ -54,7 +55,7 @@ dist: + trap "rm -rf $$BASE" EXIT && \ + DIST="$$BASE/$(RELEASEDIR)" && \ + mkdir "$$DIST" && \ +- install -m 0644 -p -t "$$DIST/" $(DISTFILES) && \ ++ $(INSTALL) -m 0644 -p -t "$$DIST/" $(DISTFILES) && \ + tar czvf $(TARFILE) -C "$$BASE" \ + --owner root --group root \ + $(RELEASEDIR) +-- +2.21.3 + diff --git a/mt-st.spec b/mt-st.spec index 2e8dc3c..5de9b55 100644 --- a/mt-st.spec +++ b/mt-st.spec @@ -1,19 +1,13 @@ Summary: Tool for controlling tape drives Name: mt-st -Version: 1.1 -Release: 26%{?dist} +Version: 1.3 +Release: 1%{?dist} License: GPL+ -URL: ftp://ftp.ibiblio.org/pub/linux/system/backup -Source0: ftp://metalab.unc.edu/pub/Linux/system/backup/mt-st-%{version}.tar.gz +URL: https://github.com/iustin/mt-st +Source0: https://github.com/iustin/mt-st/releases/download/%{name}-%{version}/%{name}-%{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-include.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=948457 -Patch5: mt-st-1.1-options.patch -Patch6: mt-st-1.1-man.patch +# https://github.com/iustin/mt-st/pull/18 +Patch0: mt-st-1.3-make.patch BuildRequires: gcc BuildRequires: systemd Requires(post): systemd @@ -31,20 +25,14 @@ Install mt-st if you need a tool to manage tape drives. %prep %autosetup -p1 -# 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="%{build_cflags} %{build_ldflags}" +make CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" %install -make install -install -D -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/stinit.service +%make_install EXEC_PREFIX=/usr +install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/stinit.service %post @@ -58,14 +46,18 @@ install -D -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/stinit.service %files -%doc COPYING README README.stinit mt-st-1.1.lsm stinit.def.examples +%doc COPYING README.md stinit.def.examples %{_bindir}/mt %{_sbindir}/stinit -%{_mandir}/man[18]/* +%{_mandir}/man1/mt.1* +%{_mandir}/man8/stinit.8* %{_unitdir}/stinit.service %changelog +* Fri Jun 26 2020 Dan HorĂ¡k - 1.3-1 +- rebased to 1.3 (#1849416) + * Wed Jan 29 2020 Fedora Release Engineering - 1.1-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index 1dbccc1..34929a9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fdd5f5ec673c9f630a102ceff7612774 mt-st-1.1.tar.gz +SHA512 (mt-st-1.3.tar.gz) = 1d026ae85e1ca367e72f1810042314070f592306d9ddec331b95ea4e1153dc3edee68d8798bdf7e055a4cf9c67ec8c539e5d188e87f0546f48b5f4ee4bc6a820