Bug 7732

Summary: lsb start_daemon is broken
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Richard Tollerton <rich.tollerton>
Component: deploymentAssignee: Alex Franco <alejandro.franco>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: anibal.limon, benjamin.esquivel, sgw
Version: unspecified   
Target Milestone: 2.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Richard Tollerton 2015-05-07 22:22:19 UTC
If you install the lsb package into core-image-minimal then attempt to use the start_daemon facility as, e.g.,

. /lib/lsb/init-functions && start_daemon syslogd

This will fail, because /etc/core-lsb/lsb_start_daemon in turn calls a "daemon" command, which does not exist.

This command appears to be present in the lsbinitscripts package, but installing that causes our target to segfault on bootup. That's a separate issue we need to investigate, but regardless, this ought to not be broken if I install only lsb.
Comment 1 Alex Franco 2015-06-09 20:33:05 UTC
Reproducing
Comment 2 Alex Franco 2015-06-10 22:51:37 UTC
Building a base image such as core-image-minimal with lsb and then attempting to source /lib/lsb/init-functions, then using the start_daemon function (to start a daemon, such as syslogd) fails, since /lib/lsb/init-functions use functions (incl. "daemon()") from file /etc/init.d/functions.lsbinitscripts, which is provided by package lsbinitscripts. Running daemon() then calls /usr/bin/mountpoint, a binary provided by util-linux. So, both of these dependencies have been added to: recipes-extended/lsb/lsb_4.1.bb

These changes did not lead to a segfault on boot in my test case.

Change now in contrib:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/?h=franco%2FYOCTO7732-lsb
Comment 3 Alex Franco 2015-06-16 19:17:43 UTC
Patch sent to mailing list
Comment 4 Alex Franco 2015-09-22 20:00:14 UTC
Still waiting review/integration
Comment 5 Benjamin Esquivel 2015-09-22 22:16:00 UTC
Patch waiting for merge/review:

http://lists.openembedded.org/pipermail/openembedded-core/2015-September/110295.html