- 2.0.0 release. Minor tweaks to disable utf8. v2_0_0
authorcbarratt <cbarratt>
Sun, 15 Jun 2003 02:48:40 +0000 (02:48 +0000)
committercbarratt <cbarratt>
Sun, 15 Jun 2003 02:48:40 +0000 (02:48 +0000)
29 files changed:
ChangeLog
bin/BackupPC
bin/BackupPC_compressPool
bin/BackupPC_dump
bin/BackupPC_link
bin/BackupPC_nightly
bin/BackupPC_restore
bin/BackupPC_sendEmail
bin/BackupPC_serverMesg
bin/BackupPC_tarCreate
bin/BackupPC_tarExtract
bin/BackupPC_trashClean
bin/BackupPC_zcat
bin/BackupPC_zipCreate
cgi-bin/BackupPC_Admin
conf/config.pl
configure.pl
lib/BackupPC/Attrib.pm
lib/BackupPC/FileZIO.pm
lib/BackupPC/Lang/de.pm
lib/BackupPC/Lib.pm
lib/BackupPC/PoolWrite.pm
lib/BackupPC/View.pm
lib/BackupPC/Xfer/Rsync.pm
lib/BackupPC/Xfer/RsyncFileIO.pm
lib/BackupPC/Xfer/Smb.pm
lib/BackupPC/Xfer/Tar.pm
lib/BackupPC/Zip/FileMember.pm
makeDist

index bdfa741..b19a8b3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 # Version __VERSION__, __RELEASEDATE__
 #------------------------------------------------------------------------
 
+* Minor tweaks to disable utf8 on utf8-capable machines (eg: RH8+).
+  Added "no utf8" to all programs, and added binmode() to relevant
+  file handles.
+
+#------------------------------------------------------------------------
+# Version 2.0.0beta3, 1 Jun 2003
+#------------------------------------------------------------------------
+
 * Several improvements to restore: cancel now reports the correct
   message and cleans up correctly.
 
 * Rsync with whitespace and wildcard excludes fixed by replacing
-  argList with argList+ in config.pl.
+  argList with argList+ in config.pl plus a fix to Lib.pm for
+  shell escaping array arguments.
+
+* Fixed rsync restore for character and block special devices
+  (major and minor device numbers weren't correctly restored).
 
 * Fixed typo in bin/BackupPC_restore (XferLOG -> RestoreLOG).
 
index e6bc5f1..c95b330 100755 (executable)
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
 #========================================================================
 
 use strict;
+no  utf8;
 use vars qw(%Status %Info $Hosts);
 use lib "/usr/local/BackupPC/lib";
 use BackupPC::Lib;
index 3796c75..4f22a27 100755 (executable)
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
 #========================================================================
 
 use strict;
+no  utf8;
 
 use File::Find;
 use File::Path;
@@ -178,6 +179,7 @@ sub doCompress
         $Errors++;
         return;
     }
+    binmode(FH);
     while ( sysread(FH, $dataIn, $CompMaxWrite) > 0 ) {
         $flush = 0;
         $FileOrigSz += length($dataIn);
@@ -202,6 +204,7 @@ sub doCompress
                 close(FH);
                 return;
             }
+           binmode(OUT);
             $copy = 1;
         }
         if ( $copy && $dataOut ne "" ) {
@@ -244,6 +247,7 @@ sub doCompress
             unlink("$file.__z");
             return;
         }
