From patchwork Thu Aug 30 00:06:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 145484 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp185889ljw; Wed, 29 Aug 2018 17:06:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZihpqHQSqC36UFQnb2X6JyiaF0yelHZIIrD1Z98e2LtBzQ4qJYcPlhS75nBwyKOWv3zePV X-Received: by 2002:a17:902:904c:: with SMTP id w12-v6mr7886344plz.95.1535587590702; Wed, 29 Aug 2018 17:06:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535587590; cv=none; d=google.com; s=arc-20160816; b=Uz6KECkiShbJDF6sb6/0r0/B0FUuvl2s6bmksKMdlMfuhbWoWQhI/unYpH6xb7I7ek LlPacllIHA/jjZ0BEzWQEpXUderinZVUwy1dyCMsG9An4siabgcj8BC6fBoFH3q2ep6j 72A5nRDxcMIjo7c3r/k4Q07ni4Xp6G/MdmhubTp5UqE++UMX2mNlfw0sq9RQ2E4ItmoB UL9UgBHbltcb0Gyefn9wT0FA6ox8+s26ckzhqsfgAue30RRHVlUaQFeebSIHnpXodQ7i CtHqDxn7/E3OY66wFEllLrj3a6O/njErETQy8hHCDahWe7LCXZLi+7d+kX/rI7TlR1CJ YRzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=TQmpstMnop3U7Y/VJ5P4y/vvtUS4WRmCA/pwRflZgo0=; b=F3nzui6ixEoS6VHQD0rCSwREpG4y+3LEtHNnn2ko6X8DVWj37p2P6XMsaayMkqMJu1 XwRorP8hvhBAyuc/4WoeWag8iQIc2+BPyANFYKxyFe9MmlgRPtx1KkiNrRdW3U8gwImq kALCEydwd6txwd78vPpOT3OE2CCbOZcqfexz4vOclkX6jwbyqiugatcYMbQ1NttyCHfk cTlYv6w4JePblTQHsy2y5V367j4yW44QLmeDnM+BatC0ihBe7PJn0pWOVsS7YTWoul+s CMqa6pHjD4oAbhwS3YDowrj7DQa9QGr9GwYHbgyT/o+43MqwyuiKSfOzfVg7HFmvNZhj NKOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=bL9zD7Rr; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id t32-v6si5175036pgk.202.2018.08.29.17.06.30; Wed, 29 Aug 2018 17:06:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=bL9zD7Rr; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 0257479348; Thu, 30 Aug 2018 00:06:20 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mail.openembedded.org (Postfix) with ESMTP id C9D5F792C0 for ; Thu, 30 Aug 2018 00:06:11 +0000 (UTC) Received: by mail-pf1-f174.google.com with SMTP id d4-v6so3028977pfn.0 for ; Wed, 29 Aug 2018 17:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pqiXdvS1f+0VEn6CBhOEjtsCBeC4av4AMBd7e1OkBXg=; b=bL9zD7RrdcML2qDU+Wl9lLPN4LliderQwDlILoo1tdDSIzTgqT8u1KTY/AnL2WjnOR c2FLMjwCxHrCQcKsXhpmLHXIsHdJvQnlgVa9LTPglCgrUpevSLSrcw6r02NyfoD44uQ9 xrRLQmosZFnlw2lVqkXDACrTgZSwQNOernKeWw7esaI71yZGqB3pAYwcazn32US6ck6o AM9/3wNFWdRFBUmWOGDdTWBWlXRN0h7dNv+Kg5FEQXp5z7yWQX9v6yHbYbJZ89q1D3JJ t3362yphG4mOlvFjB8TeZxOHiBV+JlxGIL9ukkdMKJtllyd4+7/IhSAz9B54sfN+fWW/ RFAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pqiXdvS1f+0VEn6CBhOEjtsCBeC4av4AMBd7e1OkBXg=; b=fIWdlZmc6oxolYtlapV1cCvnD7/l8vhCgWVPqbBUy3vj5fww3CipLoHV+OoQdj6/kW 84uIuMu2P7jVigkcHjKBj+kN21QJY1EPSKcfgrIrlGQfJUmmaOVIw1q9Q1iVMrXAVCDd oB3oRwf95FOaIjorvpyHGLvcLXEOC7zegoG4M3XkBvYJSKa7a5qb5XaGFzejWbP1hmoy vjX3yzpJN9FRMkC4sk6zCieOYP0k9tMWsZHRW0egOFfi0p8cvWobHGnrCm8N2HRucARc RItr1lki83rQQetKQ3FNLGKRwmdNUwwi4Eko5GYnPGhiFcpCKsHcyjnVhU4zg+YIYuRY ueqQ== X-Gm-Message-State: APzg51Adn6da4vdjl8N+1AxfWlSJuFiBBCJhWbHx8t/7ClgPu6TPKFnj Ad/hykWpzzsqExeZhtPBWrTo0AGy X-Received: by 2002:a65:5288:: with SMTP id y8-v6mr7533018pgp.284.1535587572332; Wed, 29 Aug 2018 17:06:12 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::f180]) by smtp.gmail.com with ESMTPSA id x65-v6sm8295727pfk.140.2018.08.29.17.06.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Aug 2018 17:06:11 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Wed, 29 Aug 2018 17:06:01 -0700 Message-Id: X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Subject: [OE-core] [PATCH 3/4] sysklogd: Use update-alternatives 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: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org 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 --- meta/recipes-extended/sysklogd/sysklogd.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.18.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core 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" +