Bug 5302 - busybox does not support no CONFIG_SYSLOGD properly
Summary: busybox does not support no CONFIG_SYSLOGD properly
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.7 M1
Assignee: Chen Qi
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-10-02 11:04 UTC by Jack Mitchell
Modified: 2014-07-02 06:24 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Mitchell 2013-10-02 11:04:14 UTC
Using the config fragment support in the busybox recipe to remove the syslog feature leads to these warnings:

WARNING: busybox: alternative target (/etc/syslog.conf or /etc/syslog.conf.busybox) does not exist, skipping...
WARNING: busybox: NOT adding alternative provide /etc/syslog.conf: /etc/syslog.conf.busybox does not exist
WARNING: busybox: NOT adding alternative provide /etc/init.d/syslog: /etc/init.d/syslog.busybox does not exist
WARNING: busybox: NOT adding alternative provide /etc/syslog-startup.conf: /etc/syslog-startup.conf.busybox does not exist
WARNING: alt_link == alt_target: /etc/syslog.conf == /etc/syslog.conf

Within the busybox recipe it'self there are checks for CONFIG_SYSLOGD

if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
                install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${BPN}
                install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf.${BPN}
                install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf.${BPN}
fi

This leads me to believe that once upon a time it was properly supported, but it had now regressed.
Comment 1 Chen Qi 2013-10-08 07:19:33 UTC
We didn't met this problem because we had never disabled syslogd in busybox.

The problem appeared for update-alternatives, but similar problems could appear for update-rc.d and systemd.

Busybox is a little special compared to other recipes, as what components get installed are determined by the configuration files. This would lead to problems when it inherits update-rc.d.bbclass, update-alternatives.bbclass and systemd.bbclass.

Actually, problem exists for CONFFILES as the config file may not get installed. For example, the /etc/syslog-startup.conf file may not get installed if syslogd is disabled.

For the bug, I'm gonna ignore the CONFFILES problem. Because it will be solved in bug#5200 (Improve the handling of CONFFILES).

//Chen Qi
Comment 2 Chen Qi 2014-06-12 08:06:29 UTC
On one hand, the busybox recipe should deal with CONFIG_SYSLOGD properly. That is, we should not install syslogd related files if CONFIG_SYSLGOD is disabled.
This is the part that needs to be fixed in OE.

On the other hand, while setting the ALTERNATIVE_busybox-syslog variable, it's impossible to check whether or not CONFIG_SYSLGOD is enabled from the .config file. So we need to set it in our own bbappend file.

As an example, if we know that CONFIG_SYSLOGD is disabled in XXX distro, then we could write in the bbappend file:

python () {
    distrooverrides = (d.getVar('DISTROOVERRIDES', True) or '').split(':')
    if 'XXX' in distrooverrides:
        d.setVar('ALTERNATIVE_%s-syslog' % (d.getVar('PN', True)), '')
}

I'll send out a patch to fix the OE core part of this problem. But we really need to do something in our own bbappend file to make things work.

Best Regards,
Chen Qi
Comment 3 Chen Qi 2014-07-02 06:24:29 UTC
Module: openembedded-core.git
Branch: master
Commit: b44e291a87539fbb8e6da1a16c56f425a417e7bd
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=b44e291a87539fbb8e6da1a16c56f425a417e7bd