Commit graph

10222 commits

Author SHA1 Message Date
TW
d3fa580f42
Merge pull request #9711 from ThomasWaldmann/repo-list-borg1
allow 'borg repo-list' for Borg 1.x repositories via --from-borg1
2026-06-03 11:44:15 +02:00
TW
a1dc0dd6fa
Merge pull request #9712 from ThomasWaldmann/addtl-help-topics-master
list additional help topics in main borg help, fixes #3432
2026-06-03 09:58:34 +02:00
Thomas Waldmann
0311e891e6
list additional help topics in main borg help
- Add an epilog to the main ArgumentParser in src/borg/archiver/__init__.py.
- Import process_epilog and use it to format and list additional help topics: patterns, match-archives, placeholders, compression.
- Add test_main_help_epilog to help_cmd_test.py.
- Fixes #3432
2026-06-03 01:09:53 +02:00
Thomas Waldmann
8a13309539
allow 'borg repo-list' for Borg 1.x repositories via --from-borg1
- Add --from-borg1 option to borg repo-list command.
- Add allow_v1 argument to @with_repository decorator.
- If allow_v1 is True and v1_legacy is requested, allow version 1 repositories and load Manifest with RepoObj1 object class.
- Support LegacyRemoteRepository in Manifest class.
- Add test_repo_list_from_borg1.
2026-06-03 00:45:16 +02:00
TW
a135c8f302
Merge pull request #9709 from ThomasWaldmann/build-nuitka-master
scripts/build-nuitka.sh: generate single-file binary using nuitka, fixes #3227
2026-06-02 22:44:41 +02:00
Thomas Waldmann
b64d1dbc4d
scripts/build-nuitka.sh: generate single-file binary using nuitka, fixes #3227
Very experimental and little tested.
2026-06-02 18:56:43 +02:00
TW
ec331057a9
Merge pull request #9706 from ThomasWaldmann/py315
ci: add Python 3.15 to CI testing and tox configuration
2026-06-02 17:36:00 +02:00
Thomas Waldmann
a13f8a2f32
development.lock.txt: use Cython 3.2.5 2026-06-02 14:31:34 +02:00
Thomas Waldmann
b9a0a33a6e
ci: add Python 3.15 to CI testing and tox configuration 2026-06-02 14:31:32 +02:00
TW
98d6f2e3db
Merge pull request #9705 from ThomasWaldmann/update-changes
update CHANGES
2026-06-02 14:09:12 +02:00
Thomas Waldmann
d6eb910c21
update CHANGES 2026-06-02 11:34:42 +02:00
TW
968f7dae00
Merge pull request #9676 from ThomasWaldmann/support-rest-http-stdio
Support rest http stdio
2026-06-02 09:38:37 +02:00
Thomas Waldmann
5584bff830
CI: add test_rest_repo_basics tests to localhost openssh server 2026-06-02 03:07:15 +02:00
Thomas Waldmann
8dbfc50cde
require borgstore 0.5.1, always with rest extra 2026-06-02 02:12:08 +02:00
Thomas Waldmann
f53dd6c3c4
remote archiver tests: use rest:/// rather than ssh:// 2026-06-01 23:58:28 +02:00
TW
b8034fcf40
Merge pull request #9692 from mr-raj12/pack-files-step3-pack-id
repoobj, repository: add chunk_id to header, introduce packs/ namespace
2026-06-01 21:35:33 +02:00
Thomas Waldmann
39ac734b9c
support "rest:" repository URLs, fixes #9593
That is borgstore's REST http over stdio (over ssh, if a host is given).
2026-06-01 21:11:55 +02:00
TW
4d9369f897
Merge pull request #9701 from ThomasWaldmann/fix-9697-master
docs: update to 'borg key change-passphrase' in env help, fixes #9697
2026-06-01 21:01:12 +02:00
Thomas Waldmann
05994d2e4e
docs: update to 'borg key change-passphrase' in env help, fixes #9697 2026-06-01 20:55:56 +02:00
Mrityunjay Raj
d8564b90a4 repository: make N=1 chunk size assumption explicit in list(), refs #8572
info.size is the on-disk pack file size, which equals the chunk size only
when N=1 (one chunk per pack).  Extract it into a named variable with a
comment so the assumption is visible and easy to fix when N>1 is introduced.
2026-06-01 23:56:40 +05:30
Mrityunjay Raj
a4eac0b62c testsuite: move manifest corruption offset into data_encrypted region, refs #8572
Corruption at offset 123 lands inside meta_encrypted (header is 49 bytes),
causing extract_crypted_data to return a shifted slice whose first byte is
a random AES-OCB ciphertext byte.  When that byte equals 0x02 (PlaintextKey
type) key detection silently selects the wrong key, leading to a flaky
IntegrityError in rebuild_archives.

