From patchwork Wed Jul 8 17:36:48 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 92050 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 4B388C44508 for ; Wed, 8 Jul 2026 17:37:03 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.14022.1783532219264483929 for ; Wed, 08 Jul 2026 10:36:59 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@arm.com header.s=foss header.b=ECeLFnXO; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 43B9A1756 for ; Wed, 8 Jul 2026 10:36:54 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 41E0F3F905 for ; Wed, 8 Jul 2026 10:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1783532218; bh=k6JiRLWhImasv0afZRiHfCADQd4QmNnob5o46beI8uw=; h=From:To:Subject:Date:From; b=ECeLFnXOhH/YykpO8sOWfxwIZ89kCurdzUAU8DUOQ2fnXpraBWwut1p9AMmhCie70 FQcCPlSWK0BH0zxq353Vj7efRAgqvj/zWQk4lAgF9DmTq14UyMFElnhuC8uVGoKVHr DzP6xUPbNvK379IqX4mPQUQjbKFd2PI9FdDTccJA= From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/4] glibc: inherit update-rc.d Date: Wed, 8 Jul 2026 18:36:48 +0100 Message-ID: <20260708173651.1435387-1-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 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 ; Wed, 08 Jul 2026 17:37:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/240500 The nscd package has an init script, so we should be inheriting the update-rc.d class like we inherit the the systemd class. Signed-off-by: Ross Burton --- meta/recipes-core/glibc/glibc-package.inc | 3 +++ meta/recipes-core/glibc/glibc.inc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc index 21f2200d19..d4941a21a1 100644 --- a/meta/recipes-core/glibc/glibc-package.inc +++ b/meta/recipes-core/glibc/glibc-package.inc @@ -297,3 +297,6 @@ CONFFILES:nscd = "${sysconfdir}/nscd.conf" SYSTEMD_PACKAGES = "nscd" SYSTEMD_SERVICE:nscd = "nscd.service" + +INITSCRIPT_PACKAGES = "nscd" +INITSCRIPT_NAME = "nscd" diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc index 3bb935e223..7403eb845a 100644 --- a/meta/recipes-core/glibc/glibc.inc +++ b/meta/recipes-core/glibc/glibc.inc @@ -9,7 +9,7 @@ HASHEQUIV_HASH_VERSION .= ".1" PROVIDES = "virtual/libc" PROVIDES += "virtual/libintl virtual/libiconv" -inherit autotools texinfo systemd +inherit autotools texinfo systemd update-rc.d LEAD_SONAME = "libc.so" From patchwork Wed Jul 8 17:36:49 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 92052 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 0EF85C44507 for ; Wed, 8 Jul 2026 17:37:03 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14388.1783532219870928890 for ; Wed, 08 Jul 2026 10:37:00 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@arm.com header.s=foss header.b=I3Tk8K3i; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D2CFA1D14 for ; Wed, 8 Jul 2026 10:36:54 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D5DFB3F905 for ; Wed, 8 Jul 2026 10:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1783532219; bh=UTRTcmhmkYQfJedBw9fi0LzLh4jk6jDZe7nFHfzvL+E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=I3Tk8K3ih7YMwRZh94zGIiKGXioZDgYtHiPiHV9Dj3kJ2VmSmcuy9Pt6cGr5osdZY kzqER4INgc2PY1UYzlNKnEfRiZAjnpxmAuBleznIBzshkOgIt7JnUR1hyG0yxS0bfy rRFWrzKUIMx3hh5w6KCu0Dd2w1iGbfeierRcZ7ww= From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/4] glibc: only install nscd if it's been enabled Date: Wed, 8 Jul 2026 18:36:49 +0100 Message-ID: <20260708173651.1435387-2-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260708173651.1435387-1-ross.burton@arm.com> References: <20260708173651.1435387-1-ross.burton@arm.com> 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 ; Wed, 08 Jul 2026 17:37:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/240501 Whilst the actual nscd binary won't be installed if the PACKAGECONFIG is disabled, we were still installing the init scripts and configuration files. These should be wrapped with PACKAGECONFIG checks. ${localstatedir}/db and makedbs.sh are part of libnss-db not nscd, so ensure they're still always installed. Signed-off-by: Ross Burton --- meta/recipes-core/glibc/glibc-package.inc | 41 +++++++++++++---------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc index d4941a21a1..3d721d8f69 100644 --- a/meta/recipes-core/glibc/glibc-package.inc +++ b/meta/recipes-core/glibc/glibc-package.inc @@ -98,16 +98,20 @@ do_install() { rm -f ${D}${infodir}/dir fi - install -d ${D}${sysconfdir}/init.d - install -d ${D}${localstatedir}/db/nscd - install -m 0755 ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd - install -m 0755 ${S}/nscd/nscd.conf ${D}${sysconfdir}/nscd.conf + install -d ${D}${localstatedir}/db install -m 0755 ${UNPACKDIR}/makedbs.sh ${D}${localstatedir}/db - sed -i "s%daemon%start-stop-daemon --start --exec%g" ${D}${sysconfdir}/init.d/nscd - sed -i "s|\(enable-cache\t\+netgroup\t\+\)yes|\1no|" ${D}${sysconfdir}/nscd.conf - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${S}/nscd/nscd.service ${D}${systemd_system_unitdir}/ + if ${@bb.utils.contains('PACKAGECONFIG', 'nscd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/init.d + install -d ${D}${localstatedir}/db/nscd + install -m 0755 ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd + install -m 0755 ${S}/nscd/nscd.conf ${D}${sysconfdir}/nscd.conf + sed -i "s%daemon%start-stop-daemon --start --exec%g" ${D}${sysconfdir}/init.d/nscd + sed -i "s|\(enable-cache\t\+netgroup\t\+\)yes|\1no|" ${D}${sysconfdir}/nscd.conf + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${S}/nscd/nscd.service ${D}${systemd_system_unitdir}/ + fi # The dynamic loader will have been installed into # ${base_libdir}. However, if that isn't going to end up being @@ -132,18 +136,19 @@ def get_libc_fpu_setting(bb, d): return "" do_install:append:class-target() { - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${nonarch_libdir}/tmpfiles.d - echo "d /run/nscd 755 root root -" \ - > ${D}${nonarch_libdir}/tmpfiles.d/nscd.conf - fi + if ${@bb.utils.contains('PACKAGECONFIG', 'nscd', 'true', 'false', d)}; then + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${nonarch_libdir}/tmpfiles.d + echo "d /run/nscd 755 root root -" \ + > ${D}${nonarch_libdir}/tmpfiles.d/nscd.conf + fi - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/default/volatiles - echo "d root root 0755 /var/run/nscd none" \ - > ${D}${sysconfdir}/default/volatiles/98_nscd + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/default/volatiles + echo "d root root 0755 /var/run/nscd none" \ + > ${D}${sysconfdir}/default/volatiles/98_nscd + fi fi - } do_install:append:aarch64 () { do_install_armmultilib From patchwork Wed Jul 8 17:36:50 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 92051 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 22455C44501 for ; Wed, 8 Jul 2026 17:37:03 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14389.1783532220220754929 for ; Wed, 08 Jul 2026 10:37:00 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@arm.com header.s=foss header.b=A6E+CGxG; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 720DB1756 for ; Wed, 8 Jul 2026 10:36:55 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6D0AB3F905 for ; Wed, 8 Jul 2026 10:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1783532219; bh=eyu6hSZw0TeuMKUuSz2RB9V38U8JBjk2dO36girSUVk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=A6E+CGxGlqplfBWo3PrYPrAsMLrsbCPFMa8SWl13YPAqN/gQr1xGB3Oqasn6NFZlH 2pOkUOgJVpnk1W7Wr9xwyjhwt2AZ82JCu0mZTR7KprmFQW29E74AsCPyIoRPBIWiev 2/1szf3V877xfX9ruxbtMLcBtdudTDotpesNbOBw= From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/4] glibc: only inherit init script classes if nscd is enabled Date: Wed, 8 Jul 2026 18:36:50 +0100 Message-ID: <20260708173651.1435387-3-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260708173651.1435387-1-ross.burton@arm.com> References: <20260708173651.1435387-1-ross.burton@arm.com> 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 ; Wed, 08 Jul 2026 17:37:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/240502 As nscd is the only part of glibc that uses init scripts, we can use inherit_defer to only pull systemd or update-rc.d into the build if nscd has actually been enabled. As systemd-systemctl-native has non-trivial dependencies (such as python3-native), this can help reduce rebuilds of glibc. Signed-off-by: Ross Burton --- meta/recipes-core/glibc/glibc.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc index 7403eb845a..d46c31593d 100644 --- a/meta/recipes-core/glibc/glibc.inc +++ b/meta/recipes-core/glibc/glibc.inc @@ -9,7 +9,10 @@ HASHEQUIV_HASH_VERSION .= ".1" PROVIDES = "virtual/libc" PROVIDES += "virtual/libintl virtual/libiconv" -inherit autotools texinfo systemd update-rc.d + +inherit autotools texinfo + +inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'nscd', 'systemd update-rc.d', '', d)} LEAD_SONAME = "libc.so" From patchwork Wed Jul 8 17:36:51 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 92049 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 03656C43458 for ; Wed, 8 Jul 2026 17:37:03 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14390.1783532220783973461 for ; Wed, 08 Jul 2026 10:37:00 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@arm.com header.s=foss header.b=hgaCA2gz; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0F7011756 for ; Wed, 8 Jul 2026 10:36:56 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0C50B3F905 for ; Wed, 8 Jul 2026 10:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1783532220; bh=mMlQJoo365q+UeAXyEssm21iRoUvak9i9iVLgzJu3Hw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hgaCA2gz/J8Epq3YgMI1X64fMwP8eC08LFaMnIqou1ht7clmxlOGf7q4kKhKnUL6t MJfCQXpSxwrwi+II3TyC9mAh4jVXFx4SRgMqQSCVi5UqutPD80s01RdcljzO3h6V+f SVVfIsKcHPQxQj46Na7iUPmQfNpPvBLHe5IDEnTk= From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 4/4] glibc: disable nscd by default Date: Wed, 8 Jul 2026 18:36:51 +0100 Message-ID: <20260708173651.1435387-4-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260708173651.1435387-1-ross.burton@arm.com> References: <20260708173651.1435387-1-ross.burton@arm.com> 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 ; Wed, 08 Jul 2026 17:37:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/240503 nscd is the Name Service Caching Daemon, which is useful when fetching data from the configured Name Service Switch services is slow, for example if NIS or LDAP is used. This is unusual for typical OpenEmbedded deployments, and if caching is needed there are a number of solutions (including nscd) that should be considered. Signed-off-by: Ross Burton --- meta/recipes-core/glibc/glibc_2.43.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-core/glibc/glibc_2.43.bb b/meta/recipes-core/glibc/glibc_2.43.bb index a52dcfd364..67f9e63f2c 100644 --- a/meta/recipes-core/glibc/glibc_2.43.bb +++ b/meta/recipes-core/glibc/glibc_2.43.bb @@ -87,7 +87,7 @@ EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" EXTRA_OECONF:append:x86-64 = " --enable-cet" -PACKAGECONFIG ??= "nscd memory-tagging" +PACKAGECONFIG ??= "memory-tagging" PACKAGECONFIG[nscd] = "--enable-nscd,--disable-nscd" PACKAGECONFIG[memory-tagging] = "--enable-memory-tagging,--disable-memory-tagging"