HACKING: correct output folder in the format-patch example

Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
[rlb@defaultvalue.org: adjust commit message.]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Correct DESIGN to refer to 64 byte rolling window.

Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Reviewed-by: Gabriel Filion <gabster@lelutin.ca>
Remove misleading -1 from BUP_WINDOWSIZE definition.

Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Reviewed-by: Gabriel Filion <gabster@lelutin.ca>
meta-cmd.py: actually respond to recursion options.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
README.md: fix typo; cited article is about 'git'.

Signed-off-by: Phil Hord <hordp@cisco.com>
[rlb@defaultvalue.org: adjust commit message.]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Add /t/tmp/ to .gitignore.

Signed-off-by: Phil Hord <hordp@cisco.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Fix the "set -e" problem in the test-meta.sh chattr tests.

Start fixing the "set -e" problem, beginning with the test-meta.sh
chattr tests, and add support to the test filesystem for options
needed by the chattr calls.

To allow us to produce a more digestable sequence of patches for the
broader "set -e" problem, temporarily establish BUP_SKIP_BROKEN_TESTS
which will do what it says when set, and until we finish repairing
everything, it must be set during any testing:

  BUP_SKIP_BROKEN_TESTS=1 make check

The fundamental issue with "set -e" is that it has some unexpected
(but documented) semantics.  For example:

  set -e
  foo() { false; rm -rf /; }

  # Effectively harmless
  foo

  # Erase the filesystem
  foo || true

If nothing else, this behavior appears to have been masking test
failures.  Better to just avoid "set -e" altogether.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Remove more of the "set -e" dependency from test-meta.sh.

Remove the "set -e" dependency from the remaining code where doing so
doesn't reveal any bugs.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Fix ACL tests, and the bugs revealed thereby.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Fix xattr tests and bugs revealed (fully remove set -e from test-meta.sh).

Fixing the xattr tests to run correctly pointed out that bup stops
trying to apply metadata after the first failure (i.e. after any
metadata record application fails).  Change it so that bup always
tries every metadata record.  Otherwise, bup may skip some forms of
metadata without any notification -- and it shouldn't.  For example,
it shouldn't skip ACLs just because the current filesystem doesn't
support xattrs.

Fix two additional problems that were exposed by the changes described
above.

Check for EACCES when trying to apply an attr record, and properly
convert it to an ApplyError.  This problem was revealed by
test_apply_to_path_restricted_access.

Check for EACCES when trying to read the current filesystem xattrs
during the process of applying the metadata xattrs, and when
encountered, convert it to an ApplyError.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Remove all of the remaining test-related "set -e" usage.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Don't use "set -e" in import-rdiff-backup.sh.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Make force-delete more flexible, and more likely to succeed.

Thanks to Alexander Barton <alex@barton.de> for helping track down
the correct chattr invocation.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
tmetadata.py: don't look for attr and xattr errors when impossible.

Don't look for the errors when the current (file)system doesn't
support the relevant features.

Thanks to Alexander Barton <alex@barton.de> and Mark J Hewitt
<mjh@idnet.com> for reporting the problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Don't expect an attr error when the metadata has no attr.

When the metadata object has no Linux attr, there won't be an attr
related failure, so don't look for it.

Thanks to Alexander Barton <alex@barton.de> and Mark J Hewitt
<mjh@idnet.com> for reporting and helping track down the problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
test-cat-file.sh: use -l instead of -b; explain differences.

It turns out that cmp -b doesn't work on at least NetBSD, so use -l
instead, and when there's a problem, diff the "bup meta" output as
well.

Thanks to Thomas Klausner <tk@giga.or.at> for the report.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
index-cmd.py: pass exclude_rxs as an argument to update_index.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
bup-index.md: indicate that non-rx --exclude paths are taken literally.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Set pipefail so that "x | y || exit $?" will work properly.

Set pipefail so that constructs like this will work properly:

  x | y | z || exit $?

or

  WVPASS x | WVPASS y | WVPASS z || exit $?

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
import-rsnapshot-cmd.sh: add a few missing failure checks.

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