* [PATCH] sysklogd: add alternatives for klogd and syslogd
@ 2018-10-26 4:53 Victor Kamensky
2018-10-26 5:08 ` ChenQi
2018-10-26 7:29 ` Markus Lehtonen
0 siblings, 2 replies; 8+ messages in thread
From: Victor Kamensky @ 2018-10-26 4:53 UTC (permalink / raw)
To: openembedded-core
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] sysklogd: add alternatives for klogd and syslogd
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
1 sibling, 1 reply; 8+ messages in thread
From: ChenQi @ 2018-10-26 5:08 UTC (permalink / raw)
To: Victor Kamensky, openembedded-core
On 10/26/2018 12:53 PM, Victor Kamensky via Openembedded-core 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.
Hi Victor,
I think this problem has been fixed by the following commit.
"""
commit ef11c54ba99af261a70ec31091216cdd1556da24
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Wed Sep 5 17:39:31 2018 +0100
busybox: Put klogd/syslogd alternative links in syslog package
Currently these are in ${PN} and ${PN}-syslog may get replaced by
other packages but update-alternatives would error in the postinst
if other files were installed first. Avoid the problems by putting
the links in the correct package.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
"""
For the current status, the update-alternatives operations for syslogd
and klogd should be in the busybox-syslog package, which conflicts with
sysklogd package.
Could you please help check this?
Best Regards,
Chen Qi
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] sysklogd: add alternatives for klogd and syslogd
2018-10-26 5:08 ` ChenQi
@ 2018-10-26 7:28 ` Victor Kamensky
0 siblings, 0 replies; 8+ messages in thread
From: Victor Kamensky @ 2018-10-26 7:28 UTC (permalink / raw)
To: ChenQi; +Cc: openembedded-core
Hi Chen,
On Fri, 26 Oct 2018, ChenQi wrote:
> On 10/26/2018 12:53 PM, Victor Kamensky via Openembedded-core 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.
>
> Hi Victor,
>
> I think this problem has been fixed by the following commit.
>
> """
> commit ef11c54ba99af261a70ec31091216cdd1556da24
> Author: Richard Purdie <richard.purdie@linuxfoundation.org>
> Date: Wed Sep 5 17:39:31 2018 +0100
>
> busybox: Put klogd/syslogd alternative links in syslog package
>
> Currently these are in ${PN} and ${PN}-syslog may get replaced by
> other packages but update-alternatives would error in the postinst
> if other files were installed first. Avoid the problems by putting
> the links in the correct package.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> """
>
> For the current status, the update-alternatives operations for syslogd and
> klogd should be in the busybox-syslog package, which conflicts with sysklogd
> package.
>
> Could you please help check this?
Thank you! That helps. I see it now. Apprently busybox.bbappend
from meta-selinux layer:
http://git.yoctoproject.org/cgit/cgit.cgi/meta-selinux/tree/recipes-core/busybox/busybox_selinux.inc
is effectively undoing effect of above commit in my workspace.
meta-selinux is doing it because of
http://git.yoctoproject.org/cgit/cgit.cgi/meta-selinux/commit/?id=521ca9c9cf370840e9f8c808a7955aa5da7c356e
It seems changes similar to above Richard's commit needed to
be applied there as well. After applying that to busybox_selinux.inc
in meta-selinux my problem goes away.
No need for proposed below patch.
Thanks,
Victor
> Best Regards,
> Chen Qi
>
>> 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
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] sysklogd: add alternatives for klogd and syslogd
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:29 ` Markus Lehtonen
2018-10-26 7:55 ` Victor Kamensky
1 sibling, 1 reply; 8+ messages in thread
From: Markus Lehtonen @ 2018-10-26 7:29 UTC (permalink / raw)
To: Victor Kamensky, openembedded-core
'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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] sysklogd: add alternatives for klogd and syslogd
2018-10-26 7:29 ` Markus Lehtonen
@ 2018-10-26 7:55 ` Victor Kamensky
2018-10-29 16:24 ` Mark Hatle
0 siblings, 1 reply; 8+ messages in thread
From: Victor Kamensky @ 2018-10-26 7:55 UTC (permalink / raw)
To: Markus Lehtonen; +Cc: openembedded-core
[-- Attachment #1: Type: TEXT/PLAIN, Size: 4115 bytes --]
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.
So it is sorted out now.
Thanks,
Victor
> 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
>
>
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] sysklogd: add alternatives for klogd and syslogd
2018-10-26 7:55 ` Victor Kamensky
@ 2018-10-29 16:24 ` Mark Hatle
2018-10-29 18:27 ` Victor Kamensky
0 siblings, 1 reply; 8+ messages in thread
From: Mark Hatle @ 2018-10-29 16:24 UTC (permalink / raw)
To: Victor Kamensky, Markus Lehtonen; +Cc: openembedded-core
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" <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
>>
>>
>>
>>
>>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] sysklogd: add alternatives for klogd and syslogd
2018-10-29 16:24 ` Mark Hatle
@ 2018-10-29 18:27 ` Victor Kamensky
2018-10-29 19:14 ` Mark Hatle
0 siblings, 1 reply; 8+ messages in thread
From: Victor Kamensky @ 2018-10-29 18:27 UTC (permalink / raw)
To: Mark Hatle; +Cc: openembedded-core
[-- Attachment #1: Type: TEXT/PLAIN, Size: 6609 bytes --]
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:
From dd75b2ca77b3bfcb14030c353e6b2bfc7df8dfec Mon Sep 17 00:00:00 2001
From: Victor Kamensky <kamensky@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@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)
--
2.14.4
I don't know yet what mailing list I should use for meta-selinux. As
time permits I'll try to figure out and post above patch there, if
it is still needed.
Thanks,
Victor
> --Mark
>
>> So it is sorted out now.
>>
>> Thanks,
>> Victor
>>
>>> 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
>>>
>>>
>>>
>>>
>>>
>>
>
>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] sysklogd: add alternatives for klogd and syslogd
2018-10-29 18:27 ` Victor Kamensky
@ 2018-10-29 19:14 ` Mark Hatle
0 siblings, 0 replies; 8+ messages in thread
From: Mark Hatle @ 2018-10-29 19:14 UTC (permalink / raw)
To: Victor Kamensky; +Cc: openembedded-core
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@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@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@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)
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-10-29 19:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox