Hello community,

here is the log from the commit of package dd_rescue for openSUSE:Factory 
checked in at 2012-03-17 13:20:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dd_rescue (Old)
 and      /work/SRC/openSUSE:Factory/.dd_rescue.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "dd_rescue", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/dd_rescue/dd_rescue.changes      2012-02-10 
17:12:52.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.dd_rescue.new/dd_rescue.changes 2012-03-17 
13:20:35.000000000 +0100
@@ -1,0 +2,13 @@
+Mon Mar 12 17:42:25 UTC 2012 - asterios.dra...@gmail.com
+
+- Update to version 1.25:
+  * Fix for spurious "Success" messages that resulted from overwritten
+    (cleared) errno. Bad blocks are formatted in a way that they are not
+    overwritten on screen and block numbers are output as unsigned.
+- Removed dd_rhelp from the package (dd_rhelp will become a separate package. A
+  recommended entry for dd_rhelp was added in dd_rescue).
+- Spec file updates:
+  * Updated License: to "GPL-2.0 or GPL-3.0".
+  * Removed bc from BuildRequires: (not needed since dd_rhelp was removed).
+
+-------------------------------------------------------------------

Old:
----
  dd_rescue-1.24.tar.gz
  dd_rhelp-0.1.2.tar.gz
  dd_rhelp.test.diff
  dd_rhelp_EOF.diff
  dd_rhelp_Summary.diff
  ddresc-112.diff

New:
----
  dd_rescue-1.25.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ dd_rescue.spec ++++++
--- /var/tmp/diff_new_pack.lnG5OG/_old  2012-03-17 13:20:37.000000000 +0100
+++ /var/tmp/diff_new_pack.lnG5OG/_new  2012-03-17 13:20:37.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package dd_rescue
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,33 +15,21 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-%define ddrescuever 1.24
-%define ddrhelpver 0.1.2
-
 Name:           dd_rescue
-Version:        %{ddrescuever}_%{ddrhelpver}
-Release:        1
+Version:        1.25
+Release:        0
 Summary:        Data Copying in the Presence of I/O Errors
-
-License:        GPL-2.0
+License:        GPL-2.0 or GPL-3.0
 Url:            http://www.garloff.de/kurt/linux/ddrescue/
 Group:          System/Base
-Source0:        
http://www.garloff.de/kurt/linux/ddrescue/%{name}-%{ddrescuever}.tar.gz
-Source1:        http://www.kalysto.org/pkg/dd_rhelp-%{ddrhelpver}.tar.gz
-# PATCH-FIX-OPENSUSE ddresc-112.diff garl...@suse.de -- Use -y0 if ddrescue is 
1.12 or newer
-Patch0:         ddresc-112.diff
-# PATCH-FIX-OPENSUSE dd_rhelp_EOF.diff garl...@suse.de -- Adjust dd_rhelp to 
changes in dd_rescue
-Patch1:         dd_rhelp_EOF.diff
-# PATCH-FIX-OPENSUSE dd_rhelp_Summary.diff garl...@suse.de -- dd_rhelp 
adjusted for Summary change
-Patch2:         dd_rhelp_Summary.diff
-# PATCH-FIX-OPENSUSE dd_rhelp.test.diff garl...@suse.de -- Fix dd_rhelp.test 
script (basic regression test)
-Patch3:                dd_rhelp.test.diff
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-
-BuildRequires:  libfallocate-devel-static bc
+Source0:        
http://www.garloff.de/kurt/linux/ddrescue/%{name}-%{version}.tar.gz
+BuildRequires:  libfallocate-devel-static
 Requires:       bc
-Provides:       ddrescue = %{ddrescuever}
-Obsoletes:      ddrescue < %{ddrescuever}
+Recommends:     dd_rhelp
+# ddrescue was last used in openSUSE 11.4 (version 1.14_0.0.6)
+Provides:       ddrescue = %{version}
+Obsoletes:      ddrescue < %{version}
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 dd_rescue helps when nothing else can: your disk has crashed and you
@@ -49,16 +37,7 @@
 cat, and dd wail "abort" on every I/O error, dd_rescue does not.
 
 %prep
