Various changes in preparation for upgrading Dracut#2835
Merged
Conversation
krnowak
reviewed
Apr 22, 2025
...container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/files/amd64_defconfig-6.6
Show resolved
Hide resolved
The missing soname symlinks were causing ldconfig to create them later, breaking the sandbox. The upstream Makefile installs them for you, so let's use it even though it needs some taming. This adds the systemd timer to refresh the NSS cache. This seems important, and I can't see any reason to omit it. This also moves the binaries from /usr/libexec to /usr/bin. Upstream has always put them in /usr/bin, and putting them elsewhere requires tweaks. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
These dependencies are always present in CI by the time this package gets built, but this may not be the case when building manually. This leads to gaps in the initrd and ultimately failed boots. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Updating only the SDK to systemd-257 caused this script to break, as it saw this version being pulled in as a BDEPEND and then tried to build it using the board profile. See the comment for details. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
We need this for dracut-install to have JSON support. It doesn't matter that the Flatcar image will still have v256. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
zstd is faster but we're getting seriously short on space. Unfortunately, the arm64 kernel still cannot be compressed, but it has benefited from another space saving measure recently, and GRUB also takes up less space in /boot. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Again, zstd is faster but we're getting seriously short on space. Unlike the kernel itself, this applies to both amd64 and arm64. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This version writes fewer temporary files and tries cpio multiple times for concatenated archives again. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
krnowak
approved these changes
Apr 22, 2025
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.
Various changes in preparation for upgrading Dracut
My changes to upgrade Dracut and use its improved
--sysrootfunctionality are quite heavy, so I decided to split the changes into two parts. This first part is the miscellaneous changes that are needed but can be applied on their own.sys-auth/google-oslogin: Install soname symlinks and general tidy up
The initrd was previously created in
pkg_setupto avoid the sandbox. This will no longer be the case.ldconfigwas creating missing symlinks, which now breaks the sandbox.setup_board: Add ldconfig wrapper for non-native arches
We will no longer run the whole of Dracut with QEMU, but we do still need to run
ldconfigwith it. Portage will also use this wrapper.sys-kernel/coreos-kernel: Add missing dependencies
This wasn't an issue in CI, but I hit issues when building coreos-kernel locally without the entire board root present.
build_dev_binpkgs: Refactor the script with better Bash techniques
This script was hurting my eyes when dealing with the issue below.
build_dev_binpkgs: Only build packages available to the board profile
Updating the SDK to systemd-257 (see below) caused this script to break.
sys-apps/systemd: Bump to v257.5 for the SDK only
We need this for dracut-install to have the new JSON support.
sys-kernel/coreos-modules: Compress kernel with xz rather than zstd
The new initrd is heavier for various reasons. I trimmed some aspects, but I chose to keep all the keymaps as only supporting US English is unfair to bare metal users.
sys-kernel/coreos-modules: Compress initrd with xz rather than zstd
See above.
build_library: Change extraction script to xz and rewrite to be simpler
As above and the existing script was hard to understand.
How to use
Nothing directly user-facing has changed here. Just check that nothing has broken.
Testing done
A full CI run with all tests did pass eventually after some flakiness. I have already successfully run these changes together with the rest of the changes in part 2.
With the new initrd extraction script, we don't get the phantom extra "rootfs" directory on amd64 anymore. It says it has reduced by 413KB, but that usage was never actually real. Part 2 will add the CPU microcode, which will result in an extra rootfs directory again, but this one will be real.
changelog/directory (user-facing change, bug fix, security fix, update)/bootand/usrsize, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.