diff options
author | tnn <tnn@pkgsrc.org> | 2015-02-13 17:57:36 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2015-02-13 17:57:36 +0000 |
commit | 0781664174903aeb1b061f1d3a9e5c9d09bc076f (patch) | |
tree | 0ad53dfd6e13764c8846551c6d7aa9436cd2f435 /sysutils/backuppc | |
parent | 1ab40697804ac95b8414929e84a19e295c6ba480 (diff) | |
download | pkgsrc-0781664174903aeb1b061f1d3a9e5c9d09bc076f.tar.gz |
Import backuppc-3.3.1 as sysutils/backuppc.
BackupPC is a high-performance, enterprise-grade system for backing up *NIX,
Windows and MacOSX PCs and laptops to a server's disk. BackupPC is highly
configurable and easy to install and maintain.
BackupPC does not require any agent software to be installed on the client
systems as it operates over SSH/rsync, Samba or ftp.
Diffstat (limited to 'sysutils/backuppc')
-rw-r--r-- | sysutils/backuppc/DESCR | 6 | ||||
-rw-r--r-- | sysutils/backuppc/MESSAGE | 17 | ||||
-rw-r--r-- | sysutils/backuppc/Makefile | 116 | ||||
-rw-r--r-- | sysutils/backuppc/PLIST | 127 | ||||
-rw-r--r-- | sysutils/backuppc/distinfo | 6 | ||||
-rw-r--r-- | sysutils/backuppc/files/backuppc.conf | 38 | ||||
-rw-r--r-- | sysutils/backuppc/files/backuppc.sh | 31 | ||||
-rw-r--r-- | sysutils/backuppc/files/cgiwrapper.c | 6 | ||||
-rw-r--r-- | sysutils/backuppc/patches/patch-configure.pl | 15 |
9 files changed, 362 insertions, 0 deletions
diff --git a/sysutils/backuppc/DESCR b/sysutils/backuppc/DESCR new file mode 100644 index 00000000000..d1edc7ff0fd --- /dev/null +++ b/sysutils/backuppc/DESCR @@ -0,0 +1,6 @@ +BackupPC is a high-performance, enterprise-grade system for backing up *NIX, +Windows and MacOSX PCs and laptops to a server's disk. BackupPC is highly +configurable and easy to install and maintain. + +BackupPC does not require any agent software to be installed on the client +systems as it operates over SSH/rsync, Samba or ftp. diff --git a/sysutils/backuppc/MESSAGE b/sysutils/backuppc/MESSAGE new file mode 100644 index 00000000000..51d6d8e7ab0 --- /dev/null +++ b/sysutils/backuppc/MESSAGE @@ -0,0 +1,17 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1 2015/02/13 17:57:36 tnn Exp $ + +Please refer to the documentation in + + ${PREFIX}/share/BackupPC/doc/BackupPC.html + +for detailed installation instructions. + +If you are running Apache, then you can add the following line to httpd.conf: + + Include ${PKG_SYSCONFDIR}/backuppc.conf + +Follow the instructions in the above file, restart Apache and start +the BackupPC daemon with the supplied rc.d script. + +=========================================================================== diff --git a/sysutils/backuppc/Makefile b/sysutils/backuppc/Makefile new file mode 100644 index 00000000000..b0d2c2f13af --- /dev/null +++ b/sysutils/backuppc/Makefile @@ -0,0 +1,116 @@ +# $NetBSD: Makefile,v 1.1 2015/02/13 17:57:36 tnn Exp $ + +DISTNAME= BackupPC-3.3.1 +PKGNAME= ${DISTNAME:tl} +CATEGORIES= sysutils +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=backuppc/} + +MAINTAINER= tnn@NetBSD.org +HOMEPAGE= http://backuppc.sourceforge.net/ +COMMENT= Fast, agentless backup system supporting *NIX, Windows and OSX clients +LICENSE= gnu-gpl-v2 + +DEPENDS+= rsync-[0-9]*:../../net/rsync +DEPENDS+= samba-[0-9]*:../../net/samba35 +DEPENDS+= par2-[0-9]*:../../archivers/par2 +DEPENDS+= p5-Archive-Zip-[0-9]*:../../archivers/p5-Archive-Zip +DEPENDS+= p5-File-Listing-[0-9]*:../../devel/p5-File-Listing +DEPENDS+= p5-File-RsyncP-[0-9]*:../../net/p5-File-RsyncP + +HAS_CONFIGURE= yes +USE_LANGUAGES= # none +USE_TOOLS+= bzip2:run cat:run tar:run perl:run hostname:run gzip:run pax + +CONFIG_SHELL= ${PERL5} +CONFIGURE_SCRIPT= configure.pl +CONFIGURE_ARGS+= --batch +CONFIGURE_ARGS+= --backuppc-user ${BACKUPPC_USER} +CONFIGURE_ARGS+= --hostname localhost +CONFIGURE_ARGS+= --dest-dir ${WRKSRC}/build +CONFIGURE_ARGS+= --config-dir ${PREFIX}/share/examples/BackupPC +CONFIGURE_ARGS+= --cgi-dir ${PREFIX}/share/BackupPC/cgi-bin +CONFIGURE_ARGS+= --data-dir ${VARBASE}/BackupPC +CONFIGURE_ARGS+= --html-dir ${PREFIX}/share/BackupPC/htdocs +CONFIGURE_ARGS+= --html-dir-url /BackupPC +CONFIGURE_ARGS+= --install-dir ${PREFIX}/share/BackupPC +CONFIGURE_ARGS+= --log-dir ${VARBASE}/log/BackupPC +CONFIGURE_ARGS+= --uid-ignore +CONFIGURE_ARGS+= --no-set-perms + +CONFIGURE_ARGS+= --bin-path bzip2=${TOOLS_PATH.bzip2} +CONFIGURE_ARGS+= --bin-path cat=${TOOLS_PATH.cat} +CONFIGURE_ARGS+= --bin-path tar=${TOOLS_PATH.tar} +CONFIGURE_ARGS+= --bin-path gzip=${TOOLS_PATH.gzip} +CONFIGURE_ARGS+= --bin-path hostname=${TOOLS_PATH.hostname} + +CONFIGURE_ARGS+= --bin-path perl=${PERL5} +CONFIGURE_ARGS+= --bin-path rsync=${PREFIX}/bin/rsync +CONFIGURE_ARGS+= --bin-path nmblookup=${PREFIX}/bin/nmblookup +CONFIGURE_ARGS+= --bin-path smbclient=${PREFIX}/bin/smbclient +CONFIGURE_ARGS+= --bin-path par2=${PREFIX}/bin/par2 + +.if exists(/usr/bin/ssh) +CONFIGURE_ARGS+= --bin-path ssh=/usr/bin/ssh +.else +DEPENDS+= openssh-[0-9]*:../../security/openssh +CONFIGURE_ARGS+= --bin-path ssh=${PREFIX}/bin/ssh +.endif + +BUILD_DEFS+= BACKUPPC_USER BACKUPPC_GROUP APACHE_USER APACHE_GROUP VARBASE + +BACKUPPC_USER?= backuppc +BACKUPPC_GROUP?= backuppc + +PKG_USERS_VARS= BACKUPPC_USER +PKG_GROUPS_VARS= BACKUPPC_GROUP +PKG_GROUPS= ${BACKUPPC_GROUP} +PKG_USERS= ${BACKUPPC_USER}:${BACKUPPC_GROUP} + +SUBST_CLASSES+= fix-paths +SUBST_STAGE.fix-paths= post-configure +SUBST_MESSAGE.fix-paths= Substituting paths and usernames. +SUBST_FILES.fix-paths= ${WRKSRC}/build/${PREFIX}/share/examples/BackupPC/config.pl +SUBST_FILES.fix-paths+= ${WRKSRC}/build/${PREFIX}/share/BackupPC/doc/* +SUBST_FILES.fix-paths+= ${WRKSRC}/build/${PREFIX}/share/BackupPC/lib/BackupPC/Lib.pm +SUBST_FILES.fix-paths+= ${WRKSRC}/backuppc.conf +SUBST_FILES.fix-paths+= ${WRKSRC}/cgiwrapper.c +SUBST_SED.fix-paths= -e 's,${PREFIX}/share/examples/BackupPC,${PKG_SYSCONFDIR},g' +SUBST_SED.fix-paths+= -e 's,@PREFIX@,${PREFIX},g' +SUBST_SED.fix-paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g' +SUBST_SED.fix-paths+= -e 's,@APACHE_USER@,${APACHE_USER},g' +SUBST_SED.fix-paths+= -e 's,@APACHE_GROUP@,${APACHE_GROUP},g' +SUBST_SED.fix-paths+= -e 's,@BACKUPPC_USER@,${BACKUPPC_USER},g' +SUBST_SED.fix-paths+= -e 's,@BACKUPPC_GROUP@,${BACKUPPC_GROUP},g' +SUBST_SED.fix-paths+= -e 's,@PERL5@,${PERL5},g' + +FILES_SUBST+= BACKUPPC_USER=${BACKUPPC_USER:Q} BACKUPPC_GROUP=${BACKUPPC_GROUP:Q} + +PKG_SYSCONFSUBDIR= BackupPC +PKG_SYSCONFDIR_PERMS= ${BACKUPPC_USER} ${BACKUPPC_GROUP} 0755 +RCD_SCRIPTS= backuppc + +OWN_DIRS_PERMS+= ${VARBASE}/BackupPC ${BACKUPPC_USER} ${BACKUPPC_GROUP} 0750 +.for d in pool cpool pc trash +OWN_DIRS_PERMS+= ${VARBASE}/BackupPC/${d} ${BACKUPPC_USER} ${BACKUPPC_GROUP} 0750 +.endfor +OWN_DIRS_PERMS+= ${VARBASE}/log/BackupPC ${BACKUPPC_USER} ${BACKUPPC_GROUP} 0750 + +EGDIR= ${PREFIX}/share/examples/BackupPC +CONF_FILES_PERMS+= ${EGDIR}/config.pl ${PKG_SYSCONFDIR}/config.pl ${BACKUPPC_USER} ${BACKUPPC_GROUP} 0640 +CONF_FILES_PERMS+= ${EGDIR}/hosts ${PKG_SYSCONFDIR}/hosts ${BACKUPPC_USER} ${BACKUPPC_GROUP} 0640 +CONF_FILES_PERMS+= ${EGDIR}/backuppc.conf ${PKG_SYSCONFDIR}/backuppc.conf ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0644 + +post-extract: + cp ${FILESDIR}/backuppc.conf ${WRKSRC}/backuppc.conf + cp ${FILESDIR}/cgiwrapper.c ${WRKSRC}/cgiwrapper.c + +do-build: + rm -rf ${WRKSRC}/build/${VARBASE} + +do-install: + cd ${WRKSRC}/build && pax -rw . ${DESTDIR}/ + chmod +x ${DESTDIR}${PREFIX}/share/BackupPC/bin/* + ${INSTALL_DATA} ${WRKSRC}/backuppc.conf ${DESTDIR}${PREFIX}/share/examples/BackupPC/backuppc.conf + ${INSTALL_DATA} ${WRKSRC}/cgiwrapper.c ${DESTDIR}${PREFIX}/share/examples/BackupPC/cgiwrapper.c + +.include "../../mk/bsd.pkg.mk" diff --git a/sysutils/backuppc/PLIST b/sysutils/backuppc/PLIST new file mode 100644 index 00000000000..8b76282237c --- /dev/null +++ b/sysutils/backuppc/PLIST @@ -0,0 +1,127 @@ +@comment $NetBSD: PLIST,v 1.1 2015/02/13 17:57:36 tnn Exp $ +share/BackupPC/bin/BackupPC +share/BackupPC/bin/BackupPC_archive +share/BackupPC/bin/BackupPC_archiveHost +share/BackupPC/bin/BackupPC_archiveStart +share/BackupPC/bin/BackupPC_attribPrint +share/BackupPC/bin/BackupPC_dump +share/BackupPC/bin/BackupPC_fixupBackupSummary +share/BackupPC/bin/BackupPC_link +share/BackupPC/bin/BackupPC_nightly +share/BackupPC/bin/BackupPC_restore +share/BackupPC/bin/BackupPC_sendEmail +share/BackupPC/bin/BackupPC_serverMesg +share/BackupPC/bin/BackupPC_tarCreate +share/BackupPC/bin/BackupPC_tarExtract +share/BackupPC/bin/BackupPC_tarPCCopy +share/BackupPC/bin/BackupPC_trashClean +share/BackupPC/bin/BackupPC_zcat +share/BackupPC/bin/BackupPC_zipCreate +share/BackupPC/cgi-bin/BackupPC_Admin +share/BackupPC/doc/BackupPC.html +share/BackupPC/doc/BackupPC.pod +share/BackupPC/htdocs/0000000.gif +share/BackupPC/htdocs/0000011.gif +share/BackupPC/htdocs/0001000.gif +share/BackupPC/htdocs/0010000.gif +share/BackupPC/htdocs/0010001.gif +share/BackupPC/htdocs/0011000.gif +share/BackupPC/htdocs/0011001.gif +share/BackupPC/htdocs/1000000.gif +share/BackupPC/htdocs/1000100.gif +share/BackupPC/htdocs/1001000.gif +share/BackupPC/htdocs/1001100.gif +share/BackupPC/htdocs/1010000.gif +share/BackupPC/htdocs/1010001.gif +share/BackupPC/htdocs/1011000.gif +share/BackupPC/htdocs/1100000.gif +share/BackupPC/htdocs/1100100.gif +share/BackupPC/htdocs/1100101.gif +share/BackupPC/htdocs/1100110.gif +share/BackupPC/htdocs/1100111.gif +share/BackupPC/htdocs/1101000.gif +share/BackupPC/htdocs/1101100.gif +share/BackupPC/htdocs/1101101.gif +share/BackupPC/htdocs/1101110.gif +share/BackupPC/htdocs/1101111.gif +share/BackupPC/htdocs/1110000.gif +share/BackupPC/htdocs/1110001.gif +share/BackupPC/htdocs/1110100.gif +share/BackupPC/htdocs/1110101.gif +share/BackupPC/htdocs/1110110.gif +share/BackupPC/htdocs/1110111.gif +share/BackupPC/htdocs/1111000.gif +share/BackupPC/htdocs/1111001.gif +share/BackupPC/htdocs/1111100.gif +share/BackupPC/htdocs/1111101.gif +share/BackupPC/htdocs/1111110.gif +share/BackupPC/htdocs/1111111.gif +share/BackupPC/htdocs/BackupPC_stnd.css +share/BackupPC/htdocs/BackupPC_stnd_orig.css +share/BackupPC/htdocs/favicon.ico +share/BackupPC/htdocs/icon-dir.png +share/BackupPC/htdocs/icon-file.png +share/BackupPC/htdocs/icon-hardlink.png +share/BackupPC/htdocs/icon-symlink.png +share/BackupPC/htdocs/logo.gif +share/BackupPC/htdocs/sorttable.js +share/BackupPC/lib/BackupPC/Attrib.pm +share/BackupPC/lib/BackupPC/CGI/AdminOptions.pm +share/BackupPC/lib/BackupPC/CGI/Archive.pm +share/BackupPC/lib/BackupPC/CGI/ArchiveInfo.pm +share/BackupPC/lib/BackupPC/CGI/Browse.pm +share/BackupPC/lib/BackupPC/CGI/DirHistory.pm +share/BackupPC/lib/BackupPC/CGI/EditConfig.pm +share/BackupPC/lib/BackupPC/CGI/EmailSummary.pm +share/BackupPC/lib/BackupPC/CGI/GeneralInfo.pm +share/BackupPC/lib/BackupPC/CGI/HostInfo.pm +share/BackupPC/lib/BackupPC/CGI/LOGlist.pm +share/BackupPC/lib/BackupPC/CGI/Lib.pm +share/BackupPC/lib/BackupPC/CGI/Queue.pm +share/BackupPC/lib/BackupPC/CGI/RSS.pm +share/BackupPC/lib/BackupPC/CGI/ReloadServer.pm +share/BackupPC/lib/BackupPC/CGI/Restore.pm +share/BackupPC/lib/BackupPC/CGI/RestoreFile.pm +share/BackupPC/lib/BackupPC/CGI/RestoreInfo.pm +share/BackupPC/lib/BackupPC/CGI/StartServer.pm +share/BackupPC/lib/BackupPC/CGI/StartStopBackup.pm +share/BackupPC/lib/BackupPC/CGI/StopServer.pm +share/BackupPC/lib/BackupPC/CGI/Summary.pm +share/BackupPC/lib/BackupPC/CGI/View.pm +share/BackupPC/lib/BackupPC/Config.pm +share/BackupPC/lib/BackupPC/Config/Meta.pm +share/BackupPC/lib/BackupPC/FileZIO.pm +share/BackupPC/lib/BackupPC/Lang/cz.pm +share/BackupPC/lib/BackupPC/Lang/de.pm +share/BackupPC/lib/BackupPC/Lang/en.pm +share/BackupPC/lib/BackupPC/Lang/es.pm +share/BackupPC/lib/BackupPC/Lang/fr.pm +share/BackupPC/lib/BackupPC/Lang/it.pm +share/BackupPC/lib/BackupPC/Lang/ja.pm +share/BackupPC/lib/BackupPC/Lang/nl.pm +share/BackupPC/lib/BackupPC/Lang/pl.pm +share/BackupPC/lib/BackupPC/Lang/pt_br.pm +share/BackupPC/lib/BackupPC/Lang/ru.pm +share/BackupPC/lib/BackupPC/Lang/uk.pm +share/BackupPC/lib/BackupPC/Lang/zh_CN.pm +share/BackupPC/lib/BackupPC/Lib.pm +share/BackupPC/lib/BackupPC/PoolWrite.pm +share/BackupPC/lib/BackupPC/Storage.pm +share/BackupPC/lib/BackupPC/Storage/Text.pm +share/BackupPC/lib/BackupPC/View.pm +share/BackupPC/lib/BackupPC/Xfer.pm +share/BackupPC/lib/BackupPC/Xfer/Archive.pm +share/BackupPC/lib/BackupPC/Xfer/Ftp.pm +share/BackupPC/lib/BackupPC/Xfer/Protocol.pm +share/BackupPC/lib/BackupPC/Xfer/Rsync.pm +share/BackupPC/lib/BackupPC/Xfer/RsyncDigest.pm +share/BackupPC/lib/BackupPC/Xfer/RsyncFileIO.pm +share/BackupPC/lib/BackupPC/Xfer/Smb.pm +share/BackupPC/lib/BackupPC/Xfer/Tar.pm +share/BackupPC/lib/BackupPC/Zip/FileMember.pm +share/BackupPC/lib/Net/FTP/AutoReconnect.pm +share/BackupPC/lib/Net/FTP/RetrHandle.pm +share/examples/BackupPC/backuppc.conf +share/examples/BackupPC/cgiwrapper.c +share/examples/BackupPC/config.pl +share/examples/BackupPC/hosts diff --git a/sysutils/backuppc/distinfo b/sysutils/backuppc/distinfo new file mode 100644 index 00000000000..55b70b47566 --- /dev/null +++ b/sysutils/backuppc/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1 2015/02/13 17:57:36 tnn Exp $ + +SHA1 (BackupPC-3.3.1.tar.gz) = b579d64ff2486395e8ca0a93ac964bd9d9e1a232 +RMD160 (BackupPC-3.3.1.tar.gz) = 3db4d6a54c9cde61fa434292b53f18ded73dbb83 +Size (BackupPC-3.3.1.tar.gz) = 556461 bytes +SHA1 (patch-configure.pl) = 4935ca9916b52918869adaac063768713c7e055b diff --git a/sysutils/backuppc/files/backuppc.conf b/sysutils/backuppc/files/backuppc.conf new file mode 100644 index 00000000000..c6ab3d07358 --- /dev/null +++ b/sysutils/backuppc/files/backuppc.conf @@ -0,0 +1,38 @@ +# $NetBSD: backuppc.conf,v 1.1 2015/02/13 17:57:36 tnn Exp $ +# +# BackupPC sample configuration file fragment for Apache. +# +# Note that you have to perform some manual steps to make this work: +# +# 1) Install the setuid cgi-bin wrapper binary: +# +# gcc -o @PREFIX@/share/BackupPC/htdocs/BackupPC_Admin.cgi \ +# @PREFIX@/share/examples/BackupPC/cgiwrapper.c +# chown @BACKUPPC_USER@:@APACHE_GROUP@ \ +# @PREFIX@/share/BackupPC/htdocs/BackupPC_Admin.cgi +# chmod 4510 @PREFIX@/share/BackupPC/htdocs/BackupPC_Admin.cgi +# +# 2) Set an admin password: +# +# htpasswd -c @PKG_SYSCONFDIR@/htpasswd admin +# chmod 400 @PKG_SYSCONFDIR@/htpasswd +# chown @APACHE_USER@:@APACHE_GROUP@ @PKG_SYSCONFDIR@/htpasswd +# +# 3) Edit @PKG_SYSCONFDIR@/config.pl and add the +# admin user to $Conf{CgiAdminUsers}. + +<IfModule mod_alias.c> + Alias /BackupPC "@PREFIX@/share/BackupPC/htdocs/" +</IfModule> + +<Directory "@PREFIX@/share/BackupPC/htdocs"> + AddHandler cgi-script .cgi + DirectoryIndex BackupPC_Admin.cgi + Options ExecCGI + AuthUserFile @PKG_SYSCONFDIR@/htpasswd + AuthType basic + AuthName "BackupPC login" + require valid-user + Order allow,deny + Allow from all +</Directory> diff --git a/sysutils/backuppc/files/backuppc.sh b/sysutils/backuppc/files/backuppc.sh new file mode 100644 index 00000000000..86a01263cfe --- /dev/null +++ b/sysutils/backuppc/files/backuppc.sh @@ -0,0 +1,31 @@ +#!@RCD_SCRIPTS_SHELL@ + +# PROVIDE: backuppc +# REQUIRE: DAEMON +# KEYWORD: shutdown + +if [ -f /etc/rc.subr ] +then + . /etc/rc.subr +fi + +name="backuppc" +rcvar=$name +status_cmd="backuppc_status" +reload_cmd="backuppc_reload" +backuppc_user="@BACKUPPC_USER@" +backuppc_group="@BACKUPPC_GROUP@" +extra_commands="reload" +command="@PREFIX@/share/BackupPC/bin/BackupPC" +command_args="-d" +command_interpreter="@PREFIX@/bin/perl" + +load_rc_config $name + +backuppc_reload() +{ + pkill -1 -f "@PREFIX@/share/BackupPC/bin/BackupPC -d" + echo "${name} reloaded" +} + +run_rc_command "$1" diff --git a/sysutils/backuppc/files/cgiwrapper.c b/sysutils/backuppc/files/cgiwrapper.c new file mode 100644 index 00000000000..6f5927a1df2 --- /dev/null +++ b/sysutils/backuppc/files/cgiwrapper.c @@ -0,0 +1,6 @@ +#include <stdlib.h> + +int main(int argc, char **argv, char **envp) { + char *newargs[] = {"@PERL5@", "@PREFIX@/share/BackupPC/cgi-bin/BackupPC_Admin", NULL }; + execve(newargs[0], newargs, envp); +} diff --git a/sysutils/backuppc/patches/patch-configure.pl b/sysutils/backuppc/patches/patch-configure.pl new file mode 100644 index 00000000000..3a71965e480 --- /dev/null +++ b/sysutils/backuppc/patches/patch-configure.pl @@ -0,0 +1,15 @@ +$NetBSD: patch-configure.pl,v 1.1 2015/02/13 17:57:36 tnn Exp $ + +Prevent previous installation from altering build results. + +--- configure.pl.orig 2015-01-12 00:19:53.000000000 +0000 ++++ configure.pl +@@ -158,7 +158,7 @@ EOF + # config file to get all the defaults. + # + my $ConfigPath = ""; +-my $ConfigFileOK = 1; ++my $ConfigFileOK = 0; + while ( 1 ) { + if ( $ConfigFileOK && -f "/etc/BackupPC/config.pl" + && (!defined($opts{fhs}) || $opts{fhs}) && !defined($opts{"config-path"}) ) { |