]> git.michaelhowe.org Git - packages/b/bup.git/log
packages/b/bup.git
12 years agoDocumentation/bup-tag.md: fix spelling error "retreive"
Robert S. Edmonds [Fri, 9 Aug 2013 01:11:18 +0000 (21:11 -0400)]
Documentation/bup-tag.md: fix spelling error "retreive"

12 years agodebian/control: update vcs links
Robert S. Edmonds [Fri, 9 Aug 2013 01:09:30 +0000 (21:09 -0400)]
debian/control: update vcs links

fixes:

I: bup source: vcs-field-not-canonical http://git.debian.org/?p=collab-maint/bup.git;a=shortlog;h=refs/heads/debian http://anonscm.debian.org/gitweb/?p=collab-maint/bup.git;a=shortlog;h=refs/heads/debian

I: bup source: vcs-field-not-canonical git://git.debian.org/collab-maint/bup.git git://anonscm.debian.org/collab-maint/bup.git

12 years agodebian/copyright: update debian packaging copyright
Robert S. Edmonds [Fri, 9 Aug 2013 01:06:45 +0000 (21:06 -0400)]
debian/copyright: update debian packaging copyright

12 years agodebian/control: remove ${python:Depends} from bup-fuse, bup-web
Robert S. Edmonds [Fri, 9 Aug 2013 01:06:06 +0000 (21:06 -0400)]
debian/control: remove ${python:Depends} from bup-fuse, bup-web

they are not python module packages

12 years agodebian/bup.install: new
Robert S. Edmonds [Fri, 9 Aug 2013 00:45:09 +0000 (20:45 -0400)]
debian/bup.install: new

12 years agodebian/bup-{fuse,web}.install: fix these, these were totally broken
Robert S. Edmonds [Fri, 9 Aug 2013 00:41:33 +0000 (20:41 -0400)]
debian/bup-{fuse,web}.install: fix these, these were totally broken

12 years agodebian/menu: remove
Robert S. Edmonds [Fri, 9 Aug 2013 00:38:52 +0000 (20:38 -0400)]
debian/menu: remove

fixes:

W: bup: menu-command-not-in-package usr/share/menu/bup:2 usr/bin/bup

12 years agodebian/control: bump standards-version
Robert S. Edmonds [Fri, 9 Aug 2013 00:38:31 +0000 (20:38 -0400)]
debian/control: bump standards-version

fixes:

W: bup source: out-of-date-standards-version 3.9.3 (current is 3.9.4)

12 years agodebian/control: add direct python dependency for bup-fuse, bup-web
Robert S. Edmonds [Fri, 9 Aug 2013 00:37:58 +0000 (20:37 -0400)]
debian/control: add direct python dependency for bup-fuse, bup-web

fixes:

E: bup-fuse: python-script-but-no-python-dep usr/lib/bup/cmd/bup-web
E: bup-web: python-script-but-no-python-dep usr/lib/bup/cmd/bup-fuse

12 years agodebian/control: put bup-doc in Section: doc
Robert S. Edmonds [Fri, 9 Aug 2013 00:37:14 +0000 (20:37 -0400)]
debian/control: put bup-doc in Section: doc

fixes "W: bup-doc: wrong-section-according-to-package-name bup-doc => doc"

12 years agotmetadata.py: skip test_handling_of_incorrect_existing_linux_xattrs() when running...
Robert S. Edmonds [Fri, 9 Aug 2013 00:28:39 +0000 (20:28 -0400)]
tmetadata.py: skip test_handling_of_incorrect_existing_linux_xattrs() when running under fakeroot

it's not possible to do a loopback mount when running under fakeroot
("mount: only root can do that").

12 years agodebian/rules: don't bother with --parallel
Robert S. Edmonds [Fri, 9 Aug 2013 00:15:23 +0000 (20:15 -0400)]
debian/rules: don't bother with --parallel

12 years agodebian/bup.install: remove
Robert S. Edmonds [Fri, 9 Aug 2013 00:13:57 +0000 (20:13 -0400)]
debian/bup.install: remove

12 years agodebian/control: build-depend on par2
Robert S. Edmonds [Fri, 9 Aug 2013 00:13:21 +0000 (20:13 -0400)]
debian/control: build-depend on par2

12 years agoRevert "depend on external tornado"
Robert S. Edmonds [Fri, 9 Aug 2013 00:10:04 +0000 (20:10 -0400)]
Revert "depend on external tornado"

This reverts commit f5e4ddf49be6f8b0f33bdf40596200a0aa9670e7.

Conflicts:
debian/control

12 years agodebian/changelog: 0.25~rc2-1
Robert S. Edmonds [Fri, 9 Aug 2013 00:04:52 +0000 (20:04 -0400)]
debian/changelog: 0.25~rc2-1

