View | Details | Raw Unified | Return to bug 217861 | Differences between
and this patch

Collapse All | Expand All

(-)backuppc-devel/distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (BackupPC-4.0.0alpha3.tar.gz) = 3e63ad375465425f97179152d09e91963cced8b5ca7e400290b81decf83a902e
1
TIMESTAMP = 1493016668
2
SIZE (BackupPC-4.0.0alpha3.tar.gz) = 583970
2
SHA256 (backuppc-backuppc-4.1.2.20170424-92469a6_GH0.tar.gz) = 4220ddf5744396ae7bd6ed9458a8a560e07ddf2556736d5d57cd5651aa4bfccc
3
SIZE (backuppc-backuppc-4.1.2.20170424-92469a6_GH0.tar.gz) = 540110
(-)backuppc-devel/files/patch-bin-BackupPC_rrdUpdate (-57 lines)
Lines 1-57 Link Here
1
--- ./bin/BackupPC_rrdUpdate.orig	2013-12-09 17:06:45.000000000 +0400
2
+++ ./bin/BackupPC_rrdUpdate	2013-12-10 12:24:41.000000000 +0400
3
@@ -109,7 +109,7 @@
4
     }
5
     $sizeTot = $sizeTot / 1024;
6
 
7
-    print $bpc->cmdSystemOrEval(
8
+    if ( $err = $bpc->cmdSystemOrEval(
9
             [
10
                 $Conf{RrdToolPath},
11
                 "update", $RRDFile,
12
@@ -119,13 +119,17 @@
13
                 . $Info{"poolKb"}  . ":"
14
                 . $Info{"pool4Kb"} . ":"
15
                 . $Info{"cpool4Kb"}
16
-            ]);
17
-     printf("%sRRD updated:"
18
+            ]) ) {
19
+        print "$err";
20
+    }
21
+    else {
22
+        printf("%sRRD updated:"
23
           . " date %s; cpoolKb %f; total %f;"
24
           . " poolKb %f; pool4Kb %f; cpool4Kb %f\n",
25
                 $bpc->timeStamp,
26
                 $NowRnd1, $Info{"cpoolKb"}, $sizeTot,
27
                 $Info{"poolKb"}, $Info{"pool4Kb"}, $Info{"cpool4Kb"});
28
+    }
29
 }
30
 
31
 #
32
@@ -140,7 +144,7 @@
33
     #
34
     # Get each pool max value from RRD
35
     #
36
-    $bpc->cmdSystemOrEval(
37
+    $bpc->cmdSystemOrEvalLong(
38
             [
39
                 $Conf{RrdToolPath},
40
                 "graphv", "-",
41
@@ -158,7 +162,7 @@
42
                 if ( $_[0] =~ /^print\[([0-3])\] = "([.0-9]+)"$/ ) {
43
                     $poolMax[$1] = $2 unless ( $2 == 0 );
44
                 }
45
-            });
46
+            }, 1, undef);
47
 
48
     my $poolSizeGraph = [
49
         "$Conf{RrdToolPath}",
50
@@ -228,6 +232,6 @@
51
         print("Can't open/create $LogDir/poolUsage$weeks.png\n");
52
         return;
53
     }
54
-    $bpc->cmdSystemOrEval($poolSizeGraph, sub { print $fdOut $_[0] });
55
+    $bpc->cmdSystemOrEvalLong($poolSizeGraph, sub { print $fdOut $_[0] }, 1, undef);
56
     close($fdOut);
57
 }
(-)backuppc-devel/files/patch-doc-BackupPC.pod (-8 lines)
Lines 1-8 Link Here
1
--- doc/BackupPC.pod.orig	2014-05-13 17:40:09.000000000 +0400
2
+++ doc/BackupPC.pod	2014-05-13 17:40:27.000000000 +0400
3
@@ -1,3 +1,5 @@
4
+=encoding ISO8859-1
5
+
6
 =head1 BackupPC Introduction
7
 
8
 This documentation describes BackupPC version 3.3.0,
(-)backuppc-devel/files/patch-lib__BackupPC__CGI__View.pm (-11 lines)
Lines 9-22 Link Here
9
     } elsif ( $host ne "" ) {
9
     } elsif ( $host ne "" ) {
10
         if ( !defined($In{num}) ) {
10
         if ( !defined($In{num}) ) {
11
             # get the latest LOG file
11
             # get the latest LOG file
12
@@ -148,6 +148,10 @@ sub action
13
 		    }
14
 		    $s =~ s/[\n\r]+//g;
15
 		    if ( $s =~ /smb: \\>/
16
+			    || $s =~ /^tar:\d+\s/
17
+			    || $s =~ /^  NTLMSSP_/
18
+			    || $s =~ /^GENSEC backend /
19
+			    || $s =~ /^doing parameter /
20
 			    || $s =~ /^\s*(\d+) \(\s*\d+\.\d kb\/s\) (.*)$/
21
 			    || $s =~ /^tar: dumped \d+ files/
22
 			    || $s =~ /^\s*added interface/i
(-)backuppc-devel/files/patch-lib_BackupPC_Lib.pm (-20 lines)
Lines 1-20 Link Here
1
--- lib/BackupPC/Lib.pm.orig	2016-11-08 08:12:44 UTC
2
+++ lib/BackupPC/Lib.pm
3
@@ -1097,7 +1097,7 @@ sub cmdVarSubstitute
4
         #
5
         # Replace scalar variables first
6
         #
7
-        $arg =~ s[\${(\w+)}(\+?)]{
8
+        $arg =~ s[\$\{(\w+)}(\+?)]{
9
             exists($vars->{$1}) && ref($vars->{$1}) ne "ARRAY"
10
                 ? ($2 eq "+" ? $bpc->shellEscape($vars->{$1}) : $vars->{$1})
11
                 : "\${$1}$2"
12
@@ -1106,7 +1106,7 @@ sub cmdVarSubstitute
13
         # Now replicate any array arguments; this just works for just one
14
         # array var in each argument.
15
         #
16
-        if ( $arg =~ m[(.*)\${(\w+)}(\+?)(.*)] && ref($vars->{$2}) eq "ARRAY" ) {
17
+        if ( $arg =~ m[(.*)\$\{(\w+)}(\+?)(.*)] && ref($vars->{$2}) eq "ARRAY" ) {
18
             my $pre  = $1;
19
             my $var  = $2;
20
             my $esc  = $3;
(-)backuppc-devel/files/patch-lib_BackupPC_Xfer_Smb.pm (-33 lines)
Lines 1-33 Link Here
1
--- lib/BackupPC/Xfer/Smb.pm.orig	2013-12-01 20:58:20 UTC
2
+++ lib/BackupPC/Xfer/Smb.pm
3
@@ -216,7 +216,7 @@ sub readOutput
4
         # This section is highly dependent on the version of smbclient.
5
         # If you upgrade Samba, make sure that these regexp are still valid.
6
         #
7
-        if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ ) {
8
+        if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ || /^tar:(\d+)\s+\+\+\+ (.*)$/ ) {
9
             my $sambaFileSize = $1;
10
             my $pcFileName    = $2;
11
             (my $fileName = $pcFileName) =~ s/\\/\//g;
12
@@ -229,7 +229,9 @@ sub readOutput
13
             $t->{byteCnt} += $2;
14
             $t->{fileCnt}++;
15
             $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 1 );
16
-        } elsif ( /^\s*tar: dumped \d+ files/ ) {
17
+        } elsif ( /^\s*tar: dumped \d+ files/
18
+                    || /Total bytes received: \d+/i
19
+                    || /tar_process done, err = 0/ ) {
20
             $t->{xferOK} = 1;
21
             $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
22
         } elsif ( /^\s*tar: restored \d+ files/ ) {
23
@@ -269,6 +271,10 @@ sub readOutput
24
         } elsif ( /^\s*directory \\/i ) {
25
             $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 );
26
         } elsif ( /smb: \\>/
27
+                || /^tar:\d+\s/
28
+                || /^  NTLMSSP_/
29
+                || /^GENSEC backend /
30
+                || /^doing parameter /
31
                 || /^\s*added interface/i
32
                 || /^\s*tarmode is now/i
33
                 || /^\s*Total bytes written/i
(-)backuppc-devel/files/patch-update.pl (-276 lines)
Lines 1-276 Link Here
1
--- ./update.pl.orig	2014-09-03 13:36:33.000000000 +0400
2
+++ ./update.pl	2014-09-03 13:56:16.000000000 +0400
3
@@ -222,7 +222,7 @@
4
 if ( $ConfigPath ne "" && -r $ConfigPath ) {
5
     (my $confDir = $ConfigPath) =~ s{/[^/]+$}{};
6
     die("BackupPC::Lib->new failed\n")
7
-            if ( !($bpc = BackupPC::Lib->new(".", ".", $confDir, 1)) );
8
+            if ( !($bpc = BackupPC::Lib->new(".", $opts{"install-dir"}, $confDir, 1)) );
9
     %Conf = $bpc->Conf();
10
     %OrigConf = %Conf;
11
     if ( !$opts{fhs} ) {
12
@@ -494,239 +494,21 @@
13
 
14
 print <<EOF;
15
 
16
-Ok, we're about to:
17
-
18
-  - install the binaries, lib and docs in $Conf{InstallDir},
19
-  - create the data directory $Conf{TopDir},
20
-  - create/update the config.pl file $Conf{ConfDir}/config.pl,
21
-  - optionally install the cgi-bin interface.
22
+Ok, we're about to create/update the config.pl file $Conf{ConfDir}/config.pl.
23
 
24
 EOF
25
 
26
 exit unless prompt("--> Do you want to continue?", "y") =~ /y/i;
27
 
28
 #
29
-# Create install directories
30
-#
31
-foreach my $dir ( qw(bin share/doc/BackupPC
32
-		     lib/BackupPC/CGI
33
-		     lib/BackupPC/Config
34
-		     lib/BackupPC/Lang
35
-		     lib/BackupPC/Storage
36
-		     lib/BackupPC/Xfer
37
-		     lib/BackupPC/Zip
38
-                     lib/Net/FTP
39
-		 ) ) {
40
-    next if ( -d "$DestDir$Conf{InstallDir}/$dir" );
41
-    mkpath("$DestDir$Conf{InstallDir}/$dir", 0, 0755);
42
-    if ( !-d "$DestDir$Conf{InstallDir}/$dir"
43
-            || !my_chown($Uid, $Gid, "$DestDir$Conf{InstallDir}/$dir") ) {
44
-        die("Failed to create or chown $DestDir$Conf{InstallDir}/$dir\n");
45
-    } else {
46
-        print("Created $DestDir$Conf{InstallDir}/$dir\n");
47
-    }
48
-}
49
-
50
-#
51
-# Create CGI image directory
52
-#
53
-foreach my $dir ( ($Conf{CgiImageDir}) ) {
54
-    next if ( $dir eq "" || -d "$DestDir$dir" );
55
-    mkpath("$DestDir$dir", 0, 0755);
56
-    if ( !-d "$DestDir$dir" || !my_chown($Uid, $Gid, "$DestDir$dir") ) {
57
-        die("Failed to create or chown $DestDir$dir");
58
-    } else {
59
-        print("Created $DestDir$dir\n");
60
-    }
61
-}
62
-
63
-#
64
-# Create other directories
65
-#
66
-foreach my $dir ( (
67
-            "$Conf{TopDir}",
68
-            "$Conf{TopDir}/pool",
69
-            "$Conf{TopDir}/cpool",
70
-            "$Conf{TopDir}/pc",
71
-            "$Conf{ConfDir}",
72
-            "$Conf{LogDir}",
73
-            "$Conf{RunDir}",
74
-        ) ) {
75
-    mkpath("$DestDir$dir", 0, 0750) if ( !-d "$DestDir$dir" );
76
-    if ( !-d "$DestDir$dir"
77
-            || !my_chown($Uid, $Gid, "$DestDir$dir") ) {
78
-        die("Failed to create or chown $DestDir$dir\n");
79
-    } else {
80
-        print("Created $DestDir$dir\n");
81
-    }
82
-}
83
-
84
-printf("Installing binaries in $DestDir$Conf{InstallDir}/bin\n");
85
-foreach my $prog ( qw(
86
-        bin/BackupPC
87
-        bin/BackupPC_Admin_SCGI
88
-        bin/BackupPC_archive
89
-        bin/BackupPC_archiveHost
90
-        bin/BackupPC_archiveStart
91
-        bin/BackupPC_attribPrint
92
-        bin/BackupPC_backupDelete
93
-        bin/BackupPC_backupDuplicate
94
-        bin/BackupPC_dump
95
-        bin/BackupPC_fixupBackupSummary
96
-        bin/BackupPC_fsck
97
-        bin/BackupPC_ls
98
-        bin/BackupPC_nightly
99
-        bin/BackupPC_poolCntPrint
100
-        bin/BackupPC_refCountUpdate
101
-        bin/BackupPC_restore
102
-        bin/BackupPC_rrdUpdate
103
-        bin/BackupPC_sendEmail
104
-        bin/BackupPC_serverMesg
105
-        bin/BackupPC_tarCreate
106
-        bin/BackupPC_tarExtract
107
-        bin/BackupPC_zcat
108
-        bin/BackupPC_zipCreate
109
-    ) ) {
110
-    InstallFile($prog, "$DestDir$Conf{InstallDir}/$prog", 0555);
111
-}
112
-
113
-#
114
-# remove old pre-v4 programs
115
-#
116
-foreach my $prog ( qw(
117
-        bin/BackupPC_link
118
-        bin/BackupPC_tarPCCopy
119
-        bin/BackupPC_trashClean
120
-        bin/BackupPC_compressPool
121
-    ) ) {
122
-    unlink("$DestDir$Conf{InstallDir}/$prog");
123
-}
124
-
125
-printf("Installing library in $DestDir$Conf{InstallDir}/lib\n");
126
-foreach my $lib ( qw(
127
-        lib/BackupPC/Config/Meta.pm
128
-        lib/BackupPC/DirOps.pm
129
-        lib/BackupPC/Lib.pm
130
-        lib/BackupPC/Storage.pm
131
-        lib/BackupPC/View.pm
132
-        lib/BackupPC/Xfer/Archive.pm
133
-        lib/BackupPC/Xfer/Ftp.pm
134
-        lib/BackupPC/Xfer/Protocol.pm
135
-        lib/BackupPC/Xfer/Rsync.pm
136
-        lib/BackupPC/Xfer/Smb.pm
137
-        lib/BackupPC/Xfer/Tar.pm
138
-        lib/BackupPC/Xfer.pm
139
-        lib/BackupPC/Zip/FileMember.pm
140
-        lib/Net/FTP/AutoReconnect.pm
141
-        lib/Net/FTP/RetrHandle.pm
142
-        lib/BackupPC/CGI/AdminOptions.pm
143
-        lib/BackupPC/CGI/Archive.pm
144
-        lib/BackupPC/CGI/ArchiveInfo.pm
145
-        lib/BackupPC/CGI/Browse.pm
146
-        lib/BackupPC/CGI/DirHistory.pm
147
-        lib/BackupPC/CGI/EditConfig.pm
148
-        lib/BackupPC/CGI/EmailSummary.pm
149
-        lib/BackupPC/CGI/GeneralInfo.pm
150
-        lib/BackupPC/CGI/HostInfo.pm
151
-        lib/BackupPC/CGI/Lib.pm
152
-        lib/BackupPC/CGI/LOGlist.pm
153
-        lib/BackupPC/CGI/Queue.pm
154
-        lib/BackupPC/CGI/ReloadServer.pm
155
-        lib/BackupPC/CGI/Restore.pm
156
-        lib/BackupPC/CGI/RestoreFile.pm
157
-        lib/BackupPC/CGI/RestoreInfo.pm
158
-        lib/BackupPC/CGI/RSS.pm
159
-        lib/BackupPC/CGI/StartServer.pm
160
-        lib/BackupPC/CGI/StartStopBackup.pm
161
-        lib/BackupPC/CGI/StopServer.pm
162
-        lib/BackupPC/CGI/Summary.pm
163
-        lib/BackupPC/CGI/View.pm
164
-        lib/BackupPC/Lang/cz.pm
165
-        lib/BackupPC/Lang/de.pm
166
-        lib/BackupPC/Lang/en.pm
167
-        lib/BackupPC/Lang/es.pm
168
-        lib/BackupPC/Lang/fr.pm
169
-        lib/BackupPC/Lang/it.pm
170
-        lib/BackupPC/Lang/ja.pm
171
-        lib/BackupPC/Lang/nl.pm
172
-        lib/BackupPC/Lang/pl.pm
173
-        lib/BackupPC/Lang/pt_br.pm
174
-        lib/BackupPC/Lang/ru.pm
175
-        lib/BackupPC/Lang/uk.pm
176
-        lib/BackupPC/Lang/zh_CN.pm
177
-        lib/BackupPC/Storage/Text.pm
178
-    ) ) {
179
-    InstallFile($lib, "$DestDir$Conf{InstallDir}/$lib", 0444);
180
-}
181
-
182
-#
183
-# remove old pre-v4 libraries
184
-#
185
-foreach my $lib ( qw(
186
-        lib/BackupPC/Attrib.pm
187
-        lib/BackupPC/Config.pm
188
-        lib/BackupPC/FileZIO.pm
189
-        lib/BackupPC/PoolWrite.pm
190
-        lib/BackupPC/Xfer/RsyncDigest.pm
191
-        lib/BackupPC/Xfer/RsyncFileIO.pm
192
-    ) ) {
193
-    unlink("$DestDir$Conf{InstallDir}/$lib");
194
-}
195
-
196
-#
197
 # clean pid and sock files from old location (they are now in $Conf{RunDir}, and they
198
 # get re-created each time BackupPC starts, so it's ok if RunDir eq LogDir).
199
 #
200
 unlink("$DestDir$Conf{LogDir}/BackupPC.pid")  if ( -f "$DestDir$Conf{LogDir}/BackupPC.pid" );
201
 unlink("$DestDir$Conf{LogDir}/BackupPC.sock") if ( -e "$DestDir$Conf{LogDir}/BackupPC.sock" );
202
 
203
-if ( $Conf{CgiImageDir} ne "" ) {
204
-    printf("Installing images in $DestDir$Conf{CgiImageDir}\n");
205
-    foreach my $img ( <images/*> ) {
206
-	(my $destImg = $img) =~ s{^images/}{};
207
-	InstallFile($img, "$DestDir$Conf{CgiImageDir}/$destImg", 0444, 1);
208
-    }
209
-
210
-    #
211
-    # Install new CSS file, making a backup copy if necessary
212
-    #
213
-    my $cssBackup = "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css.pre-4.0.0alpha3";
214
-    if ( -f "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css" && !-f $cssBackup ) {
215
-	rename("$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css", $cssBackup);
216
-    }
217
-    InstallFile("conf/BackupPC_stnd.css",
218
-	        "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css", 0444, 0);
219
-    InstallFile("conf/BackupPC_stnd_orig.css",
220
-	        "$DestDir$Conf{CgiImageDir}/BackupPC_stnd_orig.css", 0444, 0);
221
-    InstallFile("conf/sorttable.js",
222
-                "$DestDir$Conf{CgiImageDir}/sorttable.js", 0444, 0);
223
-}
224
-
225
-printf("Making init.d scripts\n");
226
-foreach my $init ( qw(gentoo-backuppc gentoo-backuppc.conf linux-backuppc
227
-		      solaris-backuppc debian-backuppc freebsd-backuppc
228
-                      freebsd-backuppc2 suse-backuppc slackware-backuppc ) ) {
229
-    InstallFile("init.d/src/$init", "init.d/$init", 0444);
230
-}
231
-
232
-printf("Making Apache configuration file for suid-perl\n");
233
-InstallFile("httpd/src/BackupPC.conf", "httpd/BackupPC.conf", 0644);
234
-
235
-printf("Installing docs in $DestDir$Conf{InstallDir}/share/doc/BackupPC\n");
236
-foreach my $doc ( qw(BackupPC.pod BackupPC.html) ) {
237
-    InstallFile("doc/$doc", "$DestDir$Conf{InstallDir}/share/doc/BackupPC/$doc", 0444);
238
-    #
239
-    # clean up files from old directory
240
-    #
241
-    unlink("$DestDir$Conf{InstallDir}/doc/$doc") if ( -f "$DestDir$Conf{InstallDir}/doc/$doc" );
242
-}
243
-#
244
-# clean up old directory (ok if it quietly fails if there are other files in that directory)
245
-#
246
-rmdir("$DestDir$Conf{InstallDir}/doc") if ( -d "$DestDir$Conf{InstallDir}/doc" );
247
-
248
 printf("Installing config.pl and hosts in $DestDir$Conf{ConfDir}\n");
249
-InstallFile("conf/hosts", "$DestDir$Conf{ConfDir}/hosts", 0644)
250
+InstallFile("$DestDir$Conf{ConfDir}/hosts.sample", "$DestDir$Conf{ConfDir}/hosts", 0644)
251
                     if ( !-f "$DestDir$Conf{ConfDir}/hosts" );
252
 
253
 #
254
@@ -735,7 +517,7 @@
255
 # parameters and deleting ones that are no longer needed.
256
 #
257
 my $dest = "$DestDir$Conf{ConfDir}/config.pl";
258
-my ($distConf, $distVars) = ConfigParse("conf/config.pl");
259
+my ($distConf, $distVars) = ConfigParse("$DestDir$Conf{ConfDir}/config.pl.sample");
260
 my ($oldConf, $oldVars);
261
 my ($newConf, $newVars) = ($distConf, $distVars);
262
 if ( -f $dest ) {
263
@@ -974,13 +756,6 @@
264
     die("can't chown $Uid, $Gid $dest\n") unless my_chown($Uid, $Gid, $dest);
265
 }
266
 
267
-if ( $Conf{CgiDir} ne "" ) {
268
-    printf("Installing cgi script BackupPC_Admin in $DestDir$Conf{CgiDir}\n");
269
-    mkpath("$DestDir$Conf{CgiDir}", 0, 0755);
270
-    InstallFile("cgi-bin/BackupPC_Admin", "$DestDir$Conf{CgiDir}/BackupPC_Admin",
271
-                04554);
272
-}
273
-
274
 print <<EOF;
275
 
276
 Ok, it looks like we are finished.  There are several more things you
(-)backuppc-devel/files/pkg-message.in (-4 / +6 lines)
Lines 14-25 Link Here
14
     This file system needs to be big enough
14
     This file system needs to be big enough
15
     to accommodate all the PCs you expect to backup.
15
     to accommodate all the PCs you expect to backup.
16
16
17
 - BackupPC 4 creates a large number of files with negative group permissions.
18
    To avoid excessive daily security run output consider adding the following
19
    line to /etc/periodic.conf:
20
21
     daily_status_security_neggrpperm_enable="NO"
22
17
 - Users of Samba 4 smbclient should change debug level for smbclient
23
 - Users of Samba 4 smbclient should change debug level for smbclient
18
    restore command to 5 ('-d 5') in the main configuration, for instance
24
    restore command to 5 ('-d 5') in the main configuration, for instance
19
25
20
     $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName $I_option -U $userName -E -d 5 -c tarmode\\ full -Tx -';
26
     $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName $I_option -U $userName -E -d 5 -c tarmode\\ full -Tx -';
21
22
    and set in the each host's configuration
23
24
     $Conf{BackupZeroFilesIsFatal} = '0';
25
==========================================================================
27
==========================================================================
(-)backuppc-devel/files/update.sh.in (-1 / +4 lines)
Lines 1-6 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
2
3
perl %%PREFIX%%/libexec/backuppc/update.pl \
3
PERL5LIB=%%PREFIX%%/lib; export PERL5LIB
4
5
perl %%PREFIX%%/libexec/backuppc/configure.pl \
6
    --config-only \
4
    --bin-path perl=%%PREFIX%%/bin/perl \
7
    --bin-path perl=%%PREFIX%%/bin/perl \
5
    --config-dir %%ETCDIR%% \
8
    --config-dir %%ETCDIR%% \
6
    --cgi-dir %%CGIDIR%% \
9
    --cgi-dir %%CGIDIR%% \
(-)backuppc-devel/Makefile (-56 / +33 lines)
Lines 1-13 Link Here
1
# Created by: Alexander Moisseev <moiseev@mezonplus.ru>
1
# Created by: Alexander Moisseev <moiseev@mezonplus.ru>
2
# $FreeBSD: head/sysutils/backuppc-devel/Makefile 436925 2017-03-25 23:37:05Z antoine $
2
# $FreeBSD: head/sysutils/backuppc-devel/Makefile 436659 2017-03-21 21:59:31Z antoine $
3
3
4
PORTNAME=	backuppc
4
PORTNAME=	backuppc
5
DISTVERSION=	4.0.0alpha3
5
PORTVERSION=	4.1.2.20170424
6
PORTREVISION=	7
7
CATEGORIES=	sysutils
6
CATEGORIES=	sysutils
8
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-beta/${DISTVERSION}
9
PKGNAMESUFFIX=	-devel
7
PKGNAMESUFFIX=	-devel
10
DISTNAME=	BackupPC-${DISTVERSION}
11
8
12
MAINTAINER=	moiseev@mezonplus.ru
9
MAINTAINER=	moiseev@mezonplus.ru
13
COMMENT=	Multi-platform backup to disk-based storage
10
COMMENT=	Multi-platform backup to disk-based storage
Lines 15-29 Link Here
15
LICENSE=	GPLv3
12
LICENSE=	GPLv3
16
LICENSE_FILE=	${WRKSRC}/LICENSE
13
LICENSE_FILE=	${WRKSRC}/LICENSE
17
14
15
EXTRACT_DEPENDS=	p5-BackupPC-XS>=0.53:sysutils/p5-BackupPC-XS
18
RUN_DEPENDS=	p5-File-Listing>=0:sysutils/p5-File-Listing \
16
RUN_DEPENDS=	p5-File-Listing>=0:sysutils/p5-File-Listing \
19
		p5-BackupPC-XS>=0.30:sysutils/p5-BackupPC-XS
17
		p5-BackupPC-XS>=0.53:sysutils/p5-BackupPC-XS
20
18
21
CONFLICTS=	backuppc-[0-9]*
19
CONFLICTS=	backuppc-[0-9]* backuppc4-[0-9]*
22
20
23
USE_RC_SUBR=	backuppc
21
USE_RC_SUBR=	backuppc
24
22
23
USE_GITHUB=	yes
24
GH_TAGNAME=	92469a6
25
26
WRKSRC_SUBDIR=	dist/BackupPC-${PORTVERSION}
27
25
USES=		perl5
28
USES=		perl5
29
USE_PERL5=	extract
26
NO_BUILD=	yes
30
NO_BUILD=	yes
31
NO_ARCH=	yes
27
32
28
USERS=		backuppc
33
USERS=		backuppc
29
GROUPS=		backuppc
34
GROUPS=		backuppc
Lines 37-91 Link Here
37
PLIST_SUB+=	CGIDIR=${CGIDIR:S,^${PREFIX}/,,} \
42
PLIST_SUB+=	CGIDIR=${CGIDIR:S,^${PREFIX}/,,} \
38
		DISTVERSION=${DISTVERSION}
43
		DISTVERSION=${DISTVERSION}
39
44
40
PORTDOCS=	ChangeLog LICENSE README
45
PORTDOCS=	ChangeLog LICENSE README.md
41
42
OPTIONS_DEFINE=		ARCHIVE_ZIP DOCS RSYNC_BPC NMBLOOKUP \
43
			RRDTOOL SMBCLIENT XML_RSS
44
OPTIONS_DEFAULT=	ARCHIVE_ZIP
45
46
ARCHIVE_ZIP_DESC=	Perl module for Zip archive files
47
RSYNC_BPC_DESC=		Modified rsync that used as part of BackupPC
48
NMBLOOKUP_DESC=		NetBIOS Name lookup tool
49
RRDTOOL_DESC=		Round Robin Database Tools
50
SMBCLIENT_DESC=		Samba client
51
XML_RSS_DESC=		Perl extension to manage RSS files
52
53
.include <bsd.port.options.mk>
54
46
55
.if ${PORT_OPTIONS:MARCHIVE_ZIP}
47
OPTIONS_DEFINE=		ARCHIVE_ZIP DOCS RSYNC_BPC \
56
RUN_DEPENDS+=	p5-Archive-Zip>=0:archivers/p5-Archive-Zip
48
			RRDTOOL SMB XML_RSS
57
.endif
58
.if ${PORT_OPTIONS:MRSYNC_BPC}
59
RUN_DEPENDS+=	rsync-bpc>=3.0.9.3:net/rsync-bpc
60
.endif
61
.if ${PORT_OPTIONS:MNMBLOOKUP} || ${PORT_OPTIONS:MSMBCLIENT}
62
USES+=		samba:run # nmblookup, smbclient
63
.endif
64
.if ${PORT_OPTIONS:MRRDTOOL}
65
RUN_DEPENDS+=	rrdtool:databases/rrdtool
66
.endif
67
.if ${PORT_OPTIONS:MXML_RSS}
68
RUN_DEPENDS+=	p5-XML-RSS>=0:textproc/p5-XML-RSS
69
.endif
70
49
71
pre-patch:
50
OPTIONS_DEFAULT=	ARCHIVE_ZIP
72
	@${CP} ${WRKSRC}/configure.pl ${WRKSRC}/update.pl
73
51
74
post-patch:
52
ARCHIVE_ZIP_DESC=	Install Perl module for Zip archive files
75
	@${REINPLACE_CMD} \
53
RSYNC_BPC_DESC=		Install modified rsync that used as part of BackupPC
76
		-e 's|/etc/BackupPC\(/config.pl\)|${ETCDIR}\1|' \
54
RRDTOOL_DESC=		Install Round Robin Database Tools
77
		${WRKSRC}/configure.pl ${WRKSRC}/update.pl
55
SMB_DESC=		Install Samba (for "smb" transfer and NetBIOS lookup)
78
	@${REINPLACE_CMD} -E \
56
XML_RSS_DESC=		Install Perl extension to manage RSS files
79
		-e 's|^(use lib ")\.(/lib";)$$|\1${PREFIX}\2|' \
57
80
		${WRKSRC}/update.pl
58
ARCHIVE_ZIP_RUN_DEPENDS=	p5-Archive-Zip>=0:archivers/p5-Archive-Zip
81
	@${REINPLACE_CMD} \
59
RSYNC_BPC_RUN_DEPENDS=		rsync-bpc>=3.0.9.6:net/rsync-bpc
82
		-e 's|STDERR "Please su |STDERR "Please su [-m] |' \
60
RRDTOOL_RUN_DEPENDS=		rrdtool:databases/rrdtool
83
		${WRKSRC}/lib/BackupPC/Lib.pm
61
SMB_USES=			samba:run # nmblookup, smbclient
84
	@${REINPLACE_CMD} \
62
XML_RSS_RUN_DEPENDS=		p5-XML-RSS>=0:textproc/p5-XML-RSS
85
		-e 's| you can use the -s| you can use the -m|' \
63
86
		-e 's|option to su to explicitly run|option to su to run|' \
64
post-extract:
87
		-e 's|su -s /bin/bash __BACKUPPCUSER__|su -m __BACKUPPCUSER__|' \
65
	cd ${WRKDIR}/${PORTNAME}-${GH_TAGNAME} && ${PERL} makeDist \
88
		${WRKSRC}/doc/BackupPC.html ${WRKSRC}/doc/BackupPC.pod
66
		--nosyntaxCheck \
67
		--version ${PORTVERSION}
89
68
90
do-install:
69
do-install:
91
	cd ${WRKSRC} && ${PERL} configure.pl	\
70
	cd ${WRKSRC} && ${PERL} configure.pl	\
Lines 112-122 Link Here
112
	${CP} ${WRKSRC}/doc/BackupPC.html ${STAGEDIR}${WWWDIR}
91
	${CP} ${WRKSRC}/doc/BackupPC.html ${STAGEDIR}${WWWDIR}
113
	${RM} ${STAGEDIR}${ETCDIR}/config.pl
92
	${RM} ${STAGEDIR}${ETCDIR}/config.pl
114
	${RM} ${STAGEDIR}${ETCDIR}/hosts
93
	${RM} ${STAGEDIR}${ETCDIR}/hosts
115
	${CP} ${WRKSRC}/conf/config.pl ${STAGEDIR}${ETCDIR}/config.pl.sample
116
	${CP} ${WRKSRC}/conf/hosts ${STAGEDIR}${ETCDIR}/hosts.sample
117
	${CP} ${WRKDIR}/update.sh ${STAGEDIR}${ETCDIR}/update.sh
94
	${CP} ${WRKDIR}/update.sh ${STAGEDIR}${ETCDIR}/update.sh
118
	${MKDIR} ${STAGEDIR}${PREFIX}/libexec/backuppc
95
	${MKDIR} ${STAGEDIR}${PREFIX}/libexec/backuppc
119
	${CP} ${WRKSRC}/update.pl ${STAGEDIR}${PREFIX}/libexec/backuppc/update.pl
96
	${CP} ${WRKSRC}/configure.pl ${STAGEDIR}${PREFIX}/libexec/backuppc/configure.pl
120
97
121
.include <bsd.port.pre.mk>
98
.include <bsd.port.pre.mk>
122
99
(-)backuppc-devel/pkg-descr (-1 / +1 lines)
Lines 16-19 Link Here
16
BackupPC supports laptop environments with clients on dynamic
16
BackupPC supports laptop environments with clients on dynamic
17
IP addresses (DHCP) not always connected to the network.
17
IP addresses (DHCP) not always connected to the network.
18
18
19
WWW: http://backuppc.sourceforge.net
19
WWW: http://backuppc.sourceforge.net/
(-)backuppc-devel/pkg-plist (-2 / +5 lines)
Lines 11-16 Link Here
11
bin/BackupPC_fixupBackupSummary
11
bin/BackupPC_fixupBackupSummary
12
bin/BackupPC_fsck
12
bin/BackupPC_fsck
13
bin/BackupPC_ls
13
bin/BackupPC_ls
14
bin/BackupPC_migrateV3toV4
14
bin/BackupPC_nightly
15
bin/BackupPC_nightly
15
bin/BackupPC_poolCntPrint
16
bin/BackupPC_poolCntPrint
16
bin/BackupPC_refCountUpdate
17
bin/BackupPC_refCountUpdate
Lines 115-127 Link Here
115
%%WWWDIR%%/1111111.gif
116
%%WWWDIR%%/1111111.gif
116
%%WWWDIR%%/BackupPC.html
117
%%WWWDIR%%/BackupPC.html
117
%%WWWDIR%%/BackupPC_stnd.css
118
%%WWWDIR%%/BackupPC_stnd.css
118
%%WWWDIR%%/BackupPC_stnd_orig.css
119
%%WWWDIR%%/BackupPC_retro_v2.css
120
%%WWWDIR%%/BackupPC_retro_v3.css
119
%%WWWDIR%%/favicon.ico
121
%%WWWDIR%%/favicon.ico
120
%%WWWDIR%%/icon-dir.png
122
%%WWWDIR%%/icon-dir.png
121
%%WWWDIR%%/icon-file.png
123
%%WWWDIR%%/icon-file.png
122
%%WWWDIR%%/icon-hardlink.png
124
%%WWWDIR%%/icon-hardlink.png
123
%%WWWDIR%%/icon-symlink.png
125
%%WWWDIR%%/icon-symlink.png
124
%%WWWDIR%%/logo.gif
126
%%WWWDIR%%/logo.gif
127
%%WWWDIR%%/logo320.png
125
%%WWWDIR%%/sorttable.js
128
%%WWWDIR%%/sorttable.js
126
@owner backuppc
129
@owner backuppc
127
@group backuppc
130
@group backuppc
Lines 144-148 Link Here
144
@group
147
@group
145
@mode 0544
148
@mode 0544
146
%%ETCDIR%%/update.sh
149
%%ETCDIR%%/update.sh
147
libexec/backuppc/update.pl
150
libexec/backuppc/configure.pl
148
@mode
151
@mode

Return to bug 217861