1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-03-04 02:28:34 +00:00
Commit graph

6706 commits

Author SHA1 Message Date
Thomas Waldmann
65ccbc2c69 fixup: remove now unused import 2022-03-06 11:31:05 +03:00
Thomas Waldmann
8dd2612fc6 remove the blake2b compat checker script
this was used to compare compatibility of our vendored
blake2b code (which we do not have any more) against the
python stdlib blake2b code (which we always use now anyway).
2022-03-06 11:31:05 +03:00
Thomas Waldmann
45ef108d46 remove our blake2b_128/256 tests
as we're just calling python stdlib there,
we can assume that they have tests for it.

 Conflicts:
	src/borg/testsuite/crypto.py
2022-03-06 11:30:58 +03:00
Thomas Waldmann
c2211a7ef9 remove our hmac_sha256 tests
as we're just calling python stdlib there,
we can assume that they have tests for it.

 Conflicts:
	src/borg/testsuite/crypto.py
2022-03-06 11:28:27 +03:00
Thomas Waldmann
72ccafb4b8 hmac.digest: some more minor optimizations
also some cosmetic changes:
- import hmac module
- use hmac.compare_digest
2022-03-06 11:26:04 +03:00
Thomas Waldmann
bcd1d49d3b hmac_sha256: replace own cython wrapper code by hmac.digest python stdlib (since py38)
i measured performance of both: pretty much the same.
2022-03-06 11:26:04 +03:00
Thomas Waldmann
4fb6df813a fix codeql complaining about missing headers needed by borg
thus:
- install requirements first
- codeql init
- build borg
- codeql analyzse
2022-03-05 23:28:37 -05:00
aspargas2
aa27294927 fix codeql complaining about missing cython
backports commits 6cbb7d6, 142bb0e, 4df8255, and 30c145e
2022-03-05 23:21:20 -05:00
TW
d0fb234f46
Merge pull request #6404 from ThomasWaldmann/import-tar-fixes-1.2
import-tar fixes
2022-03-05 14:26:59 +01:00
TW
8abb0aa7ab
Merge pull request #6375 from ThomasWaldmann/fix-6374-1.2
create: skip with warning if opening the parent dir of recursion root fails, fixes #6374
2022-03-05 14:18:40 +01:00
Thomas Waldmann
7dc800fecd kill filter process in case of borg exceptions, fixes #6401
in the finally-block, we wait for the filter process to die. but it only dies
voluntarily if all data was processed by the filter and it terminates due to EOF.

otoh, if borg has thrown an early exception, e.g. "archive already exists",
we need to kill the filter process to bring it to an early end. in that
case, we also do not need to check the filter rc, because we know we killed it.
2022-03-04 23:33:53 +01:00
Thomas Waldmann
33192e5e5d import-tar: fix mtime type bug
looks like with a .tar file created by the tar tool,
tarinfo.mtime is a float [s]. So, after converting to
nanoseconds, we need to cast to int because that's what
Item.mtime wants.

also added a safe_ns() there to clip values to the safe range.
2022-03-04 23:33:53 +01:00
TW
ea668417c9
Merge pull request #6405 from ThomasWaldmann/fix-ci
fix wrong branch name in github actions
2022-03-04 23:32:47 +01:00
Thomas Waldmann
412e39b898 fix wrong branch name in github actions 2022-03-04 22:50:23 +01:00
Thomas Waldmann
f5a47d86e3 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-04 21:24:42 +01:00
Thomas Waldmann
9ea1d2a7d6 SaveFile: respect umask for final file mode, fixes #6400 2022-03-04 20:53:10 +01:00
TW
057ae69537
Merge pull request #6384 from ThomasWaldmann/pyupgrade-38-1.2
run pyupgrade (1.2-maint)
2022-02-27 22:52:43 +01:00
Thomas Waldmann
8edb1dc085 manual formatting fixes (cosmetic / pep8) 2022-02-27 21:13:04 +01:00
Thomas Waldmann
c4ed840c7b pyupgrade --py38-plus ./**/*.py 2022-02-27 21:12:44 +01:00
TW
6c243b2c28
Merge pull request #6381 from ThomasWaldmann/remove-blake2-docs-1.2
remove blake2 docs, blake2 code not bundled any more, fixes #6371
2022-02-27 14:44:11 +01:00
Thomas Waldmann
51a676cc6f remove blake2 docs, blake2 code not bundled any more, fixes #6371 2022-02-27 14:43:27 +01:00
TW
97de7e1fe2
Merge pull request #6380 from ThomasWaldmann/fix-zstd-include-1.2
fix zstd.h include for bundled zstd, fixes #6369
2022-02-27 14:39:09 +01:00
Thomas Waldmann
9390d2712b fix zstd.h include for bundled zstd, fixes #6369 2022-02-27 14:35:19 +01:00
Thomas Waldmann
da0ddacc54 create: skip with warning if opening the parent dir of recursion root fails, fixes #6374 2022-02-27 02:40:15 +01:00
TW
c2b76adb19
Merge pull request #6373 from braewoods/warnings
[1.2-maint] fix multiple warnings related to _hashindex.c
2022-02-26 23:42:22 +01:00
James Buren
1618c98975 src/borg/cache_sync/unpack.h: fix compiler warnings
The key argument being sent to hashindex_get and hashindex_set by
multiple functions is a different signedness from what the functions
expect. This resolves the issue by changing the key type in the
unpack_user struct to unsigned char.
2022-02-26 16:13:07 -06:00
James Buren
4427c16d31 src/borg/_hashindex.c: fix compiler warnings
The value argument of hashindex_set is causing harmless pointer type
mismatches. This resolves the issue by changing the type to void*
which silences these types of warnings.
2022-02-26 16:13:02 -06:00
TW
d88d1674b7
Merge pull request #6367 from braewoods/warnings
[1.2-maint] src/borg/compress.pyx: fix compiler warning, closes #6365
2022-02-26 20:42:04 +01:00
James Buren
8e640ae0f3 src/borg/compress.pyx: fix compiler warning, closes #6365
This resolves a compiler warning from the generated code that
resulted from a comparison of two local variables of different
signedness. The issue is resolved by changing the type of both
to int since this seems like the safest choice available.
2022-02-26 13:20:39 -06:00
TW
c6f284d43c
Merge pull request #6364 from braewoods/warnings
[1.2-maint] src/borg/crypto/low_level.pyx: fix compiler warning
2022-02-26 00:40:55 +01:00
James Buren
067dd10027 src/borg/crypto/low_level.pyx: fix compiler warning
The generated source code was producing a compiler warning due to
the pointers differing in constness. The called function expects
a non-const pointer while the generated code produces a const pointer
via a cast. This changes the cast to drop 'const' to make the compiler
happy.
2022-02-25 17:36:48 -06:00
Thomas Waldmann
f81c62f894 vagrant: darwin64: remove fakeroot, fixes #6314
deprecated / unsupported / 404.
2022-02-25 23:48:03 +01:00
TW
0fb546978a
Merge pull request #6358 from hexagonrecursion/apt-get-1.2
s/apt/apt-get/ (1.2)
2022-02-25 21:02:39 +01:00
TW
04712a76dc
Merge pull request #6359 from hexagonrecursion/order-1.2
docs: Clarify on-disk order and size of log entry fields (1.2)
2022-02-25 20:50:59 +01:00
Julian Picht
e49a1b5d9b docs: Clarify on-disk order and size of log entry fields (#6357)
docs: clarify on-disk order and size of log entry fields

The order of the fields of a log entry on disk is CRC32 first, the docs had the size first.

I tried to make this list similar to the HashIndex struct description.
2022-02-25 15:03:21 +03:00
Andrey Bienkowski
29ce1fc818 s/apt/apt-get/
> WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
2022-02-25 14:44:11 +03:00
TW
6f18167873
Merge pull request #6348 from ThomasWaldmann/nodashes-1.2
docs: do not transform --/--- to unicode dashes
2022-02-23 20:58:44 +01:00
Thomas Waldmann
f5116a7e67 docs: do not transform --/--- to unicode dashes 2022-02-23 20:08:27 +01:00
Thomas Waldmann
7265f6adb8 quickstart docs: only borg compact frees disk space 2022-02-19 19:25:16 +01:00
Thomas Waldmann
6641a9629d build_man 2022-02-19 18:48:13 +01:00
Thomas Waldmann
9a8eec6af1 build_usage 2022-02-19 18:47:47 +01:00
Thomas Waldmann
7b36f001f6 fixup: set release date 2022-02-19 18:45:19 +01:00
Thomas Waldmann
0a5b329008 update CHANGES 2022-02-19 18:41:43 +01:00
TW
8a409ec1fb
Merge pull request #6306 from ThomasWaldmann/fix-savefile-races-master
SaveFile: fix race conditions
2022-02-17 16:51:43 +01:00
Laurent
6015ded828
docs: explain the difference between a path that ends with or without a slash (#6297)
docs: explain the difference between a path that ends with or without a slash
2022-02-16 23:53:11 +01:00
Thomas Waldmann
14b5c005d8 SaveFile: fix race conditions
Thanks to Andrey Bienkowski (@hexagonrecursion) for reporting this and writing reproducer code.

Changes:
- use different, randomly (but recognizably) named temp files while writing (securely made by os.mkstemp())
- make sure temp files are cleaned up in normal and error conditions
- SyncFile can now get corresponding pair of path + open os-level fd
- cleaned up: fd now means os-level fd, f means python-file-like object
- fixed a caller of SaveFile
2022-02-16 23:23:47 +01:00
TW
da763cedda
Merge pull request #6301 from ThomasWaldmann/safe-unlink-master
safe_unlink (was: truncate_and_unlink)
2022-02-16 22:56:03 +01:00
Thomas Waldmann
b292e158a6 rename truncate_and_unlink to safe_unlink
it usually does not truncate any more,
only under "disk full" circumstances and only if there is only one hardlink.
2022-02-15 21:08:34 +01:00
Thomas Waldmann
4a2ab496e0 safer truncate_and_unlink implementation
the previous implementation caused collateral damage on hardlink-copies of a repository,
see: https://github.com/borgbackup/borg/discussions/6286
2022-02-15 12:58:37 +01:00
TW
6c5e818510
Merge pull request #6299 from ThomasWaldmann/update-changes-master
update CHANGES
2022-02-14 20:33:27 +01:00