From: Dan McGregor <danismostlikely@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Dan McGregor <danmcgr@protonmail.com>
Subject: [meta-oe][PATCH v2 1/2] libfido2-initial: new recipe
Date: Mon, 16 Mar 2026 16:30:13 -0600 [thread overview]
Message-ID: <20260316223014.56293-1-danismostlikely@gmail.com> (raw)
From: Dan McGregor <danmcgr@protonmail.com>
Use this recipe to break a circular dependency between libfido2 and
systemd when systemd's fido PACKAGECONFIG is enabled. systemd depends
on libfido2, and libfido2 depends on udev provided by systemd. However,
systemd only depends on the headers provided by libfido2 and its pkgconf
data. systemd uses only the datatypes provided, and opportunistically
enables fido support if libfido2 is found.
This recipe provides only the headers and pkgconf data. This is
sufficient to allow systemd to build support for libfido2.
It only works with a related change I've submitted to openembedded core.
Signed-off-by: Dan McGregor <danmcgr@protonmail.com>
---
.../libfido2/libfido2-initial_1.16.0.bb | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 meta-oe/recipes-support/libfido2/libfido2-initial_1.16.0.bb
diff --git a/meta-oe/recipes-support/libfido2/libfido2-initial_1.16.0.bb b/meta-oe/recipes-support/libfido2/libfido2-initial_1.16.0.bb
new file mode 100644
index 00000000000..7d9838b003b
--- /dev/null
+++ b/meta-oe/recipes-support/libfido2/libfido2-initial_1.16.0.bb
@@ -0,0 +1,40 @@
+SUMMARY = "FIDO 2.0 support library"
+DESCRIPTION = "libfido2 provides library functionality and command-line tools to \
+communicate with a FIDO device over USB, and to verify attestation and \
+assertion signatures."
+HOMEPAGE = "https://developers.yubico.com/libfido2"
+LICENSE = "BSD-2-Clause"
+SECTION = "libs/network"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=20be19aaa222f71738712b26f7f8717b"
+
+SRC_URI = "https://developers.yubico.com/${BPN}/Releases/${BPN}-${PV}.tar.gz"
+SRC_URI[sha256sum] = "8c2b6fb279b5b42e9ac92ade71832e485852647b53607c43baaafbbcecea04e4"
+
+inherit nopackages
+
+PACKAGES = ""
+
+# The purpose of this recipe is to break a circular dependency between libfido2 and
+# systemd. libfido2 depends on udev (provided by systemd) to build, while systemd
+# depends on libfido2 if the fido feature is enabled. However, systemd doesn't
+# actually link against libfido2. It only needs the headers in place and a dummy
+# shared library. It opportunistically dlopens libfido2 if it's present, but
+# for that to work it needs the headers in place.
+# Just fake enough to make systemd happy, and have it RRECOMMEND the real libfido2.
+do_install() {
+ mkdir -p ${D}${includedir}/libfido2-initial/fido
+ mkdir -p ${D}${datadir}/pkgconfig
+
+ install -m 644 ${S}/src/fido.h ${D}${includedir}/libfido2-initial
+ install -m 644 ${S}/src/fido/* ${D}${includedir}/libfido2-initial/fido/
+
+ # Real libfido2 installs its pkg conf file in ${libdir}.
+ sed -e 's,@CMAKE_INSTALL_PREFIX@,${exec_prefix},' \
+ -e 's,@CMAKE_INSTALL_LIBDIR@,${baselib}/libfido2-initial,' \
+ -e 's,@FIDO_VERSION@,${PV},' \
+ -e 's,@PROJECT_NAME@,${BPN},' \
+ -e '/^Cflags/s,$,/libfido2-initial,' \
+ ${S}/src/libfido2.pc.in > ${D}${datadir}/pkgconfig/libfido2.pc
+
+}
next reply other threads:[~2026-03-16 22:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 22:30 Dan McGregor [this message]
2026-03-16 22:30 ` [meta-oe][PATCH v2 2/2] redis 8: Update licence Dan McGregor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260316223014.56293-1-danismostlikely@gmail.com \
--to=danismostlikely@gmail.com \
--cc=danmcgr@protonmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.