12 years agodebian/: split out documentation into bup-doc package
Robert S. Edmonds [Thu, 8 Aug 2013 23:55:18 +0000 (19:55 -0400)]
debian/: split out documentation into bup-doc package

12 years agoactually, generate lib/bup/_version.py ourselves
Robert S. Edmonds [Thu, 8 Aug 2013 23:53:08 +0000 (19:53 -0400)]
actually, generate lib/bup/_version.py ourselves

12 years agodebian/control: depend on python-pylibacl and python-pyxattr
Robert S. Edmonds [Thu, 8 Aug 2013 23:14:02 +0000 (19:14 -0400)]
debian/control: depend on python-pylibacl and python-pyxattr

12 years agodebian/control: simplify git dependency
Robert S. Edmonds [Thu, 8 Aug 2013 23:12:17 +0000 (19:12 -0400)]
debian/control: simplify git dependency

oldstable now has git 1:1.7.2.5-3.

12 years agodebian/control: promote par2 from Recommends to Depends
Robert S. Edmonds [Thu, 8 Aug 2013 23:10:34 +0000 (19:10 -0400)]
debian/control: promote par2 from Recommends to Depends

12 years agodebian/: split out bup-fuse and bup-web commands into their own packages
Robert S. Edmonds [Thu, 8 Aug 2013 23:08:16 +0000 (19:08 -0400)]
debian/: split out bup-fuse and bup-web commands into their own packages

12 years agodebian/: try to fix _version.py handling
Robert S. Edmonds [Thu, 8 Aug 2013 22:44:34 +0000 (18:44 -0400)]
debian/: try to fix _version.py handling

12 years agoMerge branch 'master' into debian
Robert S. Edmonds [Thu, 8 Aug 2013 22:03:42 +0000 (18:03 -0400)]
Merge branch 'master' into debian

Conflicts:
Makefile

12 years ago_apply_linux_attr_rec: treat ENOSYS like EOPNOTSUPP (seen via sshfs).
Rob Browning [Wed, 31 Jul 2013 16:34:29 +0000 (11:34 -0500)]
_apply_linux_attr_rec: treat ENOSYS like EOPNOTSUPP (seen via sshfs).

After reports that set_linux_file_attr() produces ENOSYS on sshfs,
raise raise ApplyError for ENOSYS too.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years ago_create_via_common_rec: treat rmdir() EEXIST like ENOTEMPTY.
Rob Browning [Wed, 31 Jul 2013 16:32:17 +0000 (11:32 -0500)]
_create_via_common_rec: treat rmdir() EEXIST like ENOTEMPTY.

See rmdir(2):

       ENOTEMPTY
              pathname contains entries other than .  and ..  ; or,
              pathname has ..  as its final component.  POSIX.1-2001
              also allows EEXIST for this condition.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoCurrently bup only indexes physical parent paths; adjust tests.
Zoran Zaric [Mon, 29 Jul 2013 17:23:10 +0000 (19:23 +0200)]
Currently bup only indexes physical parent paths; adjust tests.

Fix tests that fail on systems where components of the parent path are
symlinks (like /tmp on OS X).  i.e. if you run:

  bup index /x/y/z

bup might actually store

  /a/z...

if y is a symlink to a.  See index-cmd.py and index.reduce_paths().

Signed-off-by: Zoran Zaric <zz@zoranzaric.de>
[rlb@defaultvalue.org: handle test.sh fix differently; add realpath();
 adjust commit message.]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoMakefile: add any environmental CFLAGS to the end of the effective CFLAGS.
Rob Browning [Fri, 5 Jul 2013 17:06:16 +0000 (12:06 -0500)]
Makefile: add any environmental CFLAGS to the end of the effective CFLAGS.

For now, just do the simplest thing.

Thanks to Greg Troxel <gdt@ir.bbn.com> for reporting the issue.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoCompletely disable ACL support on OS X for now.
Rob Browning [Thu, 4 Jul 2013 20:32:07 +0000 (15:32 -0500)]
Completely disable ACL support on OS X for now.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoconfig/configure: add and use bup_find_prog; remove unused MF_PATH_INCLUDEs.
Rob Browning [Thu, 4 Jul 2013 19:12:22 +0000 (14:12 -0500)]
config/configure: add and use bup_find_prog; remove unused MF_PATH_INCLUDEs.

Pull all the common program search code into bup_find_prog() and use
it everywhere.  This also makes configure's output a bit more
consistent in style/content.

Make it obvious that at the moment bup doesn't pay any attention to a
PYTHON or GIT environment variable value. i.e. bup currently ignores a
setting like PYTHON=python2.7.

Bup also doesn't use MF_PATH_INCLUDE settings yet, so remove them.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agogit.py: flush idx_map before close so FILE* operations will see changes.
Rob Browning [Sat, 8 Jun 2013 15:25:33 +0000 (10:25 -0500)]
git.py: flush idx_map before close so FILE* operations will see changes.

