Skip to contentSkip to conversation

sdbus-c++: Ignore CreatesGenericErrorWhenErrnoIsUnknown test on non-glibc systems

PATCH New [email protected] 1 participant 5 messages Dec 10, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 21/43 sdbus-c++: Ignore CreatesGenericErrorWhenErrnoIsUnknown test on non-glibc systems

From: Khem Raj <[email protected]>

(cherry picked from commit c6618c38daee4b108d804c3a9046b12d60a7e96b)
---
 ...actory-test-for-musl-libc-compatibil.patch | 29 +++++++++++++++++++
 .../recipes-core/sdbus-c++/sdbus-c++_2.2.1.bb |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++/0001-test-Fix-error-factory-test-for-musl-libc-compatibil.patch
meta-oe/recipes-core/sdbus-c++/sdbus-c++/0001-test-Fix-error-factory-test-for-musl-libc-compatibil.patch new file +29 -0
new file mode 100644
index 0000000000..118d84e290
@@ -0,0 +1,29 @@
+From da0d6595c48905ec7d99f1a75878fbeb17972d75 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 26 Nov 2025 23:29:53 -0800
+Subject: [PATCH] test: Fix error factory test for musl libc compatibility
+
+It uses errno value 123456 in test handling of unknown errors. This works
+on glibc which accepts any errno value, but musl libc validates
+errno ranges more strictly (typically 1-133).
+
+Ignore test on non-glibc systems
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ tests/unittests/Types_test.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/tests/unittests/Types_test.cpp
++++ b/tests/unittests/Types_test.cpp
+@@ -488,7 +488,7 @@ TEST(AnErrorFactory, CanCreateAnErrorFro
+     EXPECT_TRUE(error.isValid());
+ }
+ 
+-#ifndef SDBUS_basu // Creating error from invalid errno is not supported on basu backend
++#if !defined(S0DBUS_basu) && defined(__GLIBC__)  // Creating error from invalid errno is not supported on basu backend
+ TEST(AnErrorFactory, CreatesGenericErrorWhenErrnoIsUnknown)
+ {
+     auto error = sdbus::createError(123456, "custom message");
meta-oe/recipes-core/sdbus-c++/sdbus-c++_2.2.1.bb +1 -0
index 6cacb5dfe8..43646953f2 100644
@@ -18,6 +18,7 @@ DEPENDS += "expat"
 
 SRCREV = "28b78822cfc5fbec4bd9906168493e9985f586ed"
 SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master;tag=v${PV} \
+           file://0001-test-Fix-error-factory-test-for-musl-libc-compatibil.patch \
            file://run-ptest"
 
 EXTRA_OECMAKE = "-DSDBUSCPP_BUILD_CODEGEN=OFF \
#1 lore raw

PATCH 22/43 proj: Fix do_package QA issue for unshipped bash-completion files

From: Alper Ak <[email protected]>

Add bash-completion directory to FILES to resolve the installed-vs-shipped QA error.

Fix:

ERROR: proj-9.7.0-r0 do_package: QA Issue: proj: Files/directories were installed but not shipped in any package:
/usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/projinfo
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
proj: 3 installed and not shipped files. [installed-vs-shipped]
ERROR: proj-9.7.0-r0 do_package: Fatal QA errors were found, failing task.

(cherry picked from commit 1175d5c8c13d73568d4ab55a3cf628456fcc1a7d)
---
 meta-oe/recipes-navigation/proj/proj_9.7.0.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-oe/recipes-navigation/proj/proj_9.7.0.bb +3 -1
index 2a41f1ec52..eb9fe46f30 100644
@@ -12,7 +12,9 @@ inherit bash-completion cmake lib_package pkgconfig
 
 EXTRA_OECMAKE = "-DBUILD_TESTING=OFF"
 
-FILES:${PN} += "${datadir}/proj"
+FILES:${PN} += " \
+	${datadir}/proj \
+	${datadir}/bash-completion"
 
 BBCLASSEXTEND = "native"
 
#2 lore raw

PATCH 23/43 dbus-broker: upgrade 36->37

In reply to [email protected]

From: Gyorgy Sarvari <[email protected]>

Changelog:
- Add /etc and /run to the search-paths for system services. This change is aligned with recent changes to the reference implementation.
- Support systemd's notify-reload to trigger a reload operation. This replaces the old busctl call ...ReloadConfig operation.
- Extend org.freedesktop.DBus.Debug.Stats.GetStats with all the fields defined by the specification.
- Fix a bug in match-rule processing which caused argument processing to fail for any but the first message argument.
- Fix a memory leak in configuration processing when parsing invalid user or group IDs.

(cherry picked from commit c7812d7f9f598e3958c8ade1d18523d97efc7976)
---
 .../recipes-core/dbus/{dbus-broker_36.bb => dbus-broker_37.bb}  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-oe/recipes-core/dbus/{dbus-broker_36.bb => dbus-broker_37.bb} (93%)
meta-oe/recipes-core/dbus/dbus-broker_37.bb renamed from meta-oe/recipes-core/dbus/dbus-broker_36.bb +1 -1
similarity index 93%
rename from meta-oe/recipes-core/dbus/dbus-broker_36.bb
rename to meta-oe/recipes-core/dbus/dbus-broker_37.bb
index 8959927a92..f0312181b6 100644
@@ -11,7 +11,7 @@ DEPENDS = "\
 "
 
 SRC_URI = "https://github.com/bus1/dbus-broker/releases/download/v${PV}/${BP}.tar.xz"
-SRC_URI[sha256sum] = "d333d99bd2688135b6d6961e7ad1360099d186078781c87102230910ea4e162b"
+SRC_URI[sha256sum] = "f819a8db8795fa08c767612e3823fd594694a0990f2543ecf35d6a1a6bf2ab5b"
 
 UPSTREAM_CHECK_URI = "https://github.com/bus1/${BPN}/releases"
 UPSTREAM_CHECK_REGEX = "releases/tag/v(?P<pver>\d+)"
#3 lore raw

PATCH 24/43 dbus-broker: add ptest support

In reply to [email protected]

From: Gyorgy Sarvari <[email protected]>

It takes less than 30 seconds to execute.

Add a backported patch that fixes a broken test.

(cherry picked from commit 05230420abafb2d1a7da86c77f22434f415af8fb)
---
 .../include/ptest-packagelists-meta-oe.inc    |  1 +
 ...-loosen-verification-of-stale-pidfds.patch | 52 +++++++++++++++++++
 .../recipes-core/dbus/dbus-broker/run-ptest   | 19 +++++++
 meta-oe/recipes-core/dbus/dbus-broker_37.bb   | 12 ++++-
 4 files changed, 82 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-core/dbus/dbus-broker/0001-test-sockopt-loosen-verification-of-stale-pidfds.patch
 create mode 100644 meta-oe/recipes-core/dbus/dbus-broker/run-ptest
meta-oe/conf/include/ptest-packagelists-meta-oe.inc +1 -0
index ea336f1058..c43e9b8c2a 100644
@@ -12,6 +12,7 @@ PTESTS_FAST_META_OE = "\
     cli11 \
     cmocka \
     cunit \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'dbus-broker', '', d)} \
     duktape \
     fuse3 \
     function2 \
meta-oe/recipes-core/dbus/dbus-broker/0001-test-sockopt-loosen-verification-of-stale-pidfds.patch new file +52 -0

52 lines not on this page · raw message

meta-oe/recipes-core/dbus/dbus-broker/run-ptest new file +19 -0
new file mode 100644
index 0000000000..789000523e
@@ -0,0 +1,19 @@
+#!/bin/sh
+RET=0
+
+run_tests(){
+  for t in *; do
+    if ./$t; then
+      echo PASS: $t
+    else
+      echo FAIL: $t
+      RET=1
+    fi
+  done
+}
+
+cd /usr/lib/dbus-broker/tests/dbus
+run_tests
+cd /usr/lib/dbus-broker/tests/unit
+run_tests
+exit $RET
meta-oe/recipes-core/dbus/dbus-broker_37.bb +10 -2
index f0312181b6..c531f555d2 100644
@@ -10,7 +10,10 @@ DEPENDS = "\
     ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'libselinux (>= 3.2)', '', d)} \
 "
 
-SRC_URI = "https://github.com/bus1/dbus-broker/releases/download/v${PV}/${BP}.tar.xz"
+SRC_URI = "https://github.com/bus1/dbus-broker/releases/download/v${PV}/${BP}.tar.xz \
+           file://0001-test-sockopt-loosen-verification-of-stale-pidfds.patch \
+           file://run-ptest \
+           "
 SRC_URI[sha256sum] = "f819a8db8795fa08c767612e3823fd594694a0990f2543ecf35d6a1a6bf2ab5b"
 
 UPSTREAM_CHECK_URI = "https://github.com/bus1/${BPN}/releases"
@@ -18,10 +21,11 @@ UPSTREAM_CHECK_REGEX = "releases/tag/v(?P<pver>\d+)"
 
 SYSTEMD_SERVICE:${PN} = "${BPN}.service"
 
-inherit meson pkgconfig systemd features_check
+inherit meson pkgconfig systemd features_check ptest
 
 EXTRA_OEMESON += "-Daudit=${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'true', 'false', d)}"
 EXTRA_OEMESON += "-Dselinux=${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'true', 'false', d)}"
+EXTRA_OEMESON += "-Dtests=${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)}"
 
 REQUIRED_DISTRO_FEATURES = "systemd"
 
@@ -36,3 +40,7 @@ RDEPENDS:${PN} += "dbus-common dbus-tools"
 FILES:${PN} += "${nonarch_libdir}/systemd/catalog"
 FILES:${PN} += "${systemd_system_unitdir}"
 FILES:${PN} += "${systemd_user_unitdir}"
+FILES:${PN}-ptest += "${libdir}/${PN}/tests"
+
+# test-sockopt fails to compile with musl without this flag
+CFLAGS:append:libc-musl = "${@bb.utils.contains('PTEST_ENABLED', '1', ' -Wno-error=incompatible-pointer-types ', '', d)}"
#4 lore raw

PATCH 25/43 dbus-broker: rework EXTRA_OEMESON opts to PACKAGECONFIG

In reply to [email protected]

From: Gyorgy Sarvari <[email protected]>

(cherry picked from commit 75fad30c62491d0246374cffd3a10b94499524ba)
---
 meta-oe/recipes-core/dbus/dbus-broker_37.bb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
meta-oe/recipes-core/dbus/dbus-broker_37.bb +5 -5
index c531f555d2..ae9c8f2fcd 100644
@@ -6,8 +6,6 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=7b486c2338d225a1405d979ed2c15ce8"
 DEPENDS = "\
     expat \
     systemd \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'audit (>= 3.0)', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'libselinux (>= 3.2)', '', d)} \
 "
 
 SRC_URI = "https://github.com/bus1/dbus-broker/releases/download/v${PV}/${BP}.tar.xz \
@@ -23,9 +21,11 @@ SYSTEMD_SERVICE:${PN} = "${BPN}.service"
 
 inherit meson pkgconfig systemd features_check ptest
 
-EXTRA_OEMESON += "-Daudit=${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'true', 'false', d)}"
-EXTRA_OEMESON += "-Dselinux=${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'true', 'false', d)}"
-EXTRA_OEMESON += "-Dtests=${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'audit selinux', '', d)} \
+                   ${@bb.utils.contains('PTEST_ENABLED', '1', 'test', '', d)}"
+PACKAGECONFIG[audit] = "-Daudit=true, -Daudit=false, audit (>= 3.0)"
+PACKAGECONFIG[selinux] = "-Dselinux=true, -Dselinux=false, libselinux (>= 3.2)"
+PACKAGECONFIG[test] = "-Dtests=true, -Dtests=false"
 
 REQUIRED_DISTRO_FEATURES = "systemd"