From 7619eeb31af980bd92cb84c7b84dd0575aa62f05630d56e42174025296410f65 Mon Sep 17 00:00:00 2001 From: Kurt Garloff Date: Wed, 5 Oct 2011 12:36:13 +0000 Subject: [PATCH] - Update to dd_rescue-1.24: * Handle directory as output filename (append input basename). - Fix dd_rhelp.test script and add to %check. OBS-URL: https://build.opensuse.org/package/show/Base:System/dd_rescue?expand=0&rev=5 --- dd_rescue-1.23.tar.gz | 3 --- dd_rescue-1.24.tar.gz | 3 +++ dd_rescue.changes | 7 +++++++ dd_rescue.spec | 17 +++++++++++++---- dd_rhelp.test.diff | 31 +++++++++++++++++++++++++++++++ dd_rhelp_EOF.diff | 10 ++++++---- dd_rhelp_Summary.diff | 10 ++++++---- 7 files changed, 66 insertions(+), 15 deletions(-) delete mode 100644 dd_rescue-1.23.tar.gz create mode 100644 dd_rescue-1.24.tar.gz create mode 100644 dd_rhelp.test.diff diff --git a/dd_rescue-1.23.tar.gz b/dd_rescue-1.23.tar.gz deleted file mode 100644 index 367c316..0000000 --- a/dd_rescue-1.23.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:32ad435625de33a2e79983a057a780bb2566c7a0a33ec96facfb8fa775ba8de3 -size 30234 diff --git a/dd_rescue-1.24.tar.gz b/dd_rescue-1.24.tar.gz new file mode 100644 index 0000000..344f6b6 --- /dev/null +++ b/dd_rescue-1.24.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d11e33841d225cdb0596253948c14c9f6f12b33e00a1814217ec74ffa5e524b0 +size 21344 diff --git a/dd_rescue.changes b/dd_rescue.changes index c2a5fc4..a9b4569 100644 --- a/dd_rescue.changes +++ b/dd_rescue.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Oct 5 12:52:27 CEST 2011 - garloff@suse.de + +- Update to dd_rescue-1.24: + * Handle directory as output filename (append input basename). +- Fix dd_rhelp.test script and add to %check. + ------------------------------------------------------------------- Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de diff --git a/dd_rescue.spec b/dd_rescue.spec index 95d007c..c957a09 100644 --- a/dd_rescue.spec +++ b/dd_rescue.spec @@ -15,7 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -%define ddrescuever 1.23 +%define ddrescuever 1.24 %define ddrhelpver 0.1.2 Name: dd_rescue @@ -34,9 +34,11 @@ Patch0: ddresc-112.diff Patch1: dd_rhelp_EOF.diff # PATCH-FIX-OPENSUSE dd_rhelp_Summary.diff garloff@suse.de -- dd_rhelp adjusted for Summary change Patch2: dd_rhelp_Summary.diff +# PATCH-FIX-OPENSUSE dd_rhelp.test.diff garloff@suse.de -- Fix dd_rhelp.test script (basic regression test) +Patch3: dd_rhelp.test.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: libfallocate-devel-static +BuildRequires: libfallocate-devel-static bc Requires: bc Provides: ddrescue = %{ddrescuever} Obsoletes: ddrescue < %{ddrescuever} @@ -50,8 +52,9 @@ cat, and dd wail "abort" on every I/O error, dd_rescue does not. %setup -q -n dd_rescue -a1 cd dd_rhelp-%{ddrhelpver} %patch0 -%patch1 -%patch2 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 for name in AUTHORS COPYING ChangeLog FAQ NEWS README THANKS TODO; do cp -p $name ${name}.dd_rhelp done @@ -72,6 +75,12 @@ cd dd_rhelp-%{ddrhelpver} install -Dpm 0755 dd_rhelp %{buildroot}/bin cd .. +%check +cd dd_rhelp-%{ddrhelpver} +export PATH=..:$PATH +./dd_rhelp.test +cd .. + %files %defattr(-,root,root,-) %doc COPYING README.dd_rescue diff --git a/dd_rhelp.test.diff b/dd_rhelp.test.diff new file mode 100644 index 0000000..142f0f8 --- /dev/null +++ b/dd_rhelp.test.diff @@ -0,0 +1,31 @@ +--- dd_rhelp-0.1.2/dd_rhelp.test.orig 2009-04-21 23:49:27.000000000 +0200 ++++ dd_rhelp-0.1.2/dd_rhelp.test 2011-10-05 11:18:41.000000000 +0200 +@@ -1188,9 +1188,9 @@ function test_gnu_standards() { + assert "$tprog --help sends errorlevel 0" $tprog --help + assert "$tprog --version sends errorlevel 0" $tprog --version + +- assert "$tprog --version sends version info" matches \"$($tprog --version)\" \"$tprog ver\. [0-9]\+\.[0-9]\+\.[0-9]\+\" ++ assert "$tprog --version sends version info" matches \"$($tprog --version)\" \"$tprog ver\\. [0-9]\\+\\.[0-9]\\+\\.[0-9]\\+\" + +- assert "$tprog --help output contains info in first line" matches \"$($tprog --help | "$head" -n 1)\" \"$tprog ver\. [0-9]\+\.[0-9]\+\.[0-9]\+\" ++ assert "$tprog --help output contains info in first line" matches \"$($tprog --help | "$head" -n 1)\" \"$tprog ver\\. [0-9]\\+\\.[0-9]\\+\\.[0-9]\\+\" + + assert "$tprog --help info are the same than $tprog --help" [ \"$($tprog --help | "$head" -n 1)\" == \"$($tprog --version)\" ] + } +@@ -1305,6 +1305,7 @@ esac + + #!- + ++include parse + include pretty + include common + include shunit +@@ -1318,7 +1319,7 @@ tmp=/tmp + + export PATH=".:$PATH" + +-gnu_standards ++test_gnu_standards + + # + # Checking bad arguments diff --git a/dd_rhelp_EOF.diff b/dd_rhelp_EOF.diff index 2fbda3b..bc7c329 100644 --- a/dd_rhelp_EOF.diff +++ b/dd_rhelp_EOF.diff @@ -1,6 +1,8 @@ ---- dd_rhelp.orig 2011-05-14 20:17:10.782000079 +0300 -+++ dd_rhelp 2011-05-14 20:18:26.578000081 +0300 -@@ -906,7 +906,7 @@ +Index: dd_rhelp-0.1.2/dd_rhelp +=================================================================== +--- dd_rhelp-0.1.2.orig/dd_rhelp ++++ dd_rhelp-0.1.2/dd_rhelp +@@ -906,7 +906,7 @@ fi string="^Summary for $infile -> $outfile:" infoline="^dd_rescue: (info):" @@ -9,7 +11,7 @@ nb_stars=$[ $bar_lines * $COLUMNS ] # nb of char to display progress bar... # -@@ -990,7 +990,7 @@ +@@ -991,7 +991,7 @@ function get_valid_dd_rescue() { function get_eof() { diff --git a/dd_rhelp_Summary.diff b/dd_rhelp_Summary.diff index affa7f2..cbfda61 100644 --- a/dd_rhelp_Summary.diff +++ b/dd_rhelp_Summary.diff @@ -1,6 +1,8 @@ ---- dd_rhelp.orig 2011-05-14 20:18:26.578000081 +0300 -+++ dd_rhelp 2011-05-14 20:20:47.411000081 +0300 -@@ -904,7 +904,7 @@ +Index: dd_rhelp-0.1.2/dd_rhelp +=================================================================== +--- dd_rhelp-0.1.2.orig/dd_rhelp ++++ dd_rhelp-0.1.2/dd_rhelp +@@ -904,7 +904,7 @@ fi # regexp for parsing the log file. @@ -9,7 +11,7 @@ infoline="^dd_rescue: (info):" eofstring="$infoline .* ([0-9]\+\.[0-9]k): EOF.*\$" nb_stars=$[ $bar_lines * $COLUMNS ] # nb of char to display progress bar... -@@ -1471,7 +1471,7 @@ +@@ -1472,7 +1472,7 @@ function process_log() { [ "$DEBUG" == "on" ] && echo -n "- cleaning data [" # XXXVaab : bad if file is less that 0.1Ko length