-%setup -q -n dd_rescue -a1
-cd dd_rhelp-%{ddrhelpver}
-%patch0
-%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
-cd ..
+%setup -q -n dd_rescue
 
 # Remove build time references so build-compare can do its work
 FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
@@ -72,31 +51,18 @@
 %install
 make install DESTDIR=%{buildroot} INSTALLDIR=%{buildroot}/%{_bindir} \
     INSTASROOT= INSTALLFLAGS=
-cd dd_rhelp-%{ddrhelpver}
-install -Dpm 0755 dd_rhelp %{buildroot}/%{_bindir}
+
 #UsrMerge
 mkdir %{buildroot}/bin
 ln -sf %{_bindir}/dd_rescue %{buildroot}/bin
-ln -sf %{_bindir}/dd_rhelp %{buildroot}/bin
 #EndUsrMerge
-cd ..
-
-%check
-cd dd_rhelp-%{ddrhelpver}
-export PATH=..:$PATH
-./dd_rhelp.test
-cd ..
 
 %files
 %defattr(-,root,root,-)
 %doc COPYING README.dd_rescue
-%doc dd_rhelp-%{ddrhelpver}/*.dd_rhelp
-%doc dd_rhelp-%{ddrhelpver}/doc
 %{_bindir}/dd_rescue
-%{_bindir}/dd_rhelp
 #UsrMerge
 /bin/dd_rescue
-/bin/dd_rhelp
 #EndUsrMerge
 
 %changelog

++++++ dd_rescue-1.24.tar.gz -> dd_rescue-1.25.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dd_rescue/Makefile new/dd_rescue/Makefile
--- old/dd_rescue/Makefile      2011-10-04 15:15:12.000000000 +0200
+++ new/dd_rescue/Makefile      2012-01-22 14:48:54.000000000 +0100
@@ -1,13 +1,13 @@
 # Makefile for dd_rescue
 # (c) garl...@suse.de, 99/10/09, GNU GPL
-# $Id: Makefile,v 1.38 2011/10/04 13:15:12 garloff Exp $
+# $Id: Makefile,v 1.39 2012/01/22 13:40:34 garloff Exp $
 
-VERSION = 1.24
+VERSION = 1.25
 
 DESTDIR = 
 
 CC = gcc
-RPM_OPT_FLAGS = -O2 -Wall -g
+RPM_OPT_FLAGS = -Os -Wall -g
 CFLAGS = $(RPM_OPT_FLAGS) $(EXTRA_CFLAGS)
 INSTALL = install
 INSTALLFLAGS = -s
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dd_rescue/dd_rescue.c new/dd_rescue/dd_rescue.c
--- old/dd_rescue/dd_rescue.c   2011-10-04 14:15:37.000000000 +0200
+++ new/dd_rescue/dd_rescue.c   2012-02-04 14:12:53.000000000 +0100
@@ -1,16 +1,29 @@
 /* dd_rescue.c */
 /* 
- * dd_rescue copies your data from one file to another.
- * Files might as well be block devices, such as hd partitions.
- * Unlike dd, it does not necessarily abort on errors but
- * continues to copy the disk, possibly leaving holes behind.
- * Also, it does NOT truncate the output file, so you can copy 
- * more and more pieces of your data, as time goes by.
- * This tool is thus suitable for rescueing data of crashed disk,
- * and that's the reason it has been written by me.
+ * dd_rescue copies your data from one file to another.  Files might as well be
+ * block devices, such as hd partitions.  Unlike dd, it does not necessarily
+ * abort on errors but continues to copy the disk, possibly leaving holes
+ * behind.  Also, it does NOT truncate the output file, so you can copy more
+ * and more pieces of your data, as time goes by.  This tool is thus suitable
+ * for rescueing data of crashed disk, and that's the reason it has been
+ * written by me.
  *
- * (c) Kurt Garloff <garl...@suse.de>, 11/97, 10/99
- * Copyright: GNU GPL
+ * Copyright (C) Kurt Garloff <k...@garloff.de>, 11/1997 -- 01/2012
+ * License: GNU GPL v2 or v3
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  version 3.
+ *
+ *  This program is distributed in the hope that it will be useful, but WITHOUT
+ *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ *  more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA  02111-1307  USA
  *
  * Improvements from LAB Valentin, see
  * http://www.tharbad.ath.cx/~vaab/kalysto/Utilities/dd_rhelp/dd_rhelp_en.html
@@ -22,6 +35,7 @@
  * - Better handling of write errors: also try sub blocks
  * - Optional colors
  * - Use dlopen to open libfallocate rather than linking to it ...
+ * - Display more infos on errors by collecting info from syslog
  */
 
 #ifndef VERSION
@@ -31,7 +45,7 @@
 # define "(unknown compiler)"
 #endif
 
-#define ID "$Id: dd_rescue.c,v 1.116 2011/09/25 23:27:46 garloff Exp $"
+#define ID "$Id: dd_rescue.c,v 1.118 2012/02/04 13:12:53 garloff Exp $"
 
 #ifndef SOFTBLOCKSIZE
 # define SOFTBLOCKSIZE 65536
@@ -92,7 +106,7 @@
 #endif
 
 
-int softbs, hardbs, syncfreq;
+unsigned int softbs, hardbs, syncfreq;
 int maxerr, nrerr, reverse, dotrunc, abwrerr, sparse, nosparse;
 int verbose, quiet, interact, force;
 unsigned char* buf;
@@ -442,14 +456,17 @@
        }
 }
 
-static void savebb(int block)
+static void savebb(unsigned long block)
 {
        FILE *bbfile;
-       fplog(stderr, "Bad block reading %s: %d\n", iname, block);
+       fplog(stderr, "%s%s%s%sBad block reading %s: %lu %s%s%s%s\n", 
+                       up, up, up, up,
+                       iname, block,
+                       down, down, down, down);
        if (bbname == NULL)
                return;
        bbfile = fopen(bbname, "a");
-       fprintf(bbfile, "%d\n", block);
+       fprintf(bbfile, "%lu\n", block);
        fclose(bbfile);
 }
 
@@ -605,12 +622,12 @@
        return block;
 }
 
-void exitfatalerr()
+void exitfatalerr(const int eno)
 {
-       if (errno == ESPIPE || errno == EPERM || errno == ENXIO || errno == 
ENODEV) {
-               fplog(stderr, "dd_rescue: (warning): %s (%.1fk): %s!\n", 
-                     iname, (float)ipos/1024, strerror(errno));
-               fplog(stderr, "dd_rescue: Last error fatal! Exiting ...\n");
+       if (eno == ESPIPE || eno == EPERM || eno == ENXIO || eno == ENODEV) {
+               fplog(stderr, "dd_rescue: (fatal): %s (%.1fk): %s! \n", 
+                     iname, (float)ipos/1024, strerror(eno));
+               fplog(stderr, "dd_rescue: Last error fatal! Exiting ... \n");
                cleanup();
                exit(20);
        }
@@ -640,10 +657,11 @@
                   || (errno == EFBIG && !reverse)))
                ++fatal;
        if (rd != wr && !sparse) {
+               const int eno = errno;
                fplog(stderr, "dd_rescue: (warning): assumption rd(%i) == 
wr(%i) failed! \n", rd, wr);
                fplog(stderr, "dd_rescue: (%s): write %s (%.1fk): %s!\n", 
                      (fatal? "fatal": "warning"), oname, 
-                     (float)opos/1024, strerror(errno));
+                     (float)opos/1024, strerror(eno));
                fprintf(stderr, "%s%s%s", down, down, down);
                errno = 0;
        }
