Permalink
Commits on Nov 4, 2011
  1. options.py: relicense to 2-clause BSD license.

    apenwarr committed Nov 4, 2011
    At the request of a few people who would like to us it in their own
    projects.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Commits on Oct 31, 2011
  1. bupsplit.c: remove extra-large stack-allocated array from selftest().

    apenwarr committed Oct 31, 2011
    In some rare cases involving userspace threads (where you're running the
    selftest function for some reason?) this could cause stack overflow or
    excess memory usage.  Let's just do it with plain malloc().
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Commits on Jun 9, 2011
  1. Disable t/test-meta.sh in 'make test' unless TEST_META=1

    apenwarr committed Jun 9, 2011
    In other words:
    
    	make test                # doesn't run metadata tests
    	TEST_META=1 make test    # does run metadata tests
    
    The metadata tests still fail randomly on some people's computers, but we're
    falling too far behind and it's time to make a release.  The metadata stuff
    isn't used anywhere critical in bup yet, so it's okay to leave it in but not
    test it for now.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  2. Merge branch 'meta'

    apenwarr committed Jun 9, 2011
    * meta:
      Add utimes/lutimes implementations of _helpers utime() and lutime().
      Replace _helpers.utimensat() with utime() and lutime().
      Test for available nanosecond stat timestamp members.
      Add config.h dependency to _helpers in csetup.py.
      Add -*-shell-script-*- to configure.inc.
      Use FS_IOC_GETFLAGS/FS_IOC_SETFLAGS directly as the preprocessor guards.
      Verify the expected length of saved_errors in tmetadata.py.
      Don't use xstat.lutime() in test-meta.sh when xstat.utime() will do.
      Add meta support for restoring filesystem sockets.
      Add _recognized_file_types(); defer error for unrecognized restore.
      index.py: new format (V3), with inodes, link counts, and 64-bit times.
      Cap timestamps in index to avoid needing to worry about fractional parts.
      index.py: factor out an Entry._fixup_time method.
      Rely on options.parse() for more of the meta and xstat argument processing.
      Remove vestigal clean target comment regarding pybuptest.tmp permissions.
      Add initial timespec behavior tests.
      Return None from bup_set_linux_file_attr() and bup_utimensat().
      Replace os.*stat() with xstat.*stat(); use integer ns for all fs times.
      Drop xstat floating point timestamp support -- use integer ns.
      xstst-cmd.py: test for _have_utimensat rather than _have_ns_fs_timestamps.
  3. Add utimes/lutimes implementations of _helpers utime() and lutime().

    rlbdv committed with apenwarr Jun 1, 2011
    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
  4. Replace _helpers.utimensat() with utime() and lutime().

    rlbdv committed with apenwarr Jun 1, 2011
    Rework utimensat() handling in preparation for the addition of
    utimes/lutimes based fallbacks.
    
    Publish lutime() and utime() at the Python level from _helpers.c
    rather than utimensat() itself.
    
    Drop the _have_utimensat tests in favor of testing xstat.lutime which
    will be false when xstat.lutime() is not available.
    
    Move bup_utimensat() Python argument parsing to
    bup_parse_xutime_args() and use it to implement bup_utime_ns() and
    bup_lutime_ns().  This argument parsing will eventually be shared by
    the utimes/lutimes based fallbacks.
    
    Remove _helpers.AT_FDCWD and _helpers.AT_SYMLINK_NOFOLLOW since
    utimensat is no longer published on the Python side.
    
    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
  5. Test for available nanosecond stat timestamp members.

    rlbdv committed with apenwarr Jun 1, 2011
    Use st_atim, st_mtim, and st_ctim when available, and fall back to
    st_atimensec, st_mtimensec, and st_ctimensec.  If neither are
    available, return 0 ns values.
    
    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
  6. Add config.h dependency to _helpers in csetup.py.

    rlbdv committed with apenwarr Jun 1, 2011
    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
  7. Add -*-shell-script-*- to configure.inc.

    rlbdv committed with apenwarr Jun 1, 2011
    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
  8. Use FS_IOC_GETFLAGS/FS_IOC_SETFLAGS directly as the preprocessor guards.

    rlbdv committed with apenwarr Jun 1, 2011
    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
  9. Verify the expected length of saved_errors in tmetadata.py.

    rlbdv committed with apenwarr Jun 1, 2011
    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
  10. Don't use xstat.lutime() in test-meta.sh when xstat.utime() will do.

    rlbdv committed with apenwarr Jun 1, 2011
    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
  11. Add meta support for restoring filesystem sockets.

    rlbdv committed with apenwarr Jun 1, 2011
    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
  12. Add _recognized_file_types(); defer error for unrecognized restore.

    rlbdv committed with apenwarr Jun 1, 2011
    Defer an error if an unrecognized file type is encountered during
    metadata restoration -- whether during path creation
    (i.e. --start-extract) or metadata application
    (i.e. --finish-extract).
    
    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
  13. make clean: Remove dlls from child directories

    Aneurin committed with apenwarr Jun 1, 2011
    Fix the 'clean' makefile rule to remove .dll files from subdirectories,
    to match .so files.
    
    Signed-off-by: Aneurin Price <aneurin.price@gmail.com>
  14. configure.inc: strip trailing characters from 'uname -s' output

    Aneurin committed with apenwarr Jun 1, 2011
    On Cygwin, 'uname -s' includes the version of the underlying operating
    system; here it is 'CYGWIN_NT-6.0'. The configure script attempts to
    define this in config/config.h, but '#define OS_CYGWIN_NT-6.0 1' is an
    invalid macro definition.
    
    This truncates the value to just 'CYGWIN', to match $OS in the Makefile.
    
    Signed-off-by: Aneurin Price <aneurin.price@gmail.com>
