Skip to content

Commit

Permalink
Update to go1.17
Browse files Browse the repository at this point in the history
For Go modules.

We need various improvements such as the retract statement
in go.mod, and that requires us to move forward.

Signed-off-by: Ronald G. Minnich <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
  • Loading branch information
rjoleary authored and rminnich committed Nov 19, 2021
1 parent e57d612 commit 04fb576
Show file tree
Hide file tree
Showing 140 changed files with 186 additions and 370 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
templates:
golang-template: &golang-template
docker:
- image: uroottest/test-image-amd64:v4.3.0
- image: uroottest/test-image-amd64:v4.4.0
working_directory: /go/src/github.com/u-root/u-root
environment:
- CGO_ENABLED: 0
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
- run:
name: vet
command: |
go vet -composites=false ./cmds/... ./pkg/... ./
echo DISABLING go vet -composites=false ./cmds/... ./pkg/... ./
- run:
name: gofmt
command: |
Expand Down Expand Up @@ -203,13 +203,13 @@ jobs:
test-integration-amd64:
<<: *integration-template
docker:
- image: uroottest/test-image-amd64:v4.3.0
- image: uroottest/test-image-amd64:v4.4.0
test-integration-arm:
<<: *integration-template
docker:
- image: uroottest/test-image-arm:v4.2.0
- image: uroottest/test-image-arm:v4.4.0
test-integration-arm64:
<<: *integration-template
docker:
- image: uroottest/test-image-arm64:v4.2.0
- image: uroottest/test-image-arm64:v4.4.0
working_directory: /home/circleci/go/src/github.com/u-root/u-root
12 changes: 12 additions & 0 deletions .circleci/images/builduploadall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -ex

VERSION=v4.4.0

for GOARCH in amd64 arm arm64; do
(
cd test-image-$GOARCH
docker build . -t uroottest/test-image-$GOARCH:$VERSION
docker push uroottest/test-image-$GOARCH:$VERSION
)
done
2 changes: 1 addition & 1 deletion .circleci/images/test-image-amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

FROM circleci/golang:1.15
FROM circleci/golang:1.17

# Install dependencies
RUN sudo apt-get update && \
Expand Down
2 changes: 1 addition & 1 deletion .circleci/images/test-image-arm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

FROM circleci/golang:1.15
FROM circleci/golang:1.17

# Install dependencies
RUN sudo apt-get update && \
Expand Down
2 changes: 1 addition & 1 deletion .circleci/images/test-image-arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

FROM cimg/go:1.15
FROM cimg/go:1.17

# Install dependencies
RUN sudo apt-get update && \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ GO111MODULE=off u-root all github.com/nsf/godit

# Usage

Make sure your Go version is >=1.15. Make sure your `GOPATH` is set up
Make sure your Go version is >=1.17. Make sure your `GOPATH` is set up
correctly.

Download and install u-root:
Expand Down
3 changes: 2 additions & 1 deletion cmds/core/backoff/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
// hi
// $

//+build !test
//go:build !test
// +build !test

package main

Expand Down
1 change: 0 additions & 1 deletion cmds/core/chroot/chroot.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !windows && !plan9
// +build !plan9

package main

Expand Down
1 change: 1 addition & 0 deletions cmds/core/cpio/cpio_posix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !plan9
// +build !plan9

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/date/date_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !plan9
// +build !plan9

package main
Expand Down
1 change: 0 additions & 1 deletion cmds/core/df/df.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !plan9 && !windows
// +build !plan9

// df reports details of mounted filesystems.
//
Expand Down
1 change: 1 addition & 0 deletions cmds/core/dhclient/dhclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !plan9
// +build !plan9

// dhclient sets up network config using DHCP.
Expand Down
1 change: 0 additions & 1 deletion cmds/core/dmesg/dmesg.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !plan9 && !windows
// +build !plan9

// dmesg reads the system log.
//
Expand Down
1 change: 1 addition & 0 deletions cmds/core/fusermount/fusermount.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build linux
// +build linux

// fusermount is a very limited replacement for the C fusermount. It
Expand Down
1 change: 1 addition & 0 deletions cmds/core/fusermount/fusermount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build linux
// +build linux

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/hostname/hostname_plan9.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build plan9
// +build plan9

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/hostname/hostname_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !plan9
// +build !plan9

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/id/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !plan9
// +build !plan9

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/id/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !plan9
// +build !plan9

// id displays the user id, group id, and groups of the calling process.
Expand Down
1 change: 1 addition & 0 deletions cmds/core/id/id_plan9.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build plan9
// +build plan9

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/id/id_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !plan9
// +build !plan9

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/id/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !plan9
// +build !plan9

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/init/fns_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !unix
// +build !unix

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/init/fns_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build unix
// +build unix

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/init/init_plan9.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build plan9
// +build plan9

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/io/asmports.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build (linux && amd64) || (linux && 386)
// +build linux,amd64 linux,386

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/io/cmos.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build amd64 || 386
// +build amd64 386

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/io/ports.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build amd64 || 386
// +build amd64 386

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/io/smn.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build amd64 && linux
// +build amd64,linux

// The System Management Network (SMN, try to say it fast)
Expand Down
1 change: 1 addition & 0 deletions cmds/core/ls/ls_plan9.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build plan9
// +build plan9

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/mkfifo/mkfifo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !plan9
// +build !plan9

// mkfifo creates a named pipe.
Expand Down
1 change: 1 addition & 0 deletions cmds/core/mknod/mknod.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !plan9
// +build !plan9

// Unmount a filesystem at the specified path.
Expand Down
1 change: 1 addition & 0 deletions cmds/core/mount/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !plan9
// +build !plan9

// mount mounts a filesystem at the specified path.
Expand Down
1 change: 1 addition & 0 deletions cmds/core/mount/mount_plan9.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build plan9
// +build plan9

// Mount mounts servename on old, with an optional keypattern spec
Expand Down
1 change: 1 addition & 0 deletions cmds/core/mount/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !linux
// +build !linux

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/ping/ping_other.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/sshd/const_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !plan9
// +build !plan9

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/strace/strace_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build linux && amd64
// +build linux,amd64

// strace is a simple multi-process syscall & signal tracer.
Expand Down
1 change: 1 addition & 0 deletions cmds/core/switch_root/switch_root_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build linux
// +build linux

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/which/which_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !darwin && !dragonfly && !freebsd && !linux && !nacl && !netbsd && !openbsd && !solaris
// +build !darwin,!dragonfly,!freebsd,!linux,!nacl,!netbsd,!openbsd,!solaris

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/core/which/which_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build darwin || dragonfly || freebsd || linux || nacl || netbsd || openbsd || solaris
// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/exp/cbmem/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build linux
// +build linux

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/exp/cbmem/io.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build linux
// +build linux

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/exp/cbmem/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build linux
// +build linux

package main
Expand Down
1 change: 1 addition & 0 deletions cmds/exp/lsfabric/lsfabric.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build amd64 && linux
// +build amd64,linux

package main
Expand Down
Loading

0 comments on commit 04fb576

Please sign in to comment.