>From 649b2a94e3e4b84487d20cca86af235e0dbda311 Mon Sep 17 00:00:00 2001
From: Karol Lewandowski <[email protected]>
Date: Thu, 3 Mar 2011 19:48:07 +0100
Subject: [PATCH] Drop GCONV_PATH before running qemu
scratchbox2 sets GCONV_PATH for native binaries. However,
this causes foreign binaries run via qemu to fail (it loads
libraries from wrong architecture).
Workaround this problem by dropping GCONV_PATH and other
locale-related variables (LOCPATH, NLSPATH) before running qemu.
---
lua_scripts/argvenvp.lua | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/lua_scripts/argvenvp.lua b/lua_scripts/argvenvp.lua
index 3cb04e3..61d207b 100644
--- a/lua_scripts/argvenvp.lua
+++ b/lua_scripts/argvenvp.lua
@@ -774,6 +774,18 @@ function sb_execve_postprocess_cpu_transparency_executable(rule, exec_policy,
new_envp = envp
end
+ hack_envp = { }
+ for i = 1, #new_envp do
+ if string.match(new_envp[i], "^GCONV_PATH=.*") or
+ string.match(new_envp[i], "^NLSPATH=.*") or
+ string.match(new_envp[i], "^LOCPATH=.*") then
+ -- skip
+ else
+ table.insert(hack_envp, new_envp[i])
+ end
+ end
+ new_envp, hack_envp = hack_envp, nil
+
-- libsb2 will replace LD_PRELOAD and LD_LIBRARY_PATH
-- env.vars, we don't need to worry about what the
-- application will see in those - BUT we need
--
1.7.4.1
_______________________________________________
Scratchbox-devel mailing list
[email protected]
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-devel