Re: [OE-core] [PATCH 1/2] systemd: Allow native build

Böszörményi Zoltán
2023-03-30T14:31:32Z

2023. 03. 30. 16:10 keltezéssel, Alexander Kanavin írta:
> On Thu, 30 Mar 2023 at 16:08, Zoltan Boszormenyi <zboszor@gmail.com> wrote:
>> Please see the MR:
>> https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/431
>>
>> udev (provided by systemd) -> libgudev -> libfprint
>> also:
>> udev-native -> libgudev-native -> libfprint-native -> libfprint
>>
>> Also, please read the TODO part of the patch for systemd
>> and consider it.
> We can simply direct libfprint to run its own target pieces under qemu
> usermode

The mariadb change to use CROSSCOMPILING_EMULATOR
instead of building mariadb-native was reverted because
qemu is not ominpotent. The same applies to meson
running executables via qemu. No custom wrapper would help.

> , and avoid all this nasty native stuff. Meson has direct
> support for it, and even if it doesn't work, libfprint can be patched
> to use a custom 'wrapper' for executing the binaries.

You seem to have omitted reading a large part in the
commit message for the systemd change.

> TODO? The new natively built systemctl binary may replace
> the script in systemd-systemctl-native, as it supports
> more options and works better than the script. For example,
> the current script does not create the symlinks in
> /etc/systemd/system for WantedBy= and RequiredBy= settings
> and does not support systemctl set-default some.target.

This is not relevant to libfprint itself, it's a bug in
Yocto's systemctl replacement script.

----8<--- foo.service ----8<---
...
[Install]
WantedBy=bar.service
RequiredBy=baz.service
...
----8<--- foo.service ----8<---

The symlinks in /etc/systemd/system/bar.service.wants
and /etc/systemd/system/baz.service.requires are not
created for foo.service.

This command is also not supported by the Yocto replacement:

systemctl set-default custom.target

I have been bitten by both issues.