From boxbackup-dev at boxbackup.org Sat Aug 1 11:49:16 2009 From: boxbackup-dev at boxbackup.org (boxbackup-dev at boxbackup.org) Date: Sat, 1 Aug 2009 11:49:16 +0100 (BST) Subject: [Box Backup-commit] COMMIT r2548 - box/trunk/lib/backupstore Message-ID: <20090801104916.C0C49325020@www.boxbackup.org> Author: chris Date: 2009-08-01 11:49:15 +0100 (Sat, 01 Aug 2009) New Revision: 2548 Modified: box/trunk/lib/backupstore/BackupStoreRefCountDatabase.cpp Log: Fix compile failure reported by Achim. Modified: box/trunk/lib/backupstore/BackupStoreRefCountDatabase.cpp =================================================================== --- box/trunk/lib/backupstore/BackupStoreRefCountDatabase.cpp 2009-07-10 19:07:54 UTC (rev 2547) +++ box/trunk/lib/backupstore/BackupStoreRefCountDatabase.cpp 2009-08-01 10:49:15 UTC (rev 2548) @@ -18,6 +18,7 @@ #include "RaidFileController.h" #include "RaidFileUtil.h" #include "RaidFileException.h" +#include "Utils.h" #include "MemLeakFindOn.h" From boxbackup-dev at boxbackup.org Sun Aug 2 19:58:53 2009 From: boxbackup-dev at boxbackup.org (boxbackup-dev at boxbackup.org) Date: Sun, 2 Aug 2009 19:58:53 +0100 (BST) Subject: [Box Backup-commit] COMMIT r2549 - box/trunk/lib/win32 Message-ID: <20090802185853.8046E325020@www.boxbackup.org> Author: chris Date: 2009-08-02 19:58:51 +0100 (Sun, 02 Aug 2009) New Revision: 2549 Modified: box/trunk/lib/win32/emu.cpp Log: Add handling of relative paths to emu.cpp's openfile(), needed to handle relative paths in test configuration on Windows. Modified: box/trunk/lib/win32/emu.cpp =================================================================== --- box/trunk/lib/win32/emu.cpp 2009-08-01 10:49:15 UTC (rev 2548) +++ box/trunk/lib/win32/emu.cpp 2009-08-02 18:58:51 UTC (rev 2549) @@ -417,6 +417,32 @@ } tmpStr += filename; + + // We are using direct filename access, which does not support .., + // so we need to implement it ourselves. + + for (std::string::size_type i = 1; i < tmpStr.size() - 3; i++) + { + if (tmpStr.substr(i, 3) == "\\..") + { + std::string::size_type lastSlash = + tmpStr.rfind('\\', i - 1); + + if (lastSlash == std::string::npos) + { + // no previous directory, ignore it, + // CreateFile will fail with error 123 + } + else + { + tmpStr.replace(lastSlash, i + 3 - lastSlash, + ""); + } + + i = lastSlash; + } + } + return tmpStr; } From boxbackup-dev at boxbackup.org Fri Aug 7 11:09:14 2009 From: boxbackup-dev at boxbackup.org (Box Backup) Date: Fri, 07 Aug 2009 10:09:14 -0000 Subject: [Box Backup-commit] #56: Windows: User can polute restore directory by adding a trailing backslash to the restore destination Message-ID: <042.e3a2b855bb28538a7658f28ae7c09cca@boxbackup.org> #56: Windows: User can polute restore directory by adding a trailing backslash to the restore destination -------------------+-------------------------------------------------------- Reporter: achim | Type: defect Status: new | Priority: minor Milestone: | Component: bbackupquery Version: trunk | Keywords: windows, restore -------------------+-------------------------------------------------------- query > ls[[BR]] {{{ 00000002 -d---- BACKUPTEST[[BR]] query > restore BACKUPTEST d:\RESTORE[[BR]] WARNING: Failed to open file: d:\RESTORE.boxbackupresume: Acceso denegado.(5)[[BR]] WARNING: Exception thrown: CommonException(OSFileOpenError) at FileStream.cpp(84)[[BR]] ERROR: Failed to save resume info file 'd:\RESTORE.boxbackupresume':[[BR]] Common OSFileOpenError (Can't open a file -- attempted to load a non-existant config file or bad file referenced within?)[[BR]] ERROR: Unknown error during restore.[[BR]] }}} [[BR]] BUT the directory does get created (confirmed on the file system):[[BR]] [[BR]] {{{ query > restore BACKUPTEST d:\RESTORE\[[BR]] ERROR: The target directory exists. You cannot restore over an existing directory.[[BR]] }}} [[BR]] after manually deleting it and adding a trailing slash to the restore destination, it works:[[BR]] {{{ query > restore BACKUPTEST d:\restore\ ....................................................................... }}} With the trailing backslash Box Backup generates d:\RESTORE\.boxbackupresume and without it it tries to generate d:\RESTORE.boxbackupresume? I have a feeling that this is a workaround that results in the resume file being created in the restored directory, which may not be desirable. -- Ticket URL: Box Backup An open source, completely automatic on-line backup system for UNIX. From boxbackup-dev at boxbackup.org Fri Aug 7 11:12:39 2009 From: boxbackup-dev at boxbackup.org (Box Backup) Date: Fri, 07 Aug 2009 10:12:39 -0000 Subject: [Box Backup-commit] #57: Create boxbackupresume and other files in DataDirectory Message-ID: <042.7f6c29731329d3c2c35c875abeea2a0c@boxbackup.org> #57: Create boxbackupresume and other files in DataDirectory -------------------------+-------------------------------------------------- Reporter: achim | Owner: ben Type: enhancement | Status: new Priority: minor | Milestone: Component: bbackupd | Version: trunk Keywords: | -------------------------+-------------------------------------------------- Shouldn't boxbackupresume et al. be created in the DataDirectory as specified in bbackupd.conf anyway? Or perhaps an additional TmpDirectory with write permission for everybody that could even me mounted on a ramdisk for speed? However: bbackupd might be running as root or administrator while bbackupquery might not be, so it might not be possible to restore files at all in that case. -- Ticket URL: Box Backup An open source, completely automatic on-line backup system for UNIX. From boxbackup-dev at boxbackup.org Fri Aug 7 14:09:15 2009 From: boxbackup-dev at boxbackup.org (Box Backup) Date: Fri, 07 Aug 2009 13:09:15 -0000 Subject: [Box Backup-commit] #58: bbackupquery connection timeout results in error message, should be more graceful Message-ID: <042.85f81e379cb7720efd571bfafe567aeb@boxbackup.org> #58: bbackupquery connection timeout results in error message, should be more graceful ----------------------+----------------------------------------------------- Reporter: achim | Owner: ben Type: defect | Status: new Priority: minor | Milestone: Component: bbackupd | Version: trunk Keywords: | ----------------------+----------------------------------------------------- {{{ $ boxbackup/bbackupquery.exe -c config/bbackupd.conf NOTICE: Box Backup Query Tool vtrunk_2549, (c) Ben Summers and contributors 2003-2008 Login complete. }}} [wait long time for timeout to happen] {{{ query > ls WARNING: Exception thrown: ConnectionException(Conn_TLSWriteFailed) at SocketStreamTLS.cpp(404) ERROR: Failed to list directory: Connection TLSWriteFailed (Probably a network issue between clien t and server.) query > usage ERROR: SSL error while writing: error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry WARNING: Exception thrown: ConnectionException(Conn_TLSWriteFailed) at SocketStreamTLS.cpp(404) Exception: Connection TLSWriteFailed (Probably a network issue between client and server.) (7/33) }}} -- Ticket URL: Box Backup An open source, completely automatic on-line backup system for UNIX. From boxbackup-dev at boxbackup.org Fri Aug 7 14:14:40 2009 From: boxbackup-dev at boxbackup.org (Box Backup) Date: Fri, 07 Aug 2009 13:14:40 -0000 Subject: [Box Backup-commit] Re: #16: Restore deleted directories may fail In-Reply-To: <042.b5fa3edb458ae641daa6e69dc02fb676@boxbackup.org> References: <042.b5fa3edb458ae641daa6e69dc02fb676@boxbackup.org> Message-ID: <051.371c7ef44abe4ac943663e1f549bdee0@boxbackup.org> #16: Restore deleted directories may fail -------------------------------------------------------+-------------------- Reporter: chris | Owner: chris Type: defect | Status: new Priority: major | Milestone: 0.11 Component: bbackupquery | Version: 0.10 Keywords: windows restore deleted files directories | -------------------------------------------------------+-------------------- Comment(by achim): Still exists in R2549: {{{ $ boxbackup/bbackupquery.exe -c config/bbackupd.conf Unable to send message to Event Log (Event Log is full): NOTICE: Box Backup Query Tool vtrunk_2549, (c) Ben Summers and contributors 2003-2008 Login complete. Type "help" for a list of commands. query > ls -t 00000144 -d---- 1970-01-01T01:00:00 CASES query > restore CASES d:\restore\ ............................................................................. query > restore -d CASES d:\restore\ }}} d:\restore gets created in the second case, but no data is contained in that directory. However, I am not sure what the "-d" option actually adds, since a regular restore (without -d) works just fine. -- Ticket URL: Box Backup An open source, completely automatic on-line backup system for UNIX. From boxbackup-dev at boxbackup.org Sat Aug 22 21:22:42 2009 From: boxbackup-dev at boxbackup.org (boxbackup-dev at boxbackup.org) Date: Sat, 22 Aug 2009 21:22:42 +0100 (BST) Subject: [Box Backup-commit] COMMIT r2550 - box/trunk/docs Message-ID: <20090822202242.6839532508E@www.boxbackup.org> Author: chris Date: 2009-08-22 21:22:41 +0100 (Sat, 22 Aug 2009) New Revision: 2550 Modified: box/trunk/docs/Makefile Log: Make generation of documentation quieter. Modified: box/trunk/docs/Makefile =================================================================== --- box/trunk/docs/Makefile 2009-08-02 18:58:51 UTC (rev 2549) +++ box/trunk/docs/Makefile 2009-08-22 20:22:41 UTC (rev 2550) @@ -1,9 +1,72 @@ +# Process DocBook to HTML +# This makefile is a bit obfuscated so that it works correctly on both +# BSD and GNU make. Some parts apply to one version of make and not the +# other; these are marked by comments. -# Process DocBook to HTML +# The "all" target shouldn't be up here, but the trickery below defines +# what looks like a rule to GNU make, and so we need to define the actual +# default target before it. -DBPROC=xsltproc +all: docs +DBPROC_COMMAND = xsltproc +MKDIR_COMMAND = mkdir +CP_COMMAND = cp +PERL_COMMAND = perl +RM_COMMAND = rm -f +TAR_COMMAND = tar +GZIP_COMMAND = gzip -f +GENERATE_SCRIPT = tools/generate_except_xml.pl + +DBPROC = $(DBPROC_COMMAND) +MKDIR = $(MKDIR_COMMAND) +CP = $(CP_COMMAND) +GENERATE = $(PERL_COMMAND) $(GENERATE_SCRIPT) +RM_QUIET = $(RM_COMMAND) +TAR = $(TAR_COMMAND) +GZIP = $(GZIP_COMMAND) +PROGRESS = @ true + +# use a GNU make "define" command, that looks like a harmless dummy rule +# to BSD make, to hide parts of the Makefile from GNU make. +define IGNORED_BY_GNU_MAKE: +.if 0 +endef + + # seen by GNU make, not by BSD make + ifeq ($(V),) + DBPROC = @ echo " [XLSTPROC]" $^ && $(DBPROC_COMMAND) 2>/dev/null + GENERATE = @ echo " [GENERATE]" $@ && $(PERL_COMMAND) $(GENERATE_SCRIPT) + TAR = @ echo " [TAR] " $@ && $(TAR_COMMAND) + GZIP = @ echo " [GZIP] " $< && $(GZIP_COMMAND) + RM_QUIET = @ $(RM_COMMAND) + PROGRESS = @ echo + endif + +define IGNORED_BY_GNU_MAKE: +.endif + +.ifndef V + # seen by BSD make, not by GNU make + DBPROC = @ echo " [XSLTPROC]" $(.ALLSRC) && $(DBPROC_COMMAND) 2>/dev/null + GENERATE = @ echo " [GENERATE]" $(.TARGET) && $(PERL_COMMAND) $(GENERATE_SCRIPT) + TAR = @ echo " [TAR] " $(.TARGET) && $(TAR_COMMAND) + GZIP = @ echo " [GZIP] " $(.TARGET:.gz=) && $(GZIP_COMMAND) + RM_QUIET = @ $(RM_COMMAND) + PROGRESS = @ echo +.endif + +# neither .endif nor endef can be followed by a colon; each creates +# warnings or errors in one or other version of make. we need some +# magic to make them both work. Luckily, .endfor ignores the colon. + +.for DUMMY in $(NO_SUCH_VARIABLE) +endef +.endfor : + +PROGRESS_RM = $(PROGRESS) " [RM] " + DOCBOOK_DIR = docbook HTML_DIR = htmlguide MAN_DIR = man @@ -15,8 +78,6 @@ VPATH = $(DOCBOOK_DIR) .SUFFIXES: .html .xml .gz .1 .5 .8 -all: docs - docs: instguide adminguide manpages @mkdir -p $(HTML_DIR)/images @cp $(DOCBOOK_DIR)/html/images/*.png $(HTML_DIR)/images/. @@ -25,19 +86,20 @@ adminguide: $(DOCBOOK_DIR)/ExceptionCodes.xml $(HTML_DIR)/adminguide/index.html -# all sources ($>) is exactly the right args for xsltproc +# $^ gives all sources on GNU make, and nothing on BSD make +# $> gives all sources on BSD make, and nothing on GNU make $(HTML_DIR)/adminguide/index.html: $(BOOKXSL) $(DOCBOOK_DIR)/adminguide.xml - $(DBPROC) -o $(HTML_DIR)/adminguide/ $> + $(DBPROC) -o $(HTML_DIR)/adminguide/ $^ $> instguide: $(HTML_DIR)/instguide/index.html $(HTML_DIR)/instguide/index.html: $(BOOKXSL) $(DOCBOOK_DIR)/instguide.xml - $(DBPROC) -o $(HTML_DIR)/instguide/ $> + $(DBPROC) -o $(HTML_DIR)/instguide/ $^ $> -# $< is empty on BSD make when making this rule, $> has all sources -# $< has the target on GNU make, $> is empty +# On BSD make, $> contains all sources and $^ is empty +# On GNU make, $^ contains all sources and $> is empty $(DOCBOOK_DIR)/ExceptionCodes.xml: ../ExceptionCodes.txt - perl tools/generate_except_xml.pl $< $> $@ + $(GENERATE) $> $^ $@ manpages: man-dirs man-nroff man-html @@ -66,39 +128,56 @@ man-html: $(HTML_FILES) +# $^ gives all sources on GNU make, and nothing on BSD make + # GNU make -$(HTML_DIR)/man-html/%.html: $(DOCBOOK_DIR)/%.xml $(NOCHUNKBOOKXSL) - $(DBPROC) -o $@ $(NOCHUNKBOOKXSL) $< +$(HTML_DIR)/man-html/%.html: $(NOCHUNKBOOKXSL) $(DOCBOOK_DIR)/%.xml + $(DBPROC) -o $@ $^ # GNU make -$(MAN_DIR)/%.8.gz: $(DOCBOOK_DIR)/%.xml - $(DBPROC) -o $(@:.gz=) $(MANXSL) $< - gzip $(@:.gz=) +$(MAN_DIR)/%.8: $(MANXSL) $(DOCBOOK_DIR)/%.xml + $(DBPROC) -o $@ $^ # GNU make -$(MAN_DIR)/%.5.gz: $(DOCBOOK_DIR)/%.xml - $(DBPROC) -o $(@:.gz=) $(MANXSL) $< - gzip $(@:.gz=) +$(MAN_DIR)/%.8.gz: $(MAN_DIR)/%.8 + $(GZIP) $< +# GNU make +$(MAN_DIR)/%.5: $(MANXSL) $(DOCBOOK_DIR)/%.xml $(MANXSL) + $(DBPROC) -o $@ $^ + +# GNU make +$(MAN_DIR)/%.5.gz: $(MAN_DIR)/%.5 + $(GZIP) $< + # BSD make: the final colon (:) is required to make the .for and .endfor # lines valid in GNU make. It creates (different) dummy rules in GNU and # BSD make. Both dummy rules are harmless. .for MAN_PAGE in $(NROFF_PAGES) : -$(MAN_DIR)/$(MAN_PAGE).gz: $(DOCBOOK_DIR)/$(MAN_PAGE:R).xml - $(DBPROC) -o $(.TARGET:.gz=) $(MANXSL) $> - gzip $(@:.gz=) +$(MAN_DIR)/$(MAN_PAGE).gz: $(MANXSL) $(DOCBOOK_DIR)/$(MAN_PAGE:R).xml + $(DBPROC) -o $(.TARGET:.gz=) $(.ALLSRC) + $(GZIP) $(.TARGET:.gz=) -$(HTML_DIR)/man-html/$(MAN_PAGE:R).html: $(DOCBOOK_DIR)/$(MAN_PAGE:R).xml - $(DBPROC) -o $@ $(NOCHUNKBOOKXSL) $> +$(HTML_DIR)/man-html/$(MAN_PAGE:R).html: $(NOCHUNKBOOKXSL) \ +$(DOCBOOK_DIR)/$(MAN_PAGE:R).xml + $(DBPROC) -o $(.TARGET) $(.ALLSRC) .endfor : -dockit: clean docs - tar zcf documentation-kit-0.10.tar.gz $(HTML_DIR)/ +dockit: clean docs documentation-kit-0.10.tar.gz +documentation-kit-0.10.tar.gz: + $(TAR) zcf documentation-kit-0.10.tar.gz $(HTML_DIR)/ + clean: - rm -f $(HTML_FILES) - rm -f $(NROFF_FILES) - rm -f $(DOCBOOK_DIR)/ExceptionCodes.xml - rm -f documentation-kit-0.10.tar.gz + $(PROGRESS_RM) "$(HTML_DIR)/man-html/*.html" + $(RM_QUIET) $(HTML_FILES) + $(PROGRESS_RM) "$(MAN_DIR)/*.[58].gz" + $(RM_QUIET) $(NROFF_FILES) + + $(PROGRESS_RM) "$(DOCBOOK_DIR)/ExceptionCodes.xml" + $(RM_QUIET) $(DOCBOOK_DIR)/ExceptionCodes.xml + + $(PROGRESS_RM) "documentation-kit-0.10.tar.gz" + $(RM_QUIET) documentation-kit-0.10.tar.gz From boxbackup-dev at boxbackup.org Wed Aug 26 00:25:19 2009 From: boxbackup-dev at boxbackup.org (boxbackup-dev at boxbackup.org) Date: Wed, 26 Aug 2009 00:25:19 +0100 (BST) Subject: [Box Backup-commit] COMMIT r2551 - box/trunk/lib/common Message-ID: <20090825232519.F388D32508E@www.boxbackup.org> Author: chris Date: 2009-08-26 00:25:19 +0100 (Wed, 26 Aug 2009) New Revision: 2551 Modified: box/trunk/lib/common/Utils.cpp box/trunk/lib/common/Utils.h Log: Make the version of Box Backup available for use in Boxi. Modified: box/trunk/lib/common/Utils.cpp =================================================================== --- box/trunk/lib/common/Utils.cpp 2009-08-22 20:22:41 UTC (rev 2550) +++ box/trunk/lib/common/Utils.cpp 2009-08-25 23:25:19 UTC (rev 2551) @@ -30,6 +30,11 @@ #include "MemLeakFindOn.h" +std::string GetBoxBackupVersion() +{ + return BOX_VERSION; +} + // -------------------------------------------------------------------------- // // Function Modified: box/trunk/lib/common/Utils.h =================================================================== --- box/trunk/lib/common/Utils.h 2009-08-22 20:22:41 UTC (rev 2550) +++ box/trunk/lib/common/Utils.h 2009-08-25 23:25:19 UTC (rev 2551) @@ -15,6 +15,8 @@ #include "MemLeakFindOn.h" +std::string GetBoxBackupVersion(); + void SplitString(const std::string &String, char SplitOn, std::vector &rOutput); #ifdef SHOW_BACKTRACE_ON_EXCEPTION