Skip to contentSkip to conversation

xrdp: add ptest support

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

lore
Share & tools
lore
#0 lore raw

PATCH 26/43 xrdp: add ptest support

From: Gyorgy Sarvari <[email protected]>

It takes under 10 seconds to run the suite. Executed succesfully on x86-64, with musl and glibc.

The recipe requires pam DISTRO_FEATURE to be present.

(cherry picked from commit 54ca51b6c6c90ad464a488e1ee271d3fff708955)
---
 .../include/ptest-packagelists-meta-oe.inc    |  1 +
 meta-oe/recipes-support/xrdp/xrdp/run-ptest   | 13 +++++++
 meta-oe/recipes-support/xrdp/xrdp_0.10.4.1.bb | 37 ++++++++++++++++++-
 3 files changed, 49 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-support/xrdp/xrdp/run-ptest
meta-oe/conf/include/ptest-packagelists-meta-oe.inc +1 -0
index c43e9b8c2a..a71d3de0ad 100644
@@ -53,6 +53,7 @@ PTESTS_FAST_META_OE = "\
     utf8proc \
     uthash \
     xmlsec1 \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'xrdp', '', d)} \
     zeromq \
     cjson \
     libplist \
meta-oe/recipes-support/xrdp/xrdp/run-ptest new file +13 -0
new file mode 100644
index 0000000000..4db66da65e
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+RESULT=0
+cd tests
+for t in $(find . -type f -executable); do
+    ./$t > $t.out
+    ret=$?
+    if [ $ret -ne 0 ]; then
+        RESULT=$ret
+    fi
+    sed -e "s/^ok/PASS: /g" -e "s/^not ok/FAIL: /g" ./$t.out
+done
+exit $RESULT
meta-oe/recipes-support/xrdp/xrdp_0.10.4.1.bb +35 -2
index cd45d27fe4..8203ada8e5 100644
@@ -4,7 +4,7 @@ LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=72cfbe4e7bd33a0a1de9630c91195c21 \
 "
 
-inherit features_check autotools pkgconfig useradd systemd
+inherit features_check autotools pkgconfig useradd systemd ptest
 
 DEPENDS = "openssl virtual/libx11 libxfixes libxrandr libpam nasm-native imlib2 pixman libsm"
 
@@ -12,6 +12,7 @@ REQUIRED_DISTRO_FEATURES = "x11 pam"
 
 SRC_URI = "https://github.com/neutrinolabs/${BPN}/releases/download/v${PV}/${BPN}-${PV}.tar.gz \
            file://xrdp.sysconfig \
+           file://run-ptest \
            file://0001-Added-req_distinguished_name-in-etc-xrdp-openssl.con.patch \
            file://0001-arch-Define-NO_NEED_ALIGN-on-ppc64.patch \
            file://0001-mark-count-with-unused-attribute.patch \
@@ -25,8 +26,9 @@ UPSTREAM_CHECK_REGEX = "releases/tag/v(?P<pver>\d+(\.\d+)+)"
 
 CFLAGS += " -Wno-deprecated-declarations"
 
-PACKAGECONFIG ??= "fuse"
+PACKAGECONFIG ??= "fuse ${@bb.utils.contains('PTEST_ENABLED', '1', 'test', '', d)}"
 PACKAGECONFIG[fuse] = " --enable-fuse, --disable-fuse, fuse3"
+PACKAGECONFIG[test] = " --enable-tests, , libcheck cmocka"
 
 USERADD_PACKAGES = "${PN}"
 GROUPADD_PARAM:${PN} = "--system xrdp"
@@ -77,6 +79,37 @@ do_install:append() {
 	chown xrdp:xrdp ${D}${sysconfdir}/xrdp
 }
 
