Commit graph

572 commits

Author SHA1 Message Date
Thomas Waldmann
98f3b8d937 fix "check" for repos that have incomplete chunks, fixes #364
added try/finally (the code in between was just indented, no
other code changes) to make sure it sets self.index back to None,
even if the code crashes e.g. due to an IntegrityError caused
by an incomplete segment caused by a disk full condition.

also, in prepare_txn, create an empty in-memory index if transaction_id
is None, which is required by the Repository.check code to work correctly.
If the index is not empty there, it will miscalculate segment usage
(self.segments).
2015-11-03 15:30:33 +01:00
Thomas Waldmann
22262e3fb7 add a test to find disk-full issues, #327 2015-11-03 00:41:20 +01:00
Thomas Waldmann
6d5cc06cf6 remove unused imports, add missing imports 2015-11-02 20:36:13 +01:00
Thomas Waldmann
36cc377329 use default_notty=False for confirmations, fixes #345
this is so that e.g. cron jobs do not hang indefinitely if yes() is called,
but it will just default to "no" if not tty is connected.

if you need to enforce a "yes" answer (which is not recommended for
the security critical questions), you can use the environment:

BORG_CHECK_I_KNOW_WHAT_I_AM_DOING=Y
2015-11-02 01:59:22 +01:00
Thomas Waldmann
e6231896cd emit a deprecation warning for --compression N
deprecating it in the source is not enough, we also need to tell the users to fix their scripts.
2015-11-02 00:14:01 +01:00
Thomas Waldmann
35280e9a65 label platform code, exclude freebsd and unknown platform from coverage measurement
this coverage configuration is mostly for travis and there we only can test linux and darwin.
2015-11-01 23:06:52 +01:00
Thomas Waldmann
0a6e6cfe2e refactor confirmation code, reduce code duplication, add tests 2015-11-01 19:18:29 +01:00
Thomas Waldmann
36900051c5 move test utilities to testsuite package, add FakeInputs utility 2015-11-01 19:13:45 +01:00
Thomas Waldmann
4a1c995244 add --show-rc option enable "terminating with X status, rc N" output, fixes #351
this is needed for tools like borgweb (or in general: when the rc value / exit status should
be logged for later review or directly seen on screen).

this is off by default, so the output is less verbose (and also does not fail tests which
counts lines).
2015-11-01 00:53:55 +01:00
Thomas Waldmann
4bf8c8a6f8 separate parse_args() from run()
parse_args concentrates on only processing arguments, including pre and post processing.
this needs to be called before run(), which is now receiving the return value of parse_args.

this was done so we can have the parsed args outside of the run function, e.g. in main().
2015-11-01 00:40:32 +01:00
Thomas Waldmann
7ea701f6f7 fix test failure for borg.exe
fatal error is rc 2 now (EXIT_ERROR)
2015-11-01 00:01:23 +01:00
TW
f651b014e6 Merge pull request #350 from ThomasWaldmann/fix-307
prettier connection closed message, fixes #307
2015-10-31 23:19:26 +01:00
TW
5f86959762 Merge pull request #349 from ThomasWaldmann/pretty-errors
prettier error messages, fixes #57
2015-10-31 22:44:04 +01:00
TW
39e4f344bd Merge pull request #348 from ThomasWaldmann/warn-slow-msgpack
emit a warning if we have a slow msgpack installed
2015-10-31 22:43:36 +01:00
Thomas Waldmann
1740384763 prettier connection closed message, fixes #307 2015-10-31 22:41:08 +01:00
Thomas Waldmann
762fdaadd8 prettier error messages, fixes #57
subclasses of "Error": do not show traceback
(this is used when a failure is expected and has rather trivial reasons and usually
does not need debugging)

subclasses of "ErrorWithTraceback": show a traceback
(this is for severe and rather unexpected stuff, like consistency / corruption issues
or stuff that might need debugging)

I reviewed all the Error subclasses whether they fit into the one or other class.

Also: fixed docstring typo, docstring formatting
2015-10-31 22:23:32 +01:00
Thomas Waldmann
3490469734 emit a warning if we have a slow msgpack installed
the reason for a slow msgpack can be:
- pip install: missing compiler (gcc)
- pip install: missing compiler parts (e.g. gcc-c++)
- pip install: cached wheel package that was built while the compiler wasn't present
- distribution package: badly built msgpack package
2015-10-31 20:37:21 +01:00
Thomas Waldmann
ad4594a39c Fix some breakage from the merge 2015-10-31 19:39:20 +01:00
Thomas Waldmann
f4b0f57618 Merge branch 'master' into multithreading
Some tests are failing, some block, one new test needed skipping.
2015-10-31 19:36:33 +01:00
Radek Podgorny
5cc25d986a move away from RawConfigParser to ConfigParser
this is a recommended thing since direct use of RawConfigParser
is not deprecated according to python docs.
2015-10-29 02:37:43 +01:00
Thomas Waldmann
5992d4be58 Merge branch 'review-logging-levels' 2015-10-28 02:02:33 +01:00
Thomas Waldmann
dd577bf4ac fuse mount: fix unlocking of repository at umount time, fixes #331
there were 2 issues:
lock used another pid and tid than release because daemonize() made it different processes/threads.
solved by just determining PID only once and not using TID any more.

the other issue was that the repo needed and explicit closing.
2015-10-27 22:37:36 +01:00
Thomas Waldmann
92d31be087 atime unit test: test adapts to O_NOATIME support on platform 2015-10-26 23:16:41 +01:00
Thomas Waldmann
3e73998710 atime unit test: do not compare input file's current atime
and explain why (missing O_NOATIME open mode modified the atime at backup time).
2015-10-26 23:08:37 +01:00
Thomas Waldmann
765999195d atime unit test: hardcode "round" timestamps
just to avoid rounding / precision issues with floating point computations on py < 3.3
I used 2 hardcoded "full second" values on the input file and check if they get restored
correctly.
2015-10-26 22:34:08 +01:00
Thomas Waldmann
c492011a92 backup atime and ctime additionally to mtime, fixes #317
restore: mtime and atime
FUSE: support ctime and atime additionally to mtime
2015-10-26 02:07:55 +01:00
Thomas Waldmann
0942bc010e fix reading files without touching their atime 2015-10-26 01:43:58 +01:00
Thomas Waldmann
f7d724ce33 tests: only use mtime once in directory comparison tuples 2015-10-26 01:37:28 +01:00
Thomas Waldmann
f285e90912 archiver: add E status as error indication
E means that an error occured when processing this (single) item
2015-10-25 02:53:36 +02:00
Thomas Waldmann
7b73abdcda archiver: rename print_x methods so they correspond to log levels
also:

