From patchwork Tue Aug 11 07:25:22 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Lee X-Patchwork-Id: 94924 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE624C5AC67 for ; Tue, 11 Aug 2026 07:25:41 +0000 (UTC) Received: from codeconstruct.com.au (codeconstruct.com.au [203.29.241.158]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.49097.1786433138408106375 for ; Tue, 11 Aug 2026 00:25:39 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@codeconstruct.com.au header.s=2022a header.b=WuCZOpPJ; spf=pass (domain: codeconstruct.com.au, ip: 203.29.241.158, mailfrom: james@codeconstruct.com.au) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeconstruct.com.au; s=2022a; t=1786433136; bh=KOumnjKXoynZn4VoTqfXsuP1KzmzVIN8/JV7Mb4NhDs=; h=From:To:Cc:Subject:Date; b=WuCZOpPJehul6m4bq2dkL5yncF8AjZe9p4Cb0Dh6rSRKAWZ28003uPizAAz/SWBjd gI/cJJpCQezFBhDhIhU0km0Q2xT2w0Na87YMFsuC0hdH4nkbwowxnisiVdna6jtjS6 zrPHwZ+wqJGTqD0K+7hIlf1ZFgdqT1OgQ8S+TvFXJt85pSLBQB3wH1DkNdw/fZY05E kz1f6Zj7yPh1oRbXvelyTsCRltNfFw4AbbHdEl6Obbb5INofvueujpCUftFymgJv1X O//uaAypZcvsVvQ+QjtuPBKtw7VIRxOZW+miWU9CynexovNtwR5WOACFUiiqPo7cGt j5ZLW1VXPsqxA== Received: by codeconstruct.com.au (Postfix, from userid 10004) id 16CB067814; Tue, 11 Aug 2026 15:25:36 +0800 (AWST) From: James Lee To: openembedded-devel@lists.openembedded.org Cc: andrew@codeconstruct.com.au, jk@codeconstruct.com.au Subject: [oe] [meta-networking] [PATCH v2 1/2] mctp: split mctp tools and mctpd into separate recipes Date: Tue, 11 Aug 2026 15:25:22 +0800 Message-ID: <20260811072523.3463118-1-james@codeconstruct.com.au> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 11 Aug 2026 07:25:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/128922 The current mctp recipe relies on the upstream's conditional build and install of the mctpd binary if systemd is present, only building the mctp utility otherwise. Future upstream changes allowing running as non-root require more control over the build process. We will need to add a new system user when mctpd is built. Adding a user requires inheriting useradd, which assumes at least one user will be created, failing the recipe otherwise. Building without mctpd would then cause the recipe to fail as conditionally inheriting useradd seems infeasible. To make useradd available for the new upstream release, split the recipe into "mctp" for the utilities and "mctpd" for the daemon, isolating the systemd dependency to "mctpd". This makes the two parts of the source explicitly selectable from user choice, rather than auto-detecting based on the presence of systemd. It will also let us express the useradd rules only when they're needed for the mctpd installation in the upcoming version bump. Signed-off-by: James Lee james@codeconstruct.com.au --- meta-networking/recipes-support/mctp/mctp.inc | 11 +++++ .../recipes-support/mctp/mctp_2.5.bb | 46 ++----------------- .../recipes-support/mctp/mctpd_2.5.bb | 28 +++++++++++ 3 files changed, 42 insertions(+), 43 deletions(-) create mode 100644 meta-networking/recipes-support/mctp/mctp.inc create mode 100644 meta-networking/recipes-support/mctp/mctpd_2.5.bb diff --git a/meta-networking/recipes-support/mctp/mctp.inc b/meta-networking/recipes-support/mctp/mctp.inc new file mode 100644 index 0000000000..98225cffea --- /dev/null +++ b/meta-networking/recipes-support/mctp/mctp.inc @@ -0,0 +1,11 @@ +HOMEPAGE = "http://www.github.com/CodeConstruct/mctp" +SECTION = "net" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4cc91856b08b094b4f406a29dc61db21" + +SRC_URI = "git://github.com/CodeConstruct/mctp;branch=main;protocol=https;tag=v${PV}" +SRCREV = "07c7a5d526f686da89bc9ae9cad917e46652b272" + +inherit meson pkgconfig + +EXTRA_OEMESON = "-Dtests=false" diff --git a/meta-networking/recipes-support/mctp/mctp_2.5.bb b/meta-networking/recipes-support/mctp/mctp_2.5.bb index a8787d3f2b..5811495c66 100644 --- a/meta-networking/recipes-support/mctp/mctp_2.5.bb +++ b/meta-networking/recipes-support/mctp/mctp_2.5.bb @@ -1,45 +1,5 @@ -SUMMARY = "Management Component Control Protocol utilities" -HOMEPAGE = "http://www.github.com/CodeConstruct/mctp" -SECTION = "net" -LICENSE = "GPL-2.0-only" +require mctp.inc -LIC_FILES_CHKSUM = "file://LICENSE;md5=4cc91856b08b094b4f406a29dc61db21" +SUMMARY = "Management Component Transport Protocol (MCTP) utilities" -SRCREV = "07c7a5d526f686da89bc9ae9cad917e46652b272" - -SRC_URI = "git://github.com/CodeConstruct/mctp;branch=main;protocol=https;tag=v${PV}" - - -inherit meson pkgconfig systemd - -EXTRA_OEMESON = " \ - -Dtests=false \ -" - -PACKAGECONFIG ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ -" - -# mctpd will only be built if pkg-config detects libsystemd; in which case -# we'll want to declare the dep and install the service. -PACKAGECONFIG[systemd] = ",,systemd,libsystemd" -SYSTEMD_SERVICE:${PN} = "mctpd.service mctp.target mctp-local.target" -SYSTEMD_AUTO_ENABLE:${PN} = "enable" - -do_install:append () { - if ${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'true', 'false', d)}; then - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${S}/conf/mctpd.service \ - ${D}${systemd_system_unitdir}/mctpd.service - install -m 0644 ${S}/conf/*.target \ - ${D}${systemd_system_unitdir}/ - install -d ${D}${datadir}/dbus-1/system.d - install -m 0644 ${S}/conf/mctpd-dbus.conf \ - ${D}${datadir}/dbus-1/system.d/mctpd.conf - fi -} - -FILES:${PN} += " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', \ - '${datadir}/dbus-1/system.d/mctpd.conf', '', d)} \ -" +MESON_TARGET = "mctp mctp-client" diff --git a/meta-networking/recipes-support/mctp/mctpd_2.5.bb b/meta-networking/recipes-support/mctp/mctpd_2.5.bb new file mode 100644 index 0000000000..f049be646b --- /dev/null +++ b/meta-networking/recipes-support/mctp/mctpd_2.5.bb @@ -0,0 +1,28 @@ +require mctp.inc + +SUMMARY = "Management Component Transport Protocol (MCTP) control protocol daemon" + +inherit systemd + +do_install:append () { + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${S}/conf/mctpd.service \ + ${D}${systemd_system_unitdir}/mctpd.service + install -m 0644 ${S}/conf/*.target \ + ${D}${systemd_system_unitdir}/ + install -d ${D}${datadir}/dbus-1/system.d + install -m 0644 ${S}/conf/mctpd-dbus.conf \ + ${D}${datadir}/dbus-1/system.d/mctpd.conf +} + +SYSTEMD_SERVICE:${PN} = "mctpd.service mctp.target mctp-local.target" + +DEPENDS += "systemd" + +# Meson adds mctp utility binaries to FILES and do_install(), which cannot be +# overriden by MESON_TARGET. Override FILES and remove binaries to correct. +FILES:${PN} = "${datadir}/dbus-1/system.d/mctpd.conf ${sbindir}/mctpd" + +do_install:append () { + rm -r ${D}${bindir} +} From patchwork Tue Aug 11 07:25:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Lee X-Patchwork-Id: 94923 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE659C5B575 for ; Tue, 11 Aug 2026 07:25:41 +0000 (UTC) Received: from codeconstruct.com.au (codeconstruct.com.au [203.29.241.158]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.49098.1786433138894713466 for ; Tue, 11 Aug 2026 00:25:39 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@codeconstruct.com.au header.s=2022a header.b=V7SLqhMN; spf=pass (domain: codeconstruct.com.au, ip: 203.29.241.158, mailfrom: james@codeconstruct.com.au) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeconstruct.com.au; s=2022a; t=1786433136; bh=K/U/jP0/j2w11jOrKdpfltG7UayQ3wh3cnMxN6jvQ+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=V7SLqhMNGijl4K0sk7iwzWtWI+C0leXN6e6XKfEQ8N9sxkGEK1jGIr3WIN+dbz5AA ZxjgEU2b3eSIueDdEImKGBKHQh2C7vphENMC+NjTTOVKLSs6CugyfuFUl2ebFUppgP fG7ZSOX3orFWVtmLfTzwkjcwhcXenV+XwRJZ+IanocCDvedAfMNiw+2EZPLZ4ibxhB CFlzT833fT7/hhkAL29VPiIL2OjGrDcLV2BB/vg240w9z/KLamZW+ey3EWtEVgznru tIhC0iIHVvTp2aZQH0/1xYIZqqWkLqq6/DcipPL3gxgeanisMQs5C+zl6RBMffm0/G YsL6CaD+tRXGA== Received: by codeconstruct.com.au (Postfix, from userid 10004) id 63A396783E; Tue, 11 Aug 2026 15:25:36 +0800 (AWST) From: James Lee To: openembedded-devel@lists.openembedded.org Cc: andrew@codeconstruct.com.au, jk@codeconstruct.com.au Subject: [oe] [meta-networking] [PATCH v2 2/2] mctp: upgrade 2.5 -> 2.6 Date: Tue, 11 Aug 2026 15:25:23 +0800 Message-ID: <20260811072523.3463118-2-james@codeconstruct.com.au> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260811072523.3463118-1-james@codeconstruct.com.au> References: <20260811072523.3463118-1-james@codeconstruct.com.au> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 11 Aug 2026 07:25:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/128923 Bumped mctp and mctp-daemon version to 2.6, and added the new system user to own mctpd's service. Signed-off-by: James Lee --- meta-networking/recipes-support/mctp/mctp.inc | 2 +- .../recipes-support/mctp/{mctp_2.5.bb => mctp_2.6.bb} | 0 .../recipes-support/mctp/{mctpd_2.5.bb => mctpd_2.6.bb} | 5 ++++- 3 files changed, 5 insertions(+), 2 deletions(-) rename meta-networking/recipes-support/mctp/{mctp_2.5.bb => mctp_2.6.bb} (100%) rename meta-networking/recipes-support/mctp/{mctpd_2.5.bb => mctpd_2.6.bb} (89%) diff --git a/meta-networking/recipes-support/mctp/mctp.inc b/meta-networking/recipes-support/mctp/mctp.inc index 98225cffea..c8fc98f63a 100644 --- a/meta-networking/recipes-support/mctp/mctp.inc +++ b/meta-networking/recipes-support/mctp/mctp.inc @@ -4,7 +4,7 @@ LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=4cc91856b08b094b4f406a29dc61db21" SRC_URI = "git://github.com/CodeConstruct/mctp;branch=main;protocol=https;tag=v${PV}" -SRCREV = "07c7a5d526f686da89bc9ae9cad917e46652b272" +SRCREV = "31ac0e86b0e23d32abf34d191653a87a47f3c9a7" inherit meson pkgconfig diff --git a/meta-networking/recipes-support/mctp/mctp_2.5.bb b/meta-networking/recipes-support/mctp/mctp_2.6.bb similarity index 100% rename from meta-networking/recipes-support/mctp/mctp_2.5.bb rename to meta-networking/recipes-support/mctp/mctp_2.6.bb diff --git a/meta-networking/recipes-support/mctp/mctpd_2.5.bb b/meta-networking/recipes-support/mctp/mctpd_2.6.bb similarity index 89% rename from meta-networking/recipes-support/mctp/mctpd_2.5.bb rename to meta-networking/recipes-support/mctp/mctpd_2.6.bb index f049be646b..f4c5bb976c 100644 --- a/meta-networking/recipes-support/mctp/mctpd_2.5.bb +++ b/meta-networking/recipes-support/mctp/mctpd_2.6.bb @@ -2,7 +2,7 @@ require mctp.inc SUMMARY = "Management Component Transport Protocol (MCTP) control protocol daemon" -inherit systemd +inherit systemd useradd do_install:append () { install -d ${D}${systemd_system_unitdir} @@ -17,6 +17,9 @@ do_install:append () { SYSTEMD_SERVICE:${PN} = "mctpd.service mctp.target mctp-local.target" +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "-r -U -s /bin/false mctpd" + DEPENDS += "systemd" # Meson adds mctp utility binaries to FILES and do_install(), which cannot be