Commit Graph

2799 Commits

Author SHA1 Message Date
Michael Eischer 28521d27c1 Merge pull request #21897 from MichaelEischer/sftp-fix-chmod
backend/sftp: fix removing files on windows sftp
2026-06-20 19:29:49 +02:00
Michael Eischer 9ab5fc59c2 restic: split FileType for backend.FileType
Equality of constants is enforced via internal/repository/filetype.go
using compile time checks.
2026-06-20 19:15:40 +02:00
Michael Eischer 6c509f7ac1 Correctly pair backend/restic.FileType with APIs
Use backend.FileType to interact with the backend. And restic.FileType
to interact with the repository.
2026-06-20 19:15:40 +02:00
Michael Eischer ea699bb0ba backend/rest: fix flaky test cleanup (#21901) 2026-06-20 19:14:54 +02:00
Michael Eischer 532f36a5a8 archiver: pass ItemAction to progress reporter instead of data.Node (#21886) 2026-06-20 19:06:45 +02:00
Michael Eischer 2f31cde517 internal/restorer: invert dependency direction to ui/restorer
The restorer imported ui/restorer which leaks ui logic into the restorer
core. Swap the direction by letting the restorer use a ProgressReporter
interface + associated constants.
2026-06-20 17:49:20 +02:00
Michael Eischer 5cd39d01c1 internal/data: extract HardlinkIndex from restorer
The HardlinkIndex is also used by `cmd_stats`, thus place it in a shared
package.
2026-06-20 17:49:20 +02:00
Michael Eischer d9d54a505e restic: move Printer interface from internal/ui/progress
Move Printer and NewNoopPrinter to internal/restic so repository does
not have to import the ui packages.
2026-06-20 17:49:20 +02:00
Michael Eischer 0f4236cb39 repository: return unlock func from LockRepo
Drop the Unlocker interface and return the unlock callback directly
from LockRepo, simplifying callers that only need to defer unlock().
2026-06-20 17:48:35 +02:00
Michael Eischer 4d1b9cef63 internal/fileio: extract low-level file I/O from internal/fs
Move TempFile and PreallocateFile into internal/fileio. internal/fs
primarily focuses on converting between data.Node and the actual
filesystem state. Extract the two methods to not pull in unnecessary
dependencies.
2026-06-20 17:48:35 +02:00
Michael Eischer 980f194360 fs: print missing error if xattr cannot be read (#21896) 2026-06-20 17:11:16 +02:00
Michael Eischer 203e595ccb backend/sftp: fix removing files on windows sftp 2026-06-19 23:23:01 +02:00
Michael Eischer 6c67a095dc backend/sftp: fix error reporting of Save method 2026-06-19 23:09:59 +02:00
Michael Eischer 1a9decf03e repository: show correct error if zstd decoder cannot be initialized 2026-06-14 16:52:40 +02:00
Michael Eischer 718f09e02d selfupdate: improve error handling 2026-06-14 16:51:56 +02:00
Michael Eischer 82708ff7f7 prune/repair pack: document ignored errors 2026-06-14 16:51:56 +02:00
Michael Eischer 18c47c5bf9 backend/util: fix errorhandling in DefaultDelete test helper 2026-06-14 16:40:09 +02:00
Michael Eischer faea0d677a backend/sftp: fix file handle leak if chmod for a file fails 2026-06-14 16:39:42 +02:00
Michael Eischer ae8fdb08fa backend/rest: correctly close body on out of bounds read 2026-06-14 16:38:54 +02:00
Michael Eischer 5c8c048c1a backend/b2: correctly close file if too short 2026-06-14 16:38:21 +02:00
Michael Eischer 7d36449ea8 repository: change LoadBlob, LookupBlob and LookupBlobSize to BlobHandles (#21857) 2026-06-14 15:30:00 +02:00
Michael Eischer 71f38d266c ensure reliable cleanup of test repository (#21880) 2026-06-14 14:25:00 +02:00
Michael Eischer 650f658244 repository/index: ensure progress bar cancelation on early index load failure (#21881) 2026-06-14 13:56:24 +02:00
Michael Eischer 406dec29a7 repository: remove redundant mutex in checkForOtherLocks
forAllLocks already serializes the callback calls. Still has to create a
copy of checkedIDs to prevent a data race between forAllLocks and the
callback.
2026-06-13 21:37:24 +02:00
Michael Eischer 6fe10a72eb repository: drop mutex from lockHandle 2026-06-13 21:37:06 +02:00
Michael Eischer 1a6d43286a repository: comment cleanups 2026-06-13 21:36:36 +02:00
Michael Eischer 151903d4d4 repository: fix goroutine leak due to delayedCancelContext in tests 2026-06-13 21:35:51 +02:00
Michael Eischer b86568b790 repository: merge Unlocker and lockContext 2026-06-13 21:35:41 +02:00
Michael Eischer a5f3256626 repository: partially deduplicate refresh and refreshStaleLock 2026-06-13 21:33:58 +02:00
Michael Eischer 5989671f87 repository: deduplicate error handling in checkForOtherLocks 2026-06-13 21:33:43 +02:00
Michael Eischer b7f3a1367a repository: add SIGHUP handler only on Unix systems 2026-06-13 21:33:27 +02:00
Michael Eischer 4838b0ae3e repository: cleanup naming of lockCtx 2026-06-13 21:33:19 +02:00
Michael Eischer c87da70af9 repository: separate Lock in-repository from lock handle
Reduce Lock to a pure data transfer object and move the logic to
lockHandle.
2026-06-13 21:33:03 +02:00
Michael Eischer 81b6414c55 repository: hide Lock methods
Unexport lock file methods except String. Lock file operations are only
used within the repository package.
2026-06-13 21:32:13 +02:00
Michael Eischer 637c1cfb66 repository: unexport internal lock file helpers
Unexport UnlockCancelDelay, IsInvalidLock, ErrRemovedLock, NewLock,
StaleLockTimeout and ForAllLocks
2026-06-13 21:31:27 +02:00
Michael Eischer b892b1a150 repository: move lock file handling from restic package 2026-06-13 21:31:23 +02:00
Michael Eischer 7015da44ad restic: extract UidGidInt into separate files
Extract UidGidInt to simplify moving the locking code to the repository.
2026-06-13 21:24:38 +02:00
Michael Eischer 3ee465d363 repository: rename Lock function to LockRepo
Rename `Lock()` to `LockRepo()` to make room for the `Lock` struct.
2026-06-13 21:24:37 +02:00
Michael Eischer 8e11f5747d restic: introduce Counter interface to decouple from ui/progress (#21861)
decouple restic and ui/progress packages
2026-06-13 21:08:18 +02:00
Michael Eischer c8a0bc2c5e repository: move crypto package to internal/repository/crypto 2026-06-13 20:05:06 +02:00
Michael Eischer 35e60dc2c7 restic: remove Key() from repository interface
All callers use the concrete Repository type
2026-06-13 20:05:06 +02:00
Michael Eischer 8e93172bf8 cache: remove dependency on crypto package for truncation checks
The cache backend + repository can by now properly recover from damaged
files stored in the cache. Thus, remove the legacy sanity check.
2026-06-13 20:05:05 +02:00
Michael Eischer b94ef4831d repository: add PackBlob.UncompressedCiphertextLength() 2026-06-13 20:05:05 +02:00
Michael Eischer 3eb5f83db3 fs: more vss related unexports 2026-06-13 19:54:32 +02:00
Michael Eischer d3ef21f870 archiver: unexport BackupTarget type 2026-06-13 19:54:12 +02:00
Michael Eischer 31df7508c4 archiver: unexport Options.ApplyDefaults 2026-06-13 19:53:51 +02:00
Michael Eischer 87c9ed4573 archiver: unexport toNoder 2026-06-13 19:53:31 +02:00
Michael Eischer eedba12968 bloblru: unexport add and get 2026-06-13 19:53:13 +02:00
Michael Eischer 264cfbcff2 data: remove unused Nodes type 2026-06-13 19:52:49 +02:00
Michael Eischer 7f3c9eb749 data: unexport fixTime 2026-06-13 19:52:27 +02:00