All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Kiernan" <alex.kiernan@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alex Kiernan <alex.kiernan@gmail.com>
Subject: [OE-Core][RFC PATCH 06/13] systemd: Add PACKAGECONFIG for sysvinit
Date: Thu, 26 Mar 2020 08:54:19 +0000	[thread overview]
Message-ID: <20200326085426.117209-7-alex.kiernan@gmail.com> (raw)
In-Reply-To: <20200326085426.117209-1-alex.kiernan@gmail.com>

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@gmail.com>
---

Changes in v2:
- sysvinit: moved update-rc.d RDEPENDS to PACKAGECONFIG

 meta/recipes-core/systemd/systemd_244.3.bb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb b/meta/recipes-core/systemd/systemd_244.3.bb
index bb75aa0b9b2b..79794322ba08 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=,,update-rc.d"
 # 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
@@ -562,7 +562,7 @@ 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} += "volatile-binds"
 
 RRECOMMENDS_${PN} += "systemd-extra-utils \
                       systemd-compat-units udev-hwdb \
-- 
2.17.1


  parent reply	other threads:[~2020-03-26  8:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26  8:54 [OE-Core][RFC PATCH 00/13] Systemd 245 and related updates Alex Kiernan
2020-03-26  8:54 ` [OE-Core][RFC PATCH 01/13] systemd: Use PACKAGE_BEFORE_PN, not =+ Alex Kiernan
2020-03-26  8:54 ` [OE-Core][RFC PATCH 02/13] systemd: Package udev rules explicitly Alex Kiernan
2020-03-26  8:54 ` [OE-Core][RFC PATCH 03/13] systemd: Replace nonarch_base_libdir with rootlibexecdir Alex Kiernan
2020-03-26  8:54 ` [OE-Core][RFC PATCH 04/13] systemd: Reinstate systemd-hwdb-update.service Alex Kiernan
2020-03-26  8:54 ` [OE-Core][RFC PATCH 05/13] systemd: Add sch-fq-codel to RRECOMMENDS Alex Kiernan
2020-03-26  8:54 ` Alex Kiernan [this message]
2020-03-26 14:56   ` [OE-Core][RFC PATCH 06/13] systemd: Add PACKAGECONFIG for sysvinit Adrian Bunk
2020-03-26 15:54     ` Alex Kiernan
2020-03-26 17:32       ` Adrian Bunk
2020-03-26 18:08         ` Alex Kiernan
2020-03-26 19:13           ` Adrian Bunk
2020-03-26 19:21             ` Otavio Salvador
2020-03-26 18:17         ` Andre McCurdy
2020-03-26 18:32           ` Otavio Salvador
2020-03-26 19:12             ` Adrian Bunk
2020-03-26  8:54 ` [OE-Core][RFC PATCH 07/13] systemd: Remove X11 related files when disabled Alex Kiernan
2020-03-26  8:54 ` [OE-Core][RFC PATCH 08/13] systemd: Enable smack based on DISTRO_FEATURES Alex Kiernan
2020-03-26  8:54 ` [OE-Core][RFC PATCH 09/13] systemd: Enable audit " Alex Kiernan
2020-03-26  8:54 ` [OE-Core][RFC PATCH 10/13] systemd: Enable acl " Alex Kiernan
2020-03-26  8:54 ` [OE-Core][RFC PATCH 11/13] psplash: Set RemainAfterExit on systemd units Alex Kiernan
2020-03-26  8:54 ` [OE-Core][RFC PATCH 12/13] oeqa/runtime/cases: Disable and stop systemd-timesyncd Alex Kiernan
2020-03-26  8:54 ` [OE-Core][RFC PATCH 13/13] systemd: upgrade v244.3 -> v245.2 Alex Kiernan
2020-03-26 12:27 ` [OE-Core][RFC PATCH 00/13] Systemd 245 and related updates Otavio Salvador

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=20200326085426.117209-7-alex.kiernan@gmail.com \
    --to=alex.kiernan@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.