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

Libnetwork is failing while executing command ' get github.com/moby/libnetwork' #2654

Open
rajusah15 opened this issue Mar 3, 2022 · 3 comments

Comments

@rajusah15
Copy link

getting following error:

go get: github.com/Sirupsen/logrus@none updating to
github.com/Sirupsen/logrus@v1.8.1: parsing go.mod:
module declares its path as: github.com/sirupsen/logrus
but was required as: github.com/Sirupsen/logrus

After manually changing from 'sirupsen' to 'Sirupsen'
it started giving another error:
github.com/docker/docker/pkg/discovery.test imports
github.com/go-check/check: github.com/go-check/check@v0.0.0-20201130134442-10cb98267c6c: parsing go.mod:
module declares its path as: gopkg.in/check.v1
but was required as: github.com/go-check/check

pls let me know what dependency is required or any change in config. file

@pcolladosoto
Copy link

Hi! I also encountered this issue but I was lucky enough to solve it with sed(1) and find(1):

sudo find $GOPATH/pkg/mod/github.com/docker/libnetwork@v0.5.6 \
    -type file -name "*.go" -exec sed -i -e 's/Sirupsen/sirupsen/g' {} \;

This basically swaps Sirupsen by sirupsen on every file. Note we use sudo because permissions within $GOPATH are 0444 (i.e. readonly), which means we can not edit the files as a 'normal' user. You can also try to chown +w /path/to/file each of them if that's your jam!

I did find that the import statement was trying to include log "github.com/Sirupsen/logrus" with:

grep -R Sirupsen $GOPATH/pkg/mod/github.com/docker/libnetwork@v0.5.6

As go points out, the module's go.mod does use the path with sirupsen instead of Sirupsen.

If this is a mistake on our end I would be delighted to know: that way I won't run into the issue again!

I would be happy to submit a PR with the changes in case that's something you'd appreciate.

Thanks for your time!

@thediveo
Copy link

thediveo commented Oct 22, 2022

UPDATED!

Trying to sed around this is a no-go (sic) for CI/CD.

This is a real mess. I somehow seems to get along now with this replace in my go.mod, so that not only a go mod tidy then works, but also a build:

replace github.com/docker/libnetwork => github.com/docker/libnetwork v0.8.0-dev.2.0.20220716072657-0dde5c895075

This replace is based on the vendoring of github.com/moby/moby for v20.10.20.

@thediveo
Copy link

Please see my update above, as the replaces worked for go mod tidy but I only later hit build errors. After diving into the vendoring of @moby/moby I could build a plugin binary using the specific replace for github.com/docker/libnetwork.

Did I mention that this is messy...?

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

No branches or pull requests

3 participants