]> arthur.barton.de Git - bup.git/log
bup.git
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 years agoOfficially drop support for Python 2.4.
Rob Browning [Mon, 18 Feb 2013 20:42:34 +0000 (14:42 -0600)]
Officially drop support for Python 2.4.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Alexander Barton <alex@barton.de>
11 years agoUpdate HACKING to reflect the glorious death of tmp/pending/meta.
Rob Browning [Tue, 19 Feb 2013 00:47:47 +0000 (18:47 -0600)]
Update HACKING to reflect the glorious death of tmp/pending/meta.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoAttempt to fix HACKING link in README.md.
Rob Browning [Tue, 19 Feb 2013 00:43:24 +0000 (18:43 -0600)]
Attempt to fix HACKING link in README.md.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoAdd 'x' to the getopts call in t/compare-trees (i.e. allow -x).
Anton Eliasson [Fri, 1 Feb 2013 11:56:15 +0000 (12:56 +0100)]
Add 'x' to the getopts call in t/compare-trees (i.e. allow -x).

Signed-off-by: Anton Eliasson <devel@antoneliasson.se>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
11 years agoclear_index(): remove unused "cleared" variable.
Rob Browning [Sat, 16 Feb 2013 15:31:57 +0000 (09:31 -0600)]
clear_index(): remove unused "cleared" variable.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agobloom-cmd: don't explicitly create the bloom file (allow bloom.create()).
Patrick Rouleau [Wed, 13 Feb 2013 03:46:13 +0000 (22:46 -0500)]
bloom-cmd: don't explicitly create the bloom file (allow bloom.create()).

Don't explicitly create the bloom file since bloom.create() will
handle it, and will actually use the correct (binary) mode instead of
"w+".

The binary mode has no effect under Linux or Cygwin, but is important
under Windows.

Signed-off-by: Patrick Rouleau <prouleau72@gmail.com>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
11 years agoAdd "bup index --clear" to clear the index.
Zoran Zaric [Wed, 13 Feb 2013 02:29:52 +0000 (03:29 +0100)]
Add "bup index --clear" to clear the index.

Signed-off-by: Zoran Zaric <zz@zoranzaric.de>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
11 years agoAdd the filename/fd and invalid value to stat_struc_to_py error messages.
Rob Browning [Sat, 24 Nov 2012 01:55:17 +0000 (19:55 -0600)]
Add the filename/fd and invalid value to stat_struc_to_py error messages.

Thanks to Nathan Bird <ecthellion@gmail.com> for the initial report.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoStore metadata in the index, in bupindex.meta; only store unique values.
Rob Browning [Tue, 13 Nov 2012 01:02:14 +0000 (19:02 -0600)]
Store metadata in the index, in bupindex.meta; only store unique values.

See DESIGN for more information.

Update the index format header to 'BUPI\0\0\0\5' (version 5).

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoDocument accommodations for filesystems with low-resolution timestamps.
Rob Browning [Mon, 11 Feb 2013 04:54:07 +0000 (22:54 -0600)]
Document accommodations for filesystems with low-resolution timestamps.

...and some effects thereof.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoChange index; include atime; pack time as xstat timespec; use ns in memory.
Rob Browning [Sat, 10 Nov 2012 19:06:33 +0000 (13:06 -0600)]
Change index; include atime; pack time as xstat timespec; use ns in memory.

Update the index format header to 'BUPI\0\0\0\4' (version 4).

Change the index to include atimes, and write all times to bupindex as
xstat timespecs.  This is in preparation for indexing all metadata.
After moving all of the times to the index, there should be far fewer
unique instances of the remaining metadata in many/most cases.

Change the index and index-related code to handle all time
values as integer nanoseconds since the epoch, excepting the packed
format, which (as mentioned above) is now an xstat timespec.

After these changes the index-related in-memory and on-disk time value
handling should match that of the metadata code (i.e. metadata.py,
.bupm, etc.).

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
[rlb@defaultvalue.org: change 10e8 to 10**9 for ns per second.]

11 years agoHandle nonexistent groups in Metadata._apply_common_rec().
Rob Browning [Sat, 29 Sep 2012 16:21:32 +0000 (11:21 -0500)]
Handle nonexistent groups in Metadata._apply_common_rec().

Thanks to Oei, Yung-Chin <yungchin@yungchin.nl> for tracking this
down.