Commits on Jun 7, 2011
  1. Update bupsplit.[ch] to have a less restrictive BSD-style license.

    apenwarr committed Jun 7, 2011
    Nobody else owns any copyright on those files, so I can do this without
    asking anyone else for permission :)
    
    Some people have asked to use these files in their own non-GPL/LGPL
    projects, and although the LGPL permits this, the files are so small that
    there's no reason to be obnoxious about it.  So let's just let them do it
    the easy way.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Commits on May 31, 2011
  1. Merge branch 'master' into meta

    apenwarr committed May 31, 2011
    * master:
      Improve formatting of error and warning messages.
  2. index.py: new format (V3), with inodes, link counts, and 64-bit times.

    Aaron M. Ucko committed with apenwarr May 30, 2011
    To allow unambiguous preservation of hard-link structure, index device
    numbers, inode numbers (new) and link counts (new) at 64 bits apiece
    per GNU libc, which uses uint64_t, uint64_t, and unsigned long respectively.
    
    Take the opportunity to use 64 bits for mtime and ctime as well, both
    to be ready for Y2038 and to handle NTFS's zero value (Y1600).
  3. Cap timestamps in index to avoid needing to worry about fractional pa…

    Aaron M. Ucko committed with apenwarr May 30, 2011
    …rts.
    
    Avoid a potential race condition by which bup's use of whole-second
    granularity for timestamps in the index could let it theoretically
    miss some last-second changes by capping timestamps to at most one
    second before the start of indexing per a newly introduced mandatory
    parameter to bup.index.Writer.
  4. index.py: factor out an Entry._fixup_time method.

    Aaron M. Ucko committed with apenwarr May 30, 2011
    Factor Entry._fixup_time out of Entry._fixup to reduce (minor) logic
    duplication and prepare for upcoming tweaks to timestamp indexing.
  5. Improve formatting of error and warning messages.

    Aaron M. Ucko committed with apenwarr May 30, 2011
    log() trailing newlines as appropriate.  Fix a format string typo in
    lib/bup/git.py encountered when verifying that exceptions' string
    values already end with newlines.
Commits on May 30, 2011
  1. Merge branch 'master' into meta

    apenwarr committed May 30, 2011
    * master: (27 commits)
      t/test.sh: 'ls' on NetBSD sets -A by default as root; work around it.
      README: add a list of binary packages
      README: rework the title hierarchy
      Clarify the message when the BUP_DIR doesn't exist.
      Refactor: unify ls/ftp-ls code
      ftp/ls: Adjust documentation
      ls: include hidden files when explicitly requested
      ftp: implement ls -s (show hashes)
      ftp/ls: columnate output attached to a tty, else don't
      ftp: don't output trailing line for 'ls'
      ftp: output a newline on EOF when on a tty
      config: more config stuff to config/ subdir, call it from Makefile.
      cmd/{split,save}: support any compression level using the new -# feature.
      options.py: add support for '-#' style compression options.
      Add documentation for compression levels
      Add test case for compression level
      Add compression level options to bup save and bup split
      Make zlib compression level a parameter for Client
      Make zlib compression level a parameter of git.PackWriter
      Use is_superuser() rather than checking euid directly
      ...
    
    Conflicts:
    	lib/bup/metadata.py
  2. t/test.sh: 'ls' on NetBSD sets -A by default as root; work around it.

    apenwarr committed May 30, 2011
    We have to undo it by grepping out any dotfiles.  (Normal OSes don't
    auto-set -A, but this is harmless there.)
    
    Reported by Thomas Klausner.  Fix suggested by Gabriel Filion.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  3. Merge branch 'config'

    apenwarr committed May 30, 2011
    * config:
      config: more config stuff to config/ subdir, call it from Makefile.
      Initial import of configure.sh
