Index: sysutils/backuppc-devel/Makefile =================================================================== --- /dev/null +++ sysutils/backuppc-devel/Makefile @@ -0,0 +1,127 @@ +# Created by: Alexander Moisseev +# $FreeBSD$ + +PORTNAME= backuppc +DISTVERSION= 4.0.0alpha3 +CATEGORIES= sysutils +MASTER_SITES= SF +MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}-beta/${DISTVERSION} +PKGNAMESUFFIX= -devel +DISTNAME= BackupPC-${DISTVERSION} + +MAINTAINER= moiseev@mezonplus.ru +COMMENT= System for backing PCs and laptops to a server + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +LATEST_LINK= ${PORTNAME}-devel + +RUN_DEPENDS= p5-File-Listing>=0:${PORTSDIR}/sysutils/p5-File-Listing \ + p5-BackupPC-XS>=0.30:${PORTSDIR}/sysutils/p5-BackupPC-XS + +CONFLICTS= backuppc-[0-9]* + +USE_RC_SUBR= backuppc + +USES= perl5 +NO_BUILD= yes + +USERS= backuppc +GROUPS= backuppc + +DOCSDIR= ${PREFIX}/share/doc/BackupPC +CGIDIR?= ${PREFIX}/www/cgi-bin + +SUB_FILES= pkg-deinstall pkg-message + +PLIST_SUB+= CGIDIR=${CGIDIR:S,^${PREFIX}/,,} \ + DISTVERSION=${DISTVERSION} + +PORTDOCS= ChangeLog LICENSE README + +OPTIONS_DEFINE= ARCHIVE_ZIP DOCS RSYNC_BPC NMBLOOKUP \ + RRDTOOL SMBCLIENT XML_RSS +OPTIONS_DEFAULT= ARCHIVE_ZIP + +ARCHIVE_ZIP_DESC= Perl module for Zip archive files +RSYNC_BPC_DESC= Modified rsync that used as part of BackupPC +NMBLOOKUP_DESC= NetBIOS Name lookup tool +RRDTOOL_DESC= Round Robin Database Tools +SMBCLIENT_DESC= Samba client +XML_RSS_DESC= Perl extension to manage RSS files + +.include + +.if ${PORT_OPTIONS:MARCHIVE_ZIP} +RUN_DEPENDS+= p5-Archive-Zip>=0:${PORTSDIR}/archivers/p5-Archive-Zip +.endif +.if ${PORT_OPTIONS:MRSYNC_BPC} +RUN_DEPENDS+= rsync-bpc>=3.0.9.3:${PORTSDIR}/net/rsync-bpc +.endif +.if ${PORT_OPTIONS:MNMBLOOKUP} +RUN_DEPENDS+= nmblookup:${PORTSDIR}/net/samba-nmblookup +.endif +.if ${PORT_OPTIONS:MRRDTOOL} +RUN_DEPENDS+= rrdtool:${PORTSDIR}/databases/rrdtool +.endif +.if ${PORT_OPTIONS:MSMBCLIENT} +RUN_DEPENDS+= smbclient:${PORTSDIR}/net/samba-smbclient +.endif +.if ${PORT_OPTIONS:MXML_RSS} +RUN_DEPENDS+= p5-XML-RSS>=0:${PORTSDIR}/textproc/p5-XML-RSS +.endif + +post-patch: + @${REINPLACE_CMD} \ + -e 's|/etc/BackupPC\(/config.pl\)|${ETCDIR}\1|' \ + ${WRKSRC}/configure.pl + @${REINPLACE_CMD} \ + -e 's|STDERR "Please su |STDERR "Please su [-m] |' \ + ${WRKSRC}/lib/BackupPC/Lib.pm + @${REINPLACE_CMD} \ + -e 's| you can use the -s| you can use the -m|' \ + -e 's|option to su to explicitly run|option to su to run|' \ + -e 's|su -s /bin/bash __BACKUPPCUSER__|su -m __BACKUPPCUSER__|' \ + ${WRKSRC}/doc/BackupPC.html ${WRKSRC}/doc/BackupPC.pod + +do-install: + if [ -f ${ETCDIR}/config.pl ]; then \ + ${MKDIR} ${STAGEDIR}${ETCDIR}; \ + ${CP} -p ${ETCDIR}/config.pl ${STAGEDIR}${ETCDIR}/config.pl; \ + fi + if [ -f ${ETCDIR}/hosts ]; then \ + ${MKDIR} ${STAGEDIR}${ETCDIR}; \ + ${CP} -p ${ETCDIR}/hosts ${STAGEDIR}${ETCDIR}/hosts; \ + fi + + cd ${WRKSRC} && ${PERL} configure.pl \ + --batch \ + --backuppc-user ${USERS} \ + --config-dir ${ETCDIR} \ + --cgi-dir ${CGIDIR} \ + --data-dir /var/db/BackupPC \ + --dest-dir ${STAGEDIR} \ + --fhs \ + --html-dir ${WWWDIR} \ + --html-dir-url /${PORTNAME} \ + --install-dir ${PREFIX} \ + --no-set-perms \ + --uid-ignore + + pod2man --section=1 --release=${PORTVERSION} \ + --name=BackupPC --center="BackupPC user guide" \ + ${WRKSRC}/doc/BackupPC.pod ${WRKSRC}/${PORTNAME}.1 + ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1 + cd ${WRKSRC} && ${INSTALL_MAN} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} + + if [ ! -f ${STAGEDIR}${ETCDIR}/config.pl.pre-${DISTVERSION} ]; then \ + > ${STAGEDIR}${ETCDIR}/config.pl.pre-${DISTVERSION}; \ + fi + ${INSTALL} -d ${STAGEDIR}${PREFIX}/libexec/${PORTNAME} + cd ${STAGEDIR}${ETCDIR} && \ + ${CHGRP} wheel config.pl config.pl.pre-${DISTVERSION} && \ + ${MV} config.pl hosts config.pl.pre-${DISTVERSION} \ + ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/ + +.include @@ -0,0 +1,127 @@ +# Created by: Alexander Moisseev +# $FreeBSD$ + +PORTNAME= backuppc +DISTVERSION= 4.0.0alpha3 +CATEGORIES= sysutils +MASTER_SITES= SF +MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}-beta/${DISTVERSION} +PKGNAMESUFFIX= -devel +DISTNAME= BackupPC-${DISTVERSION} + +MAINTAINER= moiseev@mezonplus.ru +COMMENT= System for backing PCs and laptops to a server + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +LATEST_LINK= ${PORTNAME}-devel + +RUN_DEPENDS= p5-File-Listing>=0:${PORTSDIR}/sysutils/p5-File-Listing \ + p5-BackupPC-XS>=0.30:${PORTSDIR}/sysutils/p5-BackupPC-XS + +CONFLICTS= backuppc-[0-9]* + +USE_RC_SUBR= backuppc + +USES= perl5 +NO_BUILD= yes + +USERS= backuppc +GROUPS= backuppc + +DOCSDIR= ${PREFIX}/share/doc/BackupPC +CGIDIR?= ${PREFIX}/www/cgi-bin + +SUB_FILES= pkg-deinstall pkg-message + +PLIST_SUB+= CGIDIR=${CGIDIR:S,^${PREFIX}/,,} \ + DISTVERSION=${DISTVERSION} + +PORTDOCS= ChangeLog LICENSE README + +OPTIONS_DEFINE= ARCHIVE_ZIP DOCS RSYNC_BPC NMBLOOKUP \ + RRDTOOL SMBCLIENT XML_RSS +OPTIONS_DEFAULT= ARCHIVE_ZIP + +ARCHIVE_ZIP_DESC= Perl module for Zip archive files +RSYNC_BPC_DESC= Modified rsync that used as part of BackupPC +NMBLOOKUP_DESC= NetBIOS Name lookup tool +RRDTOOL_DESC= Round Robin Database Tools +SMBCLIENT_DESC= Samba client +XML_RSS_DESC= Perl extension to manage RSS files + +.include + +.if ${PORT_OPTIONS:MARCHIVE_ZIP} +RUN_DEPENDS+= p5-Archive-Zip>=0:${PORTSDIR}/archivers/p5-Archive-Zip +.endif +.if ${PORT_OPTIONS:MRSYNC_BPC} +RUN_DEPENDS+= rsync-bpc>=3.0.9.3:${PORTSDIR}/net/rsync-bpc +.endif +.if ${PORT_OPTIONS:MNMBLOOKUP} +RUN_DEPENDS+= nmblookup:${PORTSDIR}/net/samba-nmblookup +.endif +.if ${PORT_OPTIONS:MRRDTOOL} +RUN_DEPENDS+= rrdtool:${PORTSDIR}/databases/rrdtool +.endif +.if ${PORT_OPTIONS:MSMBCLIENT} +RUN_DEPENDS+= smbclient:${PORTSDIR}/net/samba-smbclient +.endif +.if ${PORT_OPTIONS:MXML_RSS} +RUN_DEPENDS+= p5-XML-RSS>=0:${PORTSDIR}/textproc/p5-XML-RSS +.endif + +post-patch: + @${REINPLACE_CMD} \ + -e 's|/etc/BackupPC\(/config.pl\)|${ETCDIR}\1|' \ + ${WRKSRC}/configure.pl + @${REINPLACE_CMD} \ + -e 's|STDERR "Please su |STDERR "Please su [-m] |' \ + ${WRKSRC}/lib/BackupPC/Lib.pm + @${REINPLACE_CMD} \ + -e 's| you can use the -s| you can use the -m|' \ + -e 's|option to su to explicitly run|option to su to run|' \ + -e 's|su -s /bin/bash __BACKUPPCUSER__|su -m __BACKUPPCUSER__|' \ + ${WRKSRC}/doc/BackupPC.html ${WRKSRC}/doc/BackupPC.pod + +do-install: + if [ -f ${ETCDIR}/config.pl ]; then \ + ${MKDIR} ${STAGEDIR}${ETCDIR}; \ + ${CP} -p ${ETCDIR}/config.pl ${STAGEDIR}${ETCDIR}/config.pl; \ + fi + if [ -f ${ETCDIR}/hosts ]; then \ + ${MKDIR} ${STAGEDIR}${ETCDIR}; \ + ${CP} -p ${ETCDIR}/hosts ${STAGEDIR}${ETCDIR}/hosts; \ + fi + + cd ${WRKSRC} && ${PERL} configure.pl \ + --batch \ + --backuppc-user ${USERS} \ + --config-dir ${ETCDIR} \ + --cgi-dir ${CGIDIR} \ + --data-dir /var/db/BackupPC \ + --dest-dir ${STAGEDIR} \ + --fhs \ + --html-dir ${WWWDIR} \ + --html-dir-url /${PORTNAME} \ + --install-dir ${PREFIX} \ + --no-set-perms \ + --uid-ignore + + pod2man --section=1 --release=${PORTVERSION} \ + --name=BackupPC --center="BackupPC user guide" \ + ${WRKSRC}/doc/BackupPC.pod ${WRKSRC}/${PORTNAME}.1 + ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1 + cd ${WRKSRC} && ${INSTALL_MAN} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} + + if [ ! -f ${STAGEDIR}${ETCDIR}/config.pl.pre-${DISTVERSION} ]; then \ + > ${STAGEDIR}${ETCDIR}/config.pl.pre-${DISTVERSION}; \ + fi + ${INSTALL} -d ${STAGEDIR}${PREFIX}/libexec/${PORTNAME} + cd ${STAGEDIR}${ETCDIR} && \ + ${CHGRP} wheel config.pl config.pl.pre-${DISTVERSION} && \ + ${MV} config.pl hosts config.pl.pre-${DISTVERSION} \ + ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/ + +.include Index: sysutils/backuppc-devel/distinfo =================================================================== --- /dev/null +++ sysutils/backuppc-devel/distinfo @@ -0,0 +1,2 @@ +SHA256 (BackupPC-4.0.0alpha3.tar.gz) = 3e63ad375465425f97179152d09e91963cced8b5ca7e400290b81decf83a902e +SIZE (BackupPC-4.0.0alpha3.tar.gz) = 583970 @@ -0,0 +1,2 @@ +SHA256 (BackupPC-4.0.0alpha3.tar.gz) = 3e63ad375465425f97179152d09e91963cced8b5ca7e400290b81decf83a902e +SIZE (BackupPC-4.0.0alpha3.tar.gz) = 583970 Index: sysutils/backuppc-devel/files/backuppc.in =================================================================== --- /dev/null +++ sysutils/backuppc-devel/files/backuppc.in @@ -0,0 +1,29 @@ +#!/bin/sh + +# PROVIDE: backuppc +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable BackupPC: +# backuppc_enable="YES" + +. /etc/rc.subr + +name="backuppc" +rcvar=backuppc_enable + +load_rc_config $name + +: ${backuppc_enable:="NO"} +: ${backuppc_flags:="-d"} +: ${backuppc_user:="backuppc"} +: ${backuppc_group:="backuppc"} +: ${backuppc_config:="%%ETCDIR%%/config.pl"} + +command_interpreter="/usr/bin/perl" +command="%%PREFIX%%/bin/BackupPC" + +required_files="${backuppc_config}" +pidfile="/var/run/BackupPC/BackupPC.pid" + +run_rc_command "$1" @@ -0,0 +1,29 @@ +#!/bin/sh + +# PROVIDE: backuppc +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable BackupPC: +# backuppc_enable="YES" + +. /etc/rc.subr + +name="backuppc" +rcvar=backuppc_enable + +load_rc_config $name + +: ${backuppc_enable:="NO"} +: ${backuppc_flags:="-d"} +: ${backuppc_user:="backuppc"} +: ${backuppc_group:="backuppc"} +: ${backuppc_config:="%%ETCDIR%%/config.pl"} + +command_interpreter="/usr/bin/perl" +command="%%PREFIX%%/bin/BackupPC" + +required_files="${backuppc_config}" +pidfile="/var/run/BackupPC/BackupPC.pid" + +run_rc_command "$1" @@ -0,0 +1,29 @@ +#!/bin/sh + +# PROVIDE: backuppc +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable BackupPC: +# backuppc_enable="YES" + +. /etc/rc.subr + +name="backuppc" +rcvar=backuppc_enable + +load_rc_config $name + +: ${backuppc_enable:="NO"} +: ${backuppc_flags:="-d"} +: ${backuppc_user:="backuppc"} +: ${backuppc_group:="backuppc"} +: ${backuppc_config:="%%ETCDIR%%/config.pl"} + +command_interpreter="/usr/bin/perl" +command="%%PREFIX%%/bin/BackupPC" + +required_files="${backuppc_config}" +pidfile="/var/run/BackupPC/BackupPC.pid" + +run_rc_command "$1" Index: sysutils/backuppc-devel/files/patch-bin-BackupPC_rrdUpdate =================================================================== --- /dev/null +++ sysutils/backuppc-devel/files/patch-bin-BackupPC_rrdUpdate @@ -0,0 +1,57 @@ +--- ./bin/BackupPC_rrdUpdate.orig 2013-12-09 17:06:45.000000000 +0400 ++++ ./bin/BackupPC_rrdUpdate 2013-12-10 12:24:41.000000000 +0400 +@@ -109,7 +109,7 @@ + } + $sizeTot = $sizeTot / 1024; + +- print $bpc->cmdSystemOrEval( ++ if ( $err = $bpc->cmdSystemOrEval( + [ + $Conf{RrdToolPath}, + "update", $RRDFile, +@@ -119,13 +119,17 @@ + . $Info{"poolKb"} . ":" + . $Info{"pool4Kb"} . ":" + . $Info{"cpool4Kb"} +- ]); +- printf("%sRRD updated:" ++ ]) ) { ++ print "$err"; ++ } ++ else { ++ printf("%sRRD updated:" + . " date %s; cpoolKb %f; total %f;" + . " poolKb %f; pool4Kb %f; cpool4Kb %f\n", + $bpc->timeStamp, + $NowRnd1, $Info{"cpoolKb"}, $sizeTot, + $Info{"poolKb"}, $Info{"pool4Kb"}, $Info{"cpool4Kb"}); ++ } + } + + # +@@ -140,7 +144,7 @@ + # + # Get each pool max value from RRD + # +- $bpc->cmdSystemOrEval( ++ $bpc->cmdSystemOrEvalLong( + [ + $Conf{RrdToolPath}, + "graphv", "-", +@@ -158,7 +162,7 @@ + if ( $_[0] =~ /^print\[([0-3])\] = "([.0-9]+)"$/ ) { + $poolMax[$1] = $2 unless ( $2 == 0 ); + } +- }); ++ }, 1, undef); + + my $poolSizeGraph = [ + "$Conf{RrdToolPath}", +@@ -228,6 +232,6 @@ + print("Can't open/create $LogDir/poolUsage$weeks.png\n"); + return; + } +- $bpc->cmdSystemOrEval($poolSizeGraph, sub { print $fdOut $_[0] }); ++ $bpc->cmdSystemOrEvalLong($poolSizeGraph, sub { print $fdOut $_[0] }, 1, undef); + close($fdOut); + } @@ -0,0 +1,57 @@ +--- ./bin/BackupPC_rrdUpdate.orig 2013-12-09 17:06:45.000000000 +0400 ++++ ./bin/BackupPC_rrdUpdate 2013-12-10 12:24:41.000000000 +0400 +@@ -109,7 +109,7 @@ + } + $sizeTot = $sizeTot / 1024; + +- print $bpc->cmdSystemOrEval( ++ if ( $err = $bpc->cmdSystemOrEval( + [ + $Conf{RrdToolPath}, + "update", $RRDFile, +@@ -119,13 +119,17 @@ + . $Info{"poolKb"} . ":" + . $Info{"pool4Kb"} . ":" + . $Info{"cpool4Kb"} +- ]); +- printf("%sRRD updated:" ++ ]) ) { ++ print "$err"; ++ } ++ else { ++ printf("%sRRD updated:" + . " date %s; cpoolKb %f; total %f;" + . " poolKb %f; pool4Kb %f; cpool4Kb %f\n", + $bpc->timeStamp, + $NowRnd1, $Info{"cpoolKb"}, $sizeTot, + $Info{"poolKb"}, $Info{"pool4Kb"}, $Info{"cpool4Kb"}); ++ } + } + + # +@@ -140,7 +144,7 @@ + # + # Get each pool max value from RRD + # +- $bpc->cmdSystemOrEval( ++ $bpc->cmdSystemOrEvalLong( + [ + $Conf{RrdToolPath}, + "graphv", "-", +@@ -158,7 +162,7 @@ + if ( $_[0] =~ /^print\[([0-3])\] = "([.0-9]+)"$/ ) { + $poolMax[$1] = $2 unless ( $2 == 0 ); + } +- }); ++ }, 1, undef); + + my $poolSizeGraph = [ + "$Conf{RrdToolPath}", +@@ -228,6 +232,6 @@ + print("Can't open/create $LogDir/poolUsage$weeks.png\n"); + return; + } +- $bpc->cmdSystemOrEval($poolSizeGraph, sub { print $fdOut $_[0] }); ++ $bpc->cmdSystemOrEvalLong($poolSizeGraph, sub { print $fdOut $_[0] }, 1, undef); + close($fdOut); + } @@ -0,0 +1,57 @@ +--- ./bin/BackupPC_rrdUpdate.orig 2013-12-09 17:06:45.000000000 +0400 ++++ ./bin/BackupPC_rrdUpdate 2013-12-10 12:24:41.000000000 +0400 +@@ -109,7 +109,7 @@ + } + $sizeTot = $sizeTot / 1024; + +- print $bpc->cmdSystemOrEval( ++ if ( $err = $bpc->cmdSystemOrEval( + [ + $Conf{RrdToolPath}, + "update", $RRDFile, +@@ -119,13 +119,17 @@ + . $Info{"poolKb"} . ":" + . $Info{"pool4Kb"} . ":" + . $Info{"cpool4Kb"} +- ]); +- printf("%sRRD updated:" ++ ]) ) { ++ print "$err"; ++ } ++ else { ++ printf("%sRRD updated:" + . " date %s; cpoolKb %f; total %f;" + . " poolKb %f; pool4Kb %f; cpool4Kb %f\n", + $bpc->timeStamp, + $NowRnd1, $Info{"cpoolKb"}, $sizeTot, + $Info{"poolKb"}, $Info{"pool4Kb"}, $Info{"cpool4Kb"}); ++ } + } + + # +@@ -140,7 +144,7 @@ + # + # Get each pool max value from RRD + # +- $bpc->cmdSystemOrEval( ++ $bpc->cmdSystemOrEvalLong( + [ + $Conf{RrdToolPath}, + "graphv", "-", +@@ -158,7 +162,7 @@ + if ( $_[0] =~ /^print\[([0-3])\] = "([.0-9]+)"$/ ) { + $poolMax[$1] = $2 unless ( $2 == 0 ); + } +- }); ++ }, 1, undef); + + my $poolSizeGraph = [ + "$Conf{RrdToolPath}", +@@ -228,6 +232,6 @@ + print("Can't open/create $LogDir/poolUsage$weeks.png\n"); + return; + } +- $bpc->cmdSystemOrEval($poolSizeGraph, sub { print $fdOut $_[0] }); ++ $bpc->cmdSystemOrEvalLong($poolSizeGraph, sub { print $fdOut $_[0] }, 1, undef); + close($fdOut); + } Index: sysutils/backuppc-devel/files/patch-doc-BackupPC.pod =================================================================== --- /dev/null +++ sysutils/backuppc-devel/files/patch-doc-BackupPC.pod @@ -0,0 +1,8 @@ +--- doc/BackupPC.pod.orig 2014-05-13 17:40:09.000000000 +0400 ++++ doc/BackupPC.pod 2014-05-13 17:40:27.000000000 +0400 +@@ -1,3 +1,5 @@ ++=encoding ISO8859-1 ++ + =head1 BackupPC Introduction + + This documentation describes BackupPC version 3.3.0, @@ -0,0 +1,8 @@ +--- doc/BackupPC.pod.orig 2014-05-13 17:40:09.000000000 +0400 ++++ doc/BackupPC.pod 2014-05-13 17:40:27.000000000 +0400 +@@ -1,3 +1,5 @@ ++=encoding ISO8859-1 ++ + =head1 BackupPC Introduction + + This documentation describes BackupPC version 3.3.0, @@ -0,0 +1,8 @@ +--- doc/BackupPC.pod.orig 2014-05-13 17:40:09.000000000 +0400 ++++ doc/BackupPC.pod 2014-05-13 17:40:27.000000000 +0400 +@@ -1,3 +1,5 @@ ++=encoding ISO8859-1 ++ + =head1 BackupPC Introduction + + This documentation describes BackupPC version 3.3.0, Index: sysutils/backuppc-devel/files/pkg-deinstall.in =================================================================== --- /dev/null +++ sysutils/backuppc-devel/files/pkg-deinstall.in @@ -0,0 +1,21 @@ +#! /bin/sh + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +echo +echo "=======================================================================" +echo " If you are permanently removing BackupPC, you should manually delete:" +echo " - the backuppc user/group: pw userdel backuppc" +if [ -d %%ETCDIR%% ]; then + echo " - BackupPC configuration: rm -r %%ETCDIR%%" +fi +if [ -d /var/db/BackupPC ]; then + echo " - BackupPC data directory: rm -r /var/db/BackupPC" +fi +if [ -d /var/log/BackupPC ]; then + echo " - BackupPC logs directory: rm -r /var/log/BackupPC" +fi +echo "=======================================================================" +echo @@ -0,0 +1,21 @@ +#! /bin/sh + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +echo +echo "=======================================================================" +echo " If you are permanently removing BackupPC, you should manually delete:" +echo " - the backuppc user/group: pw userdel backuppc" +if [ -d %%ETCDIR%% ]; then + echo " - BackupPC configuration: rm -r %%ETCDIR%%" +fi +if [ -d /var/db/BackupPC ]; then + echo " - BackupPC data directory: rm -r /var/db/BackupPC" +fi +if [ -d /var/log/BackupPC ]; then + echo " - BackupPC logs directory: rm -r /var/log/BackupPC" +fi +echo "=======================================================================" +echo @@ -0,0 +1,21 @@ +#! /bin/sh + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +echo +echo "=======================================================================" +echo " If you are permanently removing BackupPC, you should manually delete:" +echo " - the backuppc user/group: pw userdel backuppc" +if [ -d %%ETCDIR%% ]; then + echo " - BackupPC configuration: rm -r %%ETCDIR%%" +fi +if [ -d /var/db/BackupPC ]; then + echo " - BackupPC data directory: rm -r /var/db/BackupPC" +fi +if [ -d /var/log/BackupPC ]; then + echo " - BackupPC logs directory: rm -r /var/log/BackupPC" +fi +echo "=======================================================================" +echo Index: sysutils/backuppc-devel/files/pkg-message.in =================================================================== --- /dev/null +++ sysutils/backuppc-devel/files/pkg-message.in @@ -0,0 +1,18 @@ +========================================================================== + - You need to customize %%ETCDIR%%/config.pl . + + If this is an upgrade, install BackupPC from port (not from package) + and make sure the full path of the existing BackupPC + configuration directory is %%ETCDIR%% . + Otherwise you will need to make changes in config.pl by hand. + + - Add the following line to /etc/rc.conf to enable BackupPC: + + backuppc_enable="YES" + + - Data directory is /var/db/BackupPC . + + This is where all the PC backup data is stored. + This file system needs to be big enough + to accommodate all the PCs you expect to backup. +========================================================================== @@ -0,0 +1,18 @@ +========================================================================== + - You need to customize %%ETCDIR%%/config.pl . + + If this is an upgrade, install BackupPC from port (not from package) + and make sure the full path of the existing BackupPC + configuration directory is %%ETCDIR%% . + Otherwise you will need to make changes in config.pl by hand. + + - Add the following line to /etc/rc.conf to enable BackupPC: + + backuppc_enable="YES" + + - Data directory is /var/db/BackupPC . + + This is where all the PC backup data is stored. + This file system needs to be big enough + to accommodate all the PCs you expect to backup. +========================================================================== @@ -0,0 +1,18 @@ +========================================================================== + - You need to customize %%ETCDIR%%/config.pl . + + If this is an upgrade, install BackupPC from port (not from package) + and make sure the full path of the existing BackupPC + configuration directory is %%ETCDIR%% . + Otherwise you will need to make changes in config.pl by hand. + + - Add the following line to /etc/rc.conf to enable BackupPC: + + backuppc_enable="YES" + + - Data directory is /var/db/BackupPC . + + This is where all the PC backup data is stored. + This file system needs to be big enough + to accommodate all the PCs you expect to backup. +========================================================================== Index: sysutils/backuppc-devel/pkg-descr =================================================================== --- /dev/null +++ sysutils/backuppc-devel/pkg-descr @@ -0,0 +1,5 @@ +BackupPC is a high-performance, enterprise-grade system for backing up Linux, +WinXX and MacOSX PCs and laptops to a server's disk. +BackupPC is highly configurable and easy to install and maintain. + +WWW: http://backuppc.sourceforge.net @@ -0,0 +1,5 @@ +BackupPC is a high-performance, enterprise-grade system for backing up Linux, +WinXX and MacOSX PCs and laptops to a server's disk. +BackupPC is highly configurable and easy to install and maintain. + +WWW: http://backuppc.sourceforge.net Index: sysutils/backuppc-devel/pkg-plist =================================================================== --- /dev/null +++ sysutils/backuppc-devel/pkg-plist @@ -0,0 +1,177 @@ +@stopdaemon backuppc +@unexec if cmp -s %D/%%ETCDIR%%/config.pl %D/%%ETCDIR%%/config.pl.sample; then rm -f %D/%%ETCDIR%%/config.pl; fi +@unexec if cmp -s %D/%%ETCDIR%%/hosts %D/%%ETCDIR%%/hosts.sample; then rm -f %D/%%ETCDIR%%/hosts; fi +@rmtry %%ETCDIR%%/config.pl.sample +@rmtry %%ETCDIR%%/hosts.sample +@mode 0555 +bin/BackupPC +bin/BackupPC_Admin_SCGI +bin/BackupPC_archive +bin/BackupPC_archiveHost +bin/BackupPC_archiveStart +bin/BackupPC_attribPrint +bin/BackupPC_backupDelete +bin/BackupPC_backupDuplicate +bin/BackupPC_dump +bin/BackupPC_fixupBackupSummary +bin/BackupPC_fsck +bin/BackupPC_ls +bin/BackupPC_nightly +bin/BackupPC_poolCntPrint +bin/BackupPC_refCountUpdate +bin/BackupPC_restore +bin/BackupPC_rrdUpdate +bin/BackupPC_sendEmail +bin/BackupPC_serverMesg +bin/BackupPC_tarCreate +bin/BackupPC_tarExtract +bin/BackupPC_zcat +bin/BackupPC_zipCreate +@mode 0444 +lib/BackupPC/CGI/AdminOptions.pm +lib/BackupPC/CGI/Archive.pm +lib/BackupPC/CGI/ArchiveInfo.pm +lib/BackupPC/CGI/Browse.pm +lib/BackupPC/CGI/DirHistory.pm +lib/BackupPC/CGI/EditConfig.pm +lib/BackupPC/CGI/EmailSummary.pm +lib/BackupPC/CGI/GeneralInfo.pm +lib/BackupPC/CGI/HostInfo.pm +lib/BackupPC/CGI/LOGlist.pm +lib/BackupPC/CGI/Lib.pm +lib/BackupPC/CGI/Queue.pm +lib/BackupPC/CGI/RSS.pm +lib/BackupPC/CGI/ReloadServer.pm +lib/BackupPC/CGI/Restore.pm +lib/BackupPC/CGI/RestoreFile.pm +lib/BackupPC/CGI/RestoreInfo.pm +lib/BackupPC/CGI/StartServer.pm +lib/BackupPC/CGI/StartStopBackup.pm +lib/BackupPC/CGI/StopServer.pm +lib/BackupPC/CGI/Summary.pm +lib/BackupPC/CGI/View.pm +lib/BackupPC/Config/Meta.pm +lib/BackupPC/DirOps.pm +lib/BackupPC/Lang/cz.pm +lib/BackupPC/Lang/de.pm +lib/BackupPC/Lang/en.pm +lib/BackupPC/Lang/es.pm +lib/BackupPC/Lang/fr.pm +lib/BackupPC/Lang/it.pm +lib/BackupPC/Lang/ja.pm +lib/BackupPC/Lang/nl.pm +lib/BackupPC/Lang/pl.pm +lib/BackupPC/Lang/pt_br.pm +lib/BackupPC/Lang/ru.pm +lib/BackupPC/Lang/uk.pm +lib/BackupPC/Lang/zh_CN.pm +lib/BackupPC/Lib.pm +lib/BackupPC/Storage.pm +lib/BackupPC/Storage/Text.pm +lib/BackupPC/View.pm +lib/BackupPC/Xfer.pm +lib/BackupPC/Xfer/Archive.pm +lib/BackupPC/Xfer/Ftp.pm +lib/BackupPC/Xfer/Protocol.pm +lib/BackupPC/Xfer/Rsync.pm +lib/BackupPC/Xfer/Smb.pm +lib/BackupPC/Xfer/Tar.pm +lib/BackupPC/Zip/FileMember.pm +lib/Net/FTP/AutoReconnect.pm +lib/Net/FTP/RetrHandle.pm +man/man1/backuppc.1.gz +%%DOCSDIR%%/BackupPC.html +%%PORTDOCS%%%%DOCSDIR%%/BackupPC.pod +%%WWWDIR%%/0000000.gif +%%WWWDIR%%/0000011.gif +%%WWWDIR%%/0001000.gif +%%WWWDIR%%/0010000.gif +%%WWWDIR%%/0010001.gif +%%WWWDIR%%/0011000.gif +%%WWWDIR%%/0011001.gif +%%WWWDIR%%/1000000.gif +%%WWWDIR%%/1000100.gif +%%WWWDIR%%/1001000.gif +%%WWWDIR%%/1001100.gif +%%WWWDIR%%/1010000.gif +%%WWWDIR%%/1010001.gif +%%WWWDIR%%/1011000.gif +%%WWWDIR%%/1100000.gif +%%WWWDIR%%/1100100.gif +%%WWWDIR%%/1100101.gif +%%WWWDIR%%/1100110.gif +%%WWWDIR%%/1100111.gif +%%WWWDIR%%/1101000.gif +%%WWWDIR%%/1101100.gif +%%WWWDIR%%/1101101.gif +%%WWWDIR%%/1101110.gif +%%WWWDIR%%/1101111.gif +%%WWWDIR%%/1110000.gif +%%WWWDIR%%/1110001.gif +%%WWWDIR%%/1110100.gif +%%WWWDIR%%/1110101.gif +%%WWWDIR%%/1110110.gif +%%WWWDIR%%/1110111.gif +%%WWWDIR%%/1111000.gif +%%WWWDIR%%/1111001.gif +%%WWWDIR%%/1111100.gif +%%WWWDIR%%/1111101.gif +%%WWWDIR%%/1111110.gif +%%WWWDIR%%/1111111.gif +%%WWWDIR%%/BackupPC_stnd.css +%%WWWDIR%%/BackupPC_stnd_orig.css +%%WWWDIR%%/favicon.ico +%%WWWDIR%%/icon-dir.png +%%WWWDIR%%/icon-file.png +%%WWWDIR%%/icon-hardlink.png +%%WWWDIR%%/icon-symlink.png +%%WWWDIR%%/logo.gif +%%WWWDIR%%/sorttable.js +@owner backuppc +@group backuppc +@mode 04554 +%%CGIDIR%%/BackupPC_Admin +@owner +@group +@mode +@dirrm lib/BackupPC/CGI +@dirrm lib/BackupPC/Config +@dirrm lib/BackupPC/Lang +@dirrm lib/BackupPC/Storage +@dirrm lib/BackupPC/Xfer +@dirrm lib/BackupPC/Zip +@dirrm lib/BackupPC +@dirrmtry lib/Net/FTP +@dirrmtry lib/Net +@dirrm %%DOCSDIR%% +@dirrmtry %%WWWDIR%% +@dirrmtry %%CGIDIR%% +@exec install -d -o backuppc -g backuppc -m 0750 /var/run/BackupPC +@exec install -d -o backuppc -g backuppc -m 0750 /var/log/BackupPC +@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC +@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/cpool +@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/pc +@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/pool +@dirrmtry /var/run/BackupPC +@dirrmtry /var/log/BackupPC +@dirrmtry /var/db/BackupPC/cpool +@dirrmtry /var/db/BackupPC/pc +@dirrmtry /var/db/BackupPC/pool +@dirrmtry /var/db/BackupPC +@owner backuppc +@group backuppc +@dirrmtry %%ETCDIR%% +@mode 0640 +libexec/backuppc/config.pl.pre-%%DISTVERSION%% +@exec if [ -s %D/%F -a ! -f %D/%%ETCDIR%%/%f ]; then cp -p %D/%F %D/%%ETCDIR%%/; fi +libexec/backuppc/config.pl +@exec if [ ! -f %D/%%ETCDIR%%/%f ]; then cp -p %D/%F %D/%%ETCDIR%%/config.pl.sample; fi +@exec cp -p %D/%F %D/%%ETCDIR%%/ +@mode 0644 +libexec/backuppc/hosts +@exec if [ ! -f %D/%%ETCDIR%%/%f ]; then cp -p %D/%F %D/%%ETCDIR%%/hosts.sample; fi +@exec cp -p %D/%F %D/%%ETCDIR%%/ +@owner +@group +@mode +@dirrm libexec/backuppc @@ -0,0 +1,177 @@ +@stopdaemon backuppc +@unexec if cmp -s %D/%%ETCDIR%%/config.pl %D/%%ETCDIR%%/config.pl.sample; then rm -f %D/%%ETCDIR%%/config.pl; fi +@unexec if cmp -s %D/%%ETCDIR%%/hosts %D/%%ETCDIR%%/hosts.sample; then rm -f %D/%%ETCDIR%%/hosts; fi +@rmtry %%ETCDIR%%/config.pl.sample +@rmtry %%ETCDIR%%/hosts.sample +@mode 0555 +bin/BackupPC +bin/BackupPC_Admin_SCGI +bin/BackupPC_archive +bin/BackupPC_archiveHost +bin/BackupPC_archiveStart +bin/BackupPC_attribPrint +bin/BackupPC_backupDelete +bin/BackupPC_backupDuplicate +bin/BackupPC_dump +bin/BackupPC_fixupBackupSummary +bin/BackupPC_fsck +bin/BackupPC_ls +bin/BackupPC_nightly +bin/BackupPC_poolCntPrint +bin/BackupPC_refCountUpdate +bin/BackupPC_restore +bin/BackupPC_rrdUpdate +bin/BackupPC_sendEmail +bin/BackupPC_serverMesg +bin/BackupPC_tarCreate +bin/BackupPC_tarExtract +bin/BackupPC_zcat +bin/BackupPC_zipCreate +@mode 0444 +lib/BackupPC/CGI/AdminOptions.pm +lib/BackupPC/CGI/Archive.pm +lib/BackupPC/CGI/ArchiveInfo.pm +lib/BackupPC/CGI/Browse.pm +lib/BackupPC/CGI/DirHistory.pm +lib/BackupPC/CGI/EditConfig.pm +lib/BackupPC/CGI/EmailSummary.pm +lib/BackupPC/CGI/GeneralInfo.pm +lib/BackupPC/CGI/HostInfo.pm +lib/BackupPC/CGI/LOGlist.pm +lib/BackupPC/CGI/Lib.pm +lib/BackupPC/CGI/Queue.pm +lib/BackupPC/CGI/RSS.pm +lib/BackupPC/CGI/ReloadServer.pm +lib/BackupPC/CGI/Restore.pm +lib/BackupPC/CGI/RestoreFile.pm +lib/BackupPC/CGI/RestoreInfo.pm +lib/BackupPC/CGI/StartServer.pm +lib/BackupPC/CGI/StartStopBackup.pm +lib/BackupPC/CGI/StopServer.pm +lib/BackupPC/CGI/Summary.pm +lib/BackupPC/CGI/View.pm +lib/BackupPC/Config/Meta.pm +lib/BackupPC/DirOps.pm +lib/BackupPC/Lang/cz.pm +lib/BackupPC/Lang/de.pm +lib/BackupPC/Lang/en.pm +lib/BackupPC/Lang/es.pm +lib/BackupPC/Lang/fr.pm +lib/BackupPC/Lang/it.pm +lib/BackupPC/Lang/ja.pm +lib/BackupPC/Lang/nl.pm +lib/BackupPC/Lang/pl.pm +lib/BackupPC/Lang/pt_br.pm +lib/BackupPC/Lang/ru.pm +lib/BackupPC/Lang/uk.pm +lib/BackupPC/Lang/zh_CN.pm +lib/BackupPC/Lib.pm +lib/BackupPC/Storage.pm +lib/BackupPC/Storage/Text.pm +lib/BackupPC/View.pm +lib/BackupPC/Xfer.pm +lib/BackupPC/Xfer/Archive.pm +lib/BackupPC/Xfer/Ftp.pm +lib/BackupPC/Xfer/Protocol.pm +lib/BackupPC/Xfer/Rsync.pm +lib/BackupPC/Xfer/Smb.pm +lib/BackupPC/Xfer/Tar.pm +lib/BackupPC/Zip/FileMember.pm +lib/Net/FTP/AutoReconnect.pm +lib/Net/FTP/RetrHandle.pm +man/man1/backuppc.1.gz +%%DOCSDIR%%/BackupPC.html +%%PORTDOCS%%%%DOCSDIR%%/BackupPC.pod +%%WWWDIR%%/0000000.gif +%%WWWDIR%%/0000011.gif +%%WWWDIR%%/0001000.gif +%%WWWDIR%%/0010000.gif +%%WWWDIR%%/0010001.gif +%%WWWDIR%%/0011000.gif +%%WWWDIR%%/0011001.gif +%%WWWDIR%%/1000000.gif +%%WWWDIR%%/1000100.gif +%%WWWDIR%%/1001000.gif +%%WWWDIR%%/1001100.gif +%%WWWDIR%%/1010000.gif +%%WWWDIR%%/1010001.gif +%%WWWDIR%%/1011000.gif +%%WWWDIR%%/1100000.gif +%%WWWDIR%%/1100100.gif +%%WWWDIR%%/1100101.gif +%%WWWDIR%%/1100110.gif +%%WWWDIR%%/1100111.gif +%%WWWDIR%%/1101000.gif +%%WWWDIR%%/1101100.gif +%%WWWDIR%%/1101101.gif +%%WWWDIR%%/1101110.gif +%%WWWDIR%%/1101111.gif +%%WWWDIR%%/1110000.gif +%%WWWDIR%%/1110001.gif +%%WWWDIR%%/1110100.gif +%%WWWDIR%%/1110101.gif +%%WWWDIR%%/1110110.gif +%%WWWDIR%%/1110111.gif +%%WWWDIR%%/1111000.gif +%%WWWDIR%%/1111001.gif +%%WWWDIR%%/1111100.gif +%%WWWDIR%%/1111101.gif +%%WWWDIR%%/1111110.gif +%%WWWDIR%%/1111111.gif +%%WWWDIR%%/BackupPC_stnd.css +%%WWWDIR%%/BackupPC_stnd_orig.css +%%WWWDIR%%/favicon.ico +%%WWWDIR%%/icon-dir.png +%%WWWDIR%%/icon-file.png +%%WWWDIR%%/icon-hardlink.png +%%WWWDIR%%/icon-symlink.png +%%WWWDIR%%/logo.gif +%%WWWDIR%%/sorttable.js +@owner backuppc +@group backuppc +@mode 04554 +%%CGIDIR%%/BackupPC_Admin +@owner +@group +@mode +@dirrm lib/BackupPC/CGI +@dirrm lib/BackupPC/Config +@dirrm lib/BackupPC/Lang +@dirrm lib/BackupPC/Storage +@dirrm lib/BackupPC/Xfer +@dirrm lib/BackupPC/Zip +@dirrm lib/BackupPC +@dirrmtry lib/Net/FTP +@dirrmtry lib/Net +@dirrm %%DOCSDIR%% +@dirrmtry %%WWWDIR%% +@dirrmtry %%CGIDIR%% +@exec install -d -o backuppc -g backuppc -m 0750 /var/run/BackupPC +@exec install -d -o backuppc -g backuppc -m 0750 /var/log/BackupPC +@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC +@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/cpool +@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/pc +@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/pool +@dirrmtry /var/run/BackupPC +@dirrmtry /var/log/BackupPC +@dirrmtry /var/db/BackupPC/cpool +@dirrmtry /var/db/BackupPC/pc +@dirrmtry /var/db/BackupPC/pool +@dirrmtry /var/db/BackupPC +@owner backuppc +@group backuppc +@dirrmtry %%ETCDIR%% +@mode 0640 +libexec/backuppc/config.pl.pre-%%DISTVERSION%% +@exec if [ -s %D/%F -a ! -f %D/%%ETCDIR%%/%f ]; then cp -p %D/%F %D/%%ETCDIR%%/; fi +libexec/backuppc/config.pl +@exec if [ ! -f %D/%%ETCDIR%%/%f ]; then cp -p %D/%F %D/%%ETCDIR%%/config.pl.sample; fi +@exec cp -p %D/%F %D/%%ETCDIR%%/ +@mode 0644 +libexec/backuppc/hosts +@exec if [ ! -f %D/%%ETCDIR%%/%f ]; then cp -p %D/%F %D/%%ETCDIR%%/hosts.sample; fi +@exec cp -p %D/%F %D/%%ETCDIR%%/ +@owner +@group +@mode +@dirrm libexec/backuppc