From patchwork Thu Aug 30 03:55:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 145489 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp341701ljw; Wed, 29 Aug 2018 20:56:01 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYCVBquEeuNrKNOLPzEYBBVIN6mtQnhSuOi/MMd0FgQBs5YrXpZaM87zGo3GtVxVhLZlID1 X-Received: by 2002:a17:902:eb:: with SMTP id a98-v6mr1083895pla.269.1535601361699; Wed, 29 Aug 2018 20:56:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535601361; cv=none; d=google.com; s=arc-20160816; b=cy71BUtiiLAybpfku6kOR2+XSWecmBceVzqrPyxPyMdDh0FP+D1ShXVxHAGdmMfGJA 6EAUAnPhrY3QWCb5H/4iCpp+76iBbCx30Oey/nYUFz8PA2bYntnXWer23+jEDqjvAbuF z+sqWnky3sk7SQhGsPYOYi7pWfxjP+6mRYYXuT6ZbHg/HxHaIFSuoiyHcNcl+EXARxLa Nj98hLtnz1bLY8aPzrxDivHZ5YnvrQfv4bOcDbOK62yHIsEvUpeqe15uzQZ+yuLaV7ae C2Pil0oKUOb8hAq/yxkL540hxcjtHIEdmgTGcBGJsRLS+EVLNFfjXBjExBXsu9lLDpS2 j4eQ== 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=QNkAPoBwroGPlQ0D3v5UEMfYm5ilcGaWtFnfRMllIWmQVttHCqGtw9miJIc9xTJvbm bQAY5ZGyKtrLR3ueEttWpOq+yyKPeoRL+tXVKR9UiI7tEO/7hoxi1CJe7YYf1Wgt+EgN qP6HclJyignNuJRjmnwoomKK+9tlBmW5oDOt1zyywsGMkjFhsaMyN3Djl1cAP/GtORiM y9GuQG/tbvd113ManNncLBRoukd2nXi3gagA1A34Utc6CrVTvpwjpd5uR62nBrC2Syym EGDi9f8mO1WbetiySfkXHJXy5W/tWxAReJnG9yKQ+/8+kE65uXYXt2rhNQzu7Cp6jLRd aSmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=aEcKYAM2; 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 q18-v6si5475468pgd.379.2018.08.29.20.56.01; Wed, 29 Aug 2018 20:56:01 -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=aEcKYAM2; 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 05787793CD; Thu, 30 Aug 2018 03:55:55 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mail.openembedded.org (Postfix) with ESMTP id F0021792BC for ; Thu, 30 Aug 2018 03:55:48 +0000 (UTC) Received: by mail-pl1-f174.google.com with SMTP id d12-v6so3242862pls.4 for ; Wed, 29 Aug 2018 20:55:50 -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=aEcKYAM2jIVcTyzObATC/7/QYYP3AF/8O7U5SFGgqg4JNFQqh8AnuTvrLMfoilGfdQ BVoiHhNQDLXVa+2v5Y+eDaYAaUOh1Xg5J5skSq2rxI2ixzPGe0ASBA6r3sNRpBuKnkER GHCqII9YnyvCgt27vrgVMebmcEwVhK/pt3sZKDKl0bwDzru2yZuigUUz9V8O1cHI0/xx TTvSj98BKSLmfRX9ioKH7GuePPUYjq4C86EMI4rbDeoV4gqngBqQUxRXzFPwMYe8lTcC KLhSIWOwx9OKqloZxN2gzhcb2Ty6xwEDWME02rcoqPBAFmv12mxv53rL7hkUQftw0zUx zyyw== 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=oS2U4EmtNg88dXI1JR4fPKvoOJnnSGoZZY2H8YS2bbS5Yo+An4Mae4yKdipL5HVB/8 qStcmKZ6lLkZSUm+tUvjQq1MzG9Ox3n1gm4/uc84FR+/qwsinKJ637bitHjIIWp0eG4Z twkDIWgncz8mYrfWqrY8fmtn5gYlYq83HinO6QzkJDFqDU39EOEJbLVK/YIS2ilX2v/Z dYlcfL2XoCz+ToW72iixEgrnK5psrGpXUr9ljs13cv/EBjjcceIVwRo1rlfpFdGiNYhD WKKzVmL4LZ8QwzMM88Zdj0g86qubpgqfqNAYByYj9q/4WxSvIs8Zl0a39W7BnIGSv6Td DD6w== X-Gm-Message-State: APzg51CUm7/Bwss60Iy7GVOS1HeLoq4J0V2tA0cXZVnF+prWAf1+d7pS dUgLA3Fahz6AEzYbpN4VgLl7yxm3 X-Received: by 2002:a17:902:bccb:: with SMTP id o11-v6mr6229552pls.167.1535601349693; Wed, 29 Aug 2018 20:55:49 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::f180]) by smtp.gmail.com with ESMTPSA id 77-v6sm8056381pga.40.2018.08.29.20.55.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Aug 2018 20:55:48 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Wed, 29 Aug 2018 20:55:35 -0700 Message-Id: X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Subject: [OE-core] [PATCH 3/7] 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" +