From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) by mail.openembedded.org (Postfix) with ESMTP id C18B178EFF for ; Mon, 29 Oct 2018 16:26:12 +0000 (UTC) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id w9TGOnxe012380 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 29 Oct 2018 09:25:10 -0700 Received: from soho-mhatle-m.local (172.25.36.231) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server id 14.3.408.0; Mon, 29 Oct 2018 09:24:58 -0700 To: Victor Kamensky , Markus Lehtonen References: <20181026045303.10592-1-kamensky@cisco.com> <445EEF2D-ABF2-4822-A390-D6D7DECAC6B9@linux.intel.com> From: Mark Hatle Openpgp: preference=signencrypt Autocrypt: addr=mark.hatle@windriver.com; prefer-encrypt=mutual; keydata= xsBNBFYKxFgBCACt/pzutBp6p/xVKTFJjHbM3KpQKCblyot/YP+bpTr51Hrc5xDXBQhoG7TC aIRvRIvbhEevEQK9y04gW3JK/5lobq5ORebolcsHlYBUvpNeIPjupLQwGvz/TPtrLRNGLqDC rvsM6OA2XbQ2bwzxWaSQS3ImE2O2iXOZn9HhThMGeDB4Nff3fgUvXOTDIrgWOn9K2DgLL7Yc zkUIlFdj+Nraksd/7BSk8oH6tjeBVhFqSFvKta9QxWgdr58oPaTYaW/xNqUjlLrbJuMw/MSe xzuYfdfDfm6J8kRjMOnwQ0n8svJElzqAk+d83ow38gpGQ+LkjGgnf8ZFJ4rUJFADroX3ABEB AAHNJU1hcmsgSGF0bGUgPG1hcmsuaGF0bGVAd2luZHJpdmVyLmNvbT7CwHcEEwEIACEFAlYK xFgCGwMFCwkIBwIGFQgJCgsCBBYCAwECHgECF4AACgkQfv796/r0vvlvZAf9Gs+eN320yhRW V/fZCsngKhmOK4v3HrTw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19ff21b9-dab8-79af-7ffa-81af121ea65b@windriver.com> Date: Mon, 29 Oct 2018 11:24:57 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Cc: openembedded-core@lists.openembedded.org Subject: Re: [PATCH] sysklogd: add alternatives for klogd and syslogd X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2018 16:26:12 -0000 Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit 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. --Mark > So it is sorted out now. > > Thanks, > Victor > >> Cheers, >> Markus >> >> On 26/10/2018, 7.55, "Victor Kamensky" 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 >> --- >> 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 >> >> >> >> >> >