-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sys-apps/systemd: upgrade from version 252 to version 255 #1679
Conversation
Failed test case |
Required to be merged first: flatcar/bootengine#87. |
Note on the size increase: amd64-generic-image .zip increased by 5MB and vmlinuz increased by 3MB. |
https://man.archlinux.org/man/resolved.conf.5#OPTIONS
|
987ab33
to
37746a4
Compare
Thats a lot for vmlinuz - what exactly is responsible for the size increase in vmlinuz? |
I would disable the listener. 99% of Flatcar users have no use for multicast dns, and homelabbers can enable it manually. |
37746a4 -> this should disable it, tests are running. |
The Flatcar image built by https://github.com/flatcar/scripts/actions/runs/7970403527/job/21757956307?pr=1679 was tested on arm64 using https://github.com/cloudbase/BMK/tree/flatcar_sysext, the deployment was succesful:
|
Hello @jepio, According to my comparison from here: #1684 (comment), systemd and kbd/i8in dracut module are the responsible. Makes sense, as the newer version added more systemd binaries / services in the initrd (like systemd-executor, systemd-vconsole-setup). The vmlinuz from https://github.com/flatcar/scripts/actions/runs/7970403527/job/21757956101?pr=1679 is 57236 KB vs 56868 KB the i18n one, which is only 0.5 MB more. Basically 1.5 MB more for the systemd upgrade 252 -> 255 (vanilla one is 55860 KB). This size increase can be reduced by adding a dracut special module for the loadkeys binary instead of installing the dracut i18n module (with the caveat that the new module might introduce technical debt for the future ). @jepio @pothos should I try with a dracut special module especially for this? Thank you. |
Please see #1684 (comment). I suggest to go with the upstream tested versions of systemd + dracut implementation in the case of systemd-vconsole-setup. I am afraid that if I continue to keep fixing the stripped down implementation, I will reach to a functional implementation that is the same as the upstream one. |
Makes sense - I guess we look for other tricks to reduce the size. E.g., we could remove unused kernel modules or we could compress the kernel more (there are new options in 6.x). |
I think we can revisit this part on the next overhaul of the Flatcar initrd dracut modules, as the tmpfiles dev early services and maybe more modules need some attention (removal). As it seems right now, systemd will just add more and more binaries / size as time passes because of the feature set increase. |
PR is ready to be reviewed. |
b7b807c
to
37746a4
Compare
Can you squash the smaller commits that touch the systemd ebuild folder into one "Apply Flatcar changes" patch? When doing so it would be good to split the one that also changes the |
@@ -572,7 +562,7 @@ multilib_src_install_all() { | |||
# Flatcar: Use an empty preset file, because systemctl | |||
# preset-all puts symlinks in /etc, not in /usr. We don't use | |||
# /etc, because it is not autoupdated. We do the "preset" above. | |||
rm "${ED}$(usex split-usr '' /usr)/lib/systemd/system-preset/90-systemd.preset" || die | |||
# rm "${ED}$(usex split-usr '' /usr)/lib/systemd/system-preset/90-systemd.preset" || die |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed? This could be the reason why some enablement symlinks end up in the /etc upperdir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we could make use of presets if we add a step in the image postprocessing where we evaluate the presets to create symlinks from them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lib/systemd/system-preset/90-systemd.preset does not exist anymore on this version of systemd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, I think the path is incorrect due to the split-usr usex, need to check again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm: cannot remove '/var/tmp/portage/sys-apps/systemd-255.3/image/lib/systemd/system-preset/90-systemd.preset': No such file or directory
- this is the log message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/var/tmp/portage/sys-apps/systemd-255.3/image/usr/lib/systemd/system-preset/90-systemd.preset
exists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pothos testing now locally with
diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-255.3.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-255.3.ebuild
index 7e8266d7d2..b1584034c7 100644
--- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-255.3.ebuild
+++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-255.3.ebuild
@@ -295,7 +295,7 @@ src_configure() {
# Flatcar: Our function, we use it in some places below.
get_rootprefix() {
- usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr"
+ "${EPREFIX}/usr"
}
multilib_src_configure() {
local myconf=(
@@ -562,8 +562,8 @@ multilib_src_install_all() {
# Flatcar: Use an empty preset file, because systemctl
# preset-all puts symlinks in /etc, not in /usr. We don't use
# /etc, because it is not autoupdated. We do the "preset" above.
- # rm "${ED}$(usex split-usr '' /usr)/lib/systemd/system-preset/90-systemd.preset" || die
- insinto $(usex split-usr '' /usr)/lib/systemd/system-preset
+ rm "${ED}/usr/lib/systemd/system-preset/90-systemd.preset" || die
+ insinto /usr/lib/systemd/system-preset
doins "${FILESDIR}"/99-default.preset
# Flatcar: Do not ship distro-specific files (nsswitch.conf
15db025
to
f009704
Compare
f009704
to
47a7148
Compare
47a7148
to
8aa194c
Compare
I left the 3 commits separate to have a better idea on what the process was. The changes to the profiles folder is related to the kbd package requirement. I will update the PR with the 3 squashed commits and split the kbd part into two: kbd enable and systemd-vconsole-setup fixes after the systemd preset issue is resolved. |
cff259c
to
fd2df6b
Compare
@@ -0,0 +1 @@ | |||
- Upgraded systemd from version 252 to version 255 ([flatcar/scripts#1679](https://github.com/flatcar/scripts/pull/1679)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That entry would rather go into changelog/updates/
as - systemd ([255](https://github.com/systemd/systemd/releases/tag/v255))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, will do the update. as the two changes are cosmetic, I will wait for the CI to finish before I do the force push.
fd2df6b
to
0de7fff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot, looks good!
@krnowak Can you also do a quick review? I wonder why usex split-usr '' /usr
didn't work.
0de7fff
to
425119d
Compare
It's from Gentoo commit c923eb13e743b615782a2000cdeafc84db07e533.
It's from Gentoo commit 1367a1498225bc2636c875c8b3c3e7a66d82c000.
Signed-off-by: Adrian Vladu <[email protected]>
systemd-vconsole-setup needs the dracut i18n module so that the binary loadkeys is present. The binary loadkeys comes from the kbd package. A custom dracut module patch for i18n was created, so that only the default `us` keymap and font are installed, leading the size increase to the minimum of around a few KB instead of 3MB. Signed-off-by: Adrian Vladu <[email protected]>
Signed-off-by: Adrian Vladu <[email protected]>
systemd-vconsole-setup unit needs sys-apps/kbd loadkeys binary. Signed-off-by: Adrian Vladu <[email protected]>
Use commit for flatcar/bootengine#87. Signed-off-by: Adrian Vladu <[email protected]>
425119d
to
11449d2
Compare
Upgrades systemd 252 to systemd 255.
This is WoIP branch, the following issues are still to be resolved:
Fixes: flatcar/Flatcar#1269
Requires: flatcar/bootengine#87
Requires a mantle fix or systemd-resolved MulticastDNS disabled: https://bugs.launchpad.net/cloud-images/+bug/2038894/comments/4. Fixed by disabling MulticastDNS.