Skip to content

Commit

Permalink
systemd: Add PACKAGECONFIG for sysvinit
Browse files Browse the repository at this point in the history
Add sysvinit PACKAGECONFIG which 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.

(From OE-Core rev: 39ece7b)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  • Loading branch information
akiernan authored and rpurdie committed Mar 30, 2020
1 parent 8702b79 commit 8089cef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions meta/recipes-core/systemd/systemd_244.3.bb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ PACKAGECONFIG ??= " \
set-time-epoch \
smack \
sysusers \
sysvinit \
timedated \
timesyncd \
utmp \
Expand Down Expand Up @@ -165,6 +166,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):
Expand Down Expand Up @@ -198,7 +200,6 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \
-Dnobody-group=nobody \
-Drootlibdir=${rootlibdir} \
-Drootprefix=${rootprefix} \
-Dsysvrcnd-path=${sysconfdir} \
-Ddefault-locale=C \
"

Expand Down Expand Up @@ -234,6 +235,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
Expand Down Expand Up @@ -273,7 +275,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
Expand Down Expand Up @@ -564,7 +565,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 \
Expand Down

0 comments on commit 8089cef

Please sign in to comment.