remove some "Warning: " msg prefixes - if we emit at WARNING level,
it is obviously a warning.

remove some "borg: " msg prefixes.
2015-10-25 02:35:42 +02:00
Thomas Waldmann
d8d3c8521b fix logging levels
All normal informational output is now logged at INFO level.
To actually see normal output, the logger is configured to level INFO also.

Log levels:
WARNING is for warnings, ERROR is for (fatal) errors, DEBUG is for debugging.

logging levels must only be used according to this semantics and must not be
(ab)used to let something show up (although the logger would usually hide it)
or hide something (although the logger would usually show it).

Controlling the amount of output shown on INFO level:
--verbose, --progress, --stats are currently used for this.
more such flags might be added later as needed.

if they are set, more output is logged (at INFO level).

also: change strange setup_logging return value
2015-10-23 02:29:41 +02:00
TW
52fd2ad3da Merge pull request #320 from ThomasWaldmann/final-status
Final status
2015-10-22 01:04:36 +02:00
Thomas Waldmann
5bcd4835e6 add tests for return codes 2015-10-22 00:45:29 +02:00
Antoine Beaupré
bfaa046a31 add standard --version argument
this way the version can be discovered by scripts without having to
part the output of 'help'.

it is removed from the 'help' output itself because it is prettier
without the complete version number, and then the description can be
reused elsewhere as well without needing the version number
2015-10-21 09:58:28 -04:00
TW
557d8c7e03 Merge pull request #318 from anarcat/flake8
small flake8 changes
2015-10-21 02:15:22 +02:00
Antoine Beaupré
05c4255620 flake8 cleanup broke the upgrader, re-import Repository 2015-10-20 19:54:57 -04:00
Thomas Waldmann
72c984891c refactor return codes, fixes #61
0 = success (logged as INFO)
1 = warning (logged as WARNING)
2 = (fatal and abrupt) error (logged as ERROR)

please use the EXIT_(SUCCESS,WARNING,ERROR) constants from helpers module.
2015-10-21 01:11:51 +02:00
Thomas Waldmann
1439f3be60 give a final status into the log output, including exit code, fixes #58 2015-10-20 23:57:56 +02:00
Thomas Waldmann
af2366693a tests: catch stderr also, some tests expect stderr contents in "output"
weird: the remote archive fuse tests deadlock, that's why I replaced them by dummies
2015-10-20 22:46:47 +02:00
Antoine Beaupré
8651f87fa1 fix flake8 warnings in my recent PRs 2015-10-20 14:43:49 -04:00
Antoine Beaupré
aad6afb3e0 pep8 the whole darn helpers module 2015-10-20 13:39:21 -04:00
Antoine Beaupré
21fdc91995 clarify size tests 2015-10-20 13:04:01 -04:00
Antoine Beaupré
416e42335c introduce variable precision 2015-10-20 13:01:39 -04:00
Antoine Beaupré
c7c1b9222b convert to more flexible size formatters
those can now support both file sizes (in SI/decimal format, powers of 10) and memory sizes (in binary format, powers of 2)

tests still fail because the result is always displayed as floats
2015-10-20 13:01:14 -04:00
Antoine Beaupré
de390b1ca6 add file size tests, failing
the tests are failing because 1KB gets displayed as 1000 bytes, but also because higher prefixes are missing
2015-10-20 13:01:14 -04:00
TW
21f26988cc Merge pull request #303 from anarcat/verbosity
Verbosity
2015-10-19 22:25:46 +02:00
Antoine Beaupré
38bde26673 remove needless double type conversion
i got confused and thought i was setting the environment (in which case you need to cast to str anyways, so this was wrong even then)
2015-10-19 15:47:05 -04:00
Antoine Beaupré
a3084b7174 try to fix build on py32 again 2015-10-19 14:41:02 -04:00
Antoine Beaupré
12d22d5940 try to fix build on py32 2015-10-19 09:10:45 -04:00
Antoine Beaupré
f9bccd1987 revert policy decision of showing all files listing only on debug 2015-10-19 09:10:19 -04:00
Antoine Beaupré
49d7c240a0 cosmetic: don't word-wrap needlessly 2015-10-19 09:10:04 -04:00
Thomas Waldmann
7d31da7914 implement cmdline metadata value decoding
code copied & adapted from Archive.load()
2015-10-19 12:16:28 +02:00
Thomas Waldmann
af2f1f7861 remove a fixed FIXME
see a few lines below, where it renames the original file to *.beforerecover before creating the repaired copy using the old name.
2015-10-19 11:57:12 +02:00
TW
79482a1c46 Merge pull request #310 from ThomasWaldmann/non-ascii-acls
Non ascii acls
2015-10-19 11:39:15 +02:00
TW
a7db210ee9 Merge pull request #308 from ThomasWaldmann/test-binary
Test binary, fixes #215
2015-10-19 10:14:20 +02:00
Antoine Beaupré
98512736e5 stats tests: vary values to possible catch errors 2015-10-18 21:13:01 -04:00
Antoine Beaupré
f48bbc3725 move defaults up in alternate implementation, use nameduple 2015-10-18 21:07:28 -04:00
Antoine Beaupré
158e6b529a cosmetic: pep8 and io is actually just out 2015-10-18 21:06:56 -04:00
Antoine Beaupré
4c6915cce5 fix typos and remove debug code 2015-10-18 21:06:37 -04:00
Antoine Beaupré
1c0fb82b59 check for the stream --progress uses, not stdin 2015-10-18 20:54:39 -04:00
Thomas Waldmann
d602558f9d acls (darwin): use helper functions safe_encode/safe_decode
also: rewrite one bytes-based function to work more similar than all other acl-processing functions.
2015-10-19 02:32:29 +02:00
Thomas Waldmann
213075e5c1 acls (freebsd): use helper functions safe_encode/safe_decode 2015-10-19 01:43:46 +02:00
Thomas Waldmann
259f8678d6 acls (linux): helper functions safe_encode/safe_decode 2015-10-19 01:40:15 +02:00
Thomas Waldmann
5a2aa7b02b acls (linux): make tests as they should be
TODO: can this be done without creating a user/group "übel" with uid 666 gid 666?
2015-10-19 01:09:58 +02:00
Thomas Waldmann
e818026440 acls (linux): remove int() cast
it seems like the (non-numerical) name or group might get into fields[3] if the name -> uid or group -> gid mapping is unknown.
2015-10-19 00:28:53 +02:00
Thomas Waldmann
1f14d1de19 acls (linux): use surrogatescape error handling for acl_append_numeric_ids and acl_numeric_ids
surrogatescape will decode/encode invalid utf-8 sequences (if we do not get utf-8) in a round-tripping way.
2015-10-19 00:01:19 +02:00
Thomas Waldmann
63ed5d9949 acls (posix platforms): use surrogatescape error handling for posix_acl_use_stored_uid_gid
surrogatescape will decode/encode invalid utf-8 sequences (if we do not get utf-8) in a round-tripping way.
2015-10-18 23:43:24 +02:00
Thomas Waldmann
b2cffe00fe acls (linux): use surrogatescape error handling, fix test
surrogatescape will decode/encode invalid utf-8 sequences (if we do not get utf-8) in a round-tripping way.
2015-10-18 23:33:29 +02:00
Thomas Waldmann
55179fe64d acls (linux): add a test for acl_use_local_uid_gid and fix this function
this has never worked as intended as the function was not using the computed "fields[1]" value at all.
plus there were type issues after that was fixed.
2015-10-18 23:20:01 +02:00
Thomas Waldmann
45b04cd3c1 add non-ascii ACL test (linux)
still failing as the tested code does not yet work with non-ascii ACLs
2015-10-18 20:54:46 +02:00
Thomas Waldmann
723590df3d fix borg.exe presence detection for python3.2 2015-10-18 19:18:24 +02:00
Thomas Waldmann
60cdb5f716 make archiver tests run for the python source as well as for the pyinstaller binary, fixes #215
if the borg.exe binary is not available in PATH, binary tests are skipped.

