systemd upgrade to 216 and other misc fixes
v2 cover systemd upgrade to 216 and other misc fixes
systemd upgrade has been tested on
*) qemuarm
*) qemumips
*) qemuppc
*) qemux86
*) qemux86-64
The whole patchset has passed the following test case on qemux86-64. bitbake core-image-sato -ctestimage
Changes in V2:
1. merge two dhcp patches into one
2. fix commit messages to be clearer
3. use ${sysconfdir} instead of hardcoding /etc
//Chen Qi
The following changes since commit 4c0a9ccbad2889b27b4b1d2ab91215a4bdcca3ce:
python-numpy: Fix build for mips64 (2014-09-01 18:00:32 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib ChenQi/systemd-misc-fixes
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/systemd-misc-fixes
Chen Qi (24):
systemd: upgrade to 216
systemd: add PACKAGECONFIG for 'journal-upload'
systemd: make runlevel work in non-runlevel targets update-rc.d: fix logic in populate_packages_updatercd
alsa-state: fix pkg_postinst and set INHIBIT_UPDATERCD_BBCLASS
keymaps: fix for systemd
systemd: add kbd-keymaps to RRECOMMENDS of systemd-vconsole-setup
v86d: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in
DISTRO_FEATURES
systemd: add support for executing scripts under /etc/rcS.d
dhcp: add systemd service files
acpid: upgrade to 2.0.22 and add systemd support
cups: add systemd support
rpcbind: avoid entering failed status after stopping daemon
at: remove dependency on initscripts
at: inherit update-rc.d to handle sysv init script
keymaps: remove dependency on initscripts
packagegroup-core-boot: conditionally rdepend on
VIRTUAL-RUNTIME_initscripts
initscripts: mask several init scripts
keymaps: mask keymap when necessary
v86d: mask fbsetup when necessary
psplash: mask psplash in case of systemd
modutils-initscripts: mask modutils in case of systemd run-postinsts.service: remove redundant line
systemd: enable forwarding messages to syslog daemon
In Long (1):
cups: make cups daemon start correctly
meta/classes/update-rc.d.bbclass | 2 +-
meta/recipes-bsp/acpid/acpid.inc | 24 ++--
meta/recipes-bsp/acpid/acpid/acpid.service | 10 ++
.../acpid/acpid/set_socket_noblock.patch | 10 --
.../acpid/{acpid_1.0.10.bb => acpid_2.0.22.bb} | 5 +-
meta/recipes-bsp/alsa-state/alsa-state.bb | 11 +-
meta/recipes-bsp/keymaps/keymaps_1.0.bb | 32 ++++-
meta/recipes-bsp/v86d/v86d_0.1.10.bb | 17 +++
meta/recipes-connectivity/dhcp/dhcp.inc | 23 +++-
meta/recipes-connectivity/dhcp/files/dhcpd.service | 11 ++
.../dhcp/files/dhcrelay.service | 9 ++
meta/recipes-core/initscripts/initscripts_1.0.bb | 4 +
.../packagegroups/packagegroup-core-boot.bb | 2 +-
meta/recipes-core/psplash/psplash_git.bb | 10 ++
...ort-for-executing-scripts-under-etc-rcS.d.patch | 138 +++++++++++++++++++++
...ing.h-add-fake-__NR_memfd_create-for-MIPS.patch | 29 +++++
...1-uClibc-doesn-t-implement-pwritev-preadv.patch | 34 -----
...-Including-missing.h-to-get-MAX_HANDLE_SZ.patch | 29 -----
.../systemd/systemd/systemd-older-kernel.patch | 56 ---------
.../systemd/{systemd_213.bb => systemd_216.bb} | 34 +++--
.../run-postinsts/run-postinsts.service | 1 -
meta/recipes-extended/at/at/{S99at => atd.init} | 0
meta/recipes-extended/at/at_3.1.15.bb | 13 +-
meta/recipes-extended/cups/cups.inc | 24 +++-
meta/recipes-extended/cups/cups/cups.path | 8 ++
meta/recipes-extended/cups/cups/cups.service | 10 ++
meta/recipes-extended/cups/cups/cups.socket | 8 ++
.../rpcbind/rpcbind/rpcbind.service | 1 +
.../modutils-initscripts/modutils-initscripts.bb | 10 ++
29 files changed, 388 insertions(+), 177 deletions(-)
create mode 100644 meta/recipes-bsp/acpid/acpid/acpid.service
delete mode 100644 meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch
rename meta/recipes-bsp/acpid/{acpid_1.0.10.bb => acpid_2.0.22.bb} (55%)
create mode 100644 meta/recipes-connectivity/dhcp/files/dhcpd.service
create mode 100644 meta/recipes-connectivity/dhcp/files/dhcrelay.service
create mode 100644 meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch
create mode 100644 meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch
delete mode 100644 meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch
delete mode 100644 meta/recipes-core/systemd/systemd/0001-util-Including-missing.h-to-get-MAX_HANDLE_SZ.patch
delete mode 100644 meta/recipes-core/systemd/systemd/systemd-older-kernel.patch
rename meta/recipes-core/systemd/{systemd_213.bb => systemd_216.bb} (87%)
rename meta/recipes-extended/at/at/{S99at => atd.init} (100%)
create mode 100644 meta/recipes-extended/cups/cups/cups.path
create mode 100644 meta/recipes-extended/cups/cups/cups.service
create mode 100644 meta/recipes-extended/cups/cups/cups.socketSignature · 1 line
1.9.1
PATCH v2 1/25 systemd: upgrade to 216
Upgrade systemd from 213 to 216.
systemd-older-kernel.patch is removed as it's fixed in 216.
0001-uClibc-doesn-t-implement-pwritev-preadv.patch is removed because the file it patches has been removed from the project.
0001-util-Including-missing.h-to-get-MAX_HANDLE_SZ.patch is removed because it has been merged.
0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch is backported to fix compilation error for mips.
Below are the required kernel versions for systemd 216.
Linux kernel >= 3.0
Linux kernel >= 3.3 for loop device partition support features with nspawn Linux kernel >= 3.8 for Smack support
---
...ing.h-add-fake-__NR_memfd_create-for-MIPS.patch | 29 +++++++++++
...1-uClibc-doesn-t-implement-pwritev-preadv.patch | 34 -------------
...-Including-missing.h-to-get-MAX_HANDLE_SZ.patch | 29 -----------
.../systemd/systemd/systemd-older-kernel.patch | 56 ----------------------
.../systemd/{systemd_213.bb => systemd_216.bb} | 15 +++---
5 files changed, 38 insertions(+), 125 deletions(-)
create mode 100644 meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch
delete mode 100644 meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch
delete mode 100644 meta/recipes-core/systemd/systemd/0001-util-Including-missing.h-to-get-MAX_HANDLE_SZ.patch
delete mode 100644 meta/recipes-core/systemd/systemd/systemd-older-kernel.patch
rename meta/recipes-core/systemd/{systemd_213.bb => systemd_216.bb} (96%)meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch new file +29 -0
@@ -0,0 +1,29 @@ +Upstream-Status: Backport + +Subject: missing.h: add fake __NR_memfd_create for MIPS + +We don't have the correct __NR_memfd_create syscall number yet, so set it to +0xffffffff for now to prevent compile time errors. + +Signed-off-by: Chen Qi <[email protected]> +--- + src/shared/missing.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/shared/missing.h b/src/shared/missing.h +index 3ff1a21..3051cb5 100644 +--- a/src/shared/missing.h ++++ b/src/shared/missing.h +@@ -167,6 +167,9 @@ static inline int pivot_root(const char *new_root, const char *put_old) { + # define __NR_fanotify_mark 5296 + # endif + # endif ++# ifndef __NR_memfd_create ++# define __NR_memfd_create 0xffffffff /* FIXME */ ++# endif + #else + # ifndef __NR_fanotify_init + # define __NR_fanotify_init 338 +-- +1.9.1 +
meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch deleted +0 -34
@@ -1,34 +0,0 @@ -Upstream-Status: Inappropriate [uclibc specific] - -From 7be9273548bcb1f57d011fc252965e45dd2a058c Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Wed, 21 Aug 2013 19:09:27 -0700 -Subject: [PATCH] uClibc doesn't implement pwritev/preadv - -Lets stub out the testcase for building. - -Signed-off-by: Khem Raj <[email protected]> ---- - src/libsystemd-bus/test-bus-memfd.c | 2 ++ - 1 file changed, 2 insertions(+) - -Index: systemd-209/src/libsystemd/sd-bus/test-bus-memfd.c -=================================================================== ---- systemd-209.orig/src/libsystemd/sd-bus/test-bus-memfd.c 2014-02-19 15:03:09.983254602 -0800 -+++ systemd-209/src/libsystemd/sd-bus/test-bus-memfd.c 2014-02-19 23:42:10.636652864 -0800 -@@ -151,6 +151,7 @@ - /* check content */ - assert_se(memcmp(buf, "ll", 2) == 0); - -+#ifndef __UCLIBC__ - /* writev it out*/ - iov[0].iov_base = (char *)"ABC"; - iov[0].iov_len = 3; -@@ -173,6 +174,7 @@ - assert_se(memcmp(bufv[0], "ABC", 3) == 0); - assert_se(memcmp(bufv[1], "DEF", 3) == 0); - assert_se(memcmp(bufv[2], "GHI", 3) == 0); -+#endif /* __UCLIBC__ */ - - sd_memfd_free(m); -
meta/recipes-core/systemd/systemd/0001-util-Including-missing.h-to-get-MAX_HANDLE_SZ.patch deleted +0 -29
@@ -1,29 +0,0 @@ -From 764ecbeda4813f33eafd45fdc3ccb9376356f475 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Mon, 25 Aug 2014 15:40:31 -0700 -Subject: [PATCH] util: Including missing.h to get MAX_HANDLE_SZ - -Helps compiling on uclibc - -Signed-off-by: Khem Raj <[email protected]> - -Upstream-Status: [Backport] ---- - src/shared/util.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/shared/util.h b/src/shared/util.h -index 62eb604..036fc59 100644 ---- a/src/shared/util.h -+++ b/src/shared/util.h -@@ -84,6 +84,7 @@ - #endif - - #include "macro.h" -+#include "missing.h" - #include "time-util.h" - - /* What is interpreted as whitespace? */ --- -1.7.10.4 -
meta/recipes-core/systemd/systemd/systemd-older-kernel.patch deleted +0 -56
56 lines not on this page · raw message
meta/recipes-core/systemd/systemd_216.bb renamed from meta/recipes-core/systemd/systemd_213.bb +9 -6
@@ -17,9 +17,9 @@ SECTION = "base/shell" inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext -SRCREV = "c9679c652b3c31f2510e8805d81630680ebc7e95" +SRCREV = "5d0ae62c665262c4c55536457e84e278c252cc0b" -PV = "213+git${SRCPV}" +PV = "216+git${SRCPV}" SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=git \ file://binfmt-install.patch \
@@ -28,15 +28,13 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol= file://systemd-pam-fix-fallocate.patch \ file://systemd-pam-fix-mkostemp.patch \ file://optional_secure_getenv.patch \ - file://0001-uClibc-doesn-t-implement-pwritev-preadv.patch \ file://uclibc-sysinfo_h.patch \ file://uclibc-get-physmem.patch \ - file://0001-util-Including-missing.h-to-get-MAX_HANDLE_SZ.patch \ + file://0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch \ file://touchscreen.rules \ file://00-create-volatile.conf \ file://init \ file://run-ptest \ - file://systemd-older-kernel.patch \ " S = "${WORKDIR}/git"
@@ -126,6 +124,9 @@ do_install() { sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd fi + # Move libgudev back to ${rootlibdir} to keep backward compatibility + [ ${rootlibdir} != ${exec_prefix}/lib ] && mv -t ${D}${rootlibdir} ${D}${exec_prefix}/lib/libgudev* + # Delete journal README, as log can be symlinked inside volatile. rm -f ${D}/${localstatedir}/log/README }
@@ -208,6 +209,7 @@ FILES_${PN} = " ${base_bindir}/* \ ${datadir}/dbus-1/system-services \ ${datadir}/polkit-1 \ ${datadir}/${BPN} \ + ${datadir}/factory \ ${sysconfdir}/bash_completion.d/ \ ${sysconfdir}/dbus-1/ \ ${sysconfdir}/machine-id \
@@ -220,7 +222,7 @@ FILES_${PN} = " ${base_bindir}/* \ ${rootlibexecdir}/systemd/* \ ${systemd_unitdir}/* \ ${base_libdir}/security/*.so \ - ${libdir}/libnss_myhostname.so.2 \ + ${exec_prefix}/lib/libnss_* \ /cgroup \ ${bindir}/systemd* \ ${bindir}/busctl \
@@ -233,6 +235,7 @@ FILES_${PN} = " ${base_bindir}/* \ ${exec_prefix}/lib/systemd \ ${exec_prefix}/lib/modules-load.d \ ${exec_prefix}/lib/sysctl.d \ + ${exec_prefix}/lib/sysusers.d \ ${localstatedir} \ /lib/udev/rules.d/70-uaccess.rules \ /lib/udev/rules.d/71-seat.rules \
Signature · 1 line
1.9.1
PATCH v2 2/25 systemd: add PACKAGECONFIG for 'journal-upload'
In reply to Chen QiAdd PACKAGECONFIG for 'journal-upload' and disable it by default. Once enabled, it will add 'curl' to its dependency.
--- meta/recipes-core/systemd/systemd_216.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-core/systemd/systemd_216.bb +1 -0
@@ -47,6 +47,7 @@ LDFLAGS_append_libc-uclibc = " -lrt" GTKDOC_DOCDIR = "${S}/docs/" PACKAGECONFIG ??= "xz" +PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl" # Sign the journal for anti-tampering PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt" # regardless of PACKAGECONFIG, libgcrypt is always required to expand
Signature · 1 line
1.9.1
PATCH v2 3/25 systemd: make runlevel work in non-runlevel targets
In reply to Chen QiPreviously, after booting into the targets like multi-user.target or graphical.target, the output of `runlevel' command is 'unknown'.
This is confusing for users. Normally, we would expect mutli-user.target would have a `runlevel' output of 'N 3'.
This is the behaviour of Fedora20.
This patch installs symlinks for systemd-update-utmp-runlevel.service in do_install task to fix the above problem.
--- meta/recipes-core/systemd/systemd_216.bb | 12 ++++++++++++ 1 file changed, 12 insertions(+)
meta/recipes-core/systemd/systemd_216.bb +12 -0
@@ -130,6 +130,18 @@ do_install() { # Delete journal README, as log can be symlinked inside volatile. rm -f ${D}/${localstatedir}/log/README + + # Create symlinks for systemd-update-utmp-runlevel.service + install -d ${D}${systemd_unitdir}/system/graphical.target.wants + install -d ${D}${systemd_unitdir}/system/multi-user.target.wants + install -d ${D}${systemd_unitdir}/system/poweroff.target.wants + install -d ${D}${systemd_unitdir}/system/reboot.target.wants + install -d ${D}${systemd_unitdir}/system/rescue.target.wants + ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service + ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service + ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service + ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service + ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service } do_install_ptest () {
Signature · 1 line
1.9.1
PATCH v2 4/25 update-rc.d: fix logic in populate_packages_updatercd
In reply to Chen QiThe 'and' logic for the check is wrong. To make things clear, please see the example below.
Say that we have a recipe A, which has a sysv-init style init script named initA and no corresponding service file. The recipe inherits update-rc.d, but it doesn't inherit systemd.bbclass. The DISTRO_FEATURES has 'systemd' inside it, but it doesn't have 'sysvinit'. Now if we build an image, with the 'and' logic in the check, the symlinks for initA would not be installed into /etc/rc?.d directory.
This is incorrect. Because there's no corresponding service. The symlinks in /etc/rc?.d/ should be created so that the service would be correctly started at boot time.
The logic should really be 'or' in the check. This is actually what the code was when it was originally written.
Several different situations are listed below to prove the correctness of the 'or' logic.
If 'sysvinit' is in DISTRO_FEATURES, the initA script would always be installed with corresponding preisnt/postinst generated and added.
If 'sysvinit' is not in DISTRO_FEATURES, we have three situations.
1) A has initA and A.service.
In such situation, systemd.bbclass would set INHIBIT_UPDATERCD_BBCLASS, so no preinst/postinst about update-rc.d would be added and the symlinks for initA would not be created.
2) A has initA, and the functionality of initA is not implemented internally in systemd.
In such situation, symlinks for initA would be installed.
3) A has initA, and the functionality of initA is implemented internally in systemd or in some other recipe.
Examples for such situation are alsa-state and keymaps in OE. In such situation, we need to set INHIBIT_UPDATERCD_BBCLASS in the recipe so that there would be no preinst/postinst scripts about update-rc.d added.
--- meta/classes/update-rc.d.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/update-rc.d.bbclass +1 -1
@@ -121,7 +121,7 @@ python populate_packages_updatercd () { # Check that this class isn't being inhibited (generally, by # systemd.bbclass) before doing any work. - if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \ + if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) or \ not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True): pkgs = d.getVar('INITSCRIPT_PACKAGES', True) if pkgs == None:
Signature · 1 line
1.9.1
PATCH v2 5/25 alsa-state: fix pkg_postinst and set INHIBIT_UPDATERCD_BBCLASS
In reply to Chen QiAs alsa-state inherits update-rc.d, the update-rc.d part inpostinst script has already been handled in update-rc.d.bbclass.
Besides, we need to set INHIBIT_UPDATERCD_BBCLASS to "1" if 'sysvinit' is not in DISTRO_FEATURES. This is because the init script is not installed in such situation, adding update-rc.d part in the preinst/postinst scripts just makes no sense.
--- meta/recipes-bsp/alsa-state/alsa-state.bb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
meta/recipes-bsp/alsa-state/alsa-state.bb +7 -4
@@ -18,6 +18,13 @@ SRC_URI = "\ file://alsa-state-init \ " +# As the recipe doesn't inherit systemd.bbclass, we need to set this variable +# manually to avoid unnecessary postinst/preinst generated. +python __anonymous() { + if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): + d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") +} + inherit update-rc.d INITSCRIPT_NAME = "alsa-state"
@@ -54,9 +61,5 @@ pkg_postinst_${PN}() { then ${sbindir}/alsactl -f ${localstatedir}/lib/alsa/asound.state restore fi - # INITSCRIPT_PARAMS changed, so remove the old and - # install the new setting. - update-rc.d -f ${INITSCRIPT_NAME} remove - update-rc.d ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS} fi }
Signature · 1 line
1.9.1
PATCH v2 6/25 keymaps: fix for systemd
In reply to Chen QiOnly install 'keymap.sh' script if 'sysvinit' is in DISTRO_FEATURES. This is because systemd internally provides a mechanism to implement the functionality this script tries to implement. Please see systemd-vconsole-setup.service for more details.
Also we set 'INHIBIT_UPDATERCD_BBCLASS' to "1" if 'sysvinit' is not in DISTRO_FEATURES.
--- meta/recipes-bsp/keymaps/keymaps_1.0.bb | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)
meta/recipes-bsp/keymaps/keymaps_1.0.bb +15 -2
@@ -14,6 +14,13 @@ PR = "r31" INHIBIT_DEFAULT_DEPS = "1" +# As the recipe doesn't inherit systemd.bbclass, we need to set this variable +# manually to avoid unnecessary postinst/preinst generated. +python __anonymous() { + if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): + d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") +} + inherit update-rc.d SRC_URI = "file://keymap.sh \
@@ -23,6 +30,12 @@ INITSCRIPT_NAME = "keymap.sh" INITSCRIPT_PARAMS = "start 01 S ." do_install () { - install -d ${D}${sysconfdir}/init.d/ - install -m 0755 ${WORKDIR}/keymap.sh ${D}${sysconfdir}/init.d/ + # Only install the script if 'sysvinit' is in DISTRO_FEATURES + # THe ulitity this script provides could be achieved by systemd-vconsole-setup.service + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/keymap.sh ${D}${sysconfdir}/init.d/ + fi } + +ALLOW_EMPTY_${PN} = "1"
Signature · 1 line
1.9.1
PATCH v2 7/25 systemd: add kbd-keymaps to RRECOMMENDS of systemd-vconsole-setup
In reply to Chen Qisystemd-vconsole-setup.service not only configures font but also keymaps.
--- meta/recipes-core/systemd/systemd_216.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_216.bb +1 -1
@@ -209,7 +209,7 @@ FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \ ${systemd_unitdir}/system/systemd-binfmt.service" RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc" -RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts" +RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps" CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \ ${sysconfdir}/systemd/logind.conf \
Signature · 1 line
1.9.1
PATCH v2 8/25 v86d: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in DISTRO_FEATURES
In reply to Chen QiSet INHIBIT_UPDATERCD_BBCLASS to "1" if 'sysvinit' is not in DISTRO_FEATURES.
The functionality of the init script 'fbsetup' is implemented internally in systemd. So fbsetup is not installed if 'sysvinit' is in DISTRO_FEATURES.
That's why we need to set INHIBIT_UPDATERCD_BBCLASS to "1" to avoid generation of update-rc.d related preinst/postinst scripts.
--- meta/recipes-bsp/v86d/v86d_0.1.10.bb | 7 +++++++ 1 file changed, 7 insertions(+)
meta/recipes-bsp/v86d/v86d_0.1.10.bb +7 -0
@@ -49,4 +49,11 @@ do_install () { fi } +# As the recipe doesn't inherit systemd.bbclass, we need to set this variable +# manually to avoid unnecessary postinst/preinst generated. +python __anonymous() { + if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): + d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") +} + inherit update-rc.d
Signature · 1 line
1.9.1
PATCH v2 9/25 systemd: add support for executing scripts under /etc/rcS.d
In reply to Chen QiThis patch adds support for systemd to execute scripts under /etc/rcS.d.
To be compitable, all services translated from /etc/rcS.d/ scripts would run before services translated from /etc/rcN.d scripts.
[YOCTO #5159]
--- ...ort-for-executing-scripts-under-etc-rcS.d.patch | 138 +++++++++++++++++++++ meta/recipes-core/systemd/systemd_216.bb | 1 + 2 files changed, 139 insertions(+) create mode 100644 meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch
meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch new file +138 -0
@@ -0,0 +1,138 @@ +Upstream-Status: Inappropriate [OE specific] + +Subject: add support for executing scripts under /etc/rcS.d/ + +To be compatible, all services translated from scripts under /etc/rcS.d would +run before services translated from scripts under /etc/rcN.d. + +Signed-off-by: Chen Qi <[email protected]> +--- + src/sysv-generator/sysv-generator.c | 50 ++++++++++++++++++++++++++++--------- + 1 file changed, 38 insertions(+), 12 deletions(-) + +diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c +index 9a869ba..10c55c0 100644 +--- a/src/sysv-generator/sysv-generator.c ++++ b/src/sysv-generator/sysv-generator.c +@@ -43,7 +43,8 @@ + + typedef enum RunlevelType { + RUNLEVEL_UP, +- RUNLEVEL_DOWN ++ RUNLEVEL_DOWN, ++ RUNLEVEL_SYSINIT + } RunlevelType; + + static const struct { +@@ -58,6 +59,9 @@ static const struct { + { "rc4.d", SPECIAL_RUNLEVEL4_TARGET, RUNLEVEL_UP }, + { "rc5.d", SPECIAL_RUNLEVEL5_TARGET, RUNLEVEL_UP }, + ++ /* Debian style rcS.d, also adopted by OE */ ++ { "rcS.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT}, ++ + /* Standard SysV runlevels for shutdown */ + { "rc0.d", SPECIAL_POWEROFF_TARGET, RUNLEVEL_DOWN }, + { "rc6.d", SPECIAL_REBOOT_TARGET, RUNLEVEL_DOWN } +@@ -66,7 +70,7 @@ static const struct { + directories in this order, and we want to make sure that + sysv_start_priority is known when we first load the + unit. And that value we only know from S links. Hence +- UP must be read before DOWN */ ++ UP/SYSINIT must be read before DOWN */ + }; + + typedef struct SysvStub { +@@ -82,6 +86,8 @@ typedef struct SysvStub { + char **conflicts; + bool has_lsb; + bool reload; ++ bool default_dependencies; ++ bool from_rcsd; + } SysvStub; + + const char *arg_dest = "/tmp"; +@@ -156,6 +162,9 @@ static int generate_unit_file(SysvStub *s) { + "Description=%s\n", + s->path, s->description); + ++ if (!s->default_dependencies) ++ fprintf(f, "DefaultDependencies=no\n"); ++ + if (!isempty(before)) + fprintf(f, "Before=%s\n", before); + if (!isempty(after)) +@@ -661,18 +670,30 @@ static int fix_order(SysvStub *s, Hashmap *all_services) { + if (s->has_lsb && other->has_lsb) + continue; + +- if (other->sysv_start_priority < s->sysv_start_priority) { +- r = strv_extend(&s->after, other->name); ++ /* All scripts under /etc/rcS.d should execute before scripts under ++ * /etc/rcN.d */ ++ if (!other->from_rcsd && s->from_rcsd) { ++ r = strv_extend(&s->before, other->name); + if (r < 0) + return log_oom(); +- } +- else if (other->sysv_start_priority > s->sysv_start_priority) { +- r = strv_extend(&s->before, other->name); ++ } else if (other->from_rcsd && !s->from_rcsd) { ++ r = strv_extend(&s->after, other->name); + if (r < 0) + return log_oom(); +- } +- else +- continue; ++ } else { ++ if (other->sysv_start_priority < s->sysv_start_priority) { ++ r = strv_extend(&s->after, other->name); ++ if (r < 0) ++ return log_oom(); ++ } ++ else if (other->sysv_start_priority > s->sysv_start_priority) { ++ r = strv_extend(&s->before, other->name); ++ if (r < 0) ++ return log_oom(); ++ } ++ else ++ continue; ++ } + + /* FIXME: Maybe we should compare the name here lexicographically? */ + } +@@ -725,6 +746,8 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) { + return log_oom(); + + service->sysv_start_priority = -1; ++ service->default_dependencies = true; ++ service->from_rcsd = false; + service->name = name; + service->path = fpath; + +@@ -810,9 +833,11 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) { + + if (de->d_name[0] == 'S') { + +- if (rcnd_table[i].type == RUNLEVEL_UP) { ++ if (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type == RUNLEVEL_SYSINIT) { + service->sysv_start_priority = + MAX(a*10 + b, service->sysv_start_priority); ++ service->default_dependencies = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?false:true; ++ service->from_rcsd = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?true:false; + } + + r = set_ensure_allocated(&runlevel_services[i], +@@ -825,7 +850,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) { + goto finish; + + } else if (de->d_name[0] == 'K' && +- (rcnd_table[i].type == RUNLEVEL_DOWN)) { ++ (rcnd_table[i].type == RUNLEVEL_DOWN || ++ rcnd_table[i].type == RUNLEVEL_SYSINIT)) { + + r = set_ensure_allocated(&shutdown_services, + trivial_hash_func, trivial_compare_func); +-- +1.9.1 +
meta/recipes-core/systemd/systemd_216.bb +1 -0
@@ -30,6 +30,7 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol= file://optional_secure_getenv.patch \ file://uclibc-sysinfo_h.patch \ file://uclibc-get-physmem.patch \ + file://0001-add-support-for-executing-scripts-under-etc-rcS.d.patch \ file://0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch \ file://touchscreen.rules \ file://00-create-volatile.conf \
Signature · 1 line
1.9.1
PATCH v2 10/25 dhcp: add systemd service files
In reply to Chen QiAdd dhcpd.service and dhcrelay.service to support systemd systems.
--- meta/recipes-connectivity/dhcp/dhcp.inc | 23 ++++++++++++++++++---- meta/recipes-connectivity/dhcp/files/dhcpd.service | 11 +++++++++++ .../dhcp/files/dhcrelay.service | 9 +++++++++ 3 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 meta/recipes-connectivity/dhcp/files/dhcpd.service create mode 100644 meta/recipes-connectivity/dhcp/files/dhcrelay.service
meta/recipes-connectivity/dhcp/dhcp.inc +19 -4
@@ -14,11 +14,19 @@ DEPENDS = "openssl bind" SRC_URI = "ftp://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \ file://site.h \ - file://init-relay file://default-relay \ - file://init-server file://default-server \ - file://dhclient.conf file://dhcpd.conf" + file://init-relay file://default-relay \ + file://init-server file://default-server \ + file://dhclient.conf file://dhcpd.conf \ + file://dhcpd.service file://dhcrelay.service" -inherit autotools +inherit autotools systemd + +SYSTEMD_PACKAGES = "dhcp-server dhcp-relay" +SYSTEMD_SERVICE_dhcp-server = "dhcpd.service" +SYSTEMD_AUTO_ENABLE_dhcp-server = "disable" + +SYSTEMD_SERVICE_dhcp-relay = "dhcrelay.service" +SYSTEMD_AUTO_ENABLE_dhcp-relay = "disable" TARGET_CFLAGS += "-D_GNU_SOURCE" EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
@@ -51,6 +59,13 @@ do_install_append () { mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/ fi install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script + + # Install systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/dhcpd.service ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/dhcrelay.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcpd.service ${D}${systemd_unitdir}/system/dhcrelay.service + sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcpd.service } PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell"
meta/recipes-connectivity/dhcp/files/dhcpd.service new file +11 -0
@@ -0,0 +1,11 @@ +[Unit] +Description=DHCP Server Daemon +After=network.target +After=time-sync.target + +[Service] +EnvironmentFile=@SYSCONFDIR@/default/dhcp-server +ExecStart=-@SBINDIR@/dhcpd -q $INTERFACES + +[Install] +WantedBy=multi-user.target
meta/recipes-connectivity/dhcp/files/dhcrelay.service new file +9 -0
@@ -0,0 +1,9 @@ +[Unit] +Description=DHCP Relay Agent Daemon +After=network.target + +[Service] +ExecStart=@SBINDIR@/dhcrelay -d --no-pid + +[Install] +WantedBy=multi-user.target
Signature · 1 line
1.9.1
PATCH v2 11/25 acpid: upgrade to 2.0.22 and add systemd support
In reply to Chen QiFor acpid needs to upgrade to work correctly with the new kernel. The new version now uses autotools.
Also add systemd unit file.
---
meta/recipes-bsp/acpid/acpid.inc | 24 ++++++++++------------
meta/recipes-bsp/acpid/acpid/acpid.service | 10 +++++++++
.../acpid/acpid/set_socket_noblock.patch | 10 ---------
.../acpid/{acpid_1.0.10.bb => acpid_2.0.22.bb} | 5 ++---
4 files changed, 23 insertions(+), 26 deletions(-)
create mode 100644 meta/recipes-bsp/acpid/acpid/acpid.service
delete mode 100644 meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch
rename meta/recipes-bsp/acpid/{acpid_1.0.10.bb => acpid_2.0.22.bb} (55%)meta/recipes-bsp/acpid/acpid.inc +11 -13
@@ -4,30 +4,28 @@ BUGTRACKER = "http://sourceforge.net/tracker/?group_id=33140&atid=407341" SECTION = "base" LICENSE = "GPLv2+" -SRC_URI = "${SOURCEFORGE_MIRROR}/acpid/acpid-${PV}.tar.gz \ +SRC_URI = "${SOURCEFORGE_MIRROR}/acpid2/acpid-${PV}.tar.xz \ file://init \ - file://set_socket_noblock.patch " + file://acpid.service \ + " -inherit update-rc.d +inherit autotools update-rc.d systemd INITSCRIPT_NAME = "acpid" INITSCRIPT_PARAMS = "defaults" -# Makefile ignores our CFLAGS, so override it. -# -EXTRA_OEMAKE = "CFLAGS='-W -Wall -Werror -Wundef -Wshadow ${CFLAGS} $(DEFS)'" +SYSTEMD_PACKAGES = "acpid" +SYSTEMD_SERVICE_acpid = "acpid.service" -do_compile () { - oe_runmake 'CC=${CC} -D_GNU_SOURCE' 'CROSS=${HOST_PREFIX}' -} - -do_install () { - install -d ${D}${bindir} - oe_runmake 'INSTPREFIX=${D}' install +do_install_append () { install -d ${D}${sysconfdir}/init.d sed -e 's,/usr/sbin,${sbindir},g' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/acpid chmod 755 ${D}${sysconfdir}/init.d/acpid install -d ${D}${sysconfdir}/acpi install -d ${D}${sysconfdir}/acpi/events + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/acpid.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/acpid.service }
meta/recipes-bsp/acpid/acpid/acpid.service new file +10 -0
@@ -0,0 +1,10 @@ +[Unit] +Description=ACPI Event Daemon +After=syslog.target + +[Service] +Type=forking +ExecStart=@SBINDIR@/acpid + +[Install] +WantedBy=multi-user.target
meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch deleted +0 -10
@@ -1,10 +0,0 @@ ---- a/acpid.c -+++ b/acpid.c -@@ -307,6 +307,7 @@ main(int argc, char **argv) - non_root_clients++; - } - fcntl(cli_fd, F_SETFD, FD_CLOEXEC); -+ fcntl(cli_fd, F_SETFL, O_NONBLOCK); - snprintf(buf, sizeof(buf)-1, "%d[%d:%d]", - creds.pid, creds.uid, creds.gid); - acpid_add_client(cli_fd, buf);
meta/recipes-bsp/acpid/acpid_2.0.22.bb renamed from meta/recipes-bsp/acpid/acpid_1.0.10.bb +2 -3
@@ -3,6 +3,5 @@ require acpid.inc LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ file://acpid.h;endline=24;md5=324a9cf225ae69ddaad1bf9d942115b5" - -SRC_URI[md5sum] = "61156ef32015c56dc0f2e3317f4ae09e" -SRC_URI[sha256sum] = "22703ce0dd7305aca01bc9ac741659c32b1593f1d6fde492df7f01067a534760" +SRC_URI[md5sum] = "c8ba756030d1b21fc973ec3d640f27f1" +SRC_URI[sha256sum] = "3d11454f4283c8f771d8dbd5eb6b5f2bbd9d94d9f77d68bab89e35d98b67ab31"
Signature · 1 line
1.9.1
PATCH v2 12/25 cups: make cups daemon start correctly
In reply to Chen QiFrom: In Long <[email protected]>
The cups daemon needs the lpadmin group to start correctly.
Also add 'procps' to RDEPENDS if 'sysvinit' is in DISTRO_FEATURES, because the init script shipped with cups needs it.
--- meta/recipes-extended/cups/cups.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-extended/cups/cups.inc +5 -1
@@ -12,7 +12,10 @@ SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \ LEAD_SONAME = "libcupsdriver.so" -inherit autotools-brokensep binconfig +inherit autotools-brokensep binconfig useradd + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system lpadmin" PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
@@ -79,6 +82,7 @@ python do_package_append() { PACKAGES =+ "${PN}-lib ${PN}-libimage" +RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}" FILES_${PN} += "${libdir}/cups/backend \ ${libdir}/cups/cgi-bin \ ${libdir}/cups/filter \
Signature · 1 line
1.9.1
PATCH v2 13/25 cups: add systemd support
In reply to Chen QiAdd systemd unit files.
Also remove sysvinit related files if 'sysvinit' is not in DISTRO_FEATURES.
--- meta/recipes-extended/cups/cups.inc | 20 +++++++++++++++++++- meta/recipes-extended/cups/cups/cups.path | 8 ++++++++ meta/recipes-extended/cups/cups/cups.service | 10 ++++++++++ meta/recipes-extended/cups/cups/cups.socket | 8 ++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-extended/cups/cups/cups.path create mode 100644 meta/recipes-extended/cups/cups/cups.service create mode 100644 meta/recipes-extended/cups/cups/cups.socket
meta/recipes-extended/cups/cups.inc +19 -1
@@ -8,15 +8,20 @@ SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \ file://0001-don-t-try-to-run-generated-binaries.patch \ file://cups_serverbin.patch \ file://cups-no-gcrypt.patch \ + file://cups.socket \ + file://cups.path \ + file://cups.service \ " LEAD_SONAME = "libcupsdriver.so" -inherit autotools-brokensep binconfig useradd +inherit autotools-brokensep binconfig useradd systemd USERADD_PACKAGES = "${PN}" GROUPADD_PARAM_${PN} = "--system lpadmin" +SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service" + PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
@@ -71,6 +76,19 @@ fakeroot do_install () { # Remove /var/run from package as cupsd will populate it on startup rm -fr ${D}/${localstatedir}/run rmdir ${D}/${libdir}/${BPN}/driver + + # Remove sysinit script and symlinks if sysvinit is not in DISTRO_FEATURES + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then + rm -rf ${D}${sysconfdir}/init.d/ + rm -rf ${D}${sysconfdir}/rc* + fi + + # Install systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/cups.socket ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/cups.path ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/cups.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/cups.service } python do_package_append() {
meta/recipes-extended/cups/cups/cups.path new file +8 -0
@@ -0,0 +1,8 @@ +[Unit] +Description=CUPS Printer Service Spool + +[Path] +PathExistsGlob=/var/spool/cups/d* + +[Install] +WantedBy=multi-user.target
meta/recipes-extended/cups/cups/cups.service new file +10 -0
@@ -0,0 +1,10 @@ +[Unit] +Description=CUPS Printing Service + +[Service] +ExecStart=@SBINDIR@/cupsd -f +PrivateTmp=true + +[Install] +Also=cups.socket cups.path +WantedBy=printer.target
meta/recipes-extended/cups/cups/cups.socket new file +8 -0
@@ -0,0 +1,8 @@ +[Unit] +Description=CUPS Printing Service Sockets + +[Socket] +ListenStream=/var/run/cups/cups.sock + +[Install] +WantedBy=sockets.target
Signature · 1 line
1.9.1
PATCH v2 14/25 rpcbind: avoid entering failed status after stopping daemon
In reply to Chen QiExiting with '2' is actually expected with rpcbind, because it catches SIGTERM and exits with '2' explicitly.
The related code is as follows.
(void) signal(SIGTERM, terminate);
/*
* Catch the signal and die
*/
static voidterminate(int dummy /*__unused*/)
{
close(rpcbindlockfd);
unlink(_PATH_RPCBINDSOCK);
unlink(RPCBINDDLOCK);
syslog(LOG_ERR,
"rpcbind terminating on signal. Restart with \"rpcbind -w\"");
write_warmstart(); /* Dump yourself */
exit(2);
}--- meta/recipes-extended/rpcbind/rpcbind/rpcbind.service | 1 + 1 file changed, 1 insertion(+)
meta/recipes-extended/rpcbind/rpcbind/rpcbind.service +1 -0
@@ -9,6 +9,7 @@ Type=forking EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS Restart=always +SuccessExitStatus=2 [Install] WantedBy=multi-user.target
Signature · 1 line
1.9.1
PATCH v2 15/25 at: remove dependency on initscripts
In reply to Chen QiThe 'at' package actually doesn't have runtime dependency on VIRTUAL-RUNTIME_initscripts, so remove this dependency.
--- meta/recipes-extended/at/at_3.1.15.bb | 2 -- 1 file changed, 2 deletions(-)
meta/recipes-extended/at/at_3.1.15.bb +0 -2
@@ -7,9 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4" DEPENDS = "flex flex-native \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" -VIRTUAL-RUNTIME_initscripts ?= "initscripts" RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \ - ${VIRTUAL-RUNTIME_initscripts} \ " PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
Signature · 1 line
1.9.1
PATCH v2 16/25 at: inherit update-rc.d to handle sysv init script
In reply to Chen QiInherit update-rc.d.bbclass to handle sysv init script. Also make the 'at' daemon start in runlevel 2,3,4,5 instead of S.
---
meta/recipes-extended/at/at/{S99at => atd.init} | 0
meta/recipes-extended/at/at_3.1.15.bb | 11 ++++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
rename meta/recipes-extended/at/at/{S99at => atd.init} (100%)meta/recipes-extended/at/at/atd.init renamed from meta/recipes-extended/at/at/S99at +0 -0
meta/recipes-extended/at/at_3.1.15.bb +6 -5
@@ -20,7 +20,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \ file://posixtm.c \ file://posixtm.h \ file://file_replacement_with_gplv2.patch \ - file://S99at \ + file://atd.init \ file://atd.service \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
@@ -37,7 +37,10 @@ EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \ --with-atspool=/var/spool/at/spool \ ac_cv_header_security_pam_appl_h=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} " -inherit autotools-brokensep systemd +inherit autotools-brokensep systemd update-rc.d + +INITSCRIPT_NAME = "atd" +INITSCRIPT_PARAMS = "defaults" SYSTEMD_SERVICE_${PN} = "atd.service"
@@ -51,9 +54,7 @@ do_install () { oe_runmake -e "IROOT=${D}" install install -d ${D}${sysconfdir}/init.d - install -d ${D}${sysconfdir}/rcS.d - install -m 0755 ${WORKDIR}/S99at ${D}${sysconfdir}/init.d/atd - ln -sf ../init.d/atd ${D}${sysconfdir}/rcS.d/S99at + install -m 0755 ${WORKDIR}/atd.init ${D}${sysconfdir}/init.d/atd # install systemd unit files install -d ${D}${systemd_unitdir}/system
Signature · 1 line
1.9.1
PATCH v2 17/25 keymaps: remove dependency on initscripts
In reply to Chen QiThe 'keymaps' package actually doesn't have runtime dependency on VIRTUAL-RUNTIME_initscripts, thus removing this dependency.
--- meta/recipes-bsp/keymaps/keymaps_1.0.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
meta/recipes-bsp/keymaps/keymaps_1.0.bb +1 -4
@@ -2,10 +2,7 @@ SUMMARY = "Keyboard maps" DESCRIPTION = "Keymaps and initscript to set the keymap on bootup." SECTION = "base" -# Distro can override initscripts provider -VIRTUAL-RUNTIME_initscripts ?= "initscripts" - -RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_initscripts} kbd" +RDEPENDS_${PN} = "kbd" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
Signature · 1 line
1.9.1
PATCH v2 18/25 packagegroup-core-boot: conditionally rdepend on VIRTUAL-RUNTIME_initscripts
In reply to Chen QiIf we are building a systemd image with 'sysvinit' not in DISTRO_FEATURES, the initscripts should not be installed into the image, as they are useless. What's more, we as now support executing scripts under /etc/rcS.d, the boot time will be increased by these scripts as the systemd will try to translate them into temporary service files.
These init scritps are actually needed only when 'sysvinit' is in DISTRO_FEATURES.
--- meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/packagegroups/packagegroup-core-boot.bb +1 -1
@@ -27,6 +27,7 @@ VIRTUAL-RUNTIME_keymaps ?= "keymaps" SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', 'busybox-hwclock', '', d)} \ modutils-initscripts \ init-ifupdown \ + ${VIRTUAL-RUNTIME_initscripts} \ " RDEPENDS_${PN} = "\
@@ -38,7 +39,6 @@ RDEPENDS_${PN} = "\ netbase \ ${VIRTUAL-RUNTIME_login_manager} \ ${VIRTUAL-RUNTIME_init_manager} \ - ${VIRTUAL-RUNTIME_initscripts} \ ${VIRTUAL-RUNTIME_dev_manager} \ ${VIRTUAL-RUNTIME_update-alternatives} \ ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"
Signature · 1 line
1.9.1
PATCH v2 19/25 initscripts: mask several init scripts
In reply to Chen QiWe now support executing scripts under /etc/rcS.d. So we need to mask several more init scripts here to prevent them from running at boot time.
--- meta/recipes-core/initscripts/initscripts_1.0.bb | 4 ++++ 1 file changed, 4 insertions(+)
meta/recipes-core/initscripts/initscripts_1.0.bb +4 -0
@@ -139,11 +139,15 @@ do_install () { MASKED_SCRIPTS = " \ banner \ bootmisc \ + checkfs \ checkroot \ devpts \ + dmesg \ hostname \ mountall \ mountnfs \ + populate-volatile \ + read-only-rootfs-hook \ rmnologin \ sysfs \ urandom"
Signature · 1 line
1.9.1
PATCH v2 20/25 keymaps: mask keymap when necessary
In reply to Chen QiWhen 'sysvinit' and 'systemd' are both in DISTRO_FEATURES, we need to prevent the init script from running via systemd.
This is because that the functionality of the init script has implemented in systemd internally.
--- meta/recipes-bsp/keymaps/keymaps_1.0.bb | 10 ++++++++++ 1 file changed, 10 insertions(+)
meta/recipes-bsp/keymaps/keymaps_1.0.bb +10 -0
@@ -35,4 +35,14 @@ do_install () { fi } +DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" +pkg_postinst_${PN} () { + if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then + if [ -n "$D" ]; then + OPTS="--root=$D" + fi + systemctl $OPTS mask keymap.service + fi +} + ALLOW_EMPTY_${PN} = "1"
Signature · 1 line
1.9.1
PATCH v2 21/25 v86d: mask fbsetup when necessary
In reply to Chen QiWhen 'sysvinit' and 'systemd' are both in DISTRO_FEATURES, we need to prevent the init script from running via systemd.
This is because that the functionality has been implemented internally in systemd.
--- meta/recipes-bsp/v86d/v86d_0.1.10.bb | 10 ++++++++++ 1 file changed, 10 insertions(+)
meta/recipes-bsp/v86d/v86d_0.1.10.bb +10 -0
@@ -57,3 +57,13 @@ python __anonymous() { } inherit update-rc.d + +DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" +pkg_postinst_${PN} () { + if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then + if [ -n "$D" ]; then + OPTS="--root=$D" + fi + systemctl $OPTS mask fbsetup.service + fi +}
Signature · 1 line
1.9.1
PATCH v2 22/25 psplash: mask psplash in case of systemd
In reply to Chen QiWe need to prevent the psplash init script from running via systemd because the script is supposed to be used by sysvinit system and it doesn't have any real effect in a systemd based system.
--- meta/recipes-core/psplash/psplash_git.bb | 10 ++++++++++ 1 file changed, 10 insertions(+)
meta/recipes-core/psplash/psplash_git.bb +10 -0
@@ -109,3 +109,13 @@ FILES_${PN} += "/mnt/.psplash" INITSCRIPT_NAME = "psplash.sh" INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ." + +DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" +pkg_postinst_${PN} () { + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + if [ -n "$D" ]; then + OPTS="--root=$D" + fi + systemctl $OPTS mask psplash.service + fi +}
Signature · 1 line
1.9.1
PATCH v2 23/25 modutils-initscripts: mask modutils in case of systemd
In reply to Chen QiWe need to prevent the init script from running via systemd because its functionality has been implemented interanlly in systemd.
In a systemd system, we can add configuration files under /etc/modules-load.d/ to make things work.
--- .../modutils-initscripts/modutils-initscripts.bb | 10 ++++++++++ 1 file changed, 10 insertions(+)
meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb +10 -0
@@ -18,3 +18,13 @@ do_install () { install -d ${D}${sysconfdir}/init.d/ install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/ } + +DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" +pkg_postinst_${PN} () { + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + if [ -n "$D" ]; then + OPTS="--root=$D" + fi + systemctl $OPTS mask modutils.service + fi +}
Signature · 1 line
1.9.1
PATCH v2 24/25 run-postinsts.service: remove redundant line
In reply to Chen QiThe basic.target itself requires sysinit.target, so there's no need to write this redundant line in the run-postinsts unit file.
--- meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service | 1 - 1 file changed, 1 deletion(-)
meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service +0 -1
@@ -13,5 +13,4 @@ RemainAfterExit=No TimeoutSec=0 [Install] -WantedBy=basic.target WantedBy=sysinit.target
Signature · 1 line
1.9.1
PATCH v2 25/25 systemd: enable forwarding messages to syslog daemon
In reply to Chen QiIn systemd_216, journald by default doesn't forward messages to syslog daemon. This breaks the oeqa testing cases. So we enable forwarding the messages for now.
--- meta/recipes-core/systemd/systemd_216.bb | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-core/systemd/systemd_216.bb +3 -0
@@ -143,6 +143,9 @@ do_install() { ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service + + # Enable journal to forward message to syslog daemon + sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf } do_install_ptest () {
Signature · 1 line
1.9.1