FreeBSD Bugzilla – Attachment 171327 Details for
Bug 209875
sysutils/backuppc-devel: Modernize Samba dependency
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Workaround for Samba 4 smbclient
smb4-devel.patch (text/plain), 4.34 KB, created by
Alexander Moisseev
on 2016-06-12 07:58:58 UTC
(
hide
)
Description:
Workaround for Samba 4 smbclient
Filename:
MIME Type:
Creator:
Alexander Moisseev
Created:
2016-06-12 07:58:58 UTC
Size:
4.34 KB
patch
obsolete
>diff -ruN ./backuppc-devel.orig/Makefile ./backuppc-devel/Makefile >--- ./backuppc-devel.orig/Makefile 2016-05-02 19:08:56.000000000 +0300 >+++ ./backuppc-devel/Makefile 2016-06-12 10:51:03.094696000 +0300 >@@ -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 >diff -ruN ./backuppc-devel.orig/files/patch-lib_BackupPC_Xfer_Smb.pm ./backuppc-devel/files/patch-lib_BackupPC_Xfer_Smb.pm >--- ./backuppc-devel.orig/files/patch-lib_BackupPC_Xfer_Smb.pm 1970-01-01 03:00:00.000000000 +0300 >+++ ./backuppc-devel/files/patch-lib_BackupPC_Xfer_Smb.pm 2016-06-12 10:49:51.000000000 +0300 >@@ -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 >diff -ruN ./backuppc-devel.orig/files/patch-lib__BackupPC__CGI__View.pm ./backuppc-devel/files/patch-lib__BackupPC__CGI__View.pm >--- ./backuppc-devel.orig/files/patch-lib__BackupPC__CGI__View.pm 2014-10-23 21:48:35.000000000 +0400 >+++ ./backuppc-devel/files/patch-lib__BackupPC__CGI__View.pm 2016-06-12 10:49:51.000000000 +0300 >@@ -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 >diff -ruN ./backuppc-devel.orig/files/pkg-message.in ./backuppc-devel/files/pkg-message.in >--- ./backuppc-devel.orig/files/pkg-message.in 2014-10-23 21:48:35.000000000 +0400 >+++ ./backuppc-devel/files/pkg-message.in 2016-06-12 10:09:49.000000000 +0300 >@@ -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'; > ==========================================================================
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
moiseev
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 209875
:
170846
| 171327