1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-25 17:27:31 +00:00
Commit graph

6637 commits

Author SHA1 Message Date
Thomas Waldmann
dea54df2e4 vagrant: use a openbsd-current ("7.1") box 2022-03-25 01:31:11 +01:00
Thomas Waldmann
b43ce32188 vagrant: remove focal64 VM (no py39) 2022-03-25 01:30:03 +01:00
Thomas Waldmann
93ca8f79be vagrant: py39 / libs related fixes 2022-03-25 01:29:48 +01:00
Manu
25ecde56b5
Simplify libs setup (#6482) 2022-03-24 10:28:02 +04:00
Manu
710d76e5c2 Move system lib comment up, formatting, expand lib not found error. 2022-03-24 08:41:34 +04:00
Manu
f36a0fc6b6 Remove Python 3.8 from tox 2022-03-23 17:47:34 +04:00
Manu
c86a5491d9 Rever xxhash version 2022-03-23 17:40:33 +04:00
Manu
e686ec0d8c Fix openssl ext 2022-03-23 17:28:27 +04:00
Manu
249de7eb45 Add feedback, part 1 2022-03-23 17:19:43 +04:00
Manu
ec11905f11 Add src path to setup.cfg 2022-03-23 16:19:25 +04:00
Manu
dd17c0e869 Fix xxhash version 2022-03-23 15:53:26 +04:00
Manu
3732c45f42 Initial commit 2022-03-23 15:42:34 +04:00
TW
89f192edb2
Merge pull request #6455 from Whissi/issue_6453
delete: add repository id and location to prompt
2022-03-23 05:16:47 +01:00
Andrey Bienkowski
78f041440c
Argon2 the first part: Implement key derivation (was: part 0) (#6468)
add a argon2 based kdf, using argon2-cffi
2022-03-21 21:51:54 +01:00
Thomas Deutschmann
19c7b85eca
delete: add repository id and location to prompt
Closes: https://github.com/borgbackup/borg/issues/6453
2022-03-21 21:11:46 +01:00
TW
dfd7ea8171
Merge pull request #6464 from ThomasWaldmann/exclude-checksums-c
fixup: fix some algorithms/* ignores
2022-03-18 01:18:39 +01:00
Thomas Waldmann
1f90d4a77a fixup: fix some algorithms/* ignores 2022-03-17 23:34:26 +01:00
TW
cb0e4fc2b2
Merge pull request #6460 from ThomasWaldmann/move-checksums
remove algorithms package, move checksums module to borg package
2022-03-17 12:55:43 +01:00
Thomas Waldmann
cc3b5c062c remove algorithms package, move checksums module to borg package 2022-03-17 00:24:49 +01:00
TW
c641e31e82
Merge pull request #6454 from bket/fix-benchmark-cpu
`borg benchmark cpu` fails with libressl
2022-03-14 20:13:02 +01:00
Björn Ketelaars
3d86df6649 borg benchmark cpu fails with libressl
`borg benchmark cpu` fails on OpenBSD with the error below, which is
caused by LibreSSL currently not supporting AES256_OCB and
CHACHA20_POLY1305.

Work around this by checking if borg is used with LibreSSL. Tested on
OpenBSD.

```
Chunkers =======================================================
buzhash,19,23,21,4095    1GB        14.294s
fixed,1048576            1GB        0.244s
Non-cryptographic checksums / hashes ===========================
crc32 (libdeflate, used) 1GB        0.724s
crc32 (zlib)             1GB        1.953s
xxh64                    1GB        0.361s
Cryptographic hashes / MACs ====================================
hmac-sha256              1GB        7.039s
blake2b-256              1GB        9.845s
Encryption =====================================================
aes-256-ctr-hmac-sha256  1GB        18.312s
aes-256-ctr-blake2b      1GB        21.213s
Local Exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/borg/archiver.py", line 5241, in main
    exit_code = archiver.run(args)
  File "/usr/local/lib/python3.9/site-packages/borg/archiver.py", line 5172, in run
    return set_ec(func(args))
  File "/usr/local/lib/python3.9/site-packages/borg/archiver.py", line 607, in do_benchmark_cpu
    print(f"{spec:<24} {size:<10} {timeit(func, number=100):.3f}s")
  File "/usr/local/lib/python3.9/timeit.py", line 233, in timeit
    return Timer(stmt, setup, timer, globals).timeit(number)
  File "/usr/local/lib/python3.9/timeit.py", line 177, in timeit
    timing = self.inner(it, self.timer)
  File "<timeit-src>", line 6, in inner
  File "/usr/local/lib/python3.9/site-packages/borg/archiver.py", line 602, in <lambda>
    ("aes-256-ocb", lambda: AES256_OCB(
  File "src/borg/crypto/low_level.pyx", line 636, in borg.crypto.low_level.AES256_OCB.__init__
  File "src/borg/crypto/low_level.pyx", line 633, in borg.crypto.low_level.AES256_OCB.requirements_check
ValueError: AES OCB is not implemented by LibreSSL (yet?).

Platform: OpenBSD gateway.lan 7.1 GENERIC.MP#418 amd64
Borg: 1.2.1.dev98+gebaf0c32  Python: CPython 3.9.10 msgpack: 1.0.3 fuse: None [pyfuse3,llfuse]
PID: 38614  CWD: /storage/8899fc1454db04de.a/home/code/git/ports/sysutils/borg
sys.argv: ['/usr/local/bin/borg', 'benchmark', 'cpu']
SSH_ORIGINAL_COMMAND: None
```
2022-03-14 18:56:01 +01:00
TW
ebaf0c32d3
Merge pull request #6388 from ThomasWaldmann/benchmark-cpu-master
borg benchmark cpu: display benchmarks of cpu bound stuff
2022-03-13 23:25:39 +01:00
Thomas Waldmann
79eee27936 borg benchmark cpu: display benchmarks of cpu bound stuff 2022-03-13 22:49:52 +01:00
TW
a6634c0779
Merge pull request #6387 from ThomasWaldmann/crc32
use crc32 from libdeflate, remove bundled crc32 code
2022-03-13 22:00:28 +01:00
Thomas Waldmann
98a675f62a use crc32 from libdeflate, remove bundled crc32 code
we use zlib.crc32 (macOS) or libdeflate_crc32 (Linux and all others) now.
2022-03-13 21:39:34 +01:00
TW
d9d1e44b67
Merge pull request #6415 from ThomasWaldmann/borg-key
borg key change-location, cleanups
2022-03-12 18:36:48 +01:00
Thomas Waldmann
0b3b78e139 dedup code: assert_type 2022-03-11 23:05:32 +01:00
Thomas Waldmann
b3e7e90c29 improve storage type handling, dedup code 2022-03-11 23:05:32 +01:00
Thomas Waldmann
a63614e35b move key type/storage constants to borg.constants 2022-03-11 23:05:32 +01:00
Thomas Waldmann
2e536bcbe2 borg key change-location 2022-03-11 23:05:32 +01:00
Thomas Waldmann
766d976f46 move passphrase related stuff to borg.helpers.passphrase 2022-03-11 21:05:42 +01:00
Thomas Waldmann
8011fade91 move key loading/saving code to FlexiKey 2022-03-11 21:05:42 +01:00
Thomas Waldmann
ad405892ca rename KeyfileKeyBase -> FlexiKeyBase
it is used as direct base class for both:
- RepoKey
- KeyfileKey
2022-03-11 21:05:42 +01:00
Thomas Waldmann
d42e6f2c41 key: uses key_cls.TYPES_ACCEPTABLE to dispatch
for now only a quite simple change, replacing the hardcoded PassphraseKey -> RepoKey dispatching.
2022-03-11 21:05:42 +01:00
TW
6cd0f6de49
Merge pull request #6431 from mikefarmer01/patch-1
use --numeric-ids in pull doc
2022-03-10 01:29:45 +01:00
Michael Bauer
638774761c
use --numeric-ids in pull doc
replace flag --numeric-owner with --numeric-ids
2022-03-09 21:43:22 +01:00
TW
153b6c3c70
Merge pull request #6429 from ThomasWaldmann/fix-savefile-mode-master
respect umask for files / dirs (master)
2022-03-09 19:00:58 +01:00
Thomas Waldmann
dd0ae1e48d ensure_dir: respect umask for created directory modes, fixes #6400
we tried to be very private / secure here, but that created the issue
that a less secure umask (like e.g. 0o007) just did not work.

to make the umask work, we must start from 0o777 mode and let the
umask do its work, like e.g. 0o777 & ~0o007 --> 0o770.

with borg's default umask of 0o077, it usually ends up being 0o700,
so only permissions for the user (not group, not others).
2022-03-09 17:16:58 +01:00
Thomas Waldmann
0f9d88bf2e SaveFile: respect umask for final file mode, fixes #6400 2022-03-09 17:16:31 +01:00
TW
32a0bf8b4f
Merge pull request #6428 from braewoods/cflags
Allow extra compiler flags for every extension build
2022-03-09 16:14:26 +01:00
TW
c1fc1df5e8
Merge pull request #6426 from braewoods/warnings
properly suppress -Wimplicit-fallthrough
2022-03-09 16:09:12 +01:00
TW
68d5e33b06
Merge pull request #6425 from m3nu/issue/6305/performance-faq
Add discussion and note on file attrs.
2022-03-09 16:05:00 +01:00
Manu
af5103d833 Incorporate feedback by TW 2022-03-09 15:48:57 +04:00
James Buren
820de65562 Allow extra compiler flags for every extension build
This is mainly intended for explicit warnings but it can be
used for other flags as well.
2022-03-09 05:18:52 -06:00
James Buren
596e33b68d properly suppress -Wimplicit-fallthrough
It turns out that explaining the comment actually breaks its
intended usage.
2022-03-09 05:00:56 -06:00
Manu
dd1023df44 Add discussion and note on file attrs. 2022-03-09 14:06:40 +04:00
TW
9a8fb9c902
Merge pull request #6422 from ThomasWaldmann/fix-cython-warnings-master
fix "useless trailing comma" cython warnings
2022-03-08 21:58:02 +01:00
Thomas Waldmann
f0bf5915c5 fix "useless trailing comma" cython warnings 2022-03-08 21:15:24 +01:00
TW
a82673e708
Merge pull request #6416 from hexagonrecursion/unicode
Fix compilation warnings: ‘PyUnicode_AsUnicode’ is deprecated
2022-03-07 19:36:22 +01:00
Andrey Bienkowski
f75a6152ab ‘PyUnicode_AsUnicode’ is deprecated
Fix compilation warnings:
```
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/opt/hostedtoolcache/Python/3.9.10/x64/include/python3.9 -c src/borg/platform/posix.c -o build/temp.linux-x86_64-3.9/src/borg/platform/posix.o
src/borg/platform/posix.c: In function ‘__pyx_pf_4borg_8platform_5posix_2swidth’:
src/borg/platform/posix.c:1572:3: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
 1572 |   __pyx_t_2 = __Pyx_PyUnicode_AsUnicode(__pyx_v_s); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 19, __pyx_L1_error)
      |   ^~~~~~~~~
In file included from /opt/hostedtoolcache/Python/3.9.10/x64/include/python3.9/unicodeobject.h:1026,
                 from /opt/hostedtoolcache/Python/3.9.10/x64/include/python3.9/Python.h:93,
                 from src/borg/platform/posix.c:19:
/opt/hostedtoolcache/Python/3.9.10/x64/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
  580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
```

Ref: https://docs.python.org/3/c-api/unicode.html#c.PyUnicode_AsUnicode
2022-03-07 10:36:22 +03:00