1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-03-04 10:39:50 +00:00
Commit graph

6629 commits

Author SHA1 Message Date
TW
26b46dd1f4
Merge pull request #6629 from ThomasWaldmann/fix-iec-1.2
fix --iec mode output for borg delete and prune
2022-04-19 23:39:26 +02:00
TW
b2d0af9487
Merge pull request #6632 from ThomasWaldmann/fix-info-authenticated-1.2
info: fix authenticated mode repo to show "Encrypted: No", fixes #6462
2022-04-19 23:38:54 +02:00
Thomas Waldmann
c5f3214d8a info: fix authenticated mode repo to show "Encrypted: No", fixes #6462 2022-04-19 22:10:44 +02:00
TW
890b627860
Merge pull request #6627 from ThomasWaldmann/fix-files-cache-6353-1.2
fix transaction rollback: use files cache filename as found in txn.active
2022-04-19 21:57:55 +02:00
Thomas Waldmann
cc04253afd prune: fix --stats --iec output to use binary units, see #6606 2022-04-19 21:51:55 +02:00
Thomas Waldmann
0ddb1fa194 delete: fix --stats --iec output to use binary units, see #6606 2022-04-19 21:50:26 +02:00
Thomas Waldmann
8d160b6a8e fix transaction rollback: use files cache filename as found in txn.active, fixes #6353 2022-04-19 21:17:50 +02:00
TW
55f9028611
diff: support presence change for blkdev, chrdev and fifo items (1.2-maint) (#6615)
diff: support presence change for blkdev, chrdev and fifo items

also: refactor / clean up / reuse code.
2022-04-19 16:47:08 +02:00
TW
5619b5e2bd
Merge pull request #6620 from ThomasWaldmann/secure-erase-msg-1.2
remove stray punctuation from secure-erase message
2022-04-18 10:01:40 +02:00
TW
390b3127d0
Merge pull request #6618 from ThomasWaldmann/invalid-repo-msg-1.2
better error msg for defect or unsupported repo configs, fixes #6566
2022-04-18 09:52:52 +02:00
Jakub Wilk
291901717d remove stray punctuation from secure-erase message 2022-04-18 09:33:26 +02:00
Thomas Waldmann
e32760ee47 better error msg for defect or unsupported repo configs, fixes #6566 2022-04-18 09:28:30 +02:00
TW
9dec811077
Merge pull request #6613 from ThomasWaldmann/fix-pre12-meta-1.2
pre12-meta cache: do not use the cache if want_unique is True, fixes #6612
2022-04-18 09:27:02 +02:00
TW
638184ae6f
Merge pull request #6614 from ThomasWaldmann/require-setuptools-scm-via-pyproject-1.2
setuptools_scm: also require it via pyproject.toml
2022-04-18 08:03:02 +02:00
Thomas Waldmann
6ab17ee4e1 setuptools_scm: also require it via pyproject.toml
we have this in setup_requires in setup.py, but i also added it to
pyproject.toml - so we can be sure it is installed no matter what.

**configuration** of setuptools_scm is done the old way in setup.py
here in 1.2-maint, in master we have switched that over to pyproject.toml.
2022-04-18 05:00:17 +02:00
Thomas Waldmann
2a15ccf5ac pre12-meta cache: do not use the cache if want_unique is True, fixes #6612
we can't cache usize, it needs to get dynamically calculated.
2022-04-18 04:37:00 +02:00
TW
6eb0bee328
Merge pull request #6591 from ThomasWaldmann/fix-md-chunks-processing-1.2
metadata stream can produce all-zero chunks, fixes #6587
2022-04-14 03:53:52 +02:00
Thomas Waldmann
e1fbe1782f metadata stream can produce all-zero chunks, fixes #6587
all-zero chunks are propagated as:
CH_ALLOC, data=None, size=len(zeros)

other chunks are:
CH_DATA, data=data, size=len(data)

also: remove the comment with the wrong assumption
2022-04-14 00:09:53 +02:00
TW
d6f7056d9d
Merge pull request #6589 from ThomasWaldmann/docs-virt-1.2
virtualisation speed tips
2022-04-13 23:24:59 +02:00
Thomas Waldmann
08ed786f6d virtualisation speed tips 2022-04-13 23:08:39 +02:00
TW
7a3056092e
Merge pull request #6582 from ThomasWaldmann/deleted-key-1.2
load_key: no key is same as empty key, fixes #6441
2022-04-12 20:09:10 +02:00
Thomas Waldmann
7fc1d75cd3 load_key: no key is same as empty key, fixes #6441
when migrating from repokey to keyfile, we just store an empty key into the repo config,
because we do not have a "delete key" RPC api. thus, empty key means "there is no key".

here we fix load_key, so that it does not behave differently for no key and empty key:
in both cases, it just returns an empty value.

additionally, we strip the value we get from the config, so whitespace does not matter.

All callers now check for the repokey not being empty, otherwise RepoKeyNotFoundError
is raised.
2022-04-12 19:43:48 +02:00
TW
fddd0c93fa
Merge pull request #6581 from ThomasWaldmann/docs-max-duration-1.2
docs: improve borg check --max-duration description
2022-04-12 19:40:51 +02:00
TW
063adc1799
Merge pull request #6579 from ThomasWaldmann/compact-docs-1.2
docs: borg compact --cleanup-commits also runs a normal compaction
2022-04-12 18:53:53 +02:00
Thomas Waldmann
ec90a065fb docs: improve borg check --max-duration description 2022-04-12 18:45:03 +02:00
TW
8d632c0fcc
Merge pull request #6574 from ThomasWaldmann/more-robust-iterator-1.2
borg check improvements (1.2)
2022-04-12 18:13:36 +02:00
TW
19f9247f65
Merge pull request #6576 from ThomasWaldmann/repo-tags-docs-1.2
docs: fix values of TAG bytes, fixes #6515
2022-04-12 18:13:05 +02:00
Thomas Waldmann
3bacf4ac39 docs: borg compact --cleanup-commits also runs a normal compaction, fixes #6324 2022-04-12 18:11:38 +02:00
Thomas Waldmann
bb6188da49 docs: fix values of TAG bytes, fixes #6515 2022-04-12 17:58:13 +02:00
Thomas Waldmann
c8f160068e check archives: improve error handling for corrupt archive metadata block
this is similar to #4777.

borg check must not crash if an archive metadata block does not decrypt.

Instead, report the archive_id, remove the archive from the manifest and skip to the next archive.
2022-04-12 17:45:48 +02:00
Thomas Waldmann
151fe5f348 check archive: make robust_iterator more robust, fixes #4777
borg check must not crash if an archive metadata chunk does not decrypt.

Instead, report the chunk and skip to the next one.
2022-04-12 17:45:17 +02:00
TW
70e30dea4d
Merge pull request #6558 from bcat/1.2-maint
(docs) 1.2: Recommend umask for passphrase file perms
2022-04-10 14:00:37 +02:00
Jonathan Rascher
4b58dafd31 (docs) Recommend umask for passphrase file perms
The previous sample for creating a ~/.borg-passphrase file creates it first and then chmod's it to 400 permissions. That's probably fine in practice, but means there's a tiny window where the passphrase file is sitting with default permissions (likely world readable, depending on the system umask).

It seems safer to first change the umask to remove all group & world bits (0077) _before_ creating the file. To be polite and avoid messing with the user's previous umask, we do this in a subshell. (Note that umask 0077 leads to a mode of 600 rather than the previous 400, because removing the owner write bit doesn't seem to buy much since the owner can just chmod the file anyway.)
2022-04-09 23:58:45 -05:00
TW
b602352d34
Merge pull request #6545 from ThomasWaldmann/add-pyproject.toml-1.2
add pyproject.toml, fix sys.path, fixes #6466
2022-04-07 21:27:07 +02:00
TW
aa55aef2b9
Merge pull request #6543 from ThomasWaldmann/fix-progress-archivename-1.2
escape % chars in archive name, fixes #6500
2022-04-07 20:22:06 +02:00
Thomas Waldmann
82a80bf760 add pyproject.toml, fix sys.path, fixes #6466
setup.py: add parent to sys.path

When using pyproject.toml the parent of setup.py is not on sys.path by default.

See <pypa/setuptools#3134>.
2022-04-07 18:48:48 +02:00
Thomas Waldmann
a4f7eeb179 escape % chars in archive name, fixes #6500
also: fix percentage format for float value.
2022-04-07 18:03:25 +02:00
TW
a7328edd58
Merge pull request #6532 from bket/1.2_fix_#2055
1.2 - fix OpenBSD symlink mode test failure (#2055)
2022-04-04 21:41:07 +02:00
TW
f5927b6b49
Merge pull request #6528 from ThomasWaldmann/fix-ipv6-url-parsing-1.2
fix scp repo url parsing for ip v6 addrs, fixes #6526
2022-04-04 20:39:28 +02:00
Björn Ketelaars
b467d50c35 1.2 - Fix OpenBSD symlink mode test failure (#2055)
OpenBSD does not have `lchmod()` causing `os.lchmod` to be unavailable
on this platform. As a result ArchiverTestCase::test_basic_functionality
fails when run manually (#2055).

OpenBSD does have `fchmodat()`, which has a flag that makes it behave
like `lchmod()`. In Python this can be used via `os.chmod(path, mode,
follow_symlinks=False)`.

As of Python 3.3 `os.lchmod(path, mode)` is equivalent to
`os.chmod(path, mode, follow_symlinks=False)`. As such, switching to the
latter is preferred as it enables more platforms to do the right thing.
2022-04-04 19:24:28 +02:00
Thomas Waldmann
40f1f9ddee use same host regex for ssh and scp style, refactor/clean up
although bug #6526 did not show with ssh style URLs, we should
not have different regexes for the host part for ssh and scp style.

thus i extracted the host_re from both and also cleaned up a bit.
2022-04-03 21:33:26 +02:00
Thomas Waldmann
e332acb334 fix scp repo url parsing for ip v6 addrs, fixes #6526
added a negative lookahead/lookbehind to make sure an ipv6 addr
(enclosed in square brackets) does not get badly matched by the
regex part intended for hostnames and ipv4 addrs only.

the other part of that regex which is actually intended to match
ipv6 addrs only matches if they are enclosed in square brackets.

also added tests for ssh and scp style repo URLs with ipv6 addrs
in brackets.

also: made regex more readable, putting these 2 cases on separate lines.
2022-04-03 21:30:28 +02:00
TW
e5e360d5b6
Merge pull request #6507 from ThomasWaldmann/update-security-support-1.2
borg 1.2 is security supported
2022-03-30 00:11:57 +02:00
Thomas Waldmann
017f9b2102 borg 1.2 is security supported 2022-03-29 23:55:25 +02:00
TW
28c7494455
Merge pull request #6503 from aspargas2/1.2-maint
1.2-maint backport: delete: add repository id and location to prompt
2022-03-28 18:42:36 +02:00
Thomas Deutschmann
821d814af3 delete: add repository id and location to prompt
Closes: https://github.com/borgbackup/borg/issues/6453
2022-03-28 10:16:53 -04:00
TW
b5443da6cb
Merge pull request #6493 from ThomasWaldmann/use-compare_digest-1.2
use hmac.compare_digest instead of ==, fixes #6470
2022-03-26 19:48:05 +01:00
TW
4ecf0d4d78
Merge pull request #6491 from ThomasWaldmann/crypto-fixes-1.2
avoid losing the key (old crypto)
2022-03-26 19:05:54 +01:00
Thomas Waldmann
b75079c0f8 use hmac.compare_digest instead of ==, fixes #6470 2022-03-26 18:52:41 +01:00
Thomas Waldmann
3e91694a0a avoid losing the key (old crypto)
if we just have a pointer to a bytes object which might go out of scope, we can lose it.

also: cython can directly assign a bytes object into a same-size char array.
2022-03-26 18:32:44 +01:00