From 31a7aca27ffd75e0aee9836704599cdb95dc2421 Mon Sep 17 00:00:00 2001 From: cbarratt Date: Sun, 19 Nov 2006 18:40:28 +0000 Subject: [PATCH] additional changes to it.pm (post 3.0.0beta2) --- ChangeLog | 8 +- bin/BackupPC | 12 +- configure.pl | 4 +- doc-src/BackupPC.pod | 14 ++- lib/BackupPC/Lang/it.pm | 199 ++++++++++++++++--------------- lib/BackupPC/Storage/Text.pm | 1 + lib/BackupPC/Xfer/Rsync.pm | 4 +- lib/BackupPC/Xfer/RsyncDigest.pm | 4 +- lib/BackupPC/Xfer/RsyncFileIO.pm | 9 +- makeDist | 2 +- 10 files changed, 140 insertions(+), 117 deletions(-) diff --git a/ChangeLog b/ChangeLog index f6cc6e3..b6068ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,10 @@ # Version __VERSION__, __RELEASEDATE__ #------------------------------------------------------------------------ +* Fix for final md4 digest check on rsync transfers >= 512MB when protocol + version >= 27 and checksums are not cached. Reported by Garith Dugmore + and Dale Renton. + * Config Editor "Save" button is now always visible, but greyed out until there are changes to save. @@ -49,8 +53,8 @@ * More compact host summary, including disabled host indication, from Jono Woodhouse. -* New directory/file/hardlink and symlink image icons from Jono - Woodhouse, making directory browse more compact. +* New directory/file/hardlink and symlink image icons from Sean Cameron + and Jono Woodhouse, making directory browse more compact. * BackupPC.pid is now world readable, suggested by Casper Thomsen. diff --git a/bin/BackupPC b/bin/BackupPC index 8e718de..786ecba 100755 --- a/bin/BackupPC +++ b/bin/BackupPC @@ -47,7 +47,7 @@ # #======================================================================== # -# Version 3.0.0beta2, released 11 Nov 2006. +# Version 3.0.0beta2, released 18 Nov 2006. # # See http://backuppc.sourceforge.net. # @@ -113,9 +113,13 @@ if ( $Conf{BackupPCUserVerify} # Read old status # if ( -f "$LogDir/status.pl" && !(my $ret = do "$LogDir/status.pl") ) { - die "couldn't parse $LogDir/status.pl: $@" if $@; - die "couldn't do $LogDir/status.pl: $!" unless defined $ret; - die "couldn't run $LogDir/status.pl"; + if ( $@ ) { + print STDERR "couldn't parse $LogDir/status.pl: $@"; + } elsif ( !defined($ret) ) { + print STDERR "couldn't do $LogDir/status.pl: $!"; + } else { + print STDERR "couldn't run $LogDir/status.pl"; + } } # diff --git a/configure.pl b/configure.pl index 7cf5149..5a03034 100755 --- a/configure.pl +++ b/configure.pl @@ -872,9 +872,9 @@ EOF } eval "use File::RsyncP;"; -if ( !$@ && $File::RsyncP::VERSION < 0.64 ) { +if ( !$@ && $File::RsyncP::VERSION < 0.68 ) { print("\nWarning: you need to upgrade File::RsyncP;" - . " I found $File::RsyncP::VERSION and BackupPC needs 0.64\n"); + . " I found $File::RsyncP::VERSION and BackupPC needs 0.68\n"); } exit(0); diff --git a/doc-src/BackupPC.pod b/doc-src/BackupPC.pod index 5e1b190..741596d 100644 --- a/doc-src/BackupPC.pod +++ b/doc-src/BackupPC.pod @@ -363,8 +363,7 @@ compression is on. =item * -Perl version 5.6.0 or later. BackupPC has been tested with -version 5.6.x, and 5.8.x. If you don't have perl, please +Perl version 5.8.0 or later. If you don't have perl, please see L. =item * @@ -1179,7 +1178,7 @@ This is because setuid scripts are disabled by the kernel in most flavors of unix and linux. To see if your perl has setuid emulation, see if there is a program -called sperl5.6.0 (or sperl5.8.2 etc, based on your perl version) +called sperl5.8.0 (or sperl5.8.2 etc, based on your perl version) in the place where perl is installed. If you can't find this program, then you have two options: rebuild and reinstall perl with the setuid emulation turned on (answer "y" to the question "Do you want to do @@ -2763,18 +2762,23 @@ Javier Gonzalez provided the Spanish translation, es.pm for v2.0.0. Manfred Herrmann provided the German translation, de.pm for v2.0.0. Manfred continues to support de.pm updates for each new version, -together with some help frmo Ralph Paßgang. +together with some help from Ralph Paßgang. Lorenzo Cappelletti provided the Italian translation, it.pm for v2.1.0. +Giuseppe Iuculano and Vittorio Macchi updated it for 3.0.0. Lieven Bridts provided the Dutch translation, nl.pm, for v2.1.0, -with some tweaks from Guus Houtzager. +with some tweaks from Guus Houtzager, and updates for 3.0.0. Reginaldo Ferreira provided the Portuguese Brazillian translation pt_br.pm for v2.2.0. Rich Duzenbury provided the RSS feed option to the CGI interface. +Jono Woodhouse from CapeSoft Software (www.capesoft.com) provided a +new CSS skin for 3.0.0 with several layout improvements. Sean Cameron +(also from CapeSoft) designed new and more compact file icons for 3.0.0. + Many people have reported bugs, made useful suggestions and helped with testing; see the ChangeLog and the mail lists. diff --git a/lib/BackupPC/Lang/it.pm b/lib/BackupPC/Lang/it.pm index 27f3b04..910bf41 100644 --- a/lib/BackupPC/Lang/it.pm +++ b/lib/BackupPC/Lang/it.pm @@ -3,6 +3,9 @@ # Italian i18n file # # (C) Lorenzo Cappelletti 2004 +# Added translations and corrections: +# Giuseppe Iuculano 2006 +# Vittorio Macchi 2006 # @@ -38,7 +41,7 @@ $Lang{Admin_Options_Page} = < -
  • Other options can go here... e.g., +
  • Altre opzioni possono andare qui... e.g.,
  • Modifica configurazione server --> @@ -133,11 +136,11 @@ $Lang{BackupPC_Summary} = < -\${h2("Host con backup buoni")} +\${h2("Host con backup validi")}

    Ci sono \$hostCntGood host sottoposti a backup per un totale di:

      -
    • \$fullTot backup completi per una dimensione toatle di \${fullSizeTot}GB +
    • \$fullTot backup completi per una dimensione totale di \${fullSizeTot}GB (prima del processo di pooling e compressione),
    • \$incrTot backup incrementali per una dimensione totale di \${incrSizeTot}GB (prima del processo di pooling e compressione). @@ -149,10 +152,10 @@ Ci sono \$hostCntGood host sottoposti a backup per un totale di: Completi Età completi (giorni) Dimensione completi (GB) - Velocità (MB/s) + Velocità (MB/s) Incrementali Età incrementali (giorni) - ENG Last Backup (days) + Ultimo Backup (giorni) Stato Ultimo tentativo \$strGood @@ -168,10 +171,10 @@ Ci sono \$hostCntNone host senza alcun backup. Completi Età completi (giorni) Dimensione completi (GB) - Velocità (MB/s) + Velocità (MB/s) Incrementali Età incrementali (giorni) - ENG Last Backup (days) + Ultimo Backup (giorni) Stato Ultimo tentativo \$strNone @@ -481,7 +484,7 @@ sarà sovrascritto! window.open(URL,'','width=500,height=400'); } - + Ripristino dei file sulla condivisione Archive::Zip non è installato e non è quindi possibile scaricare un archivio zip. -Contattare l\'amministratore di sistemaper installare Archive::Zip da +Contattare l\'amministratore di sistema per installare Archive::Zip da www.cpan.org.

      EOF @@ -657,7 +660,7 @@ Cliccare sul numero di backup per sfogliare e ripristinare i file di backup. Numero backup Tipo Completo - ENG Level + Livello Data avvio Durata (minuti) Età (giorni) @@ -703,7 +706,7 @@ riutilizzo e file nuovi. Tipo Numero file Dimensione (MB) - Velocità (MB/s) + Velocità (MB/s) Numero file Dimensione (MB) Numero file @@ -937,13 +940,13 @@ $Lang{Archive___num_details_for__host2 } = < - - - - - - - + + + + + + +
      Number \$Archives[\$i]{num}
      Requested by \$ArchiveReq{user}
      Request time \$reqTime
      Result \$Archives[\$i]{result}
      Error Message \$Archives[\$i]{errorMsg}
      Start time \$startTime
      Duration \$duration\'
      Numero \$Archives[\$i]{num}
      Richiesto da \$ArchiveReq{user}
      Data richiesta \$reqTime
      Risultato \$Archives[\$i]{result}
      Messaggio d\'errore \$Archives[\$i]{errorMsg}
      Data inizio \$startTime
      Durata \$duration\'
      Xfer log file Visualizza, Errori @@ -1082,7 +1085,7 @@ EOF # --------- $Lang{A_command_for_host_is_on_the_command_queue_will_run_soon} = <È già presente un comando per \$host nella coda dei comandi (sarà eseguito a breve). +
    • È già presente un comando per \$host nella coda dei comandi (sarà eseguito a breve). EOF # -------- @@ -1240,8 +1243,8 @@ $Lang{Reason_no_ping} = "no ping"; $Lang{Reason_backup_canceled_by_user} = "backup annullato dall\'utente"; $Lang{Reason_restore_canceled_by_user} = "ripristino annullato dall\'utente"; $Lang{Reason_archive_canceled_by_user} = "archivio annullato dall\'utente"; -$Lang{Disabled_OnlyManualBackups} = "ENG auto disabled"; -$Lang{Disabled_AllBackupsDisabled} = "ENG disabled"; +$Lang{Disabled_OnlyManualBackups} = "auto disabilitato"; +$Lang{Disabled_AllBackupsDisabled} = "disabilitato"; # --------- # Email messages @@ -1350,7 +1353,7 @@ $Lang{RSS_Host_Summary} = < -Note: Check Override if you want to modify a value specific to this host. +Nota: Se vuoi modificare un valore specifico per questo host, seleziona Sovrascrivi.

      EOF -$Lang{CfgEdit_Button_Save} = "Save"; -$Lang{CfgEdit_Button_Insert} = "Insert"; -$Lang{CfgEdit_Button_Delete} = "Delete"; -$Lang{CfgEdit_Button_Add} = "Add"; -$Lang{CfgEdit_Button_Override} = "Override"; -$Lang{CfgEdit_Button_New_Key} = "New Key"; +$Lang{CfgEdit_Button_Save} = "Salva"; +$Lang{CfgEdit_Button_Insert} = "Inserisci"; +$Lang{CfgEdit_Button_Delete} = "Cancella"; +$Lang{CfgEdit_Button_Add} = "Aggiungi"; +$Lang{CfgEdit_Button_Override} = "Sovrascrivi"; +$Lang{CfgEdit_Button_New_Key} = "Nuova chiave"; $Lang{CfgEdit_Error_No_Save} - = "ENG Error: No save due to errors"; + = "Errore: Non salvo poiché sono presenti errori"; $Lang{CfgEdit_Error__must_be_an_integer} - = "Error: \$var must be an integer"; + = "Errore: \$var deve essere un numero intero"; $Lang{CfgEdit_Error__must_be_real_valued_number} - = "Error: \$var must be a real-valued number"; + = "Errore: \$var deve esser un numero con un valore reale"; $Lang{CfgEdit_Error__entry__must_be_an_integer} - = "Error: \$var entry \$k must be an integer"; + = "Errore: \$var entry \$k deve essere un numero intero"; $Lang{CfgEdit_Error__entry__must_be_real_valued_number} - = "Error: \$var entry \$k must be a real-valued number"; + = "Errore: \$var entry \$k deve esser un numero con un valore reale"; $Lang{CfgEdit_Error__must_be_executable_program} - = "Error: \$var must be a valid executable path"; + = "Errore: \$var deve essere un percorso valido"; $Lang{CfgEdit_Error__must_be_valid_option} - = "Error: \$var must be a valid option"; + = "Errore: \$var deve essere una opzione valida"; $Lang{CfgEdit_Error_Copy_host_does_not_exist} - = "Copy host \$copyHost doesn't exist; creating full host name \$fullHost. Delete this host if that is not what you wanted."; + = "L\'host da copiare \$copyHost non esiste; creo dunque l\'host \$fullHost da zero. Se non è quello che desideravi, cancella questo host."; $Lang{CfgEdit_Log_Copy_host_config} - = "\$User copied config from host \$fromHost to \$host\n"; + = "\$User ha copiato la configurazione di \$fromHost su \$host\n"; $Lang{CfgEdit_Log_Delete_param} - = "\$User deleted \$p from \$conf\n"; + = "\$User ha cancellato \$p da \$conf\n"; $Lang{CfgEdit_Log_Add_param_value} - = "\$User added \$p to \$conf, set to \$value\n"; + = "\$User ha aggiunto \$p a \$conf, settandolo a \$value\n"; $Lang{CfgEdit_Log_Change_param_value} - = "\$User changed \$p in \$conf to \$valueNew from \$valueOld\n"; + = "\$User ha cambiato \$p su \$conf in \$valueNew da \$valueOld\n"; $Lang{CfgEdit_Log_Host_Delete} - = "\$User deleted host \$host\n"; + = "\$User ha cancellato l\'host \$host\n"; $Lang{CfgEdit_Log_Host_Change} - = "\$User host \$host changed \$key from \$valueOld to \$valueNew\n"; + = "\$User host \$host ha cambiato \$key da \$valueOld in \$valueNew\n"; $Lang{CfgEdit_Log_Host_Add} - = "\$User added host \$host: \$value\n"; + = "\$User ha aggiunto l\'host \$host: \$value\n"; diff --git a/lib/BackupPC/Storage/Text.pm b/lib/BackupPC/Storage/Text.pm index 8a8b528..fa46af2 100644 --- a/lib/BackupPC/Storage/Text.pm +++ b/lib/BackupPC/Storage/Text.pm @@ -364,6 +364,7 @@ sub ConfigFileMerge # if we have a complete expression, then we are done # skipping text from the original config file. # + $skipExpr = $1 if ( $skipExpr =~ /(.*)/s ); eval($skipExpr); $skipExpr = undef if ( $@ eq "" ); } diff --git a/lib/BackupPC/Xfer/Rsync.pm b/lib/BackupPC/Xfer/Rsync.pm index 15f08fc..5f5f3a3 100644 --- a/lib/BackupPC/Xfer/Rsync.pm +++ b/lib/BackupPC/Xfer/Rsync.pm @@ -56,10 +56,10 @@ BEGIN { # # Note: also update configure.pl when this version number is changed! # - if ( $File::RsyncP::VERSION < 0.64 ) { + if ( $File::RsyncP::VERSION < 0.68 ) { $RsyncLibOK = 0; $RsyncLibErr = "File::RsyncP module version" - . " ($File::RsyncP::VERSION) too old: need 0.64"; + . " ($File::RsyncP::VERSION) too old: need 0.68"; } else { $RsyncLibOK = 1; } diff --git a/lib/BackupPC/Xfer/RsyncDigest.pm b/lib/BackupPC/Xfer/RsyncDigest.pm index b881681..b2d5f50 100644 --- a/lib/BackupPC/Xfer/RsyncDigest.pm +++ b/lib/BackupPC/Xfer/RsyncDigest.pm @@ -244,7 +244,7 @@ sub digestAdd sub digestStart { my($class, $fileName, $fileSize, $blockSize, $defBlkSize, - $checksumSeed, $needMD4, $compress, $doCache) = @_; + $checksumSeed, $needMD4, $compress, $doCache, $protocol_version) = @_; return -1 if ( !$RsyncLibOK ); @@ -256,6 +256,8 @@ sub digestStart digest => File::RsyncP::Digest->new, }, $class; + $dg->{digest}->protocol($protocol_version); + if ( $fileSize > 0 && $compress && $doCache >= 0 ) { open(my $fh, "<", $fileName) || return -2; binmode($fh); diff --git a/lib/BackupPC/Xfer/RsyncFileIO.pm b/lib/BackupPC/Xfer/RsyncFileIO.pm index a8b69b9..2d2f0b2 100644 --- a/lib/BackupPC/Xfer/RsyncFileIO.pm +++ b/lib/BackupPC/Xfer/RsyncFileIO.pm @@ -160,7 +160,8 @@ sub csumStart my($err, $d, $blkSize) = BackupPC::Xfer::RsyncDigest->digestStart( $attr->{fullPath}, $attr->{size}, 0, $defBlkSize, $fio->{checksumSeed}, - 0, $attr->{compress}, 0); + 0, $attr->{compress}, 0, + $fio->{protocol_version}); my($isCached, $isInvalid) = $d->isCached; if ( $fio->{logLevel} >= 5 ) { $fio->log("$attr->{fullPath} verify; cached = $isCached," @@ -185,7 +186,8 @@ sub csumStart (my $err, $fio->{csum}, my $blkSize) = BackupPC::Xfer::RsyncDigest->digestStart($attr->{fullPath}, $attr->{size}, 0, $defBlkSize, $fio->{checksumSeed}, - $needMD4, $attr->{compress}, 1); + $needMD4, $attr->{compress}, 1, + $fio->{protocol_version}); if ( $fio->{logLevel} >= 5 ) { my($isCached, $invalid) = $fio->{csum}->isCached; $fio->log("$attr->{fullPath} cache = $isCached," @@ -1106,7 +1108,8 @@ sub fileDeltaRxDone = BackupPC::Xfer::RsyncDigest->digestStart( $attr->{fullPath}, $attr->{size}, 0, 2048, $fio->{checksumSeed}, 1, - $attr->{compress}, 1); + $attr->{compress}, 1, + $fio->{protocol_version}); if ( $err ) { $fio->log("Can't open $attr->{fullPath} for MD4" . " check (err=$err, $name)"); diff --git a/makeDist b/makeDist index 2234b5d..d2bc2e6 100755 --- a/makeDist +++ b/makeDist @@ -54,7 +54,7 @@ die("BackupPC::Lib->new failed\n") umask(0022); my $Version = "3.0.0beta2"; -my $ReleaseDate = "11 Nov 2006"; +my $ReleaseDate = "18 Nov 2006"; my $DistDir = "dist/BackupPC-$Version"; my @PerlSrc = qw( -- 2.20.1