Commit Graph

5198 Commits

Author SHA1 Message Date
TW 9115ad58d9
Merge pull request #3970 from ThomasWaldmann/compact-commits2
compact commits / separate compaction
2018-07-14 23:47:47 +02:00
Thomas Waldmann 318cfffde1 update CHANGES about compaction changes 2018-07-14 19:15:09 +02:00
Thomas Waldmann 36cbc2d18f coala: ignore some stuff it warns about 2018-07-14 18:40:50 +02:00
Thomas Waldmann d5152d8f2b coala: exclude some more stuff, move ignores to "all" section 2018-07-14 18:28:18 +02:00
Thomas Waldmann a8d52351bb update man pages / usage docs 2018-07-14 14:56:29 +02:00
Thomas Waldmann e6fcf4ea42 update docs about separated compaction 2018-07-14 14:53:23 +02:00
Thomas Waldmann a221ca16ad remote: introduce a dontcare flag (all values acceptable)
in some cases the value of a new parameter does not really matter,
as long as it works / there is no malfunction.

without this change, a new borg client could not commit to an old
borg server (and would fail late when trying to commit):

- when using compact=False as it does at most places

- when using cleanup_commits=True as a user might trigger by running
  borg compact --cleanup-commits

we never want a borg commit "fail late", leaving the repo in a state
with uncommitted data, thus the server shall just commit, no matter
how it handles compaction or whether it can do the cleanup.
2018-07-14 14:29:28 +02:00
Thomas Waldmann 3715d2da3e slightly refactor write_commit using new "want_new" flag 2018-07-14 14:29:28 +02:00
Thomas Waldmann 1f387d911a start new segment file for put/del to MANIFEST_ID
specialcase deleting / writing the manifest to be in a separate, new
segment file, so that when we supersede and compact it later, less
segment data has to be shuffled around - compaction can then just
delete this segment file and that's all.
2018-07-14 14:29:28 +02:00
Thomas Waldmann 755eaeec0a borg compact --cleanup-commits to get rid of leftover 17byte segments
see #2850.
2018-07-14 14:29:28 +02:00
Thomas Waldmann efe60bd640 test fixes 2018-07-14 14:29:28 +02:00
Marian Beermann aeef082483 repository: track commits in hints 2018-07-14 14:29:28 +02:00
Thomas Waldmann de4afa097c separate borg compact command, fixes #2195 2018-07-14 14:29:28 +02:00
TW d2a816d0d4
Merge pull request #3978 from ThomasWaldmann/fix-nanorst
nanorst: add missing blank to exception message
2018-07-13 11:38:52 +02:00
Thomas Waldmann 0d06407087 nanorst: add missing blank to exception message 2018-07-13 10:41:32 +02:00
TW 77f8a82d3b
Merge pull request #3976 from intelfx/xattr-fix-include-path
xattr: use sys/xattr.h as per setxattr(2)
2018-07-10 14:28:24 +02:00
Ivan Shapovalov 074a984111 xattr: use sys/xattr.h as per setxattr(2), attr/xattr.h is absent on my system 2018-07-10 13:08:59 +03:00
TW 1f75b6b9b5
Merge pull request #3971 from ThomasWaldmann/more-xattr-stuff
xattrs: use follow_symlinks=False as default, more tests
2018-07-08 15:41:55 +02:00
Thomas Waldmann 44b4f9645d xattrs: use follow_symlinks=False as default, more tests
it's like we do it everywhere else because this is what we usually need.
2018-07-08 15:08:01 +02:00
TW 2855a3798b
Merge pull request #3972 from ThomasWaldmann/fix-ext-version-check
fix logic bug in platform module API version check
2018-07-08 15:07:01 +02:00
Thomas Waldmann 2bb23f00af fix logic bug in platform module API version check 2018-07-08 14:48:16 +02:00
TW ff3d75fed2
Merge pull request #3969 from ThomasWaldmann/update-changes-master
Update CHANGES (master)
2018-07-08 00:25:09 +02:00
Thomas Waldmann 3fd6bd8ca7 update CHANGES: added 1.1 history (master) 2018-07-08 00:18:09 +02:00
Thomas Waldmann a89aadc9f2 update CHANGES (master) 2018-07-08 00:13:13 +02:00
TW 20abc9d687
Merge pull request #3963 from ThomasWaldmann/chunker-fd-only
Chunker: give os-level fd only
2018-07-07 18:38:30 +02:00
Thomas Waldmann 13e6970437 create: do not give chunker a py file object, it is not needed
the os level file handle is enough, the chunker will prefer it if
valid and won't use the file obj, so we can give None there.

this saves these unneeded syscalls:

