From owner-svn-ports-head@freebsd.org Tue Jun 21 21:01:28 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4FF0AC583D; Tue, 21 Jun 2016 21:01:28 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57D8017C8; Tue, 21 Jun 2016 21:01:28 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5LL1RJ6053438; Tue, 21 Jun 2016 21:01:27 GMT (envelope-from rene@FreeBSD.org) Received: (from rene@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5LL1RpG053434; Tue, 21 Jun 2016 21:01:27 GMT (envelope-from rene@FreeBSD.org) Message-Id: <201606212101.u5LL1RpG053434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rene set sender to rene@FreeBSD.org using -f From: Rene Ladan Date: Tue, 21 Jun 2016 21:01:27 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r417289 - in head/sysutils/backuppc-devel: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2016 21:01:28 -0000 Author: rene Date: Tue Jun 21 21:01:27 2016 New Revision: 417289 URL: https://svnweb.freebsd.org/changeset/ports/417289 Log: sysutils/backuppc-devel: add a workaround for users of Samba 4. Using Samba 3.6 is still reccommended PR: 209875 Submitted by: myself, patch by maintainer Added: head/sysutils/backuppc-devel/files/patch-lib_BackupPC_Xfer_Smb.pm (contents, props changed) Modified: head/sysutils/backuppc-devel/Makefile head/sysutils/backuppc-devel/files/patch-lib__BackupPC__CGI__View.pm head/sysutils/backuppc-devel/files/pkg-message.in Modified: head/sysutils/backuppc-devel/Makefile ============================================================================== --- head/sysutils/backuppc-devel/Makefile Tue Jun 21 20:39:00 2016 (r417288) +++ head/sysutils/backuppc-devel/Makefile Tue Jun 21 21:01:27 2016 (r417289) @@ -3,7 +3,7 @@ PORTNAME= backuppc DISTVERSION= 4.0.0alpha3 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= sysutils MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-beta/${DISTVERSION} PKGNAMESUFFIX= -devel Added: head/sysutils/backuppc-devel/files/patch-lib_BackupPC_Xfer_Smb.pm ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/backuppc-devel/files/patch-lib_BackupPC_Xfer_Smb.pm Tue Jun 21 21:01:27 2016 (r417289) @@ -0,0 +1,33 @@ +--- lib/BackupPC/Xfer/Smb.pm.orig 2013-12-01 20:58:20 UTC ++++ lib/BackupPC/Xfer/Smb.pm +@@ -216,7 +216,7 @@ sub readOutput + # This section is highly dependent on the version of smbclient. + # If you upgrade Samba, make sure that these regexp are still valid. + # +- if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ ) { ++ if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ || /^tar:(\d+)\s+\+\+\+ (.*)$/ ) { + my $sambaFileSize = $1; + my $pcFileName = $2; + (my $fileName = $pcFileName) =~ s/\\/\//g; +@@ -229,7 +229,9 @@ sub readOutput + $t->{byteCnt} += $2; + $t->{fileCnt}++; + $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 1 ); +- } elsif ( /^\s*tar: dumped \d+ files/ ) { ++ } elsif ( /^\s*tar: dumped \d+ files/ ++ || /Total bytes received: \d+/i ++ || /tar_process done, err = 0/ ) { + $t->{xferOK} = 1; + $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 ); + } elsif ( /^\s*tar: restored \d+ files/ ) { +@@ -269,6 +271,10 @@ sub readOutput + } elsif ( /^\s*directory \\/i ) { + $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 ); + } elsif ( /smb: \\>/ ++ || /^tar:\d+\s/ ++ || /^ NTLMSSP_/ ++ || /^GENSEC backend / ++ || /^doing parameter / + || /^\s*added interface/i + || /^\s*tarmode is now/i + || /^\s*Total bytes written/i Modified: head/sysutils/backuppc-devel/files/patch-lib__BackupPC__CGI__View.pm ============================================================================== --- head/sysutils/backuppc-devel/files/patch-lib__BackupPC__CGI__View.pm Tue Jun 21 20:39:00 2016 (r417288) +++ head/sysutils/backuppc-devel/files/patch-lib__BackupPC__CGI__View.pm Tue Jun 21 21:01:27 2016 (r417289) @@ -1,6 +1,6 @@ ---- ./lib/BackupPC/CGI/View.pm.orig 2014-09-03 14:15:03.000000000 +0400 -+++ ./lib/BackupPC/CGI/View.pm 2014-09-03 14:15:20.000000000 +0400 -@@ -102,7 +102,7 @@ +--- lib/BackupPC/CGI/View.pm.orig 2013-12-01 20:58:20 UTC ++++ lib/BackupPC/CGI/View.pm +@@ -102,7 +102,7 @@ sub action $file = $bpc->ConfDir() . "/hosts"; $linkHosts = 1; } elsif ( $type eq "docs" ) { @@ -9,3 +9,14 @@ } elsif ( $host ne "" ) { if ( !defined($In{num}) ) { # get the latest LOG file +@@ -148,6 +148,10 @@ sub action + } + $s =~ s/[\n\r]+//g; + if ( $s =~ /smb: \\>/ ++ || $s =~ /^tar:\d+\s/ ++ || $s =~ /^ NTLMSSP_/ ++ || $s =~ /^GENSEC backend / ++ || $s =~ /^doing parameter / + || $s =~ /^\s*(\d+) \(\s*\d+\.\d kb\/s\) (.*)$/ + || $s =~ /^tar: dumped \d+ files/ + || $s =~ /^\s*added interface/i Modified: head/sysutils/backuppc-devel/files/pkg-message.in ============================================================================== --- head/sysutils/backuppc-devel/files/pkg-message.in Tue Jun 21 20:39:00 2016 (r417288) +++ head/sysutils/backuppc-devel/files/pkg-message.in Tue Jun 21 21:01:27 2016 (r417289) @@ -13,4 +13,13 @@ This is where all the backup data is stored. This file system needs to be big enough to accommodate all the PCs you expect to backup. + + - Users of Samba 4 smbclient should change debug level for smbclient + restore command to 5 ('-d 5') in the main configuration, for instance + + $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName $I_option -U $userName -E -d 5 -c tarmode\\ full -Tx -'; + + and set in the each host's configuration + + $Conf{BackupZeroFilesIsFatal} = '0'; ==========================================================================