From: "Zoltán Böszörményi" <zboszor@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: "Zoltán Böszörményi" <zboszor@gmail.com>
Subject: [PATCH 1/2] systemd: Allow native build
Date: Thu, 30 Mar 2023 15:42:13 +0200 [thread overview]
Message-ID: <20230330134214.2772913-1-zboszor@gmail.com> (raw)
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
next reply other threads:[~2023-03-30 13:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 13:42 Zoltán Böszörményi [this message]
2023-03-30 13:42 ` [PATCH 2/2] libgudev: Allow native build 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230330134214.2772913-1-zboszor@gmail.com \
--to=zboszor@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox