diff --git a/.gitignore b/.gitignore index dee6c15..dc36638 100644 --- a/.gitignore +++ b/.gitignore @@ -1,30 +1,4 @@ -/dd_rescue-1.14.tar.gz -/dd_rhelp-0.1.2.tar.gz -/dd_rescue-1.22.tar.gz -/dd_rhelp-0.1.2.tar.gz -/dd_rescue-1.23.tar.gz -/dd_rescue-1.28.tar.gz -/dd_rhelp-0.3.0.tar.gz -/dd_rescue-1.30.tar.gz -/dd_rescue-1.31.tar.gz -/dd_rescue-1.33.tar.gz -/dd_rescue-1.40.tar.gz -/dd_rescue-1.42.1.tar.gz -/dd_rescue-1.44.tar.gz -/dd_rescue-1.45.tar.gz -/dd_rescue-1.46.tar.gz -/dd_rescue-1.98.tar.bz2 -/dd_rescue-1.99.tar.bz2 -/dd_rescue-1.99.5.tar.bz2 -/dd_rescue-1.99.6.tar.bz2 -/dd_rescue-1.99.7.tar.bz2 -/dd_rescue-1.99.8.tar.bz2 -/dd_rescue-1.99.8.tar.bz2.asc -/dd_rescue-1.99.9.tar.bz2 -/dd_rescue-1.99.9.tar.bz2.asc -/dd_rescue-1.99.10.tar.bz2 -/dd_rescue-1.99.10.tar.bz2.asc /results_dd_rescue/ -/dd_rescue-1.99.11.tar.bz2 -/dd_rescue-1.99.12.tar.bz2 -/dd_rescue-1.99.12.tar.bz2.asc +/dd_rhelp-*.tar.gz +/dd_rescue-*.tar.bz2 +/dd_rescue-*.tar.bz2.asc \ No newline at end of file diff --git a/dd_rescue-1.99.11.tar.bz2.asc b/dd_rescue-1.99.11.tar.bz2.asc deleted file mode 100644 index 171439d..0000000 --- a/dd_rescue-1.99.11.tar.bz2.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEZmn3NA0x6V7FVlSQ3k8bOiv/xb8FAmCKgVsACgkQ3k8bOiv/ -xb+o3w/8CEIbniRg5APx/qgqoapYzFpwSoueY6QE/HshW1QKbLiV90ErW5qzdXLL -mcqU/3I9nx2VHfgSXGpKQ30ZlNpJovHPhDon16R0olX9v8p/eGNCJPGydIqyT5SM -2JcHoYB1WBOU6qNg++7ZmY8WbfPBgVovDPHsBD/RYTxzqQqgI6RyplN4X8NzEx5W -g+epD2MzKml6Qh88Etm/IQJ+LZh50LQxzQKTO/pSnnpWPQDQmNiJPlSubT57I1vo -QEiQgcBQAI6F5Wt6F6HUQ6Mn3f3EtP5ewGdoU4SBr8QZr06/+9sZwWL1yTcffhel -ZJbytbdp6PENltPojyh2Ett1pZV4Deqy2tUNR7LZArxkIA10r+FjdCE6e4jYl6Xk -tjLeZJ/lAJSsivVM0xxRW67+O/y4s9uFxxDfm4QPVPauEHfziqvIQ5CTf5PWmyVS -FD2v2Nvh1DlC16P9GNGpnzqILMKSGVDd8abidtHzNaObUYFxVYF6xHrqaSlXN+MJ -KLmKIAN8ZCjBJBKcuFMmCy/b7GuxEUdhuQPUlItXlxlCQ5rzbfJan6uAx2nxL3Vs -LVkb22mNqMZVIgmWtAqv8ZRL0/p/M2u/xQF9YK3gxKwd2X03Vq7bgSSyl9vi7SpX -d873R/F/oT1gV7Fl21/eZinEZrNurAdf0IPlW+9ZnhflCtRZSfU= -=mAWr ------END PGP SIGNATURE----- diff --git a/dd_rescue-rhelp_version.patch b/dd_rescue-rhelp_version.patch new file mode 100644 index 0000000..1815b38 --- /dev/null +++ b/dd_rescue-rhelp_version.patch @@ -0,0 +1,37 @@ +diff -ru dd_rhelp-0.3.0/dd_rhelp dd_rhelp-0.3.0.new/dd_rhelp +--- dd_rhelp-0.3.0/dd_rhelp 2023-02-15 00:37:55.505879683 +0100 ++++ dd_rhelp-0.3.0.new/dd_rhelp 2023-02-15 00:35:07.698695499 +0100 +@@ -1039,24 +1039,27 @@ + # fi + + +- version=$("$path" -V 2>&1 | "${grep}" "dd_rescue Version" | "$cut" -f 3 -d " " | "$cut" -f 1 -d ",") ++ rversion=$("$path" -V 2>&1 | "${grep}" "dd_rescue Version" | "$cut" -f 3 -d " " | "$cut" -f 1 -d ",") ++ ++ # Use only major part of dd_rescue version for the numeric comparison ++ mrversion=$(echo "$rversion" | cut -d . -f 1-2) + + ## Could get something as version info ? + +- if test -z "$version" || ! is_num "$version" ; then ++ if test -z "$rversion" || ! is_num "$mrversion" ; then + echo "Could not extract version info from '$path' executable ! Weird ! exiting...">&2 + exit 1 + fi + +- [ "$DEBUG" == "on" ] && echo -n "Trying '$path' : gives this version : '$version'..." >&2 ++ [ "$DEBUG" == "on" ] && echo -n "Trying '$path' : gives this version : '$rversion'..." >&2 + +- if [ "$(bc_calc 2 "$version < 1.03")" == "0" ]; then ++ if [ "$(bc_calc 2 "$mrversion < 1.03")" == "0" ]; then + [ "$DEBUG" == "on" ] && echo -e "OK\n- dd_rescue location : '$path'" >&2 + echo "$path" + return 0 + else + [ "$DEBUG" == "on" ] && echo "BAD !" >&2 +- echo "Bad version of dd_rescue ! you must have >= 1.03, and your '$path' version was detected to be '$version'.">&2 ++ echo "Bad version of dd_rescue ! you must have >= 1.03, and your '$path' version was detected to be '$rversion'.">&2 + exit 1 + fi + +Only in dd_rhelp-0.3.0: dd_rhelp_test.12734.a.tmp.log diff --git a/dd_rescue.spec b/dd_rescue.spec index 5e53082..262664e 100644 --- a/dd_rescue.spec +++ b/dd_rescue.spec @@ -1,18 +1,22 @@ -%define rhelp_version 0.3.0 - Name: dd_rescue Version: 1.99.12 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Fault tolerant "dd" utility for rescuing data from bad media # No version specified License: GPL+ URL: http://www.garloff.de/kurt/linux/ddrescue/ + +%global rhelp_version 0.3.0 + Source0: http://www.garloff.de/kurt/linux/ddrescue/dd_rescue-%{version}.tar.bz2 Source1: http://www.kalysto.org/pkg/dd_rhelp-%{rhelp_version}.tar.gz Source2: http://www.garloff.de/kurt/linux/ddrescue/dd_rescue-%{version}.tar.bz2.asc # Public key obtained from http://www.garloff.de/kurt/garloff.pub.asc Source3: gpgkey-6669F7340D31E95EC5565490DE4F1B3A2BFFC5BF.gpg +# Fix the dd_rescue version detection in dd_help +Patch0: dd_rescue-rhelp_version.patch + BuildRequires: autoconf # We require aclocal which is shipped with automake BuildRequires: automake @@ -21,6 +25,11 @@ BuildRequires: gnupg2 BuildRequires: lzo-devel BuildRequires: make +# Shell script dd_rhelp.test requires several other things to run +BuildRequires: bc +BuildRequires: grep +BuildRequires: coreutils + # Shell script dd_rhelp requires several other things to run Requires: grep Requires: sed @@ -32,18 +41,27 @@ Requires: bc %description -ddrescue is a utility similar to the system utility "dd" which copies -data from a file or block device to another. ddrescue does however +The dd_rescue is a utility similar to the system utility "dd" which copies +data from a file or block device to another. The dd_rescue does however not abort on errors in the input file. This makes it suitable for rescuing data from media with errors, e.g. a disk with bad sectors. -This package includes dd_rhelp, a wrapper script facilitating data -recovery. +This package includes dd_rhelp wrapper script facilitating data +recovery. It is trying to make it so simple to recover as: +dd_rhelp source target + +Please note Fedora ships also GNU ddrescue, which probably gives +faster and more reliable results rescuing whole disks. +But still there might be some niche pattern of bad sectors, +which might get better covered by dd_rescue and both tools +might be used with sub-sequent runs cooperatively on the same disk image. + %prep gpgv2 --keyring %{SOURCE3} %{SOURCE2} %{SOURCE0} %setup -q -n %{name}-%{version} %setup -q -n %{name}-%{version} -a 1 -D -T +%patch0 -p 0 %build autoreconf -vif @@ -62,6 +80,12 @@ rm -rf %{buildroot} make install DESTDIR=%{buildroot} INSTALLDIR=%{buildroot}/%{_bindir} INSTASROOT="" INSTALLFLAGS="" LIB=%{_lib} install -D -m 755 dd_rhelp-%{rhelp_version}/dd_rhelp %{buildroot}%{_bindir}/dd_rhelp +%check +pushd dd_rhelp-%{rhelp_version} +PATH="../:$PATH" bash ./dd_rhelp.test && +popd + + %files %doc COPYING README README.dd_rhelp FAQ.dd_rhelp %{_bindir}/dd_rescue @@ -77,6 +101,9 @@ install -D -m 755 dd_rhelp-%{rhelp_version}/dd_rhelp %{buildroot}%{_bindir}/dd_r %changelog +* Sat Feb 18 2023 Michal Ambroz - 1.99.12-3 +- dd_rhelp - fix dependencies and dd_rescue detection + * Thu Jan 19 2023 Fedora Release Engineering - 1.99.12-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild