diff options
author | pi <pi@FreeBSD.org> | 2014-12-11 13:49:41 +0800 |
---|---|---|
committer | pi <pi@FreeBSD.org> | 2014-12-11 13:49:41 +0800 |
commit | f683c45bcc16a5d8a2beca3122ad24bea19aaec2 (patch) | |
tree | 679be116475fc5d4b86da9333fb54bcc313b955d /sysutils | |
parent | 0e1362f947e5e246be3ec018a4c34e937b6175f2 (diff) | |
download | freebsd-ports-gnome-f683c45bcc16a5d8a2beca3122ad24bea19aaec2.tar.gz freebsd-ports-gnome-f683c45bcc16a5d8a2beca3122ad24bea19aaec2.tar.zst freebsd-ports-gnome-f683c45bcc16a5d8a2beca3122ad24bea19aaec2.zip |
Revive ports: sysutils/boxbackup, sysutils/boxbackup-devel
- revived
- stage support added
- compilation issues fixed
PR: 194223
Submitted by: Hrant Dadivanyan <hrant@dadivanyan.net>,
Chris Hutchinson <portmaster@bsdforge.com>
Diffstat (limited to 'sysutils')
24 files changed, 702 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 61a23c097df4..59c47dad9230 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -79,6 +79,8 @@ SUBDIR += bkpupsd SUBDIR += bksh SUBDIR += bontmia + SUBDIR += boxbackup + SUBDIR += boxbackup-devel SUBDIR += brasero SUBDIR += brebis SUBDIR += bsd-splash-changer diff --git a/sysutils/boxbackup-devel/Makefile b/sysutils/boxbackup-devel/Makefile new file mode 100644 index 000000000000..79f00ac0633e --- /dev/null +++ b/sysutils/boxbackup-devel/Makefile @@ -0,0 +1,151 @@ +# Created by: James O'Gorman <james@netinertia.co.uk> +# $FreeBSD$ + +PORTNAME= boxbackup +PORTVERSION= 0.11.r${SVNVERSION:C/^[0-9\.]+_[a-z]+_([0-9]+)/\1/} +CATEGORIES= sysutils +MASTER_SITES= http://www.boxbackup.org/snapshots/%SUBDIR%/ +PKGNAMESUFFIX= ${CLIENT_OR_SERVER}-devel +DISTNAME= ${PORTNAME}-${SVNVERSION} + +MAINTAINER= portmaster@BSDforge.com +COMMENT= Open source, completely automatic on-line backup system for UNIX + +LICENSE= BSD3CLAUSE GPLv2 +LICENSE_COMB= dual +LICENSE_FILE= ${WRKSRC}/LICENSE-DUAL.txt + +MASTER_SITE_SUBDIR=201108 +SVNVERSION= 0.11_trunk_2979 + +NO_LATEST_LINK= yes + +USES= perl5 tar:tgz +USE_OPENSSL= yes +GNU_CONFIGURE= yes +USE_AUTOTOOLS= autoconf aclocal autoheader +ACLOCAL_ARGS+= -I ${WRKSRC}/infrastructure/m4 + +CONFIGURE_ARGS+=--sysconfdir=${PREFIX}/etc + +PKGMESSAGE= ${WRKDIR}/pkg-message + +OPTIONS_MULTI= TYPE +OPTIONS_MULTI_TYPE= CLIENT SERVER +OPTIONS_DEFINE= GNUREADLINE +OPTIONS_DEFAULT= CLIENT SERVER +CLIENT_DESC= Install the bbackupd client +SERVER_DESC= Install the bbstored server +GNUREADLINE_DESC= Enable the use of GNU readline + +MAKE_JOBS_UNSAFE= yes + +.include <bsd.port.options.mk> + +CLIENTDIR= CLIENT +SERVERDIR= SERVER +CLIENT_FILES= bbackupd bbackupquery bbackupctl +SERVER_FILES= bbstored bbstoreaccounts + +.if ${PORT_OPTIONS:MGNUREADLINE} +CONFIGURE_ARGS+=--enable-gnu-readline +.endif + +.if ${PORT_OPTIONS:MCLIENT} +USE_RC_SUBR+= bbackupd +PLIST_SUB+= CLIENT="" +ALL_TARGET+= build-backup-client +CLIENT_SCRIPTS= bbackupd-config +SUB_FILES+= 999.boxbackup +.else +PLIST_SUB+= CLIENT="@comment " +.endif + +.if ${PORT_OPTIONS:MSERVER} +USE_RC_SUBR+= bbstored +USERS+= _bbstored +GROUPS+= _bbstored +PLIST_SUB+= SERVER="" +ALL_TARGET+= build-backup-server +SERVER_SCRIPTS= bbstored-certs bbstored-config raidfile-config +.else +PLIST_SUB+= SERVER="@comment " +.endif + +.if ! ${PORT_OPTIONS:MCLIENT} +CONFLICTS= boxbackup-client-[0-9]* boxbackup-[0-9]* +CLIENT_OR_SERVER=-server +.elif ! ${PORT_OPTIONS:MSERVER} +CONFLICTS= boxbackup-server-[0-9]* boxbackup-[0-9]* +CLIENT_OR_SERVER=-client +.else +CONFLICTS= boxbackup-server-[0-9]* boxbackup-client-[0-9]* +.endif + +post-patch: + @${REINPLACE_CMD} -e '/html/d' ${WRKSRC}/parcels.txt +.if ${PORT_OPTIONS:MCLIENT} + @${CAT} ${FILESDIR}/pkg-message.client >> ${PKGMESSAGE} +.endif +.if ${PORT_OPTIONS:MSERVER} + @${CAT} ${FILESDIR}/pkg-message.server >> ${PKGMESSAGE} +.endif + +post-configure: + @${REINPLACE_CMD} -e '/share.doc.boxbackup/d' ${WRKSRC}/parcels/scripts/install-backup-* +pre-install: + (cd ${WRKSRC}/parcels \ + && ${MV} ./boxbackup-0.11_trunk_2979-backup-client ../CLIENT) + + (cd ${WRKSRC}/parcels \ + && ${MV} ./boxbackup-0.11_trunk_2979-backup-server ../SERVER) +do-install: +.if ${PORT_OPTIONS:MCLIENT} + (cd ${WRKSRC}/${CLIENTDIR}/ \ + && ${INSTALL_PROGRAM} ${CLIENT_FILES} ${STAGEDIR}${PREFIX}/sbin/) + + (cd ${WRKSRC}/${CLIENTDIR}/ \ + && ${INSTALL_SCRIPT} ${CLIENT_SCRIPTS} ${STAGEDIR}${PREFIX}/sbin/) + + ${INSTALL_MAN} ${WRKSRC}/${CLIENTDIR}/bbackupd.conf.5.gz \ + ${STAGEDIR}${PREFIX}/man/man5/ + + ${INSTALL_MAN} ${WRKSRC}/${CLIENTDIR}/bbackupctl.8.gz \ + ${WRKSRC}/${CLIENTDIR}/bbackupd-config.8.gz \ + ${WRKSRC}/${CLIENTDIR}/bbackupd.8.gz ${WRKSRC}/${CLIENTDIR}/bbackupquery.8.gz \ + ${STAGEDIR}${PREFIX}/man/man8/ +.endif +.if ${PORT_OPTIONS:MSERVER} + (cd ${WRKSRC}/${SERVERDIR}/ \ + && ${INSTALL_PROGRAM} ${SERVER_FILES} ${STAGEDIR}${PREFIX}/sbin/) + + (cd ${WRKSRC}/${SERVERDIR}/ \ + && ${INSTALL_SCRIPT} ${SERVER_SCRIPTS} ${STAGEDIR}${PREFIX}/sbin/) + + ${INSTALL_MAN} ${WRKSRC}/${SERVERDIR}/raidfile.conf.5.gz \ + ${WRKSRC}/${SERVERDIR}/bbstored.conf.5.gz \ + ${STAGEDIR}${PREFIX}/man/man5/ + + ${INSTALL_MAN} ${WRKSRC}/${SERVERDIR}/bbstoreaccounts.8.gz \ + ${WRKSRC}/${SERVERDIR}/bbstored-certs.8.gz \ + ${WRKSRC}/${SERVERDIR}/bbstored-config.8.gz \ + ${WRKSRC}/${SERVERDIR}/bbstored.8.gz \ + ${WRKSRC}/${SERVERDIR}/raidfile-config.8.gz \ + ${STAGEDIR}${PREFIX}/man/man8/ +.endif +post-install: +.if ${PORT_OPTIONS:MCLIENT} + @${MKDIR} -m 0700 ${STAGEDIR}${PREFIX}/etc/box/bbackupd + @${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/monthly + ${INSTALL_SCRIPT} ${WRKDIR}/999.boxbackup ${STAGEDIR}${PREFIX}/etc/periodic/monthly +.endif +.if ${PORT_OPTIONS:MSERVER} + @${MKDIR} -m 0700 ${STAGEDIR}${PREFIX}/etc/box/bbstored +.endif + @${CAT} ${PKGMESSAGE} + +test: + @${ECHO_CMD} "===> Running tests" + @${MAKE} -C ${WRKSRC} test + +.include <bsd.port.mk> diff --git a/sysutils/boxbackup-devel/distinfo b/sysutils/boxbackup-devel/distinfo new file mode 100644 index 000000000000..6563e4e588cc --- /dev/null +++ b/sysutils/boxbackup-devel/distinfo @@ -0,0 +1,2 @@ +SHA256 (boxbackup-0.11_trunk_2979.tgz) = 8d49959c7bd173de468837a6645883b37f5c2d485ba2245f9178b74e8b1f8c9e +SIZE (boxbackup-0.11_trunk_2979.tgz) = 2185279 diff --git a/sysutils/boxbackup-devel/files/999.boxbackup.in b/sysutils/boxbackup-devel/files/999.boxbackup.in new file mode 100644 index 000000000000..e620fa306ca9 --- /dev/null +++ b/sysutils/boxbackup-devel/files/999.boxbackup.in @@ -0,0 +1,66 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Box Backup monthly store compare +# +# Add the following to /etc/periodic.conf to enable the monthly compare: +# monthly_boxbackup_compare_enable="YES" +# +# By default the script will run "compare -aq". If you want to change this to +# run a full compare, add the following to periodic.conf: +# monthly_boxbackup_compare_args="-a" +# +# NOTE: This script will cause the monthly periodic(8) run to take much longer +# than usual, depending on the size of your backup store. +# +# If you wish to run this independently of the monthly job, you can create a +# new periodic entry as follows: +# +# # mkdir /usr/local/etc/periodic/boxbackup +# # mv /usr/local/etc/periodic/monthly/999.boxbackup \ +# /usr/local/etc/periodic/boxbackup/100.compare +# +# Then add the following to /etc/crontab: +# 30 5 1 * * root periodic boxbackup +# +# (adjust the timings as necessary) +# +# You may also wish to add boxbackup_output="root" to periodic.conf so that +# mail comes from periodic rather than cron. + +monthly_boxbackup_compare_enable="NO" +monthly_boxbackup_compare_args="-aq" + +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +rc=0 + +case "$monthly_boxbackup_compare_enable" in + [Yy][Ee][Ss]) + echo + echo "Running Box Backup store compare:" + %%PREFIX%%/sbin/bbackupquery -q "compare -c $monthly_boxbackup_compare_args" quit + + # Return codes: + # 1 Comparison was exact + # 2 Differences were found + # 3 An error occurred + if [ $? -eq 2 ]; then + echo + echo "Differences were found. Please check the output." + rc=3 + elif [ $? -eq 3 ]; then + echo + echo "An error occurred. Please check the output." + rc=3 + fi + + ;; +esac + +exit $rc diff --git a/sysutils/boxbackup-devel/files/bbackupd.in b/sysutils/boxbackup-devel/files/bbackupd.in new file mode 100644 index 000000000000..e74a9df86073 --- /dev/null +++ b/sysutils/boxbackup-devel/files/bbackupd.in @@ -0,0 +1,28 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: bbackupd +# REQUIRE: NETWORKING +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable bbackupd: +# +# bbackupd_enable="YES" + +. /etc/rc.subr + +name="bbackupd" +rcvar=bbackupd_enable + +load_rc_config $name + +: ${bbackupd_enable:="NO"} +: ${bbackupd_flags:="%%PREFIX%%/etc/box/bbackupd.conf"} + +pidfile=${bbackupd_pidfile:-"/var/run/bbackupd.pid"} + +command="%%PREFIX%%/sbin/bbackupd" +extra_commands="reload" + +run_rc_command "$1" diff --git a/sysutils/boxbackup-devel/files/bbstored.in b/sysutils/boxbackup-devel/files/bbstored.in new file mode 100644 index 000000000000..f5163bb165ba --- /dev/null +++ b/sysutils/boxbackup-devel/files/bbstored.in @@ -0,0 +1,28 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: bbstored +# REQUIRE: NETWORKING +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable bbstored: +# +# bbstored_enable="YES" + +. /etc/rc.subr + +name="bbstored" +rcvar=bbstored_enable + +load_rc_config $name + +: ${bbstored_enable:="NO"} +: ${bbstored_flags:="%%PREFIX%%/etc/box/bbstored.conf"} + +pidfile=${bbstored_pidfile:-"/var/run/bbstored.pid"} + +command="%%PREFIX%%/sbin/bbstored" +extra_commands="reload" + +run_rc_command "$1" diff --git a/sysutils/boxbackup-devel/files/patch-infrastructure_BoxPlatform.pm.in b/sysutils/boxbackup-devel/files/patch-infrastructure_BoxPlatform.pm.in new file mode 100644 index 000000000000..3614cefe12e1 --- /dev/null +++ b/sysutils/boxbackup-devel/files/patch-infrastructure_BoxPlatform.pm.in @@ -0,0 +1,11 @@ +--- infrastructure/BoxPlatform.pm.in.orig 2014-10-19 13:20:18.000000000 -0700 ++++ infrastructure/BoxPlatform.pm.in 2014-10-19 13:22:48.000000000 -0700 +@@ -128,7 +128,7 @@ + sub parcel_root + { + my $tos = $_[1] || $target_os; +- return $product_name.'-'.$product_version.'-'.$_[0].'-'.$tos; ++ return $product_name.'-'.$product_version.'-'.$_[0]; + } + + sub parcel_dir diff --git a/sysutils/boxbackup-devel/files/patch-qdbm_Makefile.in b/sysutils/boxbackup-devel/files/patch-qdbm_Makefile.in new file mode 100644 index 000000000000..bca31519507a --- /dev/null +++ b/sysutils/boxbackup-devel/files/patch-qdbm_Makefile.in @@ -0,0 +1,11 @@ +--- qdbm/Makefile.in.orig 2014-10-15 08:11:25.000000000 -0700 ++++ qdbm/Makefile.in 2014-10-15 08:17:54.000000000 -0700 +@@ -56,7 +56,7 @@ + -D_XOPEN_SOURCE_EXTENDED=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__=1 -D_HPUX_SOURCE=1 \ + -D_POSIX_MAPPED_FILES=1 -D_POSIX_SYNCHRONIZED_IO=1 \ + -DPIC=1 -D_THREAD_SAFE=1 -D_REENTRANT=1 -DNDEBUG +-CFLAGS = @CFLAGS@ -Wall -pedantic -fPIC -fsigned-char -O0 -fforce-addr @MYOPTS@ ++CFLAGS = @CFLAGS@ -Wall -pedantic -fPIC -fsigned-char -O0 @MYOPTS@ + LD = @LD@ + LIBS = -lqdbm @LIBS@ + LIBLDFLAGS = @LDFLAGS@ -L. -L$(MYLIBDIR) -L$(HOME)/lib -L/usr/local/lib @LIBS@ diff --git a/sysutils/boxbackup-devel/files/patch-qdbm_config.status b/sysutils/boxbackup-devel/files/patch-qdbm_config.status new file mode 100644 index 000000000000..1ad8c088e193 --- /dev/null +++ b/sysutils/boxbackup-devel/files/patch-qdbm_config.status @@ -0,0 +1,11 @@ +--- qdbm/config.status.orig 2014-10-15 08:47:14.000000000 -0700 ++++ qdbm/config.status 2014-10-15 08:47:31.000000000 -0700 +@@ -475,7 +475,7 @@ + s,@LIBREV@,13,;t t + s,@TARGETS@,all,;t t + s,@MYDEFS@,,;t t +-s,@MYOPTS@,-O1 -fno-omit-frame-pointer -fno-force-addr,;t t ++s,@MYOPTS@,-O1 -fno-omit-frame-pointer,;t t + s,@MGWLIBS@,,;t t + s,@LD@,/usr/bin/ld,;t t + s,@AR@,/usr/bin/ar,;t t diff --git a/sysutils/boxbackup-devel/files/patch-qdbm_configure b/sysutils/boxbackup-devel/files/patch-qdbm_configure new file mode 100644 index 000000000000..7fee055ea786 --- /dev/null +++ b/sysutils/boxbackup-devel/files/patch-qdbm_configure @@ -0,0 +1,21 @@ +--- qdbm/configure.orig 2014-10-15 08:47:58.000000000 -0700 ++++ qdbm/configure 2014-10-15 08:48:38.000000000 -0700 +@@ -2401,15 +2401,15 @@ + fi + if uname | egrep -i 'SunOS' > /dev/null 2>&1 + then +- MYOPTS="-O1 -fno-omit-frame-pointer -fno-force-addr" ++ MYOPTS="-O1 -fno-omit-frame-pointer" + fi + if uname | egrep -i 'BSD' > /dev/null 2>&1 + then +- MYOPTS="-O1 -fno-omit-frame-pointer -fno-force-addr" ++ MYOPTS="-O1 -fno-omit-frame-pointer" + fi + if gcc --version | egrep -i '^2\.(8|9)' > /dev/null 2>&1 + then +- MYOPTS="-O1 -fno-omit-frame-pointer -fno-force-addr" ++ MYOPTS="-O1 -fno-omit-frame-pointer" + fi + + # Linker diff --git a/sysutils/boxbackup-devel/files/patch-qdbm_configure.in b/sysutils/boxbackup-devel/files/patch-qdbm_configure.in new file mode 100644 index 000000000000..99008fe13a11 --- /dev/null +++ b/sysutils/boxbackup-devel/files/patch-qdbm_configure.in @@ -0,0 +1,21 @@ +--- qdbm/configure.in.orig 2014-10-15 08:35:05.000000000 -0700 ++++ qdbm/configure.in 2014-10-15 08:35:41.000000000 -0700 +@@ -180,15 +180,15 @@ + fi + if uname | egrep -i 'SunOS' > /dev/null 2>&1 + then +- MYOPTS="-O1 -fno-omit-frame-pointer -fno-force-addr" ++ MYOPTS="-O1 -fno-omit-frame-pointer" + fi + if uname | egrep -i 'BSD' > /dev/null 2>&1 + then +- MYOPTS="-O1 -fno-omit-frame-pointer -fno-force-addr" ++ MYOPTS="-O1 -fno-omit-frame-pointer" + fi + if gcc --version | egrep -i '^2\.(8|9)' > /dev/null 2>&1 + then +- MYOPTS="-O1 -fno-omit-frame-pointer -fno-force-addr" ++ MYOPTS="-O1 -fno-omit-frame-pointer" + fi + + # Linker diff --git a/sysutils/boxbackup-devel/files/pkg-message.client b/sysutils/boxbackup-devel/files/pkg-message.client new file mode 100644 index 000000000000..e804b44d94b9 --- /dev/null +++ b/sysutils/boxbackup-devel/files/pkg-message.client @@ -0,0 +1,4 @@ + +To run bbackupd at startup, add bbackupd_enable="YES" to /etc/rc.conf +Please see http://www.boxbackup.org/client.html for client configuration +options diff --git a/sysutils/boxbackup-devel/files/pkg-message.server b/sysutils/boxbackup-devel/files/pkg-message.server new file mode 100644 index 000000000000..872c82bf5ed8 --- /dev/null +++ b/sysutils/boxbackup-devel/files/pkg-message.server @@ -0,0 +1,4 @@ + +To run bbstored at startup, add bbstored_enable="YES" to /etc/rc.conf +Please see http://www.boxbackup.org/server.html for server configuration +options diff --git a/sysutils/boxbackup-devel/pkg-descr b/sysutils/boxbackup-devel/pkg-descr new file mode 100644 index 000000000000..1d8c6ddbc5d5 --- /dev/null +++ b/sysutils/boxbackup-devel/pkg-descr @@ -0,0 +1,13 @@ +This is a port of Box Backup, an online backup daemon + +The backup daemon, bbackupd, runs on all machines to be backed up. The +store server daemon, bbstored runs on a central server. Data is sent +to the store server, which stores all data on local filesystems, that +is, only on local hard drives. Tape or other archive media is not +used. + +The system is designed to be easy to set up and run, and cheap to use. +Once set up, there should be no need for user or administrative +intervention, apart from usual system maintenance. + +WWW: http://www.boxbackup.org/ diff --git a/sysutils/boxbackup-devel/pkg-plist b/sysutils/boxbackup-devel/pkg-plist new file mode 100644 index 000000000000..208e5eb7e23d --- /dev/null +++ b/sysutils/boxbackup-devel/pkg-plist @@ -0,0 +1,25 @@ +%%CLIENT%%sbin/bbackupctl +%%CLIENT%%sbin/bbackupd +%%CLIENT%%sbin/bbackupd-config +%%CLIENT%%sbin/bbackupquery +%%SERVER%%sbin/bbstoreaccounts +%%SERVER%%sbin/bbstored +%%SERVER%%sbin/bbstored-certs +%%SERVER%%sbin/bbstored-config +%%SERVER%%sbin/raidfile-config +%%CLIENT%%man/man5/bbackupd.conf.5.gz +%%SERVER%%man/man5/bbstored.conf.5.gz +%%SERVER%%man/man5/raidfile.conf.5.gz +%%SERVER%%man/man8/bbstored.8.gz +%%SERVER%%man/man8/bbstoreaccounts.8.gz +%%SERVER%%man/man8/bbstored-certs.8.gz +%%SERVER%%man/man8/bbstored-config.8.gz +%%SERVER%%man/man8/raidfile-config.8.gz +%%CLIENT%%man/man8/bbackupd.8.gz +%%CLIENT%%man/man8/bbackupctl.8.gz +%%CLIENT%%man/man8/bbackupd-config.8.gz +%%CLIENT%%man/man8/bbackupquery.8.gz +%%CLIENT%%etc/periodic/monthly/999.boxbackup +@mode 0077 +%%CLIENT%%@dir etc/box/bbackupd +%%SERVER%%@dir etc/box/bbstored diff --git a/sysutils/boxbackup/Makefile b/sysutils/boxbackup/Makefile new file mode 100644 index 000000000000..4768f156a089 --- /dev/null +++ b/sysutils/boxbackup/Makefile @@ -0,0 +1,118 @@ +# Created by: James O'Gorman <james@netinertia.co.uk> +# $FreeBSD$ + +PORTNAME= boxbackup +PORTVERSION= 0.11.1 +PORTREVISION= 4 +CATEGORIES= sysutils +MASTER_SITES= SF +PKGNAMESUFFIX= ${CLIENT_OR_SERVER} + +MAINTAINER= ports@FreeBSD.org +COMMENT= Open source, completely automatic on-line backup system for Unix + +LICENSE= BSD3CLAUSE GPLv2 +LICENSE_COMB= dual +LICENSE_FILE= ${WRKSRC}/LICENSE-DUAL.txt + +USES= perl5 tar:tgz +USE_OPENSSL= yes +GNU_CONFIGURE= yes +USE_AUTOTOOLS= autoconf aclocal autoheader +ACLOCAL_ARGS+= -I ${WRKSRC}/infrastructure/m4 + + +MAKE_JOBS_UNSAFE=yes + +CONFIGURE_ARGS+=--sysconfdir=${PREFIX}/etc + +SUB_FILES= pkg-message + +OPTIONS_DEFINE= READLINE + +OPTIONS_MULTI= FLAVOUR +OPTIONS_MULTI_FLAVOUR= CLIENT SERVER + +CLIENT_DESC= Install the bbackupd client +SERVER_DESC= Install the bbstored server + +OPTIONS_DEFAULT=CLIENT SERVER + +.include <bsd.port.options.mk> + +.if ${OPSYS} == "FreeBSD" && ${OSVERSION} >= 1000000 +USES+= execinfo +LDFLAGS+= -lexecinfo +.endif + +.if ${OPSYS} == "FreeBSD" && ${OSVERSION} < 1000000 && ${OSVERSION} > 900000 +USE_GCC= yes +.endif + +.if ${PORT_OPTIONS:MREADLINE} +CONFIGURE_ARGS+=--enable-gnu-readline +.endif + +MANCOMPRESSED= yes +.if ${PORT_OPTIONS:MCLIENT} +USE_RC_SUBR+= bbackupd +PLIST_SUB+= CLIENT="" +SUB_LIST+= CLIENT="" +ALL_TARGET+= build-backup-client +INSTALL_TARGET+=install-backup-client +SUB_FILES+= 999.boxbackup +.else +PLIST_SUB+= CLIENT="@comment " +SUB_LIST+= CLIENT="@comment " +.endif + +.if ${PORT_OPTIONS:MSERVER} +USE_RC_SUBR+= bbstored +USERS+= _bbstored +GROUPS+= _bbstored +PLIST_SUB+= SERVER="" +SUB_LIST+= SERVER="" +ALL_TARGET+= build-backup-server +INSTALL_TARGET+=install-backup-server +.else +PLIST_SUB+= SERVER="@comment " +SUB_LIST+= SERVER="@comment " +.endif + +.if ! ${PORT_OPTIONS:MCLIENT} +# if this is a server-only install, CONFLICT with an install of the CLIENT or both +CONFLICTS= boxbackup-client-[0-9]* boxbackup-[0-9]* +CLIENT_OR_SERVER=-server +.elif ! ${PORT_OPTIONS:MSERVER} +# if this is a client-only install, CONFLICT with an install of the SERVER or both +CONFLICTS= boxbackup-server-[0-9]* boxbackup-[0-9]* +CLIENT_OR_SERVER=-client +.else +# if we install boxbackup-[0-9]*, we should CONFLICT with a CLIENT or SERVER only install +# PKGNAMESUFFIX is empty at this point +CONFLICTS= boxbackup-server-[0-9]* boxbackup-client-[0-9]* +.endif + +post-patch: + @${REINPLACE_CMD} -e '/html/d' ${WRKSRC}/parcels.txt + +post-configure: + @${REINPLACE_CMD} -e '/share.doc.boxbackup/d' \ + ${WRKSRC}/parcels/scripts/install-backup-* + +post-install: +.if ${PORT_OPTIONS:MCLIENT} + @${MKDIR} -m 0700 ${STAGEDIR}/${PREFIX}/etc/boxbackup/bbackupd + @${MKDIR} ${STAGEDIR}/${PREFIX}/etc/periodic/monthly + ${INSTALL_SCRIPT} ${WRKDIR}/999.boxbackup ${STAGEDIR}/${PREFIX}/etc/periodic/monthly +.endif +.if ${PORT_OPTIONS:MSERVER} + @${MKDIR} -m 0700 ${STAGEDIR}/${PREFIX}/etc/boxbackup/bbstored +.endif + @${CAT} ${PKGMESSAGE} + +test: + @${ECHO_CMD} "===> Running tests" + @${MAKE} -C ${WRKSRC} test + +.include <bsd.port.mk> diff --git a/sysutils/boxbackup/distinfo b/sysutils/boxbackup/distinfo new file mode 100644 index 000000000000..80e6c3f2b41a --- /dev/null +++ b/sysutils/boxbackup/distinfo @@ -0,0 +1,2 @@ +SHA256 (boxbackup-0.11.1.tgz) = 1328b010477259c4767276dbfebab6580e883336cc9d25696c39991b09cc6d32 +SIZE (boxbackup-0.11.1.tgz) = 1863270 diff --git a/sysutils/boxbackup/files/999.boxbackup.in b/sysutils/boxbackup/files/999.boxbackup.in new file mode 100644 index 000000000000..e620fa306ca9 --- /dev/null +++ b/sysutils/boxbackup/files/999.boxbackup.in @@ -0,0 +1,66 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Box Backup monthly store compare +# +# Add the following to /etc/periodic.conf to enable the monthly compare: +# monthly_boxbackup_compare_enable="YES" +# +# By default the script will run "compare -aq". If you want to change this to +# run a full compare, add the following to periodic.conf: +# monthly_boxbackup_compare_args="-a" +# +# NOTE: This script will cause the monthly periodic(8) run to take much longer +# than usual, depending on the size of your backup store. +# +# If you wish to run this independently of the monthly job, you can create a +# new periodic entry as follows: +# +# # mkdir /usr/local/etc/periodic/boxbackup +# # mv /usr/local/etc/periodic/monthly/999.boxbackup \ +# /usr/local/etc/periodic/boxbackup/100.compare +# +# Then add the following to /etc/crontab: +# 30 5 1 * * root periodic boxbackup +# +# (adjust the timings as necessary) +# +# You may also wish to add boxbackup_output="root" to periodic.conf so that +# mail comes from periodic rather than cron. + +monthly_boxbackup_compare_enable="NO" +monthly_boxbackup_compare_args="-aq" + +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +rc=0 + +case "$monthly_boxbackup_compare_enable" in + [Yy][Ee][Ss]) + echo + echo "Running Box Backup store compare:" + %%PREFIX%%/sbin/bbackupquery -q "compare -c $monthly_boxbackup_compare_args" quit + + # Return codes: + # 1 Comparison was exact + # 2 Differences were found + # 3 An error occurred + if [ $? -eq 2 ]; then + echo + echo "Differences were found. Please check the output." + rc=3 + elif [ $? -eq 3 ]; then + echo + echo "An error occurred. Please check the output." + rc=3 + fi + + ;; +esac + +exit $rc diff --git a/sysutils/boxbackup/files/bbackupd.in b/sysutils/boxbackup/files/bbackupd.in new file mode 100644 index 000000000000..ae7240515f86 --- /dev/null +++ b/sysutils/boxbackup/files/bbackupd.in @@ -0,0 +1,28 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: bbackupd +# REQUIRE: NETWORKING +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable bbackupd: +# +# bbackupd_enable="YES" + +. /etc/rc.subr + +name="bbackupd" +rcvar=bbackupd_enable + +load_rc_config $name + +: ${bbackupd_enable:="NO"} +: ${bbackupd_flags:="%%PREFIX%%/etc/boxbackup/bbackupd.conf"} + +pidfile=${bbackupd_pidfile:-"/var/run/bbackupd.pid"} + +command="%%PREFIX%%/sbin/bbackupd" +extra_commands="reload" + +run_rc_command "$1" diff --git a/sysutils/boxbackup/files/bbstored.in b/sysutils/boxbackup/files/bbstored.in new file mode 100644 index 000000000000..5a4ded4312bd --- /dev/null +++ b/sysutils/boxbackup/files/bbstored.in @@ -0,0 +1,28 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: bbstored +# REQUIRE: NETWORKING +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable bbstored: +# +# bbstored_enable="YES" + +. /etc/rc.subr + +name="bbstored" +rcvar=bbstored_enable + +load_rc_config $name + +: ${bbstored_enable:="NO"} +: ${bbstored_flags:="%%ETCDIR%%/bbstored.conf"} + +pidfile=${bbstored_pidfile:-"/var/run/bbstored.pid"} + +command="%%PREFIX%%/sbin/bbstored" +extra_commands="reload" + +run_rc_command "$1" diff --git a/sysutils/boxbackup/files/patch-bbackupd-config b/sysutils/boxbackup/files/patch-bbackupd-config new file mode 100644 index 000000000000..81a15385159d --- /dev/null +++ b/sysutils/boxbackup/files/patch-bbackupd-config @@ -0,0 +1,11 @@ +--- bin/bbackupd/bbackupd-config.in.orig 2013-01-25 13:17:39.942303010 +1300 ++++ bin/bbackupd/bbackupd-config.in 2013-01-25 13:18:04.021348906 +1300 +@@ -445,7 +445,7 @@ + + Server + { +- PidFile = $working_dir/bbackupd.pid ++ PidFile = /var/run/bbackupd.pid + } + + diff --git a/sysutils/boxbackup/files/pkg-message.in b/sysutils/boxbackup/files/pkg-message.in new file mode 100644 index 000000000000..ee4ff003ca2a --- /dev/null +++ b/sysutils/boxbackup/files/pkg-message.in @@ -0,0 +1,13 @@ +%%SERVER%% +%%SERVER%%To run bbstored at startup, add bbstored_enable="YES" to /etc/rc.conf +%%SERVER%%Please see http://www.boxbackup.org/server.html for server +%%SERVER%%configuration options + +The default location of configuration files changed from +%%PREFIX%%/etc/box to %%ETCDIR%%, if you are upgrading then run + mv %%PREFIX%%/etc/box %%ETCDIR%% + +%%CLIENT%%To run bbackupd at startup, add bbackupd_enable="YES" to /etc/rc.conf +%%CLIENT%%Please see http://www.boxbackup.org/client.html for client +%%CLIENT%%configuration options +%%CLIENT%% diff --git a/sysutils/boxbackup/pkg-descr b/sysutils/boxbackup/pkg-descr new file mode 100644 index 000000000000..1d8c6ddbc5d5 --- /dev/null +++ b/sysutils/boxbackup/pkg-descr @@ -0,0 +1,13 @@ +This is a port of Box Backup, an online backup daemon + +The backup daemon, bbackupd, runs on all machines to be backed up. The +store server daemon, bbstored runs on a central server. Data is sent +to the store server, which stores all data on local filesystems, that +is, only on local hard drives. Tape or other archive media is not +used. + +The system is designed to be easy to set up and run, and cheap to use. +Once set up, there should be no need for user or administrative +intervention, apart from usual system maintenance. + +WWW: http://www.boxbackup.org/ diff --git a/sysutils/boxbackup/pkg-plist b/sysutils/boxbackup/pkg-plist new file mode 100644 index 000000000000..6b618e4c0b33 --- /dev/null +++ b/sysutils/boxbackup/pkg-plist @@ -0,0 +1,25 @@ +%%CLIENT%%sbin/bbackupctl +%%CLIENT%%sbin/bbackupd +%%CLIENT%%sbin/bbackupd-config +%%CLIENT%%sbin/bbackupquery +%%SERVER%%sbin/bbstoreaccounts +%%SERVER%%sbin/bbstored +%%SERVER%%sbin/bbstored-certs +%%SERVER%%sbin/bbstored-config +%%SERVER%%sbin/raidfile-config +%%CLIENT%%man/man5/bbackupd.conf.5.gz +%%SERVER%%man/man5/bbstored.conf.5.gz +%%SERVER%%man/man5/raidfile.conf.5.gz +%%SERVER%%man/man8/bbstored.8.gz +%%SERVER%%man/man8/bbstoreaccounts.8.gz +%%SERVER%%man/man8/bbstored-certs.8.gz +%%SERVER%%man/man8/bbstored-config.8.gz +%%SERVER%%man/man8/raidfile-config.8.gz +%%CLIENT%%man/man8/bbackupd.8.gz +%%CLIENT%%man/man8/bbackupctl.8.gz +%%CLIENT%%man/man8/bbackupd-config.8.gz +%%CLIENT%%man/man8/bbackupquery.8.gz +etc/periodic/monthly/999.boxbackup +@mode 0077 +%%CLIENT%%@dir etc/boxbackup/bbackupd +%%SERVER%%@dir etc/boxbackup/bbstored |