fstat(5, {st_mode=S_IFREG|0664, st_size=227063, ...}) = 0
ioctl(5, TCGETS, 0x7ffd635635f0)  = -1 ENOTTY (Inappropriate ioctl for device)
lseek(5, 0, SEEK_CUR)             = 0
2018-07-07 18:06:57 +02:00
TW 8e91694c54
Merge pull request #3961 from ThomasWaldmann/flags-fd-based
make bsdflags linux code fd-based
2018-07-07 18:05:58 +02:00
Thomas Waldmann 018b62c845 bsdflags: use fd instead of path
this optimization is only needed for linux, the bsd-like platforms
do not need an open file to run a ioctl against, but have bsdflags
in the stat result already.

on linux, this optimization saves 1 file open/close per input file.
2018-07-07 17:30:17 +02:00
TW 2dd22df751
Merge pull request #3960 from ThomasWaldmann/acl-fd-based
ACLs fd-based
2018-07-07 17:28:11 +02:00
Thomas Waldmann 7e47e68e29 acls: use fd instead of path 2018-07-07 17:02:37 +02:00
Thomas Waldmann 5bf5f12be1 acls: only calls os.fsencode for str paths 2018-07-07 16:54:19 +02:00
TW 34cd1b22ec
Merge pull request #3918 from ThomasWaldmann/platform-xattr
xattr: move to platform pkg, use cython, use bytes, use fd
2018-07-07 16:50:08 +02:00
Thomas Waldmann 34a51eb958 xattr: fix dummy base getxattr, must raise for any given name 2018-07-07 15:47:56 +02:00
Thomas Waldmann 113b0eabec xattr: use fd for get_all
when processing regular files, use a fd to query xattrs.

when the file was modified and we chunked it, we have it open anyways.

if not, we open the file once and then query xattrs, in the hope that
this is more efficient than the path based calls.

guess it is less prone to race conditions in any case.
2018-07-07 15:47:56 +02:00
Thomas Waldmann 389e806b68 xattr: refactor/fix exception handling in get_all
if there is EPERM just for a single attr, it now still collects the
other attrs (previous behaviour: just return empty xattrs dict).
2018-07-07 15:47:56 +02:00
Thomas Waldmann 394d59e6d8 xattr: implement set_all to complement get_all
also: follow_symlinks param defaults to False (we do never use True)

fix tests, xattrs are set via FD now.
2018-07-07 15:47:56 +02:00
Thomas Waldmann c29c3063b0 xattr: use bytes typed path for listxattr, getxattr, setxattr 2018-07-07 15:47:56 +02:00
Thomas Waldmann 9deb90db71 xattr: use bytes typed names for listxattr, getxattr, setxattr 2018-07-07 15:47:56 +02:00
Thomas Waldmann b5a9ac5682 xattr: use bytes typed values for listattr, getxattr, setxattr
- getxattr should only return bytes, not None
- setxattr should not get a None value, just bytes
- remove unneeded tmp vars
2018-07-07 15:47:56 +02:00
Thomas Waldmann 99149684bf xattr: move to platform package, use cython, fixes #2495
this code used to live in borg.xattr and used ctypes
(and was the only ctypes-using code in borg).

the low level code now was converted to cython and
the platform code moved to platform package.

got rid of the code that tried to find the libc.
2018-07-07 15:47:56 +02:00
TW 2178e73cfa
Merge pull request #3965 from russelldavis/patch-1
Update installation instructions for macOS
2018-07-07 15:04:16 +02:00
Russell Davis 041f1baf4c
Update installation instructions for macOS
- Updated `OS X` to the new `macOS` name
- Fuse 3.x is no longer just a prerelease
- Added instructions to install fuse via homebrew
2018-07-06 18:46:18 -07:00
TW 02c48836fa
Merge pull request #3964 from ThomasWaldmann/vagrant-arch-fix
vagrant: fix arch package installation
2018-07-07 00:57:35 +02:00
Thomas Waldmann 0ed15081ad vagrant: fix arch package installation 2018-07-07 00:55:28 +02:00
TW 89d87ff433
Merge pull request #3959 from ThomasWaldmann/fix-acl-proto-master
acl platform code: fix acl set return type (master)
2018-07-05 23:54:31 +02:00
Thomas Waldmann b76661ab67 acl platform code: fix acl set return type (master) 2018-07-05 22:56:54 +02:00
TW c7412123b9
Merge pull request #3953 from ThomasWaldmann/vagrant-darwin-fbsd
vagrant: fix FreeBSD 12, add Darwin
2018-07-04 02:53:56 +02:00
Thomas Waldmann 3a121ea76b vagrant: fix FreeBSD 12, add Darwin 2018-07-04 02:51:04 +02:00
TW 23bd234549
Merge pull request #3949 from ThomasWaldmann/use-pyi-331
vagrant: use pyinstaller v3.3.1
2018-07-03 21:10:12 +02:00
Thomas Waldmann ebbeeec241 vagrant: use pyinstaller v3.3.1
the fix that i made in v3.3-fixed is also in official release v3.3.1.
2018-07-03 21:09:08 +02:00