Move the insertion point to offset 250, which is safely inside data_encrypted
for any realistic manifest size, so key detection always reads the correct
type byte and the corruption is caught by AEAD authentication instead.
2026-06-01 23:56:26 +05:30
Mrityunjay Raj
0a9913b658 repository: drop PACK_HEADER wrapper, pack file is the raw RepoObj, refs #8572
accept only repo version 4
2026-06-01 23:55:55 +05:30
Mrityunjay Raj
2561acdba3 archiver: v4-only for -r/--repo, accept v4 in --other-repo, fix TypeError in error message 2026-06-01 23:55:54 +05:30
Mrityunjay Raj
395939b551 archiver: accept version 4 repos for -r/--repo, refs #8572
_common.py had a hard-coded version check that only allowed v3.
Now that repository.py creates v4 repos, every archiver command
failed to open the repo. Extend the guard to (3, 4).

The --other-repo check (v1 or v3 for borg transfer source) is
intentionally left unchanged.
2026-06-01 23:55:54 +05:30
Mrityunjay Raj
707f26b8e3 repository: address review: drop data/ namespace, fix chunk_id/pack_id semantics, refs #8572 2026-06-01 23:55:54 +05:30
Mrityunjay Raj
05ce0a1897 repository: add BORGPACK pack header, bump repo version to 4, refs #8572
Wrap each pack file in a 13-byte header (magic + version + blob_len) so
packs are self-identifying and the [len][blob] unit extends to N>1 without
a format revision. Bump version 3->4: packs/ and 49-byte ObjHeader are
incompatible with version-3 readers. Fix test_extra_chunks chunk_id mismatch.
2026-06-01 23:55:54 +05:30
Mrityunjay Raj
1cb8d99425 repository: introduce pack_id, move chunks to packs/ namespace, refs #8572
Introduces pack_id as the borgstore storage key (N=1: pack_id == chunk_id).
Chunks move from data/ to packs/ with single-level directory sharding (256
subdirs). check_object() validates the header chunk_id against the pack
filename. Adds packs/ to ns_config with levels=[1] and to the permissions
maps for no-delete and write-only modes.
2026-06-01 23:55:54 +05:30
Mrityunjay Raj
beab9b2711 repoobj: add chunk_id to blob header, extend to 49 bytes, refs #8572
Stores chunk_id unencrypted in the per-blob header so borg check can
rebuild the chunk_id -> pack location index without decryption. AEAD
uses chunk_id as additional data, making key-free recovery circular
without an explicit plaintext copy.