source tests are run without forking (for better speed, esp. on travis).
binary tests need forking the binary, of course.

for source tests, some tests check for an exception to happen.
for a forked binary, we of course can only check the exit code, which is non-zero in that case.
2015-10-18 18:48:36 +02:00
Thomas Waldmann
03975016c5 upgrader: fix / reformat comments 2015-10-18 16:43:59 +02:00
TW
3c52f41132 Merge pull request #299 from anarcat/no-inplace
do not upgrade repositories in place by default
2015-10-18 16:36:07 +02:00
TW
10567fb327 Merge pull request #306 from anarcat/upgrader-index-fixes
fix cascading failure with the index conversion code
2015-10-18 14:54:49 +02:00
Antoine Beaupré
319fcbacc5 fix phrasings in "in place" refactoring 2015-10-17 22:04:00 -04:00
Antoine Beaupré
8c48015e70 try to work around Windows idiocy of open files
apparently, we may be able to rewrite an open file if we rename it first.

i have no way to test this, unfortunately
2015-10-17 21:59:51 -04:00
Antoine Beaupré
e59f1d50d9 fix tests: umask is not defined in the repo yet 2015-10-17 21:56:25 -04:00
Antoine Beaupré
ce72051284 rename cache variable to index for clarity 2015-10-17 21:50:16 -04:00
Antoine Beaupré
07e7f2dcad fixup warning message 2015-10-17 21:50:14 -04:00
Antoine Beaupré
fb68c6ff70 always convert the chunks cache we find
it seems it is possible that the chunks files are copied but *not*
converted. this may have happened here because the conversion was
interrupted, although the specific scenario is still unclear (but it
did happen during manual tests here). therefore reproducing this
problem seems to be difficult, hence the lack of tests for this
specific issue.

since we consider the header replacement code to be safe, that we
always convert shouldn't pose any additional threat to the existing
borg chunk cache.
2015-10-17 21:44:50 -04:00
Antoine Beaupré
c4599d8ea4 fix cascading failure with the index conversion code
this resolves bug #something where the index file could not be
converted, completely breaking conversion.

it seems that, during some refactoring, the index conversion code was
completely dropped. this was missed by the unit tests because the repo
can still be opened by the constructor even though the index is
invalid, so tests need improvements there.
2015-10-17 21:44:50 -04:00
Antoine Beaupré
92ac120fb0 default progress display to true if on a tty
this makes --progress a toggle: if there's a terminal, it turns it
off, if there isn't, it forces it on.
2015-10-17 21:21:33 -04:00
Antoine Beaupré
e4f325182e Revert "no need to flush stderr in my tests"
It is actually necessary, for now.

This reverts commit 8fdd1eddf9.

Conflicts:
	borg/helpers.py
2015-10-17 21:21:33 -04:00
Antoine Beaupré
ce1aaa9dfa Revert "fix conflict between --stats and --progress"
the columns handling fixed that isssue more elegantly

This reverts commit 7f77778419.

Conflicts:
	borg/helpers.py
2015-10-17 21:21:33 -04:00
Antoine Beaupré
0d8525ad8f add missing lines 2015-10-17 21:21:33 -04:00
Antoine Beaupré
d666c86bfc adjust display of --stats
it was broken by recent commits.

also remove the __format__() anti-pattern from cache as well.
2015-10-17 21:21:33 -04:00
Antoine Beaupré
28d0a9ce84 human-readable representation of stats 2015-10-17 21:21:32 -04:00
Antoine Beaupré
66bfc6fce8 get rid of print_() function
this function was over-coupling the cache system and the statistics
module. they are now almost decoupled insofar as the cache system has
its own rendering system now that is called separately.

furthermore, we have a much more flexible formatting system that is
used coherently between --progress and --stats

the degenerate case here is if we want to change the label in the
statistics summary: in this case we need to override the default
__str__() representation to insert our own label.
2015-10-17 21:21:32 -04:00
Antoine Beaupré
118ee8679f remove custom microformat from stats
i saw the errors in my ways: __format__ is only to customize the
"format mini-language", what comes after ":" in a new string
format. unfortunately, we cannot easily refer to individual fields in
there, short of re-implementing a new formatting language, which seems
silly.

instead, we use properties to extract human-readable versions of the
statistics. more intuitive and certainly a more common pattern than
the exotic __format__().

also add unit tests to prove this all works
2015-10-17 21:21:32 -04:00
Antoine Beaupré
6b547e6554 no need to flush stderr in my tests 2015-10-17 21:21:32 -04:00
Antoine Beaupré
75c993b875 simplify progress display
we stop enforcing a minimum width for fields, it changes only on
logarithmic boundaries, so not a big problem. string conversion is
implicit

this gives us a little more width for the path
2015-10-17 21:21:32 -04:00
Antoine Beaupré
ecae163072 use all available columns for path in progress
we use the new get_terminal_size() function, with a fallback for
Python 3.2. we default to 80 columns.

