cyberwera.blogg.se

Portable linux apps
Portable linux apps





The LSB specifies the RPM format for packages, so you only need to produce one (strictly). If you build your program to link against only LSB libraries (and those it ships itself), it will be portable between all those systems. The LSB (or at least a past version) was formalised as ISO/IEC 23360. The LSB is designed to produce binary compatibility across compatible distributions by specifying specific library versions (or compatibility with those versions). The strictly correct approach to portable binary executables on Linux is to work against the Linux Standard Base and its detailed specifications. I know I've used some programs in the past which actually carried their own copy of some of those libraries, it actually caught my attention because it was an older version than the one in my system and interchanging them made everything stop working (which I found out by accident). Should we distribute all of them (libstdc++, glibc, etc) with our software? This doesn't feel right and I think it might be going against the licensing terms in them. How should we handle this? Do we just assume they'll have the correct libraries and pray for the best? In such case, what would happen in a year or two when one of those libraries changes and our application stops working? What we have no idea what to do with is the system libraries. We've decided to include all 5 of them in the final software package. lib1,2,3 are actually more common (ie one of them is libpng) although still not certain they'll be installed in the target system. The direct dependencies (libA and libB) are not very common, so the obvious choice is to deliver them altogether with our application. Now, since we don't have a target distribution we want to keep this independent of any packaging system like. Once compiled, the shared dependencies of our program become libA, libB, lib1, lib2, lib3 and a bunch of system libraries such as libc, libm, libz, libstdc++, libpthread, etc.

portable linux apps

Where libA,B and lib1,2,3 are all open-source projects with suitable licenses (LGPL, ASL and BSDs).

portable linux apps

We do however depend on a couple of 3rd party libraries, the following is a simple scheme of the dependencies: app -+- libA The task is fairly simple and doesn't depend on any low level drivers or anything that would complicate making it portable. However, we have not been given any specifics about where it should be able to run, with that I mean what distribution, kernel version or anything really. We've been hired to solve a certain problem for a client, so we'll be developing a closed source application which we intend to sell to them. First of, I've found this similar question How to make a portable Linux app? but it doesn't really address my questions, it's more about how to compile to make the application portable which I already know how to do (at least I think I do) and not about deployment as I will explain below.







Portable linux apps