Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
To: Victor Kamensky <kamensky@cisco.com>,
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] sysklogd: add alternatives for klogd and syslogd
Date: Fri, 26 Oct 2018 10:29:49 +0300	[thread overview]
Message-ID: <445EEF2D-ABF2-4822-A390-D6D7DECAC6B9@linux.intel.com> (raw)
In-Reply-To: <20181026045303.10592-1-kamensky@cisco.com>

'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.

Cheers,
  Markus

On 26/10/2018, 7.55, "Victor Kamensky" <kamensky@cisco.com> wrote:

    Otherwise when used in presense of busybox that provides
    its own version of klogd and syslogd, image packaging
    complains that klogd exists and it is not syymbolic link.
    Failure happens only if image packaging script install
    sysklogd package first followed by installtion of busybox
    package. If during packaging reverse installtion order
    happens, busybox first followed by sysklogd, packaging
    succeed.
    
    Note this fix along with recently committed
    55ba9dc1f8 sysklogd: Re-enable alternatives for syslogd.8 man page
    effectively reverts this commit
    988aad01b2 sysklogd: don't use update-alternatives
    
    Signed-off-by: Victor Kamensky <kamensky@cisco.com>
    ---
    Hi Guys,
    
    Here is more details. Example of failure that I observe:
    
    update-alternatives: Error: not linking /home/wd8/oe/20181021/build/tmp-glibc/work/intel_corei7_64-oe-linux/kdevel-console-devel-image/1.0-r0/rootfs/sbin/klogd to /usr/lib/busybox/sbin/klogd since /home/wd8/oe/20181021/build/tmp-glibc/work/intel_corei7_64-oe-linux/kdevel-console-devel-image/1.0-r0/rootfs/sbin/klogd exists and is not a link
    
    Also 988aad01b2 says:
    
    > Using update-alternatives for managing init scripts has proved to be
    > problematic. And, sysklogd rconflicts with other syslog daemons so there
    > is no point in using update-alternatives from this perspective, either.
    
    I am not sure why "managing init scripts has proved to be problematic" and
    syslogd and klogd are not really init script per se, aren't they? Also
    klogd and syslogd actually come from busybox, not busybox-syslog as listed
    in sysklogd RCONFLICTS. Maybe it what has changed since 988aad01b2.
    busybox-syslog now contains only init script for syslog and its
    configuration.
    
    Adding Markus for further comments.
    
     meta/recipes-extended/sysklogd/sysklogd.inc | 5 +++++
     1 file changed, 5 insertions(+)
    
    diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
    index f151dd87f7..4393a39180 100644
    --- a/meta/recipes-extended/sysklogd/sysklogd.inc
    +++ b/meta/recipes-extended/sysklogd/sysklogd.inc
    @@ -60,9 +60,14 @@ FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}
     
     ALTERNATIVE_PRIORITY = "100"
     
    +ALTERNATIVE_${PN} = "syslogd klogd"
    +
     ALTERNATIVE_${PN}-doc = "syslogd.8"
     ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8"
     
    +ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
    +ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd"
    +
     pkg_prerm_${PN} () {
     	if test "x$D" = "x"; then
     	if test "$1" = "upgrade" -o "$1" = "remove"; then
    -- 
    2.17.2
    
    




  parent reply	other threads:[~2018-10-26  7:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26  4:53 [PATCH] sysklogd: add alternatives for klogd and syslogd Victor Kamensky
2018-10-26  5:08 ` ChenQi
2018-10-26  7:28   ` Victor Kamensky
2018-10-26  7:29 ` Markus Lehtonen [this message]
2018-10-26  7:55   ` Victor Kamensky
2018-10-29 16:24     ` Mark Hatle
2018-10-29 18:27       ` Victor Kamensky
2018-10-29 19:14         ` Mark Hatle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=445EEF2D-ABF2-4822-A390-D6D7DECAC6B9@linux.intel.com \
    --to=markus.lehtonen@linux.intel.com \
    --cc=kamensky@cisco.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox