Copy go-systemd/activation.Files code to avoid bringing in crypto/tls#5057
Merged
kolyshkin merged 2 commits intoopencontainers:mainfrom Dec 15, 2025
Merged
Copy go-systemd/activation.Files code to avoid bringing in crypto/tls#5057kolyshkin merged 2 commits intoopencontainers:mainfrom
kolyshkin merged 2 commits intoopencontainers:mainfrom
Conversation
kolyshkin
commented
Dec 5, 2025
| @@ -51,7 +55,7 @@ func Files(unsetEnv bool) []*os.File { | |||
| } | |||
|
|
|||
| nfds, err := strconv.Atoi(os.Getenv("LISTEN_FDS")) | |||
| if err != nil || nfds == 0 { | |||
| if err != nil || nfds <= 0 { | |||
Contributor
Author
There was a problem hiding this comment.
Note: I used the latest version of this file; this change comes from coreos/go-systemd@de1b3a8
Member
|
This is probably an even better solution than a build tag to be honest... |
cyphar
approved these changes
Dec 7, 2025
Member
|
My only question is whether we should put this in |
It appears that when we import github.com/coreos/go-systemd/activation, it brings in the whole crypto/tls package (which is not used by runc directly or indirectly), making the runc binary size larger and potentially creating issues with FIPS compliance. Let's copy the code of function we use from go-systemd/activation to avoid that. The space savings are: $ size runc.before runc.after text data bss dec hex filename 7101084 5049593 271560 12422237 bd8c5d runc.before 6508796 4623281 229128 11361205 ad5bb5 runc.after Reported-by: Dimitri John Ledkov <dimitri.ledkov@surgut.co.uk> Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Remove unused code and argument from the ActivationFiles, and simplify its usage. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Contributor
Author
implemented |
AkihiroSuda
approved these changes
Dec 15, 2025
Contributor
Author
|
Do we want this for 1.4.1? |
Contributor
Author
Merged
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.
Inspired by PR #5056.
Closes: #5056.
Remove crypto/tls dependency
It appears that when we import github.com/coreos/go-systemd/activation,
it brings in the whole crypto/tls package (which is not used by runc
directly or indirectly), making the runc binary size larger and
potentially creating issues with FIPS compliance.
Let's copy the code of function we use from go-systemd/activation
to avoid that.
The space savings are:
Reported-by: @xnox