Skip to contentSkip to conversation

enca: Remove buildpaths from target scripts

PATCH New Khem Raj 1 participant 1 message May 9, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 enca: Remove buildpaths from target scripts

Using configure checks to detect mktemp can result in problems in cross-builds where buildtime mktemp ( native ) maybe detected in a path that does not exist on target, therefore rely upon PATH variable to find this binary when executing this script.

---
 ...o-not-use-MKTEMP_PROG-in-cross-build.patch | 30 +++++++++++++++++++
 meta-oe/recipes-support/enca/enca_1.19.bb     |  4 +--
 2 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-support/enca/enca/0001-Do-not-use-MKTEMP_PROG-in-cross-build.patch
meta-oe/recipes-support/enca/enca/0001-Do-not-use-MKTEMP_PROG-in-cross-build.patch new file +30 -0
new file mode 100644
index 0000000000..32fa239084
@@ -0,0 +1,30 @@
+From c6a59d512706978e8c67f9a2d84ec650f8763368 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 8 May 2023 18:02:52 -0700
+Subject: [PATCH] Do not use $MKTEMP_PROG in cross-build
+
+$MKTEMP_PROG points to native location which could be absolute path that
+wont exist on target rootfs. Therefore use it from PATH
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4852a2f..d23b384 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -186,7 +186,7 @@ ye_PATH_LOCALE_ALIAS
+ 
+ dnl Random filename generation in scripts
+ if test -n "$MKTEMP_PROG"; then
+-  SHELL_RANDOM_FILENAME='`'$MKTEMP_PROG' /tmp/enca-$$-XXXXXXXX`'
++  SHELL_RANDOM_FILENAME='`mktemp /tmp/enca-$$-XXXXXXXX`'
+ else
+   SHELL_RANDOM_FILENAME='/tmp/enca-$$-$RANDOM'
+ fi
+-- 
+2.40.1
+
meta-oe/recipes-support/enca/enca_1.19.bb +2 -2
index eed0ad1b93..774f05f7c4 100644
@@ -10,8 +10,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=24b9569831c46d4818450b55282476b4"
 SRC_URI = "https://dl.cihar.com/enca/enca-${PV}.tar.gz \
     file://dont-run-tests.patch \
     file://makefile-remove-tools.patch \
-    file://libenca-003-iconv.patch "
-
+    file://libenca-003-iconv.patch \
+    file://0001-Do-not-use-MKTEMP_PROG-in-cross-build.patch"
 SRC_URI[sha256sum] = "4c305cc59f3e57f2cfc150a6ac511690f43633595760e1cb266bf23362d72f8a"
 
 inherit autotools
Signature · 1 line
2.40.1