+       binmode(FH);
     }
     if ( $copy ) {
         if ( !sysseek(OUT, 0, 0) ) {
@@ -329,6 +333,7 @@ sub checkRead
         $f->close();
         return;
     }
+    binmode(FH);
     #print("comparing $file to $cfile\n");
     while ( 1 ) {
         $n = 1 + int(rand($CompMaxRead) + rand(100));
@@ -363,6 +368,7 @@ sub checkReadLine
         $f->close();
         return;
     }
+    binmode(FH);
     while ( 1 ) {
         $d0 = <FH>;
         $d  = $f->readLine();
index 928dc50..176c93a 100755 (executable)
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
 #========================================================================
 
 use strict;
+no  utf8;
 use lib "/usr/local/BackupPC/lib";
 use BackupPC::Lib;
 use BackupPC::FileZIO;
@@ -476,6 +477,7 @@ for my $shareName ( @$ShareNames ) {
            close(WH);
            last;
        }
+       binmode(TAR);
        if ( !$tarPid ) {
            #
            # This is the tar child.  Close the write end of the pipe,
@@ -502,6 +504,7 @@ for my $shareName ( @$ShareNames ) {
        open(NEW_FILES, ">", "$TopDir/pc/$client/NewFileList")
                     || die("can't open $TopDir/pc/$client/NewFileList");
        $newFilesFH = *NEW_FILES;
+       binmode(NEW_FILES);
     }
 
     #
@@ -993,7 +996,7 @@ sub UserCommandRun
         LOG        => *LOG,
         XferLOG    => $XferLOG,
         stat       => \%stat,
-        xferOK     => $stat{xferOK},
+        xferOK     => $stat{xferOK} || 0,
        type       => $type,
     };
     my $cmd = $bpc->cmdVarSubstitute($Conf{$type}, $vars);
index 7450f28..b70376e 100755 (executable)
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
 #========================================================================
 
 use strict;
+no  utf8;
 use lib "/usr/local/BackupPC/lib";
 use BackupPC::Lib;
 use BackupPC::Attrib;
@@ -106,6 +107,7 @@ while ( 1 ) {
     $CurrDumpDir = "$Dir/$Backups[$num]{num}";
     $Compress = $Backups[$num]{compress};
     if ( open(NEW, "<", "$Dir/NewFileList.$Backups[$num]{num}") ) {
+       binmode(NEW);
         while ( <NEW> ) {
             chomp;
             next if ( !/(\w+) (\d+) (.*)/ );
index e4eb3cc..5ab8fd8 100755 (executable)
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
 #========================================================================
 
 use strict;
+no  utf8;
 use lib "/usr/local/BackupPC/lib";
 use BackupPC::Lib;
 use BackupPC::FileZIO;
index 1186cac..6583b00 100755 (executable)
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
 #========================================================================
 
 use strict;
+no  utf8;
 use lib "/usr/local/BackupPC/lib";
 use BackupPC::Lib;
 use BackupPC::FileZIO;
@@ -320,6 +321,7 @@ if ( $useTar ) {
        $stat{hostError} = "Can't fork to run tar";
        exit(RestoreCleanup($client));
     }
+    binmode(TAR);
     if ( !$tarPid ) {
        #
        # This is the tarCreate child.  Clone STDERR to STDOUT,
@@ -612,6 +614,7 @@ sub UserCommandRun
     return if ( !defined($Conf{$type}) );
     my $vars = {
         xfer         => $xfer,
+        client       => $client,
         host         => $host,
         hostIP       => $hostIP,
         share        => $RestoreReq{shareDest},
@@ -622,7 +625,7 @@ sub UserCommandRun
        moreUsers    => $Hosts->{$client}{moreUsers},
         XferLOG      => $RestoreLOG,
         stat         => \%stat,
-        xferOK       => $stat{xferOK},
+        xferOK       => $stat{xferOK} || 0,
        type         => $type,
        bkupSrcHost  => $RestoreReq{hostSrc},
        bkupSrcShare => $RestoreReq{shareSrc},
index 9131081..6f1f95f 100755 (executable)
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
 #========================================================================
 
 use strict;
+no  utf8;
 use lib "/usr/local/BackupPC/lib";
 use BackupPC::Lib;
 use BackupPC::FileZIO;
@@ -282,6 +283,7 @@ if ( !$opts{t} ) {
              [\%UserEmailInfo],
              [qw(*UserEmailInfo)]);
     if ( open(HOST, ">", "$TopDir/log/UserEmailInfo.pl") ) {
+       binmode(HOST);
         print(HOST $dumpStr);
         close(HOST);
     }
index e84cd42..cab0896 100755 (executable)
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
 #========================================================================
 
 use strict;
+no  utf8;
 use lib "/usr/local/BackupPC/lib";
 use BackupPC::Lib;
 use BackupPC::FileZIO;
index 9966469..6fb9c0b 100755 (executable)
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
 #========================================================================
 
 use strict;
+no  utf8;
 use lib "/usr/local/BackupPC/lib";
 use File::Path;
 use Getopt::Std;
@@ -135,6 +136,7 @@ my(%HardLinkExtraFiles, @HardLinks);
 #
 # Write out all the requested files/directories
 #
+binmode(STDOUT);
 my $fh = *STDOUT;
 foreach my $dir ( @ARGV ) {
     archiveWrite($fh, $dir);
index 0508092..6f0251a 100755 (executable)
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
 #========================================================================
 
 use strict;
+no  utf8;
 use lib "/usr/local/BackupPC/lib";
 use BackupPC::Lib;
 use BackupPC::Attrib qw(:all);
@@ -374,6 +375,7 @@ sub processClose
 mkpath("$OutDir/$ShareName", 0, 0777);
 open(NEW_FILES, ">>", "$TopDir/pc/$host/NewFileList")
                  || die("can't open $TopDir/pc/$host/NewFileList");
+binmode(NEW_FILES);
 binmode(STDIN);
 1 while ( TarReadFile(*STDIN) );
 1 while ( sysread(STDIN, my $discard, 1024) );
index 193528f..546bbba 100755 (executable)
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
 #========================================================================
 
 use strict;
+no  utf8;
 use lib "/usr/local/BackupPC/lib";
 use BackupPC::Lib;
 
index 223b78a..4957bec 100755 (executable)
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
 #========================================================================
 
 use strict;
+no  utf8;
 
 use lib "/usr/local/BackupPC/lib";
 use Compress::Zlib;
index c5fe37c..960743a 100755 (executable)
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
 #========================================================================
 
 use strict;
+no  utf8;
 use lib "/usr/local/BackupPC/lib";
 use Archive::Zip qw(:ERROR_CODES);
 use File::Path;
@@ -132,6 +133,7 @@ my $fh = new IO::Handle;
 $fh->fdopen(fileno(STDOUT),"w");
 my $zipfh = Archive::Zip->new();
 
+binmode(STDOUT);
 foreach my $dir ( @ARGV ) {
     archiveWrite($zipfh, $dir);
 }
index 906b4bb..5dd2ba9 100755 (executable)
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
 #========================================================================
 
 use strict;
+no  utf8;
 use CGI;
 use lib "/usr/local/BackupPC/lib";
 use BackupPC::Lib;
@@ -388,6 +389,7 @@ sub Action_View
     } elsif ( $type eq "docs" ) {
         $file = "$BinDir/../doc/BackupPC.html";
         if ( open(LOG, $file) ) {
+           binmode(LOG);
             Header($Lang->{BackupPC__Documentation});
             print while ( <LOG> );
             close(LOG);
@@ -1018,6 +1020,7 @@ EOF
                          [qw(*RestoreReq)]);
         $dump->Indent(1);
         if ( open(REQ, ">$TopDir/pc/$hostDest/$reqFileName") ) {
+           binmode(REQ);
             print(REQ $dump->Dump);
             close(REQ);
         } else {
index 8257ac1..4bf78d3 100644 (file)
@@ -153,7 +153,7 @@ $Conf{MaxOldLogFiles} = 14;
 $Conf{DfPath} = '/bin/df';
 
 #
-# Command to run df.  Several variables are substituted at run-time:
+# Command to run df.  The following variables are substituted at run-time:
 #
 #   $dfPath      path to df ($Conf{DfPath})
 #   $topDir      top-level BackupPC data directory
@@ -554,9 +554,6 @@ $Conf{BlackoutWeekDays}     = [1, 2, 3, 4, 5];
 #   - 'tar':    backup and restore via tar, tar over ssh, rsh or nfs.
 #               Good choice for linux/unix.
 #
-# A future version should support 'rsync' as a transport method for
-# more efficient backup of linux/unix machines (and perhaps WinXX??).
-#
 $Conf{XferMethod} = 'smb';
 
 #
@@ -575,7 +572,7 @@ $Conf{SmbClientPath} = '/usr/bin/smbclient';
 # Commands to run smbclient for a full dump, incremental dump or a restore.
 # This setting only matters if $Conf{XferMethod} = 'smb'.
 #
-# Several variables are substituted at run-time:
+# The following variables are substituted at run-time:
 #
 #    $smbClientPath   same as $Conf{SmbClientPath}
 #    $host            host to backup/restore
@@ -618,8 +615,7 @@ $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName'
 # are sufficient to read all the files you want to backup.  Also, you
 # will probably want to add "/proc" to $Conf{BackupFilesExclude}.
 #
-# Several variables are substituted at run-time.  The following variables
-# are substituted at run-time:
+# The following variables are substituted at run-time:
 #
 #   $host        host name
 #   $hostIP      host's IP address
@@ -868,7 +864,7 @@ $Conf{NmbLookupPath} = '/usr/bin/nmblookup';
 
 #
 # NmbLookup command.  Given an IP address, does an nmblookup on that
-# IP address.  Several variables are substituted at run-time:
+# IP address.  The following variables are substituted at run-time:
 #
 #   $nmbLookupPath      path to nmblookup ($Conf{NmbLookupPath})
 #   $host               IP address
@@ -927,7 +923,7 @@ $Conf{FixedIPNetBiosNameCheck} = 0;
 $Conf{PingPath} = '/bin/ping';
 
 #
-# Ping command.  Several variables are substituted at run-time:
+# Ping command.  The following variables are substituted at run-time:
 #
 #   $pingPath      path to ping ($Conf{PingPath})
 #   $host          host name
@@ -1018,8 +1014,42 @@ $Conf{MaxOldPerPCLogFiles} = 12;
 #
 #    $Conf{DumpPreUserCmd} = '$sshPath -l root $host /usr/bin/dumpMysql';
 #
-# Various variable substitutions are available; see BackupPC_dump
-# or BackupPC_restore for the details.
+# The following variable substitutions are made at run time for
+# $Conf{DumpPreUserCmd} and $Conf{DumpPostUserCmd}:
+#
+#        $type         type of dump (incr or full)
+#        $xferOK       1 if the dump succeeded, 0 if it didn't
+#        $client       client name being backed up
+#        $host         host name (could be different from client name if
+#                                 $Conf{ClientNameAlias} is set)
+#        $hostIP       IP address of host
+#        $user         user name from the hosts file
+#        $moreUsers    list of additional users from the hosts file
+#        $share        the first share name
+#        $shares       list of all the share names
+#        $XferMethod   value of $Conf{XferMethod} (eg: tar, rsync, smb)
+#        $sshPath      value of $Conf{SshPath},
+#
+# The following variable substitutions are made at run time for
+# $Conf{RestorePreUserCmd} and $Conf{RestorePostUserCmd}:
+#
+#        $client       client name being backed up
+#        $xferOK       1 if the restore succeeded, 0 if it didn't
+#        $host         host name (could be different from client name if
+#                                 $Conf{ClientNameAlias} is set)
+#        $hostIP       IP address of host
+#        $user         user name from the hosts file
+#        $moreUsers    list of additional users from the hosts file
+#        $share        the first share name
+#        $XferMethod   value of $Conf{XferMethod} (eg: tar, rsync, smb)
+#        $sshPath      value of $Conf{SshPath},
+#        $type         set to "restore"
+#        $bkupSrcHost  host name of the restore source
+#        $bkupSrcShare share name of the restore source
+#        $bkupSrcNum   backup number of the restore source
+#        $pathHdrSrc   common starting path of restore source
+#        $pathHdrDest  common starting path of destination
+#        $fileList     list of files being restored
 #
 $Conf{DumpPreUserCmd}     = undef;
 $Conf{DumpPostUserCmd}    = undef;
index b98bccc..1fea712 100755 (executable)
@@ -40,6 +40,7 @@
 #========================================================================
 
 use strict;
+no  utf8;
 use vars qw(%Conf %OrigConf);
 use lib "./lib";
 
@@ -544,7 +545,8 @@ if ( -f $dest && !-f $confCopy ) {
                                            unless chown($uid, $gid, $confCopy);
     die("can't chmod $mode $confCopy\n")   unless chmod($mode, $confCopy);
 }
-open(OUT, ">$dest") || die("can't open $dest for writing\n");
+open(OUT, ">", $dest) || die("can't open $dest for writing\n");
+binmode(OUT);
 my $blockComment;
 foreach my $var ( @$newConf ) {
     if ( length($blockComment)
@@ -636,8 +638,10 @@ sub InstallFile
     if ( $binary ) {
        die("can't copy($prog, $dest)\n") unless copy($prog, $dest);
     } else {
-       open(PROG, $prog)   || die("can't open $prog for reading\n");
-       open(OUT, ">$dest") || die("can't open $dest for writing\n");
+       open(PROG, $prog)     || die("can't open $prog for reading\n");
+       open(OUT, ">", $dest) || die("can't open $dest for writing\n");
+       binmode(PROG);
+       binmode(OUT);
        while ( <PROG> ) {
            s/__INSTALLDIR__/$Conf{InstallDir}/g;
            s/__TOPDIR__/$Conf{TopDir}/g;
@@ -681,6 +685,7 @@ sub ConfigParse
 {
     my($file) = @_;
     open(C, $file) || die("can't open $file");
+    binmode(C);
     my($out, @conf, $var);
     my $comment = 1;
     my $allVars = {};
index dda3127..e51dcf9 100644 (file)
@@ -30,7 +30,7 @@
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
index 56987cd..512bbab 100644 (file)
@@ -29,7 +29,7 @@
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -99,6 +99,7 @@ sub open
         } else {
             open(FH, "<", $fileName) || return;
         }
+       binmode(FH);
         $fh = *FH;
     }
     $compLevel = 0 if ( !$CompZlibOK );
@@ -353,6 +354,7 @@ sub compressCopy
         my $fh = BackupPC::FileZIO->open($destFileZ, 1, $compress);
         my $data;
         if ( defined($fh) && open(LOG, "<", $srcFile) ) {
+           binmode(LOG);
             while ( sysread(LOG, $data, 65536) > 0 ) {
                 $fh->write(\$data);
             }
index 2d52bb0..9de994e 100644 (file)
@@ -579,7 +579,7 @@ $Lang{Backup_browse_for__host} = <<EOF;
 <li> Klicken Sie auf eine Datei um diese per download wiederherzustellen.
 </ul>
 
-\${h2("Contents of \${EscHTML(\$dirDisplay)}")}
+\${h2("Inhalt von \${EscHTML(\$dirDisplay)}")}
 <form name="form1" method="post" action="\$MyURL">
 <input type="hidden" name="num" value="\$num">
 <input type="hidden" name="host" value="\$host">
index 43870b8..b0d33df 100644 (file)
@@ -29,7 +29,7 @@
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -58,7 +58,7 @@ sub new
         TopDir  => $topDir || '/data/BackupPC',
         BinDir  => $installDir || '/usr/local/BackupPC',
         LibDir  => $installDir || '/usr/local/BackupPC',
-        Version => '2.0.0beta3',
+        Version => '2.0.0',
         BackupFields => [qw(
                     num type startTime endTime
                     nFiles size nFilesExist sizeExist nFilesNew sizeNew
@@ -187,6 +187,7 @@ sub BackupInfoRead
 
     flock(LOCK, LOCK_EX) if open(LOCK, "$bpc->{TopDir}/pc/$host/LOCK");
     if ( open(BK_INFO, "$bpc->{TopDir}/pc/$host/backups") ) {
+       binmode(BK_INFO);
         while ( <BK_INFO> ) {
             s/[\n\r]+//;
             next if ( !/^(\d+\t(incr|full)[\d\t]*$)/ );
@@ -212,6 +213,7 @@ sub BackupInfoWrite
            "$bpc->{TopDir}/pc/$host/backups.old")
                 if ( -f "$bpc->{TopDir}/pc/$host/backups" );
     if ( open(BK_INFO, ">$bpc->{TopDir}/pc/$host/backups") ) {
+       binmode(BK_INFO);
         for ( $i = 0 ; $i < @Backups ; $i++ ) {
             my %b = %{$Backups[$i]};
             printf(BK_INFO "%s\n", join("\t", @b{@{$bpc->{BackupFields}}}));
@@ -229,6 +231,7 @@ sub RestoreInfoRead
 
     flock(LOCK, LOCK_EX) if open(LOCK, "$bpc->{TopDir}/pc/$host/LOCK");
     if ( open(RESTORE_INFO, "$bpc->{TopDir}/pc/$host/restores") ) {
+       binmode(RESTORE_INFO);
         while ( <RESTORE_INFO> ) {
             s/[\n\r]+//;
             next if ( !/^(\d+.*)/ );
@@ -254,6 +257,7 @@ sub RestoreInfoWrite
            "$bpc->{TopDir}/pc/$host/restores.old")
                 if ( -f "$bpc->{TopDir}/pc/$host/restores" );
     if ( open(RESTORE_INFO, ">$bpc->{TopDir}/pc/$host/restores") ) {
+       binmode(RESTORE_INFO);
         for ( $i = 0 ; $i < @Restores ; $i++ ) {
             my %b = %{$Restores[$i]};
             printf(RESTORE_INFO "%s\n",
@@ -335,6 +339,7 @@ sub HostInfoRead
                      "Can't open $bpc->{TopDir}/conf/hosts\n");
         return {};
     }
+    binmode(HOST_INFO);
     while ( <HOST_INFO> ) {
         s/[\n\r]+//;
         s/#.*//;
@@ -606,6 +611,7 @@ sub File2MD5
     $name = $1 if ( $name =~ /(.*)/ );
     return ("", 0) if ( $fileSize == 0 );
     return ("", -1) if ( !open(N, $name) );
+    binmode(N);
     $md5->reset();
     $md5->add($fileSize);
     if ( $fileSize > 262144 ) {
@@ -1096,6 +1102,7 @@ sub cmdSystemOrEval
            return $err        if ( !defined($stdoutCB) );
            return;
        }
+       binmode(CHILD);
        if ( !$pid ) {
            #
            # This is the child
index d032d3f..4e94ab8 100644 (file)
@@ -56,7 +56,7 @@
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
index d3ad18f..f008968 100644 (file)
@@ -31,7 +31,7 @@
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
index f0350c9..1b43096 100644 (file)
@@ -29,7 +29,7 @@
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
index d40d51f..4311e7b 100644 (file)
@@ -12,7 +12,7 @@
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -734,6 +734,7 @@ sub fileDeltaRxNext
                     if ( open(F, "+>", "$fio->{outDirSh}RStmp") ) {
                         my $data;
                        my $byteCnt = 0;
+                       binmode(F);
                         while ( $fh->read(\$data, 1024 * 1024) > 0 ) {
                             if ( syswrite(F, $data) != length($data) ) {
                                 $fio->log(sprintf("Can't write len=%d to %s",
@@ -760,6 +761,7 @@ sub fileDeltaRxNext
                 $fh->close;
             } else {
                 if ( open(F, "<", $attr->{fullPath}) ) {
+                   binmode(F);
                     $fio->{rxInFd} = *F;
                     $fio->{rxInName} = $attr->{fullPath};
                 } else {
index b694785..968df3a 100644 (file)
@@ -29,7 +29,7 @@
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
index c4f9c6a..d7b6488 100644 (file)
@@ -29,7 +29,7 @@
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
index 5e41c58..f4215b5 100644 (file)
@@ -33,7 +33,7 @@
 #
 #========================================================================
 #
-# Version 2.0.0beta3, released 1 Jun 2003.
+# Version 2.0.0, released 14 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
index 231ed1b..6079896 100755 (executable)
--- a/makeDist
+++ b/makeDist
@@ -41,8 +41,8 @@ use File::Copy;
 
 umask(0022);
 
-my $Version     = "2.0.0beta3";
-my $ReleaseDate = "1 Jun 2003";
+my $Version     = "2.0.0";
+my $ReleaseDate = "14 Jun 2003";
 my $DistDir     = "dist/BackupPC-$Version";
 
 my @PerlSrc = qw(
@@ -162,6 +162,8 @@ sub InstallFile
     } else {
        open(FILE, $file)   || die("can't open $file for reading\n");
        open(OUT, ">$dest") || die("can't open $dest for writing\n");
+       binmode(FILE);
+       binmode(OUT);
        while ( <FILE> ) {
            s/^# *Version \d+\.\d+[\.\w]*, released \d+ \w+ \d{4}\.?/# Version __VERSION__, released __RELEASEDATE__./;
            s/__VERSION__/$Version/g;
@@ -202,6 +204,7 @@ sub InstallFile
 sub config2pod
 {
     open(C, "conf/config.pl") || die("can't open conf/config.pl");
+    binmode(C);
     my($str, $out, $getHdr, @conf);
     my $first = 1;
     while ( <C> ) {
@@ -261,6 +264,7 @@ sub CheckConfigParams
     my $errors;
 
     open(F, $file) || die("can't open $file\n");
+    binmode(F);
     if ( $check ) {
         while ( <F> ) {
             s/\$(self|bpc)->{Conf}{([^}\$]+)}/if ( !defined($vars->{$2}) ) {
@@ -304,6 +308,7 @@ sub CheckLangUsage
 
     foreach my $file ( qw(cgi-bin/BackupPC_Admin bin/BackupPC_sendEmail) ) {
        open(F, $file) || die("can't open $file");
+       binmode(F);
        while ( <F> ) {
            s/\$Lang->{([^}]*)}/$vars->{$1} = 1;/eg;
        }
@@ -312,6 +317,7 @@ sub CheckLangUsage
     foreach my $f ( <lib/BackupPC/Lang/*.pm> ) {
         my $done = {};
         open(F, $f) || die("can't open $f\n");
+       binmode(F);
         while ( <F> ) {
             s/#.*//g;
             s/\$Lang{([^}]*)}/