Closed floppym closed 1 year ago
The failing integration tests seem rather flaky. I don't think it's related to this PR.
The failing integration tests seem rather flaky. I don't think it's related to this PR.
Yes, indeed - those failures are out of scope for this PR (see https://github.com/dracutdevs/dracut/issues/2353#issuecomment-1565225190)
As the Gentoo maintainer of dracut, I assure you the patch is necessary.
The EFI stub is not installed in systemdutildir. Many other systemd components are installed there, however.
If systemdutildir contains the /usr prefix, all the systemd global variables that use systemdutildir would be incorrect, not just the EFI stub location.
My patch does not add /usr to systemdutildir
, so I don't understand this comment.
If systemdutildir contains the /usr prefix, all the systemd global variables that use systemdutildir would be incorrect, not just the EFI stub location.
My patch does not add /usr to
systemdutildir
, so I don't understand this comment.
Quoting https://github.com/dracutdevs/dracut/pull/2365#pullrequestreview-1466934212 :
testing in Gentoo the current upstream code (before applying this patch)
I was trying to say that with the current code systemdutildir
is equal to /lib/systemd
, at least with my Gentoo test vm.
In this case, if your patch does not add /usr
to systemdutildir
, isn't it doing the same thing?
- uefi_stub="$dracutsysrootdir${systemdutildir}/boot/efi/linux${EFI_MACHINE_TYPE_NAME}.efi.stub"
+ uefi_stub="$dracutsysrootdir${systemd_prefix}/lib/systemd/boot/efi/linux${EFI_MACHINE_TYPE_NAME}.efi.stub"
Yes, systemdutildir is supposed to be equal to /lib/systemd.
The EFI stub is NOT installed in systemdutildir, however. It is installed in /usr/lib/systemd.
To elaborate: systemd installs many programs in systemdutildir (/lib/systemd): systemd-udevd, systemd-networkd, etc
The EFI stub is an exception: it is always installed in /usr/lib/systemd (assuming prefix is /usr), regardless of the value of systemdutildir.
Ok, sorry, after checking systemd's meson.build now I get this prefixdir
vs rootprefixdir
issue. Unfortunately, bootlibdir
is not exposed in systemd.pc
, because I'd prefer a fix similar to what was done for tmpfilesdir
:
set_global_var "systemd" "bootlibdir" "/lib/systemd/boot/efi" "/usr/lib/systemd/boot/efi"
Anyway, I'd suggest a couple of changes:
s/systemd_prefix/systemdprefix
, no underscores, just to follow the implicit naming convention of the other global variables.set_global_var <pkg_config> <var> ...
to set_global_var <pkg_config> <pkg_var[:exported_var]>
Ok, sorry, after checking systemd's meson.build now I get this
prefixdir
vsrootprefixdir
issue. Unfortunately,bootlibdir
is not exposed insystemd.pc
, because I'd prefer a fix similar to what was done fortmpfilesdir
:
Agreed. Unfortunately, adding bootlibdir to systemd.pc just makes the required logic more complex at this point since we would still need a fallback for old systemd versions.
I force-pushed a new commit with the suggested changes. However, this github PR doesn't seem to be updating for some reason.
systemd always installs the UEFI stub in ${prefix}/lib/systemd/boot/efi.
On split-usr systems, systemdutildir is ${rootprefix}/lib/systemd, which makes dracut look in the wrong place.
Instead, grab 'prefix' from systemd.pc and store it in 'systemd_prefix'.
Bug: https://bugs.gentoo.org/765208