View | Details | Raw Unified | Return to bug 183241
Collapse All | Expand All

(-)backuppc-devel/Makefile (-30 / +19 lines)
Lines 1-23 Link Here
1
# Created by: Alexander Moisseev <moiseev@mezonplus.ru>
1
# Created by: Alexander Moisseev <moiseev@mezonplus.ru>
2
# $FreeBSD: head/sysutils/backuppc/Makefile 366645 2014-08-30 16:46:17Z wg $
2
# $FreeBSD$
3
3
4
PORTNAME=	backuppc
4
PORTNAME=	backuppc
5
PORTVERSION=	3.3.0
5
DISTVERSION=	4.0.0alpha3
6
PORTREVISION=	7
7
CATEGORIES=	sysutils
6
CATEGORIES=	sysutils
8
MASTER_SITES=	SF
7
MASTER_SITES=	SF
9
MASTER_SITE_SUBDIR=	${PORTNAME}/${PORTNAME}/${PORTVERSION}
8
MASTER_SITE_SUBDIR=	${PORTNAME}/${PORTNAME}-beta/${DISTVERSION}
10
DISTNAME=	BackupPC-${PORTVERSION}
9
PKGNAMESUFFIX=	-devel
10
DISTNAME=	BackupPC-${DISTVERSION}
11
11
12
MAINTAINER=	moiseev@mezonplus.ru
12
MAINTAINER=	moiseev@mezonplus.ru
13
COMMENT=	System for backing PCs and laptops to a server
13
COMMENT=	System for backing PCs and laptops to a server
14
14
15
LICENSE=	GPLv2
15
LICENSE=	GPLv3
16
LICENSE_FILE=	${WRKSRC}/LICENSE
16
LICENSE_FILE=	${WRKSRC}/LICENSE
17
17
18
RUN_DEPENDS=	p5-File-Listing>=0:${PORTSDIR}/sysutils/p5-File-Listing
18
LATEST_LINK=	${PORTNAME}-devel
19
19
20
CONFLICTS=	backuppc-devel-[0-9]*
20
RUN_DEPENDS=	p5-File-Listing>=0:${PORTSDIR}/sysutils/p5-File-Listing \
21
		p5-BackupPC-XS>=0.30:${PORTSDIR}/sysutils/p5-BackupPC-XS
22
23
CONFLICTS=	backuppc-[0-9]*
21
24
22
USE_RC_SUBR=	backuppc
25
USE_RC_SUBR=	backuppc
23
26
Lines 27-32 Link Here
27
USERS=		backuppc
30
USERS=		backuppc
28
GROUPS=		backuppc
31
GROUPS=		backuppc
29
32
33
DOCSDIR=	${PREFIX}/share/doc/BackupPC
30
CGIDIR?=	${PREFIX}/www/cgi-bin
34
CGIDIR?=	${PREFIX}/www/cgi-bin
31
35
32
SUB_FILES=	pkg-deinstall pkg-message update.sh
36
SUB_FILES=	pkg-deinstall pkg-message update.sh
Lines 37-56 Link Here
37
41
38
PORTDOCS=	ChangeLog LICENSE README
42
PORTDOCS=	ChangeLog LICENSE README
39
43
40
OPTIONS_DEFINE=		ARCHIVE_ZIP COMPRESS_ZLIB DOCS FILE_RSYNCP NMBLOOKUP \
44
OPTIONS_DEFINE=		ARCHIVE_ZIP DOCS RSYNC_BPC NMBLOOKUP \
41
			SMBCLIENT XML_RSS
45
			RRDTOOL SMBCLIENT XML_RSS