Reported-by: Yung-Chin <yungchin@yungchin.nl>
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoCache all password (pwd) and group (grp) database lookups.
Rob Browning [Sun, 23 Sep 2012 23:26:48 +0000 (18:26 -0500)]
Cache all password (pwd) and group (grp) database lookups.

Thanks to Jann Horn <jannhorn@googlemail.com> for determining that
even just caching user names and group names could provide a notable
performance improvement in some cases.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoOverhaul restore destination handling, and stripping/grafting behavior.
Rob Browning [Sat, 18 Aug 2012 20:26:28 +0000 (15:26 -0500)]
Overhaul restore destination handling, and stripping/grafting behavior.

Change restore to respond to source paths like this (assume outdir
corresponds to "." if there no -C argument or to -C outdir):

  /foo/what/ever - extract ever to outdir/ever
  /foo/what/ever/ - extract ever/* to outdir/*
  /foo/what/ever/. - extract ever/. to outdir/. (i.e. outdir == ever).

Also fix handling of top-level commit symlinks.  Previously bup would
just restore /foo/latest as a dummy symlink like this:

   latest -> ../.commit/SHA

Instead, dereference latest and restore the target instead.

Tighten up stripping/grafting with additional argument checks, and
handle any root collisions by creating a fake root dir (see comments
in save-cmd.py).  Bup still doesn't handle other path collisions yet,
i.e. if both /foo/bar and /bar are remapped to /bar.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoAvoid partial writes of config/config.h.
Rob Browning [Thu, 10 Jan 2013 02:23:08 +0000 (20:23 -0600)]
Avoid partial writes of config/config.h.

Write to config/config.h.tmp first, then rename it to config/config.h
once it's complete to avoid the possibility of a partially written
file.

Thanks to Paul Schulz <pschulz01@gmail.com> for reporting the problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoDon't pass --tmpdir to mktemp or expect it to have a default template.
Yung-Chin Oei [Tue, 4 Sep 2012 12:27:52 +0000 (13:27 +0100)]
Don't pass --tmpdir to mktemp or expect it to have a default template.

BSD mktemp does not understand --tmpdir, and does not have a default
pattern if none is supplied.

Signed-off-by: Yung-Chin Oei <yungchin@yungchin.nl>
Acked-by: Gabriel Filion <lelutin@gmail.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
11 years agoDon't pass -AX to rsync in t/compare-trees if xattrs aren't supported.
Rob Browning [Tue, 11 Sep 2012 00:36:18 +0000 (19:36 -0500)]
Don't pass -AX to rsync in t/compare-trees if xattrs aren't supported.

The -AX options won't be available if rsync doesn't report the xattr
capability, so test for that before trying to use them.

Thanks to Yung-Chin Oei <yungchin@yungchin.nl> for the suggested
approach and initial report.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoMove tree comparison to t/compare-trees; compare content by default.
Rob Browning [Sat, 4 Aug 2012 21:58:45 +0000 (16:58 -0500)]
Move tree comparison to t/compare-trees; compare content by default.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoAdd preliminary hardlink support for review.
Rob Browning [Sat, 5 May 2012 17:45:01 +0000 (12:45 -0500)]
Add preliminary hardlink support for review.

Thanks to Tim Riemenschneider <git@tim-riemenschneider.de> for
pointing out a compatibility problem (with older versions of Python)
in an earlier version of this patch.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoStop checking for empty stat values from recursive_dirlist().
Rob Browning [Sun, 13 Jan 2013 23:17:16 +0000 (17:17 -0600)]
Stop checking for empty stat values from recursive_dirlist().

Remove the "if pst:" guard in index-cmd.py, since it doesn't appear to
be possible for recursive_dirlist() to return None for the stat value.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoPrint a more meaningful error message when help can't run man.
Zoran Zaric [Sat, 26 Jan 2013 18:44:34 +0000 (19:44 +0100)]
Print a more meaningful error message when help can't run man.

Signed-off-by: Zoran Zaric <zz@zoranzaric.de>
[rlb@defaultvalue.org: elaborated on the error message a bit]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoExplicitly use "du -k" to set block size in t/test.sh.
Alexander Barton [Sat, 26 Jan 2013 18:48:47 +0000 (19:48 +0100)]
Explicitly use "du -k" to set block size in t/test.sh.

Commit e3514812 (Explicitly select the "du" block size in t/test.sh)
used the parameter "-B 1024" which isn't portable. Now use "du -k"
to explicitly get output in kilobytes.

At least du(1) on Linux (GNU coreutils), Mac OS X, FreeBSD, NetBSD,
and OpenBSD support this option.

Signed-off-by: Alexander Barton <alex@barton.de>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
11 years agoAdd *.tmp.meta to .gitignore and to "make clean".
Alexander Barton [Wed, 23 Jan 2013 10:09:10 +0000 (11:09 +0100)]
Add *.tmp.meta to .gitignore and to "make clean".

...since tmpindex.tmp.meta is now generated by "make check".

Signed-off-by: Alexander Barton <alex@barton.de>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
11 years agoUpdate bup repository address in Documentation/bup.md.
Rob Browning [Sat, 26 Jan 2013 03:51:53 +0000 (21:51 -0600)]
Update bup repository address in Documentation/bup.md.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoFix path to git repository in ./README.md.
holmboe [Fri, 25 Jan 2013 16:18:43 +0000 (17:18 +0100)]
Fix path to git repository in ./README.md.

The repository at http://github.com/apenwarr/bup says to go here.

Signed-off-by: Henrik Holmboe <henrik@holmboe.se>
Reviewed-by: Gabriel Filion <lelutin@gmail.com>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoTry again to create a HACKING link in README.md.
Rob Browning [Fri, 25 Jan 2013 05:47:48 +0000 (23:47 -0600)]
Try again to create a HACKING link in README.md.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoTry to create a HACKING link in README.md.
Rob Browning [Fri, 25 Jan 2013 05:44:33 +0000 (23:44 -0600)]
Try to create a HACKING link in README.md.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoAdd ./HACKING and refer to it from README.md.
Rob Browning [Wed, 23 Jan 2013 02:31:12 +0000 (20:31 -0600)]
Add ./HACKING and refer to it from README.md.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoExplicitly select the "du" block size in t/test.sh.
Rob Browning [Wed, 23 Jan 2013 01:19:20 +0000 (19:19 -0600)]
Explicitly select the "du" block size in t/test.sh.

Since du's default output can be affected by several environment
variables (DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE), be explicit about
what we want via -B 1024.

Thanks to Michael Ekstrand <michael@elehack.net> for the original
report, and help with the fix.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoMakefile: clean config/ during clean.
Yung-Chin Oei [Wed, 24 Oct 2012 02:25:43 +0000 (03:25 +0100)]
Makefile: clean config/ during clean.

Signed-off-by: Yung-Chin Oei <yungchin@yungchin.nl>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
11 years agoRemove dependency on linux/ext2_fs.h
Yung-Chin Oei [Wed, 24 Oct 2012 02:26:35 +0000 (03:26 +0100)]
Remove dependency on linux/ext2_fs.h

Due to a missing header in (some versions of) linux/ext2_fs.h,
configure's AC_CHECK_HEADERS test fails for this header, making it
appear "not found", and causing Linux-attr support to be disabled in bup
for no good reason.

Given that all the flags bup needs are available in linux/fs.h, we can
safely remove the requirement for linux/ext2_fs.h altogether, to work
around the problem.

Signed-off-by: Yung-Chin Oei <yungchin@yungchin.nl>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
11 years agoNote linux-libc-dev build dependency (for ext2_fs.h).
Rob Browning [Tue, 22 Jan 2013 01:32:55 +0000 (19:32 -0600)]
Note linux-libc-dev build dependency (for ext2_fs.h).

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoExplain current installation process in README.md (i.e. "make install").
Rob Browning [Sun, 13 Jan 2013 05:38:02 +0000 (23:38 -0600)]
Explain current installation process in README.md (i.e. "make install").

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoCheck the arguments passed to ./configure.
Rob Browning [Sat, 12 Jan 2013 16:23:04 +0000 (10:23 -0600)]
Check the arguments passed to ./configure.

For now, don't allow arguments, since ./configure doesn't actually
support any.  Previously "./configure --help" would print misleading
information, and any other arguments were silently ignored.

Thanks to Alexander Barton <alex@barton.de> for the report.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoProperly escape \r in bup-newliner.md.
Rob Browning [Tue, 1 Jan 2013 17:20:29 +0000 (11:20 -0600)]
Properly escape \r in bup-newliner.md.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoNote additional repositories that may be needed for CentOS builds.
Rob Browning [Sat, 12 Jan 2013 19:59:01 +0000 (13:59 -0600)]
Note additional repositories that may be needed for CentOS builds.

Thanks to Paul Schulz <pschulz01@gmail.com> for the report.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoAdd missing "install" argument to yum command in README.md.
Rob Browning [Thu, 10 Jan 2013 03:08:52 +0000 (21:08 -0600)]
Add missing "install" argument to yum command in README.md.

Thanks to Paul Schulz <pschulz01@gmail.com> for pointing it out.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoAdd instructions for CentOS 6 to README.md.
Rob Browning [Thu, 10 Jan 2013 02:21:47 +0000 (20:21 -0600)]
Add instructions for CentOS 6 to README.md.

Thanks to Paul Schulz <pschulz01@gmail.com> for the information.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoDon't assume that the tester's $top_dir will sort (via ls -a) before tmp/.
Rob Browning [Sun, 6 Jan 2013 20:43:11 +0000 (14:43 -0600)]
Don't assume that the tester's $top_dir will sort (via ls -a) before tmp/.

Thanks to Alexander Barton <alex@barton.de> for reporting the problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Alexander Barton <alex@barton.de>
11 years agoCheck for a Node's parent before trying to print its name in __repr__.
Martin Zimmermann [Sat, 29 Dec 2012 20:58:10 +0000 (21:58 +0100)]
Check for a Node's parent before trying to print its name in __repr__.

Signed-off-by: Martin Zimmermann <info@posativ.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
[rlb@defaultvalue.org: Edit commit message.]

11 years agoAdd a metadata() method to Node, File, Symlink, and Dir VFS objects.
Rob Browning [Sat, 21 Jul 2012 20:26:17 +0000 (15:26 -0500)]
Add a metadata() method to Node, File, Symlink, and Dir VFS objects.

The current implementation just populates the self._metadata field of
all of the objects in a directory (and of directory itself) from the
relevant .bupm file whenever metadata() is called on any one of those
objects.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
Reviewed-by: Gabriel Filion <lelutin@gmail.com>
11 years agoDefer errors when the restore target doesn't support relevant metadata.
Rob Browning [Sun, 3 Jun 2012 21:49:39 +0000 (16:49 -0500)]
Defer errors when the restore target doesn't support relevant metadata.

When the restore target doesn't support POSIX1e ACLs, extended
attributes, or Linux attributes, handle the failures via add_error()
(i.e. defer them).

Test these cases by creating a loopback VFAT filesystem
(testfs-limited) and using it as a restore target.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoDisallow empty graft points.
Rob Browning [Sun, 12 Aug 2012 23:18:26 +0000 (18:18 -0500)]
Disallow empty graft points.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoUpdate README regarding metadata support.
Rob Browning [Sat, 28 Jul 2012 16:42:23 +0000 (11:42 -0500)]
Update README regarding metadata support.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoHandle the possibility of a sgid/suid parent dir in one of the meta tests.
Rob Browning [Fri, 27 Jul 2012 17:04:35 +0000 (12:04 -0500)]
Handle the possibility of a sgid/suid parent dir in one of the meta tests.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoQuote EXIT cleanup trap properly in test-meta.sh.
Rob Browning [Wed, 18 Jul 2012 02:26:23 +0000 (21:26 -0500)]
Quote EXIT cleanup trap properly in test-meta.sh.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoUse python, not groups to grab a user group in t/test-meta.sh.
Rob Browning [Tue, 11 Sep 2012 01:53:45 +0000 (20:53 -0500)]
Use python, not groups to grab a user group in t/test-meta.sh.

Group names may actually contain spaces, and since the groups commmand
only reports a space-delimited list of groups on stdout, we had
a problem.

Thanks to "Oei, Yung-Chin" <yungchin@yungchin.nl> and Gabriel Filion
<lelutin@gmail.com> for tracking this down.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agot/test.sh: fix test failure when $top_dir has a dot-name
Oei, Yung-Chin [Mon, 3 Sep 2012 16:50:30 +0000 (17:50 +0100)]
t/test.sh: fix test failure when $top_dir has a dot-name

Fix the admittedly rare case where we're running tests from a tree
that has a dot-name at its base, which only 'bup ls -a' will print.
This problem was originally encountered on a system that keeps mounts
under '/.autofs/'.

Signed-off-by: Yung-Chin Oei <yungchin@yungchin.nl>
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoRestore any metadata during "bup restore"; add "bup meta --edit".
Rob Browning [Sun, 27 Nov 2011 20:39:47 +0000 (14:39 -0600)]
Restore any metadata during "bup restore"; add "bup meta --edit".

Use "bup meta --edit" to test "bup restore" and the new tar/rsync-like
restoration behaviors.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
Tested-by: Alexander Barton <alex@barton.de>
11 years agoSave metadata during "bup save".
Rob Browning [Sat, 1 Oct 2011 17:24:36 +0000 (12:24 -0500)]
Save metadata during "bup save".

Record metadata in a hidden/mangled file named .bupm in each
directory, so that the metadata for /foo/ is stored in /foo/.bupm,
with the first entry being the metadata for foo/ itself.

Record an empty index file for each special file so that index entries
and .bupm entries correspond correctly.

Rework the strip/graft functions to return both the save-name, and the
underlying filesystem path to the save-name (when there is one) for
each component.  There may not be corresponding filesystem paths if
graft options rewrite the path prefix.

For now, record "/" metadata only when there are no strip/graft
options.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
Tested-by: Alexander Barton <alex@barton.de>
11 years agoUnmount and remove testfs instances correctly during make clean.
Rob Browning [Sun, 3 Jun 2012 17:18:18 +0000 (12:18 -0500)]
Unmount and remove testfs instances correctly during make clean.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>
11 years agoSince 'latest' is computed by revs[0], it must exist, so don't test it.
Rob Browning [Fri, 23 Nov 2012 20:32:39 +0000 (14:32 -0600)]
Since 'latest' is computed by revs[0], it must exist, so don't test it.

Remove the unnecessary "if latest:" conditional from
BranchList._mksubs().  Given the fact that latest used to be computed
via max(revs), and is now computed by revs[0], there's no way it
wouldn't exist.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoUse branch tip, not newest date to choose 'latest' in BranchList._mksubs().
Rob Browning [Fri, 23 Nov 2012 20:18:52 +0000 (14:18 -0600)]
Use branch tip, not newest date to choose 'latest' in BranchList._mksubs().

Previously 'latest' was chosen in the VFS by taking max(revs), which
would pick the most recent commit by rev_list date, which only has a
resolution of integer seconds.

That approach could fail if two commits (i.e. two "bup save" runs)
executed close enough together that both commits ended up with the
same rev_list date.  In that case, the sort order was determined by
the commit hash, which is effectively random.

Since I couldn't think of a case where you wouldn't want 'latest' to
refer to the most recent commit (save) to the relevant branch,
'latest' is now computed as revs[0], i.e. the first commit returned by
rev_list.

Thanks to Zoran and Gabriel for some helpful sanity checks while
tracking this down.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
11 years agoAdd _open_noatime() and use it bup_get_linux_file_attr().
Rob Browning [Sat, 20 Oct 2012 17:55:27 +0000 (12:55 -0500)]
Add _open_noatime() and use it bup_get_linux_file_attr().

Reported-by: Yung-Chin Oei <yungchin@yungchin.nl>
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Yung-Chin Oei <yungchin@yungchin.nl>
11 years agoDepend on the kernel headers, not the ext2 headers, for Linux attr support.
Rob Browning [Sat, 20 Oct 2012 17:35:39 +0000 (12:35 -0500)]
Depend on the kernel headers, not the ext2 headers, for Linux attr support.

Switch to the kernel FS_* defines (in linux/ext2_fs.h) instead of the
EXT* defines (in ext2fs/ext2_fs.h -- from the ext2fs headers).

Also add FS_NOCOW_FL to the "modifiable flags" mask whenever it's
available.

Reported-by: Yung-Chin Oei <yungchin@yungchin.nl>
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Yung-Chin Oei <yungchin@yungchin.nl>
11 years agoAlways run metadata tests; disable root-level tests when not on Linux.
Rob Browning [Sun, 3 Jun 2012 20:18:01 +0000 (15:18 -0500)]
Always run metadata tests; disable root-level tests when not on Linux.

Disable the root-level test-meta.sh tests when the uname output
doesn't match Linux since they're not likely to work elsewhere right
now.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Zoran Zaric <zz@zoranzaric.de>