From boxbackup-dev at fluffy.co.uk Fri Feb 1 00:54:19 2008 From: boxbackup-dev at fluffy.co.uk (boxbackup-dev at fluffy.co.uk) Date: Fri, 1 Feb 2008 00:54:19 +0000 (UTC) Subject: [Box Backup-commit] COMMIT r2086 - box/trunk Message-ID: <20080201005419.50E053269E8@www.boxbackup.org> Author: chris Date: 2008-02-01 00:54:18 +0000 (Fri, 01 Feb 2008) New Revision: 2086 Modified: box/trunk/runtest.pl.in Log: Add help text on test failures, thanks to Stuart Hickinbottom. Modified: box/trunk/runtest.pl.in =================================================================== --- box/trunk/runtest.pl.in 2008-01-31 23:57:14 UTC (rev 2085) +++ box/trunk/runtest.pl.in 2008-02-01 00:54:18 UTC (rev 2086) @@ -71,6 +71,26 @@ # report results print "--------\n",join("\n", at results),"\n"; +if ($exit_code != 0) +{ + print <<__E; + +One or more tests have failed. Please check the following common causes: + +* Check that no instances of bbstored or bbackupd are already running + on this machine. +* Make sure there isn't a firewall blocking incoming or outgoing connections + on port 2201. +* Check that there is sufficient space in the filesystem that the tests + are being run from (at least 1 GB free). +* The backupdiff test fails if it takes too long, so it's sensitive to + the speed of the host and your connection to it. + +After checking all the above, if you still have problems please contact +us on the mailing list, boxbackup at fluffy.co.uk. Thanks! +__E +} + exit $exit_code; sub runtest From boxbackup-dev at fluffy.co.uk Fri Feb 1 01:01:40 2008 From: boxbackup-dev at fluffy.co.uk (boxbackup-dev at fluffy.co.uk) Date: Fri, 1 Feb 2008 01:01:40 +0000 (UTC) Subject: [Box Backup-commit] COMMIT r2087 - box/trunk Message-ID: <20080201010140.4F4623269E8@www.boxbackup.org> Author: chris Date: 2008-02-01 01:01:39 +0000 (Fri, 01 Feb 2008) New Revision: 2087 Modified: box/trunk/runtest.pl.in Log: Compile fix to [2086]. Modified: box/trunk/runtest.pl.in =================================================================== --- box/trunk/runtest.pl.in 2008-02-01 00:54:18 UTC (rev 2086) +++ box/trunk/runtest.pl.in 2008-02-01 01:01:39 UTC (rev 2087) @@ -87,7 +87,7 @@ the speed of the host and your connection to it. After checking all the above, if you still have problems please contact -us on the mailing list, boxbackup at fluffy.co.uk. Thanks! +us on the mailing list, boxbackup\@fluffy.co.uk. Thanks! __E } From boxbackup-dev at fluffy.co.uk Tue Feb 5 23:20:58 2008 From: boxbackup-dev at fluffy.co.uk (boxbackup-dev at fluffy.co.uk) Date: Tue, 5 Feb 2008 23:20:58 +0000 (UTC) Subject: [Box Backup-commit] COMMIT r2088 - box/chris/general/bin/bbstoreaccounts Message-ID: <20080205232058.1AA023269D7@www.boxbackup.org> Author: chris Date: 2008-02-05 23:20:57 +0000 (Tue, 05 Feb 2008) New Revision: 2088 Modified: box/chris/general/bin/bbstoreaccounts/bbstoreaccounts.cpp Log: Use streams rather than printf to format block counts and size in MB. Modified: box/chris/general/bin/bbstoreaccounts/bbstoreaccounts.cpp =================================================================== --- box/chris/general/bin/bbstoreaccounts/bbstoreaccounts.cpp 2008-02-01 01:01:39 UTC (rev 2087) +++ box/chris/general/bin/bbstoreaccounts/bbstoreaccounts.cpp 2008-02-05 23:20:57 UTC (rev 2088) @@ -62,22 +62,16 @@ return controller.GetDiscSet(DiscSet).GetBlockSize(); } -const char *BlockSizeToString(int64_t Blocks, int DiscSet) +std::string BlockSizeToString(int64_t Blocks, int DiscSet) { - // Not reentrant, nor can be used in the same function call twice, etc. - static char string[256]; - // Work out size in Mb. double mb = (Blocks * BlockSizeOfDiscSet(DiscSet)) / (1024.0*1024.0); // Format string -#ifdef WIN32 - sprintf(string, "%I64d (%.2fMb)", Blocks, mb); -#else - sprintf(string, "%lld (%.2fMb)", Blocks, mb); -#endif - - return string; + std::ostringstream buf; + buf << Blocks << " blocks " << std::fixed << std::setprecision(2) << + std::showpoint << "(" << mb << " MB)"; + return buf.str(); } int64_t SizeStringToBlocks(const char *string, int DiscSet) @@ -231,12 +225,12 @@ // Then print out lots of info printf(" Account ID: %08x\n", ID); printf(" Last object ID: %lld\n", info->GetLastObjectIDUsed()); - printf(" Blocks used: %s\n", BlockSizeToString(info->GetBlocksUsed(), discSet)); - printf(" Blocks used by old files: %s\n", BlockSizeToString(info->GetBlocksInOldFiles(), discSet)); - printf("Blocks used by deleted files: %s\n", BlockSizeToString(info->GetBlocksInDeletedFiles(), discSet)); - printf(" Blocks used by directories: %s\n", BlockSizeToString(info->GetBlocksInDirectories(), discSet)); - printf(" Block soft limit: %s\n", BlockSizeToString(info->GetBlocksSoftLimit(), discSet)); - printf(" Block hard limit: %s\n", BlockSizeToString(info->GetBlocksHardLimit(), discSet)); + printf(" Blocks used: %s\n", BlockSizeToString(info->GetBlocksUsed(), discSet).c_str()); + printf(" Blocks used by old files: %s\n", BlockSizeToString(info->GetBlocksInOldFiles(), discSet).c_str()); + printf("Blocks used by deleted files: %s\n", BlockSizeToString(info->GetBlocksInDeletedFiles(), discSet).c_str()); + printf(" Blocks used by directories: %s\n", BlockSizeToString(info->GetBlocksInDirectories(), discSet).c_str()); + printf(" Block soft limit: %s\n", BlockSizeToString(info->GetBlocksSoftLimit(), discSet).c_str()); + printf(" Block hard limit: %s\n", BlockSizeToString(info->GetBlocksHardLimit(), discSet).c_str()); printf(" Client store marker: %lld\n", info->GetClientStoreMarker()); return 0; From boxbackup-dev at fluffy.co.uk Tue Feb 5 23:34:14 2008 From: boxbackup-dev at fluffy.co.uk (boxbackup-dev at fluffy.co.uk) Date: Tue, 5 Feb 2008 23:34:14 +0000 (UTC) Subject: [Box Backup-commit] COMMIT r2089 - box/chris/general/bin/bbstoreaccounts Message-ID: <20080205233414.5ABE53269D7@www.boxbackup.org> Author: chris Date: 2008-02-05 23:34:14 +0000 (Tue, 05 Feb 2008) New Revision: 2089 Modified: box/chris/general/bin/bbstoreaccounts/bbstoreaccounts.cpp Log: Add list of commands and arguments to usage output. Modified: box/chris/general/bin/bbstoreaccounts/bbstoreaccounts.cpp =================================================================== --- box/chris/general/bin/bbstoreaccounts/bbstoreaccounts.cpp 2008-02-05 23:20:57 UTC (rev 2088) +++ box/chris/general/bin/bbstoreaccounts/bbstoreaccounts.cpp 2008-02-05 23:34:14 UTC (rev 2089) @@ -112,7 +112,7 @@ default: BOX_FATAL(string << " has an invalid units specifier " - "(use B for blocks, M for Mb, G for Gb, eg 2Gb)"); + "(use B for blocks, M for MB, G for GB, eg 2GB)"); exit(1); break; } @@ -403,8 +403,32 @@ void PrintUsageAndExit() { - printf("Usage: bbstoreaccounts [-c config_file] action account_id [args]\nAccount ID is integer specified in hex\n"); - exit(1); + printf( +"Usage: bbstoreaccounts [-c config_file] action account_id [args]\n" +"Account ID is integer specified in hex\n" +"\n" +"Commands (and arguments):\n" +" create \n" +" Creates the specified account number (in hex with no 0x) on the\n" +" specified raidfile disc set number (see raidfile.conf for valid\n" +" set numbers) with the specified soft and hard limits (in blocks\n" +" if suffixed with B, MB with M, GB with G)\n" +" info \n" +" Prints information about the specified account including number\n" +" of blocks used.\n" +" setlimit \n" +" Changes the limits of the account as specified. Numbers are\n" +" interpreted as for the 'create' command (suffixed with B, M or G)\n" +" delete [yes]\n" +" Deletes the specified account. Prompts for confirmation unless\n" +" the optional 'yes' parameter is provided.\n" +" check [fix] [quiet]\n" +" Checks the specified account for errors. If the 'fix' option is\n" +" provided, any errors discovered that can be fixed automatically\n" +" will be fixed. If the 'quiet' option is provided, less output is\n" +" produced.\n" + ); + exit(2); } int main(int argc, const char *argv[]) From boxbackup-dev at fluffy.co.uk Thu Feb 7 17:37:01 2008 From: boxbackup-dev at fluffy.co.uk (boxbackup-dev at fluffy.co.uk) Date: Thu, 7 Feb 2008 17:37:01 +0000 (UTC) Subject: [Box Backup-commit] COMMIT r2090 - box/trunk/lib/server Message-ID: <20080207173701.760BD3269D7@www.boxbackup.org> Author: chris Date: 2008-02-07 17:37:00 +0000 (Thu, 07 Feb 2008) New Revision: 2090 Modified: box/trunk/lib/server/SSLLib.cpp box/trunk/lib/server/SSLLib.h box/trunk/lib/server/SocketStreamTLS.cpp box/trunk/lib/server/TLSContext.cpp Log: Improve error messages when loading SSL key files fails. Modified: box/trunk/lib/server/SSLLib.cpp =================================================================== --- box/trunk/lib/server/SSLLib.cpp 2008-02-05 23:34:14 UTC (rev 2089) +++ box/trunk/lib/server/SSLLib.cpp 2008-02-07 17:37:00 UTC (rev 2090) @@ -63,14 +63,14 @@ // Created: 2003/08/06 // // -------------------------------------------------------------------------- -void SSLLib::LogError(const char *ErrorDuringAction) +void SSLLib::LogError(const std::string& rErrorDuringAction) { unsigned long errcode; char errname[256]; // SSL docs say at least 120 bytes while((errcode = ERR_get_error()) != 0) { ::ERR_error_string_n(errcode, errname, sizeof(errname)); - BOX_ERROR("SSL error during " << ErrorDuringAction << ": " << + BOX_ERROR("SSL error while " << rErrorDuringAction << ": " << errname); } } Modified: box/trunk/lib/server/SSLLib.h =================================================================== --- box/trunk/lib/server/SSLLib.h 2008-02-05 23:34:14 UTC (rev 2089) +++ box/trunk/lib/server/SSLLib.h 2008-02-07 17:37:00 UTC (rev 2090) @@ -29,7 +29,7 @@ namespace SSLLib { void Initialise(); - void LogError(const char *ErrorDuringAction); + void LogError(const std::string& rErrorDuringAction); }; #endif // SSLLIB__H Modified: box/trunk/lib/server/SocketStreamTLS.cpp =================================================================== --- box/trunk/lib/server/SocketStreamTLS.cpp 2008-02-05 23:34:14 UTC (rev 2089) +++ box/trunk/lib/server/SocketStreamTLS.cpp 2008-02-07 17:37:00 UTC (rev 2090) @@ -123,7 +123,7 @@ mpBIO = ::BIO_new(::BIO_s_socket()); if(mpBIO == 0) { - SSLLib::LogError("Create socket bio"); + SSLLib::LogError("creating socket bio"); THROW_EXCEPTION(ServerException, TLSAllocationFailed) } @@ -134,7 +134,7 @@ mpSSL = ::SSL_new(rContext.GetRawContext()); if(mpSSL == 0) { - SSLLib::LogError("Create ssl"); + SSLLib::LogError("creating SSL object"); THROW_EXCEPTION(ServerException, TLSAllocationFailed) } @@ -202,12 +202,12 @@ // Error occured if(IsServer) { - SSLLib::LogError("Accept"); + SSLLib::LogError("accepting connection"); THROW_EXCEPTION(ConnectionException, Conn_TLSHandshakeFailed) } else { - SSLLib::LogError("Connect"); + SSLLib::LogError("connecting"); THROW_EXCEPTION(ConnectionException, Conn_TLSHandshakeFailed) } } @@ -334,7 +334,7 @@ break; default: - SSLLib::LogError("Read"); + SSLLib::LogError("reading"); THROW_EXCEPTION(ConnectionException, Conn_TLSReadFailed) break; } @@ -399,7 +399,7 @@ break; default: - SSLLib::LogError("Write"); + SSLLib::LogError("writing"); THROW_EXCEPTION(ConnectionException, Conn_TLSWriteFailed) break; } @@ -441,7 +441,7 @@ if(::SSL_shutdown(mpSSL) < 0) { - SSLLib::LogError("Shutdown"); + SSLLib::LogError("shutting down"); THROW_EXCEPTION(ConnectionException, Conn_TLSShutdownFailed) } Modified: box/trunk/lib/server/TLSContext.cpp =================================================================== --- box/trunk/lib/server/TLSContext.cpp 2008-02-05 23:34:14 UTC (rev 2089) +++ box/trunk/lib/server/TLSContext.cpp 2008-02-07 17:37:00 UTC (rev 2090) @@ -75,19 +75,25 @@ // Setup our identity if(::SSL_CTX_use_certificate_chain_file(mpContext, CertificatesFile) != 1) { - SSLLib::LogError("Load certificates"); + std::string msg = "loading certificates from "; + msg += CertificatesFile; + SSLLib::LogError(msg); THROW_EXCEPTION(ServerException, TLSLoadCertificatesFailed) } if(::SSL_CTX_use_PrivateKey_file(mpContext, PrivateKeyFile, SSL_FILETYPE_PEM) != 1) { - SSLLib::LogError("Load private key"); + std::string msg = "loading private key from "; + msg += PrivateKeyFile; + SSLLib::LogError(msg); THROW_EXCEPTION(ServerException, TLSLoadPrivateKeyFailed) } // Setup the identify of CAs we trust if(::SSL_CTX_load_verify_locations(mpContext, TrustedCAsFile, NULL) != 1) { - SSLLib::LogError("Load CA cert"); + std::string msg = "loading CA cert from "; + msg += TrustedCAsFile; + SSLLib::LogError(msg); THROW_EXCEPTION(ServerException, TLSLoadTrustedCAsFailed) } @@ -99,7 +105,7 @@ // Setup allowed ciphers if(::SSL_CTX_set_cipher_list(mpContext, CIPHER_LIST) != 1) { - SSLLib::LogError("Set cipher list"); + SSLLib::LogError("setting cipher list to " CIPHER_LIST); THROW_EXCEPTION(ServerException, TLSSetCiphersFailed) } } From boxbackup-dev at fluffy.co.uk Tue Feb 12 13:39:08 2008 From: boxbackup-dev at fluffy.co.uk (boxbackup-dev at fluffy.co.uk) Date: Tue, 12 Feb 2008 13:39:08 +0000 (UTC) Subject: [Box Backup-commit] COMMIT r2091 - box/trunk/bin/bbackupd Message-ID: <20080212133908.04195326AA2@www.boxbackup.org> Author: jamesog Date: 2008-02-12 13:39:07 +0000 (Tue, 12 Feb 2008) New Revision: 2091 Modified: box/trunk/bin/bbackupd/bbackupd-config.in Log: Correct typo in the NotifySysadmin.sh generation Modified: box/trunk/bin/bbackupd/bbackupd-config.in =================================================================== --- box/trunk/bin/bbackupd/bbackupd-config.in 2008-02-07 17:37:00 UTC (rev 2090) +++ box/trunk/bin/bbackupd/bbackupd-config.in 2008-02-12 13:39:07 UTC (rev 2091) @@ -227,7 +227,7 @@ SENDTO="$current_username" if [ "\$1" = "" ]; then - echo "Usage: $0 " >&2 + echo "Usage: \$0 " >&2 exit 2 elif [ "\$1" = store-full ]; then $sendmail \$SENDTO < Author: chris Date: 2008-02-22 00:43:16 +0000 (Fri, 22 Feb 2008) New Revision: 2092 Modified: box/trunk/lib/common/Logging.cpp box/trunk/lib/common/Logging.h box/trunk/lib/server/Daemon.cpp Log: Disable -P option and showing PID in Logging on Windows. Modified: box/trunk/lib/common/Logging.cpp =================================================================== --- box/trunk/lib/common/Logging.cpp 2008-02-12 13:39:07 UTC (rev 2091) +++ box/trunk/lib/common/Logging.cpp 2008-02-22 00:43:16 UTC (rev 2092) @@ -182,7 +182,9 @@ bool Console::sShowTime = false; bool Console::sShowTimeMicros = false; bool Console::sShowTag = false; +#ifndef WIN32 bool Console::sShowPID = false; +#endif std::string Console::sTag; void Console::SetTag(const std::string& rTag) @@ -201,10 +203,12 @@ sShowTimeMicros = enabled; } +#ifndef WIN32 void Console::SetShowPID(bool enabled) { sShowPID = enabled; } +#endif bool Console::Log(Log::Level level, const std::string& rFile, int line, std::string& rMessage) @@ -258,19 +262,23 @@ if (sShowTag) { + #ifndef WIN32 if (sShowPID) { buf << "[" << sTag << " " << getpid() << "] "; } else + #endif { buf << "[" << sTag << "] "; } } + #ifndef WIN32 else if (sShowPID) { buf << "[" << getpid() << "] "; } + #endif if (level <= Log::FATAL) { Modified: box/trunk/lib/common/Logging.h =================================================================== --- box/trunk/lib/common/Logging.h 2008-02-12 13:39:07 UTC (rev 2091) +++ box/trunk/lib/common/Logging.h 2008-02-22 00:43:16 UTC (rev 2092) @@ -121,7 +121,9 @@ static bool sShowTimeMicros; static bool sShowTag; static std::string sTag; + #ifndef WIN32 static bool sShowPID; + #endif public: virtual bool Log(Log::Level level, const std::string& rFile, @@ -132,7 +134,9 @@ static void SetTag(const std::string& rTag); static void SetShowTime(bool enabled); static void SetShowTimeMicros(bool enabled); + #ifndef WIN32 static void SetShowPID(bool enabled); + #endif }; // -------------------------------------------------------------------------- Modified: box/trunk/lib/server/Daemon.cpp =================================================================== --- box/trunk/lib/server/Daemon.cpp 2008-02-12 13:39:07 UTC (rev 2091) +++ box/trunk/lib/server/Daemon.cpp 2008-02-22 00:43:16 UTC (rev 2092) @@ -104,9 +104,9 @@ { return "c:" #ifndef WIN32 - "DFk" + "DFkP" #endif - "hPqvVt:TU"; + "hqvVt:TU"; } void Daemon::Usage() @@ -124,8 +124,8 @@ " -D Debugging mode, do not fork, one process only, one client only\n" " -F Do not fork into background, but fork to serve multiple clients\n" " -k Keep console open after fork, keep writing log messages to it\n" + " -P Show process ID (PID) in console output\n" #endif - " -P Show process ID (PID) in console output\n" " -q Run more quietly, reduce verbosity level by one, can repeat\n" " -v Run more verbosely, increase verbosity level by one, can repeat\n" " -V Run at maximum verbosity\n" @@ -183,11 +183,13 @@ } break; + #ifndef WIN32 case 'P': { Console::SetShowPID(true); } break; + #endif case 'q': { From boxbackup-dev at fluffy.co.uk Mon Feb 25 00:48:08 2008 From: boxbackup-dev at fluffy.co.uk (boxbackup-dev at fluffy.co.uk) Date: Mon, 25 Feb 2008 00:48:08 +0000 (UTC) Subject: [Box Backup-commit] COMMIT r2093 - box/trunk/lib/common Message-ID: <20080225004808.20ABF32500D@www.boxbackup.org> Author: chris Date: 2008-02-25 00:48:07 +0000 (Mon, 25 Feb 2008) New Revision: 2093 Modified: box/trunk/lib/common/BoxPlatform.h Log: Don't try to define our own dirfd() macro on platforms where interception is impossible (such as win32) because it's not needed and fails on win32. Modified: box/trunk/lib/common/BoxPlatform.h =================================================================== --- box/trunk/lib/common/BoxPlatform.h 2008-02-22 00:43:16 UTC (rev 2092) +++ box/trunk/lib/common/BoxPlatform.h 2008-02-25 00:48:07 UTC (rev 2093) @@ -165,11 +165,11 @@ #include "emu.h" #endif -// Solaris has no dirfd(x) macro or function, and we need one. -// We cannot define macros with arguments directly using AC_DEFINE, -// so do it here instead of in configure.ac. +// Solaris has no dirfd(x) macro or function, and we need one for +// intercept tests. We cannot define macros with arguments directly +// using AC_DEFINE, so do it here instead of in configure.ac. -#if ! HAVE_DECL_DIRFD +#if ! defined PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE && ! HAVE_DECL_DIRFD #ifdef HAVE_DIR_D_FD #define dirfd(x) (x)->d_fd #elif defined HAVE_DIR_DD_FD From boxbackup-dev at fluffy.co.uk Wed Feb 27 18:50:45 2008 From: boxbackup-dev at fluffy.co.uk (boxbackup-dev at fluffy.co.uk) Date: Wed, 27 Feb 2008 18:50:45 +0000 (UTC) Subject: [Box Backup-commit] COMMIT r2094 - in box/trunk: . bin/bbackupd bin/bbstored contrib/debian contrib/redhat contrib/rpm contrib/solaris contrib/suse documentation infrastructure Message-ID: <20080227185045.E958E32500D@www.boxbackup.org> Author: jamesog Date: 2008-02-27 18:50:44 +0000 (Wed, 27 Feb 2008) New Revision: 2094 Modified: box/trunk/bin/bbackupd/bbackupd-config.in box/trunk/bin/bbstored/bbstored-config.in box/trunk/configure.ac box/trunk/contrib/debian/bbackupd.in box/trunk/contrib/debian/bbstored.in box/trunk/contrib/redhat/bbackupd.in box/trunk/contrib/redhat/bbstored.in box/trunk/contrib/rpm/boxbackup.spec box/trunk/contrib/solaris/bbackupd-smf-method.in box/trunk/contrib/solaris/bbstored-smf-method.in box/trunk/contrib/suse/bbackupd.in box/trunk/contrib/suse/bbstored.in box/trunk/documentation/adminguide.xml box/trunk/infrastructure/BoxPlatform.pm.in Log: * Move all commands from bin to sbin on Unix platforms * Update all associated docs and contributed distribution files Modified: box/trunk/bin/bbackupd/bbackupd-config.in =================================================================== --- box/trunk/bin/bbackupd/bbackupd-config.in 2008-02-25 00:48:07 UTC (rev 2093) +++ box/trunk/bin/bbackupd/bbackupd-config.in 2008-02-27 18:50:44 UTC (rev 2094) @@ -577,7 +577,7 @@ more files will be backed up. You want to know about this. 6) Start the backup daemon with the command - @bindir_expanded@/bbackupd$daemon_args + @sbindir_expanded@/bbackupd$daemon_args in /etc/rc.local, or your local equivalent. Note that bbackupd must run as root. __E Modified: box/trunk/bin/bbstored/bbstored-config.in =================================================================== --- box/trunk/bin/bbstored/bbstored-config.in 2008-02-25 00:48:07 UTC (rev 2093) +++ box/trunk/bin/bbstored/bbstored-config.in 2008-02-27 18:50:44 UTC (rev 2094) @@ -234,7 +234,7 @@ 4) Create accounts with bbstoreaccounts 5) Start the backup store daemon with the command - @bindir_expanded@/bbstored$daemon_args + @sbindir_expanded@/bbstored$daemon_args in /etc/rc.local, or your local equivalent. =================================================================== Modified: box/trunk/configure.ac =================================================================== --- box/trunk/configure.ac 2008-02-25 00:48:07 UTC (rev 2093) +++ box/trunk/configure.ac 2008-02-27 18:50:44 UTC (rev 2094) @@ -279,10 +279,10 @@ saved_exec_prefix=$exec_prefix test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -bindir_expanded=` eval "echo $bindir"` -bindir_expanded=` eval "echo $bindir_expanded"` -sysconfdir_expanded=` eval "echo $sysconfdir"` -localstatedir_expanded=`eval "echo $localstatedir"` +eval bindir_expanded=` eval "echo $bindir"` +eval sbindir_expanded=` eval "echo $sbindir"` +eval sysconfdir_expanded=` eval "echo $sysconfdir"` +eval localstatedir_expanded=`eval "echo $localstatedir"` prefix=$saved_prefix exec_prefix=$saved_exec_prefix AC_SUBST([bindir_expanded sysconfdir_expanded localstatedir_expanded]) Modified: box/trunk/contrib/debian/bbackupd.in =================================================================== --- box/trunk/contrib/debian/bbackupd.in 2008-02-25 00:48:07 UTC (rev 2093) +++ box/trunk/contrib/debian/bbackupd.in 2008-02-27 18:50:44 UTC (rev 2094) @@ -2,7 +2,7 @@ # Start and stop the Box Backup client daemon. -BBACKUPD=@bindir_expanded@/bbackupd +BBACKUPD=@sbindir_expanded@/bbackupd CONFIG=@sysconfdir_expanded@/box/bbackupd.conf PIDFILE=@localstatedir_expanded@/bbackupd.pid Modified: box/trunk/contrib/debian/bbstored.in =================================================================== --- box/trunk/contrib/debian/bbstored.in 2008-02-25 00:48:07 UTC (rev 2093) +++ box/trunk/contrib/debian/bbstored.in 2008-02-27 18:50:44 UTC (rev 2094) @@ -2,7 +2,7 @@ # Start and stop the Box Backup server daemon. -BBSTORED=@bindir_expanded@/bbstored +BBSTORED=@sbindir_expanded@/bbstored CONFIG=@sysconfdir_expanded@/box/bbstored.conf PIDFILE=@localstatedir_expanded@/bbstored.pid Modified: box/trunk/contrib/redhat/bbackupd.in =================================================================== --- box/trunk/contrib/redhat/bbackupd.in 2008-02-25 00:48:07 UTC (rev 2093) +++ box/trunk/contrib/redhat/bbackupd.in 2008-02-27 18:50:44 UTC (rev 2094) @@ -23,7 +23,7 @@ start() { echo -n $"Starting $prog: " - daemon $prog + daemon @sbindir_expanded@/$prog RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog @@ -32,7 +32,7 @@ stop() { echo -n $"Stopping $prog: " - killproc $prog + killproc @sbindir_expanded@/$prog RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog @@ -40,7 +40,7 @@ } rhstatus() { - status $prog + status @sbindir_expanded@/$prog } restart() { @@ -50,7 +50,7 @@ reload() { echo -n $"Reloading $prog configuration: " - killproc $prog -HUP + killproc @sbindir_expanded@/$prog -HUP retval=$? echo return $RETVAL Modified: box/trunk/contrib/redhat/bbstored.in =================================================================== --- box/trunk/contrib/redhat/bbstored.in 2008-02-25 00:48:07 UTC (rev 2093) +++ box/trunk/contrib/redhat/bbstored.in 2008-02-27 18:50:44 UTC (rev 2094) @@ -23,7 +23,7 @@ start() { echo -n $"Starting $prog: " - daemon $prog + daemon @sbindir_expanded@/$prog RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog @@ -32,7 +32,7 @@ stop() { echo -n $"Stopping $prog: " - killproc $prog + killproc @sbindir_expanded@/$prog RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog @@ -40,7 +40,7 @@ } rhstatus() { - status $prog + status @sbindir_expanded@/$prog } restart() { @@ -50,7 +50,7 @@ reload() { echo -n $"Reloading $prog configuration: " - killproc $prog -HUP + killproc @sbindir_expanded@/$prog -HUP retval=$? echo return $RETVAL Modified: box/trunk/contrib/rpm/boxbackup.spec =================================================================== --- box/trunk/contrib/rpm/boxbackup.spec 2008-02-25 00:48:07 UTC (rev 2093) +++ box/trunk/contrib/rpm/boxbackup.spec 2008-02-27 18:50:44 UTC (rev 2094) @@ -39,8 +39,8 @@ Release: 1 License: BSD Group: Applications/Archiving -Packager: Martin Ebourne -URL: http://www.fluffy.co.uk/boxbackup/ +Packager: Martin Ebourne +URL: http://www.boxbackup.org/ Source0: %{ident}.tgz Requires: openssl >= 0.9.7a BuildRoot: %{_tmppath}/%{ident}-%{release}-root @@ -143,7 +143,7 @@ %define server_dir parcels/%{ident}-backup-server-linux-gnu install %{server_dir}/bbstored $RPM_BUILD_ROOT%{_sbindir} install %{server_dir}/bbstoreaccounts $RPM_BUILD_ROOT%{_sbindir} -install %{server_dir}/bbstored-certs $RPM_BUILD_ROOT%{_bindir} +install %{server_dir}/bbstored-certs $RPM_BUILD_ROOT%{_sbindir} install %{server_dir}/bbstored-config $RPM_BUILD_ROOT%{_sbindir} install %{server_dir}/raidfile-config $RPM_BUILD_ROOT%{_sbindir} Modified: box/trunk/contrib/solaris/bbackupd-smf-method.in =================================================================== --- box/trunk/contrib/solaris/bbackupd-smf-method.in 2008-02-25 00:48:07 UTC (rev 2093) +++ box/trunk/contrib/solaris/bbackupd-smf-method.in 2008-02-27 18:50:44 UTC (rev 2094) @@ -5,7 +5,7 @@ # SMF arguments (start and restart [really "refresh"]) 'start') - @bindir_expanded@/bbackupd + @sbindir_expanded@/bbackupd ;; 'restart') Modified: box/trunk/contrib/solaris/bbstored-smf-method.in =================================================================== --- box/trunk/contrib/solaris/bbstored-smf-method.in 2008-02-25 00:48:07 UTC (rev 2093) +++ box/trunk/contrib/solaris/bbstored-smf-method.in 2008-02-27 18:50:44 UTC (rev 2094) @@ -4,7 +4,7 @@ # SMF arguments (start and restart [really "refresh"]) 'start') - @bindir_expanded@/bbstored + @sbindir_expanded@/bbstored ;; 'restart') Modified: box/trunk/contrib/suse/bbackupd.in =================================================================== --- box/trunk/contrib/suse/bbackupd.in 2008-02-25 00:48:07 UTC (rev 2093) +++ box/trunk/contrib/suse/bbackupd.in 2008-02-27 18:50:44 UTC (rev 2094) @@ -28,7 +28,7 @@ ### END INIT INFO # Check for missing binaries (stale symlinks should not happen) -BBACKUPD_BIN=@bindir_expanded@/bbackupd +BBACKUPD_BIN=@sbindir_expanded@/bbackupd if [ ! -x $BBACKUPD_BIN ] ; then echo "$BBACKUPD_BIN not installed" exit 5 Modified: box/trunk/contrib/suse/bbstored.in =================================================================== --- box/trunk/contrib/suse/bbstored.in 2008-02-25 00:48:07 UTC (rev 2093) +++ box/trunk/contrib/suse/bbstored.in 2008-02-27 18:50:44 UTC (rev 2094) @@ -29,7 +29,7 @@ # # Check for missing binaries (stale symlinks should not happen) -BBSTORED_BIN=@bindir_expanded@/bbstored +BBSTORED_BIN=@sbindir_expanded@/bbstored if [ ! -x $BBSTORED_BIN ] ; then echo "$BBSTORED_BIN not installed" exit 5 Modified: box/trunk/documentation/adminguide.xml =================================================================== --- box/trunk/documentation/adminguide.xml 2008-02-25 00:48:07 UTC (rev 2093) +++ box/trunk/documentation/adminguide.xml 2008-02-27 18:50:44 UTC (rev 2094) @@ -96,11 +96,11 @@ mkdir /tmp/boxbackupRepository # Create the directory chown _bbstored /tmp/boxbackupRepository/ # Change the owner to the new boxbackup daemon user -/usr/local/bin/raidfile-config /etc/box/ 1024 /tmp/boxbackupRepository +/usr/local/sbin/raidfile-config /etc/box/ 1024 /tmp/boxbackupRepository #substitute 1024 with the desired blocksize #substitute /tmp/boxbackupRepository with a directory that exists where you want the backup store located -#/usr/local/bin/raidfile-config --help shows you the options +#/usr/local/sbin/raidfile-config --help shows you the options Then create the configuration file /etc/box/bbstored.conf The hostname is tricky as it is used for two things: The name of the @@ -111,7 +111,7 @@ ListenAddresses directive in the /etc/box/bbstored.conf file. - /usr/local/bin/bbstored-config /etc/box hostname _bbstored + /usr/local/sbin/bbstored-config /etc/box hostname _bbstored This last step outputs 5 instructions that you must execute to the letter. A lot of questions are raised on the mailing list because @@ -164,7 +164,7 @@ To setup the basic key structure, do the following: - /usr/local/bin/bbstored-certs ca init + /usr/local/sbin/bbstored-certs ca init (See OpenSSL notes if you get an OpenSSL error) @@ -181,7 +181,7 @@ request (CSR) for you. Transfer it to the machine with your CA, then do: - /usr/local/bin/bbstored-certs ca sign-server hostname-csr.pem + /usr/local/sbin/bbstored-certs ca sign-server hostname-csr.pem This signs the certificate for the server. Follow the instructions in the output on which files to install on the server. @@ -199,7 +199,7 @@ 0, for example, 1 or 75AB23C. Then on the backup store server, create the account with: - /usr/local/bin/bbstoreaccounts create 75AB23C 0 4096M 4505M + /usr/local/sbin/bbstoreaccounts create 75AB23C 0 4096M 4505M This looks complicated. The numbers are, in order: @@ -261,7 +261,7 @@ Sign this CSR with this command: - /usr/local/bin/bbstored-certs ca sign 75AB23C-csr.pem + /usr/local/sbin/bbstored-certs ca sign 75AB23C-csr.pem Don't forget to check that the embedded account number is correct! Then send the two files back to the user, as instructed by @@ -345,7 +345,7 @@ the configuration files and generate a private key and certificate request. - /usr/local/bin/bbackupd-config /etc/box lazy /usr/local/sbin/bbackupd-config /etc/box lazy 999 hostname /var/bbackupd /home @@ -407,7 +407,7 @@ basic bbackupd configuration. You can then run the daemon (as root) by running - /usr/local/bin/bbackupd, and of course, adding it + /usr/local/sbin/bbackupd, and of course, adding it to your system's startup scripts. The first time it's run it will upload everything. Interrupting it and restarting it will only upload files which were not uploaded before - it's very @@ -517,7 +517,7 @@ here -- they may be different for your system. - /usr/local/bin/bbackupd-config /etc/box lazy 51 server.example.com /var/bbackupd /home /etc/samba + /usr/local/sbin/bbackupd-config /etc/box lazy 51 server.example.com /var/bbackupd /home /etc/samba Setup bbackupd config utility. @@ -579,7 +579,7 @@ more files will be backed up. You want to know about this. 6) Start the backup daemon with the command - /usr/local/bin/bbackupd + /usr/local/sbin/bbackupd in /etc/rc.local, or your local equivalent. Note that bbackupd must run as root. @@ -1304,7 +1304,7 @@ The command line syntax is: - /usr/local/bin/bbackupctl [-q] [-c config-file] command + /usr/local/sbin/bbackupctl [-q] [-c config-file] command The -q option reduces the amount of output the program emits, and -c allows an alternative configuration file to be @@ -1358,7 +1358,7 @@ Use bbackupd-config to write a configuration file in snapshot mode, and then run the following command as a cron job. - /usr/local/bin/bbackupctl -q sync + /usr/local/sbin/bbackupctl -q sync This will cause the backup daemon to upload all changed files immediately. bbackupctl will exit @@ -1376,7 +1376,7 @@ for this account. Either use the usage command in interactive mode, or type: - /usr/local/bin/bbackupquery -q usage quit + /usr/local/sbin/bbackupquery -q usage quit to show the space used as a single command. @@ -1388,11 +1388,11 @@ the limits. To display the space used on the server for an account, use: - /usr/local/bin/bbstoreaccounts info 75AB23C + /usr/local/sbin/bbstoreaccounts info 75AB23C To adjust the soft and hard limits on an account, use: - /usr/local/bin/bbstoreaccounts setlimit 75AB23C new-soft-limit new-hard-limit + /usr/local/sbin/bbstoreaccounts setlimit 75AB23C new-soft-limit new-hard-limit You do not need to restart the server. @@ -1538,7 +1538,7 @@ regularly, and check its output. You can run the command manually as follows: - /usr/local/bin/bbackupquery "compare -a" quit + /usr/local/sbin/bbackupquery "compare -a" quit This command will report all the differences found between the store and the files on disc. It will download everything, so may @@ -1561,7 +1561,7 @@ If you would like to do a "quick" check which just downloads file checksums and compares against that, then run: - /usr/local/bin/bbackupquery "compare -aq" quit + /usr/local/sbin/bbackupquery "compare -aq" quit However, this does not check that the file attributes are correct, and since the checksums are generated on the client they @@ -1595,7 +1595,7 @@ Type: - /usr/local/bin/bbackupquery + /usr/local/sbin/bbackupquery to run it in interactive mode. @@ -1628,7 +1628,7 @@ Firstly, run bbackupquery in interactive mode. It behaves in a similar manner to a command line sftp client. - /usr/local/bin/bbackupquery + /usr/local/sbin/bbackupquery Then navigate to the directory containing the file you want, using list, cd and pwd. @@ -1744,14 +1744,14 @@ First, run the check utility, and see what errors it reports. - /usr/local/bin/bbstoreaccounts check 1234 + /usr/local/sbin/bbstoreaccounts check 1234 This will take some time, and use a fair bit of memory (about 16 bytes per file and directory). If the output looks plausible and reports errors which need fixing, run it again but with the fix flag: - /usr/local/bin/bbstoreaccounts check 1234 fix + /usr/local/sbin/bbstoreaccounts check 1234 fix This will fix any errors, and remove unrecoverable files. Directories will be recreated if necessary. @@ -1841,7 +1841,7 @@ configuration file locations to daemons and programs. For example - /usr/local/bin/bbstored /some/other/dir/bbstored.config /usr/local/bin/bbackupquery -c /some/other/dir/bbackupd.config + /usr/local/sbin/bbstored /some/other/dir/bbstored.config /usr/local/sbin/bbackupquery -c /some/other/dir/bbackupd.config (daemons specify the name as the first argument, utility programs with the -c option). Modified: box/trunk/infrastructure/BoxPlatform.pm.in =================================================================== --- box/trunk/infrastructure/BoxPlatform.pm.in 2008-02-25 00:48:07 UTC (rev 2093) +++ box/trunk/infrastructure/BoxPlatform.pm.in 2008-02-27 18:50:44 UTC (rev 2094) @@ -76,7 +76,7 @@ } # where to put the files - $install_into_dir = '@bindir_expanded@'; + $install_into_dir = '@sbindir_expanded@'; # if it's Darwin, if($build_os eq 'Darwin') From boxbackup-dev at fluffy.co.uk Thu Feb 28 18:08:10 2008 From: boxbackup-dev at fluffy.co.uk (boxbackup-dev at fluffy.co.uk) Date: Thu, 28 Feb 2008 18:08:10 +0000 (UTC) Subject: [Box Backup-commit] COMMIT r2095 - box/trunk Message-ID: <20080228180810.B902832500D@www.boxbackup.org> Author: jamesog Date: 2008-02-28 18:08:06 +0000 (Thu, 28 Feb 2008) New Revision: 2095 Modified: box/trunk/configure.ac Log: Woops, forgot to substitute sbindir_expanded. Modified: box/trunk/configure.ac =================================================================== --- box/trunk/configure.ac 2008-02-27 18:50:44 UTC (rev 2094) +++ box/trunk/configure.ac 2008-02-28 18:08:06 UTC (rev 2095) @@ -285,7 +285,7 @@ eval localstatedir_expanded=`eval "echo $localstatedir"` prefix=$saved_prefix exec_prefix=$saved_exec_prefix -AC_SUBST([bindir_expanded sysconfdir_expanded localstatedir_expanded]) +AC_SUBST([bindir_expanded sbindir_expanded sysconfdir_expanded localstatedir_expanded]) ### Output files