Repository navigation
Conversation
kolyshkin
force-pushed
the
libct-system-internal
branch
from
October 26, 2026 08:53
31b2109 to
93c3870
Compare
Contributor
Author
|
tentatively added to 1.6.0-rc.2 |
This package is only used by runc itself (in utils_linux.go), and there is no reason to have it as part of the public API, so move it to internal/kernelversion. A deprecated wrapper is added back by a later commit. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
All the code in libcontainer/system is only used by runc itself, and there is no reason to have it as part of the public API. In addition, internal/sys/doc.go already says that whatever might belong to libcontainer/system should go to internal/sys instead. Move it to internal/sys, as is. Some of it is moved further down to internal/linux by the next commit, and deprecated wrappers are added back by a later commit. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
As per internal/sys/doc.go, basic syscall wrappers belong in internal/linux, so move SetKeepCaps, ClearKeepCaps, Setctty, SetSubreaper, and SetLinuxPersonality there. While at it, remove: - GetPtyPeer, which is an exact copy of linux.GetPtyPeer; - GetSubreaper, which is not used. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Previous commits moved all of libcontainer/system and its kernelversion subpackage to internal packages. Since these were part of the public API, add back the wrappers (and type aliases) for external users, marked as deprecated, to be removed in runc 1.7. GetSubreaper is kept as is, since it is not used by runc and thus was removed from internal/sys. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
kolyshkin
force-pushed
the
libct-system-internal
branch
from
October 27, 2026 20:01
93c3870 to
98b7824
Compare
kolyshkin
marked this pull request as ready for review
October 27, 2026 20:01
The code moved from libcontainer/system is now considered new by lint-extra, which results in a bunch of warnings. Fix those: - add missing doc comments to exported functions, types and constants; - rename internal sys.Stat_t to sys.StatT (the deprecated libcontainer/system.Stat_t alias keeps the old name). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
libcontainer/system(and itskernelversionsubpackage) is only used by runc itself, so there is no reason to keep it as part of the public API. This moves it to internal packages, as suggested byinternal/sys/doc.go:libcontainer/system/kernelversion→internal/kernelversion;libcontainer/system→internal/sys, except for the basic syscall wrappers (SetKeepCaps,ClearKeepCaps,Setctty,SetSubreaper,SetLinuxPersonality), which go tointernal/linux;GetPtyPeer(an exact copy oflinux.GetPtyPeer) andGetSubreaper(unused) are not moved.The moves are done as pure renames in separate commits, so
git log --followandgit blamekeep working. Deprecated wrappers (and type aliases) are added back to the old locations by the last commit, to be removed in runc 1.7.Related: #3028.