[Box Backup-commit] COMMIT r2308 - in box/james/FreeBSD: . files

boxbackup-dev at boxbackup.org boxbackup-dev at boxbackup.org
Wed Oct 1 13:37:22 BST 2008


Author: jamesog
Date: 2008-10-01 13:37:21 +0100 (Wed, 01 Oct 2008)
New Revision: 2308

Added:
   box/james/FreeBSD/files/999.boxbackup.in
Modified:
   box/james/FreeBSD/Makefile
   box/james/FreeBSD/files/pkg-message.client
   box/james/FreeBSD/files/pkg-message.server
   box/james/FreeBSD/pkg-plist
Log:
Update FreeBSD port skeleton for 0.11rc2.
New features:
 * BDB is now autodetected for the client
 * Config dir is configurable via CONFDIR environment variable
 * Monthly periodic script to run store compare
 * Man pages!



Modified: box/james/FreeBSD/Makefile
===================================================================
--- box/james/FreeBSD/Makefile	2008-09-30 23:36:52 UTC (rev 2307)
+++ box/james/FreeBSD/Makefile	2008-10-01 12:37:21 UTC (rev 2308)
@@ -6,10 +6,11 @@
 #
 
 PORTNAME=	boxbackup
-PORTVERSION=	0.11
+DISTVERSION=	0.11rc2
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=${PORTNAME}
+PKGNAMESUFFIX=	${CLIENT_OR_SERVER}
 EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	james at netinertia.co.uk
@@ -18,8 +19,7 @@
 USE_OPENSSL=	yes
 GNU_CONFIGURE=	yes
 USE_PERL5=	yes
-USE_GCC=	3.2+
-USE_AUTOTOOLS=	autoconf:261 aclocal:19 autoheader:261
+USE_AUTOTOOLS=	autoconf:262 aclocal:19 autoheader:262
 ACLOCAL_ARGS+=	-I ${WRKSRC}/infrastructure/m4
 
 # CONFDIR may be overridden if you keep /etc files somewhere other than
@@ -57,6 +57,9 @@
 PLIST_SUB+=	CLIENT=""
 ALL_TARGET+=	build-backup-client
 INSTALL_TARGET+=install-backup-client
+MAN5+=		bbackupd.conf
+MAN8+=		bbackupd.8 bbackupctl.8 bbackupd-config.8 bbackupquery.8
+SUB_FILES+=	999.boxbackup
 .else
 PLIST_SUB+=	CLIENT="@comment "
 .endif
@@ -66,6 +69,8 @@
 PLIST_SUB+=	SERVER=""
 ALL_TARGET+=	build-backup-server
 INSTALL_TARGET+=install-backup-server
+MAN5+=		bbstored.conf raidfile.conf
+MAN8+=		bbstored.8 bbstoreaccounts.8 bbstored-certs.8 bbstored-config.8 raidfile-config.8
 .else
 PLIST_SUB+=	SERVER="@comment "
 .endif
@@ -73,10 +78,10 @@
 CONFLICTS=	boxbackup-server-[0-9]* boxbackup-client-[0-9]*
 .if defined(WITHOUT_CLIENT)
 CONFLICTS=	boxbackup-client-[0-9]*
-PKGNAMESUFFIX=	-server
+CLIENT_OR_SERVER=-server
 .elif defined(WITHOUT_SERVER)
 CONFLICTS=	boxbackup-server-[0-9]*
-PKGNAMESUFFIX=	-client
+CLIENT_OR_SERVER=-client
 .endif
 
 post-patch:
