1 --- BackupPC-2.1.2.orig/bin/BackupPC_tarExtract 2005-09-05 16:21:21.000000000 -0700
2 +++ BackupPC-2.1.2/bin/BackupPC_tarExtract 2006-06-18 19:36:31.995945464 -0700
7 -if ( $ARGV[1] !~ /^([\w\s\.\/\$-]+)$/ ) {
8 +if ( $ARGV[1] !~ /^([\w\s.\/$(){}[\]-]+)$/ ) {
9 print("$0: bad share name '$ARGV[1]'\n");
13 # Copyright 1998 Stephen Zander. All rights reserved.
16 - = 'Z100 A8 A8 A8 A12 A12 A8 A1 Z100 A6 A2 Z32 Z32 A8 A8 A155 x12';
17 + = 'Z100 A8 A8 A8 a12 A12 A8 A1 Z100 A6 A2 Z32 Z32 A8 A8 A155 x12';
18 my $tar_header_length = 512;
20 my $BufSize = 1048576; # 1MB or 2^20
22 $name = $longName if ( defined($longName) );
23 $linkname = $longLink if ( defined($longLink) );
26 + $name =~ s{/+\.?$}{};
33 #print("Reading $f->{name}, $f->{size} bytes, type $f->{type}\n");
34 - pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
35 + pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
36 my $poolWrite = BackupPC::PoolWrite->new($bpc,
37 "$OutDir/$ShareName/$f->{mangleName}",
38 $f->{size}, $Compress);
42 $f->{size} = length($f->{linkname});
43 - pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
44 + pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
45 my $poolWrite = BackupPC::PoolWrite->new($bpc,
46 "$OutDir/$ShareName/$f->{mangleName}",
47 $f->{size}, $Compress);
51 $f->{size} = length($f->{linkname});
52 - pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
53 + pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
54 my $poolWrite = BackupPC::PoolWrite->new($bpc,
55 "$OutDir/$ShareName/$f->{mangleName}",
56 $f->{size}, $Compress);
59 $data = "$f->{devmajor},$f->{devminor}";
61 - pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
62 + pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
63 my $poolWrite = BackupPC::PoolWrite->new($bpc,
64 "$OutDir/$ShareName/$f->{mangleName}",
65 length($data), $Compress);
70 - my($dir, $fullPath, $file, $f) = @_;
71 + my($dir, $fullPath, $f) = @_;
74 # Get parent directory of each of $dir and $fullPath
76 - $dir =~ s{/[^/]*$}{};
77 + # print("pathCreate: dir = $dir, fullPath = $fullPath\n");
78 + $dir =~ s{/([^/]*)$}{};
79 + my $file = $bpc->fileNameUnmangle($1);
80 $fullPath =~ s{/[^/]*$}{};
81 - return if ( -d $fullPath );
82 + return if ( -d $fullPath || $file eq "" );
83 + unlink($fullPath) if ( -e $fullPath );
84 mkpath($fullPath, 0, 0777);
85 $Attrib{$dir} = BackupPC::Attrib->new({ compress => $Compress })
86 if ( !defined($Attrib{$dir}) );
87 + # print("pathCreate: adding file = $file to dir = $dir\n");
88 $Attrib{$dir}->set($file, {
89 type => BPC_FTYPE_DIR,
91 --- BackupPC-2.1.2.orig/lib/BackupPC/Lib.pm 2005-09-05 16:21:21.000000000 -0700
92 +++ BackupPC-2.1.2/lib/BackupPC/Lib.pm 2006-06-18 19:36:32.035939384 -0700
94 TopDir => $topDir || '__TOPDIR__',
95 BinDir => $installDir || '__INSTALLDIR__',
96 LibDir => $installDir || '__INSTALLDIR__',
98 + Version => '2.1.2pl2',
100 num type startTime endTime
101 nFiles size nFilesExist sizeExist nFilesNew sizeNew
102 --- BackupPC-2.1.2.orig/lib/BackupPC/Xfer/RsyncFileIO.pm 2005-09-05 16:21:21.000000000 -0700
103 +++ BackupPC-2.1.2/lib/BackupPC/Xfer/RsyncFileIO.pm 2006-06-18 19:36:32.120926464 -0700
109 + # Don't write attributes on 2nd phase - they're already
110 + # taken care of during the first phase.
112 + return if ( $fio->{phase} > 0 );
113 if ( !defined($d) ) {
115 # flush all entries (in reverse order)
118 close($fio->{rxInFd}) if ( defined($fio->{rxInFd}) );
119 unlink("$fio->{outDirSh}RStmp") if ( -f "$fio->{outDirSh}RStmp" );
120 + $fio->{phase} = $phase;
123 # Check the final md4 digest
124 --- BackupPC-2.1.2.orig/lib/BackupPC/Xfer/Tar.pm 2005-09-05 16:21:21.000000000 -0700
125 +++ BackupPC-2.1.2/lib/BackupPC/Xfer/Tar.pm 2006-06-18 19:36:32.110927984 -0700
127 $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 );
130 - $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
131 - $t->{xferErrCnt}++;
133 + # Ignore annoying log message on incremental for tar 1.15.x
135 + if ( !/: file is unchanged; not dumped$/ ) {
136 + $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
137 + $t->{xferErrCnt}++;
140 # If tar encounters a minor error, it will exit with a non-zero
141 # status. We still consider that ok. Remember if tar prints
142 --- BackupPC-2.1.2.orig/conf/config.pl 2005-09-05 16:21:22.000000000 -0700
143 +++ BackupPC-2.1.2/conf/config.pl 2006-06-18 19:36:31.968949568 -0700
144 @@ -1052,7 +1052,7 @@
153 @@ -1086,7 +1086,7 @@