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

script/setup: use git clone instead of go get -d #5009

Merged
merged 1 commit into from
Mar 3, 2021

Conversation

thaJeztah
Copy link
Member

relates to #5005

go get -d uses go modules by default in Go 1.16 and up, which results
in modules being fetched for the "latest" module version, after which we
tried to "git checkout" to <VERSION>.

For runc, this means that (possibly incorrectly), go get will download
runc v0.1.1 (most recent non-"pre-release", which caused failures (e.g
the old Sirupsen/logrus being downloaded).

In addition, some of the dependencies we're installing use vendoring, and
thus would not require the modules to be downloaded (and vendored files
will be ignored when using go get with modules).

This patch switches several uses go get -d to use a regular
git clone, after which the desired version is checked out,
and the binaries are built.

@thaJeztah
Copy link
Member Author

Hmmm... odd; is state not cleaned up between runs?

==> default: Running provisioner: install-runc (shell)...
    default: Running: inline script
    default: + /root/go/src/github.com/containerd/containerd/script/setup/install-runc
    default: fatal: destination path '/root/go/src/github.com/opencontainers/runc' already exists and is not an empty directory.

@dims
Copy link
Member

dims commented Feb 5, 2021

@thaJeztah the vagrant up is laying down that directory from what i can tell looking at the logs

@thaJeztah
Copy link
Member Author

ah, hm... will have to look a bit more in depth then how to best fix.

`go get -d` uses go modules by default in Go 1.16 and up, which results
in modules being fetched for the "latest" module version, after which we
tried to "git checkout" to `<VERSION>`.

For runc, this means that (possibly incorrectly), `go get` will download
runc `v0.1.1` (most recent non-"pre-release", which caused failures (e.g
the old `Sirupsen/logrus` being downloaded).

In addition, some of the dependencies we're installing use vendoring, and
thus would not require the modules to be downloaded (and vendored files
will be ignored when using `go get` with modules).

This patch switches several uses `go get -d` to use a regular
git clone, after which the desired version is checked out,
and the binaries are built.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Phil Estes <estesp@amazon.com>
@containerd containerd deleted a comment from theopenlab-ci bot Mar 3, 2021
@containerd containerd deleted a comment from theopenlab-ci bot Mar 3, 2021
@containerd containerd deleted a comment from theopenlab-ci bot Mar 3, 2021
@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 3, 2021

Build succeeded.

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants