Skip to content

Commit

Permalink
Drop go 1.16
Browse files Browse the repository at this point in the history
Require go 1.17 from now on, since go 1.16 is no longer supported.
Drop go1.16 compatibility.

NOTE we also have to install go 1.18 from Vagrantfile, because
Fedora 35 comes with Go 1.16.x which can't be used.

Note the changes to go.mod and vendor are due to
https://go.dev/doc/go1.17#tools

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
  • Loading branch information
kolyshkin committed Mar 22, 2022
1 parent 5211cc3 commit a0f8847
Show file tree
Hide file tree
Showing 33 changed files with 38 additions and 223 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ task:
mkdir -p -m 0700 /root/.ssh
vagrant ssh-config >> /root/.ssh/config
guest_info_script: |
ssh default 'sh -exc "uname -a && systemctl --version && df -T && cat /etc/os-release"'
ssh default 'sh -exc "uname -a && systemctl --version && df -T && cat /etc/os-release && go version"'
unit_tests_script: |
ssh default 'sudo -i make -C /vagrant localunittest'
integration_systemd_script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.16.x, 1.17.x, 1.18.x]
go-version: [1.17.x, 1.18.x]
rootless: ["rootless", ""]
race: ["-race", ""]
criu: [""]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ A third party security audit was performed by Cure53, you can see the full repor

## Building

`runc` only supports Linux. It must be built with Go version 1.16 or higher.
`runc` only supports Linux. It must be built with Go version 1.17 or higher.

In order to enable seccomp support you will need to install `libseccomp` on your platform.
> e.g. `libseccomp-devel` for CentOS, or `libseccomp-dev` for Ubuntu
Expand Down
7 changes: 6 additions & 1 deletion Vagrantfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@ Vagrant.configure("2") do |config|
cat << EOF | dnf -y --exclude=kernel,kernel-core shell && break
config install_weak_deps false
update
install iptables gcc make golang-go glibc-static libseccomp-devel bats jq git-core criu fuse-sshfs
install iptables gcc make glibc-static libseccomp-devel bats jq git-core criu fuse-sshfs
ts run
EOF
done
dnf clean all
# Install golang.
# FIXME go back to golang-go rpm once switched to Fedora 36.
curl -fsSL https://go.dev/dl/go1.18.linux-amd64.tar.gz | tar Cxz /usr/local
echo 'export PATH=/usr/local/go/bin:$PATH' >> /etc/profile.d/golang.sh
# Add a user for rootless tests
useradd -u2000 -m -d/home/rootless -s/bin/bash rootless
Expand Down
9 changes: 8 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/opencontainers/runc

go 1.16
go 1.17

require (
github.com/checkpoint-restore/go-criu/v5 v5.3.0
Expand All @@ -24,3 +24,10 @@ require (
golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c
google.golang.org/protobuf v1.27.1
)

require (
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df // indirect
)
39 changes: 0 additions & 39 deletions libcontainer/devices/device_unix_go116_test.go

This file was deleted.

8 changes: 0 additions & 8 deletions libcontainer/devices/device_unix_go117_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion libcontainer/devices/device_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestHostDevicesIoutilReadDirDeepFailure(t *testing.T) {
t.Fatalf("Unexpected error %v", err)
}

return []fs.DirEntry{fileInfoToDirEntry(fi)}, nil
return []fs.DirEntry{fs.FileInfoToDirEntry(fi)}, nil
}
defer cleanupTest()

Expand Down
8 changes: 0 additions & 8 deletions vendor/github.com/checkpoint-restore/go-criu/v5/go.mod

This file was deleted.

10 changes: 0 additions & 10 deletions vendor/github.com/checkpoint-restore/go-criu/v5/go.sum

This file was deleted.

9 changes: 0 additions & 9 deletions vendor/github.com/cilium/ebpf/go.mod

This file was deleted.

20 changes: 0 additions & 20 deletions vendor/github.com/cilium/ebpf/go.sum

This file was deleted.

5 changes: 0 additions & 5 deletions vendor/github.com/containerd/console/go.mod

This file was deleted.

2 changes: 0 additions & 2 deletions vendor/github.com/containerd/console/go.sum

This file was deleted.

3 changes: 0 additions & 3 deletions vendor/github.com/cyphar/filepath-securejoin/go.mod

This file was deleted.

3 changes: 0 additions & 3 deletions vendor/github.com/godbus/dbus/v5/go.mod

This file was deleted.

Empty file.
5 changes: 0 additions & 5 deletions vendor/github.com/moby/sys/mountinfo/go.mod

This file was deleted.

2 changes: 0 additions & 2 deletions vendor/github.com/moby/sys/mountinfo/go.sum

This file was deleted.

3 changes: 0 additions & 3 deletions vendor/github.com/mrunalp/fileutils/go.mod

This file was deleted.

1 change: 0 additions & 1 deletion vendor/github.com/russross/blackfriday/v2/go.mod

This file was deleted.

3 changes: 0 additions & 3 deletions vendor/github.com/seccomp/libseccomp-golang/go.mod

This file was deleted.

23 changes: 0 additions & 23 deletions vendor/github.com/seccomp/libseccomp-golang/go.sum

This file was deleted.

1 change: 0 additions & 1 deletion vendor/github.com/shurcooL/sanitized_anchor_name/go.mod

This file was deleted.

10 changes: 0 additions & 10 deletions vendor/github.com/sirupsen/logrus/go.mod

This file was deleted.

8 changes: 0 additions & 8 deletions vendor/github.com/sirupsen/logrus/go.sum

This file was deleted.

9 changes: 0 additions & 9 deletions vendor/github.com/urfave/cli/go.mod

This file was deleted.

14 changes: 0 additions & 14 deletions vendor/github.com/urfave/cli/go.sum

This file was deleted.

8 changes: 0 additions & 8 deletions vendor/github.com/vishvananda/netlink/go.mod

This file was deleted.

4 changes: 0 additions & 4 deletions vendor/github.com/vishvananda/netlink/go.sum

This file was deleted.

3 changes: 0 additions & 3 deletions vendor/github.com/vishvananda/netns/go.mod

This file was deleted.

Empty file.
Loading

0 comments on commit a0f8847

Please sign in to comment.