I want to execute applications that have been built for another distros (like archlinux). I have all dependency tree packages, i merged all of them on a directory, including libc, all.
This full directory, have the next form:
Code: Select all
full_package_with_deps
./etc
./usr
./bin <-- here is my executable (elf)
./lib <-- here is glib dep version, and ld-linker
{...etc etc...}
./var
I need to fake the executable inside on "full_package_with_deps/usr/bin/app" to avoid the app to look on my current / filesystem, where my libs have different versions, and different paths.
To do that.. i'm using: Environment variables.
Code: Select all
LD_PRELOAD="path_to_glib_version" + "ld-linux.. current package linker"
LD_LOAD_LIBRARY="path_to_usr_lib"
./usr/bin/app
The question is, there is a way to set a full custom environment, (not for sandboxing, isolation) in order to ensure the execution of any app, without using chroots, jails?
The main objetive of all of this, is to build a system that allows to run any app from any distro, using only packages from repos. Like a portable-bundle.
For example:
Fedora: X app --> ( 1 + 23 dep packages RPM)
Download all, extract, merge.. and set a custom enviroment, to mask executables to point at their own libs directory.
In my opinion, the last limitation is the version kernel for compatibility.
There is a inherent disadvantage: the weight of the app. (But, this can be avoided using a modern filesystem that uses copy-on-write.
----
Chroot evironments, are usefull, but it has some problems. For example, if you have an audio app running inside, and you want to connect throught jack, with another app running on host-system, or in another chroot jail. Is not possible, as far i know.
----
The restrictions to do this system is:
1) Use binaries (no compilation). Use all binaries that exists on repos.
2) Use system posix built-ins to run apps. (The objetive is portability)
3) Make integration transparent.
4) The host, and other target systems, cannot be modified in order to run portable apps.
5) No lost in perfomance execution.
---
I you have some ideas to help me to do this, you are welcome.
Also, i need your opinions, and some analysis: Good, and Bad things for you.
Regards.