@@ -93,6 +98,19 @@
 		${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
 .endif
 
+do-install:
+	@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
+.if !defined(WITHOUT_CLIENT)
+	@${MKDIR} ${PREFIX}/etc/periodic/monthly; \
+	 ${INSTALL_SCRIPT} ${WRKDIR}/999.boxbackup ${PREFIX}/etc/periodic/monthly
+.endif
+.for manpage in ${MAN5}
+	@${INSTALL_MAN} ${WRKSRC}/documentation/${manpage} ${PREFIX}/man/man5
+.endfor
+.for manpage in ${MAN8}
+	@${INSTALL_MAN} ${WRKSRC}/documentation/${manpage} ${PREFIX}/man/man8
+.endfor
+
 post-install:
 .if !defined(WITHOUT_CLIENT)
 	@${MKDIR} -m 0700 ${PREFIX}/etc/box/bbackupd

Added: box/james/FreeBSD/files/999.boxbackup.in
===================================================================
--- box/james/FreeBSD/files/999.boxbackup.in	                        (rev 0)
+++ box/james/FreeBSD/files/999.boxbackup.in	2008-10-01 12:37:21 UTC (rev 2308)
@@ -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 occured
+		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

Modified: box/james/FreeBSD/files/pkg-message.client
===================================================================
--- box/james/FreeBSD/files/pkg-message.client	2008-09-30 23:36:52 UTC (rev 2307)
+++ box/james/FreeBSD/files/pkg-message.client	2008-10-01 12:37:21 UTC (rev 2308)
@@ -1,4 +1,15 @@
 
 To run bbackupd at startup, add bbackupd_enable="YES" to /etc/rc.conf
-Please see http://www.fluffy.co.uk/boxbackup/client.html for client
-configuration options
+Please read bbackupd-config(8) and bbackupd.conf(5) for client configuration
+options.
+
+If you wish to run an automatic store compare every month, add
+monthly_boxbackup_compare_enable="YES" to /etc/periodic.conf.
+By default this runs a quick compare. To change this, set
+monthly_boxbackup_compare_args as appropriate in /etc/periodic.conf.
+See bbackupquery(8).
+
+Warning: The monthly periodic script will cause the monthly periodic(8) run to
+take much longer than usual, depending on the size of your backup store. Please
+read the comments in the script if you wish to run this as a separate job.
+

Modified: box/james/FreeBSD/files/pkg-message.server
===================================================================
--- box/james/FreeBSD/files/pkg-message.server	2008-09-30 23:36:52 UTC (rev 2307)
+++ box/james/FreeBSD/files/pkg-message.server	2008-10-01 12:37:21 UTC (rev 2308)
@@ -1,4 +1,4 @@
 
 To run bbstored at startup, add bbstored_enable="YES" to /etc/rc.conf
-Please see http://www.fluffy.co.uk/boxbackup/server.html for server
-configuration options
+Please read bbstored-config(8) and bbstored.conf(5) for server configuration
+options.

Modified: box/james/FreeBSD/pkg-plist
===================================================================
--- box/james/FreeBSD/pkg-plist	2008-09-30 23:36:52 UTC (rev 2307)
+++ box/james/FreeBSD/pkg-plist	2008-10-01 12:37:21 UTC (rev 2308)
@@ -1,14 +1,18 @@
-%%CLIENT%%bin/bbackupctl
-%%CLIENT%%bin/bbackupd
-%%CLIENT%%bin/bbackupd-config
-%%CLIENT%%bin/bbackupquery
-%%SERVER%%bin/bbstoreaccounts
-%%SERVER%%bin/bbstored
-%%SERVER%%bin/bbstored-certs
-%%SERVER%%bin/bbstored-config
-%%SERVER%%bin/raidfile-config
+%%CLIENT%%sbin/bbackupctl
+%%CLIENT%%sbin/bbackupd
+%%CLIENT%%sbin/bbackupd-config
+%%CLIENT%%sbin/bbackupquery
+%%CLIENT%%etc/periodic/monthly/999.boxbackup
+%%SERVER%%sbin/bbstoreaccounts
+%%SERVER%%sbin/bbstored
+%%SERVER%%sbin/bbstored-certs
+%%SERVER%%sbin/bbstored-config
+%%SERVER%%sbin/raidfile-config
 %%CLIENT%%@exec mkdir -p -m 0700 %D/etc/box/bbackupd
 %%SERVER%%@exec mkdir -p -m 0700 %D/etc/box/bbstored
+%%CLIENT%%@exec mkdir -p -m 0755 %D/etc/periodic/monthly
 %%CLIENT%%@dirrmtry etc/box/bbackupd
 %%SERVER%%@dirrmtry etc/box/bbstored
+%%CLIENT%%@dirrmtry etc/periodic/monthly
+%%CLIENT%%@dirrmtry etc/periodic
 @dirrmtry etc/box




More information about the Boxbackup-commit mailing list