[OE-core] [PATCH 3/7] sysklogd: Use update-alternatives

Peter Kjellerstedt peter.kjellerstedt at axis.com
Thu Aug 30 07:44:46 UTC 2018


> -----Original Message-----
> From: openembedded-core-bounces at lists.openembedded.org <openembedded-
> core-bounces at lists.openembedded.org> On Behalf Of Khem Raj
> Sent: den 30 augusti 2018 05:56
> To: openembedded-core at lists.openembedded.org
> Subject: [OE-core] [PATCH 3/7] sysklogd: Use update-alternatives
> 
> busybox also provides klogd and syslogd, this change makes it coexist
> peacefully. Currently rootfs fails in situations where both of them are
> providing these binaries and busybox postinsts fail
> 
> update-alternatives: Error: not linking
> /mnt/a/oe/build/tmp/work/qemuriscv64-bec-linux/core-image-full-
> cmdline/1.0-r0/rootfs/sbin/klogd
> to /bin/busybox.nosuid since
> /mnt/a/oe/build/tmp/work/qemuriscv64-bec-linux/core-image-full-
> cmdline/1.0-r0/rootfs/sbin/klogd
> exists and is not a link
> 
> Signed-off-by: Khem Raj <raj.khem at gmail.com>
> ---
>  meta/recipes-extended/sysklogd/sysklogd.inc | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc
> b/meta/recipes-extended/sysklogd/sysklogd.inc
> index fc4e67c18e..2a8bed00f3 100644
> --- a/meta/recipes-extended/sysklogd/sysklogd.inc
> +++ b/meta/recipes-extended/sysklogd/sysklogd.inc
> @@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
>                      file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \
>                     "
> 
> -inherit update-rc.d systemd
> +inherit update-rc.d systemd update-alternatives
> 
>  SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
>             file://no-strip-install.patch \
> @@ -70,3 +70,9 @@ python () {
>      if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
>          d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
>  }
> +
> +ALTERNATIVE_PRIORITY = "100"
> +ALTERNATIVE_${PN} = "klogd syslogd"
> +ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd"
> +ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
> +
> --
> 2.18.0

This is a (partial) revert of commit 988aad01b2 (sysklogd: don't use 
update-alternatives). Can you come to an agreement regarding which is 
the correct solution?

//Peter




More information about the Openembedded-core mailing list