then we generate the stats bit and fill the rest with the path, as
previously, but with a possibly larger field.

note that this works with resizes in my test (uxterm)
2015-10-17 21:21:32 -04:00
Antoine Beaupré
7f28244cfe fix conflict between --stats and --progress
the --stats output would be slightly garbled by --progress, because of
the \r that is output at the last line...

example:

    initializing cache
    reading files cache
    processing files
    ------------------------------------------------------------------------------ s/twotone
    Archive name: 2015-10-15-test
2015-10-17 21:21:32 -04:00
Antoine Beaupré
e8cf28f9a0 only show all files found in debug
a single -v flag shouldn't flood the console with all the files in the
path specified, it makes -v basically useless

this way, -v can also be used with --progress to have nicer output:

initializing cache
reading files cache
processing files
  5.20 GB O   2.66 GB C  25.13 MB D 27576 N baz/...
2015-10-17 21:21:31 -04:00
Antoine Beaupré
d8f8076984 factor out status output so it is consistent
as it was, surrogates were not always removed, for example

we may also want to output at different levels or control if we want
to print unchanged files and so on
2015-10-17 21:21:31 -04:00
Antoine Beaupré
b120e5f119 output more progress information
without this, there would be a solid 20 seconds here without any sort
of output on the console, regardless of the verbosity level. this
makes nice incremental messages telling the user that borg is not
stalled (or waiting for a lock, for that matter)

the "processing files" message is a little clunky, as we somewhat
abuse the cache to figure out if we are just starting... but it helps
if there are problems reading the actual files: it tells us the
initialization is basically complete and we're going ahead with the
reading of all the files.
2015-10-17 21:21:31 -04:00
Antoine Beaupré
3827c2b107 also show the number of files processed in --progress 2015-10-17 21:21:31 -04:00
Antoine Beaupré
3eebea8745 explain what the --progress flag does exactly
an alternative to this would be to use more than a letter in the
output, for example:

 orig: 16.82 GB comp: 9.44 GB dedup: 25.86 MB home/
2015-10-17 21:21:31 -04:00
Thomas Waldmann
fc78b44923 use --one-file-system (as "du" tool does) instead of --do-not-cross-mountpoints
the old name still works, but emits a deprecation warning suggesting the new name.

this is a followup to 4fd06e2634, which added "-x" (as seen in "du").
2015-10-17 20:55:07 +02:00
TW
2dda41dc2a Merge pull request #294 from anarcat/x-option
add -x flag, common to GNU utilities
2015-10-17 20:06:02 +02:00
Antoine Beaupré
eacb0b9e83 Merge branch 'logging-refactor' into upstream 2015-10-17 12:29:52 -04:00
Antoine Beaupré
4fd06e2634 add -x flag, common to GNU utilities
it should also probably be --one-file-system for coherence with du(1)
2015-10-17 12:23:45 -04:00
Antoine Beaupré
34d0e0641c make sure hardlink copy doesn't break perms 2015-10-17 00:41:20 -04:00
Antoine Beaupré
4be9c29d0d os.link signature is the same as shutil.copy, use it directly 2015-10-17 00:38:14 -04:00
Antoine Beaupré
aaf72e3861 do not skip all attic tests, some work without now 2015-10-17 00:38:14 -04:00
Antoine Beaupré
6d457aed57 do not upgrade repositories in place by default
instead, we perform the equivalent of `cp -al` on the repository to
keep a backup, and then rewrite the files, breaking the hardlinks as
necessary.

it has to be confirmed that the rest of Borg will also break hardlinks
when operating on files in the repository. if Borg operates in place
on any files of the repository, it could jeoperdize the backup, so
this needs to be verified. I believe that most files are written to a
temporary file and moved into place, however, so the backup should be
safe.

the rationale behind the backup copy is that we want to be extra
careful with user's data by default. the old behavior is retained
through the `--inplace`/`-i` commandline flag. plus, this way we don't
need to tell users to go through extra steps (`cp -a`, in particular)
before running the command.

also, it can take a long time to do the copy of the attic repository
we wish to work on. since `cp -a` doesn't provide progress
information, the new default behavior provides a nicer user experience
of giving an overall impression of the upgrade progress, while
retaining compatibility with Attic by default (in a separate
repository, of course).

this makes the upgrade command much less scary to use and hopefully
will convert drones to the borg collective.

the only place where the default inplace behavior is retained is in
the header_replace() function, to avoid breaking the cache conversion
code and to keep API stability and semantic coherence ("replace" by
defaults means in place).
2015-10-17 00:38:07 -04:00
Thomas Waldmann
9b10e8a3f3 if borg.exe is not present, do not try to test it 2015-10-16 00:52:23 +02:00
Thomas Waldmann
1a248116db move cmd fixture to archiver test module 2015-10-16 00:18:46 +02:00
Thomas Waldmann
4b7c02775e benchmarks: test with both the binary and the python code
we use forking mode always and either execute python with the archiver module or the "borg.exe" binary.
the cmd fixture alternates between 'python' and 'binary' mode and calls exec_cmd accordingly.
2015-10-16 00:12:02 +02:00
Thomas Waldmann
7efab2f254 benchmark tests: improve comments 2015-10-14 01:00:25 +02:00
Thomas Waldmann
a5a6ba0d77 integrate pytest-benchmark, test create, extract, list, delete, info, check, help, fixes #146
Instead of "realistic data", I chose the test data to be either all-zero (all-ascii-zero to be precise)
or all-random and benchmark them separately.
So we can better determine the cause (deduplication or storage) in case we see some performance regression.

"help" is benchmarked to see the minimum runtime when it basically does nothing.

also:
- refactor archiver execution core functionality into exec_cmd() so it can be used more flexibly
- tox: usually we want to skip benchmarks, only run them if requested manually
- install pytest-benchmark - run tox with "-r" to have it installed into your .tox envs
2015-10-11 16:07:11 +02:00
Antoine Beaupré
dbc183f87f drop support for Python 2 2015-10-09 14:13:58 -04:00
Antoine Beaupré
bdbdbdde90 Merge remote-tracking branch 'origin/master' into logging-refactor
Conflicts:
	borg/archive.py
	borg/archiver.py
	borg/cache.py
	borg/key.py
2015-10-09 12:58:27 -04:00
Antoine Beaupré
fd41408de2 move progress information out of tests and back in converter
this was a remnant of when i was writing the converter/upgrader code,
and was destined to be a general progress message in the migration
process. i removed a more technical, internal debugging message in
exchange
2015-10-09 12:34:05 -04:00
Antoine Beaupré
efa88ef6c6 fix tests: they expect check to spew output
our default verbosity shows only warnings, we'd have to tweak tests to be verbose for this to work

