]> git.pld-linux.org Git - packages/BackupPC.git/blame - backuppc-2.1.2pl2.patch
- cleanup
[packages/BackupPC.git] / backuppc-2.1.2pl2.patch
CommitLineData
29932a77
MWP
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
3@@ -58,7 +58,7 @@
4 exit(1);
5 }
6 my $client = $1;
7-if ( $ARGV[1] !~ /^([\w\s\.\/\$-]+)$/ ) {
8+if ( $ARGV[1] !~ /^([\w\s.\/$(){}[\]-]+)$/ ) {
9 print("$0: bad share name '$ARGV[1]'\n");
10 exit(1);
11 }
12@@ -101,7 +101,7 @@
13 # Copyright 1998 Stephen Zander. All rights reserved.
14 #
15 my $tar_unpack_header
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;
19
20 my $BufSize = 1048576; # 1MB or 2^20
21@@ -251,7 +251,7 @@
22 $name = $longName if ( defined($longName) );
23 $linkname = $longLink if ( defined($longLink) );
24 $name =~ s{^\./+}{};
25- $name =~ s{/+$}{};
26+ $name =~ s{/+\.?$}{};
27 $name =~ s{//+}{/}g;
28 return {
29 name => $name,
30@@ -313,7 +313,7 @@
31 #
32 my($nRead);
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);
39@@ -351,7 +351,7 @@
40 # a plain file.
41 #
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);
48@@ -369,7 +369,7 @@
49 # contents.
50 #
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);
57@@ -393,7 +393,7 @@
58 } else {
59 $data = "$f->{devmajor},$f->{devminor}";
60 }
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);
66@@ -487,17 +487,21 @@
67 #
68 sub pathCreate
69 {
70- my($dir, $fullPath, $file, $f) = @_;
71+ my($dir, $fullPath, $f) = @_;
72
73 #
74 # Get parent directory of each of $dir and $fullPath
75 #
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,
90 mode => 0755,
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
93@@ -59,7 +59,7 @@
94 TopDir => $topDir || '__TOPDIR__',
95 BinDir => $installDir || '__INSTALLDIR__',
96 LibDir => $installDir || '__INSTALLDIR__',
97- Version => '2.1.2',
98+ Version => '2.1.2pl2',
99 BackupFields => [qw(
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
104@@ -405,6 +405,11 @@
105 my($fio, $d) = @_;
106 my($poolWrite);
107
108+ #
109+ # Don't write attributes on 2nd phase - they're already
110+ # taken care of during the first phase.
111+ #
112+ return if ( $fio->{phase} > 0 );
113 if ( !defined($d) ) {
114 #
115 # flush all entries (in reverse order)
116@@ -932,6 +937,7 @@
117
118 close($fio->{rxInFd}) if ( defined($fio->{rxInFd}) );
119 unlink("$fio->{outDirSh}RStmp") if ( -f "$fio->{outDirSh}RStmp" );
120+ $fio->{phase} = $phase;
121
122 #
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
126@@ -221,8 +221,13 @@
127 $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 );
128 $t->{fileCnt}++;
129 } else {
130- $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
131- $t->{xferErrCnt}++;
132+ #
133+ # Ignore annoying log message on incremental for tar 1.15.x
134+ #
135+ if ( !/: file is unchanged; not dumped$/ ) {
136+ $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
137+ $t->{xferErrCnt}++;
138+ }
139 #
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 @@
145 '--perms',
146 '--owner',
147 '--group',
148- '--devices',
149+ '-D',
150 '--links',
151 '--times',
152 '--block-size=2048',
153@@ -1086,7 +1086,7 @@
154 '--perms',
155 '--owner',
156 '--group',
157- '--devices',
158+ '-D',
159 '--links',
160 '--times',
161 '--block-size=2048',
This page took 0.113406 seconds and 4 git commands to generate.