From b53fd4699bf8d86edb47ed13b1d124c709394ab3 Mon Sep 17 00:00:00 2001 From: Josef Ridky Date: Thu, 11 Aug 2016 10:38:13 +0200 Subject: [PATCH] Resolves: #1366133 - fix issue with ignoring -Q flag --- dump-q-option.patch | 34 ++++++++++++++++++++++++++++++++++ dump.spec | 7 ++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 dump-q-option.patch diff --git a/dump-q-option.patch b/dump-q-option.patch new file mode 100644 index 0000000..401b220 --- /dev/null +++ b/dump-q-option.patch @@ -0,0 +1,34 @@ +diff -urNp origin-dump-0.4b45/common/legacy_indexer.c new-dump-0.4b45/common/legacy_indexer.c +--- origin-dump-0.4b45/common/legacy_indexer.c 2016-05-09 07:49:56.000000000 +0200 ++++ new-dump-0.4b45/common/legacy_indexer.c 2016-08-11 10:33:33.818048593 +0200 +@@ -57,8 +57,8 @@ int magtapeout; /* is output a magnetic + //extern int magtapeout; /* is output a magnetic tape? */ + + static int gtperr = 0; +-static int gTapeposfd; +-static char *gTapeposfile; ++static int gTapeposfd = -1; /* code below assumes fd >= 0 means do print */ ++const char *gTapeposfile; + static char gTps[255]; + static int32_t gThisDumpDate; + #endif /* USE_QFA */ +diff -urNp origin-dump-0.4b45/dump/main.c new-dump-0.4b45/dump/main.c +--- origin-dump-0.4b45/dump/main.c 2016-05-09 07:46:35.000000000 +0200 ++++ new-dump-0.4b45/dump/main.c 2016-08-11 10:31:59.651565976 +0200 +@@ -159,6 +159,7 @@ int ntrec = NTREC; /* # blocks in each t + int cartridge = 0; /* Assume non-cartridge tape */ + #ifdef USE_QFA + int tapepos = 0; /* assume no QFA tapeposition needed by user */ ++extern const char *gTapeposfile; + #endif /* USE_QFA */ + int dokerberos = 0; /* Use Kerberos authentication */ + long dev_bsize = 1; /* recalculated below */ +@@ -401,7 +402,7 @@ main(int argc, char *argv[]) + + #ifdef USE_QFA + case 'Q': /* create tapeposfile */ +- //gTapeposfile = optarg; // FIXME - communicate filename to indexer. ++ gTapeposfile = optarg; + tapepos = 1; + break; + #endif /* USE_QFA */ diff --git a/dump.spec b/dump.spec index 15bde1b..afb9a2a 100644 --- a/dump.spec +++ b/dump.spec @@ -5,7 +5,7 @@ Summary: Programs for backing up and restoring ext2/ext3/ext4 filesystems Name: dump Epoch: 1 Version: 0.4 -Release: 0.28.%{PREVER}%{?dist} +Release: 0.29.%{PREVER}%{?dist} License: BSD Group: Applications/Archiving URL: http://dump.sourceforge.net/ @@ -26,6 +26,7 @@ Provides: dump-static Patch0: dump-buildfix.patch Patch1: dump-remove-lzo.patch Patch2: dump-baduuid.patch +Patch3: dump-q-option.patch %description The dump package contains both dump and restore. Dump examines files @@ -45,6 +46,7 @@ restoring filesystems after backups. %patch0 -p1 -b .buildfix %patch1 -p1 -b .remove-lzo %patch2 -p1 -b .baduuid +%patch3 -p1 -b .qoption for i in MAINTAINERS COPYING ChangeLog; do iconv -f iso-8859-1 -t utf-8 $i -o $i.new @@ -111,6 +113,9 @@ rm -rf %{buildroot} %{_mandir}/man8/rrestore.8* %changelog +* Thu Aug 11 2016 Josef Ridky - 1:0.4-0.29.b45 +- Fix issue with ignoring -Q flag (#1366133) + * Sat Jul 30 2016 Peter Robinson 1:0.4-0.28.b45 - Restore higher Release so upgrade path works for pre-release