Commit graph

715 commits

Author SHA1 Message Date
Thomas Waldmann
add6bd96e7 move (h)mac out of meta, so we could include the whole meta into mac computation
note:
- incompatible to previous storage format of merge-all branch
- compatible to master branch / official attic
2015-03-22 21:04:26 +01:00
Thomas Waldmann
af1c8c1b92 refactor parser code, just parse, simplify return tuple 2015-03-22 20:10:43 +01:00
Thomas Waldmann
24f36e623e Merge branch 'merge' into merge-all 2015-03-22 15:58:37 +01:00
Thomas Waldmann
2c2dd21e0e PR #224 - Merge branch 'issue_55' into merge 2015-03-22 15:58:08 +01:00
Thomas Waldmann
6d67379c08 refactor indicator (status) and item processing
process_item was used only for dirs and fifo, replaced it by process_dir and process_fifo,
so the status can be generated there (as it is done for the other item types).
2015-03-22 15:52:43 +01:00
Thomas Waldmann
2ac57f2d12 add condensed description of the changes in merge-all branch 2015-03-22 14:56:22 +01:00
Thomas Waldmann
a3fd1b6876 Merge branch 'merge' into merge-all 2015-03-22 14:55:48 +01:00
Thomas Waldmann
22ae80e1ac add condensed description of the changes in merge branch 2015-03-22 14:55:02 +01:00
Thomas Waldmann
3fed256608 Merge branch 'merge' into merge-all 2015-03-21 02:23:39 +01:00
Thomas Waldmann
57b1b3dbec PR #246 - Merge branch 'remote_exceptions' into merge 2015-03-21 02:22:51 +01:00
Thomas Waldmann
c679f1a6f0 catch all Exceptions, transmit traceback back from remote
before this changesets, most informations about exceptions/tracebacks
on the remote side were lost. now they are transmitted and displayed,
together with the remote attic version.
2015-03-21 02:17:19 +01:00
Thomas Waldmann
d2c2b9a67c Merge branch 'merge' into merge-all 2015-03-20 02:35:03 +01:00
Thomas Waldmann
dd8ff50a5c PR #245 - Merge branch 'fix_exceptions' into merge
Conflicts:
	attic/archive.py
2015-03-20 02:34:10 +01:00
Thomas Waldmann
2da70c7d7a fix some exception handlers
don't catch "Exception" when OSError was meant (otherwise e.errno is not there anyway)
don't use bare "except:" if one can avoid (copied code fragment from similar handler)
2015-03-20 02:31:39 +01:00
Thomas Waldmann
2dfaab0f6c Merge branch 'merge' into merge-all 2015-03-20 01:43:51 +01:00
Thomas Waldmann
f31897bb1f PR #244 - Merge branch 'fix_atime' into merge 2015-03-20 01:43:04 +01:00
Thomas Waldmann
8fba904b16 fix noatime mode, fixes #243
added "nonlocal euid" - without this, euid just gets redefined in inner scope instead of assigned to outer scope
added check for euid 0 - if we run as root, we always have permissions (not just if we are file owner)

note: due to caching and OS behaviour on linux, the bug was a bit tricky to reproduce
and also the fix was a bit tricky to test.

one needs strictatime mount option to enfore traditional atime updating.

for repeated tests, always change file contents (e.g. from /dev/urandom) or attic's caching
will prevent that the file gets read ("accessed") again.

check atimes with ls -lu

i could reproduce code was broken and is fixed with this changeset. and root now doesn't touch any atimes.
2015-03-20 01:40:51 +01:00
Thomas Waldmann
4f7c8326b7 tuning: add a note about scrolling 2015-03-19 01:26:56 +01:00
Thomas Waldmann
f767d5803e fix max unpack length 2015-03-18 21:37:12 +01:00
Thomas Waldmann
ce89707c19 Merge branch 'merge' into merge-all 2015-03-18 18:21:50 +01:00
Thomas Waldmann
fd16debb05 PR #235 - Merge branch 'fix_xattr' into merge 2015-03-18 18:21:21 +01:00
Thomas Waldmann
767e795597 dummy acl implementation for unsupported platforms
the API_VERSION there was not in sync (and that was even true, as "st" was missing in acl_get()) - fixed.
2015-03-18 18:21:04 +01:00
Thomas Waldmann
ae62e3c84c Merge branch 'merge' into merge-all 2015-03-18 17:49:23 +01:00
Thomas Waldmann
f1af650d9e PR #235 - Merge branch 'fix_xattr' into merge 2015-03-18 17:48:48 +01:00
Thomas Waldmann
1fe844a896 dummy xattr implementation for unsupported platforms
raising "Unsupported platform" (and making attic completely unusable) just because there is no xattr support isn't necessary.
2015-03-18 17:45:05 +01:00
Thomas Waldmann
f71c18bfea Merge branch 'merge' into merge-all 2015-03-18 15:58:20 +01:00
Thomas Waldmann
c4f3068c55 PR #241 - Merge branch 'patch-1' of https://github.com/adept/attic into merge 2015-03-18 15:30:53 +01:00
Dmitry Astapov
6be2734b7e Do not create items_buffer and chunker unless we are creating new archive
Listing repositories with lots of archives on low-memory systems would cause attic to run out of memory due to items_buffer and chunker being created for each visited archive.

