* [PATCH 1/2] systemd: Allow native build
@ 2023-03-30 13:42 Zoltán Böszörményi
2023-03-30 13:42 ` [PATCH 2/2] libgudev: " Zoltán Böszörményi
` (2 more replies)
0 siblings, 3 replies; 21+ messages in thread
From: Zoltán Böszörményi @ 2023-03-30 13:42 UTC (permalink / raw)
To: openembedded-core; +Cc: Zoltán Böszörményi
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.
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
meta/recipes-core/systemd/systemd_253.1.bb | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd_253.1.bb b/meta/recipes-core/systemd/systemd_253.1.bb
index 9c2b96d3c1..c73b5e05b3 100644
--- a/meta/recipes-core/systemd/systemd_253.1.bb
+++ b/meta/recipes-core/systemd/systemd_253.1.bb
@@ -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
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 2/2] libgudev: Allow native build
2023-03-30 13:42 [PATCH 1/2] systemd: Allow native build Zoltán Böszörményi
@ 2023-03-30 13:42 ` Zoltán Böszörményi
2023-03-30 13:47 ` [OE-core] " Alexander Kanavin
2023-03-30 13:46 ` [OE-core] [PATCH 1/2] systemd: " Alexander Kanavin
2023-03-30 13:50 ` Richard Purdie
2 siblings, 1 reply; 21+ messages in thread
From: Zoltán Böszörményi @ 2023-03-30 13:42 UTC (permalink / raw)
To: openembedded-core; +Cc: Zoltán Böszörményi
libgudev-native is a dependency of libfprint-native, which
is needed to build libfprint.
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
meta/recipes-gnome/libgudev/libgudev_237.bb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/recipes-gnome/libgudev/libgudev_237.bb b/meta/recipes-gnome/libgudev/libgudev_237.bb
index 9ce43ce34b..ad3a16ab99 100644
--- a/meta/recipes-gnome/libgudev/libgudev_237.bb
+++ b/meta/recipes-gnome/libgudev/libgudev_237.bb
@@ -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
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
2023-03-30 13:42 [PATCH 1/2] systemd: Allow native build Zoltán Böszörményi
2023-03-30 13:42 ` [PATCH 2/2] libgudev: " Zoltán Böszörményi
@ 2023-03-30 13:46 ` Alexander Kanavin
2023-03-30 14:04 ` Böszörményi Zoltán
2023-03-30 13:50 ` Richard Purdie
2 siblings, 1 reply; 21+ messages in thread
From: Alexander Kanavin @ 2023-03-30 13:46 UTC (permalink / raw)
To: Zoltan Boszormenyi; +Cc: openembedded-core
Can you please point to what piece of libgudev actually requires systemd?
Alex
On Thu, 30 Mar 2023 at 15:42, Zoltan Boszormenyi <zboszor@gmail.com> wrote:
>
> 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.
>
> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
> ---
> meta/recipes-core/systemd/systemd_253.1.bb | 20 ++++++++++++++------
> 1 file changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/meta/recipes-core/systemd/systemd_253.1.bb b/meta/recipes-core/systemd/systemd_253.1.bb
> index 9c2b96d3c1..c73b5e05b3 100644
> --- a/meta/recipes-core/systemd/systemd_253.1.bb
> +++ b/meta/recipes-core/systemd/systemd_253.1.bb
> @@ -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: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 2/2] libgudev: Allow native build
2023-03-30 13:42 ` [PATCH 2/2] libgudev: " Zoltán Böszörményi
@ 2023-03-30 13:47 ` Alexander Kanavin
2023-03-30 14:01 ` Böszörményi Zoltán
0 siblings, 1 reply; 21+ messages in thread
From: Alexander Kanavin @ 2023-03-30 13:47 UTC (permalink / raw)
To: Zoltan Boszormenyi; +Cc: openembedded-core
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
On Thu, 30 Mar 2023 at 15:42, Zoltan Boszormenyi <zboszor@gmail.com> wrote:
>
> libgudev-native is a dependency of libfprint-native, which
> is needed to build libfprint.
>
> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
> ---
> meta/recipes-gnome/libgudev/libgudev_237.bb | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-gnome/libgudev/libgudev_237.bb b/meta/recipes-gnome/libgudev/libgudev_237.bb
> index 9ce43ce34b..ad3a16ab99 100644
> --- a/meta/recipes-gnome/libgudev/libgudev_237.bb
> +++ b/meta/recipes-gnome/libgudev/libgudev_237.bb
> @@ -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: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
2023-03-30 13:42 [PATCH 1/2] systemd: Allow native build Zoltán Böszörményi
2023-03-30 13:42 ` [PATCH 2/2] libgudev: " Zoltán Böszörményi
2023-03-30 13:46 ` [OE-core] [PATCH 1/2] systemd: " Alexander Kanavin
@ 2023-03-30 13:50 ` Richard Purdie
2023-03-30 14:08 ` Böszörményi Zoltán
2 siblings, 1 reply; 21+ messages in thread
From: Richard Purdie @ 2023-03-30 13:50 UTC (permalink / raw)
To: Zoltan Boszormenyi, openembedded-core
On Thu, 2023-03-30 at 15:42 +0200, Zoltan Boszormenyi wrote:
> 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.
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
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 2/2] libgudev: Allow native build
2023-03-30 13:47 ` [OE-core] " Alexander Kanavin
@ 2023-03-30 14:01 ` Böszörményi Zoltán
0 siblings, 0 replies; 21+ messages in thread
From: Böszörményi Zoltán @ 2023-03-30 14:01 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: openembedded-core
2023. 03. 30. 15:47 keltezéssel, Alexander Kanavin írta:
> 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
>
> Alex
>
>
> On Thu, 30 Mar 2023 at 15:42, Zoltan Boszormenyi <zboszor@gmail.com> wrote:
>> libgudev-native is a dependency of libfprint-native, which
>> is needed to build libfprint.
>>
>> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
>> ---
>> meta/recipes-gnome/libgudev/libgudev_237.bb | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/meta/recipes-gnome/libgudev/libgudev_237.bb b/meta/recipes-gnome/libgudev/libgudev_237.bb
>> index 9ce43ce34b..ad3a16ab99 100644
>> --- a/meta/recipes-gnome/libgudev/libgudev_237.bb
>> +++ b/meta/recipes-gnome/libgudev/libgudev_237.bb
>> @@ -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: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
2023-03-30 13:46 ` [OE-core] [PATCH 1/2] systemd: " Alexander Kanavin
@ 2023-03-30 14:04 ` Böszörményi Zoltán
0 siblings, 0 replies; 21+ messages in thread
From: Böszörményi Zoltán @ 2023-03-30 14:04 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: openembedded-core
2023. 03. 30. 15:46 keltezéssel, Alexander Kanavin írta:
> 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"
>
> Alex
>
> On Thu, 30 Mar 2023 at 15:42, Zoltan Boszormenyi <zboszor@gmail.com> wrote:
>> 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.
>>
>> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
>> ---
>> meta/recipes-core/systemd/systemd_253.1.bb | 20 ++++++++++++++------
>> 1 file changed, 14 insertions(+), 6 deletions(-)
>>
>> diff --git a/meta/recipes-core/systemd/systemd_253.1.bb b/meta/recipes-core/systemd/systemd_253.1.bb
>> index 9c2b96d3c1..c73b5e05b3 100644
>> --- a/meta/recipes-core/systemd/systemd_253.1.bb
>> +++ b/meta/recipes-core/systemd/systemd_253.1.bb
>> @@ -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: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
2023-03-30 13:50 ` Richard Purdie
@ 2023-03-30 14:08 ` Böszörményi Zoltán
2023-03-30 14:10 ` Alexander Kanavin
0 siblings, 1 reply; 21+ messages in thread
From: Böszörményi Zoltán @ 2023-03-30 14:08 UTC (permalink / raw)
To: Richard Purdie, openembedded-core
2023. 03. 30. 15:50 keltezéssel, Richard Purdie írta:
> On Thu, 2023-03-30 at 15:42 +0200, Zoltan Boszormenyi wrote:
>> 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.
> 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.
>
> 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
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
2023-03-30 14:08 ` Böszörményi Zoltán
@ 2023-03-30 14:10 ` Alexander Kanavin
2023-03-30 14:31 ` Böszörményi Zoltán
` (2 more replies)
0 siblings, 3 replies; 21+ messages in thread
From: Alexander Kanavin @ 2023-03-30 14:10 UTC (permalink / raw)
To: Zoltan Boszormenyi; +Cc: Richard Purdie, openembedded-core
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, 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
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
2023-03-30 14:10 ` Alexander Kanavin
@ 2023-03-30 14:31 ` Böszörményi Zoltán
2023-03-30 14:41 ` Alexander Kanavin
[not found] ` <175138E3E9EE1FF1.27612@lists.openembedded.org>
2023-03-30 16:39 ` Richard Purdie
2 siblings, 1 reply; 21+ messages in thread
From: Böszörményi Zoltán @ 2023-03-30 14:31 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: Richard Purdie, openembedded-core
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.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
2023-03-30 14:31 ` Böszörményi Zoltán
@ 2023-03-30 14:41 ` Alexander Kanavin
2023-03-30 14:51 ` Böszörményi Zoltán
0 siblings, 1 reply; 21+ messages in thread
From: Alexander Kanavin @ 2023-03-30 14:41 UTC (permalink / raw)
To: Böszörményi Zoltán; +Cc: Richard Purdie, openembedded-core
On Thu, 30 Mar 2023 at 16:31, Böszörményi Zoltán <zboszor@gmail.com> wrote:
> 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.
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.
> 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 a separate concern, and needs to be proposed as such.
Alex
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
[not found] ` <175138E3E9EE1FF1.27612@lists.openembedded.org>
@ 2023-03-30 14:45 ` Böszörményi Zoltán
0 siblings, 0 replies; 21+ messages in thread
From: Böszörményi Zoltán @ 2023-03-30 14:45 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: Richard Purdie, openembedded-core
2023. 03. 30. 16:31 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
> 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.
>
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<---
> The symlinks in /etc/systemd/system/bar.service.wants
> and /etc/systemd/system/baz.service.requires are 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.
> 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: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [zboszor@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
2023-03-30 14:41 ` Alexander Kanavin
@ 2023-03-30 14:51 ` Böszörményi Zoltán
2023-03-30 14:57 ` Alexander Kanavin
0 siblings, 1 reply; 21+ messages in thread
From: Böszörményi Zoltán @ 2023-03-30 14:51 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: Richard Purdie, openembedded-core
2023. 03. 30. 16:41 keltezéssel, Alexander Kanavin írta:
> On Thu, 30 Mar 2023 at 16:31, Böszörményi Zoltán <zboszor@gmail.com> wrote:
>> 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.
> 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.
>
>> 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 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.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
2023-03-30 14:51 ` Böszörményi Zoltán
@ 2023-03-30 14:57 ` Alexander Kanavin
0 siblings, 0 replies; 21+ messages in thread
From: Alexander Kanavin @ 2023-03-30 14:57 UTC (permalink / raw)
To: Böszörményi Zoltán; +Cc: Richard Purdie, openembedded-core
On Thu, 30 Mar 2023 at 16:51, Böszörményi Zoltán <zboszor@gmail.com> wrote:
> >>> 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 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
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
2023-03-30 14:10 ` Alexander Kanavin
2023-03-30 14:31 ` Böszörményi Zoltán
[not found] ` <175138E3E9EE1FF1.27612@lists.openembedded.org>
@ 2023-03-30 16:39 ` Richard Purdie
2023-03-31 9:39 ` Böszörményi Zoltán
[not found] ` <1751778F66ADC2DD.27612@lists.openembedded.org>
2 siblings, 2 replies; 21+ messages in thread
From: Richard Purdie @ 2023-03-30 16:39 UTC (permalink / raw)
To: Alexander Kanavin, Zoltan Boszormenyi; +Cc: openembedded-core
On Thu, 2023-03-30 at 16:10 +0200, Alexander Kanavin wrote:
> 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, 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
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
2023-03-30 16:39 ` Richard Purdie
@ 2023-03-31 9:39 ` Böszörményi Zoltán
[not found] ` <1751778F66ADC2DD.27612@lists.openembedded.org>
1 sibling, 0 replies; 21+ messages in thread
From: Böszörményi Zoltán @ 2023-03-31 9:39 UTC (permalink / raw)
To: Richard Purdie, Alexander Kanavin; +Cc: openembedded-core
2023. 03. 30. 18:39 keltezéssel, Richard Purdie írta:
> On Thu, 2023-03-30 at 16:10 +0200, Alexander Kanavin wrote:
>> 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, 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?
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.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
[not found] ` <1751778F66ADC2DD.27612@lists.openembedded.org>
@ 2023-03-31 9:46 ` Böszörményi Zoltán
2023-04-03 10:59 ` Ross Burton
0 siblings, 1 reply; 21+ messages in thread
From: Böszörményi Zoltán @ 2023-03-31 9:46 UTC (permalink / raw)
To: Richard Purdie, Alexander Kanavin; +Cc: openembedded-core
2023. 03. 31. 11:39 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
> 2023. 03. 30. 18:39 keltezéssel, Richard Purdie írta:
>> On Thu, 2023-03-30 at 16:10 +0200, Alexander Kanavin wrote:
>>> 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, 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?
>
> 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.
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.
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> 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: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [zboszor@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
2023-03-31 9:46 ` Böszörményi Zoltán
@ 2023-04-03 10:59 ` Ross Burton
2023-04-03 13:00 ` Böszörményi Zoltán
0 siblings, 1 reply; 21+ messages in thread
From: Ross Burton @ 2023-04-03 10:59 UTC (permalink / raw)
To: Böszörményi Zoltán
Cc: Richard Purdie, Alexander Kanavin, OE-core
On 31 Mar 2023, at 10:46, Zoltan Boszormenyi via lists.openembedded.org <zboszor=gmail.com@lists.openembedded.org> wrote:
> 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
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
2023-04-03 10:59 ` Ross Burton
@ 2023-04-03 13:00 ` Böszörményi Zoltán
2023-04-03 19:52 ` Ross Burton
0 siblings, 1 reply; 21+ messages in thread
From: Böszörményi Zoltán @ 2023-04-03 13:00 UTC (permalink / raw)
To: Ross Burton; +Cc: Richard Purdie, Alexander Kanavin, OE-core
2023. 04. 03. 12:59 keltezéssel, Ross Burton írta:
> On 31 Mar 2023, at 10:46, Zoltan Boszormenyi via lists.openembedded.org <zboszor=gmail.com@lists.openembedded.org> wrote:
>> 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.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
2023-04-03 13:00 ` Böszörményi Zoltán
@ 2023-04-03 19:52 ` Ross Burton
2023-04-04 8:31 ` Böszörményi Zoltán
0 siblings, 1 reply; 21+ messages in thread
From: Ross Burton @ 2023-04-03 19:52 UTC (permalink / raw)
To: Böszörményi Zoltán
Cc: Richard Purdie, Alexander Kanavin, OE-core
> On 3 Apr 2023, at 14:00, Böszörményi Zoltán <zboszor@gmail.com> wrote:
>
> 2023. 04. 03. 12:59 keltezéssel, Ross Burton írta:
>> On 31 Mar 2023, at 10:46, Zoltan Boszormenyi via lists.openembedded.org <zboszor=gmail.com@lists.openembedded.org> wrote:
>>> 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.
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
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [OE-core] [PATCH 1/2] systemd: Allow native build
2023-04-03 19:52 ` Ross Burton
@ 2023-04-04 8:31 ` Böszörményi Zoltán
0 siblings, 0 replies; 21+ messages in thread
From: Böszörményi Zoltán @ 2023-04-04 8:31 UTC (permalink / raw)
To: Ross Burton; +Cc: Richard Purdie, Alexander Kanavin, OE-core
2023. 04. 03. 21:52 keltezéssel, Ross Burton írta:
>
>> On 3 Apr 2023, at 14:00, Böszörményi Zoltán <zboszor@gmail.com> wrote:
>>
>> 2023. 04. 03. 12:59 keltezéssel, Ross Burton írta:
>>> On 31 Mar 2023, at 10:46, Zoltan Boszormenyi via lists.openembedded.org <zboszor=gmail.com@lists.openembedded.org> wrote:
>>>> 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.
> 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?
> 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
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2023-04-04 8:31 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-30 13:42 [PATCH 1/2] systemd: Allow native build Zoltán Böszörményi
2023-03-30 13:42 ` [PATCH 2/2] libgudev: " Zoltán Böszörményi
2023-03-30 13:47 ` [OE-core] " Alexander Kanavin
2023-03-30 14:01 ` Böszörményi Zoltán
2023-03-30 13:46 ` [OE-core] [PATCH 1/2] systemd: " Alexander Kanavin
2023-03-30 14:04 ` Böszörményi Zoltán
2023-03-30 13:50 ` Richard Purdie
2023-03-30 14:08 ` Böszörményi Zoltán
2023-03-30 14:10 ` Alexander Kanavin
2023-03-30 14:31 ` Böszörményi Zoltán
2023-03-30 14:41 ` Alexander Kanavin
2023-03-30 14:51 ` Böszörményi Zoltán
2023-03-30 14:57 ` Alexander Kanavin
[not found] ` <175138E3E9EE1FF1.27612@lists.openembedded.org>
2023-03-30 14:45 ` Böszörményi Zoltán
2023-03-30 16:39 ` Richard Purdie
2023-03-31 9:39 ` Böszörményi Zoltán
[not found] ` <1751778F66ADC2DD.27612@lists.openembedded.org>
2023-03-31 9:46 ` Böszörményi Zoltán
2023-04-03 10:59 ` Ross Burton
2023-04-03 13:00 ` Böszörményi Zoltán
2023-04-03 19:52 ` Ross Burton
2023-04-04 8:31 ` Böszörményi Zoltán
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox