Permalink
Commits on Jul 31, 2013
  1. @rlbdv

    _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>
    rlbdv committed Jul 31, 2013
  2. @rlbdv

    _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>
    rlbdv committed Jul 31, 2013
Commits on Jul 30, 2013
  1. @rlbdv

    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>
    committed with rlbdv Jul 29, 2013
Commits on Jul 7, 2013
  1. @rlbdv

    Makefile: add any environmental CFLAGS to the end of the effective CF…

    …LAGS.
    
    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>
    rlbdv committed Jul 5, 2013
Commits on Jul 4, 2013
  1. @rlbdv

    Completely disable ACL support on OS X for now.

    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
    rlbdv committed Jul 4, 2013
  2. @rlbdv

    config/configure: add and use bup_find_prog; remove unused MF_PATH_IN…

    …CLUDEs.
    
    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>
    rlbdv committed Jul 4, 2013
Commits on Jun 8, 2013
  1. @rlbdv

    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>
    rlbdv committed Jun 8, 2013
Commits on Jun 7, 2013
  1. @rlbdv

    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>
    rlbdv committed Jun 7, 2013
Commits on May 27, 2013
  1. @rlbdv

    Skip the large bloom filter test if mmap fails on 32-bit archtectures.

    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
    rlbdv committed May 25, 2013
  2. @rlbdv

    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>
    rlbdv committed May 27, 2013
  3. @rlbdv

    README.md: add Cygwin dependencies.

    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
    rlbdv committed May 27, 2013
  4. @rlbdv

    t/compare-trees: don't check ACLs on Cygwin (no support).

    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
    rlbdv committed May 27, 2013
  5. @rlbdv

    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>
    rlbdv committed May 26, 2013
  6. @rlbdv

    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>
    rlbdv committed May 26, 2013
  7. @rlbdv

    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>
    rlbdv committed May 27, 2013
  8. @rlbdv

    meta-cmd.py: mention --list in the invocation summary.

    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
    rlbdv committed May 27, 2013
Commits on May 25, 2013
  1. @rlbdv

    README.md: describe mmap problems with limited address spaces.

    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
    rlbdv committed May 25, 2013
Commits on May 18, 2013
  1. @yungchin @rlbdv

    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>
    yungchin committed with rlbdv Apr 15, 2013
Commits on May 15, 2013
  1. @lelutin @rlbdv

    Documentation: replace ~/.bup with $BUP_DIR in bup-index.md and bup-s…

    …ave.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>
    lelutin committed with rlbdv May 14, 2013
Commits on May 6, 2013
  1. @rlbdv

    fsck-cmd.py: simplify do_pack() else clause.

    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
    rlbdv committed May 5, 2013
  2. @rlbdv

    fsck-cmd.py: add par2_exists as a do_pack() argument.

    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
    rlbdv committed May 5, 2013
  3. @rlbdv

    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>
    rlbdv committed Apr 27, 2013
Commits on May 2, 2013
  1. @timri @rlbdv

    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>
    timri committed with rlbdv Apr 15, 2013
Commits on Apr 27, 2013
  1. @rlbdv

    bup-save.md: note that restoration requires --name or the commit/tree…

    … id.
    
    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
    rlbdv committed Apr 27, 2013
Commits on Apr 14, 2013
  1. @rlbdv

    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>
    rlbdv committed Apr 14, 2013
Commits on Apr 13, 2013
  1. @rlbdv

    .dir-locals: rename python-indent (obsolete) to python-indent-offset.

    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
    rlbdv committed Apr 13, 2013
Commits on Mar 25, 2013
  1. @rlbdv

    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>
    Tim Riemenschneider committed with rlbdv Mar 6, 2013
  2. @rlbdv

    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>
    Damien Robert committed with rlbdv Nov 20, 2012
Commits on Mar 24, 2013
  1. @rlbdv

    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>
    rlbdv committed Aug 18, 2012
  2. @rlbdv

    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>
    rlbdv committed Jul 21, 2012
  3. @rlbdv

    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 51bd583.
    
    Signed-off-by: Zoran Zaric <zz@zoranzaric.de>
    Reviewed-by: Rob Browning <rlb@defaultvalue.org>
    committed with rlbdv Mar 23, 2013
Commits on Mar 23, 2013
  1. @rlbdv

    LICENSE: mention the lib/tornado license in lib/tornado/README.

    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
    rlbdv committed Mar 23, 2013
  2. @thom311 @rlbdv

    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>
    thom311 committed with rlbdv Mar 3, 2013
Commits on Mar 18, 2013
  1. @rlbdv

    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>
    rlbdv committed Mar 16, 2013
  2. @rlbdv

    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>
    rlbdv committed Feb 17, 2013