Header layout: OBJ_MAGIC(8) + version(1) + chunk_id(32) + meta_size(4)
+ data_size(4) = REPOOBJ_HEADER_SIZE = 49 bytes.
2026-06-01 23:55:54 +05:30
TW
c37fe1ff92
Merge pull request #9698 from ThomasWaldmann/fix-9695
potential fix for #9695
2026-06-01 20:19:44 +02:00
Thomas Waldmann
81c0c54529
potential fix for #9695 2026-06-01 19:26:11 +02:00
TW
bda3d5da48
Merge pull request #9693 from ThomasWaldmann/sha256-repokey
repokey: use same format as with external keyfile
2026-06-01 09:48:26 +02:00
Thomas Waldmann
9d2dd1d71f
keyfile: use binary mode to write 2026-05-31 23:55:40 +02:00
Thomas Waldmann
f13dd4ddc9
repokey: use same format as with external keyfile
- always have a starting line with FILE_ID repoid
- store repkeys content-addressed, name is sha256(content)
- search by repo id on load
- add keyfile_format / keyfile_parse / is_keyfile helpers
2026-05-31 22:50:25 +02:00
TW
a0448abde0
Merge pull request #9691 from mr-raj12/testsuite-argon2-wrong-passphrase
testsuite: add argon2 wrong-passphrase test for decrypt_key_file, refs #9686
2026-05-31 18:27:44 +02:00
TW
504be79208
Merge pull request #9685 from mr-raj12/testsuite-legacy-helpers
testsuite: add borg1_hardlink_master/slave/hardlinkable unit tests, refs #9556
2026-05-31 18:26:08 +02:00
TW
5bb4e85a16
Merge pull request #9684 from mr-raj12/pack-files-step2-obj-magic
repoobj: add OBJ_MAGIC blob header for pack file format
2026-05-31 17:20:07 +02:00
TW
76b77c748f
Merge pull request #9690 from ThomasWaldmann/sha256-key-filenames
keyfile: name key files by sha256(keyfile_contents)
2026-05-31 17:18:49 +02:00
Mrityunjay Raj
a6124fc284 testsuite: add argon2 wrong-passphrase test for decrypt_key_file, refs #9686 2026-05-31 20:30:58 +05:30
Mrityunjay Raj
de5590f398 testsuite: add borg1_hardlink_master/slave/hardlinkable unit tests, refs #9556 2026-05-31 20:19:57 +05:30
Mrityunjay Raj
1530688835 repository: use 'size mismatch' in check_object error messages, refs #8572 2026-05-31 20:09:08 +05:30
Mrityunjay Raj
8db4f4a19a repoobj: add OBJ_MAGIC blob header for pack file format, refs #8572 2026-05-31 18:54:56 +05:30
Thomas Waldmann
e328b85aee
keyfile: name key files by sha256(keyfile_contents)
When borg auto-selects the key file path (no BORG_KEY_FILE override),
the keyfile is now named sha256(file_contents).hexdigest() instead of
a location-derived name with optional .2/.3/... collision suffixes.

- On key change-passphrase, the old keyfile is securely erased and the
  new file is written under its new hash-based name.
- borg key import likewise uses the hash-based name.
- Existing legacy-named keyfiles continue to work: _find_key_in_keys_dir
  scans by file content, not filename.
- BORG_KEY_FILE still honors the explicit path verbatim.

Removes test_repo_create_keyfile_same_path_creates_new_keys which
tested the now-removed .N collision-suffix behavior.
2026-05-31 14:45:47 +02:00
TW
4f90df660a
Merge pull request #9689 from ThomasWaldmann/pack-files-decouple-legacy-tests2
legacy repo tests: always format and parse chunk
2026-05-31 05:59:53 +02:00
Thomas Waldmann
7815e020ec
legacy repo tests: always format and parse chunk 2026-05-31 05:28:36 +02:00
TW
28a620b44f
Merge pull request #9686 from mr-raj12/testsuite-legacy-crypto-key
testsuite: add Pbkdf2FileMixin unit tests, refs #9556
2026-05-31 05:09:20 +02:00
TW
f92328171a
Merge pull request #9687 from mr-raj12/pack-files-decouple-legacy-tests
testsuite: decouple legacyrepository_test from RepoObj, refs #8572
2026-05-31 05:07:38 +02:00
Mrityunjay Raj
fb5ad53f59 testsuite: add Pbkdf2FileMixin unit tests, refs #9556 2026-05-31 02:37:20 +05:30
Mrityunjay Raj
a0494b29f4 testsuite: use 1-byte ctype header in legacyrepository_test fchunk/pchunk, refs #8572 2026-05-31 02:26:01 +05:30
Mrityunjay Raj
e017212de2 testsuite: decouple legacyrepository_test from RepoObj, refs #8572 2026-05-30 23:16:45 +05:30
TW
910f223e59
Merge pull request #9677 from mr-raj12/pack-files-step1-remove-xxh64
repoobj: remove xxh64 checksums from blob header
2026-05-30 17:58:39 +02:00