[OE-core] [OE-Core][RFC PATCH 04/11] systemd: Add PACKAGECONFIG for sysvinit
Alex Kiernan
alex.kiernan at gmail.com
Tue Mar 17 15:22:56 UTC 2020
Add sysvinit PACKAGECONFIG which is bound to DISTRO_FEATURES, this
then disables all sysvinit handling in systemd if it isn't present.
Consolidate sysvinit handling so that when it's disabled we exclude all
sysvinit features.
Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
---
meta/recipes-core/systemd/systemd_244.3.bb | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd_244.3.bb b/meta/recipes-core/systemd/systemd_244.3.bb
index b26f3cb72d2b..7c33bde21a39 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -56,7 +56,7 @@ PAM_PLUGINS = " \
"
PACKAGECONFIG ??= " \
- ${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge polkit', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux sysvinit usrmerge polkit', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
acl \
@@ -165,6 +165,7 @@ PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp"
PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell"
PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
+PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d -Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path="
# 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):
@@ -198,7 +199,6 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \
-Dnobody-group=nobody \
-Drootlibdir=${rootlibdir} \
-Drootprefix=${rootprefix} \
- -Dsysvrcnd-path=${sysconfdir} \
-Ddefault-locale=C \
"
@@ -234,6 +234,7 @@ do_install() {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
+ install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
fi
chown root:systemd-journal ${D}/${localstatedir}/log/journal
@@ -273,7 +274,6 @@ do_install() {
sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
fi
- install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
# If polkit is setup fixup permissions and ownership
if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
@@ -560,7 +560,8 @@ FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ $
RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) util-linux-agetty util-linux-fsck"
RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
-RDEPENDS_${PN} += "volatile-binds update-rc.d"
+RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'update-rc.d', '', d)}"
+RDEPENDS_${PN} += "volatile-binds"
RRECOMMENDS_${PN} += "systemd-extra-utils \
systemd-compat-units udev-hwdb \
--
2.17.1
More information about the Openembedded-core
mailing list