Flush idx_map (msync()) before closing it, since it doesn't look like
POSIX guarantees that a matching FILE* (i.e. idx_f) will see the
parallel changes if we don't.

From the original report:

  After `bup save`, `git fsck` would show messages like
  "Packfile index for %s SHA1 mismatch"
  This indicated a bad trailing checksum on the pack index file.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reported-by: Alan Jenkins <alan.christopher.jenkins@gmail.com>
Reviewed-by: Alan Jenkins <alan.christopher.jenkins@gmail.com>
Tested-by: Alan Jenkins <alan.christopher.jenkins@gmail.com>
12 years agoFix completely broken invocations of t/root-status.
Rob Browning [Fri, 7 Jun 2013 05:22:58 +0000 (00:22 -0500)]
Fix completely broken invocations of t/root-status.

No idea what I was thinking.

Thanks to Sascha Silbe <sascha-ml-reply-to-2013-2@silbe.org> for the
report.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoSkip the large bloom filter test if mmap fails on 32-bit archtectures.
Rob Browning [Sat, 25 May 2013 20:25:11 +0000 (15:25 -0500)]
Skip the large bloom filter test if mmap fails on 32-bit archtectures.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agot/test.sh: skip two "tree SHA1 didn't change" tests on Cygwin for now.
Rob Browning [Mon, 27 May 2013 16:51:23 +0000 (11:51 -0500)]
t/test.sh: skip two "tree SHA1 didn't change" tests on Cygwin for now.

Apparently Cygwin has some unusual behaviors with respect to access
times, so disable these two tests for now.

Possibly related: http://cygwin.com/ml/cygwin/2007-06/msg00436.html

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoREADME.md: add Cygwin dependencies.
Rob Browning [Mon, 27 May 2013 16:35:07 +0000 (11:35 -0500)]
README.md: add Cygwin dependencies.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agot/compare-trees: don't check ACLs on Cygwin (no support).
Rob Browning [Mon, 27 May 2013 16:15:40 +0000 (11:15 -0500)]
t/compare-trees: don't check ACLs on Cygwin (no support).

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoRemove lib.sh actually-root in favor of t/root-status.
Rob Browning [Sun, 26 May 2013 17:16:40 +0000 (12:16 -0500)]
Remove lib.sh actually-root in favor of t/root-status.

Create a t/root-status command that outputs root, fake, or none and
that uses the same cross-platform logic as helpers.py is_superuser().
Use it everywhere.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agometadata.py: use socket() instead of mknod(...IF_SOCK) on Cygwin.
Rob Browning [Sun, 26 May 2013 16:05:56 +0000 (11:05 -0500)]
metadata.py: use socket() instead of mknod(...IF_SOCK) on Cygwin.

Apparently os.mknod(...IF_SOCK) fails on Cygwin, but our t/mksock tool
(which uses socket()) works just fine, so use that in
_create_via_common_rec() when on Cygwin.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoUse sys.platform instead of platform.system().
Rob Browning [Mon, 27 May 2013 15:27:51 +0000 (10:27 -0500)]
Use sys.platform instead of platform.system().

If nothing else, the former is computed at compile time, and so should
be more efficient.  Use the recommended "startswith()" idiom.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agometa-cmd.py: mention --list in the invocation summary.
Rob Browning [Mon, 27 May 2013 17:26:30 +0000 (12:26 -0500)]
meta-cmd.py: mention --list in the invocation summary.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoREADME.md: describe mmap problems with limited address spaces.
Rob Browning [Sat, 25 May 2013 21:24:58 +0000 (16:24 -0500)]
README.md: describe mmap problems with limited address spaces.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoCatch errors when restoring Linux attrs into xfs or btrfs
Yung-Chin Oei [Mon, 15 Apr 2013 14:34:08 +0000 (15:34 +0100)]
Catch errors when restoring Linux attrs into xfs or btrfs

Both xfs and btrfs turn out to return EOPNOTSUPP, rather than ENOTTY,
when we try to apply Linux attrs that they do not support.  This patch
improves matters in that it ensures we can restore into these file
systems without crashing, but does not quite address all issues yet:

- if any of the attributes we try to apply is not supported, none of
  them will be applied to the file at all
- the user will typically drown in error output; eg. for a backup
  originating from an ext4 file system, we can expect endless error
  output relating to the extents-flag not being supported on xfs/btrfs

Signed-off-by: Yung-Chin Oei <yungchin@yungchin.nl>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
12 years agoDocumentation: replace ~/.bup with $BUP_DIR in bup-index.md and bup-save.md.
Gabriel Filion [Tue, 14 May 2013 06:53:05 +0000 (02:53 -0400)]
Documentation: replace ~/.bup with $BUP_DIR in bup-index.md and bup-save.md.

When one is not using the default bupdir placement, then those files
aren't found inside ~/.bup, but wherever "-d /path.." or $BUP_DIR are
pointing to.

Thanks to krichter722@aol.de for mentioning this.

Signed-off-by: Gabriel Filion <gabster@lelutin.ca>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
12 years agodebian/changelog: 0.25~git20130505-1
Robert S. Edmonds [Mon, 6 May 2013 19:43:22 +0000 (15:43 -0400)]
debian/changelog: 0.25~git20130505-1

12 years agodebian/control: don't build-dep on pandoc on mips
Robert S. Edmonds [Mon, 6 May 2013 19:41:03 +0000 (15:41 -0400)]
debian/control: don't build-dep on pandoc on mips

12 years agoMerge branch 'master' into debian
Robert S. Edmonds [Mon, 6 May 2013 19:32:33 +0000 (15:32 -0400)]
Merge branch 'master' into debian

12 years agoRevert "rewrite asserts to be side-effect free"
Robert S. Edmonds [Mon, 6 May 2013 19:32:19 +0000 (15:32 -0400)]
Revert "rewrite asserts to be side-effect free"

This reverts commit d43cf2b3c134480cbaab0356d5dd4c7090cd33b2.

12 years agoRevert "skip tests that require root privileges"
Robert S. Edmonds [Mon, 6 May 2013 19:30:54 +0000 (15:30 -0400)]
Revert "skip tests that require root privileges"

This reverts commit d9cce5fe6ae99fb5a335765a7c0f2ac19568bf22.

12 years agofsck-cmd.py: simplify do_pack() else clause.
Rob Browning [Sun, 5 May 2013 21:29:35 +0000 (16:29 -0500)]
fsck-cmd.py: simplify do_pack() else clause.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agofsck-cmd.py: add par2_exists as a do_pack() argument.
Rob Browning [Sun, 5 May 2013 21:26:27 +0000 (16:26 -0500)]
fsck-cmd.py: add par2_exists as a do_pack() argument.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoRework "bup fsck" output; allow less verbosity.
Rob Browning [Sat, 27 Apr 2013 15:48:45 +0000 (10:48 -0500)]
Rework "bup fsck" output; allow less verbosity.

Only print debug messages when verbose > 1 (i.e. -vv).

Use log() to print error messages to stderr instead of stdout.

When verbose level is at least 1, print a single descriptive line to
stdout.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agorm-between-index-and-save.sh: fix race condition.
Tim Riemenschneider [Mon, 15 Apr 2013 19:54:18 +0000 (21:54 +0200)]
rm-between-index-and-save.sh: fix race condition.

Fix a timing issue that often caused the test to fail -- the (removed)
file "foo" was marked as invalid in the index when it shouldn't have
been because it was modified less than tmax before the index run.

Insert a "bup tick" just before "bup index" so that foo won't be
marked invalid by the second run.

Don't expect the second "bup save" to fail since foo will now be valid
in the index (and hence ignored), even though it is no longer
available.  The removal will be noticed by the next index+save.

When removing directories, the outcome is different: since metadata is
saved per directory, "bup save" notices that the directory is missing
and logs an "errno 2" error, but does not crash, which is what the
tested patch is concerned with.  A third index+save run completes
without error.

This also means that without a "bup tick" before an index run, calls,
"bup save" might exit with non-zero exitcode when files/directories
are removed after bup index, but bup is not guaranteed to notice
missing files.

Signed-off-by: Tim Riemenschneider <git@tim-riemenschneider.de>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
12 years agobup-save.md: note that restoration requires --name or the commit/tree id.
Rob Browning [Sat, 27 Apr 2013 16:35:35 +0000 (11:35 -0500)]
bup-save.md: note that restoration requires --name or the commit/tree id.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agotgit.py: set BUP_MAIN_EXE and BUP_DIR in testpacks().
Rob Browning [Sun, 14 Apr 2013 19:02:15 +0000 (14:02 -0500)]
tgit.py: set BUP_MAIN_EXE and BUP_DIR in testpacks().

Set these variables in testpacks(), just as we do for
test_pack_name_lookup(), since it also depends on path.exe().

This was causing 'make check' to fail on Cygwin, and could be
reproduced on Linux by explicitly invoking tgit.py via "./wvtest.py
lib/bup/t/tgit.py".

Reported-by: Will Rouesnel <w.rouesnel@gmail.com>
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years ago.dir-locals: rename python-indent (obsolete) to python-indent-offset.
Rob Browning [Sat, 13 Apr 2013 22:43:33 +0000 (17:43 -0500)]
.dir-locals: rename python-indent (obsolete) to python-indent-offset.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoAdd tests for file and dir removal between index and save.
Tim Riemenschneider [Wed, 6 Mar 2013 13:33:22 +0000 (14:33 +0100)]
Add tests for file and dir removal between index and save.

