Re: [meta-networking][PATCH 3/3] samba: fix buildpaths issue


Khem Raj
 

On Thu, Aug 25, 2022 at 6:19 PM Yi Zhao <yi.zhao@...> wrote:

The test case tfork_cmd_send in smbtorture fails on target as it
requries a script located in the source directory:

$ smbtorture ncalrpc:localhost local.tfork.tfork_cmd_send
test: tfork_cmd_send
/buildarea/build/tmp/work/core2-64-poky-linux/samba/4.14.14-r0/samba-4.14.14/testprogs/blackbox/tfork.sh:
Failed to exec child - No such file or directory

This also triggers the buildpaths warning:
QA Issue: File /usr/bin/smbtorture in package samba-testsuite contains reference to TMPDIR [buildpaths]

Skip this test case in smbtorture to avoid the warning. And also disable
rpath build.

Signed-off-by: Yi Zhao <yi.zhao@...>
---
...orture-skip-test-case-tfork_cmd_send.patch | 38 +++++++++++++++++++
.../samba/samba_4.14.14.bb | 2 +
2 files changed, 40 insertions(+)
create mode 100644 meta-networking/recipes-connectivity/samba/samba/0001-smbtorture-skip-test-case-tfork_cmd_send.patch

diff --git a/meta-networking/recipes-connectivity/samba/samba/0001-smbtorture-skip-test-case-tfork_cmd_send.patch b/meta-networking/recipes-connectivity/samba/samba/0001-smbtorture-skip-test-case-tfork_cmd_send.patch
new file mode 100644
index 000000000..90ee31786
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/0001-smbtorture-skip-test-case-tfork_cmd_send.patch
@@ -0,0 +1,38 @@
+From 059b517f9ef6cbdc696e0983ce255b1728042827 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@...>
+Date: Thu, 25 Aug 2022 16:46:04 +0800
+Subject: [PATCH] smbtorture: skip test case tfork_cmd_send
+
+The test case tfork_cmd_send fails on target as it requires a script
+located in the source directory:
+
+$ smbtorture ncalrpc:localhost local.tfork.tfork_cmd_send
+test: tfork_cmd_send
+/buildarea/build/tmp/work/core2-64-poky-linux/samba/4.14.14-r0/samba-4.14.14/testprogs/blackbox/tfork.sh:
+Failed to exec child - No such file or directory
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@...>
+---
+ lib/util/tests/tfork.c | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/lib/util/tests/tfork.c b/lib/util/tests/tfork.c
+index 70ae975..4826ce6 100644
+--- a/lib/util/tests/tfork.c
++++ b/lib/util/tests/tfork.c
+@@ -839,10 +839,6 @@ struct torture_suite *torture_local_tfork(TALLOC_CTX *mem_ctx)
+ "tfork_threads",
+ test_tfork_threads);
+
+- torture_suite_add_simple_test(suite,
+- "tfork_cmd_send",
+- test_tfork_cmd_send);
+-
+ torture_suite_add_simple_test(suite,
+ "tfork_event_file_handle",
+ test_tfork_event_file_handle);
+--
+2.25.1
+
diff --git a/meta-networking/recipes-connectivity/samba/samba_4.14.14.bb b/meta-networking/recipes-connectivity/samba/samba_4.14.14.bb
index cb3678d7b..8877b8e1a 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.14.14.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.14.14.bb
@@ -21,6 +21,7 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
file://0004-Add-options-to-configure-the-use-of-libbsd.patch \
file://0005-samba-build-dnsserver_common-code.patch \
file://0001-Fix-pyext_PATTERN-for-cross-compilation.patch \
+ file://0001-smbtorture-skip-test-case-tfork_cmd_send.patch \
"

SRC_URI:append:libc-musl = " \
@@ -114,6 +115,7 @@ EXTRA_OECONF += "--enable-fhs \
--with-modulesdir=${libdir}/samba \
--with-lockdir=${localstatedir}/lib/samba \
--with-cachedir=${localstatedir}/lib/samba \
+ --disable-rpath \
this means that private libs installed in /usr/lib/samba are not
detected by dependent packages anymore
try to build meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs_git.bb

It errors like this
https://errors.yoctoproject.org/Errors/Details/669955/

but the real error is a configure test failure

/mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/smbnetfs/0.6.3-r0/recipe-sysroot-native/usr/bin/x86_64-yoe-linux-musl/x86_64-yoe-linux-musl-ld:
warning: liblibsmb-samba4.so, needed by
/mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/smbnetfs/0.6.3-r0/recipe-sysroot/usr/lib/libsmbclient.so,
not found (try using -rpath or -rpath-link)

this library is in usr/lib/samba

--disable-rpath-install \
--with-shared-modules=${SAMBA4_MODULES} \
--bundled-libraries=${SAMBA4_LIBS} \
--
2.25.1



Join {openembedded-devel@lists.openembedded.org to automatically receive all group messages.