Commit Graph

5489 Commits

Author SHA1 Message Date
Thomas Waldmann 7b4b42d832 pypi metadata: enter alpha dev status 2019-02-26 22:39:27 +01:00
TW de151cd338
Merge pull request #4407 from bket/libressl
1.2.0a: fix LibreSSL support, see #4403
2019-02-26 22:31:49 +01:00
TW aed5213c78
Merge pull request #4404 from bket/wip
1.2.0a2: Fix some issues found by the testsuite
2019-02-26 22:30:53 +01:00
Thomas Waldmann dbe92b7ace xattr.is_enabled: first listxattr before trying getxattr, see #4403
this is needed for the xattr dummy implementation (used e.g.
on openbsd):
- it returns [] for listxattr
- it fails with ENOATTR when trying getxattr for any name

also: reduce code duplication
2019-02-26 21:41:50 +01:00
Björn Ketelaars 9278920bd5 1.2.0a: fix LibreSSL support, see #4403 2019-02-26 21:24:28 +01:00
Björn Ketelaars c5e3f3b4d4 acl_get() and acl_set() should accept a fd. Related to #4403
Fixes:

self = <borg.archive.MetadataCollector object at 0x14ffb70b28d0>
st = os.stat_result(st_mode=16895, st_ino=246007, st_dev=65280, st_nlink=3, st_uid=100
0, st_gid=0, st_size=512, st_atime=1551123978, st_mtime=1551123979, st_ctime=155112397
9)
path = 'input', fd = 16

    def stat_ext_attrs(self, st, path, fd=None):
        attrs = {}
        bsdflags = 0
        with backup_io('extended stat'):
            if not self.nobsdflags:
                bsdflags = get_flags(path, st, fd=fd)
            xattrs = xattr.get_all(fd or path, follow_symlinks=False)
>           acl_get(path, attrs, st, self.numeric_owner, fd=fd)
E           TypeError: acl_get() got an unexpected keyword argument 'fd'

src/borg/archive.py:1023: TypeError
2019-02-26 17:06:58 +01:00
TW 81f9a8ccde
Merge pull request #4406 from ThomasWaldmann/fix-backup-root
fix openat/statat issues for root directory, fixes #4405
2019-02-26 11:58:31 +01:00
Thomas Waldmann db2b385a8b fix openat/statat issues for root directory, fixes #4405
basename('/') == '' and we can't use that for openat/statat.
also, there is no parent FD for the root directory...
2019-02-26 11:18:37 +01:00
Joey 29e7701c3b timestamp for borg delete --info added, fixes #4359 2019-02-25 12:20:02 +01:00
TW 009bac2e9f
Merge pull request #4398 from ThomasWaldmann/rel120a2
Release 1.2.0a2
2019-02-24 22:01:59 +01:00
Thomas Waldmann 032a4effd3 build_man 2019-02-24 20:40:07 +01:00
Thomas Waldmann bece7e8090 build_usage 2019-02-24 20:39:42 +01:00
Thomas Waldmann 34fa89b26c add release date 2019-02-24 20:34:44 +01:00
TW 2b16fc9039
Merge pull request #4396 from ThomasWaldmann/api-version-12
bump API_VERSIONs to 1.2_xx
2019-02-24 20:31:18 +01:00
TW 1d61940cfa
Merge pull request #4397 from ThomasWaldmann/update-changes-master
update changes (master)
2019-02-24 19:46:53 +01:00
Thomas Waldmann a65cefb7bb bump API_VERSIONs to 1.2_xx 2019-02-24 19:45:41 +01:00
Thomas Waldmann 2e5e3a87e1 update CHANGES (master) 2019-02-24 19:23:47 +01:00
Thomas Waldmann 9637c3fbb3 update 1.1.6..1.1.9 sections of CHANGES (from 1.1-maint) 2019-02-24 15:53:02 +01:00
Thomas Waldmann 1344779113 update severe issues section of CHANGES (from 1.1-maint) 2019-02-24 15:50:37 +01:00
TW 886cbdca8e
Merge pull request #4393 from donnyward/master
Update bundled zstd code to 1.3.8, fixes #4210
2019-02-24 15:15:57 +01:00
TW ab354169c0
Merge pull request #4395 from ThomasWaldmann/freebsd-vm
for now, use old freebsd64 vagrant box for testing
2019-02-24 14:52:05 +01:00
Thomas Waldmann a796ecbe9d for now, use old freebsd64 vagrant box for testing
the freebsd12-amd64 one is broken due to some pkg vs. openssl111 issue.
2019-02-24 14:51:22 +01:00
TW dd2a3d42fb
Merge pull request #4391 from ThomasWaldmann/archive-stat-meta
include size/csize/nfiles[_parts] stats into archive, fixes #3241
2019-02-24 14:45:27 +01:00
Thomas Waldmann c832822721 remove x bits from files, no content changes 2019-02-24 14:15:49 +01:00
Donny Ward 1c3ace4724 Update bundled zstd code to 1.3.8, fixes #4210
Didn't add dll folder since it wasn't copied when updating zstd to
1.3.4.

Didn't add extra files from the lib directory (Makefile, README.md, etc)
that were also left out when updating zstd to 1.3.4.

