Skip to content

rootfs: fix compilation error (includes sirupsen->Sirupsen fix)#448

Merged
mlaventure merged 2 commits intocontainerd:masterfrom
AkihiroSuda:cleanup
Jan 23, 2017
Merged

rootfs: fix compilation error (includes sirupsen->Sirupsen fix)#448
mlaventure merged 2 commits intocontainerd:masterfrom
AkihiroSuda:cleanup

Conversation

@AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Jan 19, 2017

go build github.com/docker/containerd/rootfs was failing because of an error

can't load package: package github.com/docker/containerd/rootfs: case-insensitive import collision: "github.com/docker/containerd/vendor/github.com/Sirupsen/logrus" and "github.com/docker/containerd/vendor/github.com/sirupsen/logrus"

Ideally we should migrate to sirupsen, but it seems hard. (https://github.com/docker/containerd/pull/415#pullrequestreview-16305753)

So I suggest adapting Sirupsen at the moment.

This PR also fixes a bunch of other compilation errors in rootfs , and some clean up for CLI.

vendor.conf Outdated
Copy link
Member Author

Choose a reason for hiding this comment

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

Reason of this fix: the go-runc vendored in this PR no longer depends on logrus

cmd/ctr/run.go Outdated
Copy link
Member Author

Choose a reason for hiding this comment

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

I included this unrelated fix in the PR just because this is nitpicky.
I can open separate PR if I should.

Copy link
Member

Choose a reason for hiding this comment

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

Please do.

Copy link
Member Author

Choose a reason for hiding this comment

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

@AkihiroSuda AkihiroSuda changed the title roots: fix compilation error (includes Sirupsen->sirupsen fix) rootfs: fix compilation error (includes Sirupsen->sirupsen fix) Jan 19, 2017
@estesp
Copy link
Member

estesp commented Jan 19, 2017

I know the Sirupsen rename is possibly a problem with far-reaching effects, but I think we need to use the "right" name (lowercase) and start fixing all the imported vendors. I don't think we are in a rush necessarily so even if it takes some time we are OK? Or are we stuck because of the duplicate use (imports using both cases)?

@mlaventure
Copy link
Contributor

I agree with @estesp here.

We could fix it in docker/docker by having the vendor script automatically sed'ing Sirupsen to sirupsen for now maybe?

rootfs/apply.go Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Please don't reassign: this fix needs to be upstreamed to OCI. I'll submit a PR today.

Copy link
Member

Choose a reason for hiding this comment

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

I've filed opencontainers/image-spec#514 to take care of this.

@AkihiroSuda AkihiroSuda changed the title rootfs: fix compilation error (includes Sirupsen->sirupsen fix) rootfs: fix compilation error (includes sirupsen->Sirupsen fix) Jan 20, 2017
@hqhq
Copy link
Contributor

hqhq commented Jan 20, 2017

I agree we should fix docker and use lowercase version here, that is the right approach.

@AkihiroSuda
Copy link
Member Author

AkihiroSuda commented Jan 20, 2017

Thank you all for the comment.
I agree we should use the lowercase name, and we don't need to rush.

However, IIUC, we should make this package compilable by the end of January, or at the latest, by the end of February.
https://github.com/docker/containerd/milestones

Given that there is a risk we fail to modify docker to use the lowercase name by the period,
WDYT about temporarily forking github.com/docker/docker/pkg/archive to github.com/docker/containerd/archive (and other pkgs depends on Sirupsen if any) and modifying the forked package to use the lowercase name?

When the upstream docker is successfully updated to use the lowercase name, we can safely remove github.com/docker/containerd/archive. (unless there is another reason to fork the package)

@mlaventure
Copy link
Contributor

@AkihiroSuda apparently the change to lowercase was reverted (see sirupsen/logrus#451 (comment)), so upper case it is :)

github.com/docker/docker/pkg/archive requires Sirupsen/logrus.
So let's remove sirupsen/logrus at the moment.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
@AkihiroSuda
Copy link
Member Author

@mlaventure
Thank you for the information.

Rebased PR to master.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
@crosbymichael
Copy link
Member

LGTM

Copy link
Member

@samuelkarp samuelkarp 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
Contributor

@mlaventure mlaventure 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.

7 participants