diff mbox series

[meta-oe] enca: Remove buildpaths from target scripts

Message ID 20230509042602.1052322-1-raj.khem@gmail.com
State New
Headers show
Series [meta-oe] enca: Remove buildpaths from target scripts | expand

Commit Message

Khem Raj May 9, 2023, 4:26 a.m. UTC
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.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...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
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/enca/enca/0001-Do-not-use-MKTEMP_PROG-in-cross-build.patch b/meta-oe/recipes-support/enca/enca/0001-Do-not-use-MKTEMP_PROG-in-cross-build.patch
new file mode 100644
index 0000000000..32fa239084
--- /dev/null
+++ b/meta-oe/recipes-support/enca/enca/0001-Do-not-use-MKTEMP_PROG-in-cross-build.patch
@@ -0,0 +1,30 @@ 
+From c6a59d512706978e8c67f9a2d84ec650f8763368 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+---
+ 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
+
diff --git a/meta-oe/recipes-support/enca/enca_1.19.bb b/meta-oe/recipes-support/enca/enca_1.19.bb
index eed0ad1b93..774f05f7c4 100644
--- a/meta-oe/recipes-support/enca/enca_1.19.bb
+++ b/meta-oe/recipes-support/enca/enca_1.19.bb
@@ -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