Add new zstd files to setup_zstd.py (DDict was refactored in
facebook/zstd#1388)
2019-02-23 12:46:11 -08:00
Thomas Waldmann 6809f6f7fa calc_stats: use archive stats metadata, if available
by default, we still have to compute unique_csize the slow way,
but the code offers want_unique=False param to not compute it.
2019-02-23 15:05:07 +01:00
Thomas Waldmann e569595974 include size/csize/nfiles[_parts] stats into archive, fixes #3241 2019-02-23 15:05:07 +01:00
TW 25ec0511c7
Merge pull request #4390 from ThomasWaldmann/fix-valid-archive-keys
Fix valid archive keys, add comments.
2019-02-23 11:37:26 +01:00
Thomas Waldmann 58f177aa82 add comment about unused recreate_* members in ArchiveItem 2019-02-23 10:49:24 +01:00
Thomas Waldmann fc30a0765b remove ARCHIVE_KEYS duplication
also: get key set in sync, obviously we have "recreate_partial_chunks"
in ArchiveItem still.
2019-02-23 10:09:40 +01:00
Milkey Mouse cb2b86274e
Elaborate on append-only mode docs 2019-02-22 19:05:29 -08:00
TW 1a2691c6e4
Merge pull request #4388 from ThomasWaldmann/utf8-default
utf-8 is the default
2019-02-22 17:55:16 +01:00
TW 86eca03d81
Merge pull request #4378 from milkey-mouse/fix-4348
Emit user-friendly error if repo key is exported to a directory
2019-02-22 17:50:23 +01:00
TW 1620ae2141
Merge pull request #4387 from ThomasWaldmann/compaction-criteria
improve compaction criteria
2019-02-22 17:42:07 +01:00
Thomas Waldmann 2713500983 remove -*- coding: ... lines, utf-8 is default for py3 2019-02-22 17:12:05 +01:00
Thomas Waldmann ec9334422e str.encode() / bytes.decode(): utf-8 is the default, fixes #4306
note: i kept explicit utf-8 at some critical places, like e.g.
      key passphrase handling.
2019-02-22 17:05:57 +01:00
Thomas Waldmann 25264dce1f compact: require >10% freeable space in a segment, fixes #2985
before this, it over-eagerly compacted "small" segments ("small"
being < 100MB by default) if there were only a few bytes to be freed.

also:
- improve debug logging
- as compaction is a separate borg command now, use the module logger
2019-02-22 16:18:41 +01:00
TW d644323333
Merge pull request #4043 from ThomasWaldmann/use-more-fds
use more FDs, avoid race conditions on active fs
2019-02-22 12:54:16 +01:00
TW 5ba14e8d95
Merge pull request #4383 from milkey-mouse/fix-4133
Only modify window.location when redirecting
2019-02-21 11:25:43 +01:00
Milkey Mouse 7ea2bd1389
Only modify window.location when redirecting (fixes #4133)
window.location.pathname = window.location.pathname can trigger a redirect,
which created a refresh loop in usage.html.
2019-02-20 11:12:45 -08:00
Milkey Mouse d26264bb70
Add test for error upon exporting a key to a directory 2019-02-20 01:29:47 -08:00
Thomas Waldmann 23eeded7c5 fix --read-special behaviour: follow symlinks pointing to special files
also: added a test for this.
2019-02-20 10:13:09 +01:00
Thomas Waldmann ec17f0a607 check for stat race conditions, see #908
we must avoid a handler processing a fs item of wrong file type,
so check if it has changed.
2019-02-20 09:16:57 +01:00
Milkey Mouse 72ebd13e6f
Emit user-friendly error if repo key is exported to a directory (fixes #4348) 2019-02-19 23:57:33 -08:00
TW 091bd2bd79
Merge pull request #4377 from milkey-mouse/copyright-2019
Update copyright year
2019-02-20 06:10:11 +01:00
Milkey Mouse 453e4a4b92
Update copyright year 2019-02-19 20:20:13 -08:00
Thomas Waldmann b4ca919d02 add O_NOFOLLOW to base flags, see #908
scenario:

- x is a regular file
- borg does stat on x: is a regular file
- so borg dispatches to process_file
- attack: x gets replaced by a symlink (mv symlink x)
- in process_file, borg opens x and must not follow the symlink nor
  continue processing as a normal file, but rather error in open()
  due to NOFOLLOW.
2019-02-17 05:17:52 +01:00
Thomas Waldmann 39922e88e5 micro-opt: get xattrs directly before acls
on linux, acls are based on xattrs, so do these closeby:

1. listxattr -> keys (without acl related keys)
2. for all keys: getxattr
3. acl-related getxattr by acl library
2019-02-17 02:46:03 +01:00
Thomas Waldmann 85b711fc88 opening device files is troublesome, don't do it
for fd-based operations, we would have to open the file, but for
char / block devices this has unwanted effects, even if we do not
read from the device.

thus, we use path (or dir_fd + name) based ops here.
2019-02-14 09:20:04 +01:00
Thomas Waldmann b960d3cd23 linux: acl_(get|set) - adapt to more FD usage / default acl for dirs
acl_get:

remove assumption that having an FD means it is a regular file, we try
to use FDs a much as possible.

only get the default acl for directories - other fs objects are not
expected to have a default acl.

the path needs to be encoded also for the case when we have an fd,
it is needed to get the default acl for directories.

also: micro-opt: encode path later, not needed for ISLNK check.

acl_set:

remove the "if False" branch, it is the same here: the fd-based api
only supports access ACLs, but not default ACLs, so we always need
to use the path-based api here.
2019-02-14 09:20:04 +01:00