[OE-core] [PATCH] sysklogd: add alternatives for klogd and syslogd

Mark Hatle mark.hatle at windriver.com
Mon Oct 29 19:14:18 UTC 2018


On 10/29/18 1:27 PM, Victor Kamensky wrote:
> Hi Mark,
> 
> On Mon, 29 Oct 2018, Mark Hatle wrote:
> 
>> On 10/26/18 2:55 AM, Victor Kamensky wrote:
>>>
>>>
>>> On Fri, 26 Oct 2018, Markus Lehtonen wrote:
>>>
>>>> 'why would you want to have multiple, alternative
>>>> syslog daemons on the system? Wouldn't a better
>>>> fix be to move the syslogd and klogd symlinks to the
>>>> busybox-syslog package? It doesn't seem to make much
>>>> sense to have a syslogd binary on the system without
>>>> an init script(?)
>>>>
>>>> The original problem really was related to managing
>>>> init scripts with alternatives (and I think that
>>>> problem still persists, and, it shouldn't be done).
>>>> So, using alternatives for the binaries wouldn't
>>>> cause any problems. The question is just why to
>>>> do this, instead of "fixing" the (binary) package
>>>> content so that existing rconflicts would handle it.
>>>
>>> Thank you, Markus. Please see ChenQi reply on the
>>> thread. I has already been fixed by Richard in the
>>> way you suggested.
>>>
>>> My problem was because similar fix was not present
>>> in meta-selinux busybox.bbappend ... meta-selinux practically
>>> has a copy of alternative handling for busybox
>>> because of SELinux labeling requirements and it was
>>> negating Richard's change.
>>
>> As a maintainer for meta-selinux, if meta-selinux is broken.. it's
>> meta-selinux's fault.. NOT oe-core.
>> oe-core must work for itself first.
>>
>> Fix OE-core properly and the other layers will follow.
> 
> Please see
> 
> http://lists.openembedded.org/pipermail/openembedded-core/2018-October/157078.html
> 
> oe-core is fine: ef11c54ba9. In order to follow
> meta-selinux needs something like this to avoid
> 'update-alternatives: Error:' mentioned on the thead:

I'd not read that thread prior.  meta-selinux info should be sent to:

http://git.yoctoproject.org/cgit/cgit.cgi/meta-selinux/tree/MAINTAINERS

"Please submit any patches against meta-selinux to the Yocto Project mailing
list (yocto at yoctoproject.org)."

But as I said before.. ignore meta-selinux for the purpose of fixing this.  If
it's broken, we fix it -right- in oe-core... and THEN we fix meta-selinux.  This
is the policy I follow for all layers.  oe-core first, layers in parallel or second.

Obviously if you know a layer has certain expectation (as you do here), it's
good to try to understand them and verify that any fix won't prevent the
required behavior -- but correctness in oe-core is the immediate priority.

--Mark

> From dd75b2ca77b3bfcb14030c353e6b2bfc7df8dfec Mon Sep 17 00:00:00 2001
> From: Victor Kamensky <kamensky at cisco.com>
> Date: Mon, 29 Oct 2018 11:16:09 -0700
> Subject: [PATCH] busybox: Put klogd/syslogd alternative links in syslog
>   package
> 
> Port "ef11c54ba9 busybox: Put klogd/syslogd alternative links in
> syslog package" from oe-core to meta-selinux copy of
> update-alternative handling in busybox.bbappend
> 
> Signed-off-by: Victor Kamensky <kamensky at cisco.com>
> ---
>   recipes-core/busybox/busybox_selinux.inc | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/recipes-core/busybox/busybox_selinux.inc b/recipes-core/busybox/busybox_selinux.inc
> index df7c117..b8cfcd7 100644
> --- a/recipes-core/busybox/busybox_selinux.inc
> +++ b/recipes-core/busybox/busybox_selinux.inc
> @@ -37,7 +37,11 @@ python create_sh_wrapper_reset_alternative_vars () {
>               # Match coreutils
>               if alt_name == '[':
>                   alt_name = 'lbracket'
> -            d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name)
> +            if alt_name == 'klogd' or alt_name == 'syslogd':
> +                d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' ' + alt_name)
> +            else:
> +                d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name)
> +
>               d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link_name)
>               if os.path.exists(alt_wppath_dest):
>                   d.setVarFlag('ALTERNATIVE_TARGET', alt_name, alt_wppath)
> 




More information about the Openembedded-core mailing list