Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Linux Foundation Promises LSB4

Posted by ScuttleMonkey on Fri Aug 01, 2008 12:55 PM
from the making-it-easier-to-like-us dept.
gbjbaanb writes "Ever thought it was difficult to write software for Linux? For multiple distros? InternetNews reports that the LSB is making a push for their next release (due out later this year) that should help make all that much easier. Although the LSB has not lived up to expectations, this time around Linux has a higher profile and ISVs are more interested. This is to help persuade them to develop applications that will run on any LSB-compliant Linux distribution. If it gets adopted, LSB 4 could bring a new wave of multidistribution Linux application development. 'It is critically important for Linux to have an easy way for software developers to write to distro "N," whether it's Red Hat, Ubuntu or Novell,' [said Jim Zemlin, executive director of the Linux Foundation.] 'The reason you need that is because we don't want what happened to Unix to happen to Linux in terms of fragmentation.' The LSB defines a core set of APIs and libraries, so ISVs can develop and port applications that will work on LSB-certified Linux distributions."
+ -
story

Related Stories

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by RandoX (828285) on Friday August 01 2008, @12:59PM (#24437207)

    The Linux Standard Base, or LSB, is a joint project by several Linux distributions under the organizational structure of the Linux Foundation to standardize the internal structure of Linux-based operating systems. The LSB is based on the POSIX specification, the Single UNIX Specification, and several other open standards, but extends them in certain areas.

    http://en.wikipedia.org/wiki/Linux_Standard_Base [wikipedia.org]

    • Re: (Score:2, Insightful)

      by Anonymous Coward
      Thank you. fscking acronyms... If you're gonna use them, at least define them once up front, kinda like a variable. If I see one more article using SMB or SMS without hinting at which of the numerous meanings they mean, I'll puke.
    • by Jason Earl (1894) on Friday August 01 2008, @04:31PM (#24441193) Homepage

      The Linux Standard Base is essentially a farce. The Wikipedia article linked to above gives a pretty good overview of why, but the primary reason is that developers don't want a set of tests that they can run against their application to see if it is portable. They want a binary distribution that they can actually install their software on and test against. Originally that's precisely what the LSB was supposed to be. It was going to be a small installable distribution based on Debian.

      At the time Caldera thought that would be problematic, and so the current incarnation of the LSB was born. Not that anyone uses it, as it is a complete waste of time.

      • Re: (Score:3, Insightful)

        "Not that anyone uses it, as it is a complete waste of time."

        I don't know if it's a waste of time. I don't even know what the original motivations for the LSB were.

        But I do know what is meant for now: is an intent from some distribution vendors to make easier to coaligate with privative source vendors. Not that I think this is a good or bad thing for them to do, but I do know that's not a goal I'm interested in, so I don't give a damn about LSB.

        Making better/easier portable configure-like tools? Sure.
        Mak

        • Re: (Score:3, Informative)

          Giving a binary base for privative software vendors throwing their software wherever they like to, with half-assed start/stop scripts and without integration with the native package management tools of my distribution of choice?

          Uh that's exactly what the LSB is trying to put a stop to. Currently, software installation sucks [ianmurdock.com] because it doesn't have integration with the native package manager. One of the reasons for forming a cohesive, extensible packaging API is so that any package can communicate with t
  • Web devs, python devs, etc likely don't find it that difficult.
    • by Splab (574204) on Friday August 01 2008, @01:42PM (#24437917)

      Wrong.

      Any given distro will have to make a choice of what modules each program should support, this means even as a PHP programmer you have no guarantee your software will work with default installation of PHP under a specific distro.

      • Re:Really? (Score:5, Interesting)

        by TheRaven64 (641858) on Friday August 01 2008, @02:02PM (#24438345) Homepage Journal
        env should always be in /usr/bin. This will work on any POSIX.2-compliant system:

        #!/usr/bin/env python

        LSB isn't needed, Linux distros just need to implement 16-year-old standards. I think most do put env in the right place, although some also put it in /bin (which should only contain binaries needed to boot the system in single-user mode).

        • Re:Really? (Score:5, Informative)

          by Florian Weimer (88405) <fw@deneb.enyo.de> on Friday August 01 2008, @03:25PM (#24440165) Homepage

          env should always be in /usr/bin. This will work on any POSIX.2-compliant system:

          POSIX.2 doesn't even mention /usr. The location of env is not standardized.

            • Re: (Score:3, Informative)

              Maybe it was Portage (Gentoo's Python-based package management system) then? I can imagine it being useful to be able to mess with packages (especially core ones like baselayout) in single-user mode.

          • Re:Really? (Score:5, Informative)

            by TheRaven64 (641858) on Friday August 01 2008, @04:14PM (#24440959) Homepage Journal
            Env followed by the name of a binary, will exec the first binary with that name on the current path. It boils down to how you run a script on UNIX. There are two ways:

            The first way is with a command like 'sh foo.sh'. sh will then read foo.sh and execute each command in it in order (if it's not a shell script, it will hopefully read the magic number and run it).

            The second way is to just exec() it. The loader then reads the first few bytes of the file. This tells it what type of file it is. For ELF files, they will be ".ELF". For Mach-O binaries, they will be 0xFEEDFACE or 0xCAFEBABE, depending on the architecture. For scripts the first two bytes will be "#!".

            If the loader encounters "#!" then it will read the rest of the line execute the specified command (and arguments) and pass the file to it as the last argument. You can see this in operation with the following script:

            $ cat foo
            #!/bin/echo
            This is a file?
            $ chmod +x foo
            $ ./foo
            ./foo

            If you have a shell script that needs to run with the standard POSIX shell, then there's no problem. You just specify /bin/sh after the #! and it's fine. But what happens if you want to use some bash-specific features? On GNU platforms, bash is the default shell and /bin/sh is a hard link to bash, so it's in /bin. On other platforms it's a third-party thing and so will be in /usr/local/bin or /opt/something. This is where env comes in.

            When you specify "#!/usr/local/env bash" you can safely hard-code the path of env, because POSIX defines where it is. Env then looks up where bash is and execs it with whatever command line arguments it was given. You can see this in action again like this:

            $ /usr/bin/env echo test
            test

            If you just run 'env' from a command line to inspect the environment variables, you are most likely just calling a shell built-in command, which lists the things passed in to the third argument to main() and any set since the shell started. Env, however, can be used when you are not launching from a shell. If your program wants to run a shell script, you can just vfork() and exec() it, and the loader will find the correct interpreter. You could always inspect the environment yourself, but having every app do that whenever it needs to run a script is quite silly (especially since it means that the app also has to know the difference between a binary and a script and so on).

            Some people still have a habit of hard-coding /bin/bash, and this is probably the kind of crap LSB will encourage ('bash is always in /bin on Linux, and I don't care about other platforms!') but the correct thing to do is use env.

  • "The reason you need that is because we don't want what happened to Unix to happen to Linux in terms of fragmentation." says Jim Zemlin, executive director of the Linux Foundation.

    He needs to read the GPL and understand how it differs from the various PROPRIETARY licenses that caused the *nix fragmentation.

    • by Grey_14 (570901) on Friday August 01 2008, @01:16PM (#24437495) Homepage

      maybe you mean something different, but I'm not sure how your statement relates to this issue. Afaik the LSB is about standardizing directory layouts and configuration files, and while sure under the GPL any linux distro CAN be made to follow those guidelines, almost none of them DO, so the difference between nonstandardized linux systems and nonstandardized UNIX systems is a philosophical one and not a practical one.

      (Although on Linux it's a fair bit easier to remedy)

      • by khasim (1285) <brandioch.conner@gmail.com> on Friday August 01 2008, @01:21PM (#24437599)

        maybe you mean something different, but I'm not sure how your statement relates to this issue.

        It relates to his statement that I quoted.

        "The reason you need that is because we don't want what happened to Unix to happen to Linux in terms of fragmentation." says Jim Zemlin, executive director of the Linux Foundation.

        That shows how clueless he is regarding the history of *nix.

        It was the various PROPRIETARY licenses that caused the fragmentation because an improvement made by HP had to be specifically licensed by Sun to be included in Solaris.

        But with the GPL, the improvements made in one fork are available to ALL forks.

        Therefore, the fragmentation will not happen because if a feature is worth it, it will be ported to the other forks. Without the need to coordinate licenses with HP or Sun or anyone else.

        The GPL rocks.

            • Re: (Score:3, Insightful)

              Softimage's XSI, VMWare, many other softwares that can't be recompiled, tested and tech supported in many distros or that need libs that are guaranteed on a platform. You think everything can come from a repository and that every bug in every distribution can be supported, tested and fixed consistantly?
      • No we understand the GPL, but it has very little to do with the subject, namely that regardless of open vs closed, some distros remain incompatible with each other in small but significant ways.

        If there is to be a stable platform to target with Linux, that crap has to stop. Simple being GPL software means very little toward that goal if distros continue to be arbitrarily different and the situation never really resolves itself.

        • If there is to be a stable platform to target with Linux, that crap has to stop. Simple being GPL software means very little toward that goal if distros continue to be arbitrarily different and the situation never really resolves itself.

          Sure. You just have to tell everyone what the BEST way is.

          No we understand the GPL, but it has very little to do with the subject, namely that regardless of open vs closed, some distros remain incompatible with each other in small but significant ways.

          Actually, it has EVERYT

  • Distribution (Score:5, Interesting)

    by 99BottlesOfBeerInMyF (813746) on Friday August 01 2008, @01:08PM (#24437351)

    The quote in the summary reads:

    'It is critically important for Linux to have an easy way for software developers to write to distro 'N,' whether it's Red Hat, Ubuntu or Novell,"

    Personally (as a Linux on the desktop user), I'm a lot more concerned about easily acquiring installing software, than whether it has problems with my distro. For the most part I can get software to run, but it can be a huge pain in the butt. I wish LSB would focus on extending and standardizing package formats and creating advanced standards for package managers to simplify that part of my workflow. I never wonder, "will this run on Ubuntu," so much as "which package format is this in, or how hard is it going to be to compile and update."

    • Re:Distribution (Score:5, Informative)

      by dlgeek (1065796) on Friday August 01 2008, @01:15PM (#24437487)
      You should wonder about will it run.

      Debian and Ubuntu use exactly the same packaging format (.deb). Try taking a debian package from a few years back and installing it on your system. Chances are, it won't work due to library incompatibilities.

      Now you could probably rebuild it for your system, but depending on what it is, it may or may not work.

      When you say "how hard it is going to bed to compile and update"...that's exactly what LSB is working on. It'll be trivially easy to compile a program written against the LSB specs on any LSB compatible distro.
      • Try taking a debian package from a few years back and installing it on your system. Chances are, it won't work due to library incompatibilities.

        No it probably wouldn't, but open source seems to not take too many steps back so it would be easy to just do sudo apt-get install *insert name of the deb package* if it is proprietary though, you are out of luck, but that is one of the (many) problems with non-free software.

        • Re: (Score:3, Informative)

          Autopackage is essentially a distribution on top of the distribution. The autopackage guys basically built an autopackage base that they have ported to some of the more popular distributions. They then try and take care of the same packaging issues that Debian, Fedora, and the rest of the distributions take care of already. They have their own incompatible list of packages, with their own incompatible dependencies, their own naming scheme, and their own packaging format.

          The only difference between auto

  • LSB4 is all very well, but if RHEL does not follow (does anybody really think they will?) it will not amount to a hill of beans.

    • Exactly, Red Hat will be complaining that it doesn't use RPM, Ubuntu will grumble that they just made Apt and Deb simple enough for everyone to use, Gentoo will complain that it isn't fast enough...
  • by HighOrbit (631451) on Friday August 01 2008, @01:24PM (#24437643)
    All the distrubtions use the same basic set of Gnu tools (like GCC, binutils, bash) and common programs like the perl binary. So why not have all the contemporaneous (i.e. released in the same time-frame) distros use the same tools? Shuttleworth was basically advocating an extended version of this (although he phrased it in terms of a coordinated release cycle [slashdot.org]) to be policy across several distros and to include higher-level applications like GNOME, KDE, and OO (besides the low level stuff like binutils).

    As I've said before [slashdot.org], software vendors like Oracle would love this because it would simplify their support.

    Now if only LSB would stop the cluttering of /usr/bin with non-system programs and put user install apps in /usr/local or /opt where they belong. ;)
  • by Doc Ruby (173196) on Friday August 01 2008, @01:26PM (#24437665) Homepage Journal

    Other than eliminating conflicting directory structures, the most important standard for Linux distros to completely unify would be a single API to data protocols and MIME types. Like the one FreeDesktop.org has managed to sync (in principle) between GNOME and KDE Desktops, but for all distros (including servers).

    A registry of which app to hand off a URL to given its protocol part, to retrieve the data. A registry of which app to hand off the data to once it's retrieved. Different data handler lists for displaying, editing or executing (the usual Linux RWX modes) the content, depending on the use case triggering the registry access. The registries could include prioritized lists of different apps, depending on user selection or settable default preference. And of course any single app could be registered to either registry, in any mode it will function properly.

    Then the OS is performing its main task of connecting processes to the hardware and to each other. In a very simple and clear architecture. That every single app can use, without having to anticipate how the other apps will agree with it.

    If LSB4 can pull that off, using the existing attempts as a starting point, it won't just make a unified Linux target for developers across distros. It will make LSB4 itself more quickly and completely adopted, because its benefits will be so compelling.

  • by BELG (4429) on Friday August 01 2008, @01:33PM (#24437761)

    We don't want it to happen?

    It already did.

    Distribution compatibility and package management is a big problem for most, if not all developers, and has been for a very long time.

    • Distribution compatibility and package management is a big problem for most, if not all developers, and has been for a very long time.

      And it will be, for quite some time to come. Linux doesn't have a stable ABI, so it's very hard to deploy [blogspot.com] to. I'm pretty sure even the LSB's goals don't reach far enough to solve this fundamental problem.

  • by harlows_monkeys (106428) on Friday August 01 2008, @02:25PM (#24438875) Homepage
    Every project needs a code name. For this, I propose "Bullwinkle", and their slogan can be "This time for sure!".
  • Instead of trying to make all the distributions the same, why don't they make a library that abstract away the difference?

    Example: If my program need to link to a ssl library(Such as openssl), version 2.3 or newer, I should call a function
    findLibrary("ssl",2,3) which would return the path to the needed .so file, or null if the file is not installed. There could then be a
    function to also ask the os to install the needed library if it were not there.
    Each linux distribution should then implement the library in a way, so that the Redhat version, might forward the call to rpm, while the debian version of the library would query the dep database insted.

    And instead of the infinite debate on /opt vs /usr/local the program could just call getPathForUserInstalledSoftware();
    And getDefaultCompilerPath() instead of the current autoconfig hack.

    Then a linux standard base, would just be a specification of the needed functions in LinuxStandardBaseLibrary.

    And we would newer have to use the autoconfig hack. (The library might ofcause also be implemented on Solaris, and maybe even cygwin/windows)

    • Re: (Score:3, Insightful)

      UNIX fractured into a large number of incompatible variants including BSD (fractured further into Open/Free/Net BSD), Solaris, IRIX, HP-UX, SCO Unix, etc., etc..

      See this graph [wikipedia.org] for more information.
      • by Crispy Critters (226798) on Friday August 01 2008, @02:07PM (#24438497)
        One piece of this was that simple commands had different names and different options depending on the variety of UNIX. I am talking things like lp vs. lpr, options for ps, and so on. Also, some things were hidden in really weird places (X on Sun is/was under an "openwin" directory, I think). Writing cross-platform scripts is a pain when you first have to test for the OS and then redefine command names, options, and paths accordingly. In theory, under the LSB you always know where commands and libraries are.
        • Re: (Score:3, Informative)

          If that's Unix_history-simple.svg (which it is), I'd hate to see Unix_history-complex.svg.

          Here you go [levenez.com]. Well, not svg.

    • "The reason you need that is because we don't want what happened to Unix to happen to Linux in terms of fragmentation."

      What makes you think what happened to UNIX was bad? It's called evolution. Things change.

      Let me remind you, my friend, that evolution means SUCCESSFUL ADAPTATION to an environment. What happens when a change (mutation) results in inadaptation? Extinction.

      Evolution refers to a species. But in Linux what we have is not a single species, but a genus [wikipedia.org] (a set of different species): Redhat, Debian, etc. "DNA" recombination is impossible in these. The resulting software would be inoperable.

      LSB4, hopefully, will be a further step in the evolution of Linux: The convergence to a single species that will be able to share one single configuration.

      In other words, yes, change is necessary, but there needs to be a period of stabilization. Just as stable/unstable releases in software. And LSB is providing this stability. LSB is, in fact, evolving.

      • Ummm... A lot of software works between distros. The main problem is when Debian uses an older version of GTK than Fedora uses, and the RPM/DEB inconsistencies, but alien usually takes care of that. Python works cross-platform as does Java and a whole lot of other languages.

        It isn't that hard to write cross-distro programs, what is hard is making sure that the version in Ubuntu is the same version in Fedora, or that Ubuntu has your programs as well as Gentoo.
    • by Haeleth (414428) on Friday August 01 2008, @01:20PM (#24437569) Journal

      Ultimately, let the best software win. The rest can go to bit-afterlife.

      Yes, that's kind of the whole point of the LSB.

      Customers choose OSes based on many criteria. One of them is how much of the software they need will run on each platform. Now, this is rarely actually determined by the quality of the platform -- it's mostly a question of which platforms were already popular enough to be targeted. In theory, LSB will make it easier for new Linux-based OSes to run existing software, and will make it easier for ISVs to write software for Linux-based OSes in general.

      Those OSes can then compete on more interesting metrics like performance, stability, scalability, price, and quality of support. How is this not a good thing?

    • by Darkness404 (1287218) on Friday August 01 2008, @01:28PM (#24437701)
      UNIX fragmentation wasn't caused by anything other than all the proprietary, incompatible licenses. Whenever Sun made an improvement to UNIX, HP couldn't simply adopt it like they can with the GPL. With the GPL, if I take an OSS program and fork it, and change it radically, the original creators of the software can always add my changes back into the main branch. And yes it would be bad, if you had to write a program, say an HTTP server, you had to test it on every Unix imaginable, today, just release the source, package an RPM and a DEB, and it will be ported to the rest soon enough.
    • What makes you think what happened to UNIX was bad? It's called evolution.

      I COMPLETELY DISAGREE WITH YOU! Linux, SunOS, Solaris (Not an evolved SunOS!), BSD, etc were magically created out of... erm.. random bits generated from some pseudo-random generator in DigiGod's image. Proof? DigiBless.com [digibless.com]

      </satire>

    • Re: (Score:2, Redundant)

      Because Linux runs on many different hardware architectures.

      • Yea, even within one architecture there is no binary compatibility, which was the GPs point you either ignored or didn't get.

        • Re: (Score:3, Interesting)

          "Binary Compatibility" is one of those horrendously ugly catch-alls that, in the end, really doesn't explain anything. Strictly speaking, every distribution out there uses the same ELF executable format, so they're all "binary compatible". Of course, there's library compatibility (usually not a big factor), and package format/package manager incompatibility ("I tried to install a Ford Escort starter in my Chevy Malibu and the bolt holes don't match up!").
    • by droopycom (470921) on Friday August 01 2008, @01:34PM (#24437777)

      But you see, they dont want to write for distros foo, bar, etc... they want to write an app for linux.

      They dont want to "collaborate" with dozens of distros, all of which will tell them that "in our distro, the proper way of how to do this" is different than the other ones...

       

    • by mrsteveman1 (1010381) on Friday August 01 2008, @01:39PM (#24437857) Homepage

      Classic zealot response. Pretend the entire world is moving to GPL-only software and neglect to address the concerns of anyone who disagrees.

      • Exactly!

        The world does not revolve about GPL software. It works about *working software*. I don't care if I use GPL to get my work done, $50 software or if I use a $20,000 a seat software. Whatever makes sense is what is used.

        If Linux community expects ANY sort of commercial software released for Linux distributions, they need to get the LSB implementation done and ready. LSB is like an SDK towards building apps for ISVs. If you don't have it, you end up with app not for Linux, but for Debian 3.0, RHEL 2.0,

    • by XanC (644172) on Friday August 01 2008, @01:42PM (#24437925)

      I have been mentioning this for years

      Yes, I've seen you post here often!

    • Re: (Score:3, Interesting)

      hrm, maybe we could have an /setc for boot-critical config? Similar to how we have /bin and /sbin. For people who like the old way of one massive /etc, you could just symlink one to the other and there would be no practical difference.

    • by gbjbaanb (229885) on Friday August 01 2008, @03:42PM (#24440413)

      COO: so, we've developed a new widget, brilliant. When can we ship it.
      DEV: today, its all tested. I've run it myself on my Debian box.
      COO: sure, it'll run on Customer B's Redhat environment won't it?
      DEV: Ummmm.. well, not straight off.
      COO: ok, so what do we need to do to make it work?
      DEV: well, alter a couple of paths, recompile, change the dependancy for package Z and build a rpm
      COO: and how long will that take?
      DEV: a week, maybe 2 with testing.
      COO: so, that's 2 weeks development costs on top of what we've already spent. We wouldn't have this kind of problems with Windows!

      and I'm not trolling either - standards are good, making extra work for yourself for no good reason is bad. Its not as if a common directory layout, ABI or programming libraries need to affect open source linux in any way. The Kernel is a standard, and no-one complains they don't have a choice of kernels to develop against.