diff mbox series

[meta-oe,126/128] tokyocabinet: drop $HOME/lib from LD_RUN_PATH to fix buildpaths QA

Message ID 20260628162222.4081517-26-khem.raj@oss.qualcomm.com
State New
Headers show
Series None | expand

Commit Message

Khem Raj June 28, 2026, 4:22 p.m. UTC
The Makefile bakes LD_RUN_PATH=...:$(HOME)/lib:/usr/local/lib:... into the
command binaries via LDENV, embedding the build host HOME directory in the
shipped binaries:

  do_package_qa: QA Issue: File /usr/bin/tchmgr ... contains reference to the
  build host HOME directory [buildpaths]

Strip the $(HOME)/lib and /usr/local/lib entries from the generated Makefile
after configure.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../recipes-support/tokyocabinet/tokyocabinet_1.4.48.bb   | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/tokyocabinet/tokyocabinet_1.4.48.bb b/meta-oe/recipes-support/tokyocabinet/tokyocabinet_1.4.48.bb
index d0ed6013f7..77ac917005 100644
--- a/meta-oe/recipes-support/tokyocabinet/tokyocabinet_1.4.48.bb
+++ b/meta-oe/recipes-support/tokyocabinet/tokyocabinet_1.4.48.bb
@@ -25,3 +25,11 @@  SRC_URI[sha256sum] = "a003f47c39a91e22d76bc4fe68b9b3de0f38851b160bbb1ca07a4f6441
 DEPENDS = "bzip2 zlib"
 
 inherit autotools-brokensep
+
+# tokyocabinet bakes LD_RUN_PATH=...:$(HOME)/lib:/usr/local/lib:... into the
+# command binaries via the Makefile LDENV/RUNENV variables, which leaks the
+# build host HOME directory into the shipped binaries (buildpaths QA). Drop
+# those host search paths from the generated Makefile after configure.
+do_configure:append() {
+    sed -i -e 's,\$(HOME)/lib:,,g' -e 's,/usr/local/lib:,,g' ${B}/Makefile
+}