]> git.pld-linux.org Git - packages/BackupPC.git/blob - backuppc-2.1.2pl0.patch
- patch level 0 - 11 Dec 2005
[packages/BackupPC.git] / backuppc-2.1.2pl0.patch
1 #
2 # BackupPC-2.1.2pl0.diff: BackupPC patch file generated
3 # on Sun Dec 11 23:48:15 2005.
4 #
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.
8 #
9 # Example:
10 #
11 #     # fetch BackupPC-2.1.2.tar.gz
12 #     # fetch BackupPC-2.1.2pl0.diff
13 #     tar zxvf BackupPC-2.1.2.tar.gz
14 #     cd BackupPC-2.1.2
15 #     patch -p0 < ../BackupPC-2.1.2pl0.diff
16 #     perl configure.pl
17 #
18 # ChangeLog:
19 #
20 #  - Added patch from Michael (mna.news) to ignore "file is unchanged"
21 #    message from tar 1.15.x during incremental backups.
22 #
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.
26 #
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
29 @@ -58,7 +58,7 @@
30      exit(1);
31  }
32  my $client = $1;
33 -if ( $ARGV[1] !~ /^([\w\s\.\/\$-]+)$/ ) {
34 +if ( $ARGV[1] !~ /^([\w\s.\/$(){}[\]-]+)$/ ) {
35      print("$0: bad share name '$ARGV[1]'\n");
36      exit(1);
37  }
38 @@ -251,7 +251,7 @@
39          $name     = $longName if ( defined($longName) );
40          $linkname = $longLink if ( defined($longLink) );
41          $name     =~ s{^\./+}{};
42 -        $name     =~ s{/+$}{};
43 +        $name     =~ s{/+\.?$}{};
44          $name     =~ s{//+}{/}g;
45          return {
46              name       => $name,
47 @@ -313,7 +313,7 @@
48          #
49          my($nRead);
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);
56 @@ -351,7 +351,7 @@
57         # a plain file.
58          #
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);
65 @@ -369,7 +369,7 @@
66          # contents.
67          #
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);
74 @@ -393,7 +393,7 @@
75          } else {
76              $data = "$f->{devmajor},$f->{devminor}";
77          }
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);
83 @@ -487,17 +487,21 @@
84  #
85  sub pathCreate
86  {
87 -    my($dir, $fullPath, $file, $f) = @_;
88 +    my($dir, $fullPath, $f) = @_;
89  
90      #
91      # Get parent directory of each of $dir and $fullPath
92      #
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,
107                              mode  => 0755,
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
110 @@ -59,7 +59,7 @@
111          TopDir  => $topDir || '__TOPDIR__',
112          BinDir  => $installDir || '__INSTALLDIR__',
113          LibDir  => $installDir || '__INSTALLDIR__',
114 -        Version => '2.1.2',
115 +        Version => '2.1.2pl0',
116          BackupFields => [qw(
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
121 @@ -221,8 +221,13 @@
122              $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 );
123              $t->{fileCnt}++;
124          } else {
125 -            $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
126 -            $t->{xferErrCnt}++;
127 +            #
128 +            # Ignore annoying log message on incremental for tar 1.15.x
129 +            #
130 +            if ( !/: file is unchanged; not dumped$/ ) {
131 +                $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
132 +                $t->{xferErrCnt}++;
133 +            }
134             #
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
This page took 0.041952 seconds and 3 git commands to generate.