Skip to content

Commit

Permalink
Merge pull request #281 from tri-adam/go1.17-master
Browse files Browse the repository at this point in the history
Bump to Go 1.17 (master)
  • Loading branch information
tri-adam authored Aug 27, 2021
2 parents 2b6b72e + 18a9c48 commit 4ead115
Show file tree
Hide file tree
Showing 38 changed files with 61 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ orbs:
parameters:
go-version:
type: string
default: 1.16.7
default: '1.17'

executors:
node:
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ _**NOTE:** if you are updating Go from a older version, make sure you remove
`/usr/local/go` before reinstalling it._

```sh
export VERSION=1.16.7 OS=linux ARCH=amd64 # change this as you need
export VERSION=1.17 OS=linux ARCH=amd64 # change this as you need

wget -O /tmp/go${VERSION}.${OS}-${ARCH}.tar.gz \
https://dl.google.com/go/go${VERSION}.${OS}-${ARCH}.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/cli/actions_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (

"github.com/spf13/cobra"
"github.com/sylabs/singularity/internal/pkg/buildcfg"
"github.com/sylabs/singularity/internal/pkg/image/unpacker"
"github.com/sylabs/singularity/internal/pkg/instance"
"github.com/sylabs/singularity/internal/pkg/plugin"
"github.com/sylabs/singularity/internal/pkg/runtime/engine/config/oci"
Expand All @@ -31,7 +32,6 @@ import (
"github.com/sylabs/singularity/internal/pkg/util/starter"
"github.com/sylabs/singularity/internal/pkg/util/user"
imgutil "github.com/sylabs/singularity/pkg/image"
"github.com/sylabs/singularity/pkg/image/unpacker"
clicallback "github.com/sylabs/singularity/pkg/plugin/callback/cli"
singularitycallback "github.com/sylabs/singularity/pkg/plugin/callback/runtime/engine/singularity"
"github.com/sylabs/singularity/pkg/runtime/engine/config"
Expand Down
3 changes: 2 additions & 1 deletion cmd/starter/engines/fakeroot_linux.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (c) 2019, Sylabs Inc. All rights reserved.
// Copyright (c) 2019-2021, 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.

//go:build fakeroot_engine
// +build fakeroot_engine

package engines
Expand Down
3 changes: 2 additions & 1 deletion cmd/starter/engines/oci_linux.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (c) 2019, Sylabs Inc. All rights reserved.
// Copyright (c) 2019-2021, 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.

//go:build oci_engine
// +build oci_engine

package engines
Expand Down
3 changes: 2 additions & 1 deletion cmd/starter/engines/singularity_linux.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (c) 2019, Sylabs Inc. All rights reserved.
// Copyright (c) 2019-2021, 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.

//go:build singularity_engine
// +build singularity_engine

package engines
Expand Down
3 changes: 2 additions & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (c) 2019, Sylabs Inc. All rights reserved.
// Copyright (c) 2019-2021, 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.

//go:build e2e_test
// +build e2e_test

package e2e
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/build/assemblers/sif.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (

uuid "github.com/satori/go.uuid"
"github.com/sylabs/sif/pkg/sif"
"github.com/sylabs/singularity/internal/pkg/image/packer"
"github.com/sylabs/singularity/internal/pkg/util/crypt"
"github.com/sylabs/singularity/internal/pkg/util/machine"
"github.com/sylabs/singularity/pkg/build/types"
"github.com/sylabs/singularity/pkg/image/packer"
"github.com/sylabs/singularity/pkg/sylog"
"github.com/sylabs/singularity/pkg/util/cryptkey"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
"github.com/sylabs/singularity/internal/pkg/build/apps"
"github.com/sylabs/singularity/internal/pkg/build/assemblers"
"github.com/sylabs/singularity/internal/pkg/build/sources"
"github.com/sylabs/singularity/internal/pkg/image/packer"
"github.com/sylabs/singularity/internal/pkg/util/fs/squashfs"
"github.com/sylabs/singularity/internal/pkg/util/uri"
"github.com/sylabs/singularity/pkg/build/types"
"github.com/sylabs/singularity/pkg/build/types/parser"
"github.com/sylabs/singularity/pkg/image"
"github.com/sylabs/singularity/pkg/image/packer"
"github.com/sylabs/singularity/pkg/sylog"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/build/sources/packer_sif.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"fmt"
"io/ioutil"

"github.com/sylabs/singularity/internal/pkg/image/unpacker"
"github.com/sylabs/singularity/pkg/build/types"
"github.com/sylabs/singularity/pkg/image"
"github.com/sylabs/singularity/pkg/image/unpacker"
"github.com/sylabs/singularity/pkg/sylog"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/build/sources/packer_squashfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"context"
"fmt"

"github.com/sylabs/singularity/internal/pkg/image/unpacker"
"github.com/sylabs/singularity/pkg/build/types"
"github.com/sylabs/singularity/pkg/image"
"github.com/sylabs/singularity/pkg/image/unpacker"
)

// SquashfsPacker holds the locations of where to pack from and to, aswell as image offset info
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Copyright (c) 2021, Sylabs Inc. All rights reserved.
// Copyright (c) 2020, Control Command 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.

//go:build !singularity_engine
// +build !singularity_engine

package unpacker
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Copyright (c) 2020-2021, Sylabs Inc. All rights reserved.
// Copyright (c) 2020, Control Command 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.

//go:build singularity_engine
// +build singularity_engine

package unpacker
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion internal/pkg/runtime/engine/singularity/plugins_linux.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019, Sylabs Inc. All rights reserved.
// Copyright (c) 2019-2021, 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 All @@ -10,6 +10,7 @@
// If you need to add a new plugin, simply add it to this import list.
// The build system will pick it up from here.

//go:build cni_plugins
// +build cni_plugins

package singularity
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/security/apparmor/apparmor_supported.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// LICENSE.md file distributed with the sources of this project regarding your
// rights to use or distribute this software.

//go:build apparmor
// +build apparmor

package apparmor
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/security/apparmor/apparmor_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// LICENSE.md file distributed with the sources of this project regarding your
// rights to use or distribute this software.

//go:build !apparmor
// +build !apparmor

package apparmor
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/security/seccomp/seccomp_supported.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// LICENSE.md file distributed with the sources of this project regarding your
// rights to use or distribute this software.

//go:build seccomp
// +build seccomp

package seccomp
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/security/seccomp/seccomp_supported_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// LICENSE.md file distributed with the sources of this project regarding your
// rights to use or distribute this software.

//go:build seccomp
// +build seccomp

package seccomp
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/security/seccomp/seccomp_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// LICENSE.md file distributed with the sources of this project regarding your
// rights to use or distribute this software.

//go:build !seccomp
// +build !seccomp

package seccomp
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/security/selinux/selinux_supported.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// LICENSE.md file distributed with the sources of this project regarding your
// rights to use or distribute this software.

//go:build selinux
// +build selinux

package selinux
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/security/selinux/selinux_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// LICENSE.md file distributed with the sources of this project regarding your
// rights to use or distribute this software.

//go:build !selinux
// +build !selinux

package selinux
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/util/goversion/goversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// LICENSE.md file distributed with the sources of this project regarding your
// rights to use or distribute this software.

//go:build go1.13
// +build go1.13

package goversion
Expand Down
3 changes: 2 additions & 1 deletion internal/pkg/util/gpu/paths_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (c) 2020, Sylabs Inc. All rights reserved.
// Copyright (c) 2020-2021, 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.

//go:build linux
// +build linux

package gpu
Expand Down
6 changes: 4 additions & 2 deletions internal/pkg/util/user/cgo_lookup_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build (aix || darwin || dragonfly || freebsd || (!android && linux) || netbsd || openbsd || solaris) && cgo && !osusergo
// +build aix darwin dragonfly freebsd !android,linux netbsd openbsd solaris
// +build cgo,!osusergo
// +build cgo
// +build !osusergo

// Copyright (c) 2019, Sylabs Inc. All rights reserved.
// Copyright (c) 2019-2021, 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
2 changes: 1 addition & 1 deletion pkg/image/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/sylabs/singularity/internal/pkg/util/fs"

imageSpecs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/sylabs/singularity/pkg/image/unpacker"
"github.com/sylabs/singularity/internal/pkg/image/unpacker"
)

// We need a busybox SIF for these tests. We used to download it each time, but we have one
Expand Down
3 changes: 2 additions & 1 deletion pkg/network/network_linux_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (c) 2019, Sylabs Inc. All rights reserved.
// Copyright (c) 2019-2021, 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.

//go:build integration_test
// +build integration_test

package network
Expand Down
1 change: 1 addition & 0 deletions pkg/sylog/sylog.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// LICENSE.md file distributed with the sources of this project regarding your
// rights to use or distribute this software.

//go:build sylog
// +build sylog

package sylog
Expand Down
3 changes: 2 additions & 1 deletion pkg/sylog/sylog_dummy.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (c) 2019-2020, Sylabs Inc. All rights reserved.
// Copyright (c) 2019-2021, 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.

//go:build !sylog
// +build !sylog

package sylog
Expand Down
3 changes: 2 additions & 1 deletion pkg/sylog/sylog_dummy_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (c) 2019, Sylabs Inc. All rights reserved.
// Copyright (c) 2019-2021, 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.

//go:build !sylog
// +build !sylog

package sylog
Expand Down
3 changes: 2 additions & 1 deletion pkg/sylog/sylog_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (c) 2018-2020, Sylabs Inc. All rights reserved.
// Copyright (c) 2018-2021, 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.

//go:build sylog
// +build sylog

package sylog
Expand Down
3 changes: 2 additions & 1 deletion pkg/util/fs/lock/var_linux_32bit.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (c) 2019, Sylabs Inc. All rights reserved.
// Copyright (c) 2019-2021, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
// LICENSE file distributed with the sources of this project regarding your
// rights to use or distribute this software.

//go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle)
// +build linux,386 linux,arm linux,mips linux,mipsle

package lock
Expand Down
6 changes: 6 additions & 0 deletions pkg/util/loop/loop_no_singularity.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2021, 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.

//go:build !singularity_engine
// +build !singularity_engine

package loop
Expand Down
6 changes: 6 additions & 0 deletions pkg/util/loop/loop_singularity.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2021, 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.

//go:build singularity_engine
// +build singularity_engine

package loop
Expand Down
3 changes: 2 additions & 1 deletion pkg/util/namespaces/setns_linux.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (c) 2018, Sylabs Inc. All rights reserved.
// Copyright (c) 2018-2021, 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.

//go:build go1.10
// +build go1.10

package namespaces
Expand Down

0 comments on commit 4ead115

Please sign in to comment.