Make sure the removals don't cause bup save to immediately abort.

Signed-off-by: Tim Riemenschneider <git@tim-riemenschneider.de>
[rlb@defaultvalue.org: move tests to their own file.]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agosave-cmd.py: don't crash when a path disappears between index and save.
Damien Robert [Tue, 20 Nov 2012 20:52:45 +0000 (21:52 +0100)]
save-cmd.py: don't crash when a path disappears between index and save.

Protect calls to metadata.from_path() with a try/catch and defer
errors via add_error() instead of just crashing.

Signed-off-by: Damien Robert <damien.olivier.robert@gmail.com>
[git@tim-riemenschneider.de: rebase to current tmp/pending/meta: since
 metadata is (now) stored in the index, only 1 of 2 hunks still
 applies (race condition between reading the file for its content and
 stat-ing it for metadata).]
[rlb@defaultvalue.org: edit commit message; squash file and dir
 removal fixes into this commit; limit the scope of the try/catch to
 the from_path() call, and put the remaining code in an else clause.]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoAdd support for "bup restore --exclude-rx <pattern> ...".
Rob Browning [Sat, 18 Aug 2012 20:35:23 +0000 (15:35 -0500)]
Add support for "bup restore --exclude-rx <pattern> ...".

When --exclude-rx <pattern> is provided to bup restore, don't restore
any path matching <pattern>, which must be a Python regular expression
(http://docs.python.org/library/re.html).  The pattern will be
compared against the full path, without anchoring, so "x/y" will match
"ox/yard" or "box/yards".  To exclude the contents of /tmp, but not
the directory itself, use "^/tmp/.".

You may check the behavior at runtime by setting BUP_DEBUG=2 in the
environment.

Thanks to Zoran Zaric <zz@zoranzaric.de> for reporting a bug in an
earlier version of this patch.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
12 years agoAdd support for "bup index --exclude-rx <pattern> ...".
Rob Browning [Sat, 21 Jul 2012 20:09:47 +0000 (15:09 -0500)]
Add support for "bup index --exclude-rx <pattern> ...".

When --exclude-rx <pattern> is provided to bup index, exclude any path
matching <pattern>, which must be a Python regular expression
(http://docs.python.org/library/re.html).  The pattern will be
compared against the full path, without anchoring, so "x/y" will match
"ox/yard" or "box/yards".  To exclude the contents of /tmp, but not
the directory itself, use "^/tmp/.".

You may check the behavior at runtime by setting BUP_DEBUG=2 in the
environment.

Thanks to Zoran Zaric <zz@zoranzaric.de> for reporting a bug in an
earlier version of this patch.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
12 years agot/test.sh: work around NetBSD setting -A for 'ls' when root (again).
Zoran Zaric [Sat, 23 Mar 2013 20:36:17 +0000 (21:36 +0100)]
t/test.sh: work around NetBSD setting -A for 'ls' when root (again).

Apply the same workaround for the "compression9" tests that was
applied in commit 51bd5832b391f4c128cc42a3a5970733775f1ba7.

Signed-off-by: Zoran Zaric <zz@zoranzaric.de>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
12 years agoLICENSE: mention the lib/tornado license in lib/tornado/README.
Rob Browning [Sat, 23 Mar 2013 19:41:08 +0000 (14:41 -0500)]
LICENSE: mention the lib/tornado license in lib/tornado/README.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agowvtest.py: add a fallback definition of relpath() for Python < 2.6.
Thomas Haller [Sun, 3 Mar 2013 19:31:57 +0000 (20:31 +0100)]
wvtest.py: add a fallback definition of relpath() for Python < 2.6.

Since bup still supports Python 2.5 and relpath was added to Python in
2.6, add an os.path.relpath replacement, adapted from CPython source
(tag v2.6, file Lib/posixpath.py, hg-commit 95fff5a6a276).

Signed-off-by: Thomas Haller <thom311@gmail.com>
[rlb@defaultvalue.org: update LICENSE and add comment to code about
 updating LICENSE.]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agorestore-cmd.py: make sure restore paths have at least two components.
Rob Browning [Sat, 16 Mar 2013 21:50:18 +0000 (16:50 -0500)]
restore-cmd.py: make sure restore paths have at least two components.

Reported-by: Tim Riemenschneider <t.riemenschneider@detco.de>
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoAdd tests for index --no-check-device, and support for t/mnt.
Rob Browning [Sun, 17 Feb 2013 03:20:50 +0000 (21:20 -0600)]
Add tests for index --no-check-device, and support for t/mnt.

Add support for t/mnt; anything mounted there will be cleaned up
during "make clean".

Thanks to Zak Wilcox <iwilcox@iwilcox.me.uk> for an earlier version of
these tests.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoAdd index --no-check-device to the index manpage.
Rob Browning [Sun, 17 Feb 2013 04:05:24 +0000 (22:05 -0600)]
Add index --no-check-device to the index manpage.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoAdd a --no-check-device option to bup index (cf. tar).
Zak Wilcox [Fri, 1 Jun 2012 09:10:36 +0000 (10:10 +0100)]
Add a --no-check-device option to bup index (cf. tar).

Ignore stat.st_dev when comparing files against existing index entries, like
git does without #define USE_STDEV:

  http://www.kernel.org/pub/software/scm/git/docs/v1.7.10.1/technical/racy-git.txt

See also: "info tar".

Signed-off-by: Zak Wilcox <iwilcox@iwilcox.me.uk>
[rlb@defaultvalue.org: change original --ignore-dev to --no-check-device to match tar.
 Adjust code to work with current master.
 Remove tests -- will be reintroduced shortly.]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoIgnore artefacts from sampledata
Gabriel Filion [Sun, 17 Mar 2013 22:24:08 +0000 (18:24 -0400)]
Ignore artefacts from sampledata

9b5ae5f53e introduced the creation of some symlinks to avoid issues on
Cygwin. "make" now leaves the repository in a dirty state since we
forgot to exclude those symlinks.

The symlinks in question are products of the build/test process so we
need to avoid commiting them.

Signed-off-by: Gabriel Filion <gabster@lelutin.ca>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
12 years agoconfigure-sampledata: test -h before -e when appropriate in --clean.
Rob Browning [Sun, 17 Mar 2013 18:03:03 +0000 (13:03 -0500)]
configure-sampledata: test -h before -e when appropriate in --clean.

Use "test -h" before "test -e" for items that might be dangling
symlinks since "test -e" returns false in that case.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoCreate symlinks in t/configure-sampledata; remove them from git.
Rob Browning [Sat, 9 Mar 2013 20:27:34 +0000 (14:27 -0600)]
Create symlinks in t/configure-sampledata; remove them from git.

Since git doesn't always handle symlinks the way bup expects (Cygwin),
don't keep them in git, create them via "t/configure-sampledata
--setup".

This also provides a place to handle anything else that falls outside
git's purview that we might want to add.

Integrate configure-sampledata into the makefile clean and all
targets.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoAdd "set -eo pipefail" to "exclude" and "exclude-from" tests.
Rob Browning [Sun, 17 Mar 2013 17:23:32 +0000 (12:23 -0500)]
Add "set -eo pipefail" to "exclude" and "exclude-from" tests.

Don't allow non-tests to silently fail (i.e. mkdir, touch, echo, rm,
etc.).  Eventually all test code should have similar behavior.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agobup drecurse/index: allow non-directory --exclude and --exclude-from paths.
Jakob Matthes [Sun, 10 Mar 2013 18:10:38 +0000 (19:10 +0100)]
bup drecurse/index: allow non-directory --exclude and --exclude-from paths.

Previously bup only allowed directory exclusions.

Signed-off-by: Jakob Matthes <jakob.matthes@gmail.com>
Reviewed-by: Gabriel Filion <lelutin@gmail.com>
[rlb@defaultvalue.org: change test file from g to j to avoid conflict
 with subsequent "exclude-from" test; add WVPASS to mkdir so problem
 is evident; edit commit message.]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agometadata.py: ignore posix1e if platform.system() includes CYGWIN.
Rob Browning [Sat, 16 Mar 2013 19:00:32 +0000 (14:00 -0500)]
metadata.py: ignore posix1e if platform.system() includes CYGWIN.

Reported-by: Will Rouesnel <w.rouesnel@gmail.com>
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agotmetadata.py: skip test_apply_to_path_restricted_access() on Cygwin.
Rob Browning [Sat, 16 Mar 2013 18:17:36 +0000 (13:17 -0500)]
tmetadata.py: skip test_apply_to_path_restricted_access() on Cygwin.

Reported-by: Will Rouesnel <w.rouesnel@gmail.com>
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agometadata.py: always set xattr to None by default.
Rob Browning [Sat, 16 Mar 2013 17:52:40 +0000 (12:52 -0500)]
metadata.py: always set xattr to None by default.

Reported-by: Will Rouesnel <w.rouesnel@gmail.com>
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoDon't even test for Linux xattrs if platform.system() doesn't include Linux.
Rob Browning [Sat, 16 Mar 2013 16:00:24 +0000 (11:00 -0500)]
Don't even test for Linux xattrs if platform.system() doesn't include Linux.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoTake additional precautions with the Python/C conversions in _helpers.c.
Rob Browning [Mon, 18 Feb 2013 19:37:58 +0000 (13:37 -0600)]
Take additional precautions with the Python/C conversions in _helpers.c.

bitmatch(): Use Py_ssize_t for byte, to match the values it's compared
against.  Make sure the result will fit in the Python destination.

bloom_add(): Use "n" for the len conversion since len is Py_ssize_t.

bloom_contains(): Make sure the Python -> C converted values' ranges
are appropriate before using them.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Mark J Hewitt <mjh@idnet.com>
12 years agoUse the correct C types when converting between C and Python in _helpers.c.
Mark J Hewitt [Mon, 1 Oct 2012 16:17:28 +0000 (17:17 +0100)]
Use the correct C types when converting between C and Python in _helpers.c.

Previously, bup might fail when handling large repositories.  For
example:

    Traceback (most recent call last):
     File "/usr/lib/bup/cmd/bup-midx", line 258, in <module>
       do_midx_dir(path)
     File "/usr/lib/bup/cmd/bup-midx", line 199, in do_midx_dir
       all = list(do_midx_group(path, part1)) + part2
     File "/usr/lib/bup/cmd/bup-midx", line 216, in do_midx_group
       rv = _do_midx(path, None, sublist, gprefix)
     File "/usr/lib/bup/cmd/bup-midx", line 123, in _do_midx
       count = merge_into(fmap, bits, total, inp)
  OverflowError: size does not fit in an int
  ['/usr/bin/bup', 'midx', '--auto', '--dir',
  '/backup/bup/repository/objects/pack']: returned 1

Signed-off-by: Mark J Hewitt <m.hewitt@computer.org>
[rlb@defaultvalue.org: Remove vestigal header includes.
 Remove Py_ssize_t definition for Python < 2.5.]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoAdd a test to check that bup save without an index fails.
Rob Browning [Mon, 11 Mar 2013 23:32:55 +0000 (18:32 -0500)]
Add a test to check that bup save without an index fails.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agosave-cmd.py: insist on having an index; check for the primary index file.
Jean-Baptiste Denis [Fri, 8 Mar 2013 22:43:26 +0000 (23:43 +0100)]
save-cmd.py: insist on having an index; check for the primary index file.

Insist on having an index, and report an error (with a suggestion to
run "bup index") if one isn't found.

Previously (at least as recently as 0.25-rc1), bup save would just
create an empty tree if there was no index.  The metadata work
unintentionally broke that behavior.

For now, treat a missing index as an error under the assumption that
it's not likely to be intentional.  If a good use case for the
previous behavior is presented, we can always restore it.

Signed-off-by: Jean-Baptiste Denis <jbd@jbdenis.net>
[rlb@defaultvalue.org: adjust commit message and save-cmd.py error message.]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoNormalize stat(2) timespecs in _helpers.c.
Rob Browning [Sun, 17 Feb 2013 16:33:08 +0000 (10:33 -0600)]
Normalize stat(2) timespecs in _helpers.c.

Previously, the code required timespecs to have a nanosecond value
between 0 and 999999999, because that's what Linux appeared to
produce, but other platforms don't (i.e. Cygwin) -- so normalize the
system values to match expectations.

In particular, look for negative nanosecond values (must be greater
than -10**9), and if found, rewrite the timespec with non-negative
nanoseconds (still less than 10**9).

Thanks to Will Rouesnel <w.rouesnel@gmail.com> for reporting the
problem and posting an initial patch.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agofind_dir_item_metadata_by_name(): wait for the right item name.
Rob Browning [Sun, 10 Mar 2013 16:25:47 +0000 (11:25 -0500)]
find_dir_item_metadata_by_name(): wait for the right item name.

Fix a bug in the previous patch:

  Include metadata when asked to restore individual non-directory paths.
  53649c18ec3db90f80ff4657315009538d4333f3

Don't return whatever metadata you have the first time you hit a
directory in the dir.  Wait until you find the right name.

Reported-by: varacanero <varacanero@zeromail.org>
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoInclude metadata when asked to restore individual non-directory paths.
Rob Browning [Sat, 16 Feb 2013 21:12:47 +0000 (15:12 -0600)]
Include metadata when asked to restore individual non-directory paths.

Adjust bup restore to handle cases like this:

  bup restore -C tmp backup/latest/somewhere/not-a-directory

Previously bup wouldn't restore the metadata for not-a-directory; now
it should.

Add wvtest-bup.sh which includes wvmktempdir().  This function creates
all temporary directories under t/tmp, making cleanup easier.

Add t/test-restore-single-file.sh

Reported-by: Tim Riemenschneider <t.riemenschneider@detco.de>
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoMove force-delete to t/lib.sh from test.sh and test-meta.sh; improve.
Rob Browning [Fri, 8 Mar 2013 01:55:18 +0000 (19:55 -0600)]
Move force-delete to t/lib.sh from test.sh and test-meta.sh; improve.

Only call chattr and setfacl on Linux for now.

Test that each item is actually gone.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agot/test.sh: remove a few calls to force-delete that shouldn't be needed.
Rob Browning [Fri, 8 Mar 2013 01:07:02 +0000 (19:07 -0600)]
t/test.sh: remove a few calls to force-delete that shouldn't be needed.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoAdd a force-delete function to t/test.sh
Ryan Brown [Thu, 7 Mar 2013 02:48:23 +0000 (21:48 -0500)]
Add a force-delete function to t/test.sh

Replace "rm -rf" with force-delete because "rm -rf" will proceed even
if it doesn't succeed.  This masked a problem (reported on Fedora)
where the root directory and other system directories had "r-xr-xr-x"
(0555) permissions, causing bup restore to create directories that "rm
-rf" couldn't remove.  As a result, subsequent tests would fail.

Signed-off-by: Ryan Brown <ryansb@csh.rit.edu>
[rlb@defaultvalue.org: edited commit message.]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
12 years agoFix use of Python assert() with respect to optimization.
Rob Browning [Sun, 3 Mar 2013 22:51:14 +0000 (16:51 -0600)]
Fix use of Python assert() with respect to optimization.

Fix a number of places where bup's assertions had material
side-effects, or where other code expected to see the AssertionError,
neither of which happen when optimization is enabled.

Reported-by: Jon Dowland <jmtd@debian.org>
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoMove parse_excludes to helpers and rework it a bit.
Rob Browning [Fri, 8 Mar 2013 00:07:30 +0000 (18:07 -0600)]
Move parse_excludes to helpers and rework it a bit.

Don't use f before it's initialized.

Narrow the catch to open(), and only catch IOException.

Call Options.fatal() when there's an error (as does
helpers.parse_date_or_fatal()).

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agodebian/changelog: 0.25~git20130303-1
Robert S. Edmonds [Mon, 4 Mar 2013 00:47:43 +0000 (19:47 -0500)]
debian/changelog: 0.25~git20130303-1

12 years agodebian/: convert from python-support to dh_python2
Robert S. Edmonds [Mon, 4 Mar 2013 01:31:29 +0000 (20:31 -0500)]
debian/: convert from python-support to dh_python2

12 years agodebian/control: build-depend on rsync
Robert S. Edmonds [Mon, 4 Mar 2013 01:17:29 +0000 (20:17 -0500)]
debian/control: build-depend on rsync

12 years agoskip tests that require root privileges
Robert S. Edmonds [Mon, 4 Mar 2013 01:16:53 +0000 (20:16 -0500)]
skip tests that require root privileges

12 years agoMerge branch 'master' into debian
Robert S. Edmonds [Mon, 4 Mar 2013 00:42:35 +0000 (19:42 -0500)]
Merge branch 'master' into debian

12 years agouse .gitignore from upstream
Robert S. Edmonds [Mon, 4 Mar 2013 00:42:14 +0000 (19:42 -0500)]
use .gitignore from upstream

12 years agodebian/README.source: update
Robert S. Edmonds [Mon, 4 Mar 2013 00:24:53 +0000 (19:24 -0500)]
debian/README.source: update

12 years agodebian/control: update Homepage field
Robert S. Edmonds [Mon, 4 Mar 2013 00:19:20 +0000 (19:19 -0500)]
debian/control: update Homepage field

