-
Notifications
You must be signed in to change notification settings - Fork 323
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
setup-user: use github.com/moby/sys/user #134
Conversation
a6a74a6
to
4b9f447
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
I'd love to get pedantic and make sure golang.org/x/sys
is at the absolute lowest version it can reasonably be, but that feels like an unreasonable amount of digging to accomplish, so I think I'll just leave it alone for now. 😅
One thing I'd like to clarify though (I wish I could comment on the commit message itself 😂):
Since Go 1.16, [Go issue 1435][1] is solved, and the stdlib syscall implementations work on Linux. While they are a bit more flexible/heavier-weight than the implementations that were copied to libcontainer/system (working across all threads), we compile with Cgo, and using the libc wrappers should be just as suitable.
When you say "we compile with cgo", did you mean "if we compile with cgo" ? (We actually go out of our way to compile without cgo everywhere we build, so it'll only be distro builds like the ones in Debian that might use cgo. 😅)
Oh, shoot, I kept that commit message from runc. That should be dropped here. |
Ah, that makes more sense 😄 Would you like to update, or should I instead just squash and merge? (I have no strong preference either way) |
Since Go 1.16, [Go issue 1435][1] is solved, and the stdlib syscall implementations work on Linux. [1]: golang/go#1435 Signed-off-by: Bjorn Neergaard <[email protected]>
Prefer to use the latest syscall implementation, instead of the one that was shipped with the Go compiler. As this was an indirect dependency, this aligns all syscalls in the package to a common implementation. Signed-off-by: Bjorn Neergaard <[email protected]>
Break the dependency on runc by using the new canonical source of the `user` package at github.com/moby/sys. Signed-off-by: Bjorn Neergaard <[email protected]>
4b9f447
to
165a750
Compare
TY @neersighted |
Use the new github.com/moby/sys/user module (and clean up the dependency tree) to remove the runc dependency and reduce the possibility of future conflicts resulting from dependencies.