42
46
OPTIONS_DEFAULT=	ARCHIVE_ZIP
43
OPTIONS_RADIO=		GRAPHS
44
OPTIONS_RADIO_GRAPHS=	RRD_GRAPHS RRDTOOL
45
46
OPTIONS_DEFAULT=	ARCHIVE_ZIP COMPRESS_ZLIB RRD_GRAPHS
47
47
48
ARCHIVE_ZIP_DESC=	Perl module for Zip archive files
48
ARCHIVE_ZIP_DESC=	Perl module for Zip archive files
49
COMPRESS_ZLIB_DESC=	Perl5 interface to zlib compression library
49
RSYNC_BPC_DESC=		Modified rsync that used as part of BackupPC
50
FILE_RSYNCP_DESC=	Perl Rsync client
51
NMBLOOKUP_DESC=		NetBIOS Name lookup tool
50
NMBLOOKUP_DESC=		NetBIOS Name lookup tool
52
RRD_GRAPHS_DESC=	Apply graphs patch (but not install RRDTool)
51
RRDTOOL_DESC=		Round Robin Database Tools
53
RRDTOOL_DESC=		Use RRDTool to generate pool statistic graphs
54
SMBCLIENT_DESC=		Samba client
52
SMBCLIENT_DESC=		Samba client
55
XML_RSS_DESC=		Perl extension to manage RSS files
53
XML_RSS_DESC=		Perl extension to manage RSS files
56
54
Lines 59-69 Link Here
59
.if ${PORT_OPTIONS:MARCHIVE_ZIP}
57
.if ${PORT_OPTIONS:MARCHIVE_ZIP}
60
RUN_DEPENDS+=	p5-Archive-Zip>=0:${PORTSDIR}/archivers/p5-Archive-Zip
58
RUN_DEPENDS+=	p5-Archive-Zip>=0:${PORTSDIR}/archivers/p5-Archive-Zip
61
.endif
59
.endif
62
.if ${PORT_OPTIONS:MCOMPRESS_ZLIB}
60
.if ${PORT_OPTIONS:MRSYNC_BPC}
63
RUN_DEPENDS+=	p5-IO-Compress>=0:${PORTSDIR}/archivers/p5-IO-Compress
61
RUN_DEPENDS+=	rsync-bpc>=3.0.9.3:${PORTSDIR}/net/rsync-bpc
64
.endif
65
.if ${PORT_OPTIONS:MFILE_RSYNCP}
66
RUN_DEPENDS+=	p5-File-RsyncP>=0:${PORTSDIR}/net/p5-File-RsyncP
67
.endif
62
.endif
68
.if ${PORT_OPTIONS:MNMBLOOKUP}
63
.if ${PORT_OPTIONS:MNMBLOOKUP}
69
RUN_DEPENDS+=	nmblookup:${PORTSDIR}/net/samba-nmblookup
64
RUN_DEPENDS+=	nmblookup:${PORTSDIR}/net/samba-nmblookup
Lines 71-80 Link Here
71
.if ${PORT_OPTIONS:MRRDTOOL}
66
.if ${PORT_OPTIONS:MRRDTOOL}
72
RUN_DEPENDS+=	rrdtool:${PORTSDIR}/databases/rrdtool
67
RUN_DEPENDS+=	rrdtool:${PORTSDIR}/databases/rrdtool
73
.endif
68
.endif
74
.if ${PORT_OPTIONS:MRRD_GRAPHS} || ${PORT_OPTIONS:MRRDTOOL}
75
EXTRA_PATCHES+=	${FILESDIR}/extra-patch-bin-BackupPC \
76
		${FILESDIR}/extra-patch-lib-BackupPC-CGI-GeneralInfo.pm
77
.endif
78
.if ${PORT_OPTIONS:MSMBCLIENT}
69
.if ${PORT_OPTIONS:MSMBCLIENT}
79
RUN_DEPENDS+=	smbclient:${PORTSDIR}/net/samba-smbclient
70
RUN_DEPENDS+=	smbclient:${PORTSDIR}/net/samba-smbclient
80
.endif
71
.endif
Lines 88-95 Link Here
88
post-patch:
79
post-patch:
89
	@${REINPLACE_CMD} \
80
	@${REINPLACE_CMD} \
90
		-e 's|/etc/BackupPC\(/config.pl\)|${ETCDIR}\1|' \
81
		-e 's|/etc/BackupPC\(/config.pl\)|${ETCDIR}\1|' \
91
		-e 's|^\(foreach my $$dir ( qw(bin \)doc$$|\1${DOCSDIR_REL}|' \
92
		-e 's|\($$DestDir$$Conf{InstallDir}/\)doc|\1${DOCSDIR_REL}|' \
93
		${WRKSRC}/configure.pl ${WRKSRC}/update.pl
82
		${WRKSRC}/configure.pl ${WRKSRC}/update.pl
94
	@${REINPLACE_CMD} -E \
83
	@${REINPLACE_CMD} -E \
95
		-e 's|^(use lib ")\.(/lib";)$$|\1${PREFIX}\2|' \
84
		-e 's|^(use lib ")\.(/lib";)$$|\1${PREFIX}\2|' \
(-)backuppc-devel/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (BackupPC-3.3.0.tar.gz) = 8a9c1b6faa4502b4c40617be97e806813815d9e22544854d99983c3da7c1f69b
1
SHA256 (BackupPC-4.0.0alpha3.tar.gz) = 3e63ad375465425f97179152d09e91963cced8b5ca7e400290b81decf83a902e
2
SIZE (BackupPC-3.3.0.tar.gz) = 554155
2
SIZE (BackupPC-4.0.0alpha3.tar.gz) = 583970
(-)backuppc-devel/files/backuppc.in (-1 / +1 lines)
Lines 24-29 Link Here
24
command="%%PREFIX%%/bin/BackupPC"
24
command="%%PREFIX%%/bin/BackupPC"
25
25
26
required_files="${backuppc_config}"
26
required_files="${backuppc_config}"
27
pidfile="/var/log/BackupPC/BackupPC.pid"
27
pidfile="/var/run/BackupPC/BackupPC.pid"
28
28
29
run_rc_command "$1"
29
run_rc_command "$1"
(-)backuppc-devel/files/extra-patch-bin-BackupPC (-50 lines)
Lines 1-50 Link Here
1
--- bin/BackupPC.orig	2011-04-25 07:31:54.000000000 +0400
2
+++ bin/BackupPC	2013-02-17 16:51:18.000000000 +0400
3
@@ -1198,6 +1198,47 @@
4
 				     $Info{"${p}FileRepMax"},
5
 				     $Info{"${p}FileLinkMax"}, $Info{"${p}DirCnt"});
6
 			}
7
+
8
+			#
9
+			# RRDTool Graphing stuff
10
+			#
11
+			if ( -x "$BinDir/rrdtool" ) {
12
+			    my $date = time() + (24 * 3600);
13
+			    if ( ! -f "$LogDir/pool.rrd" ) {
14
+				system("$BinDir/rrdtool create $LogDir/pool.rrd"
15
+				  . " --step 86400"
16
+				  . " DS:ckb:GAUGE:172800:0:U"
17
+				  . " DS:tps:GAUGE:172800:0:U"
18
+				  . " RRA:AVERAGE:0.5:1:1400"
19
+				);
20
+			    }
21
+
22
+			    #
23
+			    # Generate size totals prior to poolng and compression
24
+			    #
25
+			    my $sizeTot;
26
+			    foreach my $host ( sort(keys(%{$bpc->HostInfoRead()})) ) {
27
+				my @Backups = $bpc->BackupInfoRead($host);
28
+				for ( my $i = 0 ; $i < @Backups ; $i++ ) {
29
+				    $sizeTot += $Backups[$i]{size};
30
+				}
31
+			    }
32
+
33
+			    $sizeTot = $sizeTot / 1024;
34
+
35
+			    system("$BinDir/rrdtool update $LogDir/pool.rrd"
36
+			      . " $date:"
37
+			      . ( $Info{"cpoolKb"} + $Info{"poolKb"} )
38
+			      . ":$sizeTot"
39
+			    );
40
+
41
+			    printf(LOG "%sRRD Data: %s:%f:%f\n",
42
+			      $bpc->timeStamp,
43
+			      $date,
44
+			      $Info{"cpoolKb"} + $Info{"poolKb"},
45
+			      $sizeTot);
46
+			}
47
+
48
                     }
