lua5.1 is marked `M-A: foreign` which is wrong. As an example lua-zlib is an arch dependent lua extension. This is a violation of debian policy 5.6.34.2. This should probably be marked `M-A: allowed` Thanks, Nilesh
Hi Nilesh, Can you be a bit more specific? lua5.5 ships only a Lua interpreter (and compiler), so, for example lua5.5 i386 can be used to run Lua scripts on amd64. May be multi-arch allowed would be better than foreign, but at least some other packages with interpreters are multi-arch foreign: tcl8.6 (and tcl9.0), bash. perl and python are multi-arch allowed though. Cheers!
Hi Sergei, This is all right. What lua can also do is load the zlib (lua-zlib) library. | $ mmdebstrap unstable /dev/null --variant=essential --architectures=amd64,i386 --include=lua5.5,lua-zlib:i386 --chrooted-customize-hook="lua5.5 -e 'require(\"zlib\")'" | ... | lua5.5: (command line):1: module 'zlib' not found: | no field package.preload['zlib'] | no file '/usr/local/share/lua/5.5/zlib.lua' | no file '/usr/local/share/lua/5.5/zlib/init.lua' | no file '/usr/local/lib/lua/5.5/zlib.lua' | no file '/usr/local/lib/lua/5.5/zlib/init.lua' | no file '/usr/share/lua/5.5/zlib.lua' | no file '/usr/share/lua/5.5/zlib/init.lua' | no file './zlib.lua' | no file './zlib/init.lua' | no file '/usr/local/lib/lua/5.5/zlib.so' | no file '/usr/lib/x86_64-linux-gnu/lua/5.5/zlib.so' | no file '/usr/lib/lua/5.5/zlib.so' | no file '/usr/local/lib/lua/5.5/loadall.so' | no file './zlib.so' | stack traceback: | [C]: in global 'require' | (command line):1: in main chunk | [C]: in ? | $ Those interpreters are not all the same. The key distinction is whether they're extensible with shared libraries. For Perl and Python there are a ton of such packaged extensions. Even GNU make can be extended in such a way (though it is very uncommon). When it comes to tcl8.6, I think the story is the same as for lua. Loading a foreign tcl-trf into tcl8.6 would fail in the very same way as above. For bash the story is less obvious. Searching its source code reveals that it does use dlopen and this is a strong clue. The "enable -f filename functionname" syntax appears to provide a similar feature, but I'm not sure it is practically relevant as it is with lua-zlib and tcl-trf. For instance, there is https://sources.debian.org/src/lm-sensors/1:3.6.2-2/prog/daemon/healthd.sh?hl=27#L27 but I could not find a matching sleep.so and the relevant file is installed as an example. Helmut