Thomas Waldmann
9fa76bc437
use argon2 from openssl >= 3.2, drop argon2-cffi, fixes #7963
...
- src/borg/crypto/low_level.pyx: implement `argon2_hash` using OpenSSL's
`EVP_KDF` API for ARGON2 (requires OpenSSL >= 3.2.0).
- src/borg/crypto/key.py: switch to the native `argon2_hash` implementation,
removing `argon2-cffi` dependency.
- setup.py: require OpenSSL >= 3.2.0 for the crypto extension to ensure
ARGON2 KDF support is available.
- pyproject.toml: drop `argon2-cffi` dependency.
- docs: update installation requirements and security documentation to
reflect the transition to OpenSSL for Argon2.
2026-05-11 20:15:17 +02:00
TW
ca3e88f5b1
Merge pull request #9600 from mr-raj12/legacy-crypto-key-phase2
...
Lint / lint (push) Waiting to run
CI / lint (push) Waiting to run
CI / security (push) Waiting to run
CI / asan_ubsan (push) Blocked by required conditions
CI / native_tests (push) Blocked by required conditions
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Blocked by required conditions
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Blocked by required conditions
CI / vm_tests (OmniOS, false, omnios, r151056) (push) Blocked by required conditions
CI / vm_tests (OpenBSD, false, openbsd, 7.8) (push) Blocked by required conditions
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Blocked by required conditions
CI / windows_tests (push) Blocked by required conditions
CodeQL / Analyze (push) Waiting to run
legacy: move legacy AES-CTR key classes into borg.legacy.crypto, refs #9556
2026-05-11 16:06:57 +02:00
Mrityunjay Raj
0cf9322d78
legacy: fix mypy false positives in key classes caused by circular import, refs #9556
2026-05-11 18:13:08 +05:30
Mrityunjay Raj
e01ba500f8
legacy: move legacy AES-CTR key classes into borg.legacy.crypto, refs #9556
2026-05-11 17:40:11 +05:30
TW
bae103637d
Merge pull request #9589 from ThomasWaldmann/chunkerfixed-sparse-handling-tests-master
...
Lint / lint (push) Waiting to run
CI / lint (push) Waiting to run
CI / security (push) Waiting to run
CI / asan_ubsan (push) Blocked by required conditions
CI / native_tests (push) Blocked by required conditions
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Blocked by required conditions
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Blocked by required conditions
CI / vm_tests (OmniOS, false, omnios, r151056) (push) Blocked by required conditions
CI / vm_tests (OpenBSD, false, openbsd, 7.8) (push) Blocked by required conditions
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Blocked by required conditions
CI / windows_tests (push) Blocked by required conditions
CodeQL / Analyze (push) Waiting to run
ChunkerFixed sparse handling tests (master)
2026-05-10 08:49:36 +02:00
Thomas Waldmann
62d8762eb7
fixed_test: remove commented-out skipif decorator
...
The @pytest.mark.skipif(not fs_supports_sparse(), ...) decorator on
test_chunkify_sparse was commented out and is not needed because the
zeros.startswith(result) fix in FileReader.read() detects zero-filled
slices as CH_ALLOC regardless of sparse FS support, and ChunkerFixed
with sparse=True gracefully falls back when SEEK_HOLE/SEEK_DATA is
not available.
2026-05-09 00:47:04 +02:00
Thomas Waldmann
7b889d357d
test_sparsemap: coalesce expected sparse map to match OS behavior
...
The test_sparsemap tests were failing on Linux CI because SEEK_HOLE/
SEEK_DATA naturally coalesces adjacent ranges of the same type (data
or hole), but the tests compared against the raw per-block sparse maps
which list each block separately.
Add a coalesce_sparse_map() helper that merges adjacent ranges with
the same is_data flag, and compare sparsemap() output against the
coalesced expected map instead of the raw per-block map.
2026-05-09 00:32:45 +02:00
Thomas Waldmann
827b82938f
FileReader.read: detect zero-filled slices from CH_DATA blocks
...
When FileReader.read() sliced a large CH_DATA block (read at 1MB
granularity) into smaller block_size chunks (e.g. 4096 bytes), zero-filled
slices were returned as CH_DATA with zero bytes instead of CH_ALLOC.
Add a zeros.startswith(result) check before returning a CH_DATA chunk,
converting all-zero slices to CH_ALLOC. This ensures sparse-aware
consumers correctly identify allocated-but-zero regions regardless of
whether the file was read with sparse=True or sparse=False.
2026-05-09 00:01:46 +02:00
Thomas Waldmann
9b8cfc7d83
tests: pretty print
2026-05-09 00:01:45 +02:00
Thomas Waldmann
e9b62dc29a
maps: always use BS sized blocks
...
the fixed chunker also cuts BS blocks.
2026-05-09 00:01:43 +02:00
Thomas Waldmann
5a314d6f51
don't use sparse with BytesIO
...
doesn't work anyway.
2026-05-09 00:01:42 +02:00
Thomas Waldmann
95e12fb669
simplify fixed test
2026-05-09 00:01:40 +02:00
Thomas Waldmann
73bca86fb3
comment / use BS in test
2026-05-09 00:01:39 +02:00
Thomas Waldmann
fa376b0d9d
Fix ChunkerFixed sparse handling and update tests
...
- Update fixed_test.py expectations for non-sparse chunking.
- Enable `sparse=True` in interaction_test.py and reader_test.py where zero detection is required.
- Catch `ValueError` in _build_fmap to support `BytesIO` seeking.
2026-05-09 00:01:37 +02:00
TW
ef014a6b98
Merge pull request #9595 from ThomasWaldmann/fix-crypto-ll-master
...
crypto low_level: fix freeing of memory
2026-05-08 23:35:20 +02:00
TW
d9a8d992b4
Merge pull request #9597 from mr-raj12/fix-fdatasync-docstring
...
platform: fix fdatasync docstring, clarify OS-level vs HW-level flush
2026-05-08 23:34:09 +02:00
TW
614527bfbd
Merge pull request #9596 from ThomasWaldmann/fix-remoterepo-master
...
extract: resolve memory leak on abandoned async requests in RemoteRepository
2026-05-08 19:55:13 +02:00
TW
7e427989c7
Merge pull request #9594 from ThomasWaldmann/fix/borgfs-fstab-home-dir-3395-master
...
helpers: get_base_dir: avoid using HOME when it incorrectly points to root's home for non-root users (fstab borgfs), fixes #3395
2026-05-08 19:28:36 +02:00
Mrityunjay Raj
1198353d55
platform: fix fdatasync docstring, clarify OS-level vs HW-level flush
2026-05-08 22:38:31 +05:30
Thomas Waldmann
f15adc5dcf
extract: resolve memory leak on abandoned async requests in RemoteRepository
...
When a generator for get_many() or call_many() is destroyed early (for example, if a BackupError occurs during extraction and aborts fetching preloaded chunks), a GeneratorExit is raised inside call_many().
Previously, call_many() lacked a try/finally block, so it failed to mark the abandoned msgids in self.ignore_responses. When the remote server eventually sent the data, it was indefinitely cached in self.responses and self.chunkid_to_msgids, causing a memory leak.
This fix wraps the request loop in try/finally to guarantee that all pending waiting_for message IDs, as well as any unrequested preloaded chunk IDs in calls, are properly added to ignore_responses.
For example, this memory leak could be triggered when extracting files:
- by permission errors or other OSErrors with the extracted file
- if the archived file had all-zero replacement chunks or inconsistent size
2026-05-08 18:54:03 +02:00
Thomas Waldmann
b01f4c01af
crypto low_level: fix freeing of memory, borg2 crypto classes
...
The previous code performed allocations and buffer acquisitions before the
`try` block. If a later allocation or buffer acquisition failed, execution did
not enter the `finally` block, so resources acquired earlier in the setup path
could leak.
Move allocation and buffer acquisition into the guarded block, initialize raw
output pointers to `NULL`, and only call `PyMem_Free` or `PyBuffer_Release`
for resources that were actually acquired.
2026-05-08 17:08:55 +02:00
Thomas Waldmann
70b3e6ee4c
crypto low_level: fix freeing of memory
...
The previous code performed allocations and buffer acquisitions before the
`try` block. If a later allocation or buffer acquisition failed, execution did
not enter the `finally` block, so resources acquired earlier in the setup path
could leak.
Move allocation and buffer acquisition into the guarded block, initialize raw
output pointers to `NULL`, and only call `PyMem_Free` or `PyBuffer_Release`
for resources that were actually acquired.
2026-05-08 16:53:48 +02:00
Thomas Waldmann
a71a252036
helpers: get_base_dir: avoid using HOME when it incorrectly points to root's home for non-root users (fstab borgfs), fixes #3395
...
I just added the current 1.4-maint code to the legacy branch.
Maybe more changes are needed for the non-legacy branch.
2026-05-08 16:44:22 +02:00
TW
c409e767b9
Merge pull request #9550 from ThomasWaldmann/fix-test_create_read_special_symlink-master
...
Fix test_create_read_special_symlink (master)
2026-05-08 13:58:42 +02:00
TW
9da719e6a7
Merge pull request #9559 from mr-raj12/legacy-package-phase1-2
...
legacy: move LegacyRepository, LegacyRemoteRepository, RepoObj1 into borg.legacy package, refs #9556
2026-05-08 13:12:29 +02:00
TW
67061b0aeb
Merge pull request #9591 from borgbackup/backport-9590-to-master
...
[Backport master] mount: improve error msg when uid/gid cannot be resolved, fixes #9574
2026-05-05 01:47:12 +02:00
Thomas Waldmann
f48905b6d6
mount: improve error msg when uid/gid cannot be resolved, fixes #9574
...
(cherry picked from commit 0eaa76f252 )
2026-05-04 23:38:55 +02:00
Thomas Waldmann
54dac7b896
test_create_read_special_symlink: remove test skip
2026-05-04 22:18:28 +02:00
TW
fe0be41c1c
Merge pull request #9584 from ThomasWaldmann/cpa10-master
...
remove workaround for cross-platform-actions < v1.0.0, fixes #9565
2026-05-04 20:16:33 +02:00
Thomas Waldmann
684928885b
remove workaround for cross-platform-actions < v1.0.0, fixes #9565
2026-05-04 19:23:56 +02:00
TW
450b017b2d
Merge pull request #9569 from borgbackup/dependabot/pip/requirements.d/pip-dependencies-8dbc0ac129
...
CI / lint (push) Has been cancelled
CI / security (push) Has been cancelled
CI / asan_ubsan (push) Has been cancelled
CI / native_tests (push) Has been cancelled
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Has been cancelled
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Has been cancelled
CI / vm_tests (OmniOS, false, omnios, r151056) (push) Has been cancelled
CI / vm_tests (OpenBSD, false, openbsd, 7.8) (push) Has been cancelled
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Has been cancelled
CI / windows_tests (push) Has been cancelled
build(deps-dev): bump the pip-dependencies group in /requirements.d with 2 updates
2026-04-14 15:43:30 +02:00
TW
76ecc72665
Merge pull request #9570 from borgbackup/dependabot/github_actions/actions-a93df0a446
...
build(deps): bump cross-platform-actions/action from 0.32.0 to 1.0.0 in the actions group
2026-04-14 15:43:10 +02:00
dependabot[bot]
7b81b8483e
build(deps): bump cross-platform-actions/action in the actions group
...
Bumps the actions group with 1 update: [cross-platform-actions/action](https://github.com/cross-platform-actions/action ).
Updates `cross-platform-actions/action` from 0.32.0 to 1.0.0
- [Release notes](https://github.com/cross-platform-actions/action/releases )
- [Changelog](https://github.com/cross-platform-actions/action/blob/master/changelog.md )
- [Commits](https://github.com/cross-platform-actions/action/compare/v0.32.0...v1.0.0 )
---
updated-dependencies:
- dependency-name: cross-platform-actions/action
dependency-version: 1.0.0
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-04-14 05:44:11 +00:00
dependabot[bot]
304d829568
build(deps-dev): bump the pip-dependencies group
...
Bumps the pip-dependencies group in /requirements.d with 2 updates: [build](https://github.com/pypa/build ) and [types-pyyaml](https://github.com/python/typeshed ).
Updates `build` from 1.4.2 to 1.4.3
- [Release notes](https://github.com/pypa/build/releases )
- [Changelog](https://github.com/pypa/build/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pypa/build/compare/1.4.2...1.4.3 )
Updates `types-pyyaml` from 6.0.12.20250915 to 6.0.12.20260408
- [Commits](https://github.com/python/typeshed/commits )
---
updated-dependencies:
- dependency-name: build
dependency-version: 1.4.3
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: pip-dependencies
- dependency-name: types-pyyaml
dependency-version: 6.0.12.20260408
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: pip-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-04-14 05:41:50 +00:00
TW
bb806e11e2
Merge pull request #9568 from borgbackup/dependabot/pip/requirements.d/pytest-9.0.3
...
CI / lint (push) Waiting to run
CI / security (push) Waiting to run
CI / asan_ubsan (push) Blocked by required conditions
CI / native_tests (push) Blocked by required conditions
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Blocked by required conditions
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Blocked by required conditions
CI / vm_tests (OmniOS, false, omnios, r151056) (push) Blocked by required conditions
CI / vm_tests (OpenBSD, false, openbsd, 7.8) (push) Blocked by required conditions
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Blocked by required conditions
CI / windows_tests (push) Blocked by required conditions
build(deps-dev): bump pytest from 9.0.2 to 9.0.3 in /requirements.d
2026-04-13 20:49:43 +02:00
dependabot[bot]
e2fd2b0683
build(deps-dev): bump pytest from 9.0.2 to 9.0.3 in /requirements.d
...
Bumps [pytest](https://github.com/pytest-dev/pytest ) from 9.0.2 to 9.0.3.
- [Release notes](https://github.com/pytest-dev/pytest/releases )
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pytest-dev/pytest/compare/9.0.2...9.0.3 )
---
updated-dependencies:
- dependency-name: pytest
dependency-version: 9.0.3
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-04-13 17:42:21 +00:00
TW
3246b0f8eb
Merge pull request #9567 from charmikadi/fix/remove-chardet-pin
...
requirements: remove chardet < 6 pin, no longer needed with requests >= 2.32.6
2026-04-13 19:40:55 +02:00
Charmi Kadi
18cb73ca40
Remove chardet dependency from development.lock.txt
2026-04-12 20:09:19 -04:00
Charmi Kadi
5eb127b85a
Remove chardet version constraint from development.txt
2026-04-12 20:07:42 -04:00
TW
aaa5e1db48
Merge pull request #9564 from borgbackup/dependabot/pip/requirements.d/pip-dependencies-229291d402
...
CI / lint (push) Has been cancelled
CI / security (push) Has been cancelled
CI / asan_ubsan (push) Has been cancelled
CI / native_tests (push) Has been cancelled
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Has been cancelled
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Has been cancelled
CI / vm_tests (OmniOS, false, omnios, r151056) (push) Has been cancelled
CI / vm_tests (OpenBSD, false, openbsd, 7.8) (push) Has been cancelled
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Has been cancelled
CI / windows_tests (push) Has been cancelled
build(deps-dev): bump the pip-dependencies group in /requirements.d with 2 updates
2026-04-07 19:45:14 +02:00
TW
4cadca04f3
Merge pull request #9553 from borgbackup/dependabot/github_actions/actions-7980569b8c
...
CI / lint (push) Waiting to run
CI / security (push) Waiting to run
CI / asan_ubsan (push) Blocked by required conditions
CI / native_tests (push) Blocked by required conditions
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Blocked by required conditions
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Blocked by required conditions
CI / vm_tests (OmniOS, false, omnios, r151056) (push) Blocked by required conditions
CI / vm_tests (OpenBSD, false, openbsd, 7.8) (push) Blocked by required conditions
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Blocked by required conditions
CI / windows_tests (push) Blocked by required conditions
build(deps): bump codecov/codecov-action from 5 to 6 in the actions group across 1 directory
2026-04-07 11:46:51 +02:00
TW
c72b90b5c3
Merge pull request #9563 from mr-raj12/fix/haiku-ci-safe-directory
...
CI: fix Haiku git safe.directory issue, fixes #9562
2026-04-07 11:44:35 +02:00
dependabot[bot]
258c5764b9
build(deps-dev): bump the pip-dependencies group
...
Bumps the pip-dependencies group in /requirements.d with 2 updates: [pkgconfig](https://github.com/matze/pkgconfig ) and [tox](https://github.com/tox-dev/tox ).
Updates `pkgconfig` from 1.5.5 to 1.6.0
- [Release notes](https://github.com/matze/pkgconfig/releases )
- [Commits](https://github.com/matze/pkgconfig/compare/v1.5.5...v1.6.0 )
Updates `tox` from 4.46.3 to 4.49.0
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.46.3...4.49.0 )
---
updated-dependencies:
- dependency-name: pkgconfig
dependency-version: 1.6.0
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: pip-dependencies
- dependency-name: tox
dependency-version: 4.49.0
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: pip-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-04-07 09:29:38 +00:00
dependabot[bot]
2a4452ffbd
build(deps): bump codecov/codecov-action in the actions group
...
Lint / lint (push) Has been cancelled
Bumps the actions group with 1 update: [codecov/codecov-action](https://github.com/codecov/codecov-action ).
Updates `codecov/codecov-action` from 5 to 6
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v5...v6 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-04-07 05:45:46 +00:00
Mrityunjay Raj
cb83cc19e0
CI: fix Haiku git safe.directory issue, fixes #9562
2026-04-05 23:02:25 +05:30
Mrityunjay Raj
15bec44c76
legacy: extract RepoObj1, update all imports, drop re-export stubs
2026-04-05 22:13:29 +05:30
TW
cb2721dc31
Merge pull request #9560 from Goddesen/fix-append-file-removal
...
Lint / lint (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / security (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
CI / asan_ubsan (push) Has been cancelled
CI / native_tests (push) Has been cancelled
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Has been cancelled
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Has been cancelled
CI / vm_tests (OmniOS, false, omnios, r151056) (push) Has been cancelled
CI / vm_tests (OpenBSD, false, openbsd, 7.8) (push) Has been cancelled
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Has been cancelled
CI / windows_tests (push) Has been cancelled
Fixes cleanup of append-only test tempfiles on macOS/BSD
2026-04-04 23:57:10 +02:00
Hugo Wallenburg
354ca28842
Fixes cleanup of append-only test tempfiles on macOS/BSD
...
The `test_extract_restores_append_flag` test leaves append-only
tempfiles around on macOS and FreeBSD that cannot be removed cleanly,
this was previously just ignored by the cleanup func but those files
occasionally caused lots of warning output on subsequent test runs.
Fixed by attempting to clear flags and retry whenever the cleanup
function fails.
2026-04-04 21:13:23 +02:00
Mrityunjay Raj
4db927c62e
legacy: git mv legacyrepository and legacyremote
2026-04-04 03:00:02 +05:30
TW
6959b69f9b
Merge pull request #9558 from Goddesen/fix-xdg-config-assumptions-macos
...
Lint / lint (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / security (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
CI / asan_ubsan (push) Has been cancelled
CI / native_tests (push) Has been cancelled
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Has been cancelled
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Has been cancelled
CI / vm_tests (OmniOS, false, omnios, r151056) (push) Has been cancelled
CI / vm_tests (OpenBSD, false, openbsd, 7.8) (push) Has been cancelled
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Has been cancelled
CI / windows_tests (push) Has been cancelled
Fixes tests/docs assuming XDG_* vars not used on macOS
2026-04-03 20:17:08 +02:00