Accepting request 52034 from devel:openSUSE:Factory

Accepted submit request 52034 from user coolo

OBS-URL: https://build.opensuse.org/request/show/52034
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dd_rescue?expand=0&rev=1
This commit is contained in:
Ruediger Oertel 2010-11-05 16:21:02 +00:00 committed by Git OBS Bridge
commit a85a6326b1
10 changed files with 559 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
dd_rescue-1.23.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:32ad435625de33a2e79983a057a780bb2566c7a0a33ec96facfb8fa775ba8de3
size 30234

217
dd_rescue.changes Normal file
View File

@ -0,0 +1,217 @@
-------------------------------------------------------------------
Tue Nov 2 23:55:27 CET 2010 - garloff@suse.de
- Move autoconf/configure stuff to %build section.
-------------------------------------------------------------------
Thu Oct 14 11:22:30 CEST 2010 - garloff@suse.de
- Adapt BuildRequires to new naming of libfallocate-devel-static.
-------------------------------------------------------------------
Mon Oct 11 23:23:50 CEST 2010 - garloff@suse.de
- dd_rescue-1.23:
* A short read (because of EOF) is not regarded an error anymore.
This fixes confusing exit codes as well as non-quietness for -q.
* We now REALLY default to -y0.
-------------------------------------------------------------------
Thu Sep 9 01:04:55 CEST 2010 - garloff@suse.de
- dd_rescue-1.22:
* Display compiler, compile time, enabled options.
* If hardbs == softbs, don't repeat copy attempts.
* Fix FPE in progress bar for non-seekable input reverse copy.
* Document some of the goodies in the README.
* Make code more digestable for non-GCC compilers, optional
fallbacks for strsignal, pread, pwrite.
-------------------------------------------------------------------
Mon Aug 30 23:46:30 CEST 2010 - garloff@suse.de
- dd_rescue 1.21:
* Display warnings when using sparse writing.
-------------------------------------------------------------------
Sun Aug 22 16:56:51 CEST 2010 - garloff@suse.de
- dd_rescue 1.20:
* Update docs to document the overwrite disk with itself case
* Also display progress bar if we know that the copy size due
to -m.
-------------------------------------------------------------------
Sat Aug 21 21:23:19 CEST 2010 - garloff@suse.de
- Really fix dd_rhelp to not break on new Summary line.
-------------------------------------------------------------------
Sat Aug 21 19:11:18 CEST 2010 - garloff@suse.de
- Update to dd_rescue-1.19:
* Fix 32bit screwup with display of total amount of date to copy
* Support fallocate (using libfallocate) with -P (Prealloc)
* More consistent use of ddrescue: (info): prefix (splice, Summary)
* dd_rhelp adjusted for Summary change.
-------------------------------------------------------------------
Fri Aug 13 23:18:30 CEST 2010 - garloff@suse.de
- Update to dd_rescue-1.18:
* Change default for sync to -y0.
- Update to dd_rescue-1.17:
* Display progress bar, percent completion and ETA
* Better estimte current vs. avg speed
* Exit on ENOSPC on target
* Warn ONCE on EINVAL for fsync
- Update to dd_rescue-1.16:
* Determine and display total amount of data to copy
-------------------------------------------------------------------
Fri Aug 13 21:45:00 CEST 2010 - garloff@suse.de
- Adjust dd_rhelp to changes in dd_rescue.
-------------------------------------------------------------------
Fri Aug 13 18:06:17 CEST 2010 - garloff@suse.de
- Update to dd_rescue-1.15:
* Support for splice() to do zerocopy file copies
* Better information on warnings and errors
* Avoid repeated warning on fsync returning EINVAL
-------------------------------------------------------------------
Fri Aug 13 17:59:31 CEST 2010 - garloff@suse.de
- Rename package to dd_rescue.
-------------------------------------------------------------------
Wed Aug 29 23:04:53 CEST 2007 - garloff@suse.de
- Update to dd_rescue-1.14:
* Fix bug with sparse (-a) mode that could lead to the target
file not having the correct size.
-------------------------------------------------------------------
Mon Mar 19 06:34:24 CET 2007 - garloff@suse.de
- Update to dd_rescue-1.13:
* Write full block of '0' for read errors and non-seekable
output. (#255671)
-------------------------------------------------------------------
Tue Nov 7 00:59:36 CET 2006 - garloff@suse.de
- dd_rhelp: head/tail require -n option (thanks to Bryant Ling)
- dd_rhelp: Use -y0 if ddrescue is 1.12 or newer.
- dd_rhelp: Require bc.
-------------------------------------------------------------------
Sat Jul 29 00:39:45 CEST 2006 - garloff@suse.de
- Update to dd_rescue-1.12:
* Option -b: Log bad blocks to ASCII file
* Option -y: Change fsync frequency (performance)
-------------------------------------------------------------------
Mon May 22 21:03:22 CEST 2006 - schwab@suse.de
- Don't strip binaries.
-------------------------------------------------------------------
Wed Jan 25 21:35:25 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Mon Feb 21 12:23:08 CET 2005 - garloff@suse.de
- Add autoreconf to dd_rhelp.
-------------------------------------------------------------------
Mon Feb 14 01:28:51 CET 2005 - garloff@suse.de
- Update to dd_rescue-1.11:
* O_DIRECT needs aligned buffers (Raymund Will)
* Compile fix for systems without O_DIRECT
- Update to dd_rhelp 0.06
-------------------------------------------------------------------
Sun Aug 29 01:07:20 CEST 2004 - garloff@suse.de
- Update to dd_rescue-1.10:
* Support for non-seekable in-/output (pipes).
-------------------------------------------------------------------
Sun Aug 29 00:59:42 CEST 2004 - garloff@suse.de
- Update to dd_rescue-1.04:
* Include fix from Lab Valentin for dd_rhelp
* Fix CPU load display overflow
* Default soft block size now 64k instead of 16k
* O_DIRECT supported (-d/-D)
* option -p to copy permissions/owner/times
- Include dd_rhelp script (0.0.5) from Lab Valentin.
-------------------------------------------------------------------
Thu Jul 26 14:53:25 MEST 2001 - garloff@suse.de
- Update to version 1.02:
* Better handling of partially successful reads.
* Don't loop on EFBIG when writing.
* Avoid errno checking if not necessary.
-------------------------------------------------------------------
Mon Apr 30 16:11:45 MEST 2001 - garloff@suse.de
- Bugfix release 1.01:
* Don't loop trying to write to full partition (ENOSPC)
* Fix compiler format warning (\% -> %%)
* Add lots of const qualifiers
* Optimize block zero checking routine
-------------------------------------------------------------------
Fri Feb 9 17:32:56 MET 2001 - garloff@suse.de
- #include <stdarg.h> to fix compilation error on variadic fns
-------------------------------------------------------------------
Sat Dec 9 18:25:20 MET 2000 - nashif@suse.de
- sorted
-------------------------------------------------------------------
Wed Aug 30 22:59:45 CEST 2000 - garloff@suse.de
- Update to 1.00: Some preparation for supporting non-seekable
in- or output. No support yet: Print warning and abort.
-------------------------------------------------------------------
Sat May 27 00:18:42 CEST 2000 - garloff@suse.de
- Update to 0.99: Use stderr to print messages instead of stdout
- Prepare allowing - as stdin/stdout (but pread/pwrite() will fail)
- Fix spelling in README
- Use BuildRoot
-------------------------------------------------------------------
Fri Jan 14 18:14:17 CET 2000 - garloff@suse.de
- Fixed README.dd_rescue.
-------------------------------------------------------------------
Wed Oct 27 03:42:25 CEST 1999 - garloff@suse.de
- Removed flushb. It belongs into util-linux.
-------------------------------------------------------------------
Wed Oct 20 01:47:59 CEST 1999 - garloff@suse.de
- Fixed typo in help. (b <-> B)
-------------------------------------------------------------------
Fri Oct 15 15:57:27 CEST 1999 - garloff@suse.de
- Initial release: 0.98.

87
dd_rescue.spec Normal file
View File

@ -0,0 +1,87 @@
#
# spec file for package ddrescue (Version 1.23_0.0.6)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: dd_rescue
%define ddrescuever 1.23
%define ddrhelpver 0.0.6
Version: 1.23_0.0.6
Release: 1
License: GNU General Public License (GPL) v2 or v3
Group: System/Base
#Provides: ddrescue = 1.23
#Obsoletes: ddrescue < 1.15
Autoreqprov: on
Requires: bc
BuildRequires: libfallocate-devel-static
Summary: Data Copying in the Presence of I/O Errors
Source: http://www.garloff.de/kurt/linux/ddrescue/dd_rescue-%{ddrescuever}.tar.gz
Source1: dd_rhelp-%{ddrhelpver}.tar.gz
#Patch: dd_rescue-%{version}.diff
Patch2: dd_rhelp_src.diff
Patch3: ddresc-112.diff
Patch4: dd_rhelp_EOF.diff
Patch5: dd_rhelp_Summary.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
dd_rescue helps when nothing else can: your disk has crashed and you
try to copy it over to another one. While standard Unix tools like cp,
cat, and dd wail "abort" on every I/O error, dd_rescue does not.
Authors:
--------
Kurt Garloff <garloff@suse.de>
%prep
%setup -n dd_rescue -b1
#%patch -p1
cd ../dd_rhelp-%{ddrhelpver}
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
for name in FAQ NEWS README THANKS TODO; do
cp -p $name ${name}.dd_rhelp
done
%build
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" libfalloc-static LIBDIR=%{_libdir}
cd ../dd_rhelp-%{ddrhelpver}
# Ubuntu needs this
%if 0%{?xubuntu_version} != 0
automake --add-missing
%endif
autoreconf
./configure
make
%install
make install DESTDIR=$RPM_BUILD_ROOT INSTASROOT= INSTALLFLAGS=
cd ../dd_rhelp-%{ddrhelpver}
make install DESTDIR=$RPM_BUILD_ROOT bindir=/bin
%files
%defattr(-,root,root)
/bin/dd_rescue
/bin/dd_rhelp
%doc README.dd_rescue
%doc ../dd_rhelp-%{ddrhelpver}/*.dd_rhelp
%doc ../dd_rhelp-%{ddrhelpver}/doc
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/dd_rescue
%changelog
* Fri Oct 15 1999 - garloff@suse.de
- Initial release: 0.98.

3
dd_rhelp-0.0.6.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5c3f88a37c163d46ebeda054215c4f407857c5a99a9a962646c5d894c07c89fe
size 67098

26
dd_rhelp_EOF.diff Normal file
View File

@ -0,0 +1,26 @@
Index: dd_rhelp-0.0.6/src/dd_rhelp-sh
===================================================================
--- dd_rhelp-0.0.6.orig/src/dd_rhelp-sh
+++ dd_rhelp-0.0.6/src/dd_rhelp-sh
@@ -191,9 +191,9 @@ fi
# regexp for parsing the log file.
string="^Summary for $infile -> $outfile:"
infoline="^dd_rescue: (info):"
-eofstring="$infoline $infile ([0-9]\+\.[0-9]k): EOF\$"
+eofstring="$infoline .* ([0-9]\+\.[0-9]k): EOF.*\$"
nb_stars=$[ $bar_lines * $COLUMNS ] # nb of char to display progress bar...
#
# === Functions
@@ -314,9 +314,9 @@ function bc_calc ()
# or 'nb' where nb is best EOF found
function get_eof()
{
- eoflines="$("${CAT}" "$logfile" | "$tr" -d "\\r" | "$GREP" "$eofstring" | "$SED" 's/^dd_rescue: (info): .* (\([0-9\.]\+\)k): EOF$/\1/g')"
+ eoflines="$("${CAT}" "$logfile" | "$tr" -d "\\r" | "$GREP" "$eofstring" | "$SED" 's/^dd_rescue: (info): .* (\([0-9\.]\+\)k): EOF.*$/\1/g')"
eof="nothing"
for i in $eoflines

22
dd_rhelp_Summary.diff Normal file
View File

@ -0,0 +1,22 @@
Index: dd_rhelp-0.0.6/src/dd_rhelp-sh
===================================================================
--- dd_rhelp-0.0.6.orig/src/dd_rhelp-sh
+++ dd_rhelp-0.0.6/src/dd_rhelp-sh
@@ -190,7 +190,7 @@ fi
# regexp for parsing the log file.
-string="^Summary for $infile -> $outfile:"
+string="^dd_rescue: (info): Summary for $infile -> $outfile:"
infoline="^dd_rescue: (info):"
eofstring="$infoline .* ([0-9]\+\.[0-9]k): EOF.*\$"
nb_stars=$[ $bar_lines * $COLUMNS ] # nb of char to display progress bar...
@@ -753,7 +753,7 @@ function process_log()
test -z data && return 0
[ "$DEBUG" == "on" ] && echo -n "- cleaning data ["
- data=$(echo "$data" | "$GREP" -v "xferd: \+0.0k$")
+ data=$(echo "$data" | "$GREP" -v "xferd: \+0.0k$" | "$GREP" -v "$string")
[ "$DEBUG" == "on" ] && echo -n "."
data=$(echo "$data" | "$GREP" "$infoline" -A 1 | "${CUT}" -c 12-)
[ "$DEBUG" == "on" ] && echo -n "."

157
dd_rhelp_src.diff Normal file
View File

@ -0,0 +1,157 @@
Index: dd_rhelp-0.0.6/src/dd_rhelp-sh
===================================================================
--- dd_rhelp-0.0.6.orig/src/dd_rhelp-sh
+++ dd_rhelp-0.0.6/src/dd_rhelp-sh
@@ -225,9 +225,9 @@ function get_valid_dd_rescue
else
[ "$DEBUG" == "on" ] && echo "BAD !" >&2
fi
- path="$(dirname $(type -ap "$0" | "${TAIL}" -1))/dd_rescue"
+ path="$(dirname $(type -ap "$0" | "${TAIL}" -n 1))/dd_rescue"
if [ -x "$path" ] ;then
version=$("$path" -V 2>&1 | grep "dd_rescue Version" | cut -f 3 -d " " |
cut -f 1 -d ",")
@@ -356,9 +356,9 @@ function add_chunk()
while test "$parsechunk"
do
# get first chunk already marked.
- i="$(echo "$parsechunk" | "${HEAD}" -1 )"
+ i="$(echo "$parsechunk" | "${HEAD}" -n 1 )"
# pull the two bounds
i_start="$(echo "$i" | "${CUT}" -f 1 -d "-")"
i_stop="$(echo "$i" | "${CUT}" -f 2 -d "-")"
@@ -371,9 +371,9 @@ function add_chunk()
then
# new chunk doesn't overlap with current chunk
# Iterate, put current chunk in $goodchunk.
goodchunk="$(echo -en "$goodchunk\n$i")"
- parsechunk="$(echo "$parsechunk" | "${TAIL}" +2)"
+ parsechunk="$(echo "$parsechunk" | "${TAIL}" -n +2)"
continue
fi
# new chunk ends before current chunk start ?
@@ -407,18 +407,18 @@ function add_chunk()
# new chunk contains entirely current chunk
if [ "$as_int" == "0" ] && [ "$ae_int" == "0" ]
then
# we forget about current chunk, and iterate.
- parsechunk=$(echo "$parsechunk" | "${TAIL}" +2)
+ parsechunk=$(echo "$parsechunk" | "${TAIL}" -n +2)
continue
fi
# new chunk overlap on its end with beginning of current chunk
if [ "$as_int" == "0" ] && [ "$ae_int" == "1" ]
then
# grow new chunk to englobe current chunk.
arg_stop=$i_stop
- parsechunk=$(echo "$parsechunk" | "${TAIL}" +2)
+ parsechunk=$(echo "$parsechunk" | "${TAIL}" -n +2)
break; # we can break because chunk are sorted.
fi
@@ -426,9 +426,9 @@ function add_chunk()
if [ "$as_int" == "1" ] && [ "$ae_int" == "0" ]
then
# grow new chunk to englobe current chunk.
arg_start=$i_start
- parsechunk=$(echo "$parsechunk" | "${TAIL}" +2)
+ parsechunk=$(echo "$parsechunk" | "${TAIL}" -n +2)
continue; # new chunk might overlap more chunks
fi
done
@@ -455,9 +455,9 @@ function get_next_pos()
# finding last's chunk end.
if test "$chunk" ;then
- last_chunk=$(echo "$chunk" | "${TAIL}" -1 )
+ last_chunk=$(echo "$chunk" | "${TAIL}" -n 1 )
max_stop=$(echo "$last_chunk" | "${CUT}" -f 2 -d "-")
else
max_stop=0
fi
@@ -504,9 +504,9 @@ function get_next_pos()
# changes $logcontent, $chunk, $eof
function swallow_last_summary()
{
# last summary of log (4 lines output by printreport())
- last_logcontent=$("${CAT}" "$logfile" | "$tr" -d "\\r" | "$GREP" "$string" -A 3 | "${TAIL}" -4)
+ last_logcontent=$("${CAT}" "$logfile" | "$tr" -d "\\r" | "$GREP" "$string" -A 3 | "${TAIL}" -n 4)
process_log "$last_logcontent"
get_eof
@@ -518,9 +518,9 @@ function swallow_last_summary()
function get_last_chunk()
{
if test "$chunk"; then
- last_chunk="$(echo "$chunk" | "${TAIL}" -1 )"
+ last_chunk="$(echo "$chunk" | "${TAIL}" -n 1 )"
echo "$last_chunk" | "${CUT}" -f 2 -d "-"
else
echo 0
fi
@@ -684,10 +684,10 @@ function show_info()
total_xferd="0";
while test "$parsing"
do
- firstline="$(echo "$parsing" | "${HEAD}" -1)"
- parsing="$(echo "$parsing" | "${TAIL}" +2)"
+ firstline="$(echo "$parsing" | "${HEAD}" -n 1)"
+ parsing="$(echo "$parsing" | "${TAIL}" -n +2)"
xferd="$(echo "$firstline" | "${CUT}" -f 2 -d ":" | "${CUT}" -f 2 -d "=")"
errxfer="$(echo "$firstline" | "${CUT}" -f 4 -d ":" | "${CUT}" -f 2 -d "=")"
succxfer="$(echo "$firstline" | "${CUT}" -f 5 -d ":" | "${CUT}" -f 2 -d "=")"
@@ -776,10 +776,10 @@ function process_log()
parsing="$data"
# chunk=""
while test "$parsing" ;do
- firstline="$(echo "$parsing" | "${HEAD}" -1)"
- parsing="$(echo "$parsing" | "${TAIL}" +2)"
+ firstline="$(echo "$parsing" | "${HEAD}" -n 1)"
+ parsing="$(echo "$parsing" | "${TAIL}" -n +2)"
ipos="$(echo $firstline | "${CUT}" -f 1 -d ":" | "${CUT}" -f 2 -d "=")"
xferd="$(echo $firstline | "${CUT}" -f 2 -d ":" | "${CUT}" -f 2 -d "=")"
rev="$(echo $firstline | "${CUT}" -f 3 -d ":")"
@@ -814,21 +814,21 @@ function load_log()
#
# loading into memory Summary info found in log file...
#
# line number of last save_log entry...
- lnb_save=$("${CAT}" -n "$logfile" | "$tr" -d "\\r" | grep "chunk:" -A 2 | "${TAIL}" -3)
+ lnb_save=$("${CAT}" -n "$logfile" | "$tr" -d "\\r" | grep "chunk:" -A 2 | "${TAIL}" -n 3)
if test "$lnb_save" ;then
- lnb_save=$(echo $lnb_save | "${HEAD}" -1 | cut -f 1 -d " ")
+ lnb_save=$(echo $lnb_save | "${HEAD}" -n 1 | cut -f 1 -d " ")
- end_log="$(cat "$logfile" | "$tr" -d "\\r" | "${TAIL}" "+$lnb_save")"
+ end_log="$(cat "$logfile" | "$tr" -d "\\r" | "${TAIL}" -n "+$lnb_save")"
- last_lines=$(echo "$end_log" | grep "chunk:" -A 2 | "${TAIL}" -3)
+ last_lines=$(echo "$end_log" | grep "chunk:" -A 2 | "${TAIL}" -n 3)
- log=$(echo "$last_lines" | "$GREP" "chunk" | "${TAIL}" -1 )
- log1=$(echo "$last_lines" | "$GREP" "logcontent" | "${TAIL}" -1 )
- log2=$(echo "$last_lines" | "$GREP" "eof" | "${TAIL}" -1 )
+ log=$(echo "$last_lines" | "$GREP" "chunk" | "${TAIL}" -n 1 )
+ log1=$(echo "$last_lines" | "$GREP" "logcontent" | "${TAIL}" -n 1 )
+ log2=$(echo "$last_lines" | "$GREP" "eof" | "${TAIL}" -n 1 )
if test "$log" && test "$log1" && test "$log2" ;then
chunk="$(echo "$log" | "${CUT}" -f 2- -d ":" | "${TR}" ":" "\n")"

20
ddresc-112.diff Normal file
View File

@ -0,0 +1,20 @@
Index: dd_rhelp-0.0.6/src/dd_rhelp-sh
===================================================================
--- dd_rhelp-0.0.6.orig/src/dd_rhelp-sh
+++ dd_rhelp-0.0.6/src/dd_rhelp-sh
@@ -219,9 +219,14 @@ function get_valid_dd_rescue
if is_num "$version" && [ "$(bc_calc 2 "$version < 1.03")" == "0" ]
then
[ "$DEBUG" == "on" ] && echo "OK !" >&2
- echo "$path"
+ if [ "$(bc_calc 2 "$version < 1.12")" == "0" ]
+ then
+ echo "$path -y0"
+ else
+ echo "$path"
+ fi
return 0
else
[ "$DEBUG" == "on" ] && echo "BAD !" >&2
fi