Gunashree,

Oops - wrong email list.

libyang is part of meta-openembedded:
https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-extended/libyang/libyang_3.13.6.bb?h=master

../Randy

On 2026-08-19 03:58, Gunashree K L wrote:
Upgrade to latest upstream release. This also resolves
CVE-2026-41401 (heap use-after-free in lyd_parser_set_data_flags).

Drop 0001-test_context-skip-test-case-test_searchdirs.patch as it
no longer applies to 5.8.6 due to refactored test code:
     https://github.com/CESNET/libyang/commit/c889ee0ed
The test_searchdirs test still references build paths but this only
affects ptest execution, not the library build.

Fix buildpath QA error: LY_SRC_DIR in src/ly_config.h.in uses
CMAKE_CURRENT_SOURCE_DIR which embeds the build source path into
the installed header. LY_SRC_DIR is only used by tests/fuzzers,
not by the library itself. Reported upstream:
https://github.com/CESNET/libyang/issues/2553
Fixed upstream in commit 68263438a but not yet in a released tag.
Sed workaround kept until next upstream release includes the fix.

Signed-off-by: Gunashree K L<[email protected]>
---
  ...ntext-skip-test-case-test_searchdirs.patch | 26 -------------------
  .../{libyang_3.13.6.bb => libyang_5.8.6.bb}   | 10 ++++---
  2 files changed, 7 insertions(+), 29 deletions(-)
  delete mode 100644 
meta-oe/recipes-extended/libyang/libyang/0001-test_context-skip-test-case-test_searchdirs.patch
  rename meta-oe/recipes-extended/libyang/{libyang_3.13.6.bb => 
libyang_5.8.6.bb} (76%)

diff --git 
a/meta-oe/recipes-extended/libyang/libyang/0001-test_context-skip-test-case-test_searchdirs.patch
 
b/meta-oe/recipes-extended/libyang/libyang/0001-test_context-skip-test-case-test_searchdirs.patch
deleted file mode 100644
index 70890e2485..0000000000
--- 
a/meta-oe/recipes-extended/libyang/libyang/0001-test_context-skip-test-case-test_searchdirs.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 24ec37bfe5c4c248dda0e80d6e7ab27afca1d60e Mon Sep 17 00:00:00 2001
-From: Yi Zhao<[email protected]>
-Date: Wed, 22 Mar 2023 16:03:56 +0800
-Subject: [PATCH] test_context: skip test case test_searchdirs
-
-Skip test case test_searchdirs as it searchs the source code directory.
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Yi Zhao<[email protected]>
----
- tests/utests/basic/test_context.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/tests/utests/basic/test_context.c 
b/tests/utests/basic/test_context.c
-index 116b2ce36..4e96f4e96 100644
---- a/tests/utests/basic/test_context.c
-+++ b/tests/utests/basic/test_context.c
-@@ -1110,7 +1110,6 @@ int
- main(void)
- {
-     const struct CMUnitTest tests[] = {
--        UTEST(test_searchdirs),
-         UTEST(test_options),
-         UTEST(test_models),
-         UTEST(test_imports),
diff --git a/meta-oe/recipes-extended/libyang/libyang_3.13.6.bb 
b/meta-oe/recipes-extended/libyang/libyang_5.8.6.bb
similarity index 76%
rename from meta-oe/recipes-extended/libyang/libyang_3.13.6.bb
rename to meta-oe/recipes-extended/libyang/libyang_5.8.6.bb
index 822c30ba24..3d7b6eaff0 100644
--- a/meta-oe/recipes-extended/libyang/libyang_3.13.6.bb
+++ b/meta-oe/recipes-extended/libyang/libyang_5.8.6.bb
@@ -6,10 +6,9 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM ="file://LICENSE;md5=b69fd3b2815bbf1cef5c97f0eee2519a" -SRCREV = "c2ddd01b9b810a30d6a7d6749a3bc9adeb7b01fb"
+SRCREV = "47351e59e2965e350f9d4098f15ecbe6b3850f6f"
SRC_URI = "git://github.com/CESNET/libyang.git;branch=master;protocol=https;tag=v${PV} \
-file://0001-test_context-skip-test-case-test_searchdirs.patch \
             file://run-ptest \
             "
@@ -33,7 +32,12 @@ do_compile:prepend () {
  }
do_install:append () {
-        oe_multilib_header  libyang/ly_config.h
+    oe_multilib_header  libyang/ly_config.h
+    # LY_SRC_DIR embeds the build source path into the installed header.
+    # It is only used by tests/fuzzers, not by the library itself.
+    # Remove it to avoid QA buildpath errors.
+    sed -i -e 's|${TMPDIR}[^ "]*||g' ${D}${includedir}/libyang/ly_config.h
+    sed -i -e 's|${TMPDIR}[^ "]*||g' ${D}${includedir}/libyang/ly_config-64.h
  }
do_install_ptest () {


--
# Randy MacLeod
# Wind River Linux
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#243729): 
https://lists.openembedded.org/g/openembedded-core/message/243729
Mute This Topic: https://lists.openembedded.org/mt/120828290/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to