See https://github.com/jborg/attic/issues/163
2015-03-18 12:42:28 +00:00
Thomas Waldmann
79ab84ee75 Merge branch 'merge' into merge-all 2015-03-18 03:23:44 +01:00
Thomas Waldmann
3daaceb6bf PR #238 - Merge branch 'fix_fuse_error_msg' into merge 2015-03-18 03:22:38 +01:00
Thomas Waldmann
ee1dc89b52 fix misleading hint the fuse ImportError handler gave, fixes #237 2015-03-18 02:33:34 +01:00
Thomas Waldmann
421c7f22a4 Merge branch 'merge' into merge-all
Conflicts:
	attic/key.py
2015-03-18 00:39:38 +01:00
Thomas Waldmann
b7cefacb69 Merge branch 'python_cleanup' into merge
Conflicts:
	attic/archiver.py
	attic/remote.py
2015-03-18 00:23:41 +01:00
Thomas Waldmann
e9aacad9a3 remove unused imports 2015-03-17 23:54:05 +01:00
Thomas Waldmann
4ef6125f45 cleanup pep8 issues found by pycharm 2015-03-17 23:47:21 +01:00
Thomas Waldmann
3a33d57c7d triple-double-quotes for docstrings 2015-03-17 23:23:56 +01:00
Thomas Waldmann
a21da5d2e0 no bare except 2015-03-17 23:16:12 +01:00
Thomas Waldmann
dee9869a03 use "with" with open() 2015-03-17 23:09:14 +01:00
Thomas Waldmann
fec5572836 no Class(object) in py3 2015-03-17 23:03:36 +01:00
Thomas Waldmann
30f48879da add tuning docs 2015-03-15 14:27:47 +01:00
Thomas Waldmann
1e21ad85b4 improve attic init --help 2015-03-15 05:05:19 +01:00
Thomas Waldmann
b275d18c6b msgpack: limit unpacker, use bin type for bytes
we only need a little metadata and 1 medium sized piece of data, so
avoid memory allocation issues that could be caused by tampered input data.

bin type is more appropriate for binary data than str type (which could be also encoded text).
2015-03-15 04:45:52 +01:00
Thomas Waldmann
61f84efa60 misc. small fixes, discovered by pycharm
removed unused import
fixed format string
2015-03-15 01:52:56 +01:00
Thomas Waldmann
31f8af4423 Merge branch 'merge' into merge-all 2015-03-15 00:23:31 +01:00
Thomas Waldmann
2f5e5e01ea PR #235 - Merge branch 'fix_xattr' into merge 2015-03-15 00:22:01 +01:00
Thomas Waldmann
6116fa72b2 give specific path to xattr.is_enabled(), disable symlink setattr call that always fails 2015-03-15 00:20:50 +01:00
Thomas Waldmann
99daa2794d for zero compression (and decompression), avoid going through zlib
for level 0, zlib.compress is still at some cost, it doesn't just give back the data 1:1.
in fact, it even does add some overhead, creating larger output than input.

thus, it is replaced by NullCompressor, which really does nothing.
2015-03-14 22:06:18 +01:00
Thomas Waldmann
55db07b3b4 Merge branch 'merge' into merge-all 2015-03-14 20:54:06 +01:00
Thomas Waldmann
89ffe98ba2 PR #234 - Merge branch 'fix_pipe' into merge 2015-03-14 20:53:06 +01:00
Thomas Waldmann
cbbe0fcc9b serve: use os.write(stdout_fd, ...), fixes #233
this way, serve() is more consistent with the other code, which always uses os.read/write (not sys.std*.buffer.read/write).

also: reduce code duplication a bit.
2015-03-14 19:45:01 +01:00