Skip to content

legacy: use borg 1.x keys dir for v1 repos#9831

Merged
ThomasWaldmann merged 1 commit into
borgbackup:masterfrom
mr-raj12:legacy-keys-dir-macos-master
Jun 30, 2026
Merged

legacy: use borg 1.x keys dir for v1 repos#9831
ThomasWaldmann merged 1 commit into
borgbackup:masterfrom
mr-raj12:legacy-keys-dir-macos-master

Conversation

@mr-raj12

@mr-raj12 mr-raj12 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Description

Keyfile lookup always used the borg2 keys dir. On macOS that path (~/Library/Application Support/borg/keys) differs from the borg 1.x one (~/.config/borg/keys), so keyfiles of v1 repos were not found.

_keys_dir() now returns the borg 1.x keys dir when repository.version == 1, the same way security._security_dir picks the security dir. Both keyfile lookup paths use it. New key creation stays on the borg2 dir.

Part of #9556.

Checklist

  • PR is against master
  • New code has tests and docs where appropriate
  • Tests pass (relevant crypto/key and fs subsets)
  • Commit messages are clean and reference related issues

keyfile lookup always used the borg2 keys dir; on macOS that path differs
from borg 1.x, so v1 repo keyfiles were not found.
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.12%. Comparing base (3b3a647) to head (46642da).
⚠️ Report is 5 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9831      +/-   ##
==========================================
- Coverage   85.19%   85.12%   -0.07%     
==========================================
  Files          92       93       +1     
  Lines       15303    15345      +42     
  Branches     2300     2307       +7     
==========================================
+ Hits        13037    13063      +26     
- Misses       1578     1587       +9     
- Partials      688      695       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@ThomasWaldmann ThomasWaldmann merged commit 68455a3 into borgbackup:master Jun 30, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants