Thomas Waldmann
0e577452c2
tests: fix prune_split tests by giving the timestamps in local timezone
...
Guess this fixes issues like #5535 .
I tested this with TZ=:
- UTC
- UTC+12
- UTC-12
- UTC+14
- UTC-14
2023-01-19 00:52:27 +01:00
Thomas Waldmann
8a2fd39212
Revert "prune: compute pruning in utc timezone"
...
This reverts commit 860a48049b
.
2023-01-18 22:41:40 +01:00
TW
4664176e87
Merge pull request #7282 from ThomasWaldmann/prune-in-utc
...
prune: compute pruning in utc timezone
2023-01-18 18:58:09 +01:00
Thomas Waldmann
860a48049b
prune: compute pruning in utc timezone
...
guess this fixes issues like #5535 .
i tested this with TZ=:
- UTC
- UTC+1 (my current local timezone)
- UTC+12
- UTC-12
- UTC+14
2023-01-18 18:27:15 +01:00
TW
c8fe49dcb7
Merge pull request #7276 from ThomasWaldmann/symlink-target
...
Item: symlinks: rename .source to .target, fixes #7245
2023-01-18 17:05:25 +01:00
TW
0fa2506b92
Merge pull request #7280 from ThomasWaldmann/shellpattern-license-master
...
shellpattern: add license, use copyright/license markup
2023-01-18 16:46:22 +01:00
Thomas Waldmann
88b9868159
shellpattern: add license, use copyright/license markup
2023-01-18 15:45:13 +01:00
Helmut Grohne
f2f761212d
update bash completion script commands and options ( #7273 )
...
update bash completion script commands and options
2023-01-18 14:10:29 +01:00
Thomas Waldmann
1672aee031
Item: symlinks: rename .source to .target, fixes #7245
...
Also, in JSON:
- rename "linktarget" to "target" for symlinks
- remove "source" for symlinks
2023-01-16 20:28:25 +01:00
TW
1df7c244c4
Merge pull request #7270 from ThomasWaldmann/user-group-uid-gid
...
make user/group/uid/gid optional
2023-01-16 18:53:15 +01:00
TW
9b067fd1f7
Merge pull request #7275 from ThomasWaldmann/docs-key-change-passphrase
...
key change-passphrase: fix --encryption value in examples
2023-01-16 18:18:06 +01:00
Thomas Waldmann
18898d68f0
export-tar: for items w/o uid/gid, default to 0/0, see #7249
2023-01-16 18:17:17 +01:00
Thomas Waldmann
ff545033e3
tests: do not look up uid 0 / gid 0, but current process uid/gid
...
some systems do not have uid/gid 0 (windows).
2023-01-16 18:17:15 +01:00
Thomas Waldmann
4dcc48f5c4
extract: chown only if we have u/g info in archived item, see #7249
...
also: move get_item_uid_gid() to "not is_win32" block for now.
2023-01-16 18:17:13 +01:00
Thomas Waldmann
1f9c46f2b5
create: do not store user/group for stdin data by default, see #7249
...
if you want user/group stored, give --stdin-user=USER / --stdin-group=GROUP.
2023-01-16 18:17:12 +01:00
Thomas Waldmann
b338eb0ce8
process_pipe: allow creating item w/o user/group/uid/gid, see #7249
2023-01-16 18:17:09 +01:00
Thomas Waldmann
262812e76f
get_item_data: do not require item.uid/gid, see #7249
...
if uid is not present, use None.
if gid is not present, use None.
2023-01-16 18:17:03 +01:00
Thomas Waldmann
4f9cda1aab
get_item_uid_gid: do not require item.uid/gid, see #7249
...
if uid is not present, fall back to uid_default.
if gid is not present, fall back to gid_default.
2023-01-16 18:12:34 +01:00
TW
d49665526c
Merge pull request #7232 from ThomasWaldmann/json_b64
...
implement and use (text|binary)_to_json
2023-01-16 18:10:52 +01:00
Thomas Waldmann
54892f711d
key change-passphrase: fix --encryption value in examples
...
"repokey" (as in borg < 2.0, referring to the AES-CTR mode)
does not exist any more and was superseded by other repokey-*
modes.
2023-01-16 17:58:50 +01:00
Thomas Waldmann
491f898612
borg2 archive names and comments are always pure unicode
2023-01-16 17:45:48 +01:00
Thomas Waldmann
8765e62bcd
document how borg deals with non-unicode bytes in JSON output
2023-01-16 17:45:46 +01:00
Thomas Waldmann
e63cfcd708
json output: use text_to_json, fixes #6151
...
item: path, source, user, group
for non-unicode stuff borg 1.2 had "bpath".
now we have:
path - unicode approximation (invalid stuff replaced by ?)
path_b64 - base64(path_bytes) # only if needed
source has the same issue as path and is now covered also.
user and group are usually unicode or even pure ASCII,
but we rather are cautious and cover them also.
2023-01-16 17:45:34 +01:00
Thomas Waldmann
32d430a1b0
implement text_to_json / binary_to_json, see #6151
...
binary bytes:
- json_key = <key>_b64
- json_value == base64(value)
text (potentially with surrogate escapes):
- json_key1 = <key>
- json_value1 = value_text (s-e replaced by ?)
- json_key2 = <key>_b64
- json_value2 = base64(value_binary)
json_key2/_value2 is only present if value_text required
replacement of surrogate escapes (and thus does not represent
the original value, but just an approximation).
value_binary then gives the original bytes value (e.g. a
non-utf8 bytes sequence).
2023-01-16 17:45:27 +01:00
TW
3992c1c333
Merge pull request #7267 from ThomasWaldmann/recreate-with-target-master
...
recreate: when --target is given, do not detect "nothing to do"
2023-01-16 17:23:38 +01:00
Thomas Waldmann
aa78314ffe
recreate: when --target is given, do not detect "nothing to do"
...
use case:
borg recreate -a src --target dst can be used to make a copy
of an archive inside the same repository, see #7254 .
2023-01-14 19:05:50 +01:00
TW
ca1f1281d5
Merge pull request #7262 from ThomasWaldmann/skip-safe-unlink-test-windows
...
support win32 for test_safe_unlink* tests
2023-01-13 22:41:54 +01:00
Thomas Waldmann
829d88e614
win32 ci: show individual tests, give skip reason if tests were skipped
2023-01-13 21:01:05 +01:00
Thomas Waldmann
38152c8e5d
safe_unlink tests: use os.link to support win32 also
...
also:
- add note about mklinkto
- skip tests based on "not are_hardlinks_supported()" if needed
2023-01-13 20:59:30 +01:00
TW
7fb37271f2
Merge pull request #7258 from RayyanAnsari/windows-ci-tests
...
Add tests to Windows CI
2023-01-13 18:43:21 +01:00
TW
0d78565382
Merge pull request #7263 from helmutg/cleanup
...
delete left over documentation for borg key change-algorithm
2023-01-13 18:09:41 +01:00
Rayyan Ansari
b19d2c1449
Add tests to Windows CI
2023-01-13 17:02:41 +00:00
Helmut Grohne
e210c6c053
delete left over documentation for borg key change-algorithm
2023-01-13 13:20:49 +01:00
TW
fb9717567e
Merge pull request #7251 from puetzk/test_size_on_disk_accurate-flush
...
Fix test_size_on_disk_accurate for large st_blksize, fixes #7250
2023-01-13 10:49:41 +01:00
TW
c8809ab09d
Merge pull request #7260 from jsoref/spelling
...
Spelling
2023-01-12 18:47:18 +01:00
Josh Soref
a205c4273b
spelling: zstandard
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-01-12 11:24:05 -05:00
Josh Soref
0958d94791
spelling: vagrant
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-01-12 11:24:05 -05:00
Josh Soref
a3af1ffc32
spelling: trade-offs
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-01-12 11:24:04 -05:00
Josh Soref
f41cf1c25f
spelling: requirements
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-01-12 09:36:03 -05:00
Josh Soref
c9848e9814
spelling: nonexistent
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-01-12 09:36:03 -05:00
Josh Soref
a26c1d99d9
spelling: new
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-01-12 09:36:03 -05:00
Josh Soref
6e7f593b98
spelling: healthy
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-01-12 09:36:03 -05:00
Josh Soref
6266ba8891
spelling: github
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-01-12 00:24:42 -05:00
Kevin Puetz
079d9256ee
Fix test_size_on_disk_accurate for large st_blksize, fixes #7250
...
python's io.BufferedWriter sizes its buffer based on st_blksize.
If the write fits in this buffer, then it's possible the data from
idx.write() has not been flushed through to ,the underlying filesystem,
and getsize(fileno()) sees a too-short (or even empty) file.
Also, getsize is only documented as accepting path-like objects;
passing a fileno seems to work only because the implementation
blindly forwards everything through to os.stat without checking.
Passing unopened_tempfile avoids all three problems
- on windows, it doesn't rely on re-opening NamedTemporaryFile
(the issue which led to cc0ad321dc
)
- we're following the documented API of getsize(path-like)
- the file is closed (thus flushed) inside idx.write, before getsize()
2023-01-11 19:20:16 -06:00
TW
e74b42920c
Merge pull request #7257 from ThomasWaldmann/docs-libb2-master
...
remove BORG_LIBB2_PREFIX (not used any more)
2023-01-10 14:24:51 +01:00
Thomas Waldmann
43cbe6d8b6
remove BORG_LIBB2_PREFIX (not used any more)
...
the code now uses hashlib.blake2b from python stdlib.
2023-01-10 14:10:34 +01:00
TW
daf890ebfa
Merge pull request #7243 from ThomasWaldmann/macos-resourcefork-mtime-master
...
extract: fix mtime when ResourceFork xattr is set (macOS specific)
2023-01-06 22:25:42 +01:00
Thomas Waldmann
5d8801e72c
macOS: fix mtime timestamp extraction if ResourceFork xattr is present, fixes #7234
...
setting the timestamps after xattrs helps for correct mtime,
but atime is still broken in this case.
2023-01-06 21:58:35 +01:00
Thomas Waldmann
6a27c6b763
macOS: test correct timestamp extraction if ResourceFork xattr is present, see #7234
2023-01-06 21:58:33 +01:00
TW
9d4646ce72
Merge pull request #7241 from ThomasWaldmann/upgrade-cython-master
...
upgrade Cython to 0.29.33
2023-01-06 21:55:49 +01:00