Skip to content

Commit 6eb50bc

Browse files
authored
Merge pull request #46 from sylabs/master
Merge master to release-3.8
2 parents 5ffcbc5 + 01e41c5 commit 6eb50bc

File tree

20 files changed

+2940
-698
lines changed

20 files changed

+2940
-698
lines changed

.circleci/config.yml

Lines changed: 176 additions & 200 deletions
Large diffs are not rendered by default.

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ linters:
1212
- gosimple
1313
- govet
1414
- ineffassign
15-
- maligned
1615
- misspell
1716
- nakedret
1817
# we would like to add these

INSTALL.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,18 @@ $ echo 'export GOPATH=${HOME}/go' >> ~/.bashrc && \
5959

6060
This is an optional (but highly recommended!) step. To ensure
6161
consistency and to catch certain kinds of issues early, we provide a
62-
configuration file for golangci-lint. Every pull request must pass the
62+
configuration file for `golangci-lint`. Every pull request must pass the
6363
checks specified there, and these will be run automatically before
6464
attempting to merge the code. If you are modifying Singularity and
6565
contributing your changes to the repository, it's faster to run these
6666
checks locally before uploading your pull request.
6767

68-
In order to install golangci-lint, you can run:
68+
In order to download and install the latest version of `golangci-lint`,
69+
you can run:
6970

71+
```sh
72+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
7073
```
71-
$ curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh |
72-
sh -s -- -b $(go env GOPATH)/bin v1.31.0
73-
```
74-
75-
This will download and install golangci-lint from its Github releases
76-
page (using version v1.31.0 at the moment).
7774

7875
## Clone the repo
7976

cmd/internal/cli/build.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,15 +343,15 @@ func checkBuildTarget(path string) error {
343343
}
344344
if !buildArgs.update && !forceOverwrite {
345345

346-
question := fmt.Sprintf("Build target '%s' already exists and will be deleted during the build process. Do you want to continue? [N/y]", f.Name())
346+
question := fmt.Sprintf("Build target '%s' already exists and will be deleted during the build process. Do you want to continue? [N/y] ", f.Name())
347347

348348
img, err := image.Init(abspath, false)
349349
if err != nil {
350350
if err != image.ErrUnknownFormat {
351351
return fmt.Errorf("while determining '%s' format: %s", f.Name(), err)
352352
}
353353
// unknown image file format
354-
question = fmt.Sprintf("Build target '%s' may be a definition file or a text/binary file that will be overwritten. Do you still want to overwrite it? [N/y]", f.Name())
354+
question = fmt.Sprintf("Build target '%s' may be a definition file or a text/binary file that will be overwritten. Do you still want to overwrite it? [N/y] ", f.Name())
355355
} else {
356356
img.File.Close()
357357
}

e2e/internal/e2e/dockerhub_auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"path/filepath"
1212
"testing"
1313

14-
auth "github.com/deislabs/oras/pkg/auth/docker"
14+
auth "github.com/oras-project/oras-go/pkg/auth/docker"
1515
"github.com/sylabs/singularity/internal/pkg/util/user"
1616
"github.com/sylabs/singularity/pkg/syfs"
1717
)

e2e/internal/e2e/priv_linux.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2019,2020 Sylabs Inc. All rights reserved.
1+
// Copyright (c) 2019-2021 Sylabs Inc. All rights reserved.
22
// This software is licensed under a 3-clause BSD license. Please consult the
33
// LICENSE.md file distributed with the sources of this project regarding your
44
// rights to use or distribute this software.
@@ -7,10 +7,10 @@ package e2e
77

88
import (
99
"runtime"
10-
"syscall"
1110
"testing"
1211

1312
"github.com/pkg/errors"
13+
"golang.org/x/sys/unix"
1414
)
1515

1616
// Privileged wraps the supplied test function with calls to ensure
@@ -21,21 +21,21 @@ func Privileged(f func(*testing.T)) func(*testing.T) {
2121

2222
runtime.LockOSThread()
2323

24-
if err := syscall.Setresuid(0, 0, origUID); err != nil {
24+
if err := unix.Setresuid(0, 0, origUID); err != nil {
2525
err = errors.Wrap(err, "changing user ID to 0")
2626
t.Fatalf("privileges escalation failed: %+v", err)
2727
}
28-
if err := syscall.Setresgid(0, 0, origGID); err != nil {
28+
if err := unix.Setresgid(0, 0, origGID); err != nil {
2929
err = errors.Wrap(err, "changing group ID to 0")
3030
t.Fatalf("privileges escalation failed: %+v", err)
3131
}
3232

3333
defer func() {
34-
if err := syscall.Setresgid(origGID, origGID, 0); err != nil {
34+
if err := unix.Setresgid(origGID, origGID, 0); err != nil {
3535
err = errors.Wrapf(err, "changing group ID to %d", origUID)
3636
t.Fatalf("privileges drop failed: %+v", err)
3737
}
38-
if err := syscall.Setresuid(origUID, origUID, 0); err != nil {
38+
if err := unix.Setresuid(origUID, origUID, 0); err != nil {
3939
err = errors.Wrapf(err, "changing group ID to %d", origGID)
4040
t.Fatalf("privileges drop failed: %+v", err)
4141
}

e2e/pull/pull.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ import (
1717

1818
"github.com/containerd/containerd/reference"
1919
"github.com/containerd/containerd/remotes/docker"
20-
"github.com/deislabs/oras/pkg/content"
21-
"github.com/deislabs/oras/pkg/context"
22-
"github.com/deislabs/oras/pkg/oras"
2320
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
21+
"github.com/oras-project/oras-go/pkg/content"
22+
"github.com/oras-project/oras-go/pkg/context"
23+
"github.com/oras-project/oras-go/pkg/oras"
2424
"github.com/pkg/errors"
2525
"github.com/sylabs/singularity/e2e/internal/e2e"
2626
"github.com/sylabs/singularity/e2e/internal/testhelper"

examples/plugins/cli-plugin/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/sylabs/singularity/cli-example-plugin
33
go 1.13
44

55
require (
6-
github.com/spf13/cobra v1.0.0
6+
github.com/spf13/cobra v1.1.3
77
github.com/sylabs/singularity v0.0.0
88
)
99

0 commit comments

Comments
 (0)