1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-08 15:37:09 +00:00
Commit graph

6537 commits

Author SHA1 Message Date
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
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
Thomas Waldmann
ee32c1b63d update CHANGES 2022-02-14 18:55:59 +01:00
TW
4896fe1560
Merge pull request #6296 from ThomasWaldmann/cache-pre12-archive-meta
info: use a pre12-meta cache to accelerate stats for borg < 1.2 archives
2022-02-14 18:29:17 +01:00
TW
fb194baf09
Merge pull request #6295 from taandrighetti/fix-dir-hardlinkmasters
diff: reduce memory consumption, fix is_hardlink_master
2022-02-14 18:25:36 +01:00
Thomas Waldmann
a2fb9cde4e calc_stats progress display: add archive name 2022-02-14 18:00:02 +01:00
Thomas Waldmann
25e27a1539 info: use a pre12-meta cache to accelerate stats for borg < 1.2 archives
first time borg info is invoked on a borg 1.1 repo, it can take
a rather long time computing and caching some stats values for
1.1 archives, which borg 1.2 archives have in their archive
metadata structure. be patient, esp. if you have lots of old
archives.

following invocations are much faster.
2022-02-14 18:00:02 +01:00
Tomás Andrighetti
a2ae36bb54 Exclude directories in is_hardlink_master 2022-02-13 19:23:40 -03:00
TW
0cebe62264
Merge pull request #6290 from ThomasWaldmann/compact-free-space-master
compact segments: improve freeable / freed space log output
2022-02-13 18:25:01 +01:00
TW
aafb22ecf7
Merge pull request #6292 from ThomasWaldmann/fix-setdefault-master
implement more standard hashindex.setdefault behaviour
2022-02-13 13:54:13 +01:00
Thomas Waldmann
603b58f6a1 implement more standard hashindex.setdefault behaviour
the .get() like behaviour (== returning the value) was missing.

it's still not 100% like dict.setdefault, because there is no
default value None. but None doesn't make sense here, because we
usually need a N-tuple matching the hash table's value format.

note: this "bug" (or unusual implementation) was without consequences,
      because hashindex.setdefault is not used anywhere in borg, so
      it was also not used in a wrong way anywhere.

https://docs.python.org/3/library/stdtypes.html#dict.setdefault
2022-02-13 03:47:44 +01:00
Thomas Waldmann
17e8aef394 compact: not "freeable", but "maybe freeable"
e.g. if there is a ton of DELs in a segment, they all are maybe freeable,
but only if we also got rid of the respective PUTs (see also #6289).
2022-02-12 20:37:28 +01:00
Thomas Waldmann
e80b5c2272 compact: derive freed space from quota use before/after, fixes #5679
due to the way quota accounting is done, this is likely not
100% precise, but much better than selling the hints as the truth.
2022-02-12 20:37:18 +01:00
TW
94c3d7eb27
Merge pull request #6263 from ThomasWaldmann/docs-links-master
improve linking inside docs
2022-02-08 22:34:11 +01:00
TW
c56b15f271
Merge branch 'master' into docs-links-master 2022-02-08 21:57:58 +01:00
Andrey Bienkowski
24e8b38f1a
Doc: borg init: explain the encryption modes better (#6184)
docs:borg init: explain the encryption modes better

The documentation for borg init was not structured logically:
1. The topic is switched from the general discussion of `borg init`
   to the discussion of encryption modes without a title.
2. Obscure technical details (chunking, id generation etc) were
   above the high-level overview and other key information.
2022-02-08 21:55:51 +01:00
Thomas Waldmann
3428b9f2b4 docs: link to python 3.8 docs
because py38 is our minimum requirement.
2022-02-07 23:23:15 +01:00
Thomas Waldmann
510ceb86f8 docs: link to borg_placeholders 2022-02-07 22:36:24 +01:00
Thomas Waldmann
d79b325494 docs: link to borg_patterns 2022-02-07 22:33:28 +01:00
Thomas Waldmann
42fb25d4a7 docs: use same phrasing in misc. help texts 2022-02-07 21:40:15 +01:00
bobthebadguy
45df345d29
Clarify usage of patternfile roots (#6242) 2022-02-07 20:53:25 +01:00