Merge pull request #4532 from MichaelEischer/update-zstd

Update klauspost/compress to fix data corruption at maximum compression
This commit is contained in:
Michael Eischer 2023-10-23 18:45:35 +02:00 committed by GitHub
commit 4b4f916bdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 9 deletions

View File

@ -54,11 +54,6 @@ jobs:
os: ubuntu-latest
test_fuse: true
- job_name: Linux
go: 1.18.x
os: ubuntu-latest
test_fuse: true
name: ${{ matrix.job_name }} Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}

View File

@ -0,0 +1,17 @@
Bugfix: Update zstd library to fix possible data corruption at max. compression
In restic 0.16.0, backups using maximum compression could result in data
corruption due to a bug in the library used for compressing data. Please note
that the "auto" compression level (used by default) is not affected!
To check a repository for data corruption, run `restic check --read-data`. This
will download and verify the whole repository. If the `check` command detects
data corruption, follow the suggested steps. To simplify the repository repair
and minimize data loss, we've also added an experimental `repair packs` command
that salvages all valid data from the affected pack files.
Restic now uses the latest version of the library used to compress data, which
includes a fix for the data corruption issue.
https://github.com/restic/restic/issues/4523
https://github.com/restic/restic/pull/4530

View File

@ -0,0 +1,6 @@
Change: Require Go 1.19 or newer
Since some libraries require newer library features, support for Go 1.18 has
been dropped, which means that restic now requires at least Go 1.19 to build.
https://github.com/restic/restic/pull/4532

4
go.mod
View File

@ -13,7 +13,7 @@ require (
github.com/go-ole/go-ole v1.3.0
github.com/google/go-cmp v0.5.9
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/klauspost/compress v1.16.7
github.com/klauspost/compress v1.17.2
github.com/minio/minio-go/v7 v7.0.61
github.com/minio/sha256-simd v1.0.1
github.com/ncw/swift/v2 v2.0.2
@ -79,4 +79,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)
go 1.18
go 1.19

4
go.sum
View File

@ -122,8 +122,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I=
github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4=
github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=