+do_compile_ptest() {
+	for testdir in $(find ./tests -type d -mindepth 1); do
+		cd $testdir
+		echo 'buildtest-TESTS: $(check_PROGRAMS)' >> Makefile
+		# change the test-data folder to ./data instead of ${S}
+		sed -i 's|-D TOP_SRCDIR=[^ ]*|-D TOP_SRCDIR=\\"./data\\"|' Makefile
+		# another test data folder redirection
+		sed -i 's|-D IMAGEDIR=[^ ]*|-D IMAGEDIR=\\"./data\\"|' Makefile
+		# and another
+		sed -i 's|-DXRDP_TOP_SRCDIR=[^ ]*|-DXRDP_TOP_SRCDIR=\\"..\\"|' Makefile
+		oe_runmake buildtest-TESTS
+		cd -
+	done
+}
+
+do_install_ptest() {
+	install -d ${D}${PTEST_PATH}/tests/xrdp/gfx
+	install -d ${D}${PTEST_PATH}/tests/data/xrdp
+	for testbin in $(find ./tests -type f -executable -mindepth 3); do
+		install $testbin ${D}${PTEST_PATH}/tests/
+	done
+	install -m 666 ${S}/xrdp/xrdp256.bmp ${D}${PTEST_PATH}/tests/data/xrdp/
+	install -m 666 ${S}/xrdp/ad256.bmp ${D}${PTEST_PATH}/tests/data/xrdp/
+	install -m 666 ${S}/tests/xrdp/*.bmp ${D}${PTEST_PATH}/tests/data/
+	install -m 666 ${S}/tests/xrdp/test1.jpg ${D}${PTEST_PATH}/tests/data/
+	install -m 666 ${S}/tests/xrdp/test_alpha_blend.png ${D}${PTEST_PATH}/tests/data/
+	install -m 666 ${S}/tests/xrdp/gfx/* ${D}${PTEST_PATH}/tests/xrdp/gfx/
+}
+
+RDEPENDS:${PN}-ptest += "imlib2-loaders"
+
 SYSTEMD_SERVICE:${PN} = "xrdp.service xrdp-sesman.service"
 
 pkg_postinst:${PN}() {
#1 lore raw

PATCH 27/43 trace-cmd: Update SRC_URI to use HTTPS protocol

From: yuyu <[email protected]>

(cherry picked from commit f00b6ad12f2fead06487711c48544b3dd62bb987)
---
 meta-oe/recipes-kernel/trace-cmd/trace-cmd_3.1.5.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-kernel/trace-cmd/trace-cmd_3.1.5.bb +1 -1
index 6782dec228..38922126c5 100644
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = " \
     file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd \
     "
 
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=master \
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=master;protocol=https \
            file://0001-Replace-LFS64-interfaces-off64_t-and-lseek64.patch \
            file://0002-Drop-using-_LARGEFILE64_SOURCE.patch \
            file://0001-Do-not-emit-useless-rpath.patch"
#2 lore raw

PATCH 28/43 fuse3: Fix build with clang on riscv32

In reply to [email protected]

From: Khem Raj <[email protected]>

Clang needs 64-bit atomics on rv32 here and builtins does not have them so help it by linking with libatomic

Fixes
riscv32-yoe-linux-musl-ld.lld: error: undefined symbol: __atomic_fetch_add_8

(cherry picked from commit e3257c3360a732914ae02a07a7c0fe8c845a492f)
---
 meta-oe/recipes-support/fuse/fuse3_3.16.2.bb | 3 +++
 1 file changed, 3 insertions(+)
meta-oe/recipes-support/fuse/fuse3_3.16.2.bb +3 -0
index 2747e6c8be..4fc94b4e52 100644
@@ -25,6 +25,9 @@ CVE_PRODUCT = "fuse_project:fuse"
 
 inherit meson pkgconfig ptest
 
+# fix  riscv32-yoe-linux-musl-ld.lld: error: undefined symbol: __atomic_fetch_add_8
+LDFLAGS:append:toolchain-clang:riscv32 = " -latomic"
+
 SRC_URI += " \
     file://run-ptest \
     file://fuse3.conf \
#3 lore raw

PATCH 29/43 syslog-ng: switch to libpcre2

In reply to [email protected]

From: Hongxu Jia <[email protected]>

The syslog-ng used pcre2 instead of pcre since 2023 [1]

[1] https://github.com/syslog-ng/syslog-ng/commit/cb6de08dc9078644d48ca536b5660e406b1a50d6

(cherry picked from commit c1735e638af0de53e00c8403532a4463e4b3a110)
---
 meta-oe/recipes-support/syslog-ng/syslog-ng_4.8.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/syslog-ng/syslog-ng_4.8.2.bb +1 -1
index cfc376ded1..3d8570122b 100644
@@ -13,7 +13,7 @@ LICENSE = "GPL-2.0-only & LGPL-2.1-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=924958cefc9f7de3e0b818832b8a1cec"
 
 # util-linux added to get libuuid
-DEPENDS = "libpcre flex glib-2.0 openssl util-linux bison-native curl json-c"
+DEPENDS = "libpcre2 flex glib-2.0 openssl util-linux bison-native curl json-c"
 
 SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \
            file://syslog-ng.conf.systemd \
#4 lore raw

PATCH 30/43 crash: add zlib-native to depends for crash-cross

In reply to [email protected]

From: Yi Zhao <[email protected]>

Fix the following error when using buildtools-extended:

va_server.c:20:10: fatal error: zlib.h: No such file or directory
20 | #include <zlib.h>

      |          ^~~~~~~~
(cherry picked from commit bd745115de76de7242e3e7e69b29f1ae507fea13)
---
 meta-oe/recipes-kernel/crash/crash_8.0.6.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-kernel/crash/crash_8.0.6.bb +2 -0
index 1af90978e0..893d4de410 100644
@@ -12,6 +12,8 @@ EXTRA_OEMAKE:class-cross = 'RPMPKG="${PV}" \
 EXTRA_OEMAKE:append:class-native = " LDFLAGS='${BUILD_LDFLAGS}'"
 EXTRA_OEMAKE:append:class-cross = " LDFLAGS='${BUILD_LDFLAGS}'"
 
+DEPENDS:append:class-cross = " zlib-native"
+
 do_install:class-target () {
     oe_runmake DESTDIR=${D} install
 }
#5 lore raw

PATCH 31/43 hdf5: inherit pkgconfig

In reply to [email protected]

From: Changqing Li <[email protected]>

inherit pkgconfig, and fix install conflict when enable multilib, this can also improve reproducibility

(cherry picked from commit a2f2c06ec813bfc93718b1851a207343aaa7c663)
---
 meta-oe/recipes-support/hdf5/hdf5_2.0.0.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-oe/recipes-support/hdf5/hdf5_2.0.0.bb +4 -1
index 798ca1b83f..93fe352b99 100644
@@ -7,7 +7,7 @@ SECTION = "libs"
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=71a191398102f76050a4e56e78cb4891"
 
-inherit cmake siteinfo qemu multilib_header
+inherit cmake pkgconfig siteinfo qemu multilib_header multilib_script
 
 DEPENDS += "qemu-native zlib"
 
@@ -48,8 +48,11 @@ do_configure:append() {
 do_install:append() {
     # Used for generating config files on target
     oe_multilib_header H5pubconf.h
+    sed -i -e 's|${RECIPE_SYSROOT_NATIVE}||g' ${D}${bindir}/h5cc
 }
 
+MULTILIB_SCRIPTS += "${PN}:${bindir}/h5cc"
+
 BBCLASSEXTEND = "native"
 
 # h5fuse.sh script needs bash
#6 lore raw

PATCH 32/43 tmux: upgrade 3.5a -> 3.6

In reply to [email protected]

From: Liu Yiding <[email protected]>

Change log:
https://raw.githubusercontent.com/tmux/tmux/3.6/CHANGES

(cherry picked from commit bc2e724246c57a4f8807e197525b68da9b04f43b)
---
 meta-oe/recipes-extended/tmux/{tmux_3.5a.bb => tmux_3.6.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-oe/recipes-extended/tmux/{tmux_3.5a.bb => tmux_3.6.bb} (90%)
meta-oe/recipes-extended/tmux/tmux_3.6.bb renamed from meta-oe/recipes-extended/tmux/tmux_3.5a.bb +1 -1
similarity index 90%
rename from meta-oe/recipes-extended/tmux/tmux_3.5a.bb
rename to meta-oe/recipes-extended/tmux/tmux_3.6.bb
index 72c84f562e..5daa1b174a 100644
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://tmux.c;beginline=3;endline=17;md5=f256b76d52e7b4d02bf
 DEPENDS = "ncurses libevent bison-native"
 
 SRC_URI = "https://github.com/tmux/tmux/releases/download/${PV}/tmux-${PV}.tar.gz"
-SRC_URI[sha256sum] = "16216bd0877170dfcc64157085ba9013610b12b082548c7c9542cc0103198951"
+SRC_URI[sha256sum] = "136db80cfbfba617a103401f52874e7c64927986b65b1b700350b6058ad69607"
 
 UPSTREAM_CHECK_URI = "https://github.com/tmux/tmux/releases"
 UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+[a-z]?)"
#7 lore raw

PATCH 33/43 asyncmqtt: upgrade 10.2.5 -> 10.2.6

In reply to [email protected]

From: Wang Mingyu <[email protected]>

Changelog:
==============
* Removed unintentional copy requiment from some of async functions parameter.
* Fixed Heap-use-after-free during broker shutdown.
* Rifined documents.
* Added TLS Websocket verify none port to broker for browser.
* Added Cerfiticate file's digitalSignature to keyUsage.
* Fixed wss connection from Web Browser handshake failed problem.
* Changed trial broker on async-mqtt.redboltz.net ws and wss port.
* ws was 10080 but Chrome block it by default. Updated to 80.
* wss was 10443 but Chrome doesn't block it by default. But for consistency, updated to 443.
* system_test still uses 10080 and 10443 to avoid conflict.

(cherry picked from commit 43779307f45dae2b790e0cba906959950df85fb2)
---
 .../asyncmqtt/{asyncmqtt_10.2.5.bb => asyncmqtt_10.2.6.bb}      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-oe/recipes-connectivity/asyncmqtt/{asyncmqtt_10.2.5.bb => asyncmqtt_10.2.6.bb} (87%)
meta-oe/recipes-connectivity/asyncmqtt/asyncmqtt_10.2.6.bb renamed from meta-oe/recipes-connectivity/asyncmqtt/asyncmqtt_10.2.5.bb +1 -1
similarity index 87%
rename from meta-oe/recipes-connectivity/asyncmqtt/asyncmqtt_10.2.5.bb
rename to meta-oe/recipes-connectivity/asyncmqtt/asyncmqtt_10.2.6.bb
index 82c657fc17..6a73543821 100644
@@ -5,7 +5,7 @@ LICENSE = "BSL-1.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=e4224ccaecb14d942c71d31bef20d78c"
 
 SRC_URI = "git://github.com/redboltz/async_mqtt;protocol=http;branch=main;protocol=https;tag=${PV}"
-SRCREV = "deeb7e36df859af0e90d2462012c48465ba49f0f"
+SRCREV = "cb3d37dc3432b9c03fe631eeba2d548de7457bf9"
 
 DEPENDS = "openssl boost"
 
#8 lore raw

PATCH 34/43 libnice: upgrade 0.1.22 -> 0.1.23

In reply to [email protected]

From: Wang Mingyu <[email protected]>

License-Update: Add SPDX-License-Identifier for added clarity

(cherry picked from commit 58974f72d122b78b7d65557e061677fafa83cc3e)
---
 .../libnice/{libnice_0.1.22.bb => libnice_0.1.23.bb}        | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta-oe/recipes-support/libnice/{libnice_0.1.22.bb => libnice_0.1.23.bb} (88%)
meta-oe/recipes-support/libnice/libnice_0.1.23.bb renamed from meta-oe/recipes-support/libnice/libnice_0.1.22.bb +3 -3
similarity index 88%
rename from meta-oe/recipes-support/libnice/libnice_0.1.22.bb
rename to meta-oe/recipes-support/libnice/libnice_0.1.23.bb
index 4b932029ee..bcdcf0ad7f 100644
@@ -3,13 +3,13 @@ DESCRIPTION = "Libnice is an implementation of the IETF's draft Interactive Conn
 HOMEPAGE = "http://nice.freedesktop.org/wiki/"
 
 LICENSE = "LGPL-2.1-only & MPL-1.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=9c42325015702feda4f4d2f19a55b767 \
+LIC_FILES_CHKSUM = "file://COPYING;md5=963cc62096d5412ee9580043babb8b60 \
                     file://COPYING.LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \
                     file://COPYING.MPL;md5=3c617710e51cdbe0fc00716f056dfb1a \
-"
+                    "
 
 SRC_URI = "http://nice.freedesktop.org/releases/${BP}.tar.gz"
-SRC_URI[sha256sum] = "a5f724cf09eae50c41a7517141d89da4a61ec9eaca32da4a0073faed5417ad7e"
+SRC_URI[sha256sum] = "618fc4e8de393b719b1641c1d8eec01826d4d39d15ade92679d221c7f5e4e70d"
 
 UPSTREAM_CHECK_URI = "https://gitlab.freedesktop.org/libnice/libnice/-/tags"
 UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
#9 lore raw

PATCH 35/43 microcom: upgrade 2023.09.0 -> 2025.11.0

In reply to [email protected]

From: Wang Mingyu <[email protected]>

Changelog:
===========
- Add -e switch to select an escape sequence other than Ctrl+\
- More portable TTY settings
- Better error and signal handling

(cherry picked from commit 5665110de0ece93471c74ef855c2e207da71bdd0)
---
 .../microcom/{microcom_2023.09.0.bb => microcom_2025.11.0.bb}   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-oe/recipes-devtools/microcom/{microcom_2023.09.0.bb => microcom_2025.11.0.bb} (89%)
meta-oe/recipes-devtools/microcom/microcom_2025.11.0.bb renamed from meta-oe/recipes-devtools/microcom/microcom_2023.09.0.bb +1 -1
similarity index 89%
rename from meta-oe/recipes-devtools/microcom/microcom_2023.09.0.bb
rename to meta-oe/recipes-devtools/microcom/microcom_2025.11.0.bb
index 73d434cba5..7f0154794d 100644
@@ -4,7 +4,7 @@ LICENSE = "GPL-2.0-or-later"
 LIC_FILES_CHKSUM = "file://COPYING;md5=c9f7c009791eaa4b9ca90dc4c9538d24"
 
 SRC_URI = "https://github.com/pengutronix/microcom/releases/download/v${PV}/microcom-${PV}.tar.xz"
-SRC_URI[sha256sum] = "ef42184bb35c9762b3e9c70748696f7478efacad8412a88aaf2d9a6a500231a1"
+SRC_URI[sha256sum] = "b1d734a249d8613db7ca1f1bb2ec4e28a35234a60212d91e0c00cc22e9c67a39"
 
 UPSTREAM_CHECK_URI = "${HOMEPAGE}/releases"
 UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"