| Summary: | busybox does not support no CONFIG_SYSLOGD properly | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Jack Mitchell <jack> |
| Component: | core | Assignee: | Chen Qi <Qi.Chen> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | liezhi.yang, meta.mr.watcher, meta.watcher, sgw, yi.zhao |
| Version: | unspecified | ||
| Target Milestone: | 1.7 M1 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
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 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
Module: openembedded-core.git Branch: master Commit: b44e291a87539fbb8e6da1a16c56f425a417e7bd URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=b44e291a87539fbb8e6da1a16c56f425a417e7bd |
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.