bup.git
8 days agothelpers: call tzset() after changing TZ master
Rob Browning [Sun, 29 Dec 2019 20:46:16 +0000 (14:46 -0600)]
thelpers: call tzset() after changing TZ

  Note: Although in many cases, changing the TZ environment variable
  may affect the output of functions like localtime() without calling
  tzset(), this behavior should not be relied on.

  -- https://docs.python.org/3/library/time.html#time.tzset

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 days agopwdgrp: actually use our grp wrappers
Rob Browning [Sun, 29 Dec 2019 19:44:51 +0000 (13:44 -0600)]
pwdgrp: actually use our grp wrappers

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
8 days agovint: check for bytes after read
Rob Browning [Sun, 29 Dec 2019 05:08:50 +0000 (23:08 -0600)]
vint: check for bytes after read

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 days agobup.client: accommodate python 3
Rob Browning [Sat, 28 Dec 2019 01:46:02 +0000 (19:46 -0600)]
bup.client: accommodate python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 days agoAdd compat.reraise to handle python 3 syntax breakage
Rob Browning [Sat, 28 Dec 2019 20:39:44 +0000 (14:39 -0600)]
Add compat.reraise to handle python 3 syntax breakage

Add a exception reraise function to compat that will allow us to
rewrite invocations like this:

    except Exception as e:
        raise ClientError, e, sys.exc_info()[2]

as this:

    except Exception as e:
        reraise(ClientError(e))

since python 3 now provides a with_traceback() method that we can (and
must) use instead.

Put the python 2 specific formulation (shown above) in a separate
py2raise module that we can conditionally import because python 3
decided to make the python 2 code produce a syntax error.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 days agometadata: adjust our posix1e calls for python 3
Rob Browning [Sat, 4 Jan 2020 18:52:55 +0000 (12:52 -0600)]
metadata: adjust our posix1e calls for python 3

Accommodate at pylibacl's argument requirements (at least 0.5.4).  It
looks like it allows bytes for the ACL() file argument, but not for
filedef:

  $ cmd/bup-python
  Python 3.7.5 (default, Oct 27 2019, 15:43:29)
  [GCC 9.2.1 20191022] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import posix1e
  >>> posix1e.ACL(file=b'README.md')
  <posix1e.ACL object at 0x7fa7bd5cee70>
  >>> posix1e.ACL(file='README.md')
  <posix1e.ACL object at 0x7fa7bd5a8bb0>
  >>> posix1e.ACL(filedef=b'.')
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  TypeError: argument 5 must be str, not bytes

And it expects a string for the to_any_text() prefix argument, but
rquires bytes for the sparator:

  >>> posix1e.ACL(file='README.md').to_any_text(prefix=b'', separator='')
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  TypeError: argument 1 must be str, not bytes

  >>> posix1e.ACL(file='README.md').to_any_text(prefix='', separator='')
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  TypeError: argument 2 must be a byte string of length 1, not str

  >>> posix1e.ACL(file='README.md').to_any_text(prefix='', separator=b'x')
  b'user::rw-xgroup::r--xother::---'

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
8 days agoAdjust metadata handling for python 3
Rob Browning [Sat, 28 Dec 2019 19:54:03 +0000 (13:54 -0600)]
Adjust metadata handling for python 3

Adapt bup.metadata for python 3 and the other bits directly affected:
bup-ftp, bup-ls, bup-meta, bup-xstat, and bup.ls.

Rename metadata detailed_str() and summary_str() to detailed_bytes()
and summary_bytes() since they aren't (and absolutely should not be)
localized.  They produce output that should be suitable for
programmatic use, i.e. "bup ls | grep ...".  Not sure we'll keep those
names, but they'll do for now.

Also rename fstime_to_sec_str() to fstime_to_sec_bytes() since that's
the only way we ever use it.

Make a minimal change to bup-ftp for now -- just enough to handle the
changed ls.within_repo arguments.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 days agobup-save bup.drecurse bup.hlinkdb bup.path: accommodate python 3
Rob Browning [Sat, 28 Dec 2019 18:49:13 +0000 (12:49 -0600)]
bup-save bup.drecurse bup.hlinkdb bup.path: accommodate python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 days agoindex-cmd: accommodate python 3
Rob Browning [Sat, 28 Dec 2019 01:46:02 +0000 (19:46 -0600)]
index-cmd: accommodate python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 days agobup.gc: accommodate python 3
Rob Browning [Fri, 27 Dec 2019 19:39:11 +0000 (13:39 -0600)]
bup.gc: accommodate python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 days agoget-cmd: accommodate python 3
Rob Browning [Fri, 27 Dec 2019 19:39:11 +0000 (13:39 -0600)]
get-cmd: accommodate python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 days agomidx-cmd: accommodate python 3
Rob Browning [Fri, 27 Dec 2019 19:39:11 +0000 (13:39 -0600)]
midx-cmd: accommodate python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 days agofsck-cmd: accommodate python 3
Rob Browning [Fri, 27 Dec 2019 19:39:11 +0000 (13:39 -0600)]
fsck-cmd: accommodate python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 days agobloom-cmd: accommodate python 3
Rob Browning [Fri, 27 Dec 2019 19:39:11 +0000 (13:39 -0600)]
bloom-cmd: accommodate python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 days agomidx: shun buffers
Rob Browning [Fri, 27 Dec 2019 19:24:56 +0000 (13:24 -0600)]
midx: shun buffers

Rework PackMidx to avoid buffers which are reasonably heavyweight, and
will be even larger (as memoryviews) in python 3, requiring ~200
bytes.  Instead, just use direct offsets into the underlying mmap --
slicing an mmap currently just produces bytes.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 days agoindex: remove vestigial buffer and sys imports
Rob Browning [Fri, 27 Dec 2019 19:03:11 +0000 (13:03 -0600)]
index: remove vestigial buffer and sys imports

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 days agogit: shun buffers in packidxes
Rob Browning [Fri, 27 Dec 2019 19:02:42 +0000 (13:02 -0600)]
git: shun buffers in packidxes

Rework PackIdx to avoid buffers which are reasonably heavyweight, and
will be even larger (as memoryviews) in python 3 (require ~200 bytes).
Instead, just use direct offsets into the underlying mmap -- slicing
an mmap currently just produces bytes.

Store the fanout table as a homogeneous array rather than a list or
tuple with individually allocated integers.

Instead of looking up hashes one at a time, traverse the index during
gc via its iterator.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 days agohashsplit: adapt for python 3
Rob Browning [Thu, 26 Dec 2019 23:54:58 +0000 (17:54 -0600)]
hashsplit: adapt for python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
10 days agocmd/bup: adapt for python 3
Rob Browning [Thu, 26 Dec 2019 18:50:47 +0000 (12:50 -0600)]
cmd/bup: adapt for python 3

Make all the changes necessary for cmd/bup to work with both python 2
and 3.  Given the current state, the majority of the changes handle
untangling the python 3 unicode/data conflation.

Convert to b'x' literals where needed (e.g. for path or path-derived
values), use argv_bytes to convert at least the command line values
that must not be interpreted as locale strings, and switch to the
bytes-only compat.environ.

More broadly speaking, aside from the changes we abosolutely have to
make, the general intent is for us to handle locale-specific
conversions carefully and explicitly when appropriate, not
transparently.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
10 days agoAdd "do nothing" path_msg to centralize path conversions
Rob Browning [Thu, 26 Dec 2019 18:27:07 +0000 (12:27 -0600)]
Add "do nothing" path_msg to centralize path conversions

Add path_msg(p) and use it in cmd/bup (as a start).  The intent is to
centralize the encoding of all path values that are to be included in
strings intended for "display" (e.g. stderr, which appears to have to
be a text stream in python 3).

For now, the function will do nothing -- i.e. given the currently
enforced iso-8859-1 encoding we'll just continue to produce the
original path bytes on stderr, but we may well want to make this
configurable at some point (perhaps git's quotePath algorithm might
provide a likely option), and if nothing else, using path_msg()
everywhere makes it much easier to identify and adapt the relevant
code, whatever we decide.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
10 days agobup: use correct bup executable in on--server
Johannes Berg [Wed, 1 Jan 2020 17:50:07 +0000 (18:50 +0100)]
bup: use correct bup executable in on--server

Currently, on--server loses the correct bup command in one situation:
if you run 'bup on remote' with a remote forced ssh command that's
different from the installed bup, on--server will still execute the
installed version of bup for all sub-commands.

Fix that by using bup.path.exe() in on--server for bup execution.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
10 days agoMakefile: Use explict bup_python to invoke a python script
Greg Troxel [Sun, 12 Jan 2020 19:05:19 +0000 (14:05 -0500)]
Makefile: Use explict bup_python to invoke a python script

Otherwise, the fallback to "python" fails (or perhaps uses the wrong
python).

Signed-off-by: Greg Troxel <gdt@lexort.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
10 days agometadata: accept only fixed python-xattr in python3
Johannes Berg [Sun, 12 Jan 2020 23:08:25 +0000 (00:08 +0100)]
metadata: accept only fixed python-xattr in python3

This is currently broken on python3, it returns junk when
we pass bytes because it uses string and %s internally.
I made a fix for it, so we can detect here if it's fixed
(in which case the NS_USER constant is bytes, not string),
load the module only if it is indeed fixed.

We can do this test always since in python2 bytes == str
and thus isinstance('user', bytes) == True.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
12 days agoget/init: consistently use argv_bytes() for RemoteRepo/Client
Johannes Berg [Tue, 14 Jan 2020 15:18:18 +0000 (16:18 +0100)]
get/init: consistently use argv_bytes() for RemoteRepo/Client

We should be using argv_bytes() here, since the parsing will
require using bytes later.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2 weeks agobloom: fix logic controlling bloom regeneration
Rob Browning [Sun, 12 Jan 2020 21:33:15 +0000 (15:33 -0600)]
bloom: fix logic controlling bloom regeneration

Add missing MAX_BLOOM_BITS index in the logic in bup bloom that
determines whether or not we should regenerate the filter.  We never
noticed because:

  $ python2
  >>> 0 < {1 : 2}
  True

  $ python3
  >>> 0 < {1 : 2}
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  TypeError: '<' not supported between instances of 'int' and 'dict'

Also regnerate if the -k value differs from the existing filter's k.

Thanks to Johannes Berg for pointing out some nontrivial problems in
an earlier version.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agogit: remove global variable ignore_midx
Johannes Berg [Wed, 18 Dec 2019 19:08:26 +0000 (20:08 +0100)]
git: remove global variable ignore_midx

This can easily be kept as state in the git.PackIdxList()
class instead, so do that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agoget: remove extra src_repo
Johannes Berg [Wed, 18 Dec 2019 21:43:58 +0000 (22:43 +0100)]
get: remove extra src_repo

We already have a src_repo from the with statement, no need to
instantiate another one (that won't even be closed properly).

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agoFix memory leak in *stat calls in _helpers.c
Aidan Hobson Sayers [Fri, 10 Jan 2020 11:12:27 +0000 (11:12 +0000)]
Fix memory leak in *stat calls in _helpers.c

The Python documentation [0] indicates that an 'O' passed to
Py_BuildValue will have its refcount incremented. Since some elements of
the tuple created in stat_struct_to_py are pre-converted in C to
PyObjects, they already have a refcount of 1 - use 'N' to avoid
incrementing it and ensure Python can deallocate them correctly.

[0] https://docs.python.org/2/c-api/arg.html?highlight=py_buildvalue#c.Py_BuildValue

Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agobloom_add: avoid declaration inside for statemnet
Greg Troxel [Sat, 11 Jan 2020 20:02:36 +0000 (15:02 -0500)]
bloom_add: avoid declaration inside for statemnet

Signed-off-by: Greg Troxel <gdt@lexort.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
[rlb@defaultvalue.org: mention bloom_add in commit message]

2 weeks agoOnly change LC_CTYPE for bup-python itself, not sh or subprocesses
Rob Browning [Thu, 26 Dec 2019 00:18:32 +0000 (18:18 -0600)]
Only change LC_CTYPE for bup-python itself, not sh or subprocesses

With the previous approach, bash would complain on systems that don't
provide the ISO-8859-1 locale (python always supports it), and those
complaints would break some tests.

In any case, since the original hack was only intended to affect
bup-python, try to make that the case.  Specify the LC_CTYPE only to
python via env (so bash won't see it), and then undo the environment
changes at the top of cmd/bup so they won't affect unrelated
subprocesses.

Thanks to Johannes Berg for reporting the problem and helping devise
the fix.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agoFix the handling of the configure MAKE and PYTHON vars
Rob Browning [Thu, 26 Dec 2019 00:08:13 +0000 (18:08 -0600)]
Fix the handling of the configure MAKE and PYTHON vars

Instead of trying to negotiate the maze of twisty quoting
passages (bash vs sh, how do you get it to work correctly from a
makefile target, etc.), drop config.vars.sh and just store each
variable value in a separate config/config.var/NAME file, and read
that file whenever we need the value, so that we should be able to
handle more or less arbitrary values, e.g.:

  make PYTHON='srsly?
  why?'

Along the same lines, instead of trying to figure out, in any given
case, how to quote values for sed (through various layers), add
dev/replace, which just does literal replacements of values provided
on the command line.

Also along the same lines, add dev/shquote that quotes values properly
for POSIX sh, and use it.  Previously we produced bash %q quotations,
which can result in $'' bashisms, and then handed them to /bin/sh.

These changes (particularly the switch to the literal @bup_python@
replacement) also lay the groundwork for forthcoming adjustments to
cmd/bup.

Thanks to Johannes Berg for pointing out a couple of bugs, including
that I'd forgotten to use fsdecode after adding it.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agobup: make sure stdout and stderr are binary for subcmds
Rob Browning [Tue, 24 Dec 2019 18:49:12 +0000 (12:49 -0600)]
bup: make sure stdout and stderr are binary for subcmds

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agotest_utc_offset_str: str -> bytes for py3
Rob Browning [Sat, 9 Nov 2019 20:12:45 +0000 (14:12 -0600)]
test_utc_offset_str: str -> bytes for py3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agoGiven bup-python, rm vestigial PYTHONPATH settings
Rob Browning [Mon, 23 Dec 2019 20:23:43 +0000 (14:23 -0600)]
Given bup-python, rm vestigial PYTHONPATH settings

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agomux: handle python 3's change to default close_fds=True
Rob Browning [Mon, 23 Dec 2019 19:56:12 +0000 (13:56 -0600)]
mux: handle python 3's change to default close_fds=True

Change mux to explicitly specify close_fds=False to deal with the fact
that python apparently changed the default in 3.2, and it absolutely
does need to keep the fds open.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agocompat.hexstr: add and use
Rob Browning [Mon, 23 Dec 2019 18:59:15 +0000 (12:59 -0600)]
compat.hexstr: add and use

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agoprune-older: paper over python 3's integer type changes
Rob Browning [Mon, 23 Dec 2019 08:15:47 +0000 (02:15 -0600)]
prune-older: paper over python 3's integer type changes

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agotests: fuse: use stat instead of relying on "ls -l" output
Johannes Berg [Thu, 2 Jan 2020 21:34:52 +0000 (22:34 +0100)]
tests: fuse: use stat instead of relying on "ls -l" output

On my Fedora 31 system, this currently fails because the test
expects the file mode bits to be printed as "-rw-r--r--" but
I get "-rw-r--r--." instead, perhaps due to selinux.

Fix this to use stat --format instead to extract the bits we
want to check here (user, group, mode, timestamp).

While at it, I noticed that this test has some confusion with
timezones and only worked because 'ls -l' doesn't show the
time in this case since the file is so old. Fix that by making
_everything_ here use UTC, instead of just some parts.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2 weeks agocirrus: test as root on linux too
Rob Browning [Wed, 8 Jan 2020 00:39:42 +0000 (18:39 -0600)]
cirrus: test as root on linux too

Since we run additional tests as root.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agoprep-for-debianish-build: add kmod for modprobe in (root) tests
Rob Browning [Sat, 4 Jan 2020 18:51:03 +0000 (12:51 -0600)]
prep-for-debianish-build: add kmod for modprobe in (root) tests

We currently modprobe for loop in some of the tests.

Thanks to Johannes Berg for help tracking this down.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agoprep-for-debianish-build: add dosfstools for vfat in (root) tests
Rob Browning [Sat, 4 Jan 2020 18:51:03 +0000 (12:51 -0600)]
prep-for-debianish-build: add dosfstools for vfat in (root) tests

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agometadata: use python-xattr pyxattr compat code
Johannes Berg [Mon, 16 Dec 2019 09:12:24 +0000 (10:12 +0100)]
metadata: use python-xattr pyxattr compat code

Newer versions of python-xattr have pyxattr compatibility code
(since my pull request https://github.com/xattr/xattr/pull/38).

Modify bup to allow using it; prefer pyxattr since it's faster,
but sometimes due to other dependencies python-xattr might be
present already (and since it conflicts with pyxattr, it's not
possible to install both.)

Also add a .cirrus.yml task to test this on Debian.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2 weeks agoMakefile: don't rely on head -n -1
Rob Browning [Wed, 8 Jan 2020 00:07:31 +0000 (18:07 -0600)]
Makefile: don't rely on head -n -1

Delete the last line with sed instead.

Thanks to Greg Troxel and Johannes Berg for reporting the portability
problem and helping with the fix.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
2 weeks agoman pages: fix some formatting
Johannes Berg [Fri, 13 Dec 2019 20:37:16 +0000 (21:37 +0100)]
man pages: fix some formatting

I noticed one place where -- was used instead of \--, leading to a
emdash instead of two hyphens, but then I looked and realized this
was not just a single place; fix all of those.

While at it, I saw some --keep options being referenced without
backticks, fix that too.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2 weeks agoCatPipe: remove _ver_warned
Johannes Berg [Fri, 13 Dec 2019 20:36:04 +0000 (21:36 +0100)]
CatPipe: remove _ver_warned

This variable is no longer used, remove it entirely

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
5 weeks agoAdd syntax highlighting to readme
Zev Eisenberg [Tue, 10 Dec 2019 22:23:30 +0000 (17:23 -0500)]
Add syntax highlighting to readme

Signed-off-by: Zev Eisenberg <zev@zeveisenberg.com>
5 weeks agoFix tindex for python 3
Rob Browning [Sun, 22 Dec 2019 19:03:37 +0000 (13:03 -0600)]
Fix tindex for python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
6 weeks agomerge_iter: don't compare generators with < via heapq
Rob Browning [Fri, 18 Oct 2019 04:22:59 +0000 (23:22 -0500)]
merge_iter: don't compare generators with < via heapq

Previously we were implicitly comparing (entry, reader_generator) with
"<" in the merge_iter heapq.  In python 2, the generators would just
compare as pointers, which was fine, because we only cared about the
ordering of the initial entries.

However, in Python 3 comparing generators provokes a TypeError, so
create a trivial helper class that can carry the two items, but only
compare the entries via the < operator.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
6 weeks agoMake adjustments to fix tbloom for python 3
Rob Browning [Mon, 14 Oct 2019 23:48:24 +0000 (18:48 -0500)]
Make adjustments to fix tbloom for python 3

Make the changes needed to get the tbloom tests passing with python 3.
Change the C helper argument conversions to types that work with each
version (there didn't appear to be a good, shared common format string
type).  Switch to a Py_buffer in some places because python 3 didn't
appear to have a conversion that would convert all the binary
inputs (buffer/memoryview/...) to a plain C byte array the way python
2 can.

Change all the other typical things, i.e. byte paths, '' to b'', and
// for integral division, etc.

With this, tbloom should pass with both python major versions (python
3 version tested was python 3.7.5).

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
6 weeks agoDrop BUP_RESOURCE_PATH; find it via __file__
Rob Browning [Sat, 12 Oct 2019 22:58:16 +0000 (17:58 -0500)]
Drop BUP_RESOURCE_PATH; find it via __file__

Assume that the resource path is always next to the libdir.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
6 weeks agoRequire LC_CTYPE to be iso-8859-1 for Python 3
Rob Browning [Sun, 3 Nov 2019 21:10:41 +0000 (15:10 -0600)]
Require LC_CTYPE to be iso-8859-1 for Python 3

Add a guard to compat (for now) that will crash if the LC_CYTPE isn't
ISO-8859-1 (aka Latin-1) when running under python3.  We definitely
need this for handling argv safely (with at least python 3.7), and
since we're planning to require this arrangement anyway, let's start
now.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
6 weeks agoPrevent Python 3 from interfering with argv bytes
Rob Browning [Tue, 10 Sep 2019 06:56:02 +0000 (01:56 -0500)]
Prevent Python 3 from interfering with argv bytes

Python 3 insists on treating all arguments as Unicode, and and if the
bytes don't fit, it shoehorns them in anyway[1].  We need the raw,
original bytes in many cases (paths being the obvious example), and
Python claims they can be extracted via fsdecode.

But experimentation with 3.7 has demonstrated that while this is
necessary, it is not sufficient to handle all possible binary
arguments in at least a UTF-8 locale.  The interpreter may crash at
startup with some (randomly generated) argument values:

  Fatal Python error: _PyMainInterpreterConfig_Read: memory allocation failed
  ValueError: character U+134bd2 is not in range [U+0000; U+10ffff]

  Current thread 0x00007f2f0e1d8740 (most recent call first):
  Traceback (most recent call last):
    File "t/test-argv", line 28, in <module>
      out = check_output(cmd)
    File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
      **kwargs).stdout
    File "/usr/lib/python3.7/subprocess.py", line 487, in run
      output=stdout, stderr=stderr)

To fix that, always set the encoding to ISO-8859-1 before launching
Python, which should hopefully (given that ISO-8859-1 is a single-byte
"pass through" encoding), prevent Python from interfering with the
arguments.

Add t/test-argv to perform randomized testing for clean argv
pass-through.  At the moment, with Python 3.7.3, if I disable the code
before the python exec in cmd/bup-python, this test eventually
provokes the crash above (though not on every run).

[1] https://www.python.org/dev/peps/pep-0383/

Thanks to Aaron M. Ucko for pointing out LC_ALL had been overlooked in
an earlier version of this patch, and would have undone the
adjustments.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
6 weeks agoSimplify bup startup process
Rob Browning [Sat, 12 Oct 2019 22:46:38 +0000 (17:46 -0500)]
Simplify bup startup process

Now that we've moved bup to cmd/, we adjust bup-python at install
time, and we can rely on that to find the module and cmd dirs,
simplify the startup process.  Let bup-python handle all the
PYTHONPATH settings, etc., and drop BUP_MAIN_EXE, relying instead on a
path.exe() that finds the binary via path.__file__.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
6 weeks agoMove bup to cmd/ and symlink ./bup to cmd/bup
Rob Browning [Sat, 12 Oct 2019 21:47:16 +0000 (16:47 -0500)]
Move bup to cmd/ and symlink ./bup to cmd/bup

Move main.py to cmd/bup and make ./bup a permanent symlink to it.
Make the installed bup executable a relative symlink to the
LIBDIR/cmd/bup file.  Always use the location of the bup executable as
a way to locate the other subcommands and the lib and resource
directories, either when running from the source tree or from an
install tree.

This work finishes the switch to have all the commands to rely on the
bup-python wrapper so that we can establish some norms we'll need to
support Python 3.  It should also allow us to simplify the main.py
startup process.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agoRun wvtest.py directly for lib tests
Rob Browning [Thu, 7 Nov 2019 05:27:43 +0000 (23:27 -0600)]
Run wvtest.py directly for lib tests

Run wvtest.py directly instead of via $(bup_python) so that it will
rely on cmd/bup-python and have the same environment that bup itself
does.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agoInstall bup-python and rely on it everywhere
Rob Browning [Sat, 12 Oct 2019 22:23:42 +0000 (17:23 -0500)]
Install bup-python and rely on it everywhere

Add a cmd/python-cmd.sh template and use it to generate
cmd/bup-python.  Install bup-python alongside all the other commands
and stop rewriting the command #! headers at install time, so that
they'll use it.

We're setting up all of the commands to rely on bup-python so that
we'll have a common place to establish some norms that we'll want in
order to support Python 3.

Though in fact, you can't actually run the python-based subcommands
independently because they don't have the right PYTHONPATH, etc.
That's something we'll also fix.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agoMove pwd grp functions to pwdgrp module; require binary fields
Rob Browning [Sun, 20 Oct 2019 17:49:14 +0000 (12:49 -0500)]
Move pwd grp functions to pwdgrp module; require binary fields

Move the pwd and grp related functions in helpers to a new more
focused pwdgrp module and adjust them (for py3) to require and provide
binary (bytes) values for the appropriate fields: name, passwd, etc.
These fields are arbitrary bytes with no encoding information on
platforms like Linux and *BSD, so must be handled that way.

Create our own Passwd and Group classes to carry the data, and make
them __slots__ based since they're quite a lot smaller, even than
namedtuples:
https://justmachinelearning.com/2019/07/29/python-consumes-a-lot-of-memory-or-how-to-reduce-the-size-of-objects/

See the DESIGN section on Python 3 strings for additional information.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agousername/userfullname: use struct names
Rob Browning [Sun, 20 Oct 2019 17:46:37 +0000 (12:46 -0500)]
username/userfullname: use struct names

Use the pwd names, not indexes.  That's clearer and it'll support
upcoming py3 compatibility work.  While we're at it, start making it
clear these are binary (bytes).

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agoDESIGN: describe plan to handle Python 3's insistence on strings
Rob Browning [Sun, 3 Nov 2019 21:48:53 +0000 (15:48 -0600)]
DESIGN: describe plan to handle Python 3's insistence on strings

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agowvtest.py: drop relpath compatability code
Rob Browning [Sat, 9 Nov 2019 19:36:16 +0000 (13:36 -0600)]
wvtest.py: drop relpath compatability code

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agoMakefile: add simple check-both target to test python 2 and 3
Rob Browning [Sat, 30 Nov 2019 19:02:14 +0000 (13:02 -0600)]
Makefile: add simple check-both target to test python 2 and 3

Just a convenience for now.  Note that it incidentally leaves you with
the built python 2 version.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agocirrus: test (incomplete) python 3 support
Rob Browning [Sat, 30 Nov 2019 18:55:15 +0000 (12:55 -0600)]
cirrus: test (incomplete) python 3 support

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agojoin_bytes: pass the join() args correctly for py3
Rob Browning [Sat, 30 Nov 2019 18:20:06 +0000 (12:20 -0600)]
join_bytes: pass the join() args correctly for py3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
8 weeks ago_helpers: fix -Wsign-compare warnings
Rob Browning [Sat, 30 Nov 2019 18:09:04 +0000 (12:09 -0600)]
_helpers: fix -Wsign-compare warnings

Python 3 adds -Wsign-compare to the compiler arguments.  Address the
issues that this causes gcc to warn about.  Disable the warnings for
the INTEGRAL_ASSIGNMENT_FITS macro since it's intentionally doing
something that the compiler can't tell is OK (assuming it is), add
some simple tests, and change the types and code in other places to
avoid the suspect comparisons.  Currently clang doesn't produce the
warnings.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agoMakefile: append python 2 tests to common lists
Rob Browning [Fri, 29 Nov 2019 19:16:10 +0000 (13:16 -0600)]
Makefile: append python 2 tests to common lists

Instead of maintaining two separate lists for python 2 and python 3
tests, just have one list of tests that work in both versions, and
then selectively append the tests that only work in python 2 when
appropriate.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agoRemove inefficient (or will be) uses of buffer
Rob Browning [Thu, 28 Nov 2019 08:01:02 +0000 (02:01 -0600)]
Remove inefficient (or will be) uses of buffer

On amd64 sys.getsizeof(b'') is a bit under 40 bytes across python 2/3,
while a buffer(b'') adds 64 bytes in python 2, and the memoryview(b'')
that replaces it in python 3 adds 200.  So just copy the bytes unless
the added overhead is worth it.

And while we're here, fix a few more python 3 str/bytes compatability
issues, and remove some redundant offset arithemetic by leaning on
range() a bit more.  (Not that it likely matters, but aside from being
simpler, this is apparently more efficient too, because it moves more
of the work to C).

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agohashsplit: join buffers more efficiently
Rob Browning [Fri, 29 Nov 2019 19:15:30 +0000 (13:15 -0600)]
hashsplit: join buffers more efficiently

Drop buffer_concat in favor of join_bytes, since we can use b''.join()
to join the two put() chunks in python 3, which should be notably more
efficient than copying the memoryview bytes before joining them.

In python2, also use join when we just have bytes, otherwise
accommodate the fact that you can't join bytes and buffers there, and
you can't append bytes to a buffer.  The case we currently care about
should still end up being handled the same as befoere (in the first
clause), i.e. buf + bytes.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agofsck: report par2 parallel detection status
Rob Browning [Fri, 29 Nov 2019 20:58:36 +0000 (14:58 -0600)]
fsck: report par2 parallel detection status

When attempting to detect whether or not par2 supports parallel
processing, don't suppress its stdout for now so that we'll see
anything unexpected (should be empty).  When verbose, log what we
think we've detected along with any unexpected par2 stderr output.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agoREADME: fix typo (missing 'e')
Reinier Maas [Wed, 27 Nov 2019 22:05:21 +0000 (23:05 +0100)]
README: fix typo (missing 'e')

[rlb@defaultvalue.org: adjust commit summary]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agofsck: Hide error when probing par2 capabilities
Gernot Schulz [Fri, 22 Nov 2019 13:41:39 +0000 (14:41 +0100)]
fsck: Hide error when probing par2 capabilities

bup-fsck checks for the availability of par2's -t1 option by executing
it (for the reason see dc10c9172e1197c77c246ea75aae63388dcd641e).  If
the option is unavailable, par2 returns an error ("Invalid option
specified: -t1") which is not muted by the -qq option.

To hide this harmless par2 error during bup-fsck invocations the
subprocess call needs to capture stderr.

Signed-off-by: Gernot Schulz <post@gernot-schulz.com>
[rlb@defaultvalue.org: expand abbreviated hash to full hash above]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
8 weeks agoftp: remove obsolete readline bug fix
Rob Browning [Thu, 28 Nov 2019 06:26:19 +0000 (00:26 -0600)]
ftp: remove obsolete readline bug fix

Simplify things a bit since the bug was fixed in 2.6, and we now
require 2.6.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
2 months agobup: import merge_dict
Rob Browning [Sun, 3 Nov 2019 19:27:31 +0000 (13:27 -0600)]
bup: import merge_dict

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
2 months agovfs: rely on FakeLink's target in readlink
Rob Browning [Sun, 20 Oct 2019 16:48:58 +0000 (11:48 -0500)]
vfs: rely on FakeLink's target in readlink

This could result in an error like:

  File "/usr/local/lib/bup/bup/vfs.py", line 524, in _compute_item_size
    return len(_readlink(repo, item.oid))
  AttributeError: 'FakeLink' object has no attribute 'oid'

Thanks to Hartmut Krafft for reporting the problem and helping devise
the solution.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
3 months agoFix hashsplit for python 3; add compat.buffer
Rob Browning [Wed, 9 Oct 2019 06:11:39 +0000 (01:11 -0500)]
Fix hashsplit for python 3; add compat.buffer

In order to get hashsplit working, stick with buffer()s in python 2.
We can't use a Py_buffer (via memoryview()) across both python
versions because python 2's zlib.compress() never learned how to
handle them, and we don't want to have to make an extra tobytes() copy
of all the data just to simplify the code.

Instead provide a python 3 only compat.buffer that's returns a
memoryview (slice when appropriate) in python 3.

Also noticed (and a bit unfortunate if accurate) that memoryview is
much larger than buffer, and for our bulk data, we have no need of any
additional sophistication:

  $ python2
  ...
  >>> import sys
  >>> sys.getsizeof(buffer(''))
  64

  $ python3
  ...
  >>> import sys
  >>> sys.getsizeof(buffer(''))
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  NameError: name 'buffer' is not defined
  >>>
  >>> sys.getsizeof(memoryview(b''))
  192

Of course worth keeping in mind when deciding between using one or
just copying the relevant region.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
3 months agoMinimize use of preexec_fn
Rob Browning [Sat, 12 Oct 2019 05:41:35 +0000 (00:41 -0500)]
Minimize use of preexec_fn

Python suggests avoiding preexec_fn, and in Python 3, changes to the
PATH no longer affect the subprocess invocation, so replace it with an
env setting where we can, and they've also added start_new_session to
provide setsid(), so we'll use that too when possible.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
3 months agotgit: use print() for python 3; fix test data writes
Rob Browning [Sun, 13 Oct 2019 15:55:19 +0000 (10:55 -0500)]
tgit: use print() for python 3; fix test data writes

Fix a couple of places with

  print f, ...

that actually meant

  print >> f, ...

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
3 months agotxstat: fix for python 3
Rob Browning [Thu, 10 Oct 2019 04:21:04 +0000 (23:21 -0500)]
txstat: fix for python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 months agothelpers: adjust for python 3
Rob Browning [Wed, 9 Oct 2019 06:17:06 +0000 (01:17 -0500)]
thelpers: adjust for python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 months agotshquote.py: test with python 3
Rob Browning [Wed, 9 Oct 2019 04:51:14 +0000 (23:51 -0500)]
tshquote.py: test with python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 months agotoptions.py: test with python 3
Rob Browning [Wed, 9 Oct 2019 04:50:15 +0000 (23:50 -0500)]
toptions.py: test with python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 months agoExplicitly list python tests; test vint with python 3
Rob Browning [Sun, 6 Oct 2019 16:15:12 +0000 (11:15 -0500)]
Explicitly list python tests; test vint with python 3

Don't glob to find the python tests, keep an explicit list, adjust it
based on the python major version, and enable the vint tests with
python 3.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
3 months agovint: fix bytes for Python 3
Rob Browning [Sun, 6 Oct 2019 15:54:41 +0000 (10:54 -0500)]
vint: fix bytes for Python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 months agoSelectively clean commands in cmd/
Rob Browning [Sat, 12 Oct 2019 21:52:18 +0000 (16:52 -0500)]
Selectively clean commands in cmd/

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 months agowvtest: change func_name to __name__ for Python 3
Rob Browning [Sun, 6 Oct 2019 16:03:01 +0000 (11:03 -0500)]
wvtest: change func_name to __name__ for Python 3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 months agowvtest.py: switch to print_function
Rob Browning [Thu, 18 Jan 2018 01:57:47 +0000 (19:57 -0600)]
wvtest.py: switch to print_function

Python 3 requires it.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
3 months agobup-rm bup-gc bup-prune-older: rm EXPERIMENTAL
Rob Browning [Sat, 28 Sep 2019 20:29:33 +0000 (15:29 -0500)]
bup-rm bup-gc bup-prune-older: rm EXPERIMENTAL

They've been in use long enough, perhaps.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 months agoRename chain_ex to add_ex_ctx to reflect upstream terminology
Rob Browning [Tue, 10 Sep 2019 07:30:26 +0000 (02:30 -0500)]
Rename chain_ex to add_ex_ctx to reflect upstream terminology

In the raise[1] docs Python uses chaining to refer to "from" (cause)
linkage, not implicit exception/finally (context) linkage, so adjust
our function name to match.  (Also preparation for compat code to
handle from linkage).

[1] https://docs.python.org/3/reference/simple_stmts.html#the-raise-statement.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 months agosome_invalid_save_parts_rx: avoid nested char set
Rob Browning [Tue, 10 Sep 2019 07:10:08 +0000 (02:10 -0500)]
some_invalid_save_parts_rx: avoid nested char set

Escape square bracket to avoid possible future trouble with Python 3+:

  >>> re.compile(r'[[ ~^:?*\\]|\.\.|//|@{')
  __main__:1: FutureWarning: Possible nested set at position 1

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 months agomain: switch print_clean_line to bytes
Rob Browning [Tue, 10 Sep 2019 06:24:27 +0000 (01:24 -0500)]
main: switch print_clean_line to bytes

This function filters arbitrary content, and only needs to assume that
it's ASCII-compatible (i.e. it only cares about \n and \r).
Explicitly use bytes to accommodate Python 3.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 months agovfs: accommodate py3 exception module removal
Rob Browning [Tue, 10 Sep 2019 06:19:26 +0000 (01:19 -0500)]
vfs: accommodate py3 exception module removal

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 months agobup_stat bup_lstat: always treat path as binary
Rob Browning [Tue, 10 Sep 2019 06:09:09 +0000 (01:09 -0500)]
bup_stat bup_lstat: always treat path as binary

Convert the path via "y" in Python 3, and rename the format alias to
cstr_argf to more accurately reflect what it means, i.e. a sequence of
non-null bytes.  If "y" ends up being sufficient it's simpler (and
more efficient?) than a Py_buffer conversion, though it doesn't
support as many argument types.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
3 months agoHave "make check" to do nothing for Python 3
Rob Browning [Sun, 8 Sep 2019 19:39:36 +0000 (14:39 -0500)]
Have "make check" to do nothing for Python 3

In preparation for Python 3, don't run any tests for make check.
We'll enable individual tests once bup supports Python 3 well enough
for them to pass.

This shouldn't risk producing a false sense of security because you
still have to set BUP_ALLOW_UNEXPECTED_PYTHON_VERSION=true or bup
won't run at all, and if you've seen the warning produced when you
don't set it, you should be sufficiently well informed.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
4 months agoupdate-doc-branches: create t/tmp if needed 0.30
Rob Browning [Sat, 28 Sep 2019 18:01:48 +0000 (13:01 -0500)]
update-doc-branches: create t/tmp if needed

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
4 months agoUpdate HACKING and README for 0.30
Rob Browning [Sat, 28 Sep 2019 17:02:07 +0000 (12:02 -0500)]
Update HACKING and README for 0.30

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
4 months agoAdd release notes for 0.30
Rob Browning [Wed, 25 Sep 2019 00:38:23 +0000 (19:38 -0500)]
Add release notes for 0.30

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
4 months agobup-ls(1): document support for --remote host:port
Rob Browning [Wed, 25 Sep 2019 00:30:43 +0000 (19:30 -0500)]
bup-ls(1): document support for --remote host:port

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
4 months agoUpdate HACKING, README, and note/ for 0.29.3
Rob Browning [Sun, 25 Aug 2019 17:29:00 +0000 (12:29 -0500)]
Update HACKING, README, and note/ for 0.29.3

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
(cherry picked from commit 3359ed35580a43d85f08d3ff233628d4c3601707)

4 months agotest-get: rm pax_global_header from git archive output
Rob Browning [Wed, 11 Sep 2019 02:54:15 +0000 (21:54 -0500)]
test-get: rm pax_global_header from git archive output

git-archive now adds a pax_global_header, and while GNU tar suppresses
it, some versions of tar don't, so remove it explicitly to avoid
spurious test failures.

Thanks to Greg Troxel for for reporting the problem and helping devise
the solution.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
5 months agoREADME: move test statuses to table listing all active branches
Rob Browning [Sun, 25 Aug 2019 17:02:06 +0000 (12:02 -0500)]
README: move test statuses to table listing all active branches

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
5 months agotest-duplicity-import: don't quote wc -l output
Rob Browning [Sat, 24 Aug 2019 20:22:04 +0000 (15:22 -0500)]
test-duplicity-import: don't quote wc -l output

Same story, second verse...

On at least some bsdish systems wc -l produces leading spaces in the
output.  cf. 2c2c28e4a3d21f0c5497f69cac2dd45b929f2e69

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