From subversion at boxbackup.org Wed Oct 5 23:05:06 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Wed, 5 Oct 2011 23:05:06 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3003 - box/trunk/docs/api-notes Message-ID: <20111005220506.E21CC19F9E4@www.boxbackup.org> Author: chris Date: 2011-10-05 23:05:06 +0100 (Wed, 05 Oct 2011) New Revision: 3003 Modified: box/trunk/docs/api-notes/win32_build_on_cygwin_using_mingw.txt Log: Update to latest released versions of dependencies. Don't install man pages for openssl, as they're not very useful and it takes forever. Itemise development dependencies and include an editor (vim). Modified: box/trunk/docs/api-notes/win32_build_on_cygwin_using_mingw.txt =================================================================== --- box/trunk/docs/api-notes/win32_build_on_cygwin_using_mingw.txt 2011-09-29 08:50:52 UTC (rev 3002) +++ box/trunk/docs/api-notes/win32_build_on_cygwin_using_mingw.txt 2011-10-05 22:05:06 UTC (rev 3003) @@ -10,6 +10,7 @@ Make sure to select the following packages during installation: + * Archive/unzip * Devel/automake * Devel/autoconf * Devel/gcc-mingw @@ -23,9 +24,12 @@ If you already have Cygwin installed, please re-run the installer and ensure that those packages are installed. -You may also want to install the debugger, Devel/gdb, and the command-line -Subversion client, Devel/subversion. +You may also want to install: + * Devel/gdb (the debugger) + * Devel/subversion (the command-line Subversion client) + * Editors/vim (the Vim text editor) + == Base Directory == Choose a directory where you will unpack and compile OpenSSL, Zlib and @@ -41,18 +45,18 @@ == OpenSSL == -Download OpenSSL from [http://www.openssl.org/source/openssl-1.0.0d.tar.gz] +Download OpenSSL from [http://www.openssl.org/source/openssl-1.0.0e.tar.gz] Open a Cygwin shell, go to the base directory, and unpack OpenSSL: - tar xzvf openssl-1.0.0d.tar.gz + tar xzvf openssl-1.0.0e.tar.gz Configure OpenSSL for MinGW compilation, and build and install it: - cd openssl-1.0.0d + cd openssl-1.0.0e ./Configure --prefix=/usr/i686-pc-mingw32/ mingw make - make install + make install_sw == PCRE == @@ -95,11 +99,12 @@ make -f gccwin32.mak CC="gcc -mno-cygwin" LINK="gcc -mno-cygwin" cp pdcurses.a /usr/i686-pc-mingw32/lib/libpdcurses.a -Download Readline version 6.1 from -[ftp://ftp.cwru.edu/pub/bash/readline-6.1.tar.gz], and unpack +Download Readline version 6.2 from +[ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz], and unpack and install it thus: - tar xzvf readline-6.1.tar.gz + tar xzvf readline-6.2.tar.gz + cd readline-6.2 ./configure --prefix=/usr/i686-pc-mingw32 \ CFLAGS="-mno-cygwin" \ CPPFLAGS="-mno-cygwin" \ From subversion at boxbackup.org Wed Oct 5 23:17:42 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Wed, 5 Oct 2011 23:17:42 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3004 - box/trunk Message-ID: <20111005221742.34B4619FA16@www.boxbackup.org> Author: chris Date: 2011-10-05 23:17:42 +0100 (Wed, 05 Oct 2011) New Revision: 3004 Modified: box/trunk/parcels.txt Log: Update for new names and locations of MinGW and zlib DLLs. Modified: box/trunk/parcels.txt =================================================================== --- box/trunk/parcels.txt 2011-10-05 22:05:06 UTC (rev 3003) +++ box/trunk/parcels.txt 2011-10-05 22:17:42 UTC (rev 3004) @@ -35,8 +35,8 @@ END-ONLY ONLY:mingw32 - script /bin/mgwz.dll - script /bin/mingwm10.dll + script /usr/i686-pc-mingw32/sys-root/mingw/bin/libz-1.dll + script /usr/i686-pc-mingw32/sys-root/mingw/bin/mingwm10.dll END-ONLY ONLY:SunOS From subversion at boxbackup.org Wed Oct 5 23:20:32 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Wed, 5 Oct 2011 23:20:32 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3005 - box/trunk/infrastructure/m4 Message-ID: <20111005222032.5289019FA46@www.boxbackup.org> Author: chris Date: 2011-10-05 23:20:32 +0100 (Wed, 05 Oct 2011) New Revision: 3005 Modified: box/trunk/infrastructure/m4/boxbackup_tests.m4 Log: Skip -rdynamic on cygwin as well as Solaris. Modified: box/trunk/infrastructure/m4/boxbackup_tests.m4 =================================================================== --- box/trunk/infrastructure/m4/boxbackup_tests.m4 2011-10-05 22:17:42 UTC (rev 3004) +++ box/trunk/infrastructure/m4/boxbackup_tests.m4 2011-10-05 22:20:32 UTC (rev 3005) @@ -15,9 +15,10 @@ AC_SUBST([CXXFLAGS_STRICT], ['-Wall -Wundef']) # Don't check for gcc -rdynamic on Solaris as it's broken, but returns 0. + # On Cygwin it does nothing except cause gcc to emit a warning message. case $build_os in - solaris*) - AC_MSG_NOTICE([skipping check for -rdynamic check on Solaris]) + solaris*|cygwin) + AC_MSG_NOTICE([skipping check for -rdynamic check on $build_os]) ;; *) # Check whether gcc supports -rdynamic, thanks to Steve Ellcey From subversion at boxbackup.org Thu Oct 6 00:19:46 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Thu, 6 Oct 2011 00:19:46 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3006 - box/trunk Message-ID: <20111005231946.51FF419FEB5@www.boxbackup.org> Author: chris Date: 2011-10-06 00:19:46 +0100 (Thu, 06 Oct 2011) New Revision: 3006 Modified: box/trunk/parcels.txt Log: Add libgcc.dll to dependencies, required by newer cygwin gcc. Modified: box/trunk/parcels.txt =================================================================== --- box/trunk/parcels.txt 2011-10-05 22:20:32 UTC (rev 3005) +++ box/trunk/parcels.txt 2011-10-05 23:19:46 UTC (rev 3006) @@ -37,6 +37,7 @@ ONLY:mingw32 script /usr/i686-pc-mingw32/sys-root/mingw/bin/libz-1.dll script /usr/i686-pc-mingw32/sys-root/mingw/bin/mingwm10.dll + script /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_dw2-1.dll END-ONLY ONLY:SunOS From subversion at boxbackup.org Thu Oct 6 00:26:52 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Thu, 6 Oct 2011 00:26:52 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3007 - box/chris/win32/releases Message-ID: <20111005232652.5444819FEFE@www.boxbackup.org> Author: chris Date: 2011-10-06 00:26:52 +0100 (Thu, 06 Oct 2011) New Revision: 3007 Added: box/chris/win32/releases/boxbackup-trunk_3005M-backup-client-mingw32.zip Log: Add a new win32 build, to hopefully fix 2GB issues, as requested by Tomasz Nowak. Added: box/chris/win32/releases/boxbackup-trunk_3005M-backup-client-mingw32.zip =================================================================== (Binary files differ) Property changes on: box/chris/win32/releases/boxbackup-trunk_3005M-backup-client-mingw32.zip ___________________________________________________________________ Added: svn:mime-type + application/octet-stream From subversion at boxbackup.org Sat Oct 8 00:21:36 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Sat, 8 Oct 2011 00:21:36 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3008 - box/trunk/infrastructure/m4 Message-ID: <20111007232136.6029A19F813@www.boxbackup.org> Author: chris Date: 2011-10-08 00:21:36 +0100 (Sat, 08 Oct 2011) New Revision: 3008 Modified: box/trunk/infrastructure/m4/boxbackup_tests.m4 Log: Rephrase -rdynamic message. Modified: box/trunk/infrastructure/m4/boxbackup_tests.m4 =================================================================== --- box/trunk/infrastructure/m4/boxbackup_tests.m4 2011-10-05 23:26:52 UTC (rev 3007) +++ box/trunk/infrastructure/m4/boxbackup_tests.m4 2011-10-07 23:21:36 UTC (rev 3008) @@ -18,7 +18,7 @@ # On Cygwin it does nothing except cause gcc to emit a warning message. case $build_os in solaris*|cygwin) - AC_MSG_NOTICE([skipping check for -rdynamic check on $build_os]) + AC_MSG_NOTICE([skipping check for -rdynamic on $build_os]) ;; *) # Check whether gcc supports -rdynamic, thanks to Steve Ellcey From subversion at boxbackup.org Sat Oct 8 13:06:34 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Sat, 8 Oct 2011 13:06:34 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3009 - in box/trunk: infrastructure/m4 lib/win32 Message-ID: <20111008120634.CE88A19E3C5@www.boxbackup.org> Author: chris Date: 2011-10-08 13:06:34 +0100 (Sat, 08 Oct 2011) New Revision: 3009 Modified: box/trunk/infrastructure/m4/boxbackup_tests.m4 box/trunk/infrastructure/m4/vl_lib_readline.m4 box/trunk/lib/win32/emu.h box/trunk/lib/win32/getopt_long.cpp Log: Silence warnings from new MinGW headers that expect __MINGW_FEATURES__ to be defined. Check for fcntl.h and include it if we have it, not just on MSVC, now that MinGW also defines O_BINARY in newer versions. Modified: box/trunk/infrastructure/m4/boxbackup_tests.m4 =================================================================== --- box/trunk/infrastructure/m4/boxbackup_tests.m4 2011-10-07 23:21:36 UTC (rev 3008) +++ box/trunk/infrastructure/m4/boxbackup_tests.m4 2011-10-08 12:06:34 UTC (rev 3009) @@ -126,7 +126,7 @@ AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([dlfcn.h getopt.h process.h pwd.h signal.h]) +AC_CHECK_HEADERS([dlfcn.h fcntl.h getopt.h process.h pwd.h signal.h]) AC_CHECK_HEADERS([syslog.h time.h cxxabi.h]) AC_CHECK_HEADERS([netinet/in.h]) AC_CHECK_HEADERS([sys/file.h sys/param.h sys/socket.h sys/time.h sys/types.h sys/wait.h]) Modified: box/trunk/infrastructure/m4/vl_lib_readline.m4 =================================================================== --- box/trunk/infrastructure/m4/vl_lib_readline.m4 2011-10-07 23:21:36 UTC (rev 3008) +++ box/trunk/infrastructure/m4/vl_lib_readline.m4 2011-10-08 12:06:34 UTC (rev 3009) @@ -91,9 +91,9 @@ dnl VL_LIB_READLINE_CHECK(name, libraries, headers, history headers) AC_DEFUN([VL_LIB_READLINE_CHECK], [ + ORIG_LIBS="$LIBS" AC_CACHE_CHECK([for $1 library], [vl_cv_lib_$1], [ - ORIG_LIBS="$LIBS" vl_cv_lib_$1="" for readline_lib in $2; do for termcap_lib in "" termcap curses ncurses pdcurses; do Modified: box/trunk/lib/win32/emu.h =================================================================== --- box/trunk/lib/win32/emu.h 2011-10-07 23:21:36 UTC (rev 3008) +++ box/trunk/lib/win32/emu.h 2011-10-08 12:06:34 UTC (rev 3009) @@ -15,6 +15,11 @@ #if ! defined EMU_INCLUDE && defined WIN32 #define EMU_INCLUDE +// Shut up stupid new warnings. Thanks MinGW! Ever heard of "compatibility"? +#ifdef __MINGW32__ +# define __MINGW_FEATURES__ 0 +#endif + // basic types, may be required by other headers since we // don't include sys/types.h Modified: box/trunk/lib/win32/getopt_long.cpp =================================================================== --- box/trunk/lib/win32/getopt_long.cpp 2011-10-07 23:21:36 UTC (rev 3008) +++ box/trunk/lib/win32/getopt_long.cpp 2011-10-08 12:06:34 UTC (rev 3009) @@ -58,6 +58,7 @@ */ // #include "Box.h" +#include "emu.h" #include #include From subversion at boxbackup.org Sat Oct 8 13:37:31 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Sat, 8 Oct 2011 13:37:31 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3010 - box/trunk/bin/bbackupquery Message-ID: <20111008123731.A52C919E453@www.boxbackup.org> Author: chris Date: 2011-10-08 13:37:31 +0100 (Sat, 08 Oct 2011) New Revision: 3010 Modified: box/trunk/bin/bbackupquery/bbackupquery.cpp Log: Only advertise -E option if readline support is built in. Modified: box/trunk/bin/bbackupquery/bbackupquery.cpp =================================================================== --- box/trunk/bin/bbackupquery/bbackupquery.cpp 2011-10-08 12:06:34 UTC (rev 3009) +++ box/trunk/bin/bbackupquery/bbackupquery.cpp 2011-10-08 12:37:31 UTC (rev 3010) @@ -74,7 +74,8 @@ " -w Read/write mode, allow changes to store\n" #ifdef WIN32 " -u Enable Unicode console, requires font change to Lucida Console\n" -#else // !WIN32 +#endif +#ifdef HAVE_LIBREADLINE " -E Disable interactive command editing, may fix entering intl chars\n" #endif " -c Use the specified configuration file. If -c is omitted, the last\n" From subversion at boxbackup.org Sat Oct 8 13:41:28 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Sat, 8 Oct 2011 13:41:28 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3011 - in box/trunk/lib: common win32 Message-ID: <20111008124128.AFEA019E48D@www.boxbackup.org> Author: chris Date: 2011-10-08 13:41:28 +0100 (Sat, 08 Oct 2011) New Revision: 3011 Modified: box/trunk/lib/common/BoxConfig-MSVC.h box/trunk/lib/win32/emu.h Log: Recent Cygwin versions of MinGW now define O_BINARY as well, also in fcntl.h, so include it if we can find it, and only define O_BINARY if it turns out to be missing. Modified: box/trunk/lib/common/BoxConfig-MSVC.h =================================================================== --- box/trunk/lib/common/BoxConfig-MSVC.h 2011-10-08 12:37:31 UTC (rev 3010) +++ box/trunk/lib/common/BoxConfig-MSVC.h 2011-10-08 12:41:28 UTC (rev 3011) @@ -76,6 +76,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_EXECINFO_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + /* Define to 1 if you have the `flock' function. */ /* #undef HAVE_FLOCK */ Modified: box/trunk/lib/win32/emu.h =================================================================== --- box/trunk/lib/win32/emu.h 2011-10-08 12:37:31 UTC (rev 3010) +++ box/trunk/lib/win32/emu.h 2011-10-08 12:41:28 UTC (rev 3011) @@ -15,6 +15,9 @@ #if ! defined EMU_INCLUDE && defined WIN32 #define EMU_INCLUDE +// Need feature detection macros below +#include "../common/BoxConfig.h" + // Shut up stupid new warnings. Thanks MinGW! Ever heard of "compatibility"? #ifdef __MINGW32__ # define __MINGW_FEATURES__ 0 @@ -450,7 +453,7 @@ // note: chsize() doesn't work over 2GB: // [https://stat.ethz.ch/pipermail/r-devel/2005-May/033339.html] #ifndef HAVE_FTRUNCATE - int ftruncate(int, off_t); + extern "C" int ftruncate(int, off_t); inline int ftruncate(int __fd, off_t __length) { return _chsize(__fd, __length); From subversion at boxbackup.org Sat Oct 8 13:42:06 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Sat, 8 Oct 2011 13:42:06 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3012 - box/trunk/lib/common Message-ID: <20111008124206.8B89C19E4AD@www.boxbackup.org> Author: chris Date: 2011-10-08 13:42:06 +0100 (Sat, 08 Oct 2011) New Revision: 3012 Modified: box/trunk/lib/common/BoxPlatform.h Log: Recent Cygwin versions of MinGW now define O_BINARY as well, also in fcntl.h, so include it if we can find it, and only define O_BINARY if it turns out to be missing. Modified: box/trunk/lib/common/BoxPlatform.h =================================================================== --- box/trunk/lib/common/BoxPlatform.h 2011-10-08 12:41:28 UTC (rev 3011) +++ box/trunk/lib/common/BoxPlatform.h 2011-10-08 12:42:06 UTC (rev 3012) @@ -160,9 +160,11 @@ #endif // Define O_BINARY for Unix compatibility with Windows :-) -// MSVC 2010 defines in in fcntl.h, which is probably not included by this -// point, so include it now so that we can detect if we need O_BINARY -#ifdef _MSC_VER +// MSVC 2010 and newer MinGW define this in fcntl.h, which is probably +// not included by this point, so include it now so that we can detect +// if we need O_BINARY + +#ifdef HAVE_FCNTL_H # include #endif From subversion at boxbackup.org Sun Oct 9 11:43:28 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Sun, 9 Oct 2011 11:43:28 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3013 - box/trunk/infrastructure Message-ID: <20111009104328.3DDC319FFA9@www.boxbackup.org> Author: chris Date: 2011-10-09 11:43:27 +0100 (Sun, 09 Oct 2011) New Revision: 3013 Modified: box/trunk/infrastructure/makebuildenv.pl.in Log: Extra white space. Modified: box/trunk/infrastructure/makebuildenv.pl.in =================================================================== --- box/trunk/infrastructure/makebuildenv.pl.in 2011-10-08 12:42:06 UTC (rev 3012) +++ box/trunk/infrastructure/makebuildenv.pl.in 2011-10-09 10:43:27 UTC (rev 3013) @@ -894,12 +894,14 @@ "-o $end_target $o_file_list " . "@lib_files $lo $platform_lib_files\n"; } + # tests need to copy the test file over if($type eq 'test') { print MAKE "\tcp _t \$(OUTDIR)/t\n\tchmod u+x \$(OUTDIR)/t\n"; print MAKE "\tcp _t-gdb \$(OUTDIR)/t-gdb\n\tchmod u+x \$(OUTDIR)/t-gdb\n"; } + # dependency line? print MAKE "\n"; From subversion at boxbackup.org Sun Oct 9 11:52:04 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Sun, 9 Oct 2011 11:52:04 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3014 - box/trunk/infrastructure/mingw Message-ID: <20111009105204.512DA19F045@www.boxbackup.org> Author: chris Date: 2011-10-09 11:52:04 +0100 (Sun, 09 Oct 2011) New Revision: 3014 Modified: box/trunk/infrastructure/mingw/configure.sh Log: Pass the correct LDFLAGS to Box Backup, to use mingw zlib instead of cygwin, copied from new Boxi config. Thanks to Achim for finding this and testing the fix. Modified: box/trunk/infrastructure/mingw/configure.sh =================================================================== --- box/trunk/infrastructure/mingw/configure.sh 2011-10-09 10:43:27 UTC (rev 3013) +++ box/trunk/infrastructure/mingw/configure.sh 2011-10-09 10:52:04 UTC (rev 3014) @@ -16,14 +16,6 @@ exit 2 fi -export CC="gcc -mno-cygwin" -export CXX="g++ -mno-cygwin" -export LD="g++ -mno-cygwin" -export CFLAGS="-mno-cygwin -mthreads" -export CXXFLAGS="-mno-cygwin -mthreads" -export LDFLAGS="-mno-cygwin -mthreads" -export LIBS="-lcrypto -lws2_32 -lgdi32" - if [ ! -x "configure" ]; then if ! ./bootstrap; then echo "Error: bootstrap failed, aborting." >&2 @@ -31,7 +23,13 @@ fi fi -if ! ./configure --target=i686-pc-mingw32 "$@"; then +if ! ./configure "$@" --target=i686-pc-mingw32 \ + CFLAGS="-mno-cygwin -mthreads" \ + CPPFLAGS="-mno-cygwin" \ + CXXFLAGS="-mno-cygwin -mthreads" \ + LDFLAGS="-mno-cygwin -mthreads -L${DEP_PATH}/lib" \ + LIBS="-lcrypto -lws2_32 -lgdi32" +then echo "Error: configure failed, aborting." >&2 exit 1 fi From subversion at boxbackup.org Sun Oct 9 12:24:45 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Sun, 9 Oct 2011 12:24:45 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3015 - box/trunk/lib/win32 Message-ID: <20111009112445.4268D19F1E9@www.boxbackup.org> Author: chris Date: 2011-10-09 12:24:45 +0100 (Sun, 09 Oct 2011) New Revision: 3015 Added: box/trunk/lib/win32/emu_winver.h Modified: box/trunk/lib/win32/emu.h Log: Split Win32 defines out of emu.h to enable Boxi to include them before wx/wx.h (to set UNICODE properly) without also #including winnt.h before UNICODE is set properly. Modified: box/trunk/lib/win32/emu.h =================================================================== --- box/trunk/lib/win32/emu.h 2011-10-09 10:52:04 UTC (rev 3014) +++ box/trunk/lib/win32/emu.h 2011-10-09 11:24:45 UTC (rev 3015) @@ -1,5 +1,7 @@ // emulates unix syscalls to win32 functions +#include "emu_winver.h" + #ifdef WIN32 #define EMU_STRUCT_STAT struct emu_stat #define EMU_STAT emu_stat @@ -50,39 +52,6 @@ typedef unsigned int pid_t; #endif -// set up to include the necessary parts of Windows headers - -#define WIN32_LEAN_AND_MEAN - -#ifndef __MSVCRT_VERSION__ -#define __MSVCRT_VERSION__ 0x0601 -#endif - -// We need WINVER at least 0x0500 to use GetFileSizeEx on Cygwin/MinGW, -// and 0x0501 for FindFirstFile(W) for opendir/readdir. -// -// WIN32_WINNT versions 0x0600 (Vista) and higher enable WSAPoll() in -// winsock2.h, whose struct pollfd conflicts with ours below, so for -// now we just set it lower than that, to Windows XP (0x0501). - -#ifdef WINVER -# if WINVER != 0x0501 -// provoke a redefinition warning to track down the offender -# define WINVER 0x0501 -# error Must include emu.h before setting WINVER -# endif -#endif -#define WINVER 0x0501 - -#ifdef _WIN32_WINNT -# if _WIN32_WINNT != 0x0501 -// provoke a redefinition warning to track down the offender -# define _WIN32_WINNT 0x0501 -# error Must include emu.h before setting _WIN32_WINNT -# endif -#endif -#define _WIN32_WINNT 0x0501 - // Windows headers #include Copied: box/trunk/lib/win32/emu_winver.h (from rev 3014, box/trunk/lib/win32/emu.h) =================================================================== --- box/trunk/lib/win32/emu_winver.h (rev 0) +++ box/trunk/lib/win32/emu_winver.h 2011-10-09 11:24:45 UTC (rev 3015) @@ -0,0 +1,37 @@ +#ifndef _EMU_WINVER_H +#define _EMU_WINVER_H + +// set up to include the necessary parts of Windows headers + +#define WIN32_LEAN_AND_MEAN + +#ifndef __MSVCRT_VERSION__ +#define __MSVCRT_VERSION__ 0x0601 +#endif + +// We need WINVER at least 0x0500 to use GetFileSizeEx on Cygwin/MinGW, +// and 0x0501 for FindFirstFile(W) for opendir/readdir. +// +// WIN32_WINNT versions 0x0600 (Vista) and higher enable WSAPoll() in +// winsock2.h, whose struct pollfd conflicts with ours below, so for +// now we just set it lower than that, to Windows XP (0x0501). + +#ifdef WINVER +# if WINVER != 0x0501 +// provoke a redefinition warning to track down the offender +# define WINVER 0x0501 +# error Must include emu.h before setting WINVER +# endif +#endif +#define WINVER 0x0501 + +#ifdef _WIN32_WINNT +# if _WIN32_WINNT != 0x0501 +// provoke a redefinition warning to track down the offender +# define _WIN32_WINNT 0x0501 +# error Must include emu.h before setting _WIN32_WINNT +# endif +#endif +#define _WIN32_WINNT 0x0501 + +#endif // _EMU_WINVER_H From subversion at boxbackup.org Sun Oct 9 22:51:22 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Sun, 9 Oct 2011 22:51:22 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3016 - box/trunk/infrastructure/mingw Message-ID: <20111009215122.7EB4D19F9B0@www.boxbackup.org> Author: chris Date: 2011-10-09 22:51:22 +0100 (Sun, 09 Oct 2011) New Revision: 3016 Modified: box/trunk/infrastructure/mingw/configure.sh Log: Check for libz.dll.a installed in new location before configuring for MinGW. Modified: box/trunk/infrastructure/mingw/configure.sh =================================================================== --- box/trunk/infrastructure/mingw/configure.sh 2011-10-09 11:24:45 UTC (rev 3015) +++ box/trunk/infrastructure/mingw/configure.sh 2011-10-09 21:51:22 UTC (rev 3016) @@ -16,6 +16,11 @@ exit 2 fi +if [ ! -r "$DEP_PATH/sys-root/mingw/lib/libz.dll.a" ]; then + echo "Error: upgrade your Cygwin mingw-zlib-devel package" >&2 + exit 2 +fi + if [ ! -x "configure" ]; then if ! ./bootstrap; then echo "Error: bootstrap failed, aborting." >&2 From subversion at boxbackup.org Sun Oct 9 23:16:55 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Sun, 9 Oct 2011 23:16:55 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3017 - box/trunk/infrastructure/mingw Message-ID: <20111009221655.07CFB19FAA5@www.boxbackup.org> Author: chris Date: 2011-10-09 23:16:54 +0100 (Sun, 09 Oct 2011) New Revision: 3017 Modified: box/trunk/infrastructure/mingw/configure.sh Log: Search for libraries in the path where Cygwin installs MinGW zlib as well Modified: box/trunk/infrastructure/mingw/configure.sh =================================================================== --- box/trunk/infrastructure/mingw/configure.sh 2011-10-09 21:51:22 UTC (rev 3016) +++ box/trunk/infrastructure/mingw/configure.sh 2011-10-09 22:16:54 UTC (rev 3017) @@ -16,7 +16,9 @@ exit 2 fi -if [ ! -r "$DEP_PATH/sys-root/mingw/lib/libz.dll.a" ]; then +LIBZ_PATH="${DEP_PATH}/sys-root/mingw/lib" + +if [ ! -r "$LIBZ_PATH/libz.dll.a" ]; then echo "Error: upgrade your Cygwin mingw-zlib-devel package" >&2 exit 2 fi @@ -32,7 +34,7 @@ CFLAGS="-mno-cygwin -mthreads" \ CPPFLAGS="-mno-cygwin" \ CXXFLAGS="-mno-cygwin -mthreads" \ - LDFLAGS="-mno-cygwin -mthreads -L${DEP_PATH}/lib" \ + LDFLAGS="-mno-cygwin -mthreads -L${DEP_PATH}/lib -L${LIBZ_PATH}" \ LIBS="-lcrypto -lws2_32 -lgdi32" then echo "Error: configure failed, aborting." >&2 From subversion at boxbackup.org Sun Oct 9 23:52:00 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Sun, 9 Oct 2011 23:52:00 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3018 - box/trunk/lib/common Message-ID: <20111009225200.6D6C519FD8A@www.boxbackup.org> Author: chris Date: 2011-10-09 23:52:00 +0100 (Sun, 09 Oct 2011) New Revision: 3018 Modified: box/trunk/lib/common/MainHelper.h Log: Log fatal exceptions in main helper using BOX_FATAL instead of printf, to ensure they get logged in all the right places. Modified: box/trunk/lib/common/MainHelper.h =================================================================== --- box/trunk/lib/common/MainHelper.h 2011-10-09 22:16:54 UTC (rev 3017) +++ box/trunk/lib/common/MainHelper.h 2011-10-09 22:52:00 UTC (rev 3018) @@ -13,6 +13,7 @@ #include #include "BoxException.h" +#include "Logging.h" #define MAINHELPER_START \ if(argc == 2 && ::strcmp(argv[1], "--version") == 0) \ @@ -21,15 +22,13 @@ MEMLEAKFINDER_START \ try { #define MAINHELPER_END \ - } catch(BoxException &e) { \ - printf("Exception: %s (%d/%d)\n", e.what(), e.GetType(), e.GetSubType()); \ - return 1; \ } catch(std::exception &e) { \ - printf("Exception: %s\n", e.what()); \ - return 1; \ + BOX_FATAL(e.what()); \ + return 1; \ } catch(...) { \ - printf("Exception: \n"); \ - return 1; } + BOX_FATAL("UNKNOWN"); \ + return 1; \ + } #ifdef BOX_MEMORY_LEAK_TESTING #define MAINHELPER_SETUP_MEMORY_LEAK_EXIT_REPORT(file, marker) \ From subversion at boxbackup.org Tue Oct 11 22:05:43 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Tue, 11 Oct 2011 22:05:43 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3019 - box/trunk/infrastructure/msvc Message-ID: <20111011210543.E34FB19F402@www.boxbackup.org> Author: chris Date: 2011-10-11 22:05:43 +0100 (Tue, 11 Oct 2011) New Revision: 3019 Modified: box/trunk/infrastructure/msvc/getversion.pl Log: Don't die if BoxVersion.h doesn't exist yet. Modified: box/trunk/infrastructure/msvc/getversion.pl =================================================================== --- box/trunk/infrastructure/msvc/getversion.pl 2011-10-09 22:52:00 UTC (rev 3018) +++ box/trunk/infrastructure/msvc/getversion.pl 2011-10-11 21:05:43 UTC (rev 3019) @@ -11,17 +11,21 @@ require "$basedir\\infrastructure\\BoxPlatform.pm.in"; +my $verfile = "$basedir/lib/common/BoxVersion.h"; my $newver = "#define BOX_VERSION \"$BoxPlatform::product_version\"\n"; +my $oldver = ""; -open VERSIONFILE, "< $basedir/lib/common/BoxVersion.h" - or die "BoxVersion.h: $!"; -my $oldver = ; -close VERSIONFILE; +if (-r $verfile) +{ + open VERSIONFILE, "< $verfile" or die "$verfile: $!"; + $oldver = ; + close VERSIONFILE; +} + if ($newver ne $oldver) { - open VERSIONFILE, "> $basedir/lib/common/BoxVersion.h" - or die "BoxVersion.h: $!"; + open VERSIONFILE, "> $verfile" or die "BoxVersion.h: $!"; print VERSIONFILE $newver; close VERSIONFILE; } From subversion at boxbackup.org Tue Oct 11 22:07:33 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Tue, 11 Oct 2011 22:07:33 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3020 - box/trunk Message-ID: <20111011210733.9121819F424@www.boxbackup.org> Author: chris Date: 2011-10-11 22:07:33 +0100 (Tue, 11 Oct 2011) New Revision: 3020 Modified: box/trunk/win32.bat Log: Copy a standard configuration to BoxConfig.h for MSVC users. Modified: box/trunk/win32.bat =================================================================== --- box/trunk/win32.bat 2011-10-11 21:05:43 UTC (rev 3019) +++ box/trunk/win32.bat 2011-10-11 21:07:33 UTC (rev 3020) @@ -5,6 +5,7 @@ copy .\infrastructure\BoxPlatform.pm.in .\infrastructure\BoxPlatform.pm copy .\lib\common\BoxPortsAndFiles.h.in .\lib\common\BoxPortsAndFiles.h +copy .\lib\common\BoxConfig-MSVC.h .\lib\common\BoxConfig.h cd .\bin\bbackupquery\ & perl ./../../bin/bbackupquery/makedocumentation.pl.in cd ..\..\ From subversion at boxbackup.org Tue Oct 11 23:11:54 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Tue, 11 Oct 2011 23:11:54 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3021 - box/trunk/lib/common Message-ID: <20111011221154.9C90219F597@www.boxbackup.org> Author: chris Date: 2011-10-11 23:11:54 +0100 (Tue, 11 Oct 2011) New Revision: 3021 Modified: box/trunk/lib/common/Logging.cpp Log: Fix illegal use of Logging::Add and Logging::Remove while iterating over loggers Modified: box/trunk/lib/common/Logging.cpp =================================================================== --- box/trunk/lib/common/Logging.cpp 2011-10-11 21:07:33 UTC (rev 3020) +++ box/trunk/lib/common/Logging.cpp 2011-10-11 22:11:54 UTC (rev 3021) @@ -469,7 +469,8 @@ } /* avoid infinite loop if this throws an exception */ - Logging::Remove(this); + Log::Level oldLevel = GetLevel(); + Filter(Log::NOTHING); std::ostringstream buf; buf << FormatTime(GetCurrentBoxTime(), true, false); @@ -509,7 +510,8 @@ mLogFile.Write(output.c_str(), output.length()); - Logging::Add(this); + // no infinite loop, reset to saved logging level + Filter(oldLevel); return true; } From subversion at boxbackup.org Tue Oct 11 23:13:56 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Tue, 11 Oct 2011 23:13:56 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3022 - box/chris/win32/pcre/build/vc2010 Message-ID: <20111011221356.8607519F5BC@www.boxbackup.org> Author: chris Date: 2011-10-11 23:13:56 +0100 (Tue, 11 Oct 2011) New Revision: 3022 Removed: box/chris/win32/pcre/build/vc2010/config.h box/chris/win32/pcre/build/vc2010/pcre.h Log: Remove pcre.h and config.h, they are version-sensitive and should be copied from the .generic versions in the pcre directory instead. Deleted: box/chris/win32/pcre/build/vc2010/config.h =================================================================== --- box/chris/win32/pcre/build/vc2010/config.h 2011-10-11 22:11:54 UTC (rev 3021) +++ box/chris/win32/pcre/build/vc2010/config.h 2011-10-11 22:13:56 UTC (rev 3022) @@ -1,329 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - - -/* On Unix-like systems config.h.in is converted by "configure" into config.h. -Some other environments also support the use of "configure". PCRE is written in -Standard C, but there are a few non-standard things it can cope with, allowing -it to run on SunOS4 and other "close to standard" systems. - -If you are going to build PCRE "by hand" on a system without "configure" you -should copy the distributed config.h.generic to config.h, and then set up the -macro definitions the way you need them. You must then add -DHAVE_CONFIG_H to -all of your compile commands, so that config.h is included at the start of -every source. - -Alternatively, you can avoid editing by using -D on the compiler command line -to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H. - -PCRE uses memmove() if HAVE_MEMMOVE is set to 1; otherwise it uses bcopy() if -HAVE_BCOPY is set to 1. If your system has neither bcopy() nor memmove(), set -them both to 0; an emulation function will be used. */ - -/* By default, the \R escape sequence matches any Unicode line ending - character or sequence of characters. If BSR_ANYCRLF is defined, this is - changed so that backslash-R matches only CR, LF, or CRLF. The build- time - default can be overridden by the user of PCRE at runtime. On systems that - support it, "configure" can be used to override the default. */ -/* #undef BSR_ANYCRLF */ - -/* If you are compiling for a system that uses EBCDIC instead of ASCII - character codes, define this macro as 1. On systems that can use - "configure", this can be done via --enable-ebcdic. PCRE will then assume - that all input strings are in EBCDIC. If you do not define this macro, PCRE - will assume input strings are ASCII or UTF-8 Unicode. It is not possible to - build a version of PCRE that supports both EBCDIC and UTF-8. */ -/* #undef EBCDIC */ - -/* Define to 1 if you have the `bcopy' function. */ -#ifndef HAVE_BCOPY -#define HAVE_BCOPY 1 -#endif - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BITS_TYPE_TRAITS_H */ - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_BZLIB_H -#define HAVE_BZLIB_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_DIRENT_H -#define HAVE_DIRENT_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_DLFCN_H -#define HAVE_DLFCN_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_INTTYPES_H -#define HAVE_INTTYPES_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_LIMITS_H -#define HAVE_LIMITS_H 1 -#endif - -/* Define to 1 if the system has the type `long long'. */ -#ifndef HAVE_LONG_LONG -#define HAVE_LONG_LONG 1 -#endif - -/* Define to 1 if you have the `memmove' function. */ -#ifndef HAVE_MEMMOVE -#define HAVE_MEMMOVE 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_MEMORY_H -#define HAVE_MEMORY_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_READLINE_HISTORY_H -#define HAVE_READLINE_HISTORY_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_READLINE_READLINE_H -#define HAVE_READLINE_READLINE_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_STDINT_H -#define HAVE_STDINT_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_STDLIB_H -#define HAVE_STDLIB_H 1 -#endif - -/* Define to 1 if you have the `strerror' function. */ -#ifndef HAVE_STRERROR -#define HAVE_STRERROR 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_STRING -#define HAVE_STRING 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_STRINGS_H -#define HAVE_STRINGS_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_STRING_H -#define HAVE_STRING_H 1 -#endif - -/* Define to 1 if you have `strtoimax'. */ -/* #undef HAVE_STRTOIMAX */ - -/* Define to 1 if you have `strtoll'. */ -/* #undef HAVE_STRTOLL */ - -/* Define to 1 if you have `strtoq'. */ -#ifndef HAVE_STRTOQ -#define HAVE_STRTOQ 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_SYS_STAT_H -#define HAVE_SYS_STAT_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_SYS_TYPES_H -#define HAVE_SYS_TYPES_H 1 -#endif - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_TYPE_TRAITS_H */ - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_UNISTD_H -#define HAVE_UNISTD_H 1 -#endif - -/* Define to 1 if the system has the type `unsigned long long'. */ -#ifndef HAVE_UNSIGNED_LONG_LONG -#define HAVE_UNSIGNED_LONG_LONG 1 -#endif - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_WINDOWS_H */ - -/* Define to 1 if you have the header file. */ -#ifndef HAVE_ZLIB_H -#define HAVE_ZLIB_H 1 -#endif - -/* Define to 1 if you have `_strtoi64'. */ -/* #undef HAVE__STRTOI64 */ - -/* The value of LINK_SIZE determines the number of bytes used to store links - as offsets within the compiled regex. The default is 2, which allows for - compiled patterns up to 64K long. This covers the vast majority of cases. - However, PCRE can also be compiled to use 3 or 4 bytes instead. This allows - for longer patterns in extreme cases. On systems that support it, - "configure" can be used to override this default. */ -#ifndef LINK_SIZE -#define LINK_SIZE 2 -#endif - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#ifndef LT_OBJDIR -#define LT_OBJDIR ".libs/" -#endif - -/* The value of MATCH_LIMIT determines the default number of times the - internal match() function can be called during a single execution of - pcre_exec(). There is a runtime interface for setting a different limit. - The limit exists in order to catch runaway regular expressions that take - for ever to determine that they do not match. The default is set very large - so that it does not accidentally catch legitimate cases. On systems that - support it, "configure" can be used to override this default default. */ -#ifndef MATCH_LIMIT -#define MATCH_LIMIT 10000000 -#endif - -/* The above limit applies to all calls of match(), whether or not they - increase the recursion depth. In some environments it is desirable to limit - the depth of recursive calls of match() more strictly, in order to restrict - the maximum amount of stack (or heap, if NO_RECURSE is defined) that is - used. The value of MATCH_LIMIT_RECURSION applies only to recursive calls of - match(). To have any useful effect, it must be less than the value of - MATCH_LIMIT. The default is to use the same value as MATCH_LIMIT. There is - a runtime method for setting a different limit. On systems that support it, - "configure" can be used to override the default. */ -#ifndef MATCH_LIMIT_RECURSION -#define MATCH_LIMIT_RECURSION MATCH_LIMIT -#endif - -/* This limit is parameterized just in case anybody ever wants to change it. - Care must be taken if it is increased, because it guards against integer - overflow caused by enormously large patterns. */ -#ifndef MAX_NAME_COUNT -#define MAX_NAME_COUNT 10000 -#endif - -/* This limit is parameterized just in case anybody ever wants to change it. - Care must be taken if it is increased, because it guards against integer - overflow caused by enormously large patterns. */ -#ifndef MAX_NAME_SIZE -#define MAX_NAME_SIZE 32 -#endif - -/* The value of NEWLINE determines the newline character sequence. On systems - that support it, "configure" can be used to override the default, which is - 10. The possible values are 10 (LF), 13 (CR), 3338 (CRLF), -1 (ANY), or -2 - (ANYCRLF). */ -#ifndef NEWLINE -#define NEWLINE 10 -#endif - -/* PCRE uses recursive function calls to handle backtracking while matching. - This can sometimes be a problem on systems that have stacks of limited - size. Define NO_RECURSE to get a version that doesn't use recursion in the - match() function; instead it creates its own stack by steam using - pcre_recurse_malloc() to obtain memory from the heap. For more detail, see - the comments and other stuff just above the match() function. On systems - that support it, "configure" can be used to set this in the Makefile (use - --disable-stack-for-recursion). */ -/* #undef NO_RECURSE */ - -/* Name of package */ -#define PACKAGE "pcre" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "PCRE" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "PCRE 8.12" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "pcre" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "8.12" - - -/* If you are compiling for a system other than a Unix-like system or - Win32, and it needs some magic to be inserted before the definition - of a function that is exported by the library, define this macro to - contain the relevant magic. If you do not define this macro, it - defaults to "extern" for a C compiler and "extern C" for a C++ - compiler on non-Win32 systems. This macro apears at the start of - every exported function that is part of the external API. It does - not appear on functions that are "external" in the C sense, but - which are internal to the library. */ -/* #undef PCRE_EXP_DEFN */ - -/* Define if linking statically (TODO: make nice with Libtool) */ -/* #undef PCRE_STATIC */ - -/* When calling PCRE via the POSIX interface, additional working storage is - required for holding the pointers to capturing substrings because PCRE - requires three integers per substring, whereas the POSIX interface provides - only two. If the number of expected substrings is small, the wrapper - function uses space on the stack, because this is faster than using - malloc() for each call. The threshold above which the stack is no longer - used is defined by POSIX_MALLOC_THRESHOLD. On systems that support it, - "configure" can be used to override this default. */ -#ifndef POSIX_MALLOC_THRESHOLD -#define POSIX_MALLOC_THRESHOLD 10 -#endif - -/* Define to 1 if you have the ANSI C header files. */ -#ifndef STDC_HEADERS -#define STDC_HEADERS 1 -#endif - -/* Define to allow pcregrep to be linked with libbz2, so that it is able to - handle .bz2 files. */ -/* #undef SUPPORT_LIBBZ2 */ - -/* Define to allow pcretest to be linked with libreadline. */ -/* #undef SUPPORT_LIBREADLINE */ - -/* Define to allow pcregrep to be linked with libz, so that it is able to - handle .gz files. */ -/* #undef SUPPORT_LIBZ */ - -/* Define to enable support for Unicode properties */ -/* #undef SUPPORT_UCP */ - -/* Define to enable support for the UTF-8 Unicode encoding. This will work - even in an EBCDIC environment, but it is incompatible with the EBCDIC - macro. That is, PCRE can support *either* EBCDIC code *or* ASCII/UTF-8, but - not both at once. */ -/* #undef SUPPORT_UTF8 */ - -/* Version number of package */ -#ifndef VERSION -#define VERSION "8.12" -#endif - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to the type of a signed integer type of width exactly 64 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int64_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ Deleted: box/chris/win32/pcre/build/vc2010/pcre.h =================================================================== --- box/chris/win32/pcre/build/vc2010/pcre.h 2011-10-11 22:11:54 UTC (rev 3021) +++ box/chris/win32/pcre/build/vc2010/pcre.h 2011-10-11 22:13:56 UTC (rev 3022) @@ -1,318 +0,0 @@ -/************************************************* -* Perl-Compatible Regular Expressions * -*************************************************/ - -/* This is the public header file for the PCRE library, to be #included by -applications that call the PCRE functions. - - Copyright (c) 1997-2010 University of Cambridge - ------------------------------------------------------------------------------ -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the University of Cambridge nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------ -*/ - -#ifndef _PCRE_H -#define _PCRE_H - -/* The current PCRE version information. */ - -#define PCRE_MAJOR 8 -#define PCRE_MINOR 12 -#define PCRE_PRERELEASE -#define PCRE_DATE 2011-01-15 - -/* When an application links to a PCRE DLL in Windows, the symbols that are -imported have to be identified as such. When building PCRE, the appropriate -export setting is defined in pcre_internal.h, which includes this file. So we -don't change existing definitions of PCRE_EXP_DECL and PCRECPP_EXP_DECL. */ - -#if defined(_WIN32) && !defined(PCRE_STATIC) -# ifndef PCRE_EXP_DECL -# define PCRE_EXP_DECL extern __declspec(dllimport) -# endif -# ifdef __cplusplus -# ifndef PCRECPP_EXP_DECL -# define PCRECPP_EXP_DECL extern __declspec(dllimport) -# endif -# ifndef PCRECPP_EXP_DEFN -# define PCRECPP_EXP_DEFN __declspec(dllimport) -# endif -# endif -#endif - -/* By default, we use the standard "extern" declarations. */ - -#ifndef PCRE_EXP_DECL -# ifdef __cplusplus -# define PCRE_EXP_DECL extern "C" -# else -# define PCRE_EXP_DECL extern -# endif -#endif - -#ifdef __cplusplus -# ifndef PCRECPP_EXP_DECL -# define PCRECPP_EXP_DECL extern -# endif -# ifndef PCRECPP_EXP_DEFN -# define PCRECPP_EXP_DEFN -# endif -#endif - -/* Have to include stdlib.h in order to ensure that size_t is defined; -it is needed here for malloc. */ - -#include - -/* Allow for C++ users */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* Options. Some are compile-time only, some are run-time only, and some are -both, so we keep them all distinct. However, almost all the bits in the options -word are now used. In the long run, we may have to re-use some of the -compile-time only bits for runtime options, or vice versa. */ - -#define PCRE_CASELESS 0x00000001 /* Compile */ -#define PCRE_MULTILINE 0x00000002 /* Compile */ -#define PCRE_DOTALL 0x00000004 /* Compile */ -#define PCRE_EXTENDED 0x00000008 /* Compile */ -#define PCRE_ANCHORED 0x00000010 /* Compile, exec, DFA exec */ -#define PCRE_DOLLAR_ENDONLY 0x00000020 /* Compile */ -#define PCRE_EXTRA 0x00000040 /* Compile */ -#define PCRE_NOTBOL 0x00000080 /* Exec, DFA exec */ -#define PCRE_NOTEOL 0x00000100 /* Exec, DFA exec */ -#define PCRE_UNGREEDY 0x00000200 /* Compile */ -#define PCRE_NOTEMPTY 0x00000400 /* Exec, DFA exec */ -#define PCRE_UTF8 0x00000800 /* Compile */ -#define PCRE_NO_AUTO_CAPTURE 0x00001000 /* Compile */ -#define PCRE_NO_UTF8_CHECK 0x00002000 /* Compile, exec, DFA exec */ -#define PCRE_AUTO_CALLOUT 0x00004000 /* Compile */ -#define PCRE_PARTIAL_SOFT 0x00008000 /* Exec, DFA exec */ -#define PCRE_PARTIAL 0x00008000 /* Backwards compatible synonym */ -#define PCRE_DFA_SHORTEST 0x00010000 /* DFA exec */ -#define PCRE_DFA_RESTART 0x00020000 /* DFA exec */ -#define PCRE_FIRSTLINE 0x00040000 /* Compile */ -#define PCRE_DUPNAMES 0x00080000 /* Compile */ -#define PCRE_NEWLINE_CR 0x00100000 /* Compile, exec, DFA exec */ -#define PCRE_NEWLINE_LF 0x00200000 /* Compile, exec, DFA exec */ -#define PCRE_NEWLINE_CRLF 0x00300000 /* Compile, exec, DFA exec */ -#define PCRE_NEWLINE_ANY 0x00400000 /* Compile, exec, DFA exec */ -#define PCRE_NEWLINE_ANYCRLF 0x00500000 /* Compile, exec, DFA exec */ -#define PCRE_BSR_ANYCRLF 0x00800000 /* Compile, exec, DFA exec */ -#define PCRE_BSR_UNICODE 0x01000000 /* Compile, exec, DFA exec */ -#define PCRE_JAVASCRIPT_COMPAT 0x02000000 /* Compile */ -#define PCRE_NO_START_OPTIMIZE 0x04000000 /* Compile, exec, DFA exec */ -#define PCRE_NO_START_OPTIMISE 0x04000000 /* Synonym */ -#define PCRE_PARTIAL_HARD 0x08000000 /* Exec, DFA exec */ -#define PCRE_NOTEMPTY_ATSTART 0x10000000 /* Exec, DFA exec */ -#define PCRE_UCP 0x20000000 /* Compile */ - -/* Exec-time and get/set-time error codes */ - -#define PCRE_ERROR_NOMATCH (-1) -#define PCRE_ERROR_NULL (-2) -#define PCRE_ERROR_BADOPTION (-3) -#define PCRE_ERROR_BADMAGIC (-4) -#define PCRE_ERROR_UNKNOWN_OPCODE (-5) -#define PCRE_ERROR_UNKNOWN_NODE (-5) /* For backward compatibility */ -#define PCRE_ERROR_NOMEMORY (-6) -#define PCRE_ERROR_NOSUBSTRING (-7) -#define PCRE_ERROR_MATCHLIMIT (-8) -#define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */ -#define PCRE_ERROR_BADUTF8 (-10) -#define PCRE_ERROR_BADUTF8_OFFSET (-11) -#define PCRE_ERROR_PARTIAL (-12) -#define PCRE_ERROR_BADPARTIAL (-13) -#define PCRE_ERROR_INTERNAL (-14) -#define PCRE_ERROR_BADCOUNT (-15) -#define PCRE_ERROR_DFA_UITEM (-16) -#define PCRE_ERROR_DFA_UCOND (-17) -#define PCRE_ERROR_DFA_UMLIMIT (-18) -#define PCRE_ERROR_DFA_WSSIZE (-19) -#define PCRE_ERROR_DFA_RECURSE (-20) -#define PCRE_ERROR_RECURSIONLIMIT (-21) -#define PCRE_ERROR_NULLWSLIMIT (-22) /* No longer actually used */ -#define PCRE_ERROR_BADNEWLINE (-23) -#define PCRE_ERROR_BADOFFSET (-24) -#define PCRE_ERROR_SHORTUTF8 (-25) - -/* Request types for pcre_fullinfo() */ - -#define PCRE_INFO_OPTIONS 0 -#define PCRE_INFO_SIZE 1 -#define PCRE_INFO_CAPTURECOUNT 2 -#define PCRE_INFO_BACKREFMAX 3 -#define PCRE_INFO_FIRSTBYTE 4 -#define PCRE_INFO_FIRSTCHAR 4 /* For backwards compatibility */ -#define PCRE_INFO_FIRSTTABLE 5 -#define PCRE_INFO_LASTLITERAL 6 -#define PCRE_INFO_NAMEENTRYSIZE 7 -#define PCRE_INFO_NAMECOUNT 8 -#define PCRE_INFO_NAMETABLE 9 -#define PCRE_INFO_STUDYSIZE 10 -#define PCRE_INFO_DEFAULT_TABLES 11 -#define PCRE_INFO_OKPARTIAL 12 -#define PCRE_INFO_JCHANGED 13 -#define PCRE_INFO_HASCRORLF 14 -#define PCRE_INFO_MINLENGTH 15 - -/* Request types for pcre_config(). Do not re-arrange, in order to remain -compatible. */ - -#define PCRE_CONFIG_UTF8 0 -#define PCRE_CONFIG_NEWLINE 1 -#define PCRE_CONFIG_LINK_SIZE 2 -#define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD 3 -#define PCRE_CONFIG_MATCH_LIMIT 4 -#define PCRE_CONFIG_STACKRECURSE 5 -#define PCRE_CONFIG_UNICODE_PROPERTIES 6 -#define PCRE_CONFIG_MATCH_LIMIT_RECURSION 7 -#define PCRE_CONFIG_BSR 8 - -/* Bit flags for the pcre_extra structure. Do not re-arrange or redefine -these bits, just add new ones on the end, in order to remain compatible. */ - -#define PCRE_EXTRA_STUDY_DATA 0x0001 -#define PCRE_EXTRA_MATCH_LIMIT 0x0002 -#define PCRE_EXTRA_CALLOUT_DATA 0x0004 -#define PCRE_EXTRA_TABLES 0x0008 -#define PCRE_EXTRA_MATCH_LIMIT_RECURSION 0x0010 -#define PCRE_EXTRA_MARK 0x0020 - -/* Types */ - -struct real_pcre; /* declaration; the definition is private */ -typedef struct real_pcre pcre; - -/* When PCRE is compiled as a C++ library, the subject pointer type can be -replaced with a custom type. For conventional use, the public interface is a -const char *. */ - -#ifndef PCRE_SPTR -#define PCRE_SPTR const char * -#endif - -/* The structure for passing additional data to pcre_exec(). This is defined in -such as way as to be extensible. Always add new fields at the end, in order to -remain compatible. */ - -typedef struct pcre_extra { - unsigned long int flags; /* Bits for which fields are set */ - void *study_data; /* Opaque data from pcre_study() */ - unsigned long int match_limit; /* Maximum number of calls to match() */ - void *callout_data; /* Data passed back in callouts */ - const unsigned char *tables; /* Pointer to character tables */ - unsigned long int match_limit_recursion; /* Max recursive calls to match() */ - unsigned char **mark; /* For passing back a mark pointer */ -} pcre_extra; - -/* The structure for passing out data via the pcre_callout_function. We use a -structure so that new fields can be added on the end in future versions, -without changing the API of the function, thereby allowing old clients to work -without modification. */ - -typedef struct pcre_callout_block { - int version; /* Identifies version of block */ - /* ------------------------ Version 0 ------------------------------- */ - int callout_number; /* Number compiled into pattern */ - int *offset_vector; /* The offset vector */ - PCRE_SPTR subject; /* The subject being matched */ - int subject_length; /* The length of the subject */ - int start_match; /* Offset to start of this match attempt */ - int current_position; /* Where we currently are in the subject */ - int capture_top; /* Max current capture */ - int capture_last; /* Most recently closed capture */ - void *callout_data; /* Data passed in with the call */ - /* ------------------- Added for Version 1 -------------------------- */ - int pattern_position; /* Offset to next item in the pattern */ - int next_item_length; /* Length of next item in the pattern */ - /* ------------------------------------------------------------------ */ -} pcre_callout_block; - -/* Indirection for store get and free functions. These can be set to -alternative malloc/free functions if required. Special ones are used in the -non-recursive case for "frames". There is also an optional callout function -that is triggered by the (?) regex item. For Virtual Pascal, these definitions -have to take another form. */ - -#ifndef VPCOMPAT -PCRE_EXP_DECL void *(*pcre_malloc)(size_t); -PCRE_EXP_DECL void (*pcre_free)(void *); -PCRE_EXP_DECL void *(*pcre_stack_malloc)(size_t); -PCRE_EXP_DECL void (*pcre_stack_free)(void *); -PCRE_EXP_DECL int (*pcre_callout)(pcre_callout_block *); -#else /* VPCOMPAT */ -PCRE_EXP_DECL void *pcre_malloc(size_t); -PCRE_EXP_DECL void pcre_free(void *); -PCRE_EXP_DECL void *pcre_stack_malloc(size_t); -PCRE_EXP_DECL void pcre_stack_free(void *); -PCRE_EXP_DECL int pcre_callout(pcre_callout_block *); -#endif /* VPCOMPAT */ - -/* Exported PCRE functions */ - -PCRE_EXP_DECL pcre *pcre_compile(const char *, int, const char **, int *, - const unsigned char *); -PCRE_EXP_DECL pcre *pcre_compile2(const char *, int, int *, const char **, - int *, const unsigned char *); -PCRE_EXP_DECL int pcre_config(int, void *); -PCRE_EXP_DECL int pcre_copy_named_substring(const pcre *, const char *, - int *, int, const char *, char *, int); -PCRE_EXP_DECL int pcre_copy_substring(const char *, int *, int, int, char *, - int); -PCRE_EXP_DECL int pcre_dfa_exec(const pcre *, const pcre_extra *, - const char *, int, int, int, int *, int , int *, int); -PCRE_EXP_DECL int pcre_exec(const pcre *, const pcre_extra *, PCRE_SPTR, - int, int, int, int *, int); -PCRE_EXP_DECL void pcre_free_substring(const char *); -PCRE_EXP_DECL void pcre_free_substring_list(const char **); -PCRE_EXP_DECL int pcre_fullinfo(const pcre *, const pcre_extra *, int, - void *); -PCRE_EXP_DECL int pcre_get_named_substring(const pcre *, const char *, - int *, int, const char *, const char **); -PCRE_EXP_DECL int pcre_get_stringnumber(const pcre *, const char *); -PCRE_EXP_DECL int pcre_get_stringtable_entries(const pcre *, const char *, - char **, char **); -PCRE_EXP_DECL int pcre_get_substring(const char *, int *, int, int, - const char **); -PCRE_EXP_DECL int pcre_get_substring_list(const char *, int *, int, - const char ***); -PCRE_EXP_DECL int pcre_info(const pcre *, int *, int *); -PCRE_EXP_DECL const unsigned char *pcre_maketables(void); -PCRE_EXP_DECL int pcre_refcount(pcre *, int); -PCRE_EXP_DECL pcre_extra *pcre_study(const pcre *, int, const char **); -PCRE_EXP_DECL const char *pcre_version(void); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* End of pcre.h */ From subversion at boxbackup.org Wed Oct 12 00:08:01 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Wed, 12 Oct 2011 00:08:01 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3023 - box/trunk/bin/bbackupd Message-ID: <20111011230801.B274C19F7E9@www.boxbackup.org> Author: chris Date: 2011-10-12 00:08:01 +0100 (Wed, 12 Oct 2011) New Revision: 3023 Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp Log: Fix excludions on VSS paths by converting back to original namespace before checking for them. Also simplifies code. Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp =================================================================== --- box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp 2011-10-11 22:13:56 UTC (rev 3022) +++ box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp 2011-10-11 23:08:01 UTC (rev 3023) @@ -309,6 +309,8 @@ // Stat file to get info filename = MakeFullPath(rLocalPath, en->d_name); + std::string realFileName = ConvertVssPathToRealPath(filename, + rBackupLocation); #ifdef WIN32 // Don't stat the file just yet, to ensure @@ -331,7 +333,6 @@ } #else // !WIN32 - if(EMU_LSTAT(filename.c_str(), &file_st) != 0) { if(!(rParams.mrContext.ExcludeDir( @@ -408,11 +409,9 @@ // File or symbolic link // Exclude it? - if(rParams.mrContext.ExcludeFile(filename)) + if(rParams.mrContext.ExcludeFile(realFileName)) { - rNotifier.NotifyFileExcluded(this, - ConvertVssPathToRealPath(filename, rBackupLocation)); - + rNotifier.NotifyFileExcluded(this, realFileName); // Next item! continue; } @@ -425,10 +424,9 @@ // Directory // Exclude it? - if(rParams.mrContext.ExcludeDir(filename)) + if(rParams.mrContext.ExcludeDir(realFileName)) { - rNotifier.NotifyDirExcluded(this, - ConvertVssPathToRealPath(filename, rBackupLocation)); + rNotifier.NotifyDirExcluded(this, realFileName); // Next item! continue; @@ -441,8 +439,7 @@ // http://social.msdn.microsoft.com/forums/en-US/windowscompatibility/thread/05d14368-25dd-41c8-bdba-5590bf762a68/ if (en->d_type & FILE_ATTRIBUTE_REPARSE_POINT) { - rNotifier.NotifyMountPointSkipped(this, - ConvertVssPathToRealPath(filename, rBackupLocation)); + rNotifier.NotifyMountPointSkipped(this, realFileName); continue; } #endif @@ -450,7 +447,7 @@ // Store on list dirs.push_back(std::string(en->d_name)); } - else + else // not a file or directory, what is it? { if (type == S_IFSOCK # ifndef WIN32 @@ -461,17 +458,16 @@ // removed notification for these types // see Debian bug 479145, no objections } - else if(rParams.mrContext.ExcludeFile(filename)) + else if(rParams.mrContext.ExcludeFile(realFileName)) { - rNotifier.NotifyFileExcluded(this, - ConvertVssPathToRealPath(filename, rBackupLocation)); + rNotifier.NotifyFileExcluded(this, realFileName); } else { - rNotifier.NotifyUnsupportedFileType(this, - ConvertVssPathToRealPath(filename, rBackupLocation)); + rNotifier.NotifyUnsupportedFileType(this, + realFileName); SetErrorWhenReadingFilesystemObject(rParams, - ConvertVssPathToRealPath(filename, rBackupLocation)); + realFileName); } continue; From subversion at boxbackup.org Wed Oct 12 00:11:21 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Wed, 12 Oct 2011 00:11:21 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3024 - box/trunk/infrastructure/msvc/2010 Message-ID: <20111011231121.62FA719F812@www.boxbackup.org> Author: chris Date: 2011-10-12 00:11:21 +0100 (Wed, 12 Oct 2011) New Revision: 3024 Modified: box/trunk/infrastructure/msvc/2010/common.vcxproj Log: Switch back from custom build step to pre-build event, as the custom step just doesn't work Modified: box/trunk/infrastructure/msvc/2010/common.vcxproj =================================================================== --- box/trunk/infrastructure/msvc/2010/common.vcxproj 2011-10-11 23:08:01 UTC (rev 3023) +++ box/trunk/infrastructure/msvc/2010/common.vcxproj 2011-10-11 23:11:21 UTC (rev 3024) @@ -44,7 +44,6 @@ ..\..\..\Release\ ..\..\..\Release\ $(IncludePath) - Compile @@ -62,18 +61,18 @@ EditAndContinue - - perl $(ProjectDir)..\getversion.pl - - - Determining Version Number - - - $(ProjectDir)..\..\..\lib\common\BoxVersion.h;%(Outputs) - + + + Ws2_32.lib;$(ProjectDir)..\..\..\..\pcre\build\vc2010\debug\pcre.lib;$(ProjectDir)..\..\..\..\pcre\build\vc2010\debug\pcreposix.lib;$(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib;$(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib;$(ProjectDir)..\..\..\..\zlib\lib\zdll.lib;%(AdditionalDependencies) + + perl $(ProjectDir)..\getversion.pl + + + Determining Version Number + From subversion at boxbackup.org Wed Oct 12 00:41:47 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Wed, 12 Oct 2011 00:41:47 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3025 - box/trunk/bin/bbackupd Message-ID: <20111011234147.7898319F9F2@www.boxbackup.org> Author: chris Date: 2011-10-12 00:41:47 +0100 (Wed, 12 Oct 2011) New Revision: 3025 Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp Log: Convert VSS path to original path for log messages in UpdateItems, to help admins to interpret them. Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp =================================================================== --- box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp 2011-10-11 23:11:21 UTC (rev 3024) +++ box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp 2011-10-11 23:41:47 UTC (rev 3025) @@ -772,6 +772,8 @@ // Filename of this file std::string filename(MakeFullPath(rLocalPath, *f)); + std::string nonVssFilePath = ConvertVssPathToRealPath(filename, + rBackupLocation); // Get relevant info about file box_time_t modTime = 0; @@ -785,12 +787,12 @@ EMU_STRUCT_STAT st; if(EMU_LSTAT(filename.c_str(), &st) != 0) { - rNotifier.NotifyFileStatFailed(this, - filename, strerror(errno)); + rNotifier.NotifyFileStatFailed(this, nonVssFilePath, + strerror(errno)); // Report the error (logs and // eventual email to administrator) - SetErrorWhenReadingFilesystemObject(rParams, filename); + SetErrorWhenReadingFilesystemObject(rParams, nonVssFilePath); // Ignore this entry for now. continue; @@ -845,7 +847,9 @@ bool isCurrentVersion = false; box_time_t srvModTime = 0, srvAttributesHash = 0; BackupStoreFilenameClear oldLeafname; - if(rContext.FindFilename(renameObjectID, renameInDirectory, localPotentialOldName, isDir, isCurrentVersion, &srvModTime, &srvAttributesHash, &oldLeafname)) + if(rContext.FindFilename(renameObjectID, renameInDirectory, + localPotentialOldName, isDir, isCurrentVersion, + &srvModTime, &srvAttributesHash, &oldLeafname)) { // Only interested if it's a file and the latest version if(!isDir && isCurrentVersion) @@ -865,7 +869,9 @@ if(!rContext.StorageLimitExceeded()) { // Rename the existing files (ie include old versions) on the server - connection.QueryMoveObject(renameObjectID, renameInDirectory, mObjectID /* move to this directory */, + connection.QueryMoveObject(renameObjectID, + renameInDirectory, + mObjectID /* move to this directory */, BackupProtocolMoveObject::Flags_MoveAllWithSameName | BackupProtocolMoveObject::Flags_AllowMoveOverDeletedObject, storeFilename); @@ -876,8 +882,11 @@ // Create new entry in the directory for it // -- will be near enough what's actually on the server for the rest to work. - en = pDirOnStore->AddEntry(storeFilename, srvModTime, renameObjectID, 0 /* size in blocks unknown, but not needed */, - BackupStoreDirectory::Entry::Flags_File, srvAttributesHash); + en = pDirOnStore->AddEntry(storeFilename, + srvModTime, renameObjectID, + 0 /* size in blocks unknown, but not needed */, + BackupStoreDirectory::Entry::Flags_File, + srvAttributesHash); // Store the object ID for the inode lookup map later latestObjectID = renameObjectID; @@ -919,6 +928,7 @@ // and if we know about it from a directory listing, that it hasn't got the same upload time as on the store bool doUpload = false; + std::string decisionReason = "unknown"; // Only upload a file if the mod time locally is // different to that on the server. @@ -934,16 +944,12 @@ if (pDirOnStore != 0 && en == 0) { doUpload = true; - BOX_TRACE("Upload decision: " << - filename << ": will upload " - "(not on server)"); + decisionReason = "not on server"; } else if (modTime >= rParams.mSyncPeriodStart) { doUpload = true; - BOX_TRACE("Upload decision: " << - filename << ": will upload " - "(modified since last sync)"); + decisionReason = "modified since last sync"; } } @@ -960,9 +966,7 @@ > rParams.mMaxUploadWait) { doUpload = true; - BOX_TRACE("Upload decision: " << - filename << ": will upload " - "(continually modified)"); + decisionReason = "continually modified"; } // Then make sure that if files are added with a @@ -978,9 +982,7 @@ en->GetModificationTime() != modTime) { doUpload = true; - BOX_TRACE("Upload decision: " << - filename << ": will upload " - "(mod time changed)"); + decisionReason = "mod time changed"; } // And just to catch really badly off clocks in @@ -991,17 +993,14 @@ rParams.mUploadAfterThisTimeInTheFuture) { doUpload = true; - BOX_TRACE("Upload decision: " << - filename << ": will upload " - "(mod time in the future)"); + decisionReason = "mod time in the future"; } } if (en != 0 && en->GetModificationTime() == modTime) { - BOX_TRACE("Upload decision: " << - filename << ": will not upload " - "(not modified since last upload)"); + doUpload = false; + decisionReason = "not modified since last upload"; } else if (!doUpload) { @@ -1010,22 +1009,26 @@ box_time_t now = GetCurrentBoxTime(); int age = BoxTimeToSeconds(now - modTime); - BOX_TRACE("Upload decision: " << - filename << ": will not upload " - "(modified too recently: " - "only " << age << " seconds ago)"); + std::ostringstream s; + s << "modified too recently: " + "only " << age << " seconds ago"; + decisionReason = s.str(); } else { - BOX_TRACE("Upload decision: " << - filename << ": will not upload " - "(mod time is " << modTime << + std::ostringstream s; + s << "mod time is " << modTime << " which is outside sync window, " << rParams.mSyncPeriodStart << " to " - << rParams.mSyncPeriodEnd << ")"); + << rParams.mSyncPeriodEnd; + decisionReason = s.str(); } } + BOX_TRACE("Upload decision: " << nonVssFilePath << ": " << + (doUpload ? "will upload" : "will not upload") << + "(" << decisionReason << ")"); + bool fileSynced = true; if (doUpload) @@ -1078,7 +1081,7 @@ // retries would probably just cause // more problems. rNotifier.NotifyFileUploadException( - this, filename, e); + this, nonVssFilePath, e); throw; } catch(BoxException &e) @@ -1095,8 +1098,10 @@ // code false, to show error in directory allUpdatedSuccessfully = false; // Log it. - SetErrorWhenReadingFilesystemObject(rParams, filename); - rNotifier.NotifyFileUploadException(this, filename, e); + SetErrorWhenReadingFilesystemObject(rParams, + nonVssFilePath); + rNotifier.NotifyFileUploadException(this, + nonVssFilePath, e); } // Update structures if the file was uploaded @@ -1114,8 +1119,7 @@ } else { - rNotifier.NotifyFileSkippedServerFull(this, - ConvertVssPathToRealPath(filename, rBackupLocation)); + rNotifier.NotifyFileSkippedServerFull(this, nonVssFilePath); } } else if(en != 0 && en->GetAttributesHash() != attributesHash) @@ -1135,8 +1139,8 @@ { try { - rNotifier.NotifyFileUploadingAttributes( - this, filename); + rNotifier.NotifyFileUploadingAttributes(this, + nonVssFilePath); // Update store BackupClientFileAttributes attr; @@ -1147,10 +1151,9 @@ } catch (BoxException &e) { - BOX_ERROR("Failed to read or store " - "file attributes for '" << - filename << "', will try " - "again later"); + BOX_ERROR("Failed to read or store file attributes " + "for '" << nonVssFilePath << "', will try again " + "later"); } } } @@ -1194,7 +1197,7 @@ { // Use this one BOX_TRACE("Storing uploaded file ID " << - inodeNum << " (" << filename << ") " + inodeNum << " (" << nonVssFilePath << ") " "in ID map as object " << latestObjectID << " with parent " << mObjectID); @@ -1211,7 +1214,12 @@ // Found if (dirid != mObjectID) { - BOX_WARNING("Found conflicting parent ID for file ID " << inodeNum << " (" << filename << "): expected " << mObjectID << " but found " << dirid << " (same directory used in two different locations?)"); + BOX_WARNING("Found conflicting parent ID for " + "file ID " << inodeNum << " (" << + nonVssFilePath << "): expected " << + mObjectID << " but found " << dirid << + " (same directory used in two different " + "locations?)"); } ASSERT(dirid == mObjectID); @@ -1221,11 +1229,9 @@ // into it. However, in a long running process this may happen occasionally and // not indicate anything wrong. // Run the release version for real life use, where this check is not made. - BOX_TRACE("Storing found file ID " << - inodeNum << " (" << filename << - ") in ID map as object " << - objid << " with parent " << - mObjectID); + BOX_TRACE("Storing found file ID " << inodeNum << + " (" << nonVssFilePath << ") in ID map as " + "object " << objid << " with parent " << mObjectID); idMap.AddToMap(inodeNum, objid, mObjectID /* containing directory */); } @@ -1234,7 +1240,7 @@ if (fileSynced) { - rNotifier.NotifyFileSynchronised(this, filename, + rNotifier.NotifyFileSynchronised(this, nonVssFilePath, fileSize); } } @@ -1260,6 +1266,8 @@ // Get the local filename std::string dirname(MakeFullPath(rLocalPath, *d)); + std::string nonVssDirPath = ConvertVssPathToRealPath(dirname, + rBackupLocation); // See if it's in the listing (if we have one) BackupStoreFilenameClear storeFilename(*d); @@ -1351,7 +1359,7 @@ BOX_WARNING("Failed to read attributes " "of directory, cannot check " "for rename, assuming new: '" - << dirname << "'"); + << nonVssDirPath << "'"); failedToReadAttributes = true; } @@ -1369,7 +1377,9 @@ std::string localPotentialOldName; bool isDir = false; bool isCurrentVersion = false; - if(rContext.FindFilename(renameObjectID, renameInDirectory, localPotentialOldName, isDir, isCurrentVersion)) + if(rContext.FindFilename(renameObjectID, + renameInDirectory, localPotentialOldName, + isDir, isCurrentVersion)) { // Only interested if it's a directory if(isDir && isCurrentVersion) @@ -1399,7 +1409,9 @@ if(renameDir) { // Rename the existing directory on the server - connection.QueryMoveObject(renameObjectID, renameInDirectory, mObjectID /* move to this directory */, + connection.QueryMoveObject(renameObjectID, + renameInDirectory, + mObjectID /* move to this directory */, BackupProtocolMoveObject::Flags_MoveAllWithSameName | BackupProtocolMoveObject::Flags_AllowMoveOverDeletedObject, storeFilename); @@ -1418,15 +1430,17 @@ else { // Create a new directory - std::auto_ptr dirCreate(connection.QueryCreateDirectory( - mObjectID, attrModTime, storeFilename, attrStream)); + std::auto_ptr dirCreate( + connection.QueryCreateDirectory( + mObjectID, attrModTime, storeFilename, + attrStream)); subDirObjectID = dirCreate->GetObjectID(); // Flag as having done this for optimisation later haveJustCreatedDirOnServer = true; rNotifier.NotifyDirectoryCreated(subDirObjectID, storeFilename.GetClearFilename(), - dirname); + nonVssDirPath); } } @@ -1490,6 +1504,8 @@ BackupStoreFilenameClear clear(en->GetName()); std::string localName = MakeFullPath(rLocalPath, clear.GetClearFilename()); + std::string nonVssLocalName = ConvertVssPathToRealPath(localName, + rBackupLocation); // Delete this entry -- file or directory? if((en->GetFlags() & BackupStoreDirectory::Entry::Flags_File) != 0) @@ -1515,12 +1531,8 @@ mSubDirectories.erase(e); delete rec; - std::string name = MakeFullPath( - rLocalPath, - dirname.GetClearFilename()); - - BOX_TRACE("Deleted directory record " - "for " << name); + BOX_TRACE("Deleted directory record for " << + nonVssLocalName); } } } From subversion at boxbackup.org Wed Oct 12 00:46:01 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Wed, 12 Oct 2011 00:46:01 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3026 - box/trunk/infrastructure/msvc/2010 Message-ID: <20111011234601.3078719FA2F@www.boxbackup.org> Author: chris Date: 2011-10-12 00:46:01 +0100 (Wed, 12 Oct 2011) New Revision: 3026 Modified: box/trunk/infrastructure/msvc/2010/libbackupstore.vcxproj Log: Make libbackupstore depend on common, so common can generate BoxVersion.h first Modified: box/trunk/infrastructure/msvc/2010/libbackupstore.vcxproj =================================================================== --- box/trunk/infrastructure/msvc/2010/libbackupstore.vcxproj 2011-10-11 23:41:47 UTC (rev 3025) +++ box/trunk/infrastructure/msvc/2010/libbackupstore.vcxproj 2011-10-11 23:46:01 UTC (rev 3026) @@ -138,6 +138,11 @@ + + + {a089cee6-ebf0-4232-a0c0-74850a8127a6} + + From subversion at boxbackup.org Tue Oct 18 00:19:48 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Tue, 18 Oct 2011 00:19:48 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3027 - in box/trunk/infrastructure: . m4 Message-ID: <20111017231948.ADB0019F998@www.boxbackup.org> Author: chris Date: 2011-10-18 00:19:48 +0100 (Tue, 18 Oct 2011) New Revision: 3027 Modified: box/trunk/infrastructure/BoxPlatform.pm.in box/trunk/infrastructure/m4/boxbackup_tests.m4 Log: Patch to support building on MinGW, thanks to Paolo Tosco (http://open3dalign.org, http://open3dqsar.org) Modified: box/trunk/infrastructure/BoxPlatform.pm.in =================================================================== --- box/trunk/infrastructure/BoxPlatform.pm.in 2011-10-11 23:46:01 UTC (rev 3026) +++ box/trunk/infrastructure/BoxPlatform.pm.in 2011-10-17 23:19:48 UTC (rev 3027) @@ -24,11 +24,13 @@ # Cygwin Builds usually something like CYGWIN_NT-5.0, CYGWIN_NT-5.1 # Box Backup tried on Win2000,XP only :) $build_os = 'CYGWIN' if $build_os =~ m/CYGWIN/; + $build_os = 'MINGW32' if $build_os =~ m/MINGW32/; $make_command = ($build_os eq 'Darwin') ? 'bsdmake' : ($build_os eq 'SunOS') ? 'gmake' : 'make'; $bsd_make = ($build_os ne 'Linux' && $build_os ne 'CYGWIN' && - $build_os ne "SunOS" && $build_os ne 'GNU/kFreeBSD'); + $build_os ne "MINGW32" && $build_os ne "SunOS" + && $build_os ne 'GNU/kFreeBSD'); # blank extra flags by default $platform_compile_line_extra = ''; Modified: box/trunk/infrastructure/m4/boxbackup_tests.m4 =================================================================== --- box/trunk/infrastructure/m4/boxbackup_tests.m4 2011-10-11 23:46:01 UTC (rev 3026) +++ box/trunk/infrastructure/m4/boxbackup_tests.m4 2011-10-17 23:19:48 UTC (rev 3027) @@ -67,11 +67,14 @@ ### Checks for libraries. case $target_os in -mingw32*) ;; -winnt) ;; +mingw32*) + AC_CHECK_LIB([crypto -lws2_32 -lgdi32], [CRYPTO_lock]) + ;; +winnt) + ;; *) - AC_SEARCH_LIBS([nanosleep], [rt], [ac_have_nanosleep=yes], - [AC_MSG_ERROR([[cannot find a short sleep function (nanosleep)]])]) + AC_SEARCH_LIBS([nanosleep], [rt], [ac_have_nanosleep=yes], + [AC_MSG_ERROR([[cannot find a short sleep function (nanosleep)]])]) ;; esac From subversion at boxbackup.org Sun Oct 23 16:51:53 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Sun, 23 Oct 2011 16:51:53 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3028 - box/trunk/lib/backupstore Message-ID: <20111023155153.319C319F430@www.boxbackup.org> Author: chris Date: 2011-10-23 16:51:52 +0100 (Sun, 23 Oct 2011) New Revision: 3028 Modified: box/trunk/lib/backupstore/BackupStoreFile.h Log: Adjust for platforms where sizeof(long) < sizeof(void *), apparently including Visual Studio 64-bit where sizeof(long) == 4. I don't fully understand the code, so I hope this adjustment is correct! Modified: box/trunk/lib/backupstore/BackupStoreFile.h =================================================================== --- box/trunk/lib/backupstore/BackupStoreFile.h 2011-10-17 23:19:48 UTC (rev 3027) +++ box/trunk/lib/backupstore/BackupStoreFile.h 2011-10-23 15:51:52 UTC (rev 3028) @@ -162,9 +162,9 @@ uint8_t *a = (uint8_t*)malloc((Size) + (BACKUPSTOREFILE_CODING_BLOCKSIZE * 3)); if(a == 0) return 0; // Align to main block size - ASSERT(sizeof(unsigned long) >= sizeof(void*)); // make sure casting the right pointer size + ASSERT(sizeof(uint64_t) >= sizeof(void*)); // make sure casting the right pointer size uint8_t adjustment = BACKUPSTOREFILE_CODING_BLOCKSIZE - - (uint8_t)(((unsigned long)a) % BACKUPSTOREFILE_CODING_BLOCKSIZE); + - (uint8_t)(((uint64_t)a) % BACKUPSTOREFILE_CODING_BLOCKSIZE); uint8_t *b = (a + adjustment); // Store adjustment *b = adjustment; @@ -174,8 +174,8 @@ inline static void CodingChunkFree(void *Block) { // Check alignment is as expected - ASSERT(sizeof(unsigned long) >= sizeof(void*)); // make sure casting the right pointer size - ASSERT((uint8_t)(((unsigned long)Block) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET); + ASSERT(sizeof(uint64_t) >= sizeof(void*)); // make sure casting the right pointer size + ASSERT((uint8_t)(((uint64_t)Block) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET); uint8_t *a = (uint8_t*)Block; a -= BACKUPSTOREFILE_CODING_OFFSET; // Adjust downwards... From subversion at boxbackup.org Mon Oct 24 21:31:13 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Mon, 24 Oct 2011 21:31:13 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3029 - box/trunk/bin/bbackupd Message-ID: <20111024203113.6ABFE19FDD9@www.boxbackup.org> Author: chris Date: 2011-10-24 21:31:13 +0100 (Mon, 24 Oct 2011) New Revision: 3029 Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp Log: Add debug logging for conversion from VSS to real path. Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp =================================================================== --- box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp 2011-10-23 15:51:52 UTC (rev 3028) +++ box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp 2011-10-24 20:31:13 UTC (rev 3029) @@ -107,12 +107,21 @@ const Location& rBackupLocation) { #ifdef ENABLE_VSS + BOX_TRACE("VSS: ConvertVssPathToRealPath: mIsSnapshotCreated = " << + rBackupLocation.mIsSnapshotCreated); + BOX_TRACE("VSS: ConvertVssPathToRealPath: File/Directory Path = " << + rVssPath.substr(0, rBackupLocation.mSnapshotPath.length())); + BOX_TRACE("VSS: ConvertVssPathToRealPath: Snapshot Path = " << + rBackupLocation.mSnapshotPath); if (rBackupLocation.mIsSnapshotCreated && rVssPath.substr(0, rBackupLocation.mSnapshotPath.length()) == rBackupLocation.mSnapshotPath) { - return rBackupLocation.mPath + + std::string convertedPath = rBackupLocation.mPath + rVssPath.substr(rBackupLocation.mSnapshotPath.length()); + BOX_TRACE("VSS: ConvertVssPathToRealPath: Converted Path = " << + convertedPath); + return convertedPath; } #endif From subversion at boxbackup.org Tue Oct 25 23:03:07 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Tue, 25 Oct 2011 23:03:07 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3030 - in box/trunk/lib: common server Message-ID: <20111025220307.E7BDB19FE6F@www.boxbackup.org> Author: chris Date: 2011-10-25 23:03:07 +0100 (Tue, 25 Oct 2011) New Revision: 3030 Modified: box/trunk/lib/common/BannerText.h box/trunk/lib/common/BoxPlatform.h box/trunk/lib/common/MainHelper.h box/trunk/lib/common/Utils.cpp box/trunk/lib/server/Daemon.cpp Log: Avoid recompiling everything on MSVC when BoxVersion.h changes. Modified: box/trunk/lib/common/BannerText.h =================================================================== --- box/trunk/lib/common/BannerText.h 2011-10-24 20:31:13 UTC (rev 3029) +++ box/trunk/lib/common/BannerText.h 2011-10-25 22:03:07 UTC (rev 3030) @@ -10,9 +10,13 @@ #ifndef BANNERTEXT__H #define BANNERTEXT__H +#ifdef NEED_BOX_VERSION_H +# include "BoxVersion.h" +#endif + #define BANNER_TEXT(UtilityName) \ "Box " UtilityName " v" BOX_VERSION ", (c) Ben Summers and " \ - "contributors 2003-2010" + "contributors 2003-2011" #endif // BANNERTEXT__H Modified: box/trunk/lib/common/BoxPlatform.h =================================================================== --- box/trunk/lib/common/BoxPlatform.h 2011-10-24 20:31:13 UTC (rev 3029) +++ box/trunk/lib/common/BoxPlatform.h 2011-10-25 22:03:07 UTC (rev 3030) @@ -23,7 +23,7 @@ #ifdef _MSC_VER #include "BoxConfig-MSVC.h" -#include "BoxVersion.h" +#define NEED_BOX_VERSION_H #else #include "BoxConfig.h" #endif Modified: box/trunk/lib/common/MainHelper.h =================================================================== --- box/trunk/lib/common/MainHelper.h 2011-10-24 20:31:13 UTC (rev 3029) +++ box/trunk/lib/common/MainHelper.h 2011-10-25 22:03:07 UTC (rev 3030) @@ -12,6 +12,10 @@ #include +#ifdef NEED_BOX_VERSION_H +# include "BoxVersion.h" +#endif + #include "BoxException.h" #include "Logging.h" @@ -21,6 +25,7 @@ MEMLEAKFINDER_INIT \ MEMLEAKFINDER_START \ try { + #define MAINHELPER_END \ } catch(std::exception &e) { \ BOX_FATAL(e.what()); \ Modified: box/trunk/lib/common/Utils.cpp =================================================================== --- box/trunk/lib/common/Utils.cpp 2011-10-24 20:31:13 UTC (rev 3029) +++ box/trunk/lib/common/Utils.cpp 2011-10-25 22:03:07 UTC (rev 3030) @@ -28,9 +28,13 @@ #include #endif -#include "Utils.h" +#ifdef NEED_BOX_VERSION_H +# include "BoxVersion.h" +#endif + #include "CommonException.h" #include "Logging.h" +#include "Utils.h" #include "MemLeakFindOn.h" Modified: box/trunk/lib/server/Daemon.cpp =================================================================== --- box/trunk/lib/server/Daemon.cpp 2011-10-24 20:31:13 UTC (rev 3029) +++ box/trunk/lib/server/Daemon.cpp 2011-10-25 22:03:07 UTC (rev 3030) @@ -32,13 +32,17 @@ #include +#ifdef NEED_BOX_VERSION_H +# include "BoxVersion.h" +#endif + +#include "Configuration.h" #include "Daemon.h" -#include "Configuration.h" +#include "FileModificationTime.h" +#include "Guards.h" +#include "Logging.h" #include "ServerException.h" -#include "Guards.h" #include "UnixUser.h" -#include "FileModificationTime.h" -#include "Logging.h" #include "Utils.h" #include "MemLeakFindOn.h" From subversion at boxbackup.org Tue Oct 25 23:27:56 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Tue, 25 Oct 2011 23:27:56 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3031 - box/trunk/bin/bbackupd Message-ID: <20111025222756.BEC2B19FF6F@www.boxbackup.org> Author: chris Date: 2011-10-25 23:27:56 +0100 (Tue, 25 Oct 2011) New Revision: 3031 Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp box/trunk/bin/bbackupd/BackupClientDirectoryRecord.h Log: Fix logging of real (non-VSS) paths in UploadFile*. Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp =================================================================== --- box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp 2011-10-25 22:03:07 UTC (rev 3030) +++ box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp 2011-10-25 22:27:56 UTC (rev 3031) @@ -258,8 +258,9 @@ DIR *dirHandle = 0; try { - rNotifier.NotifyScanDirectory(this, - ConvertVssPathToRealPath(rLocalPath, rBackupLocation)); + std::string nonVssDirPath = ConvertVssPathToRealPath(rLocalPath, + rBackupLocation); + rNotifier.NotifyScanDirectory(this, nonVssDirPath); dirHandle = ::opendir(rLocalPath.c_str()); if(dirHandle == 0) @@ -269,19 +270,20 @@ if (errno == EACCES) { rNotifier.NotifyDirListFailed(this, - ConvertVssPathToRealPath(rLocalPath, rBackupLocation), + nonVssDirPath, "Access denied"); } else { rNotifier.NotifyDirListFailed(this, - ConvertVssPathToRealPath(rLocalPath, rBackupLocation), + nonVssDirPath, strerror(errno)); } // Report the error (logs and eventual email // to administrator) - SetErrorWhenReadingFilesystemObject(rParams, rLocalPath); + SetErrorWhenReadingFilesystemObject(rParams, + nonVssDirPath); // Ignore this directory for now. return; } @@ -1066,7 +1068,9 @@ try { latestObjectID = UploadFile(rParams, - filename, storeFilename, + filename, + nonVssFilePath, + storeFilename, fileSize, modTime, attributesHash, noPreviousVersionOnServer); @@ -1608,6 +1612,7 @@ int64_t BackupClientDirectoryRecord::UploadFile( BackupClientDirectoryRecord::SyncParams &rParams, const std::string &rFilename, + const std::string &rNonVssFilePath, const BackupStoreFilename &rStoreFilename, int64_t FileSize, box_time_t ModificationTime, @@ -1641,8 +1646,8 @@ if(diffFromID != 0) { // Found an old version - rNotifier.NotifyFileUploadingPatch(this, - rFilename); + rNotifier.NotifyFileUploadingPatch(this, + rNonVssFilePath); // Get the index std::auto_ptr blockIndexStream(connection.ReceiveStream()); @@ -1701,7 +1706,7 @@ if(doNormalUpload) { // below threshold or nothing to diff from, so upload whole - rNotifier.NotifyFileUploading(this, rFilename); + rNotifier.NotifyFileUploading(this, rNonVssFilePath); // Prepare to upload, getting a stream which will encode the file as we go along std::auto_ptr upload( @@ -1762,7 +1767,7 @@ return 0; } rNotifier.NotifyFileUploadServerError(this, - rFilename, type, subtype); + rNonVssFilePath, type, subtype); } } @@ -1770,7 +1775,8 @@ throw; } - rNotifier.NotifyFileUploaded(this, rFilename, FileSize, uploadedSize); + rNotifier.NotifyFileUploaded(this, rNonVssFilePath, FileSize, + uploadedSize); // Return the new object ID of this file return objID; Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.h =================================================================== --- box/trunk/bin/bbackupd/BackupClientDirectoryRecord.h 2011-10-25 22:03:07 UTC (rev 3030) +++ box/trunk/bin/bbackupd/BackupClientDirectoryRecord.h 2011-10-25 22:27:56 UTC (rev 3031) @@ -156,6 +156,7 @@ const std::vector &rDirs); int64_t UploadFile(SyncParams &rParams, const std::string &rFilename, + const std::string &rNonVssFilePath, const BackupStoreFilename &rStoreFilename, int64_t FileSize, box_time_t ModificationTime, box_time_t AttributesHash, bool NoPreviousVersionOnServer); From subversion at boxbackup.org Tue Oct 25 23:57:35 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Tue, 25 Oct 2011 23:57:35 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3032 - box/trunk/bin/bbackupd Message-ID: <20111025225735.7D7C819F007@www.boxbackup.org> Author: chris Date: 2011-10-25 23:57:35 +0100 (Tue, 25 Oct 2011) New Revision: 3032 Modified: box/trunk/bin/bbackupd/BackupDaemon.cpp Log: Delete any incomplete ID map database that we find, so that we can start afresh with a new one, should solve most corrupt database errors such as the ones reported by Achim. Modified: box/trunk/bin/bbackupd/BackupDaemon.cpp =================================================================== --- box/trunk/bin/bbackupd/BackupDaemon.cpp 2011-10-25 22:27:56 UTC (rev 3031) +++ box/trunk/bin/bbackupd/BackupDaemon.cpp 2011-10-25 22:57:35 UTC (rev 3032) @@ -2514,6 +2514,24 @@ filename += ".n"; } + // The new map file should not exist yet. If there's + // one left over from a previous failed run, it's not + // useful to us because we never read from it and will + // overwrite the entries of all files that still + // exist, so we should just delete it and start afresh. + if(NewMaps && FileExists(filename.c_str())) + { + BOX_NOTICE("Found an incomplete ID map " + "database, deleting it to start " + "afresh: " << filename); + if(unlink(filename.c_str()) != 0) + { + BOX_LOG_NATIVE_ERROR(BOX_FILE_MESSAGE( + filename, "Failed to delete " + "incomplete ID map database")); + } + } + // If it's not a new map, it may not exist in which case an empty map should be created if(!NewMaps && !FileExists(filename.c_str())) { From subversion at boxbackup.org Sat Oct 29 12:22:27 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Sat, 29 Oct 2011 12:22:27 +0100 (BST) Subject: [Box Backup-commit] COMMIT r3033 - box/chris/win32/releases Message-ID: <20111029112227.5FF9819F029@www.boxbackup.org> Author: chris Date: 2011-10-29 12:22:26 +0100 (Sat, 29 Oct 2011) New Revision: 3033 Added: box/chris/win32/releases/boxi-msw-111029.zip Log: Add another preview of Boxi. Added: box/chris/win32/releases/boxi-msw-111029.zip =================================================================== (Binary files differ) Property changes on: box/chris/win32/releases/boxi-msw-111029.zip ___________________________________________________________________ Added: svn:mime-type + application/octet-stream From subversion at boxbackup.org Mon Oct 31 21:09:46 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Mon, 31 Oct 2011 21:09:46 +0000 (GMT) Subject: [Box Backup-commit] COMMIT r3034 - box/trunk/lib/server Message-ID: <20111031210946.5BF6A19FCD0@www.boxbackup.org> Author: chris Date: 2011-10-31 21:09:45 +0000 (Mon, 31 Oct 2011) New Revision: 3034 Modified: box/trunk/lib/server/ServerException.txt box/trunk/lib/server/SocketListen.h Log: Improve error message on bbackupd command socket bind failure, thanks to Christophe. Modified: box/trunk/lib/server/ServerException.txt =================================================================== --- box/trunk/lib/server/ServerException.txt 2011-10-29 11:22:26 UTC (rev 3033) +++ box/trunk/lib/server/ServerException.txt 2011-10-31 21:09:45 UTC (rev 3034) @@ -13,7 +13,7 @@ SocketPollError 11 SocketCloseError 13 SocketNameUNIXPathTooLong 14 -SocketBindError 16 Check the ListenAddresses directive in your config file -- must refer to local IP addresses only +SocketBindError 16 Check the ListenAddresses directive (bbstored) or CommandSocket (bbackupd) in your config file -- must refer to local IP addresses (or existing writable path) only SocketAcceptError 17 ServerStreamBadListenAddrs 18 ServerForkError 19 Modified: box/trunk/lib/server/SocketListen.h =================================================================== --- box/trunk/lib/server/SocketListen.h 2011-10-29 11:22:26 UTC (rev 3033) +++ box/trunk/lib/server/SocketListen.h 2011-10-31 21:09:45 UTC (rev 3034) @@ -166,10 +166,13 @@ if(::bind(mSocketHandle, &addr.sa_generic, addrLen) == -1 || ::listen(mSocketHandle, ListenBacklog) == -1) { + int err_number = errno; // Dispose of the socket ::close(mSocketHandle); mSocketHandle = -1; - THROW_EXCEPTION(ServerException, SocketBindError) + THROW_SYS_FILE_ERRNO("Failed to bind or listen " + "on socket", Name, err_number, + ServerException, SocketBindError); } } From subversion at boxbackup.org Mon Oct 31 21:14:03 2011 From: subversion at boxbackup.org (subversion at boxbackup.org) Date: Mon, 31 Oct 2011 21:14:03 +0000 (GMT) Subject: [Box Backup-commit] COMMIT r3035 - box/trunk/contrib/mac_osx Message-ID: <20111031211403.4D38219FCFB@www.boxbackup.org> Author: chris Date: 2011-10-31 21:14:03 +0000 (Mon, 31 Oct 2011) New Revision: 3035 Modified: box/trunk/contrib/mac_osx/org.boxbackup.bbstored.plist.in Log: Fix double in bbstored plist. Modified: box/trunk/contrib/mac_osx/org.boxbackup.bbstored.plist.in =================================================================== --- box/trunk/contrib/mac_osx/org.boxbackup.bbstored.plist.in 2011-10-31 21:09:45 UTC (rev 3034) +++ box/trunk/contrib/mac_osx/org.boxbackup.bbstored.plist.in 2011-10-31 21:14:03 UTC (rev 3035) @@ -14,7 +14,6 @@ -F @prefix@/etc/boxbackup/bbackupd.conf - LowPriorityIO Nice