12 years agodebian/control: update Maintainer field
Robert S. Edmonds [Mon, 4 Mar 2013 00:18:14 +0000 (19:18 -0500)]
debian/control: update Maintainer field

12 years agoUpdate bup-restore.md to match reality; document "/." handling.
Rob Browning [Sun, 3 Mar 2013 19:48:21 +0000 (13:48 -0600)]
Update bup-restore.md to match reality; document "/." handling.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agobup-save.md: fix --graft documentation bug; use "chroot" consistently.
Rob Browning [Sun, 3 Mar 2013 17:48:27 +0000 (11:48 -0600)]
bup-save.md: fix --graft documentation bug; use "chroot" consistently.

Change mixture of "chroot" and "chroots" in examples to "chroot".

Thanks to "jon.seymour" <jon.seymour@gmail.com> for the report.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agowvtestrun: invoke perl via /usr/bin/env for portability.
Rob Browning [Sun, 3 Mar 2013 01:59:40 +0000 (19:59 -0600)]
wvtestrun: invoke perl via /usr/bin/env for portability.

This also matches format-subst.pl.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
12 years agoMention what's "in-scope" for 0.25 in HACKING.
Rob Browning [Sat, 2 Mar 2013 18:59:34 +0000 (12:59 -0600)]
Mention what's "in-scope" for 0.25 in HACKING.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>