Date: Mon, 20 Mar 2006 21:43:13 +0000 From: "James O'Gorman" <james@netinertia.co.uk> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/94752: [Maintainer] Update sysutils/boxbackup to 0.10 Message-ID: <E1FLS9h-000NeZ-R5@starbug.netinertia.co.uk> Resent-Message-ID: <200603202150.k2KLoECo031250@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 94752 >Category: ports >Synopsis: [Maintainer] Update sysutils/boxbackup to 0.10 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Mon Mar 20 21:50:14 GMT 2006 >Closed-Date: >Last-Modified: >Originator: James O'Gorman >Release: FreeBSD 6.0-RELEASE-p4 i386 >Organization: >Environment: System: FreeBSD starbug.netinertia.co.uk 6.0-RELEASE-p4 FreeBSD 6.0-RELEASE-p4 #5: Thu Feb 16 20:57:38 GMT 2006 root@starbug.netinertia.co.uk:/usr/obj/usr/src/sys/STARBUG i386 >Description: - Update to 0.10 - Add pkg-deinstall - Remove files/patch-infrastrcture-BoxPlatform.pm >How-To-Repeat: >Fix: --- boxbackup.diff begins here --- diff -urN boxbackup.orig/Makefile boxbackup/Makefile --- boxbackup.orig/Makefile Mon Mar 20 21:34:24 2006 +++ boxbackup/Makefile Mon Mar 20 21:29:34 2006 @@ -6,7 +6,7 @@ # PORTNAME= boxbackup -PORTVERSION= 0.09 +PORTVERSION= 0.10 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -16,19 +16,28 @@ COMMENT= An open source, completely automatic on-line backup system for UNIX USE_OPENSSL= yes -HAS_CONFIGURE= yes -CONFIGURE_ARGS= openssl:${OPENSSLBASE} +GNU_CONFIGURE= yes USE_REINPLACE= yes USE_PERL5= yes +USE_AUTOTOOLS= autoconf:259 aclocal:19 autoheader:259 +ACLOCAL_ARGS+= -I ${WRKSRC}/infrastructure/m4 PKGMESSAGE= ${WRKDIR}/pkg-message OPTIONS= CLIENT "Install the bbackupd client" On \ SERVER "Install the bbstored server" On \ - TESTS "Allows use of a 'check' target to run tests" Off + GNUREADLINE "Enable the use of GNU readline" Off \ + TESTS "Allows use of a 'test' target to run tests" Off .include <bsd.port.pre.mk> +TARGETOS!= ${ECHO_CMD} `${UNAME} -s``${UNAME} -r | ${SED} -e 's/[-(].*//'` | ${TR} A-Z a-z + +.if defined(WITH_GNUREADLINE) +CONFIGURE_ARGS+=--enable-gnu-readline +NO_PACKAGE= GNU GPL prevents distributing binaries linked against GNU readline +.endif + .if defined(WITHOUT_CLIENT) && defined(WITHOUT_SERVER) IGNORE= requires at least CLIENT or SERVER to be defined.\ Please \`make config\` again @@ -39,7 +48,7 @@ .else USE_RC_SUBR+= bbackupd.sh PLIST_SUB+= CLIENT="" -ALL_TARGET+= parcels/${DISTNAME}-backup-client-FreeBSD.tgz +ALL_TARGET+= parcels/${DISTNAME}-backup-client-${TARGETOS}.tgz INSTALL_TARGET+=install-backup-client .endif @@ -48,26 +57,38 @@ .else USE_RC_SUBR+= bbstored.sh PLIST_SUB+= SERVER="" -ALL_TARGET+= parcels/${DISTNAME}-backup-server-FreeBSD.tgz +ALL_TARGET+= parcels/${DISTNAME}-backup-server-${TARGETOS}.tgz INSTALL_TARGET+=install-backup-server .endif CONFLICTS= boxbackup-server-[0-9]* boxbackup-client-[0-9]* .if defined(WITHOUT_CLIENT) -CONFLICTS= boxbackup[0-9]* +CONFLICTS= boxbackup-client-[0-9]* PKGNAMESUFFIX= -server .elif defined(WITHOUT_SERVER) -CONFLICTS= boxbackup[0-9]* +CONFLICTS= boxbackup-server-[0-9]* PKGNAMESUFFIX= -client .endif post-patch: - @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/infrastructure/BoxPlatform.pm - @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/lib/common/BoxPortsAndFiles.h +# 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, perl , ${PERL} ,' \ + @${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 .if !defined(WITHOUT_CLIENT) @${CAT} ${FILESDIR}/pkg-message.client >> ${PKGMESSAGE} .endif @@ -78,7 +99,7 @@ .if !defined(WITHOUT_SERVER) pre-install: @${SETENV} PKG_PREFIX=${PREFIX} \ - ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL .endif post-install: @@ -91,7 +112,7 @@ @${CAT} ${PKGMESSAGE} .if defined(WITH_TESTS) -check: +test: @${ECHO_CMD} "===> Running tests" @${MAKE} -C ${WRKSRC} test .endif diff -urN boxbackup.orig/distinfo boxbackup/distinfo --- boxbackup.orig/distinfo Mon Mar 20 21:34:24 2006 +++ boxbackup/distinfo Mon Mar 20 21:29:35 2006 @@ -1,3 +1,3 @@ -MD5 (boxbackup-0.09.tgz) = b4fced539ed72855383f25609de9e6da -SHA256 (boxbackup-0.09.tgz) = e77ecb2514c976a8e59e7588bb9bf3d09a4d1b612748b1b63ef532f1c43f1e86 -SIZE (boxbackup-0.09.tgz) = 505088 +MD5 (boxbackup-0.10.tgz) = 2dc02d87932fdb222ed019443ddcf444 +SHA256 (boxbackup-0.10.tgz) = 09e88f4ee26b76b3d6e6a0cf3fc374e55d79dd84e9884dfc6a7635593862d361 +SIZE (boxbackup-0.10.tgz) = 842450 diff -urN boxbackup.orig/files/patch-configure.ac boxbackup/files/patch-configure.ac --- boxbackup.orig/files/patch-configure.ac Thu Jan 1 01:00:00 1970 +++ boxbackup/files/patch-configure.ac Mon Mar 20 21:29:34 2006 @@ -0,0 +1,35 @@ +--- 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 <<EOC diff -urN boxbackup.orig/files/patch-infrastrcture-BoxPlatform.pm boxbackup/files/patch-infrastrcture-BoxPlatform.pm --- boxbackup.orig/files/patch-infrastrcture-BoxPlatform.pm Mon Mar 20 21:34:24 2006 +++ boxbackup/files/patch-infrastrcture-BoxPlatform.pm Thu Jan 1 01:00:00 1970 @@ -1,11 +0,0 @@ ---- infrastructure/BoxPlatform.pm.orig Sat Jan 8 13:27:12 2005 -+++ infrastructure/BoxPlatform.pm Sat Jan 8 13:27:33 2005 -@@ -78,7 +78,7 @@ - close VERSION; - - # where to put the files -- $install_into_dir = '/usr/local/bin'; -+ $install_into_dir = '%%PREFIX%%/bin'; - - # if it's Darwin, - if($build_os eq 'Darwin') diff -urN boxbackup.orig/files/patch-lib-common-BoxPortsAndFiles.h boxbackup/files/patch-lib-common-BoxPortsAndFiles.h --- boxbackup.orig/files/patch-lib-common-BoxPortsAndFiles.h Mon Mar 20 21:34:24 2006 +++ boxbackup/files/patch-lib-common-BoxPortsAndFiles.h Mon Mar 20 21:29:34 2006 @@ -1,6 +1,6 @@ ---- lib/common/BoxPortsAndFiles.h.orig Sat Jan 8 13:30:04 2005 -+++ lib/common/BoxPortsAndFiles.h Sat Jan 8 13:31:40 2005 -@@ -54,16 +54,16 @@ +--- lib/common/BoxPortsAndFiles.h.orig Thu Mar 16 19:28:09 2006 ++++ lib/common/BoxPortsAndFiles.h Thu Mar 16 19:28:38 2006 +@@ -53,7 +53,7 @@ // Backup store daemon #define BOX_PORT_BBSTORED (BOX_PORT_BASE+1) @@ -9,14 +9,17 @@ // directory within the RAIDFILE root for the backup store daemon #define BOX_RAIDFILE_ROOT_BBSTORED "backup" - // Backup client daemon +@@ -61,11 +61,11 @@ + #ifdef WIN32 + #define BOX_FILE_BBACKUPD_DEFAULT_CONFIG "C:\\Program Files\\Box Backup\\bbackupd.conf" + #else -#define BOX_FILE_BBACKUPD_DEFAULT_CONFIG "/etc/box/bbackupd.conf" +#define BOX_FILE_BBACKUPD_DEFAULT_CONFIG "%%PREFIX%%/etc/box/bbackupd.conf" + #endif - - // RaidFile conf location efault + // RaidFile conf location default -#define BOX_FILE_RAIDFILE_DEFAULT_CONFIG "/etc/box/raidfile.conf" +#define BOX_FILE_RAIDFILE_DEFAULT_CONFIG "%%PREFIX%%/etc/box/raidfile.conf" - - #endif // BOXPORTSANDFILES__H + // Default name of the named pipe + #define BOX_NAMED_PIPE_NAME L"\\\\.\\pipe\\boxbackup" diff -urN boxbackup.orig/pkg-deinstall boxbackup/pkg-deinstall --- boxbackup.orig/pkg-deinstall Thu Jan 1 01:00:00 1970 +++ boxbackup/pkg-deinstall Mon Mar 20 21:29:35 2006 @@ -0,0 +1,69 @@ +#! /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 diff -urN boxbackup.orig/pkg-install boxbackup/pkg-install --- boxbackup.orig/pkg-install Mon Mar 20 21:34:24 2006 +++ boxbackup/pkg-install Mon Mar 20 21:29:34 2006 @@ -24,7 +24,7 @@ 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 "BoxBackup Store Daemon" + -d /nonexistent -c "Box Backup Store Daemon" then echo "Added user \"${USER}\"." else diff -urN boxbackup.orig/pkg-plist boxbackup/pkg-plist --- boxbackup.orig/pkg-plist Mon Mar 20 21:34:24 2006 +++ boxbackup/pkg-plist Mon Mar 20 21:29:35 2006 @@ -9,6 +9,6 @@ %%SERVER%%bin/raidfile-config %%CLIENT%%@exec mkdir -p -m 0700 %D/etc/box/bbackupd %%SERVER%%@exec mkdir -p -m 0700 %D/etc/box/bbstored -%%CLIENT%%@dirrm etc/box/bbackupd -%%SERVER%%@dirrm etc/box/bbstored -@dirrm etc/box +%%CLIENT%%@dirrmtry etc/box/bbackupd +%%SERVER%%@dirrmtry etc/box/bbstored +@dirrmtry etc/box --- boxbackup.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1FLS9h-000NeZ-R5>