Build vminitd and initfs inside the dev container#810
Merged
crosbymichael merged 1 commit intoJul 24, 2026
Conversation
crosbymichael
force-pushed
the
build-vminitd-initfs-in-container
branch
2 times, most recently
from
July 23, 2026 15:11
6a95333 to
5aeec39
Compare
Signed-off-by: michael_crosby <michael_crosby@apple.com>
crosbymichael
force-pushed
the
build-vminitd-initfs-in-container
branch
from
July 23, 2026 17:33
59b35a9 to
5d3a8c6
Compare
noah-thor
reviewed
Jul 23, 2026
|
|
||
| // write() to a pipe whose read end is closed must not kill the | ||
| // `swift test` process with SIGPIPE on Linux. See ignoreSIGPIPEForTests(). | ||
| init() { ignoreSIGPIPEForTests() } |
There was a problem hiding this comment.
nit: Are there any tests we don't want to ignore this? Could make this a test trait, but functionality will be the same, just maybe more "idiomatic"
Contributor
Author
There was a problem hiding this comment.
Naw, we are safe to ignore SIGPIPE for our applications.
| # variables so `vminitd` (compile only) and `init` (compile + build the initfs | ||
| # in a single container run) don't duplicate the command. | ||
| VMINITD_BUILD_CMD = make -C vminitd BUILD_CONFIGURATION=$(BUILD_CONFIGURATION) WARNINGS_AS_ERRORS=$(WARNINGS_AS_ERRORS) | ||
| INITFS_BUILD_CMD = ./scripts/build-initfs.sh --vminitd vminitd/bin/vminitd --vmexec vminitd/bin/vmexec --ext4 bin/initfs.ext4 --tar bin/init.rootfs.tar.gz |
There was a problem hiding this comment.
Would it be beneficial to make this script a make target?
|
|
||
| @Option(name: .customLong("ext4"), help: "The path to an ext4 image to create.") | ||
| var ext4File: String? | ||
| static let configuration = CommandConfiguration( |
There was a problem hiding this comment.
For my understanding, the refactor of this class is because now we don't need to do these operations from a darwin host and thus they can be done "natively" in linux during the build-initfs?
Contributor
Author
There was a problem hiding this comment.
Ya, we can both compile vminitd and build the ext4 based initfs inside the container.
noah-thor
approved these changes
Jul 23, 2026
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.
No description provided.