Search

A New Approach to the LSB (part 2)

June 16th, 2005 by Jeff Licquia

For background, read part 1. This post is going to get a bit technical, so if the first part made your eyes gloss over, you might want to skip this part.

So our goal is to provide an LSB-compatible environment for LSB programs, and an environment compatible with Debian 3.1 for the rest. It seems that we can’t do this using the same system libraries and programs, so we need to use different ones. But how do we convince one environment or the other to load when we need them, and not to load when we don’t?

The key is the dynamic linker: that magic code that finds the shared libraries for the programs we run and puts them all together so the program can find them. It turns out that the LSB insists on having its own dynamic linker, separate from the rest of the system; runtime environments can’t be LSB-compliant without them, and programs can’t be LSB-compliant unless they use the special LSB linker. The linker doesn’t have to act any different from the normal one, so standard procedure is to symlink the regular dynamic linker to the name the LSB requires.

But the possibility has always been there to use an entirely different linker for LSB programs than for non-LSB programs, and even to use different linkers for different LSB versions. So, the solution is obvious: instead of symlinking the standard linker, we provide a slightly modified linker for LSB programs.

What do we mean by “slightly modified”? One possibility: cutting-edge versions of libraries could be stored in a separate location on the system, where no regular application will see them. Our LSB linker could then prefer libraries from the special paths to the normal ones. Another: programs which must run differently under the LSB can be compiled differently and live in their own special location, which are preferred to the normal location when run in the LSB context.

So far, this is vaporware. I’m still wrestling with the source code to glibc to see how difficult it would be to do this. Once done, however, LSB compliance and compatibility with Debian might no longer be conflicting goals.

Creative Commons License
This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.

Posted in Debian |

4 Responses

  1. spacehunt » Making Debian LSB compliant Says:

    [...] SB compliant Filed under: Debian — spacehunt @ 2:30 am Jeff Licquia’s proposal for making Debian LSB compliant is the same one that we&#82 [...]

  2. Matt Wilson Says:

    We added the requirement for LSB applications to use ld-lsb.so.1 for PT_INTERP so that a distro can replace ld-lsb.so.1 with a dynamic linker that pulls in LSB-compliant libraries. In other words, this is exactly why it’s required.

  3. Ian Murdock’s Weblog » When is a fork not a fork? Says:

    [...] Of the remaining 29 packages, 4 are the LSB 3.0 compatibility environment, which adds the necessary packages to achieve LSB 3.0 compliance in such a way that the sarge glibc and pam packages don’t need to be modified (these packages needed modifications to achieve LSB 3.0 compliance—see Jeff Licquia’s weblog for details here and here). The only applications that use the LSB compatibility environment are LSB applications—the default application environment is the standard Debian environment. [...]

  4. Nathanael Nerode Says:

    Good ideas all. When can we get this into Debian? :-P

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.