Skip to contentSkip to conversation

p11-kit: remove obsolete compile error workaround

PATCH In review Ross Burton 2 participants 5 messages Apr 27 – May 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 p11-kit: remove obsolete compile error workaround

I couldn't replicate this compile error from 2024 so it's presumably no longer needed.

---
 meta/recipes-support/p11-kit/p11-kit_0.26.2.bb | 10 ----------
 1 file changed, 10 deletions(-)
meta/recipes-support/p11-kit/p11-kit_0.26.2.bb +0 -10
index 5f553f11bbb..aa8b28e0e71 100644
@@ -33,14 +33,4 @@ INSANE_SKIP:${PN} = "dev-so"
 
 BBCLASSEXTEND = "native nativesdk"
 
-# # This one is reproducible only on 32bit MACHINEs
-# http://errors.yoctoproject.org/Errors/Details/766969/
-# git/p11-kit/import-object.c:223:62: error: passing argument 3 of 'p11_asn1_read' from incompatible pointer type [-Wincompatible-pointer-types]
-# git/p11-kit/import-object.c:229:70: error: passing argument 3 of 'p11_asn1_read' from incompatible pointer type [-Wincompatible-pointer-types]
-# git/p11-kit/import-object.c:264:78: error: passing argument 3 of 'p11_asn1_read' from incompatible pointer type [-Wincompatible-pointer-types]
-# git/p11-kit/import-object.c:223:62: error: passing argument 3 of 'p11_asn1_read' from incompatible pointer type [-Wincompatible-pointer-types]
-# git/p11-kit/import-object.c:229:70: error: passing argument 3 of 'p11_asn1_read' from incompatible pointer type [-Wincompatible-pointer-types]
-# git/p11-kit/import-object.c:264:78: error: passing argument 3 of 'p11_asn1_read' from incompatible pointer type [-Wincompatible-pointer-types]
-CFLAGS += "-Wno-error=incompatible-pointer-types"
-
 CVE_STATUS[CVE-2026-2100] = "fixed-version: fixed since 0.26.2"
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/4 p11-kit: add PACKAGECONFIG for trust and systemd

libtasn dependencies are specific to the trust module, add a PACKAGECONFIG for that and move the dependencies. This is currently enabled by default to preserve behaviour.

p11-kit has optional systemd user units for the remote server, add a PACKAGECONFIG for that that respects the systemd DISTRO_FEATURE.

---
 meta/recipes-support/p11-kit/p11-kit_0.26.2.bb | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
meta/recipes-support/p11-kit/p11-kit_0.26.2.bb +5 -4
index aa8b28e0e71..a0e2e17d026 100644
@@ -6,16 +6,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=02933887f609807fbb57aa4237d14a50"
 
 inherit meson gettext pkgconfig gtk-doc bash-completion manpages
 
-DEPENDS = "libtasn1 libtasn1-native libffi"
+DEPENDS = "libffi"
 
 DEPENDS:append = "${@' glib-2.0' if d.getVar('GTKDOC_ENABLED') == 'True' else ''}"
 
-SRC_URI = "gitsm://github.com/p11-glue/p11-kit;branch=master;protocol=https;tag=${PV} \
-           "
+SRC_URI = "gitsm://github.com/p11-glue/p11-kit;branch=master;protocol=https;tag=${PV}"
 SRCREV = "8e6e4e6d64d9fe91c62b0052c105b2b72d4c24ef"
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} trust"
+PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd"
 PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native"
+PACKAGECONFIG[trust] = "-Dtrust_module=enabled,-Dtrust_module=disabled,libtasn1-native libtasn1"
 PACKAGECONFIG[trust-paths] = "-Dtrust_paths=/etc/ssl/certs/ca-certificates.crt,,,ca-certificates"
 
 EXTRA_OEMESON:append = " -Dnls=${@'false' if d.getVar('USE_NLS') == 'no' else 'true'}"
Signature · 1 line
2.43.0
#2 lore raw

RE: [OE-core] [PATCH 2/4] p11-kit: add PACKAGECONFIG for trust and systemd

Quoted 29 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Ross Burton via lists.openembedded.org
Sent: den 27 april 2026 22:47
To: [email protected]
Subject: [OE-core] [PATCH 2/4] p11-kit: add PACKAGECONFIG for trust and systemd

libtasn dependencies are specific to the trust module, add a PACKAGECONFIG for that and move the dependencies. This is currently enabled by default to preserve behaviour.

p11-kit has optional systemd user units for the remote server, add a PACKAGECONFIG for that that respects the systemd DISTRO_FEATURE.

---
 meta/recipes-support/p11-kit/p11-kit_0.26.2.bb | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
meta/recipes-support/p11-kit/p11-kit_0.26.2.bb +1 -1
index aa8b28e0e71..a0e2e17d026 100644
@@ -6,16 +6,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=02933887f609807fbb57aa4237d14a50"
 
 inherit meson gettext pkgconfig gtk-doc bash-completion manpages
 
-DEPENDS = "libtasn1 libtasn1-native libffi"
+DEPENDS = "libffi"
 

meta/recipes-support/p11-kit/p11-kit_0.26.2.bb LIC_FILES_CHKSUM = "file://COPYING;md5=02933887f609807fbb57aa4237d14a50" · line 17

Quoted 10 lines
meta/recipes-support/p11-kit/p11-kit_0.26.2.bb +3 -3
 DEPENDS:append = "${@' glib-2.0' if d.getVar('GTKDOC_ENABLED') == 'True' else ''}"
 
-SRC_URI = "gitsm://github.com/p11-glue/p11-kit;branch=master;protocol=https;tag=${PV} \
-           "
+SRC_URI = "gitsm://github.com/p11-glue/p11-kit;branch=master;protocol=https;tag=${PV}"
 SRCREV = "8e6e4e6d64d9fe91c62b0052c105b2b72d4c24ef"
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} trust"
+PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd"

If one has the p11-kit PACKAGECONFIG enabled in gnutls, then this will result in a circular dependency: systemd -> libmicrohttpd -> gnutls -> p11-kit -> systemd

I also noticed that systemd has a p11-kit PACKAGECONFIG, which I expect will result in another circular dependency now if it is enabled...

Maybe it would be better to not enable the systemd PACKAGECONFIG here by default? Or better, add a patch that allows bitbake to specify the path for systemduserunitdir using a Meson option so that p11-kit does not have to depend on systemd just to find that path.

We often use something like this in our Meson files to be able to avoid the dependency on systemd:

systemdsystemunitdir = get_option('systemdsystemunitdir')
if systemdsystemunitdir == ''
systemd = dependency('systemd')
systemdsystemunitdir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir')
endif

Quoted 7 lines
meta/recipes-support/p11-kit/p11-kit_0.26.2.bb +1 -1
 PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native"
+PACKAGECONFIG[trust] = "-Dtrust_module=enabled,-Dtrust_module=disabled,libtasn1-native libtasn1"
 PACKAGECONFIG[trust-paths] = "-Dtrust_paths=/etc/ssl/certs/ca-certificates.crt,,,ca-certificates"
 
 EXTRA_OEMESON:append = " -Dnls=${@'false' if d.getVar('USE_NLS') == 'no' else 'true'}"
--

2.43.0

//Peter

#3 lore raw

PATCH 3/4 p11-kit: explicitly disable tests and zsh-completions

In reply to Ross Burton

There's no need to build the tests as we won't run them, and disable the zsh completion to avoid having to package the files.

---
 meta/recipes-support/p11-kit/p11-kit_0.26.2.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-support/p11-kit/p11-kit_0.26.2.bb +5 -1
index a0e2e17d026..69fb76658ea 100644
@@ -19,7 +19,11 @@ PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native"
 PACKAGECONFIG[trust] = "-Dtrust_module=enabled,-Dtrust_module=disabled,libtasn1-native libtasn1"
 PACKAGECONFIG[trust-paths] = "-Dtrust_paths=/etc/ssl/certs/ca-certificates.crt,,,ca-certificates"
 
-EXTRA_OEMESON:append = " -Dnls=${@'false' if d.getVar('USE_NLS') == 'no' else 'true'}"
+EXTRA_OEMESON = "\
+    -Dtest=false \
+    -Dzsh_completion=disabled \
+    -Dnls=${@'false' if d.getVar('USE_NLS') == 'no' else 'true'}"
+
 GTKDOC_MESON_OPTION = 'gtk_doc'
 
 FILES:${PN} += " \
Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/4 p11-kit: packaging rewrite

In reply to Ross Burton

p11-kit is actually a library, pluggable modules, and some helper tools.

Add new packages -bin -modules and -remote to package up the pieces separately, and leave just the library in the main package.

---
 .../recipes-support/p11-kit/p11-kit_0.26.2.bb | 25 ++++++++++++-------
 1 file changed, 16 insertions(+), 9 deletions(-)
meta/recipes-support/p11-kit/p11-kit_0.26.2.bb +16 -9
index 69fb76658ea..ea636bfb0a8 100644
@@ -4,7 +4,7 @@ HOMEPAGE = "https://p11-glue.github.io/p11-glue/p11-kit.html"
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://COPYING;md5=02933887f609807fbb57aa4237d14a50"
 
-inherit meson gettext pkgconfig gtk-doc bash-completion manpages
+inherit meson gettext pkgconfig gtk-doc bash-completion manpages lib_package
 
 DEPENDS = "libffi"
 
@@ -26,15 +26,22 @@ EXTRA_OEMESON = "\
 
 GTKDOC_MESON_OPTION = 'gtk_doc'
 
-FILES:${PN} += " \
-    ${libdir}/p11-kit-proxy.so \
-    ${libdir}/pkcs11/*.so \
-    ${libdir}/pkcs11/*.la \
-    ${datadir} \
-    ${systemd_user_unitdir}/*"
+PACKAGES =+ "${PN}-modules ${PN}-remote"
 
-# PN contains p11-kit-proxy.so, a symlink to a loadable module
-INSANE_SKIP:${PN} = "dev-so"
+FILES:${PN}-bin += "${libexecdir}/p11-kit/trust-extract-compat"
+
+FILES:${PN}-modules = "\
+    ${datadir}/p11-kit/modules \
+    ${libdir}/p11-kit-proxy.so \
+    ${libdir}/pkcs11"
+
+# p11-kit-proxy.so, a symlink to a loadable module
+INSANE_SKIP:${PN}-modules = "dev-so"
+
+FILES:${PN}-remote = "\
+    ${libexecdir}/p11-kit/p11-kit-remote \
+    ${libexecdir}/p11-kit/p11-kit-server \
+    ${systemd_user_unitdir}"
 
 BBCLASSEXTEND = "native nativesdk"
 
Signature · 1 line
2.43.0