Index: Makefile =================================================================== RCS file: /home/ncvs/ports/sysutils/boxbackup/Makefile,v retrieving revision 1.17 diff -u -r1.17 Makefile --- Makefile 4 Dec 2010 07:33:33 -0000 1.17 +++ Makefile 2 Aug 2011 20:43:49 -0000 @@ -6,10 +6,10 @@ # PORTNAME= boxbackup -PORTVERSION= 0.10 -PORTREVISION= 2 +PORTVERSION= 0.11.1 CATEGORIES= sysutils MASTER_SITES= SF +PKGNAMESUFFIX= ${CLIENT_OR_SERVER} EXTRACT_SUFX= .tgz MAINTAINER= james@netinertia.co.uk @@ -21,17 +21,18 @@ USE_AUTOTOOLS= autoconf aclocal autoheader ACLOCAL_ARGS+= -I ${WRKSRC}/infrastructure/m4 +# Box now defaults to /etc for configuration. Linux devs make me sad. +# Override this. +CONFIGURE_ARGS+=--sysconfdir=${PREFIX}/etc + PKGMESSAGE= ${WRKDIR}/pkg-message OPTIONS= CLIENT "Install the bbackupd client" On \ SERVER "Install the bbstored server" On \ - GNUREADLINE "Enable the use of GNU readline" Off \ - TESTS "Allows use of a 'test' target to run tests" Off + GNUREADLINE "Enable the use of GNU readline" Off .include -TARGETOS!= ${ECHO_CMD} `${UNAME} -s``${UNAME} -r | ${SED} -e 's/[-(].*//'` | ${TR} A-Z a-z - .if defined(WITH_GNUREADLINE) CONFIGURE_ARGS+=--enable-gnu-readline .endif @@ -41,55 +42,42 @@ Please 'make config' again .endif -.if defined(WITHOUT_CLIENT) -PLIST_SUB+= CLIENT="@comment " -.else -USE_RC_SUBR+= bbackupd.sh +MANCOMPRESSED= yes +.if defined(WITH_CLIENT) +USE_RC_SUBR+= bbackupd PLIST_SUB+= CLIENT="" -ALL_TARGET+= parcels/${DISTNAME}-backup-client-${TARGETOS}.tgz +ALL_TARGET+= build-backup-client INSTALL_TARGET+=install-backup-client +MAN5+= bbackupd.conf.5 +MAN8+= bbackupd.8 bbackupctl.8 bbackupd-config.8 bbackupquery.8 +SUB_FILES+= 999.boxbackup +.else +PLIST_SUB+= CLIENT="@comment " .endif -.if defined(WITHOUT_SERVER) -PLIST_SUB+= SERVER="@comment " -.else -USE_RC_SUBR+= bbstored.sh +.if defined(WITH_SERVER) +USE_RC_SUBR+= bbstored +USERS+= _bbstored +GROUPS+= _bbstored PLIST_SUB+= SERVER="" -ALL_TARGET+= parcels/${DISTNAME}-backup-server-${TARGETOS}.tgz +ALL_TARGET+= build-backup-server INSTALL_TARGET+=install-backup-server +MAN5+= bbstored.conf.5 raidfile.conf.5 +MAN8+= bbstored.8 bbstoreaccounts.8 bbstored-certs.8 bbstored-config.8 raidfile-config.8 +.else +PLIST_SUB+= SERVER="@comment " .endif 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: -# Replace hard-coded /etc/box with $PREFIX/etc/box - @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' \ - ${WRKSRC}/lib/common/BoxPortsAndFiles.h -# Fix path to perl - @${FIND} ${WRKSRC} -name "*.pl" -exec \ - ${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},g' {} \; - @${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},g' \ - ${WRKSRC}/bin/bbackupd/bbackupd-config \ - ${WRKSRC}/bin/bbstored/bbstored-certs \ - ${WRKSRC}/bin/bbstored/bbstored-config \ - ${WRKSRC}/lib/raidfile/raidfile-config - @${FIND} ${WRKSRC} -name "Makefile.extra" -exec \ - ${REINPLACE_CMD} -e 's,perl,${PERL},g' {} \; - @${REINPLACE_CMD} -e 's,perl ,${PERL} ,g' \ - ${WRKSRC}/test/bbackupd/testfiles/bbackupd.conf \ - ${WRKSRC}/infrastructure/makebuildenv.pl - @${REINPLACE_CMD} -e 's,"perl ,PERL_EXECUTABLE " ,g' \ - ${WRKSRC}/test/backupstorefix/testbackupstorefix.cpp -# Fix hard-coded g++ - @${REINPLACE_CMD} -e 's,g++,${CXX},' \ - ${WRKSRC}/infrastructure/makebuildenv.pl .if !defined(WITHOUT_CLIENT) @${CAT} ${FILESDIR}/pkg-message.client >> ${PKGMESSAGE} .endif @@ -97,10 +85,11 @@ @${CAT} ${FILESDIR}/pkg-message.server >> ${PKGMESSAGE} .endif -.if !defined(WITHOUT_SERVER) -pre-install: - @${SETENV} PKG_PREFIX=${PREFIX} \ - ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL +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 post-install: @@ -112,10 +101,8 @@ .endif @${CAT} ${PKGMESSAGE} -.if defined(WITH_TESTS) test: @${ECHO_CMD} "===> Running tests" @${MAKE} -C ${WRKSRC} test -.endif .include Index: distinfo =================================================================== RCS file: /home/ncvs/ports/sysutils/boxbackup/distinfo,v retrieving revision 1.4 diff -u -r1.4 distinfo --- distinfo 19 Mar 2011 12:32:01 -0000 1.4 +++ distinfo 2 Aug 2011 20:04:11 -0000 @@ -1,2 +1,2 @@ -SHA256 (boxbackup-0.10.tgz) = 09e88f4ee26b76b3d6e6a0cf3fc374e55d79dd84e9884dfc6a7635593862d361 -SIZE (boxbackup-0.10.tgz) = 842450 +SHA256 (boxbackup-0.11.1.tgz) = 1328b010477259c4767276dbfebab6580e883336cc9d25696c39991b09cc6d32 +SIZE (boxbackup-0.11.1.tgz) = 1863270 Index: pkg-deinstall =================================================================== RCS file: pkg-deinstall diff -N pkg-deinstall --- pkg-deinstall 24 Mar 2006 19:31:14 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,69 +0,0 @@ -#! /bin/sh -# -# ex:ts=4 - -ask() { - local question default answer - - question=$1 - default=$2 - if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then - read -p "${question} [${default}]? " answer - fi - echo ${answer:-${default}} -} - -yesno() { - local question default answer - - question=$1 - default=$2 - while :; do - answer=$(ask "${question}" "${default}") - case "${answer}" in - [Yy]*) return 0;; - [Nn]*) return 1;; - esac - echo "Please answer yes or no." - done -} - -delete_account() { - local u pw - - u=$1 - pw=`pw usershow ${u} >/dev/null 2>&1` - if [ $? -eq 0 ]; then - if yesno "Do you want me to remove user \"${u}\"" n; then - pw userdel -n ${u} - echo "Done." - fi - fi -} - -case $2 in - -DEINSTALL) - if ps -axc | grep -qw bbstored; then - if yesno "bbstored is still running. Shall I stop it?" y; then - killall bbstored - sleep 2 - else - echo "OK ... I hope you know what you are doing." - fi - fi - - if ps -axc | grep -qw bbackupd; then - if yesno "bbackupd is still running. Shall I stop it?" y; then - killall bbackupd - sleep 2 - else - echo "OK ... I hope you know what you are doing." - fi - fi - - delete_account _bbstored - - ;; - -esac Index: pkg-descr =================================================================== RCS file: /home/ncvs/ports/sysutils/boxbackup/pkg-descr,v retrieving revision 1.1 diff -u -r1.1 pkg-descr --- pkg-descr 25 Feb 2005 09:09:51 -0000 1.1 +++ pkg-descr 2 Aug 2011 20:04:54 -0000 @@ -10,4 +10,4 @@ Once set up, there should be no need for user or administrative intervention, apart from usual system maintenance. -WWW: http://www.fluffy.co.uk/boxbackup/ +WWW: http://www.boxbackup.org/ Index: pkg-install =================================================================== RCS file: pkg-install diff -N pkg-install --- pkg-install 24 Mar 2006 19:31:14 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,36 +0,0 @@ -#!/bin/sh - -# $FreeBSD: ports/sysutils/boxbackup/pkg-install,v 1.3 2006/03/24 19:31:14 mnag Exp $ - -case $2 in -PRE-INSTALL) - USER=_bbstored - GROUP=${USER} - UID=505 - GID=${UID} - - if pw group show "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if pw groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi - fi - - if pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - else - if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d /nonexistent -c "Box Backup Store Daemon" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi - ;; -esac Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/sysutils/boxbackup/pkg-plist,v retrieving revision 1.3 diff -u -r1.3 pkg-plist --- pkg-plist 24 Mar 2006 19:31:14 -0000 1.3 +++ pkg-plist 2 Aug 2011 20:18:41 -0000 @@ -1,12 +1,12 @@ -%%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 +%%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%%@dirrmtry etc/box/bbackupd Index: files/999.boxbackup.in =================================================================== RCS file: files/999.boxbackup.in diff -N files/999.boxbackup.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/999.boxbackup.in 2 Aug 2011 20:15:24 -0000 @@ -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 Index: files/bbackupd.in =================================================================== RCS file: files/bbackupd.in diff -N files/bbackupd.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/bbackupd.in 27 Mar 2010 00:14:53 -0000 @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD: ports/sysutils/boxbackup/files/bbackupd.sh.in,v 1.3 2010/03/27 00:14:53 dougb Exp $ +# +# PROVIDE: bbackupd +# REQUIRE: NETWORKING +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable bbackupd: +# +#bbackupd_enable="YES" +# + +: ${bbackupd_enable:="NO"} +: ${bbackupd_flags:="%%PREFIX%%/etc/box/bbackupd.conf"} +: ${bbackupd_pidfile:="/var/run/bbackupd.pid"} + +. /etc/rc.subr + +name="bbackupd" +rcvar=`set_rcvar` +command="%%PREFIX%%/bin/bbackupd" +extra_commands="reload" + +load_rc_config $name +run_rc_command "$1" Index: files/bbackupd.sh.in =================================================================== RCS file: files/bbackupd.sh.in diff -N files/bbackupd.sh.in --- files/bbackupd.sh.in 27 Mar 2010 00:14:53 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,27 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/sysutils/boxbackup/files/bbackupd.sh.in,v 1.3 2010/03/27 00:14:53 dougb Exp $ -# -# PROVIDE: bbackupd -# REQUIRE: NETWORKING -# KEYWORD: shutdown - -# -# Add the following line to /etc/rc.conf to enable bbackupd: -# -#bbackupd_enable="YES" -# - -: ${bbackupd_enable:="NO"} -: ${bbackupd_flags:="%%PREFIX%%/etc/box/bbackupd.conf"} -: ${bbackupd_pidfile:="/var/run/bbackupd.pid"} - -. /etc/rc.subr - -name="bbackupd" -rcvar=`set_rcvar` -command="%%PREFIX%%/bin/bbackupd" -extra_commands="reload" - -load_rc_config $name -run_rc_command "$1" Index: files/bbstored.in =================================================================== RCS file: files/bbstored.in diff -N files/bbstored.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/bbstored.in 27 Mar 2010 00:14:53 -0000 @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD: ports/sysutils/boxbackup/files/bbstored.sh.in,v 1.3 2010/03/27 00:14:53 dougb Exp $ +# +# PROVIDE: bbstored +# REQUIRE: NETWORKING +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable bbstored: +# +#bbstored_enable="YES" +# + +: ${bbstored_enable:="NO"} +: ${bbstored_flags:="%%PREFIX%%/etc/box/bbstored.conf"} +: ${bbstored_pidfile:="/var/run/bbstored.pid"} + +. /etc/rc.subr + +name="bbstored" +rcvar=`set_rcvar` +command="%%PREFIX%%/bin/bbstored" +extra_commands="reload" + +load_rc_config $name +run_rc_command "$1" Index: files/bbstored.sh.in =================================================================== RCS file: files/bbstored.sh.in diff -N files/bbstored.sh.in --- files/bbstored.sh.in 27 Mar 2010 00:14:53 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,27 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/sysutils/boxbackup/files/bbstored.sh.in,v 1.3 2010/03/27 00:14:53 dougb Exp $ -# -# PROVIDE: bbstored -# REQUIRE: NETWORKING -# KEYWORD: shutdown - -# -# Add the following line to /etc/rc.conf to enable bbstored: -# -#bbstored_enable="YES" -# - -: ${bbstored_enable:="NO"} -: ${bbstored_flags:="%%PREFIX%%/etc/box/bbstored.conf"} -: ${bbstored_pidfile:="/var/run/bbstored.pid"} - -. /etc/rc.subr - -name="bbstored" -rcvar=`set_rcvar` -command="%%PREFIX%%/bin/bbstored" -extra_commands="reload" - -load_rc_config $name -run_rc_command "$1" Index: files/patch-configure.ac =================================================================== RCS file: files/patch-configure.ac diff -N files/patch-configure.ac --- files/patch-configure.ac 15 May 2006 01:37:46 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,35 +0,0 @@ ---- configure.ac.orig Thu Mar 16 22:26:39 2006 -+++ configure.ac Thu Mar 16 22:28:31 2006 -@@ -2,7 +2,7 @@ - # Process this file with autoconf to produce a configure script. - - AC_PREREQ(2.59) --AC_INIT([Box Backup], 0.09, [box@fluffy.co.uk]) -+AC_INIT([Box Backup], 0.10, [box@fluffy.co.uk]) - AC_CONFIG_SRCDIR([lib/common/Box.h]) - AC_CONFIG_HEADERS([lib/common/BoxConfig.h]) - -@@ -26,6 +26,12 @@ - # Use -rdynamic if we have gcc. This is needed for backtrace - AC_SUBST([LDADD_RDYNAMIC], ['-rdynamic']) - fi -+AC_PATH_PROG([PERL], [perl], [no]) -+if test "x$PERL" != "xno"; then -+ AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["$PERL"], [Location of the perl executable]) -+else -+ AC_MSG_ERROR([[perl executable was not found]]) -+fi - - - ### Checks for libraries. -@@ -208,8 +214,8 @@ - - # Configure the Box build system - echo --perl ./infrastructure/makebuildenv.pl && -- perl ./infrastructure/makeparcels.pl -+$PERL ./infrastructure/makebuildenv.pl && -+ $PERL ./infrastructure/makeparcels.pl - - # Write summary of important info - cat <