This reverts commit 27be46a5ba.
2015-10-09 12:28:29 -04:00
Thomas Waldmann
60d3b24df4 tagged/signed 0.27.0
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCgAGBQJWFPIaAAoJECQ6z6lR944Bl6UQAJsRgzQqQBEFk1tmQiDjox36
 QEJA4SyaK6dPCKqxjXNVQ8T/hdDWm2mNGoxBq3A/gcLoU4NRg73DnxroPTg0YRtR
 /mX8ojyjA0Yz9mAAFCGm8LMgTXLRBxqjpow6U/89kA/iOJbfIr4sO0a6cCI/hr9c
 7lL7ZGXO5hgVP7OugJMvLpSG/mW8xRckIW6xx3wjSvcORYPerPAoDpotDGIdMzNy
 UvqZI+TIMIeW1U85PSKa0uODrxdtnVKHBxCJRznqAYb7mOButeYY3u7Ya48oMjdB
 ZucipdWQh++lTod7zhRmczkridVrH229mKMsoA2t9fxmkiJsqkTKzpB+70l8ws+H
 76YQsPc81VJyNg6Cj9rRqrbfSjQ8Wms9+SnKzD9f0MkyyHgwUwkOZhZph5DXH6xn
 xbHbwhBhYbtFyxTXhb9UJMjY2gUREWZ48BDbf81jHUIVfCo9IuXyeWnoEoRmYBJ5
 GGB0ul2V1LG6+divoS9K3HEzf+MPW3nQCi3U4J71wvYDfDR2JggFVayXt/aL/D3E
 ED2FJZMQEQXA5vPKmosBcDr7u1vv7SZ3pjzzbyDLMHHzOG36ScxKkAIzULjpWWhP
 y9fnOv+V2g7Hoq0y3XxBLel3P0Uvx1AADqgKUTeLK0GiSLndqEehHrU1TiYYq077
 NurFcaa97j08b1l8Dif2
 =q6Ou
 -----END PGP SIGNATURE-----

Merge tag '0.27.0' into multithreading

tagged/signed 0.27.0
2015-10-09 17:18:34 +02:00
Antoine Beaupré
1c61f87da3 remove debugging code and fix all have_cython calls 2015-10-08 17:20:52 -04:00
Antoine Beaupré
80e53fb66d it's a function, call it as such 2015-10-08 17:16:11 -04:00
Antoine Beaupré
a1dad8c9da try to mock msgpack altogether to fix RTD again
it seems that msgpack is a hard depends in archive...
2015-10-08 17:06:48 -04:00
Antoine Beaupré
a869ab0702 try to fix RTD build *again* *again* 2015-10-08 17:03:35 -04:00
Antoine Beaupré
e8ae96b54e try to fix RTD build *again* 2015-10-08 17:01:42 -04:00
Antoine Beaupré
f2c56fb890 try to fix build on RTD *again* 2015-10-08 16:57:36 -04:00
Antoine Beaupré
3f68399463 style: wrap multiline strings elegantly 2015-10-08 16:52:49 -04:00
Antoine Beaupré
a42a5e3e2d fix all logger pep8 warnings except long lines 2015-10-08 16:50:44 -04:00
Antoine Beaupré
8075a139b3 fix typo 2015-10-08 16:44:30 -04:00
Antoine Beaupré
b1eafe7833 remove status that is best reflected in VCS 2015-10-08 16:44:30 -04:00
Antoine Beaupré
2d4b735fed remove unintended changes 2015-10-08 16:38:53 -04:00
Antoine Beaupré
27be46a5ba tweak some levels 2015-10-08 16:31:22 -04:00
Antoine Beaupré
423ff45d81 rename cython detection function
"have" has clearer semantics than "detect"
2015-10-08 15:34:44 -04:00
Antoine Beaupré
ff483fe485 fix logical inversion in the semantics of detect_cython() 2015-10-08 15:31:46 -04:00
Antoine Beaupré
f98998f042 fix logical inversion in the semantics of detect_cython() 2015-10-08 15:26:40 -04:00
Antoine Beaupré
6f9e04bc21 generalise the cython check hack
instead of applying this only to usage generation, use it as a generic
mechanism to disable loading of Cython code.

it may be incomplete: there may be other places where Cython code is
loaded that is not checked, but that is sufficient to build the usage
docs. the environment variable used is documented as such in the
docs/usage.rst.

we also move the check to a helper function and document it
better. this has the unfortunate side effect of moving includes
around, but I can't think of a better way.
2015-10-08 08:56:02 -04:00
Antoine Beaupré
9cbc868764 make tests and build work again in usage using environment
this is such a crude hack it is totally embarrassing....

the proper solution would probably be to move the `build_parser()`
function out of `Archiver` completely, but this is such an undertaking
that i doubt it is worth doing since we're looking at switching to
click anyways.