Commits on May 29, 2011
  1. README: add a list of binary packages

    lelutin committed with apenwarr May 16, 2011
    Debian/Ubuntu are known to have bup packages in their archives, thanks
    to Jon Dowland.
    
    Also, a NetBSD package is currently being built, as was shared by Thomas
    Klausner. However, it is still not found in the official NetBSD packages
    search engine.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
  2. README: rework the title hierarchy

    lelutin committed with apenwarr May 16, 2011
    In Markdown, a line underlining another one with '=' characters
    represents a first level title, while a line underlining another one
    with '-' characters represents a second level title.
    
    Rework the title levels to gain visibility on the different sections and
    to allow to split "Getting started" more easily (see my next commit for
    additions to this section).
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
  3. Clarify the message when the BUP_DIR doesn't exist.

    apenwarr committed May 29, 2011
    Now it reminds you to run 'bup init'.  Problem reported by Thomas Klausner.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  4. Refactor: unify ls/ftp-ls code

    lelutin committed with apenwarr May 16, 2011
    Both the 'ls' command and the 'ls' subcommand of the 'ftp' command use
    some code that is very similar. Modifications must be done in two places
    instead of one and this can lead to inconsistencies.
    
    Refactor code so that both paths use the same function with the same opt
    spec.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
  5. ftp/ls: Adjust documentation

    lelutin committed with apenwarr May 16, 2011
    Now that 'bup ftp ls' and 'bup ls' have the same features, adjust both
    commands' man pages.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
  6. ls: include hidden files when explicitly requested

    lelutin committed with apenwarr May 16, 2011
    The current code of 'bup ls' insists on hiding a file from its listing
    even if the file was explicitly requested as an argument. This is not
    what users would expect. Remove the condition and always list files
    (not directories) starting with a dot when they were given in the
    argument list.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
  7. ftp: implement ls -s (show hashes)

    lelutin committed with apenwarr May 16, 2011
    'bup ls' has a -s flag that can be used to show file hashes on the left
    of each file name. 'bup ftp ls' doesn't have that feature.
    
    Implement the feature by copying code from 'bup ls'. This is the last
    feature difference between 'bup ls' and 'bup ftp ls' and bringing them
    to the same level will make it possible to unify the code that is used
    by both.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
  8. ftp/ls: columnate output attached to a tty, else don't

    lelutin committed with apenwarr May 16, 2011
    'bup ftp ls' and 'bup ls' currently behave in a different manner.
    
    'bup ftp ls' always formats its output in columns regardless of whether
    the program's stdout is a tty or not.
    
    'bup ls' always prints one name on each line.
    
    Make both of those commands behave the same. By using lib/bup/helpers'
    istty1 variable, decide to format in columns when outputting to a tty,
    and to output one file name per line when the output is not a tty.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
  9. ftp: don't output trailing line for 'ls'

    lelutin committed with apenwarr May 16, 2011
    'ls' is currently the only 'ftp' subcommand that outputs a trailing
    newline before the prompt is re-displayed. This is cause by the use of
    "print" to output a string that already contains an ending newline.
    
    For a matter of consistency of output, make 'ls' output without that
    extra trailing newline.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
Commits on May 15, 2011
  1. ftp: output a newline on EOF when on a tty

    lelutin committed with apenwarr May 14, 2011
    Using the 'quit' command with ftp while in interactive mode -- attached
    to a tty -- ends up clearing the line for the shell to use a fresh one
    for the next prompt.
    Using Ctrl-D to send an EOF to the application's input while in
    interactive mode currently does not clear the line in the same way.
    
    Let's force a newline when an EOF is received from a tty so that the
    program exits in a more aesthetic way.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>