2 # BackupPC-2.1.2pl0.diff: BackupPC patch file generated
3 # on Sun Dec 11 23:48:15 2005.
5 # This patch file should be applied to a cleanly unpacked BackupPC
6 # version 2.1.2. Do not apply any old patch files; each
7 # patch file accumulates all previous changes.
11 # # fetch BackupPC-2.1.2.tar.gz
12 # # fetch BackupPC-2.1.2pl0.diff
13 # tar zxvf BackupPC-2.1.2.tar.gz
15 # patch -p0 < ../BackupPC-2.1.2pl0.diff
20 # - Added patch from Michael (mna.news) to ignore "file is unchanged"
21 # message from tar 1.15.x during incremental backups.
23 # - Fixed creation of .rsrc directories in bin/BackupPC_tarExtract
24 # when used with xtar on MacOS. Reported by Samuel Bancal and
25 # Matthew Radey, who helped with debugging.
27 --- BackupPC-2.1.2/bin/BackupPC_tarExtract 2005-09-05 16:21:21.000000000 -0700
28 +++ BackupPC-2.1.2/bin/BackupPC_tarExtract 2005-12-11 23:48:15.492844664 -0800
33 -if ( $ARGV[1] !~ /^([\w\s\.\/\$-]+)$/ ) {
34 +if ( $ARGV[1] !~ /^([\w\s.\/$(){}[\]-]+)$/ ) {
35 print("$0: bad share name '$ARGV[1]'\n");
39 $name = $longName if ( defined($longName) );
40 $linkname = $longLink if ( defined($longLink) );
43 + $name =~ s{/+\.?$}{};
50 #print("Reading $f->{name}, $f->{size} bytes, type $f->{type}\n");
51 - pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
52 + pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
53 my $poolWrite = BackupPC::PoolWrite->new($bpc,
54 "$OutDir/$ShareName/$f->{mangleName}",
55 $f->{size}, $Compress);
59 $f->{size} = length($f->{linkname});
60 - pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
61 + pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
62 my $poolWrite = BackupPC::PoolWrite->new($bpc,
63 "$OutDir/$ShareName/$f->{mangleName}",
64 $f->{size}, $Compress);
68 $f->{size} = length($f->{linkname});
69 - pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
70 + pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
71 my $poolWrite = BackupPC::PoolWrite->new($bpc,
72 "$OutDir/$ShareName/$f->{mangleName}",
73 $f->{size}, $Compress);
76 $data = "$f->{devmajor},$f->{devminor}";
78 - pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
79 + pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
80 my $poolWrite = BackupPC::PoolWrite->new($bpc,
81 "$OutDir/$ShareName/$f->{mangleName}",
82 length($data), $Compress);
87 - my($dir, $fullPath, $file, $f) = @_;
88 + my($dir, $fullPath, $f) = @_;
91 # Get parent directory of each of $dir and $fullPath
93 - $dir =~ s{/[^/]*$}{};
94 + # print("pathCreate: dir = $dir, fullPath = $fullPath\n");
95 + $dir =~ s{/([^/]*)$}{};
96 + my $file = $bpc->fileNameUnmangle($1);
97 $fullPath =~ s{/[^/]*$}{};
98 - return if ( -d $fullPath );
99 + return if ( -d $fullPath || $file eq "" );
100 + unlink($fullPath) if ( -e $fullPath );
101 mkpath($fullPath, 0, 0777);
102 $Attrib{$dir} = BackupPC::Attrib->new({ compress => $Compress })
103 if ( !defined($Attrib{$dir}) );
104 + # print("pathCreate: adding file = $file to dir = $dir\n");
105 $Attrib{$dir}->set($file, {
106 type => BPC_FTYPE_DIR,
108 --- BackupPC-2.1.2/lib/BackupPC/Lib.pm 2005-09-05 16:21:21.000000000 -0700
109 +++ BackupPC-2.1.2/lib/BackupPC/Lib.pm 2005-12-11 23:48:15.536837976 -0800
111 TopDir => $topDir || '__TOPDIR__',
112 BinDir => $installDir || '__INSTALLDIR__',
113 LibDir => $installDir || '__INSTALLDIR__',
114 - Version => '2.1.2',
115 + Version => '2.1.2pl0',
117 num type startTime endTime
118 nFiles size nFilesExist sizeExist nFilesNew sizeNew
119 --- BackupPC-2.1.2/lib/BackupPC/Xfer/Tar.pm 2005-09-05 16:21:21.000000000 -0700
120 +++ BackupPC-2.1.2/lib/BackupPC/Xfer/Tar.pm 2005-12-11 23:48:15.681815936 -0800
122 $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 );
125 - $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
126 - $t->{xferErrCnt}++;
128 + # Ignore annoying log message on incremental for tar 1.15.x
130 + if ( !/: file is unchanged; not dumped$/ ) {
131 + $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
132 + $t->{xferErrCnt}++;
135 # If tar encounters a minor error, it will exit with a non-zero
136 # status. We still consider that ok. Remember if tar prints