Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge sylabs/sif through v2.13.0 #202

Merged
merged 4 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading