Skip to content

Commit

Permalink
Merge pull request #202 from DrDaveD/sylabsv2.13.0
Browse files Browse the repository at this point in the history
Merge sylabs/sif through v2.13.0
  • Loading branch information
DrDaveD authored Sep 4, 2023
2 parents 4307263 + 4639822 commit b2c55f5
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: '1.20.x'
go-version: '1.21.x'

- name: Check go.mod and go.sum are tidy
run: |
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Install Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.53
version: v1.54
skip-pkg-cache: true
skip-build-cache: true

Expand Down
4 changes: 0 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,5 @@ linters:
- whitespace

linters-settings:
errorlint:
# Go 1.19 compatibility (https://github.com/sylabs/sif/issues/265).
errorf-multi: false

misspell:
locale: US
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/apptainer/sif/v2

go 1.19
go 1.20

require (
github.com/ProtonMail/go-crypto v0.0.0-20230710112148-e01326fd72eb
github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95
github.com/google/go-containerregistry v0.16.1
github.com/google/uuid v1.3.1
github.com/sebdah/goldie/v2 v2.5.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/ProtonMail/go-crypto v0.0.0-20230710112148-e01326fd72eb h1:RU+Ff2vE68zFQSoBqlb/LChFztEWWJ9EZ8LU4gA3ubU=
github.com/ProtonMail/go-crypto v0.0.0-20230710112148-e01326fd72eb/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 h1:KLq8BE0KwCL+mmXnjLWEAOYO+2l2AE4YMmqG1ZpZHBs=
github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
Expand Down
4 changes: 2 additions & 2 deletions pkg/integrity/digest.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (d digest) MarshalJSON() ([]byte, error) {
func (d *digest) UnmarshalJSON(data []byte) error {
var s string
if err := json.Unmarshal(data, &s); err != nil {
return fmt.Errorf("%w: %v", errDigestMalformed, err)
return fmt.Errorf("%w: %w", errDigestMalformed, err)
}

parts := strings.Split(s, ":")
Expand All @@ -133,7 +133,7 @@ func (d *digest) UnmarshalJSON(data []byte) error {

v, err := hex.DecodeString(value)
if err != nil {
return fmt.Errorf("%w: %v", errDigestMalformed, err)
return fmt.Errorf("%w: %w", errDigestMalformed, err)
}

for h, n := range supportedDigestAlgorithms {
Expand Down
2 changes: 1 addition & 1 deletion pkg/integrity/dsse.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (de *dsseDecoder) verifyMessage(ctx context.Context, r io.Reader, h crypto.

vr.aks, err = v.Verify(ctx, &e)
if err != nil {
return nil, fmt.Errorf("%w: %v", errDSSEVerifyEnvelopeFailed, err)
return nil, fmt.Errorf("%w: %w", errDSSEVerifyEnvelopeFailed, err)
}

if e.PayloadType != de.payloadType {
Expand Down
4 changes: 1 addition & 3 deletions pkg/integrity/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Apptainer a Series of LF Projects LLC.
// For website terms of use, trademark policy, privacy policy and other
// project policies see https://lfprojects.org/policies
// Copyright (c) 2020-2021, Sylabs Inc. All rights reserved.
// Copyright (c) 2020-2023, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the LICENSE.md file
// distributed with the sources of this project regarding your rights to use or distribute this
// software.
Expand Down Expand Up @@ -44,7 +44,6 @@ func (e *DescriptorIntegrityError) Error() string {
// Is compares e against target. If target is a DescriptorIntegrityError and matches e or target
// has a zero value ID, true is returned.
func (e *DescriptorIntegrityError) Is(target error) bool {
//nolint:errorlint // don't compare wrapped errors in Is()
t, ok := target.(*DescriptorIntegrityError)
if !ok {
return false
Expand All @@ -67,7 +66,6 @@ func (e *ObjectIntegrityError) Error() string {
// Is compares e against target. If target is a ObjectIntegrityError and matches e or target has a
// zero value ID, true is returned.
func (e *ObjectIntegrityError) Is(target error) bool {
//nolint:errorlint // don't compare wrapped errors in Is()
t, ok := target.(*ObjectIntegrityError)
if !ok {
return false
Expand Down
3 changes: 1 addition & 2 deletions pkg/integrity/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Apptainer a Series of LF Projects LLC.
// For website terms of use, trademark policy, privacy policy and other
// project policies see https://lfprojects.org/policies
// Copyright (c) 2020-2022, Sylabs Inc. All rights reserved.
// Copyright (c) 2020-2023, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the LICENSE.md file
// distributed with the sources of this project regarding your rights to use or distribute this
// software.
Expand Down Expand Up @@ -72,7 +72,6 @@ func (e *SignatureNotFoundError) Error() string {
// Is compares e against target. If target is a SignatureNotFoundError and matches e or target has
// a zero value ID, true is returned.
func (e *SignatureNotFoundError) Is(target error) bool {
//nolint:errorlint // don't compare wrapped errors in Is()
t, ok := target.(*SignatureNotFoundError)
if !ok {
return false
Expand Down
1 change: 0 additions & 1 deletion pkg/integrity/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ func (e *SignatureNotValidError) Unwrap() error {
// Is compares e against target. If target is a SignatureNotValidError and matches e or target has
// a zero value ID, true is returned.
func (e *SignatureNotValidError) Is(target error) bool {
//nolint:errorlint // don't compare wrapped errors in Is()
t, ok := target.(*SignatureNotValidError)
if !ok {
return false
Expand Down
1 change: 0 additions & 1 deletion pkg/sif/descriptor_input.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ func (e *unexpectedDataTypeError) Error() string {
}

func (e *unexpectedDataTypeError) Is(target error) bool {
//nolint:errorlint // don't compare wrapped errors in Is()
t, ok := target.(*unexpectedDataTypeError)
if !ok {
return false
Expand Down

0 comments on commit b2c55f5

Please sign in to comment.