Skip to content

libcontainer: rm windows pieces (carry #2700)#2888

Merged
kolyshkin merged 5 commits intoopencontainers:masterfrom
thaJeztah:fixup_rm_win_carry
Apr 4, 2021
Merged

libcontainer: rm windows pieces (carry #2700)#2888
kolyshkin merged 5 commits intoopencontainers:masterfrom
thaJeztah:fixup_rm_win_carry

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

carry of #2700
closes #2700

Rebased the branch, and included kolyshkin#9.

I also opened draft PR's to run CI in moby and containerd with this branch in moby/moby#42143 and containerd/containerd#5301

kolyshkin and others added 5 commits April 2, 2021 11:55
Nothing is in there, so removing.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This was initially added by commit d78ee47 but later
moved from libcontainer/configs to libcontainer/devices by
commit 677baf2.

Looks like since commit 677baf2 and also [1]
there is no use for this, thus removing.

[1] containers/buildah#2652

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Commit bf74951 added these two functions, but they are only used from
Windows code. The v1 of this patch moved these functions to _windows.go
file, but after some discussion we decided to drop windows code
altogether, so this is what this patch now does.

This fixes

> libcontainer/user/user.go:64:6: func `groupFromOS` is unused (unused)
> libcontainer/user/user.go:35:6: func `userFromOS` is unused (unused)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Move the unix-specific code to a file that's not compiled on
Windows.

Some of the errors (ErrUnsupported, ErrNoPasswdEntries, ErrNoGroupEntries)
are used in other parts of the code, so are moved to a non-platform
specific file.

Most of "user" is probably not useful on Windows, although it's possible
that Windows code may have to parse a passwd file, so leaving that code
for now.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah closed this Apr 2, 2021
@thaJeztah thaJeztah reopened this Apr 2, 2021
@thaJeztah
Copy link
Copy Markdown
Member Author

centos failed to start, so closed/reopened to trigger again

@thaJeztah
Copy link
Copy Markdown
Member Author

All green now 🎉

@kolyshkin @AkihiroSuda PTAL

@cyphar cyphar added this to the 1.0.0-rc94 milestone Apr 3, 2021
Copy link
Copy Markdown
Member

@cyphar cyphar 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
Copy Markdown
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM

@kolyshkin kolyshkin merged commit 365c628 into opencontainers:master Apr 4, 2021
@thaJeztah thaJeztah deleted the fixup_rm_win_carry branch April 4, 2021 20:47
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.

3 participants