Repository navigation
turn libkmod into a dlopen() dependency, too - #31131
Conversation
2f96e6d to
802942a
Compare
802942a to
4e06aca
Compare
4e06aca to
ed81d34
Compare
|
@mrc0mmand any idea what i might be missing here? i updated test-functions with the libkmod dep, assuming that would make the testsuite work, but that wasn't enough? |
The Testing Farm error is unrelated (that's some post mass rebuild issue). For the Arch Linux one I'll need to prepare a fix for the mkinitcpio hook, since it needs to explicitly pull the libkmod dep in (https://gitlab.archlinux.org/archlinux/packaging/packages/systemd/-/blob/main/initcpio-install-systemd?ref_type=heads#L127). I'll restart the job once that's done. |
|
Monkey-patched and restarted, hopefully it'll be content this time. Ignore the Testing Farm job for now, I'll try to deal with it later today. |
|
@mrc0mmand thank you so much! |
|
Using dlopen for more "exotic" / less frequently used dependencies seems ok. It does come at a cost though. As you no longer get any automatic shlibs dependency tracking. In case of libkmod I'm not actually sure if the dlopen approach is the desirable one. |
as mentioned elsewhere before: i am happy to extend ELF metadata declaring such weak deps if there's interest. As i understand people weren't intereste din that (did that change?), but it's the bed you made yourself then. There's nothing stopping anyone to declare weak deps in ELF notes or so, except politics i guess..
libkmod is of no use in a container, and it has a surprisingly large dep tree, see the lddtree output in the commit msg. It actually makes a difference... |
|
none of the deps pulled in by libkmod (zstd,lzma) aren't already pulled in by journald. |
|
It seems you failed to convince maintainers of the relevant domains. This is not something I can comment on, as I was not involved. |
|
@poettering Obviously you have to do the dlopen() dance for compression deps as well to make this worth it (which would happen to also be very useful for mkosi-initrd ;) ) |
|
Fwiw, I'd be happy to see more elaborate support for weak ELF deps, as it could be really useful. |
|
I have a feeling that this breaks Ubuntu CI as well, in a similar fashion to the Arch Linux job: /cc @bluca |
It's already on the TODO list. And yes, I want to in particular the more exotic ones to be dlopen() deps |
…y included Some required libraries that used to be statically included are in the process to be opened via `dlopen()`. References: - systemd/systemd#31131 - systemd/systemd#31550 - systemd/systemd#32019 Closes dracutdevs#2642
…y included Some required libraries that used to be statically included are in the process to be opened via `dlopen()`. References: - systemd/systemd#31131 - systemd/systemd#31550 - systemd/systemd#32019
…y included Some required libraries that used to be statically included are in the process to be opened via `dlopen()`. References: - systemd/systemd#31131 - systemd/systemd#31550 - systemd/systemd#32019
|
maybe adding likmod2 instead of kmod as rpm to opensuse helps? trying again |
|
@poettering Note that you can |
As it turns out libkmod has quite a bunch of deps, including various
compressing libs and similar. By turning this into a dlopen()
dependency, we can make our depchain during install time quite a bit
smaller. In particular as inside of containers kmod doesn't help anyway
as CAP_SYS_MODULE is not available anyway.
While we are at it, also share the code that sets up logging/kmod
context.
After:
$ lddtree ./build/systemd
systemd => ./build/systemd (interpreter => /lib64/ld-linux-x86-64.so.2)
libsystemd-core-255.so => ./build/src/core/libsystemd-core-255.so
libaudit.so.1 => /lib64/libaudit.so.1
libcap-ng.so.0 => /lib64/libcap-ng.so.0
ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
libm.so.6 => /lib64/libm.so.6
libmount.so.1 => /lib64/libmount.so.1
libblkid.so.1 => /lib64/libblkid.so.1
libseccomp.so.2 => /lib64/libseccomp.so.2
libselinux.so.1 => /lib64/libselinux.so.1
libpcre2-8.so.0 => /lib64/libpcre2-8.so.0
libsystemd-shared-255.so => /home/lennart/projects/systemd/build/src/shared/libsystemd-shared-255.so
libacl.so.1 => /lib64/libacl.so.1
libattr.so.1 => /lib64/libattr.so.1
libcap.so.2 => /lib64/libcap.so.2
libcrypt.so.2 => /lib64/libcrypt.so.2
libgcrypt.so.20 => /lib64/libgcrypt.so.20
libgpg-error.so.0 => /lib64/libgpg-error.so.0
liblz4.so.1 => /lib64/liblz4.so.1
libcrypto.so.3 => /lib64/libcrypto.so.3
libz.so.1 => /lib64/libz.so.1
libpam.so.0 => /lib64/libpam.so.0
libeconf.so.0 => /lib64/libeconf.so.0
liblzma.so.5 => /lib64/liblzma.so.5
libzstd.so.1 => /lib64/libzstd.so.1
libc.so.6 => /lib64/libc.so.6
Before:
$ lddtree ./build/systemd
systemd => ./build/systemd (interpreter => /lib64/ld-linux-x86-64.so.2)
libsystemd-core-255.so => ./build/src/core/libsystemd-core-255.so
libaudit.so.1 => /lib64/libaudit.so.1
libcap-ng.so.0 => /lib64/libcap-ng.so.0
ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
libkmod.so.2 => /lib64/libkmod.so.2
libzstd.so.1 => /lib64/libzstd.so.1
liblzma.so.5 => /lib64/liblzma.so.5
libz.so.1 => /lib64/libz.so.1
libcrypto.so.3 => /lib64/libcrypto.so.3
libgcc_s.so.1 => /lib64/libgcc_s.so.1
libm.so.6 => /lib64/libm.so.6
libmount.so.1 => /lib64/libmount.so.1
libblkid.so.1 => /lib64/libblkid.so.1
libseccomp.so.2 => /lib64/libseccomp.so.2
libselinux.so.1 => /lib64/libselinux.so.1
libpcre2-8.so.0 => /lib64/libpcre2-8.so.0
libsystemd-shared-255.so => /home/lennart/projects/systemd/build/src/shared/libsystemd-shared-255.so
libacl.so.1 => /lib64/libacl.so.1
libattr.so.1 => /lib64/libattr.so.1
libcap.so.2 => /lib64/libcap.so.2
libcrypt.so.2 => /lib64/libcrypt.so.2
libgcrypt.so.20 => /lib64/libgcrypt.so.20
libgpg-error.so.0 => /lib64/libgpg-error.so.0
liblz4.so.1 => /lib64/liblz4.so.1
libpam.so.0 => /lib64/libpam.so.0
libeconf.so.0 => /lib64/libeconf.so.0
libc.so.6 => /lib64/libc.so.6
|
jammy-amd64 is back to working in other PRs, trying again here |
|
So I take it ubuntu jammy is using their own initrd generator which does not run systemd, but does run systemd-udevd? I guess it needs to be fixed to pull in libkmod then probably. How can we do this? |
|
Ah of course it's initramfstools and it does ldd based resolution like dracut goddamnit |
So we're waiting for an update there I guess. |
keszybz
left a comment
There was a problem hiding this comment.
LGTM, but we need to get the packaging in order.
|
Hmmmmmmmmmmmm. |
Not our problem |
I know. I was just expressing my dismay that this thing is still a thing.
|
|
Noble is still borked and is starting to stabilize. But yes it would be broken because of initramfstools, like jammy is showing. A temporary quick solution would be to link udev to libkmod, as you don't install udev in containers anyway normally |
That's not so easy. We have |
|
I am kinda tempted to just merge the thing, and ignore the CI for a bit, until somebody fixes that initramfs builder? |
|
Please, no, that will make it impossible to get the CI changes done for your other PR, among other things. I'll work out a solution tonight or tomorrow. |
|
I have pushed a fix, let's see if it works |
|
It works, fortunately the udev hook is in the systemd package repo, so the change is self-contained and doesn't have to come from the initramfs package itself. Jammy is now working, noble has unrelated issues that have nothing to do with this. |
No description provided.