Package: backuppc
Version: 2.1.2-3
Severity: normal
Tags: patch

Apparently, GNU tar-1.15.x has output that for an
incremental backup causes backuppc to record a very large
number of "errors", even though there are really no errors.

The upstream site has a patch to fix this:
http://prdownloads.sourceforge.net/backuppc/BackupPC-2.1.2pl0.diff?download

Here is the content:

----------begin patch----------
#
# BackupPC-2.1.2pl0.diff: BackupPC patch file generated
# on Sun Dec 11 23:48:15 2005.
#
# This patch file should be applied to a cleanly unpacked BackupPC
# version 2.1.2.  Do not apply any old patch files; each
# patch file accumulates all previous changes.
#
# Example:
#
#     # fetch BackupPC-2.1.2.tar.gz
#     # fetch BackupPC-2.1.2pl0.diff
#     tar zxvf BackupPC-2.1.2.tar.gz
#     cd BackupPC-2.1.2
#     patch -p0 < ../BackupPC-2.1.2pl0.diff
#     perl configure.pl
#
# ChangeLog:
#
#  - Added patch from Michael (mna.news) to ignore "file is unchanged"
#    message from tar 1.15.x during incremental backups.
#
#  - Fixed creation of .rsrc directories in bin/BackupPC_tarExtract
#    when used with xtar on MacOS.  Reported by Samuel Bancal and
#    Matthew Radey, who helped with debugging.
#
--- bin/BackupPC_tarExtract     2005-09-05 16:21:21.000000000 -0700
+++ bin/BackupPC_tarExtract     2005-12-11 23:48:15.492844664 -0800
@@ -58,7 +58,7 @@
     exit(1);
 }
 my $client = $1;
-if ( $ARGV[1] !~ /^([\w\s\.\/\$-]+)$/ ) {
+if ( $ARGV[1] !~ /^([\w\s.\/$(){}[\]-]+)$/ ) {
     print("$0: bad share name '$ARGV[1]'\n");
     exit(1);
 }
@@ -251,7 +251,7 @@
         $name     = $longName if ( defined($longName) );
         $linkname = $longLink if ( defined($longLink) );
         $name     =~ s{^\./+}{};
-        $name     =~ s{/+$}{};
+        $name     =~ s{/+\.?$}{};
         $name     =~ s{//+}{/}g;
         return {
             name       => $name,
@@ -313,7 +313,7 @@
         #
         my($nRead);
         #print("Reading $f->{name}, $f->{size} bytes, type $f->{type}\n");
-        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
         my $poolWrite = BackupPC::PoolWrite->new($bpc,
                                          "$OutDir/$ShareName/$f->{mangleName}",
                                          $f->{size}, $Compress);
@@ -351,7 +351,7 @@
        # a plain file.
         #
         $f->{size} = length($f->{linkname});
-        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
         my $poolWrite = BackupPC::PoolWrite->new($bpc,
                                          "$OutDir/$ShareName/$f->{mangleName}",
                                          $f->{size}, $Compress);
@@ -369,7 +369,7 @@
         # contents.
         #
         $f->{size} = length($f->{linkname});
-        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
         my $poolWrite = BackupPC::PoolWrite->new($bpc,
                                          "$OutDir/$ShareName/$f->{mangleName}",
                                          $f->{size}, $Compress);
@@ -393,7 +393,7 @@
         } else {
             $data = "$f->{devmajor},$f->{devminor}";
         }
-        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
         my $poolWrite = BackupPC::PoolWrite->new($bpc,
                                          "$OutDir/$ShareName/$f->{mangleName}",
                                          length($data), $Compress);
@@ -487,17 +487,21 @@
 #
 sub pathCreate
 {
-    my($dir, $fullPath, $file, $f) = @_;
+    my($dir, $fullPath, $f) = @_;
 
     #
     # Get parent directory of each of $dir and $fullPath
     #
-    $dir      =~ s{/[^/]*$}{};
+    # print("pathCreate: dir = $dir, fullPath = $fullPath\n");
+    $dir      =~ s{/([^/]*)$}{};
+    my $file  = $bpc->fileNameUnmangle($1);
     $fullPath =~ s{/[^/]*$}{};
-    return if ( -d $fullPath );
+    return if ( -d $fullPath || $file eq "" );
+    unlink($fullPath) if ( -e $fullPath );
     mkpath($fullPath, 0, 0777);
     $Attrib{$dir} = BackupPC::Attrib->new({ compress => $Compress })
                                 if ( !defined($Attrib{$dir}) );
+    # print("pathCreate: adding file = $file to dir = $dir\n");
     $Attrib{$dir}->set($file, {
                             type  => BPC_FTYPE_DIR,
                             mode  => 0755,
--- lib/BackupPC/Lib.pm 2005-09-05 16:21:21.000000000 -0700
+++ lib/BackupPC/Lib.pm 2005-12-11 23:48:15.536837976 -0800
@@ -59,7 +59,7 @@
         TopDir  => $topDir || '__TOPDIR__',
         BinDir  => $installDir || '__INSTALLDIR__',
         LibDir  => $installDir || '__INSTALLDIR__',
-        Version => '2.1.2',
+        Version => '2.1.2pl0',
         BackupFields => [qw(
                     num type startTime endTime
                     nFiles size nFilesExist sizeExist nFilesNew sizeNew
--- lib/BackupPC/Xfer/Tar.pm    2005-09-05 16:21:21.000000000 -0700
+++ lib/BackupPC/Xfer/Tar.pm    2005-12-11 23:48:15.681815936 -0800
@@ -221,8 +221,13 @@
             $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 );
             $t->{fileCnt}++;
         } else {
-            $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
-            $t->{xferErrCnt}++;
+            #
+            # Ignore annoying log message on incremental for tar 1.15.x
+            #
+            if ( !/: file is unchanged; not dumped$/ ) {
+                $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
+                $t->{xferErrCnt}++;
+            }
            #
            # If tar encounters a minor error, it will exit with a non-zero
            # status.  We still consider that ok.  Remember if tar prints
----------end patch----------

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686-smp
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages backuppc depends on:
ii  adduser                       3.80       Add and remove users and groups
ii  apache                        1.3.34-2   versatile, high-performance HTTP s
ii  apache2-mpm-prefork [apache2] 2.0.55-3   traditional model for Apache2
ii  debconf [debconf-2.0]         1.4.67     Debian configuration management sy
ii  dpkg                          1.13.11.1  package maintenance system for Deb
ii  exim [mail-transport-agent]   3.36-18    An MTA (Mail Transport Agent)
ii  libarchive-zip-perl           1.16-1     Module for manipulation of ZIP arc
ii  libcompress-zlib-perl         1.41-1     Perl module for creation and manip
ii  perl [libdigest-md5-perl]     5.8.7-10   Larry Wall's Practical Extraction 
ii  perl-suid                     5.8.7-10   Runs setuid Perl scripts
ii  samba-common                  3.0.21a-1  Samba common files used by both th
ii  smbclient                     3.0.21a-1  a LanManager-like simple client fo
ii  tar                           1.15.1-2   GNU tar
ii  wwwconfig-common              0.0.44     Debian web auto configuration

backuppc recommends no packages.

-- debconf information:
* backuppc/configuration-note:
* backuppc/add-lines: true


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to