systemd: Allow native build
PATCH 1/2 systemd: Allow native build
systemd-native is a dependency for libgudev-native, which in turn is a dependency for libfprint-native, which is needed to build libfprint.
The native systemctl binary is removed so it doesn't conflict with the script from systemd-systemctl-native.
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.
--- meta/recipes-core/systemd/systemd_253.1.bb | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
meta/recipes-core/systemd/systemd_253.1.bb +14 -6
@@ -6,6 +6,8 @@ PE = "1" DEPENDS = "intltool-native gperf-native libcap util-linux python3-jinja2-native" +BBCLASSEXTEND = "native" + SECTION = "base/shell" inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages features_check
@@ -60,7 +62,7 @@ PAM_PLUGINS = " \ pam-plugin-namespace \ " -PACKAGECONFIG ??= " \ +PACKAGECONFIG:class-target ??= " \ ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit seccomp', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
@@ -197,7 +199,7 @@ PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts- PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false" PACKAGECONFIG[sysext] = "-Dsysext=true, -Dsysext=false" PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false" -PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d -Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path=,,systemd-compat-units update-rc.d" +PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d -Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path=,,${@'systemd-compat-units update-rc.d' if d.getVar('PN') == d.getVar('BPN') else ''}" # When enabled use reproducble build timestamp if set as time epoch, # or build time if not. When disabled, time epoch is unset. def build_epoch(d):
@@ -211,7 +213,7 @@ PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true" PACKAGECONFIG[userdb] = "-Duserdb=true,-Duserdb=false" PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false" PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind" -PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup" +PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${BPN}-vconsole-setup" PACKAGECONFIG[wheel-group] = "-Dwheel-group=true, -Dwheel-group=false" PACKAGECONFIG[xdg-autostart] = "-Dxdg-autostart=true,-Dxdg-autostart=false" # Verify keymaps on locale change
@@ -364,6 +366,12 @@ do_install() { fi } +do_install:append:class-native () { + rm -f ${D}${bindir}/systemctl + ln -sf ..${base_bindir_native}/udevadm ${D}${base_sbindir}/udevadm + ln -sf ..${systemd_unitdir#${rootprefix}}/systemd-udevd ${D}${base_sbindir}/udevd +} + python populate_packages:prepend (){ systemdlibdir = d.getVar("rootlibdir") do_split_packages(d, systemdlibdir, r'^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
@@ -670,10 +678,10 @@ FILES:${PN} = " ${base_bindir}/* \ FILES:${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" RDEPENDS:${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck" -RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" -RDEPENDS:${PN} += "volatile-binds" +RDEPENDS:${PN}:class-target += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" +RDEPENDS:${PN}:class-target += "volatile-binds" -RRECOMMENDS:${PN} += "systemd-extra-utils \ +RRECOMMENDS:${PN}:class-target += "systemd-extra-utils \ udev-hwdb \ e2fsprogs-e2fsck \ kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 kernel-module-sch-fq-codel \
Signature · 1 line
2.39.2
PATCH 2/2 libgudev: Allow native build
libgudev-native is a dependency of libfprint-native, which is needed to build libfprint.
--- meta/recipes-gnome/libgudev/libgudev_237.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-gnome/libgudev/libgudev_237.bb +2 -0
@@ -9,6 +9,8 @@ SRC_URI[archive.sha256sum] = "0d06b21170d20c93e4f0534dbb9b0a8b4f1119ffb00b4031aa DEPENDS = "glib-2.0 udev" +BBCLASSEXTEND = "native" + RCONFLICTS:${PN} = "systemd (<= 220)" LICENSE = "LGPL-2.1-only"
Signature · 1 line
2.39.2
Re: [OE-core] [PATCH 2/2] libgudev: Allow native build
Can you look into specific details of why libgudev is needed, and whether it can be made optional? Also, what is it from libfprint-native that libfprint needs?
I would really like to know these details before we conclude that adding native variants for tricky, brittle items like all of systemd is indeed the only option. Maybe we can break those dependency chains.
Alex
Quoted 34 lines · Zoltan Boszormenyi
libgudev-native is a dependency of libfprint-native, which is needed to build libfprint.
Signed-off-by Zoltán Böszörményi <[email protected]>--- meta/recipes-gnome/libgudev/libgudev_237.bb | 2 ++ 1 file changed, 2 insertions(+)meta/recipes-gnome/libgudev/libgudev_237.bb +2
-1@@ -9,6 +9,8 @@ SRC_URI[archive.sha256sum] = "0d06b21170d20c93e4f0534dbb9b0a8b4f1119ffb00b4031aa DEPENDS = "glib-2.0 udev" +BBCLASSEXTEND = "native" + RCONFLICTS:${PN} = "systemd (<= 220)" LICENSE = "LGPL-2.1-only" --2.39.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179322): https://lists.openembedded.org/g/openembedded-core/message/179322
Mute This Topic: https://lists.openembedded.org/mt/97950751/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 2/2] libgudev: Allow native build
2023. 03. 30. 15:47 keltezéssel, Alexander Kanavin írta:
Quoted 7 lines
Can you look into specific details of why libgudev is needed, and whether it can be made optional? Also, what is it from libfprint-native that libfprint needs?
I would really like to know these details before we conclude that adding native variants for tricky, brittle items like all of systemd is indeed the only option. Maybe we can break those dependency chains.
It's verbosely explained in the patch for libfprint sent to oe-devel. Please read that. It's also here:
https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/431
Quoted 38 lines
Alex
Quoted 33 lines · Zoltan Boszormenyi
libgudev-native is a dependency of libfprint-native, which is needed to build libfprint.
Signed-off-by Zoltán Böszörményi <[email protected]>--- meta/recipes-gnome/libgudev/libgudev_237.bb | 2 ++ 1 file changed, 2 insertions(+)meta/recipes-gnome/libgudev/libgudev_237.bb +2
-1@@ -9,6 +9,8 @@ SRC_URI[archive.sha256sum] = "0d06b21170d20c93e4f0534dbb9b0a8b4f1119ffb00b4031aa DEPENDS = "glib-2.0 udev" +BBCLASSEXTEND = "native" + RCONFLICTS:${PN} = "systemd (<= 220)" LICENSE = "LGPL-2.1-only" --2.39.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179322): https://lists.openembedded.org/g/openembedded-core/message/179322
Mute This Topic: https://lists.openembedded.org/mt/97950751/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Can you please point to what piece of libgudev actually requires systemd?
Alex
Quoted 99 lines · Zoltan Boszormenyi
systemd-native is a dependency for libgudev-native, which in turn is a dependency for libfprint-native, which is needed to build libfprint.
The native systemctl binary is removed so it doesn't conflict with the script from systemd-systemctl-native.
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/systemfor WantedBy= and RequiredBy= settings and does not support systemctl set-default some.target.Signed-off-by Zoltán Böszörményi <[email protected]>--- meta/recipes-core/systemd/systemd_253.1.bb | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)meta/recipes-core/systemd/systemd_253.1.bb +14
-7@@ -6,6 +6,8 @@ PE = "1" DEPENDS = "intltool-native gperf-native libcap util-linux python3-jinja2-native" +BBCLASSEXTEND = "native" + SECTION = "base/shell" inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages features_check@@ -60,7 +62,7 @@ PAM_PLUGINS = " \ pam-plugin-namespace \ " -PACKAGECONFIG ??= " \ +PACKAGECONFIG:class-target ??= " \ ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit seccomp', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \@@ -197,7 +199,7 @@ PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts- PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false" PACKAGECONFIG[sysext] = "-Dsysext=true, -Dsysext=false" PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false" -PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d -Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path=,,systemd-compat-units update-rc.d" +PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d -Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path=,,${@'systemd-compat-units update-rc.d' if d.getVar('PN') == d.getVar('BPN') else ''}" # When enabled use reproducble build timestamp if set as time epoch, # or build time if not. When disabled, time epoch is unset. def build_epoch(d):@@ -211,7 +213,7 @@ PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true" PACKAGECONFIG[userdb] = "-Duserdb=true,-Duserdb=false" PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false" PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind" -PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup" +PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${BPN}-vconsole-setup" PACKAGECONFIG[wheel-group] = "-Dwheel-group=true, -Dwheel-group=false" PACKAGECONFIG[xdg-autostart] = "-Dxdg-autostart=true,-Dxdg-autostart=false" # Verify keymaps on locale change@@ -364,6 +366,12 @@ do_install() { fi } +do_install:append:class-native () { + rm -f ${D}${bindir}/systemctl + ln -sf ..${base_bindir_native}/udevadm ${D}${base_sbindir}/udevadm + ln -sf ..${systemd_unitdir#${rootprefix}}/systemd-udevd ${D}${base_sbindir}/udevd +} + python populate_packages:prepend (){ systemdlibdir = d.getVar("rootlibdir") do_split_packages(d, systemdlibdir, r'^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)@@ -670,10 +678,10 @@ FILES:${PN} = " ${base_bindir}/* \ FILES:${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" RDEPENDS:${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck" -RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" -RDEPENDS:${PN} += "volatile-binds" +RDEPENDS:${PN}:class-target += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" +RDEPENDS:${PN}:class-target += "volatile-binds" -RRECOMMENDS:${PN} += "systemd-extra-utils \ +RRECOMMENDS:${PN}:class-target += "systemd-extra-utils \ udev-hwdb \ e2fsprogs-e2fsck \ kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 kernel-module-sch-fq-codel \ --2.39.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179321): https://lists.openembedded.org/g/openembedded-core/message/179321
Mute This Topic: https://lists.openembedded.org/mt/97950749/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
2023. 03. 30. 15:46 keltezéssel, Alexander Kanavin írta:
Quoted 1 line
Can you please point to what piece of libgudev actually requires systemd?
It's this line:
DEPENDS = "glib-2.0 udev"
udev is in systemd:
PROVIDES = "udev"
Quoted 102 lines
Alex
Quoted 98 lines · Zoltan Boszormenyi
systemd-native is a dependency for libgudev-native, which in turn is a dependency for libfprint-native, which is needed to build libfprint.
The native systemctl binary is removed so it doesn't conflict with the script from systemd-systemctl-native.
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/systemfor WantedBy= and RequiredBy= settings and does not support systemctl set-default some.target.Signed-off-by Zoltán Böszörményi <[email protected]>--- meta/recipes-core/systemd/systemd_253.1.bb | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)meta/recipes-core/systemd/systemd_253.1.bb +14
-7@@ -6,6 +6,8 @@ PE = "1" DEPENDS = "intltool-native gperf-native libcap util-linux python3-jinja2-native" +BBCLASSEXTEND = "native" + SECTION = "base/shell" inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages features_check@@ -60,7 +62,7 @@ PAM_PLUGINS = " \ pam-plugin-namespace \ " -PACKAGECONFIG ??= " \ +PACKAGECONFIG:class-target ??= " \ ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit seccomp', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \@@ -197,7 +199,7 @@ PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts- PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false" PACKAGECONFIG[sysext] = "-Dsysext=true, -Dsysext=false" PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false" -PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d -Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path=,,systemd-compat-units update-rc.d" +PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d -Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path=,,${@'systemd-compat-units update-rc.d' if d.getVar('PN') == d.getVar('BPN') else ''}" # When enabled use reproducble build timestamp if set as time epoch, # or build time if not. When disabled, time epoch is unset. def build_epoch(d):@@ -211,7 +213,7 @@ PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true" PACKAGECONFIG[userdb] = "-Duserdb=true,-Duserdb=false" PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false" PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind" -PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup" +PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${BPN}-vconsole-setup" PACKAGECONFIG[wheel-group] = "-Dwheel-group=true, -Dwheel-group=false" PACKAGECONFIG[xdg-autostart] = "-Dxdg-autostart=true,-Dxdg-autostart=false" # Verify keymaps on locale change@@ -364,6 +366,12 @@ do_install() { fi } +do_install:append:class-native () { + rm -f ${D}${bindir}/systemctl + ln -sf ..${base_bindir_native}/udevadm ${D}${base_sbindir}/udevadm + ln -sf ..${systemd_unitdir#${rootprefix}}/systemd-udevd ${D}${base_sbindir}/udevd +} + python populate_packages:prepend (){ systemdlibdir = d.getVar("rootlibdir") do_split_packages(d, systemdlibdir, r'^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)@@ -670,10 +678,10 @@ FILES:${PN} = " ${base_bindir}/* \ FILES:${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" RDEPENDS:${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck" -RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" -RDEPENDS:${PN} += "volatile-binds" +RDEPENDS:${PN}:class-target += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" +RDEPENDS:${PN}:class-target += "volatile-binds" -RRECOMMENDS:${PN} += "systemd-extra-utils \ +RRECOMMENDS:${PN}:class-target += "systemd-extra-utils \ udev-hwdb \ e2fsprogs-e2fsck \ kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 kernel-module-sch-fq-codel \ --2.39.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179321): https://lists.openembedded.org/g/openembedded-core/message/179321
Mute This Topic: https://lists.openembedded.org/mt/97950749/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 7 lines · Zoltan Boszormenyi
systemd-native is a dependency for libgudev-native, which in turn is a dependency for libfprint-native, which is needed to build libfprint.
The native systemctl binary is removed so it doesn't conflict with the script from systemd-systemctl-native.
Quoted 6 lines
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/systemfor WantedBy= and RequiredBy= settings and does not support systemctl set-default some.target.
Which piece of systemd is libfprint needing?
We've had a request for systemd-native before and my opinion on it hasn't changed, I'd much prefer not to have it.
Cheers,
Richard
2023. 03. 30. 15:50 keltezéssel, Richard Purdie írta:
Quoted 8 lines · Zoltan Boszormenyi
Quoted 7 lines
systemd-native is a dependency for libgudev-native, which in turn is a dependency for libfprint-native, which is needed to build libfprint.
The native systemctl binary is removed so it doesn't conflict with the script from systemd-systemctl-native.
Quoted 7 lines
Quoted 6 lines
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/systemfor WantedBy= and RequiredBy= settings and does not support systemctl set-default some.target.Which piece of systemd is libfprint needing?
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.
Thanks.
Quoted 7 lines
We've had a request for systemd-native before and my opinion on it hasn't changed, I'd much prefer not to have it.
Cheers,
Richard
Quoted 9 lines · Zoltan Boszormenyi
Please see the MR:
https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/431udev (provided by systemd) -> libgudev -> libfprint also:
udev-native -> libgudev-native -> libfprint-native -> libfprintAlso, 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, 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.
Alex
2023. 03. 30. 16:10 keltezéssel, Alexander Kanavin írta:
Quoted 12 lines · Zoltan Boszormenyi
Quoted 9 lines
Please see the MR:
https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/431udev (provided by systemd) -> libgudev -> libfprint also:
udev-native -> libgudev-native -> libfprint-native -> libfprintAlso, 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.
Quoted 3 lines
, 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.
Quoted 6 lines
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/systemfor 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.
Quoted 4 lines · Böszörményi Zoltán
The mariadb change to use
CROSSCOMPILING_EMULATORinstead 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.
Mariadb's problem was that (for a specific target) it somehow included CPU instructions that qemu usermode doesn't support, and no one looked into what those instructions were and why they were produced in the first place, preferring to revert the whole thing. There are lots of counter-examples in core where qemu usermode works fine, and has been working that way for many years, for example gobject introspection, or all of the scripts in ../scripts/postinst-intercepts/ which run every time you bake an image, including update_udev_hwdb by the way that runs target udevadm. I am not maintaining oe-devel, and I do not keep an eye on things like that, otherwise I would've asked for further investigation into what crashes and why.
I do not want to add complex native dependency chains when usermode would work. It's me who's going to fix them when they break, not you.
Quoted 9 lines
You seem to have omitted reading a large part in the commit message for the systemd change.
Quoted 6 lines
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/systemfor WantedBy= and RequiredBy= settings and does not support systemctl set-default some.target.
This is a separate concern, and needs to be proposed as such.
Alex
2023. 03. 30. 16:41 keltezéssel, Alexander Kanavin írta:
Quoted 23 lines · Böszörményi Zoltán
Quoted 4 lines
The mariadb change to use
CROSSCOMPILING_EMULATORinstead 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.Mariadb's problem was that (for a specific target) it somehow included CPU instructions that qemu usermode doesn't support, and no one looked into what those instructions were and why they were produced in the first place, preferring to revert the whole thing. There are lots of counter-examples in core where qemu usermode works fine, and has been working that way for many years, for example gobject introspection, or all of the scripts in ../scripts/postinst-intercepts/ which run every time you bake an image, including
update_udev_hwdbby the way that runs target udevadm. I am not maintaining oe-devel, and I do not keep an eye on things like that, otherwise I would've asked for further investigation into what crashes and why.I do not want to add complex native dependency chains when usermode would work. It's me who's going to fix them when they break, not you.
Quoted 3 lines
You seem to have omitted reading a large part in the commit message for the systemd change.
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
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/systemfor WantedBy= and RequiredBy= settings and does not support systemctl set-default some.target.This is a separate concern, and needs to be proposed as such.
I can extend this patchset to remove systemd-systemctl-native.bb and use the native build fixing these problems.
Then libfprint can just use that as an innocent bystander.
Quoted 10 lines · Böszörményi Zoltán
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
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/systemfor WantedBy= and RequiredBy= settings and does not support systemctl set-default some.target.This is a separate concern, and needs to be proposed as such.
I can extend this patchset to remove systemd-systemctl-native.bb and use the native build fixing these problems.
That would make a stronger case for it. But you'd likely be asked to make systemd-native really minimal, and ideally produce the systemctl executable and nothing else.
Alex
A message that is not in the archive (sent off-list or not yet received): [email protected]
2023. 03. 30. 16:31 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
Quoted 34 lines
2023. 03. 30. 16:10 keltezéssel, Alexander Kanavin írta:
Quoted 12 lines · Zoltan Boszormenyi
Quoted 9 lines
Please see the MR:
https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/431udev (provided by systemd) -> libgudev -> libfprint also:
udev-native -> libgudev-native -> libfprint-native -> libfprintAlso, 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_EMULATORinstead 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.Quoted 3 lines
, 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.
Quoted 6 lines
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/systemfor WantedBy= and RequiredBy= settings and does not support systemctl set-default some.target.
Quoted 3 lines
This is not relevant to libfprint itself, it's a bug in Yocto's systemctl replacement script.
Here's the fixed
----8<--- foo.service ----8<---
...
[Install]
WantedBy=bar.service bar2.service bar3.service
RequiredBy=baz.service baz2.service baz3.service
...
----8<--- foo.service ----8<---
Quoted 3 lines
The symlinks in
/etc/systemd/system/bar.service.wantsand/etc/systemd/system/baz.service.requiresare not created for foo.service.
Or not all of them. This command fixed them on the installed system by creating all symlinks and not just the first:
systemctl reenable foo.service
but on a PXE booted image it's a bummer.
Quoted 15 lines
This command is also not supported by the Yocto replacement:
systemctl set-default custom.target
I have been bitten by both issues.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179330): https://lists.openembedded.org/g/openembedded-core/message/179330
Mute This Topic: https://lists.openembedded.org/mt/97950749/3617728
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 8 lines · Alexander Kanavin
Quoted 7 lines · Zoltan Boszormenyi
Please see the MR:
https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/431udev (provided by systemd) -> libgudev -> libfprint also:
udev-native -> libgudev-native -> libfprint-native -> libfprint
Quoted 7 lines
Quoted 2 lines
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, 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.
Before we jump to using qemu user mode, the first question has to be do we really need a libgudev native to make libfprint-native work enough to build libprintf.
I'd hope the answer is no, we don't as we don't want the build systems udev setup/devices leaking into a target build.
We intentionally try and keep native dependencies minimal and needing native udev/systemd versions of things sets of warnings in my mind and in others since it often means we're doing things we shouldn't be or don't actually need.
I appreciate there are issues with systemctl-native but those are separate issues and should be addressed as such. Complicating the build dependencies unnecessarily is bad and we should minimise them where possible. it isn't that I didn't read that bit of the patch, I just don't see it as a reason to have this dependency for libfprint.
So, I come back to the question of what libfprint needs from libfprint- native and whether it really does need udev for that?
Cheers,
Richard
2023. 03. 30. 18:39 keltezéssel, Richard Purdie írta:
Quoted 27 lines · Alexander Kanavin
Quoted 8 lines · Zoltan Boszormenyi
Quoted 7 lines
Please see the MR:
https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/431udev (provided by systemd) -> libgudev -> libfprint also:
udev-native -> libgudev-native -> libfprint-native -> libfprintQuoted 6 lines
Quoted 2 lines
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, 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.
Before we jump to using qemu user mode, the first question has to be do we really need a libgudev native to make libfprint-native work enough to build libprintf.
I'd hope the answer is no, we don't as we don't want the build systems udev setup/devices leaking into a target build.
We intentionally try and keep native dependencies minimal and needing native udev/systemd versions of things sets of warnings in my mind and in others since it often means we're doing things we shouldn't be or don't actually need.
Quoted 8 lines
I appreciate there are issues with systemctl-native but those are separate issues and should be addressed as such. Complicating the build dependencies unnecessarily is bad and we should minimise them where possible. it isn't that I didn't read that bit of the patch, I just don't see it as a reason to have this dependency for libfprint.
So, I come back to the question of what libfprint needs from libfprint- native and whether it really does need udev for that?
libfprint needs two generator executables to create a set of udev rules and another file called autosuspend.hwdb.
Both executables are linked with the complete libfprint library which includes the complete set of drivers that are configured and built. They seem to need this to deduce the list of supported device USB IDs for the current build. Both executables use fpi_ prefixed functions to ask the libfprint library for their goals.
In turn, the libfprint library depend on libgudev and libgusb for hotplug and device discovery purposes, respectively.
There is also a meson bug that Alexander Kanavin brought to my attention where custom_target() doesn't run executables using the exe_wrapper and I seem to be hitting this with libfprint.
I am not a meson expert so if there's a way to replace the executable()+custom_target(capture: true) combination with something more cross-compiler friendly, please don't hold this information back.
I couldn't fix this for libfprint 1.0 / fprintd 0.9.0 two years ago and I cannot fix it for the 2.0 beta versions either.
In my current in-house solution there's a separate systemd-native.bb recipe but I thought maybe cleaning it up for upstream and modifying the systemd recipe may be acceptable.
A message that is not in the archive (sent off-list or not yet received): [email protected]
2023. 03. 31. 11:39 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
Quoted 59 lines
2023. 03. 30. 18:39 keltezéssel, Richard Purdie írta:
Quoted 27 lines · Alexander Kanavin
Quoted 8 lines · Zoltan Boszormenyi
Quoted 7 lines
Please see the MR:
https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/431udev (provided by systemd) -> libgudev -> libfprint also:
udev-native -> libgudev-native -> libfprint-native -> libfprintQuoted 6 lines
Quoted 2 lines
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, 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.
Before we jump to using qemu user mode, the first question has to be do we really need a libgudev native to make libfprint-native work enough to build libprintf.
I'd hope the answer is no, we don't as we don't want the build systems udev setup/devices leaking into a target build.
We intentionally try and keep native dependencies minimal and needing native udev/systemd versions of things sets of warnings in my mind and in others since it often means we're doing things we shouldn't be or don't actually need.
Quoted 8 lines
I appreciate there are issues with systemctl-native but those are separate issues and should be addressed as such. Complicating the build dependencies unnecessarily is bad and we should minimise them where possible. it isn't that I didn't read that bit of the patch, I just don't see it as a reason to have this dependency for libfprint.
So, I come back to the question of what libfprint needs from libfprint- native and whether it really does need udev for that?
libfprint needs two generator executables to create a set of udev rules and another file called autosuspend.hwdb.
Both executables are linked with the complete libfprint library which includes the complete set of drivers that are configured and built. They seem to need this to deduce the list of supported device USB IDs for the current build. Both executables use
fpi_prefixed functions to ask the libfprint library for their goals.In turn, the libfprint library depend on libgudev and libgusb for hotplug and device discovery purposes, respectively.
There is also a meson bug that Alexander Kanavin brought to my attention where
custom_target()doesn't run executables using theexe_wrapperand I seem to be hitting this with libfprint.I am not a meson expert so if there's a way to replace the executable()+custom_target(capture: true) combination with something more cross-compiler friendly, please don't hold this information back.
Quoted 5 lines
I couldn't fix this for libfprint 1.0 / fprintd 0.9.0 two years ago and I cannot fix it for the 2.0 beta versions either.
In my current in-house solution there's a separate systemd-native.bb recipe but I thought maybe cleaning it up for upstream and modifying the systemd recipe may be acceptable.
Regarding my attempts to fix this: I have looked into making these executables use "native: true" but it would need duplicating all the driver and library targets with "native: true", too, and it seemed to be too intrusive. Also, it doesn't eliminate the native dependency chain, building these executables would still need systemd-native, libgudev-native and libgusb-native.
Quoted 10 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179406): https://lists.openembedded.org/g/openembedded-core/message/179406
Mute This Topic: https://lists.openembedded.org/mt/97950749/3617728
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 7 lines · Zoltan Boszormenyi via lists.openembedded.org
Regarding my attempts to fix this: I have looked into making these executables use "native: true" but it would need duplicating all the driver and library targets with "native: true", too, and it seemed to be too intrusive. Also, it doesn't eliminate the native dependency chain, building these executables would still need systemd-native, libgudev-native and libgusb-native.
I’d say this is still the correct solution, although the ‘native’ libfprint would be as lean as possible and not the entire library.
Ross
2023. 04. 03. 12:59 keltezéssel, Ross Burton írta:
Quoted 9 lines · Zoltan Boszormenyi via lists.openembedded.org
Quoted 7 lines
Regarding my attempts to fix this: I have looked into making these executables use "native: true" but it would need duplicating all the driver and library targets with "native: true", too, and it seemed to be too intrusive. Also, it doesn't eliminate the native dependency chain, building these executables would still need systemd-native, libgudev-native and libgusb-native.
I’d say this is still the correct solution, although the ‘native’ libfprint would be as lean as possible and not the entire library.
Hopefully someone can solve this bug soon:
https://github.com/mesonbuild/meson/issues/11029
FWIW, I commented about the problem but the meson codebase is over my head so I can't fix it.
Then libfrint (and probably other meson bases recipes in Yocto) won't need a native part.
Until then, please ignore this patchset and the other one for meta-oe. I will stick to my in-house solution for now.
Quoted 15 lines · Böszörményi Zoltán
2023. 04. 03. 12:59 keltezéssel, Ross Burton írta:
Quoted 9 lines · Zoltan Boszormenyi via lists.openembedded.org
Quoted 7 lines
Regarding my attempts to fix this: I have looked into making these executables use "native: true" but it would need duplicating all the driver and library targets with "native: true", too, and it seemed to be too intrusive. Also, it doesn't eliminate the native dependency chain, building these executables would still need systemd-native, libgudev-native and libgusb-native.
I’d say this is still the correct solution, although the ‘native’ libfprint would be as lean as possible and not the entire library.
Quoted 7 lines
Hopefully someone can solve this bug soon:
https://github.com/mesonbuild/meson/issues/11029
FWIW, I commented about the problem but the meson
codebase is over my head so I can't fix it.Then libfrint (and probably other meson bases recipes in Yocto) won't need a native part.
FWIW I just took a stripped down copy of your libfprint recipe and it happily built using qemu’s exe wrapper in oe-core master.
So, yes, it would be good if the build used native instead of relying on qemu, but it’s not a hard blocker. We should definitely be doing AB runs of poky with the exe wrapper disabled to exercise those codepaths.
Ross
2023. 04. 03. 21:52 keltezéssel, Ross Burton írta:
Quoted 13 lines
Quoted 13 lines · Böszörményi Zoltán
2023. 04. 03. 12:59 keltezéssel, Ross Burton írta:
Quoted 9 lines · Zoltan Boszormenyi via lists.openembedded.org
Quoted 7 lines
Regarding my attempts to fix this: I have looked into making these executables use "native: true" but it would need duplicating all the driver and library targets with "native: true", too, and it seemed to be too intrusive. Also, it doesn't eliminate the native dependency chain, building these executables would still need systemd-native, libgudev-native and libgusb-native.
I’d say this is still the correct solution, although the ‘native’ libfprint would be as lean as possible and not the entire library.
Quoted 8 lines
Quoted 7 lines
Hopefully someone can solve this bug soon:
https://github.com/mesonbuild/meson/issues/11029
FWIW, I commented about the problem but the meson
codebase is over my head so I can't fix it.Then libfrint (and probably other meson bases recipes in Yocto) won't need a native part.
FWIW I just took a stripped down copy of your libfprint recipe and it happily built using qemu’s exe wrapper in oe-core master.
After a fresh "repo sync" my libfprint build still fails with the stripped down copy that doesn't want the native dependency.
Please share the changes of yours against the libfprint recipe because clearly I am doing something wrong which is not obvious to me.
Or there is something subtle going on. For example, does this stripped down copy of the libfprint recipe still build for you if meta-clang is also used?
Quoted 3 lines
So, yes, it would be good if the build used native instead of relying on qemu, but it’s not a hard blocker. We should definitely be doing AB runs of poky with the exe wrapper disabled to exercise those codepaths.
Ross