the main problem in moving build_parser() out is that it references
`self` all the time, so it *needs* an archiver context that it can
reuse. we could make the function static and pass self in there by
hand, but it seems like almost a worse hack... and besides, we would
need to load the archiver in order to do that, which would break usage
all over again...
2015-10-07 22:26:59 -04:00
Antoine Beaupré
13d3568548 move usage generation to setup.py
this is an unfortunate rewrite of the manpage creation code mentionned
in #208. ideally, this would be rewritten into a class that can
generate both man pages and .rst files.
2015-10-07 21:07:15 -04:00
Thomas Waldmann
a4967ec582 ssh_cmd: fix wrong caller, fixes #255 2015-10-07 03:32:55 +02:00
Thomas Waldmann
8ddc448f41 make sure to always give segment and offset in repo IntegrityError exception messages
this was only handled correctly at one place, by adding the segment number afterwards.
now the segment number is always included.
2015-10-06 20:35:22 +02:00
Antoine Beaupré
d9e05946ac document logger module 2015-10-06 13:03:49 -04:00
Antoine Beaupré
42cc17caed use new logger object initialisation code 2015-10-06 12:57:27 -04:00
Antoine Beaupré
26561a7766 factor out logger object initialisation 2015-10-06 12:57:27 -04:00
Antoine Beaupré
2d0dae4e8b move logging setup to logger module 2015-10-06 12:57:26 -04:00
anarcat
7908c29180 Merge pull request #249 from anarcat/ssh-env
complete test coverage for SSH args parsing
2015-10-05 19:53:17 -04:00
Antoine Beaupré
a7b70d87cd complete test coverage for SSH args parsing 2015-10-05 19:22:33 -04:00
TW
745f9b89f8 Merge pull request #247 from anarcat/xdg
respect XDG_CACHE_HOME
2015-10-06 01:20:48 +02:00
TW
974dd58c23 Merge pull request #248 from anarcat/ssh-env
add support for arbitrary SSH commands
2015-10-06 01:20:23 +02:00
Antoine Beaupré
8f0de2cab7 fix tests on travis, which seem to set BORG_CACHE_DIR 2015-10-05 19:05:27 -04:00
Antoine Beaupré
a0ef4e25dd add support for arbitrary SSH commands (attic#99)
while SSH options can be specified through `~/.ssh/config`, some users
may want to use a completely different SSH command for their backups,
without overriding their $PATH variable. it may also be easier to do
ad-hoc configuration and tests that way.

plus, the POLA tells us that users expects something like this to be
supported by commands that talk to ssh. it is supported by rsync, git
and so on.
2015-10-05 18:54:00 -04:00
Antoine Beaupré
43a65933f7 move ssh generation code to a stub, add unit test 2015-10-05 18:51:20 -04:00
Antoine Beaupré
de2a811606 move RemoteRepository defaults to the class
the reasoning behind this is that we may need to test a
RemoteRepository setup outside of the main archiver routines, which
the current default location makes impossible

by moving the umask and remote_path remotes into the RemoteRepository
the (reasonable) defaults are available regardless of the (currently
obscure) initialisation routine, and make unit tests easier to develop
and support
2015-10-05 18:45:57 -04:00
Antoine Beaupré
427ddd64a6 respect XDG_CACHE_HOME
fixes attic#181
2015-10-05 17:50:46 -04:00
Thomas Waldmann
c50f32426b do not crash on empty lock.roster, fixes #232 2015-10-05 23:23:59 +02:00
Thomas Waldmann
6f637bed2f LoggedIO: deduplicated code, improved checks and error handling in read()
Code shared by read() and iter_objects() was moved into _read().

Compared to read()'s previous state, this improved:
- fixed size check to avoid read with negative size
- exception handler for struct unpack
- checking for short read
- more precise exception messages
2015-10-05 02:27:24 +02:00
Antoine Beaupré
97189dd25b add missing sys import, fixing build 2015-10-03 15:08:55 -04:00
Antoine Beaupré
e414203ce2 convert upgrade code to logger as well 2015-10-03 14:24:48 -04:00
Antoine Beaupré
24413136ee Merge remote-tracking branch 'origin/master' into logging-refactor
Conflicts:
	borg/archiver.py
2015-10-03 14:23:53 -04:00
Thomas Waldmann
51dc66d05f implement borg delete --cache-only repo, attic #123
it deletes just the local cache for the given repository, not the repo itself.
2015-10-03 19:29:45 +02:00
TW
adac324b6c Merge pull request #240 from ThomasWaldmann/cache-config-check
fix multiple issues with the cache config version check, fixes #234
2015-10-03 19:19:22 +02:00
TW
23bfe4d1bc Merge pull request #238 from ThomasWaldmann/index-archive-optional
temporary hack to avoid using lots of disk space for chunks.archive.d
2015-10-03 19:12:52 +02:00
Antoine Beaupré
5409cbaa67 also copy files cache verbatim
it seems the file cache does *not* have the ATTIC magic header (nor
does it have one in borg), so we don't need to edit the file - we just
copy it like a regular file.

while i'm here, simplify the cache conversion loop: it's no use
splitting the copy and the edition since the latter is so fast, just
do everything in one loop, which makes it much easier to read.
2015-10-03 12:56:03 -04:00
Antoine Beaupré
fded2219a8 mention borg delete borg
this makes it clear how to start from scratch, in case the chunk cache
was failed to be copied and so on.
2015-10-03 12:46:23 -04:00
Antoine Beaupré
c91c5d0029 rename convert command to upgrade
convert is too generic for the Attic conversion: we may have other
converters, from other, more foreign systems that will require
different options and different upgrade mechanisms that convert could
never cover appropriately. we are more likely to use an approach
similar to "git fast-import" instead here, and have the conversion
tools be external tool that feed standard data into borg during
conversion.

upgrade seems like a more natural fit: Attic could be considered like
a pre-historic version of Borg that requires invasive changes for borg
to be able to use the repository. we may require such changes in the
future of borg as well: if we make backwards-incompatible changes to
the repository layout or data format, it is possible that we require
such changes to be performed on the repository before it is usable
again. instead of scattering those conversions all over the code, we
should simply have assertions that check the layout is correct and
point the user to upgrade if it is not.

upgrade should eventually automatically detect the repository format
or version and perform appropriate conversions. Attic is only the
first one. we still need to implement an adequate API for
auto-detection and upgrade, only the seeds of that are present for now.

of course, changes to the upgrade command should be thoroughly
documented in the release notes and an eventual upgrade manual.
2015-10-03 12:36:52 -04:00
Antoine Beaupré
48b7c8cea3 avoid checking for non-existent files
if there's no attic cache, it's no use checking for individual files

this also makes the code a little clearer

also added comments
2015-10-03 11:52:12 -04:00
Antoine Beaupré
690541264e style fixes (pep8, append, file builtin) 2015-10-03 11:49:01 -04:00
Antoine Beaupré
3773681f00 rewire cache copy mechanisms
we separate the conversion and the copy in order to be able to copy
arbitrary files from attic without converting them. this allows us to
copy the config file cleanly without attempting to rewrite its magic
number
2015-10-03 11:07:38 -04:00
Antoine Beaupré
2c66e7c233 make percentage a real percentage 2015-10-03 10:49:29 -04:00
Antoine Beaupré
f25888b27a restore box removed by mistake 2015-10-02 16:04:35 -04:00
Antoine Beaupré
35aaeef8bd remove spurious output 2015-10-02 16:00:42 -04:00
Antoine Beaupré
8193c414a9 add and use string representation of archive for stats 2015-10-02 15:56:21 -04:00
Antoine Beaupré
e5a0936a05 add formatters for Cache and Statistics objects
this greatly simplifies the display of those objects, as the
__format__() parameter allows for arbitrary display of the internal
fields of both objects

this will allow us to display those summaries without having to pass a
label to the string representation. we can also print the objects
directly without formatting at all.
2015-10-02 15:55:14 -04:00
Thomas Waldmann
893242ead4 fix multiple issues with the cache config version check, fixes #234
- issue #234: handle exception when config file is empty is really not a borg cache config
- there was a unused %s in the Exception string
- error msg was wrong when version check failed - this IS a borg cache, but not of expected version
2015-10-02 18:11:10 +02:00
Antoine Beaupré
b09cdb4a63 don't add module name on standard messages
too much clutter
2015-10-02 11:22:38 -04:00
Antoine Beaupré
2f78b8ad41 remove stray comment 2015-10-02 11:16:28 -04:00
Antoine Beaupré
1819adaf59 log level tweaking: stats should not be a warning
we should find other ways of forcing that to be shown, it seems
2015-10-02 11:16:21 -04:00
Antoine Beaupré
ca6c52610f restore some print statements
the heuristics i used are the following:

 1. if we are prompting the use, use print on stderr (input() may
    produce some stuff on stdout, but it's outside the scope of this
    patch). we do not want those prompts to end up on the standard
    output in case we are piping stuff around

 2. if the command is primarily producing output for the user on the
    console (`list`, `info`, `help`), we simply print on the default
    file descriptor.

 3. everywhere else, we use the logging module with varying levels of
    verbosity, as appropriate.
2015-10-02 11:13:01 -04:00
Antoine Beaupré
c9b11316ab use a module-specific logger instead of global one
that way we have one logger per module, and we can pick and choose
which module we want verbose, for example
2015-10-02 11:05:44 -04:00
Thomas Waldmann
8978515991 temporary hack to avoid using lots of disk space for chunks.archive.d 2015-10-02 16:56:31 +02:00
Antoine Beaupré
ea5d00436c also document the cache locations 2015-10-02 10:12:13 -04:00
Antoine Beaupré
ad85f64842 whitespace 2015-10-02 10:10:50 -04:00
Antoine Beaupré
69040588cd update docs to reflect that cache is converted 2015-10-02 10:10:43 -04:00
Antoine Beaupré
d4d1b414b5 remove needless autouse 2015-10-02 09:44:53 -04:00
Antoine Beaupré
41e9942efe follow naming of tested module 2015-10-02 09:43:51 -04:00
Antoine Beaupré
081b91bea0 remove needless paren 2015-10-02 09:43:10 -04:00
Antoine Beaupré
3e7fa0d633 also copy the cache config file to workaround #234 2015-10-01 16:41:17 -04:00
Antoine Beaupré
8022e563a9 don't clobber existing borg cache 2015-10-01 16:27:19 -04:00
Antoine Beaupré
55f79b4999 complete cache conversion code
we need to create the borg cache directory

dry run was ignored, fixed.

process cache before segment, because we want to do the faster stuff first
2015-10-01 16:24:28 -04:00
Antoine Beaupré
28a033d1d3 remove debug output that clobbers segment spinner 2015-10-01 16:03:52 -04:00
Antoine Beaupré
4f9a411ad8 remove unneeded fixture decorator 2015-10-01 16:01:17 -04:00
Antoine Beaupré
022de5be47 untested file/chunks cache conversion
i couldn't figure out how to generate a cache set directly, Archiver is a pain...
2015-10-01 16:01:01 -04:00
Antoine Beaupré
7c32f555ac repository index conversion 2015-10-01 15:43:16 -04:00
Antoine Beaupré
a7902e5657 cosmetic: show 100% when done, not n-1/n% 2015-10-01 14:29:09 -04:00
Antoine Beaupré
35b219597f only write magic num if necessary
this could allow speeding up conversions resumed after interruption
2015-10-01 14:28:49 -04:00
Antoine Beaupré
180dfcb18f remove needless indentation 2015-10-01 14:23:43 -04:00
Antoine Beaupré
6a72252b69 release lock properly if segment conversion crashes 2015-10-01 14:22:29 -04:00
Antoine Beaupré
1b540d91a0 convert more print() statements to logging
we use logging.warning in info and list, but print() more usage bits.

we also now support logging.debug() and by default are more silent
2015-10-01 14:20:29 -04:00
Antoine Beaupré
09ffbb1d9d convert most print() calls to logging
the logging level varies: most is logging.info(), in some place
logging.warning() or logging.error() are used when the condition is
clearly an error or warning. in other cases, we keep using print, but
force writing to sys.stderr, unless we interact with the user.

there were 77 calls to print before this commit, now there are 7, most
of which in the archiver module, which interacts directly with the
user. in one case there, we still use print() only because logging is
not setup properly yet during argument parsing.

it could be argued that commands like info or list should use print
directly, but we have converted them anyways, without ill effects on
the unit tests

unit tests still use print() in some places

this switches all informational output to stderr, which should help
with, if not fix jborg/attic#312 directly
2015-10-01 13:41:45 -04:00
Antoine Beaupré
c996fd8366 just call print() once in the odd print_() function
this will help when we want to refactor output functions

this function should definitely be replaced by a __repr__() or
__str__() however
2015-10-01 12:39:13 -04:00
Antoine Beaupré
3bb3bd45fc add percentage progress 2015-10-01 12:36:53 -04:00
Antoine Beaupré
0d457bc846 clarify what to do about the cache warning 2015-10-01 11:25:12 -04:00
Antoine Beaupré
946aca97a1 avoid flooding the console
instead we add progress information
2015-10-01 11:25:02 -04:00
Antoine Beaupré
6c318a0f27 re-pep8 2015-10-01 11:12:23 -04:00
Antoine Beaupré
7f6fd1f306 add docs for all converter test code 2015-10-01 11:11:30 -04:00
Antoine Beaupré
a08bcb21ae refactor common code
we get rid of repo_open() which doesn't same much typing, and add a validator for keys
2015-10-01 11:10:56 -04:00
Antoine Beaupré
f5cb0f4e73 rewrite convert tests with pytest fixtures 2015-10-01 10:41:31 -04:00
Antoine Beaupré
98e4e6bc25 lock repository when converting segments 2015-10-01 09:35:17 -04:00
Antoine Beaupré
58815bc28a fix commandline dispatch for converter 2015-10-01 09:23:17 -04:00
Antoine Beaupré
79d9aebaf2 use permanently instead of irrevocably, which is less common 2015-10-01 09:00:49 -04:00
Antoine Beaupré
b9c474d187 pep8: put pytest skip marker after imports 2015-10-01 08:59:01 -04:00
Antoine Beaupré
4a85f2d0f5 fix most pep8 warnings
* limit all lines to 80 chars
* remove spaces around parameters
* missing blank lines
2015-10-01 08:58:01 -04:00
Antoine Beaupré
5f6eb87385 much nicer validation checking 2015-10-01 08:50:06 -04:00
Antoine Beaupré
d5198c551b split out depends in imports 2015-10-01 08:47:23 -04:00
Antoine Beaupré
d66516351f use builtin NotImplementedError instead of writing our own
NotImplemented didn't work with pytest.raise(), i didn't know about NotImplementedError, thanks tw
2015-10-01 08:46:30 -04:00
Antoine Beaupré
ef0ed409b6 fix typo 2015-10-01 08:44:17 -04:00
Antoine Beaupré
5b8cb63479 remove duplicate code with the unit test 2015-10-01 08:43:05 -04:00
Antoine Beaupré
dbd4ac7f8d add missing colon 2015-10-01 08:41:44 -04:00
Antoine Beaupré
c2913f5f10 style: don't use continue for nothing 2015-10-01 08:40:56 -04:00
Antoine Beaupré
efbad396f4 help text review: magic s/number/string/, s/can/must/ 2015-10-01 08:40:25 -04:00
Antoine Beaupré
a81755f1a9 use triple-double-quoted instead of single-double-quoted
at the request of TW, see #231
2015-10-01 08:34:18 -04:00
Antoine Beaupré
bcd94b96e0 split up keyfile, segments and overall testing in converter 2015-10-01 00:32:34 -04:00
Antoine Beaupré
1ba856d2b3 refactor: group test repo subroutine 2015-10-01 00:15:25 -04:00
Antoine Beaupré
1b29699403 cosmetic: reorder 2015-10-01 00:15:12 -04:00
Antoine Beaupré
a5f32b0a27 add convert command 2015-09-30 23:50:46 -04:00
Antoine Beaupré
f35e8e17f2 add dry run support to converter 2015-09-30 23:50:35 -04:00
Antoine Beaupré
e554365765 remove unused import 2015-09-30 23:28:07 -04:00
Antoine Beaupré
77ed6dec2b skip converter tests if attic isn't installed 2015-09-30 23:27:55 -04:00
Antoine Beaupré
c30df4e033 move converter code out of test suite 2015-09-30 23:18:03 -04:00
Antoine Beaupré
5a1680397c remove needless use of self 2015-09-30 23:02:21 -04:00
Antoine Beaupré
aa25a217a4 move conversion code to a separate class for clarity 2015-09-30 23:01:03 -04:00
Antoine Beaupré
312c3cf738 rewrite converter to avoid using attic code
the unit tests themselves still use attic to generate an attic
repository for testing, but the converter code should now be
standalone
2015-09-30 22:54:00 -04:00
Antoine Beaupré
c7af4c7f1d more debug 2015-09-30 22:43:08 -04:00
Antoine Beaupré
2d1988179e some debugging code 2015-09-30 22:41:38 -04:00
Antoine Beaupré
e88a994c8a reshuffle and document 2015-09-30 22:41:21 -04:00
Antoine Beaupré
9ab1e1961e keyfile conversion code 2015-09-30 22:37:39 -04:00
Antoine Beaupré
de54228809 first stab at an attic-borg converter
for now, just in the test suite, but will be migrated to a separate command
2015-09-30 21:08:47 -04:00
Thomas Waldmann
6aca4694fe fix segment entry header size check, attic issue #352
it only checked for too big sizes, but not for too small ones.
that made it die with a ValueError and not raise the appropriate IntegrityError
that gets handled in check() and triggers the repair attempt for the segment.
2015-09-30 16:10:50 +02:00
Thomas Waldmann
ab76176553 fix: patterns might be None 2015-09-19 18:38:44 +02:00
Thomas Waldmann
e0a08c5cae borg extract: warn if a include pattern never matched, fixes #209 2015-09-19 18:16:47 +02:00
Thomas Waldmann
15b003e344 add a string representation for Include/ExcludePattern
it just gives the original string that was used.
2015-09-19 18:03:53 +02:00
Thomas Waldmann
08417b52ec implement counters for Include/ExcludePatterns 2015-09-19 17:48:41 +02:00
Thomas Waldmann
aed6cc9446 be more clear about pruning, attic issue #132 2015-09-19 16:58:02 +02:00
Thomas Waldmann
cad0515178 archive names with slashes are invalid, attic issue #180
for borg mount's FUSE filesystem, we use the archive name as a directory name,
thus slashes are not allowed.
2015-09-19 16:09:20 +02:00
Thomas Waldmann
375717c095 tests: work around strange mtime granularity issue on netbsd, fixes #204
not sure where the problem is:
it seems to announce it supports st_mtime_ns, but if one uses it and
has a file with ...123ns, i t gets restored as ...000ns.

Then I tried setting st_mtime_ns_round to -3, but it still failed with +1000ns difference.

Maybe rounding is incorrect and it should be truncating?
Issue with granularity could be in python, in netbsd (netbsd platform code), in ffs filesystem, ...
2015-09-18 00:02:44 +02:00
Thomas Waldmann
48634d4e96 tests: ignore st_rdev if file is not a block/char device, fixes #203 2015-09-17 22:41:49 +02:00
Thomas Waldmann
41860ef5f0 test setup: stay away from the setgid mode bit
for vagrant testing on misc. platforms, we can't know the group /
we can't have the same group everywhere.

but the OS won't let us set setgid bit if the file does not have our group.
on netbsd, the created file somehow happens to have group "wheel",
but vagrant is not in group wheel.
2015-09-15 23:52:17 +02:00
Thomas Waldmann
cf9ba87734 test setup: do not set the sticky bit on a regular file
sticky bit only has a function on directories.
openbsd does not let one set sticky on files.
other systems seem to just ignore it.
2015-09-15 00:41:32 +02:00
Thomas Waldmann
bc5949a7f4 chunker: add a check whether the POSIX_FADV_DONTNEED constant is defined
on openbsd, it isn't.
2015-09-14 17:36:04 +02:00
Thomas Waldmann
13ded3d5e7 xattr tests: ignore security.selinux attribute showing up 2015-09-14 01:26:20 +02:00
Thomas Waldmann
bc2cfdfc59 fix the other argparse import also 2015-09-13 01:01:48 +02:00
Thomas Waldmann
2b311846e0 add a argparse.py (from py 3.2.6) that is not broken
also: remove previois attempt to fix this, installing pypi argparse into virtualenv does not work.
2015-09-13 00:58:57 +02:00
Thomas Waldmann
7774d4f82c ext3 seems to need a bit more space for a sparse file
but it is still sparse, just needed some adjustment
2015-09-13 00:36:17 +02:00
Thomas Harold
03579ddb5a Obtaining 'char *' from temporary Python value
Old code causes a compile error on Mint 17.2
2015-09-12 17:21:49 -04:00