49
                 } else {
50
                     $CmdJob = "";
(-)backuppc-devel/files/extra-patch-lib-BackupPC-CGI-GeneralInfo.pm (-73 lines)
Lines 1-73 Link Here
1
--- lib/BackupPC/CGI/GeneralInfo.pm.orig	2011-04-25 07:31:55.000000000 +0400
2
+++ lib/BackupPC/CGI/GeneralInfo.pm	2013-02-17 16:52:16.000000000 +0400
3
@@ -44,6 +44,47 @@
4
     GetStatusInfo("info jobs hosts queueLen");
5
     my $Privileged = CheckPermission();
6
 
7
+    #
8
+    # Generate pool size RRDtool graph image
9
+    #
10
+    if ( $In{image} ne "" ) {
11
+        $In{image} =~ /([0-9]+)/;
12
+        my $weeks = $1;
13
+        my $real = $<; ### SUID
14
+        $< = $>; ### SUID
15
+
16
+        my $poolSizeGraph = "$BinDir/rrdtool graph -"
17
+          . " --start=end-${weeks}w --end=-300"
18
+          . ' --title="BackupPC Pool Size (' . ${weeks} . ' weeks)"'
19
+          . ' --vertical-label=""'
20
+          . ' --width=600 --height=100 --rigid --alt-autoscale-max'
21
+          . ' --base=1024 --logarithmic --units=si'
22
+          . ' --color BACK#FFFFFF --slope-mode --imgformat=PNG'
23
+          . ' --font TITLE:10: --font AXIS:8: --font LEGEND:8: --font UNIT:8:'
24
+          . ' --font-render-mode mono'
25
+
26
+          . ' DEF:ao="'  . "$LogDir" . '/pool.rrd":ckb:AVERAGE'
27
+          . ' DEF:aob="' . "$LogDir" . '/pool.rrd":tps:AVERAGE'
28
+          . ' CDEF:a=ao,1024,*'
29
+          . ' CDEF:b=aob,1024,*'
30
+
31
+          . ' AREA:a#95B8DB:"CPool in bytes                  "'
32
+          . ' GPRINT:a:LAST:"Current\\:%8.2lf %s"'
33
+          . ' GPRINT:a:AVERAGE:"Average\\:%8.2lf %s"'
34
+          . ' GPRINT:a:MAX:"Maximum\\:%8.2lf %s\n"'
35
+
36
+          . ' LINE1:b#FF0000:"Prior to pooling and compression"'
37
+          . ' GPRINT:b:LAST:"Current\\:%8.2lf %s"'
38
+          . ' GPRINT:b:AVERAGE:"Average\\:%8.2lf %s"'
39
+          . ' GPRINT:b:MAX:"Maximum\\:%8.2lf %s\\n"';
40
+
41
+        print "Content-type: image/png\n\n";
42
+        print `$poolSizeGraph`;
43
+
44
+        $< = $real; ### SUID
45
+        return;
46
+    }
47
+
48
     my($jobStr, $statusStr);
49
     foreach my $host ( sort(keys(%Jobs)) ) {
50
         my $startTime = timeStamp2($Jobs{$host}{startTime});
51
@@ -126,8 +167,20 @@
52
     } elsif ( $Info{cpoolFileCnt} > 0 ) {
53
         $poolInfo = $cpoolInfo;
54
     }
55
-    my $generalInfo = eval("qq{$Lang->{BackupPC_Server_Status_General_Info}}")
56
-                                if ( $Privileged );
57
+
58
+    my $generalInfo = "";
59
+    if ( $Privileged ) {
60
+        $generalInfo  = eval("qq{$Lang->{BackupPC_Server_Status_General_Info}}");
61
+        $generalInfo .= '
62
+<ul>
63
+    <ul>
64
+        <p><img src="' . $MyURL . '?image=4">
65
+        <p><img src="' . $MyURL . '?image=52">
66
+    </ul>
67
+</ul>'
68
+                                if ( -r "$LogDir/pool.rrd" );
69
+    }
70
+
71
     my $content = eval("qq{$Lang->{BackupPC_Server_Status}}");
72
     Header($Lang->{H_BackupPC_Server_Status}, $content);
73
     Trailer();
(-)backuppc-devel/files/patch-bin-BackupPC_rrdUpdate (+57 lines)
Line 0 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-lib__BackupPC__CGI__View.pm (-4 / +4 lines)
Lines 1-10 Link Here
1
--- ./lib/BackupPC/CGI/View.pm.orig	2014-08-30 15:21:07.000000000 +0400
1
--- ./lib/BackupPC/CGI/View.pm.orig	2014-09-03 14:15:03.000000000 +0400
2
+++ ./lib/BackupPC/CGI/View.pm	2014-08-30 15:21:18.000000000 +0400
2
+++ ./lib/BackupPC/CGI/View.pm	2014-09-03 14:15:20.000000000 +0400
3
@@ -89,7 +89,7 @@
3
@@ -102,7 +102,7 @@
4
         $file = $bpc->ConfDir() . "/hosts";
4
         $file = $bpc->ConfDir() . "/hosts";
5
         $linkHosts = 1;
5
         $linkHosts = 1;
6
     } elsif ( $type eq "docs" ) {
6
     } elsif ( $type eq "docs" ) {
7
-        $file = $bpc->InstallDir() . "/doc/BackupPC.html";
7
-        $file = $bpc->InstallDir() . "/share/doc/BackupPC/BackupPC.html";
8
+        $file = "$Conf{CgiImageDir}/BackupPC.html";
8
+        $file = "$Conf{CgiImageDir}/BackupPC.html";
9
     } elsif ( $host ne "" ) {
9
     } elsif ( $host ne "" ) {
10
         if ( !defined($In{num}) ) {
10
         if ( !defined($In{num}) ) {
(-)backuppc-devel/files/patch-update.pl (-34 / +75 lines)
Lines 1-6 Link Here
1
--- ./update.pl.orig	2014-08-19 15:02:15.000000000 +0400
1
--- ./update.pl.orig	2014-09-03 13:36:33.000000000 +0400
2
+++ ./update.pl	2014-08-19 15:03:11.000000000 +0400
2
+++ ./update.pl	2014-09-03 13:56:16.000000000 +0400
3
@@ -204,7 +204,7 @@
3
@@ -222,7 +222,7 @@
4
 if ( $ConfigPath ne "" && -r $ConfigPath ) {
4
 if ( $ConfigPath ne "" && -r $ConfigPath ) {
5
     (my $confDir = $ConfigPath) =~ s{/[^/]+$}{};
5
     (my $confDir = $ConfigPath) =~ s{/[^/]+$}{};
6
     die("BackupPC::Lib->new failed\n")
6
     die("BackupPC::Lib->new failed\n")
Lines 9-15 Link Here
9
     %Conf = $bpc->Conf();
9
     %Conf = $bpc->Conf();
10
     %OrigConf = %Conf;
10
     %OrigConf = %Conf;
11
     if ( !$opts{fhs} ) {
11
     if ( !$opts{fhs} ) {
12
@@ -507,198 +507,14 @@
12
@@ -494,239 +494,21 @@
13
 
13
 
14
 print <<EOF;
14
 print <<EOF;
15
 
15
 
Lines 25-34 Link Here
25
 
25
 
26
 exit unless prompt("--> Do you want to continue?", "y") =~ /y/i;
26
 exit unless prompt("--> Do you want to continue?", "y") =~ /y/i;
27
 
27
 
28
-#
28
 #
29
-# Create install directories
29
-# Create install directories
30
-#
30
-#
31
-foreach my $dir ( qw(bin doc
31
-foreach my $dir ( qw(bin share/doc/BackupPC
32
-		     lib/BackupPC/CGI
32
-		     lib/BackupPC/CGI
33
-		     lib/BackupPC/Config
33
-		     lib/BackupPC/Config
34
-		     lib/BackupPC/Lang
34
-		     lib/BackupPC/Lang
Lines 68-76 Link Here
68
-            "$Conf{TopDir}/pool",
68
-            "$Conf{TopDir}/pool",
69
-            "$Conf{TopDir}/cpool",
69
-            "$Conf{TopDir}/cpool",
70
-            "$Conf{TopDir}/pc",
70
-            "$Conf{TopDir}/pc",
71
-            "$Conf{TopDir}/trash",
72
-            "$Conf{ConfDir}",
71
-            "$Conf{ConfDir}",
73
-            "$Conf{LogDir}",
72
-            "$Conf{LogDir}",
73
-            "$Conf{RunDir}",
74
-        ) ) {
74
-        ) ) {
75
-    mkpath("$DestDir$dir", 0, 0750) if ( !-d "$DestDir$dir" );
75
-    mkpath("$DestDir$dir", 0, 0750) if ( !-d "$DestDir$dir" );
76
-    if ( !-d "$DestDir$dir"
76
-    if ( !-d "$DestDir$dir"
Lines 84-119 Link Here
84
-printf("Installing binaries in $DestDir$Conf{InstallDir}/bin\n");
84
-printf("Installing binaries in $DestDir$Conf{InstallDir}/bin\n");
85
-foreach my $prog ( qw(
85
-foreach my $prog ( qw(
86
-        bin/BackupPC
86
-        bin/BackupPC
87
-        bin/BackupPC_Admin_SCGI
87
-        bin/BackupPC_archive
88
-        bin/BackupPC_archive
88
-        bin/BackupPC_archiveHost
89
-        bin/BackupPC_archiveHost
89
-        bin/BackupPC_archiveStart
90
-        bin/BackupPC_archiveStart
90
-        bin/BackupPC_attribPrint
91
-        bin/BackupPC_attribPrint
92
-        bin/BackupPC_backupDelete
93
-        bin/BackupPC_backupDuplicate
91
-        bin/BackupPC_dump
94
-        bin/BackupPC_dump
92
-        bin/BackupPC_fixupBackupSummary
95
-        bin/BackupPC_fixupBackupSummary
93
-        bin/BackupPC_link
96
-        bin/BackupPC_fsck
97
-        bin/BackupPC_ls
94
-        bin/BackupPC_nightly
98
-        bin/BackupPC_nightly
99
-        bin/BackupPC_poolCntPrint
100
-        bin/BackupPC_refCountUpdate
95
-        bin/BackupPC_restore
101
-        bin/BackupPC_restore
102
-        bin/BackupPC_rrdUpdate
96
-        bin/BackupPC_sendEmail
103
-        bin/BackupPC_sendEmail
97
-        bin/BackupPC_serverMesg
104
-        bin/BackupPC_serverMesg
98
-        bin/BackupPC_trashClean
99
-        bin/BackupPC_tarExtract
100
-        bin/BackupPC_tarCreate
105
-        bin/BackupPC_tarCreate
101
-        bin/BackupPC_tarPCCopy
106
-        bin/BackupPC_tarExtract
102
-        bin/BackupPC_zipCreate
103
-        bin/BackupPC_zcat
107
-        bin/BackupPC_zcat
108
-        bin/BackupPC_zipCreate
104
-    ) ) {
109
-    ) ) {
105
-    InstallFile($prog, "$DestDir$Conf{InstallDir}/$prog", 0555);
110
-    InstallFile($prog, "$DestDir$Conf{InstallDir}/$prog", 0555);
106
-}
111
-}
107
-
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
-
108
-printf("Installing library in $DestDir$Conf{InstallDir}/lib\n");
125
-printf("Installing library in $DestDir$Conf{InstallDir}/lib\n");
109
-foreach my $lib ( qw(
126
-foreach my $lib ( qw(
110
-        lib/BackupPC/Attrib.pm
127
-        lib/BackupPC/Config/Meta.pm
111
-        lib/BackupPC/Config.pm
128
-        lib/BackupPC/DirOps.pm
112
-        lib/BackupPC/FileZIO.pm
113
-        lib/BackupPC/Lib.pm
129
-        lib/BackupPC/Lib.pm
114
-        lib/BackupPC/PoolWrite.pm
115
-        lib/BackupPC/Storage.pm
130
-        lib/BackupPC/Storage.pm
116
-        lib/BackupPC/View.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
117
-        lib/BackupPC/CGI/AdminOptions.pm
142
-        lib/BackupPC/CGI/AdminOptions.pm
118
-        lib/BackupPC/CGI/Archive.pm
143
-        lib/BackupPC/CGI/Archive.pm
119
-        lib/BackupPC/CGI/ArchiveInfo.pm
144
-        lib/BackupPC/CGI/ArchiveInfo.pm
Lines 127-142 Link Here
127
-        lib/BackupPC/CGI/LOGlist.pm
152
-        lib/BackupPC/CGI/LOGlist.pm
128
-        lib/BackupPC/CGI/Queue.pm
153
-        lib/BackupPC/CGI/Queue.pm
129
-        lib/BackupPC/CGI/ReloadServer.pm
154
-        lib/BackupPC/CGI/ReloadServer.pm
155
-        lib/BackupPC/CGI/Restore.pm
130
-        lib/BackupPC/CGI/RestoreFile.pm
156
-        lib/BackupPC/CGI/RestoreFile.pm
131
-        lib/BackupPC/CGI/RestoreInfo.pm
157
-        lib/BackupPC/CGI/RestoreInfo.pm
132
-        lib/BackupPC/CGI/Restore.pm
133
-        lib/BackupPC/CGI/RSS.pm
158
-        lib/BackupPC/CGI/RSS.pm
134
-        lib/BackupPC/CGI/StartServer.pm
159
-        lib/BackupPC/CGI/StartServer.pm
135
-        lib/BackupPC/CGI/StartStopBackup.pm
160
-        lib/BackupPC/CGI/StartStopBackup.pm
136
-        lib/BackupPC/CGI/StopServer.pm
161
-        lib/BackupPC/CGI/StopServer.pm
137
-        lib/BackupPC/CGI/Summary.pm
162
-        lib/BackupPC/CGI/Summary.pm
138
-        lib/BackupPC/CGI/View.pm
163
-        lib/BackupPC/CGI/View.pm
139
-        lib/BackupPC/Config/Meta.pm
140
-        lib/BackupPC/Lang/cz.pm
164
-        lib/BackupPC/Lang/cz.pm
141
-        lib/BackupPC/Lang/de.pm
165
-        lib/BackupPC/Lang/de.pm
142
-        lib/BackupPC/Lang/en.pm
166
-        lib/BackupPC/Lang/en.pm
Lines 151-172 Link Here
151
-        lib/BackupPC/Lang/uk.pm
175
-        lib/BackupPC/Lang/uk.pm
152
-        lib/BackupPC/Lang/zh_CN.pm
176
-        lib/BackupPC/Lang/zh_CN.pm
153
-        lib/BackupPC/Storage/Text.pm
177
-        lib/BackupPC/Storage/Text.pm
154
-        lib/BackupPC/Xfer.pm
178
-    ) ) {
155
-        lib/BackupPC/Xfer/Archive.pm
179
-    InstallFile($lib, "$DestDir$Conf{InstallDir}/$lib", 0444);
156
-        lib/BackupPC/Xfer/Ftp.pm
180
-}
157
-        lib/BackupPC/Xfer/Protocol.pm
181
-
158
-        lib/BackupPC/Xfer/Rsync.pm
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
159
-        lib/BackupPC/Xfer/RsyncDigest.pm
190
-        lib/BackupPC/Xfer/RsyncDigest.pm
160
-        lib/BackupPC/Xfer/RsyncFileIO.pm
191
-        lib/BackupPC/Xfer/RsyncFileIO.pm
161
-        lib/BackupPC/Xfer/Smb.pm
162
-        lib/BackupPC/Xfer/Tar.pm
163
-        lib/BackupPC/Zip/FileMember.pm
164
-        lib/Net/FTP/AutoReconnect.pm
165
-        lib/Net/FTP/RetrHandle.pm
166
-    ) ) {
192
-    ) ) {
167
-    InstallFile($lib, "$DestDir$Conf{InstallDir}/$lib", 0444);
193
-    unlink("$DestDir$Conf{InstallDir}/$lib");
168
-}
194
-}
169
-
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
 
170
-if ( $Conf{CgiImageDir} ne "" ) {
203
-if ( $Conf{CgiImageDir} ne "" ) {
171
-    printf("Installing images in $DestDir$Conf{CgiImageDir}\n");
204
-    printf("Installing images in $DestDir$Conf{CgiImageDir}\n");
172
-    foreach my $img ( <images/*> ) {
205
-    foreach my $img ( <images/*> ) {
Lines 177-183 Link Here
177
-    #
210
-    #
178
-    # Install new CSS file, making a backup copy if necessary
211
-    # Install new CSS file, making a backup copy if necessary
179
-    #
212
-    #
180
-    my $cssBackup = "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css.pre-3.3.0";
213
-    my $cssBackup = "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css.pre-4.0.0alpha3";
181
-    if ( -f "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css" && !-f $cssBackup ) {
214
-    if ( -f "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css" && !-f $cssBackup ) {
182
-	rename("$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css", $cssBackup);
215
-	rename("$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css", $cssBackup);
183
-    }
216
-    }
Lines 199-208 Link Here
199
-printf("Making Apache configuration file for suid-perl\n");
232
-printf("Making Apache configuration file for suid-perl\n");
200
-InstallFile("httpd/src/BackupPC.conf", "httpd/BackupPC.conf", 0644);
233
-InstallFile("httpd/src/BackupPC.conf", "httpd/BackupPC.conf", 0644);
201
-
234
-
202
-printf("Installing docs in $DestDir$Conf{InstallDir}/doc\n");
235
-printf("Installing docs in $DestDir$Conf{InstallDir}/share/doc/BackupPC\n");
203
-foreach my $doc ( qw(BackupPC.pod BackupPC.html) ) {
236
-foreach my $doc ( qw(BackupPC.pod BackupPC.html) ) {
204
-    InstallFile("doc/$doc", "$DestDir$Conf{InstallDir}/doc/$doc", 0444);
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" );
205
-}
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" );
206
-
247
-
207
 printf("Installing config.pl and hosts in $DestDir$Conf{ConfDir}\n");
248
 printf("Installing config.pl and hosts in $DestDir$Conf{ConfDir}\n");
208
-InstallFile("conf/hosts", "$DestDir$Conf{ConfDir}/hosts", 0644)
249
-InstallFile("conf/hosts", "$DestDir$Conf{ConfDir}/hosts", 0644)
Lines 210-216 Link Here
210
                     if ( !-f "$DestDir$Conf{ConfDir}/hosts" );
251
                     if ( !-f "$DestDir$Conf{ConfDir}/hosts" );
211
 
252
 
212
 #
253
 #
213
@@ -707,7 +523,7 @@
254
@@ -735,7 +517,7 @@
214
 # parameters and deleting ones that are no longer needed.
255
 # parameters and deleting ones that are no longer needed.
215
 #
256
 #
216
 my $dest = "$DestDir$Conf{ConfDir}/config.pl";
257
 my $dest = "$DestDir$Conf{ConfDir}/config.pl";
Lines 219-225 Link Here
219
 my ($oldConf, $oldVars);
260
 my ($oldConf, $oldVars);
220
 my ($newConf, $newVars) = ($distConf, $distVars);
261
 my ($newConf, $newVars) = ($distConf, $distVars);
221
 if ( -f $dest ) {
262
 if ( -f $dest ) {
222
@@ -928,13 +744,6 @@
263
@@ -974,13 +756,6 @@
223
     die("can't chown $Uid, $Gid $dest\n") unless my_chown($Uid, $Gid, $dest);
264
     die("can't chown $Uid, $Gid $dest\n") unless my_chown($Uid, $Gid, $dest);
224
 }
265
 }
225
 
266
 
(-)backuppc-devel/pkg-plist (-13 / +13 lines)
Lines 1-25 Link Here
1
@stopdaemon backuppc
1
@stopdaemon backuppc
2
@mode 0555
2
@mode 0555
3
bin/BackupPC
3
bin/BackupPC
4
bin/BackupPC_Admin_SCGI
4
bin/BackupPC_archive
5
bin/BackupPC_archive
5
bin/BackupPC_archiveHost
6
bin/BackupPC_archiveHost
6
bin/BackupPC_archiveStart
7
bin/BackupPC_archiveStart
7
bin/BackupPC_attribPrint
8
bin/BackupPC_attribPrint
9
bin/BackupPC_backupDelete
10
bin/BackupPC_backupDuplicate
8
bin/BackupPC_dump
11
bin/BackupPC_dump
9
bin/BackupPC_fixupBackupSummary
12
bin/BackupPC_fixupBackupSummary
10
bin/BackupPC_link
13
bin/BackupPC_fsck
14
bin/BackupPC_ls
11
bin/BackupPC_nightly
15
bin/BackupPC_nightly
16
bin/BackupPC_poolCntPrint
17
bin/BackupPC_refCountUpdate
12
bin/BackupPC_restore
18
bin/BackupPC_restore
19
bin/BackupPC_rrdUpdate
13
bin/BackupPC_sendEmail
20
bin/BackupPC_sendEmail
14
bin/BackupPC_serverMesg
21
bin/BackupPC_serverMesg
15
bin/BackupPC_tarCreate
22
bin/BackupPC_tarCreate
16
bin/BackupPC_tarExtract
23
bin/BackupPC_tarExtract
17
bin/BackupPC_tarPCCopy
18
bin/BackupPC_trashClean
19
bin/BackupPC_zcat
24
bin/BackupPC_zcat
20
bin/BackupPC_zipCreate
25
bin/BackupPC_zipCreate
21
@mode 0444
26
@mode 0444
22
lib/BackupPC/Attrib.pm
23
lib/BackupPC/CGI/AdminOptions.pm
27
lib/BackupPC/CGI/AdminOptions.pm
24
lib/BackupPC/CGI/Archive.pm
28
lib/BackupPC/CGI/Archive.pm
25
lib/BackupPC/CGI/ArchiveInfo.pm
29
lib/BackupPC/CGI/ArchiveInfo.pm
Lines 42-50 Link Here
42
lib/BackupPC/CGI/StopServer.pm
46
lib/BackupPC/CGI/StopServer.pm
43
lib/BackupPC/CGI/Summary.pm
47
lib/BackupPC/CGI/Summary.pm
44
lib/BackupPC/CGI/View.pm
48
lib/BackupPC/CGI/View.pm
45
lib/BackupPC/Config.pm
46
lib/BackupPC/Config/Meta.pm
49
lib/BackupPC/Config/Meta.pm
47
lib/BackupPC/FileZIO.pm
50
lib/BackupPC/DirOps.pm
48
lib/BackupPC/Lang/cz.pm
51
lib/BackupPC/Lang/cz.pm
49
lib/BackupPC/Lang/de.pm
52
lib/BackupPC/Lang/de.pm
50
lib/BackupPC/Lang/en.pm
53
lib/BackupPC/Lang/en.pm
Lines 59-65 Link Here
59
lib/BackupPC/Lang/uk.pm
62
lib/BackupPC/Lang/uk.pm
60
lib/BackupPC/Lang/zh_CN.pm
63
lib/BackupPC/Lang/zh_CN.pm
61
lib/BackupPC/Lib.pm
64
lib/BackupPC/Lib.pm
62
lib/BackupPC/PoolWrite.pm
63
lib/BackupPC/Storage.pm
65
lib/BackupPC/Storage.pm
64
lib/BackupPC/Storage/Text.pm
66
lib/BackupPC/Storage/Text.pm
65
lib/BackupPC/View.pm
67
lib/BackupPC/View.pm
Lines 68-75 Link Here
68
lib/BackupPC/Xfer/Ftp.pm
70
lib/BackupPC/Xfer/Ftp.pm
69
lib/BackupPC/Xfer/Protocol.pm
71
lib/BackupPC/Xfer/Protocol.pm
70
lib/BackupPC/Xfer/Rsync.pm
72
lib/BackupPC/Xfer/Rsync.pm
71
lib/BackupPC/Xfer/RsyncDigest.pm
72
lib/BackupPC/Xfer/RsyncFileIO.pm
73
lib/BackupPC/Xfer/Smb.pm
73
lib/BackupPC/Xfer/Smb.pm
74
lib/BackupPC/Xfer/Tar.pm
74
lib/BackupPC/Xfer/Tar.pm
75
lib/BackupPC/Zip/FileMember.pm
75
lib/BackupPC/Zip/FileMember.pm
Lines 138-158 Link Here
138
@dirrm lib/BackupPC/Xfer
138
@dirrm lib/BackupPC/Xfer
139
@dirrm lib/BackupPC/Zip
139
@dirrm lib/BackupPC/Zip
140
@dirrm lib/BackupPC
140
@dirrm lib/BackupPC
141
@dirrm lib/Net/FTP
141
@dirrmtry lib/Net/FTP
142
@dirrm lib/Net
142
@dirrmtry lib/Net
143
@dirrmtry %%WWWDIR%%
143
@dirrmtry %%WWWDIR%%
144
@dirrmtry %%CGIDIR%%
144
@dirrmtry %%CGIDIR%%
145
@exec install -d -o backuppc -g backuppc -m 0750 /var/run/BackupPC
145
@exec install -d -o backuppc -g backuppc -m 0750 /var/log/BackupPC
146
@exec install -d -o backuppc -g backuppc -m 0750 /var/log/BackupPC
146
@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC
147
@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC
147
@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/cpool
148
@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/cpool
148
@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/pc
149
@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/pc
149
@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/pool
150
@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/pool
150
@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/trash
151
@dirrmtry /var/run/BackupPC
151
@dirrmtry /var/log/BackupPC
152
@dirrmtry /var/log/BackupPC
152
@dirrmtry /var/db/BackupPC/cpool
153
@dirrmtry /var/db/BackupPC/cpool
153
@dirrmtry /var/db/BackupPC/pc
154
@dirrmtry /var/db/BackupPC/pc
154
@dirrmtry /var/db/BackupPC/pool
155
@dirrmtry /var/db/BackupPC/pool
155
@dirrmtry /var/db/BackupPC/trash
156
@dirrmtry /var/db/BackupPC
156
@dirrmtry /var/db/BackupPC
157
@owner backuppc
157
@owner backuppc
158
@group backuppc
158
@group backuppc

Return to bug 183241