@@ -669,10 +687,12 @@
                down, down, down, down);
 #endif
        while ((toread = blockxfer(max, hardbs)) > 0) { 
+               int eno;
                ssize_t rd = readblock(toread);
+               eno = errno;
 
                /* EOF */
-               if (rd == 0 && !errno) {
+               if (rd == 0 && !eno) {
                        if (!quiet)
                                fplog(stderr, "dd_rescue: (info): read %s 
(%.1fk): EOF\n", 
                                      iname, (float)ipos/1024);
@@ -680,18 +700,18 @@
                }
                /* READ ERROR */
                if (rd < toread/* && errno*/) {
-                       if (errno) {
+                       if (eno) {
                                ++errs;
                                /* Read error occurred: Print warning */
                                printstatus(stderr, logfd, hardbs, 1);
                        }
                        /* Some errnos are fatal */
-                       exitfatalerr();
+                       exitfatalerr(eno);
                        /* Non fatal error */
                        /* Real error on small blocks: Don't retry */
                        nrerr++; 
                        fplog(stderr, "dd_rescue: (warning): read %s (%.1fk): 
%s!\n", 
-                             iname, (float)ipos/1024, strerror(errno));
+                             iname, (float)ipos/1024, strerror(eno));
                        /* exit if too many errs */
                        if (maxerr && nrerr >= maxerr) {
                                fplog(stderr, "dd_rescue: (fatal): maxerr 
reached!\n");
@@ -706,14 +726,15 @@
                                ssize_t wr = 0;
                                memset(buf+rd, 0, toread-rd);
                                errs += ((wr = writeblock(toread)) < toread ? 
1: 0);
-                               if (wr <= 0 && (errno == ENOSPC 
-                                          || (errno == EFBIG && !reverse))) 
+                               eno = errno;
+                               if (wr <= 0 && (eno == ENOSPC 
+                                          || (eno == EFBIG && !reverse))) 
                                        return errs;
                                if (toread != wr) {
                                        fplog(stderr, "dd_rescue: (warning): 
assumption toread(%i) == wr(%i) failed! \n", toread, wr);  
                                        /*
                                        fplog(stderr, "dd_rescue: (warning): %s 
(%.1fk): %s!\n", 
-                                             oname, (float)opos/1024, 
strerror(errno));
+                                             oname, (float)opos/1024, 
strerror(eno));
                                        fprintf(stderr, "%s%s%s%s", down, down, 
down, down);
                                        */
                                }
@@ -745,7 +766,8 @@
 int copyfile_softbs(const off_t max)
 {
        ssize_t toread;
-       int errs = 0; errno = 0;
+       int errs = 0; int eno;
+       errno = 0;
 #if 0  
        fprintf(stderr, "%s%s%s%s copyfile (ipos=%.1fk, xfer=%.1fk, max=%.1fk, 
bs=%i)                         ##\n%s%s%s%s",
                up, up, up, up,
@@ -756,12 +778,13 @@
         * FIXME: 0 byte writes do NOT expand file */
        if (!o_chr)
                pwrite(odes, buf, 0, opos);
-       while ((toread = blockxfer(max, softbs)) > 0) { 
+       while ((toread = blockxfer(max, softbs)) > 0) {
                int err;
                ssize_t rd = readblock(toread);
+               eno = errno;
 
                /* EOF */
-               if (rd == 0 && !errno) {
+               if (rd == 0 && !eno) {
                        if (!quiet)
                                fplog(stderr, "dd_rescue: (info): read %s 
(%.1fk): EOF\n", 
                                      iname, (float)ipos/1024);
@@ -771,19 +794,19 @@
                if (rd < toread/* && errno*/) {
                        int ret;
                        off_t new_max, old_xfer;
-                       if (errno) {
+                       if (eno) {
                                ++errs;
                                /* Read error occurred: Print warning */
                                printstatus(stderr, logfd, softbs, 1);
                        }
                        /* Some errnos are fatal */
-                       exitfatalerr();
+                       exitfatalerr(eno);
                        /* Non fatal error */
                        new_max = xfer + toread;
                        /* Error with large blocks: Try small ones ... */
                        if (verbose) {
                                fprintf(stderr, "dd_rescue: (info): problems at 
ipos %.1fk: %s \n                 fall back to smaller blocksize \n%s%s%s%s",
-                                       (float)ipos/1024, strerror(errno), 
down, down, down, down);
+                                       (float)ipos/1024, strerror(eno), down, 
down, down, down);
                                printstatus(stderr, logfd, hardbs, 1);
                        }
                        /* But first: write available data and advance 
(optimization) */

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to