Skip to content

Copy pkg/symlink and pkg/truncindex from moby/moby#4631

Merged
dmcgowan merged 1 commit intocontainerd:masterfrom
dims:copy-a-few-packages-from-moby/moby
Oct 29, 2020
Merged

Copy pkg/symlink and pkg/truncindex from moby/moby#4631
dmcgowan merged 1 commit intocontainerd:masterfrom
dims:copy-a-few-packages-from-moby/moby

Conversation

@dims
Copy link
Member

@dims dims commented Oct 14, 2020

We need to remove the recursive dependency of containerd<->docker/docker

Follow up of discussion in #4626 (comment)

    moby/moby SHA : 9c15e82f19b0ad3c5fe8617a8ec2dddc6639f40a

    github.com/docker/docker/pkg/truncindex/truncindex.go -> pkg/cri/store/truncindex/truncindex.go
    github.com/docker/docker/pkg/symlink/LICENSE.APACHE -> pkg/symlink/LICENSE.APACHE
    github.com/docker/docker/pkg/symlink/LICENSE.BSD -> pkg/symlink/LICENSE.BSD
    github.com/docker/docker/pkg/symlink/README.md -> pkg/symlink/README.md
    github.com/docker/docker/pkg/symlink/fs.go -> pkg/symlink/fs.go
    github.com/docker/docker/pkg/symlink/fs_unix.go -> pkg/symlink/fs_unix.go
    github.com/docker/docker/pkg/symlink/fs_windows.go -> pkg/symlink/fs_windows.go

Signed-off-by: Davanum Srinivas [email protected]

@dims dims force-pushed the copy-a-few-packages-from-moby/moby branch 4 times, most recently from 857c844 to 1b9d287 Compare October 14, 2020 14:55
@theopenlab-ci
Copy link

theopenlab-ci bot commented Oct 14, 2020

Build succeeded.

@dims dims force-pushed the copy-a-few-packages-from-moby/moby branch from 1b9d287 to 6df2a9b Compare October 14, 2020 15:33
@theopenlab-ci
Copy link

theopenlab-ci bot commented Oct 14, 2020

Build succeeded.

@dims dims changed the title [WIP] Copy pkg/symlink and pkg/truncindex from moby/moby Copy pkg/symlink and pkg/truncindex from moby/moby Oct 14, 2020
@estesp
Copy link
Member

estesp commented Oct 14, 2020

Do we usually add some kind of note below our header to preserve information about where this came from? I'm also curious why there is a BSD license file in the symlink directory?

@dims
Copy link
Member Author

dims commented Oct 14, 2020

@estesp i copied them over from moby/moby. felt wrong to strip it out

@dims
Copy link
Member Author

dims commented Oct 14, 2020

@dmcgowan @mikebrow any suggestions on how to mark the files as being copied over from somewhere else?

@mikebrow
Copy link
Member

@dmcgowan @mikebrow any suggestions on how to mark the files as being copied over from somewhere else?

the pattern already included: // This code is a modified version of path/filepath/symlink.go from the Go standard library. should be fine..

@thaJeztah
Copy link
Member

Let's wait for a short bit, and see if we could move these out of the docker repo to be a standalone module (I'd like to avoid getting these out of sync if possible)

Mostly looking at the symlink one

@dims
Copy link
Member Author

dims commented Oct 14, 2020

sounds good @thaJeztah

@AkihiroSuda
Copy link
Member

Looks good, but let's mention the origin of the code in the file header

moby/moby SHA : 9c15e82f19b0ad3c5fe8617a8ec2dddc6639f40a

github.com/docker/docker/pkg/truncindex/truncindex.go -> pkg/cri/store/truncindex/truncindex.go
github.com/docker/docker/pkg/symlink/LICENSE.APACHE -> pkg/symlink/LICENSE.APACHE
github.com/docker/docker/pkg/symlink/LICENSE.BSD -> pkg/symlink/LICENSE.BSD
github.com/docker/docker/pkg/symlink/README.md -> pkg/symlink/README.md
github.com/docker/docker/pkg/symlink/fs.go -> pkg/symlink/fs.go
github.com/docker/docker/pkg/symlink/fs_unix.go -> pkg/symlink/fs_unix.go
github.com/docker/docker/pkg/symlink/fs_windows.go -> pkg/symlink/fs_windows.go

Signed-off-by: Davanum Srinivas <[email protected]>
@dims dims force-pushed the copy-a-few-packages-from-moby/moby branch from 6df2a9b to a9cb223 Compare October 15, 2020 12:39
@theopenlab-ci
Copy link

theopenlab-ci bot commented Oct 15, 2020

Build succeeded.

@thaJeztah
Copy link
Member

Discussed this in the moby maintainers meeting, and we want to move the pkg/symlink package to the https://github.com/moby/sys (could be as a separate submodule).

I want to have a look at that, but we want to preserve history of the package, so I have to dust-off my git and google-fu for that; if someone has time to look at that, that would be appreciated

@dims IIRC, you did something similar for https://github.com/moby/ipvs (if you have hints 🤗)

For the "truncindex" package (doesn't really deserve its own repo/module), so copying that should be fine.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

let me leave a "request changes" review on this one (see my comment above) 👍

Copy link
Member

@dmcgowan dmcgowan left a comment

Choose a reason for hiding this comment

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

LGTM

I think the symlink package could share logic with our existing scoped path resolution logic. I don't see a need to wait for this to be separated out as another module to depend on.

@thaJeztah
Copy link
Member

I would really prefer it to be maintained centrally to prevent things from diverging if possible

@AkihiroSuda
Copy link
Member

I would really prefer it to be maintained centrally to prevent things from diverging if possible

Can we have these packages in https://github.com/moby/sys ?

cc @kolyshkin

@kolyshkin
Copy link
Contributor

Can we have these packages in https://github.com/moby/sys ?

Good idea, will take a look later this week.

@kolyshkin
Copy link
Contributor

Can we have these packages in https://github.com/moby/sys ?

I took a look and I do not know enough details about these packages in order to be able to maintain it.

Yet I think it's a good idea to have it this way (as separate packages in moby/sys); perhaps @thaJeztah can do the initial move?

@dims
Copy link
Member Author

dims commented Oct 29, 2020

@kolyshkin @thaJeztah i've a PR in moby/sys, please take a look : moby/sys#53

@dmcgowan
Copy link
Member

Let's separate this change from any moves in Moby. Breaking the docker/docker dependency is the important part of this PR. Going to merge it, feel free to open a PR to propose moving these back out to a separate repo.

@dmcgowan dmcgowan merged commit 5184bcc into containerd:master Oct 29, 2020
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