Add UKI modify mode, SELinux, and kernel cmdline support for ACL#736
Open
liulanze wants to merge 1 commit into
Open
Add UKI modify mode, SELinux, and kernel cmdline support for ACL#736liulanze wants to merge 1 commit into
liulanze wants to merge 1 commit into
Conversation
vinceaperri
approved these changes
May 14, 2026
|
|
||
| // GetSELinuxConfigDir returns the path to the SELinux configuration | ||
| // directory relative to the image root. | ||
| GetSELinuxConfigDir() string |
Contributor
There was a problem hiding this comment.
GetSELinuxConfigFile()? This would remove the need to construct it at multiple call sites.
| return imagecustomizerapi.SELinuxModeDefault, err | ||
| selinuxConfigDir := distroHandler.GetSELinuxConfigDir() | ||
| if isPathOnReadOnlyMount("/"+selinuxConfigDir, imageChroot) { | ||
| // The SELinux config dir is on a read-only partition (e.g. dm-verity /usr on ACL). |
Contributor
There was a problem hiding this comment.
This change in behavior isn't necessary the right move for non-ACL distributions. I think code path would be better captured with a distrohandler function.
| return fmt.Errorf("failed to extract cmdline from addon (%s):\n%w", addonFilePath, err) | ||
| var cmdline string | ||
| _, statErr := os.Stat(addonFilePath) | ||
| if statErr == nil { |
Contributor
There was a problem hiding this comment.
Similarly, this code path would be better captured with a distrohandler function. It should still throw an error for non-ACL distributions since it is invalid state.
In general, when adding support for a new distro-version, one should only change behavior for other distro-versions if a bug has been surfaced that only the new distro-version hits.
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.
UKI passthrough mode: tested, passed
UKI create mode: tested, passed
UKI modify mode: tested, passed
os.kernelCommandLine: tested, passed
os.selinux: tested, passed
os.hostname: tested, passed
os.additionalFiles: tested, passed
os.additionalDirs: tested, passed
os.groups / os.users: tested, passed
os.modules: tested, passed
os.services: tested, passed
os.imageHistory: tested, passed
scripts.postCustomization: tested, passed
output.artifacts: tested, passed