Slashdot Mirror


Porting to the Linux Standard Base

An anonymous reader writes "If an application conforms to the Linux Standard Base (LSB), and a flavor of Linux is LSB compliant, the application is guaranteed to run. This tutorial, written by Martin Streicher, Editor in Chief of Linux Magazine, ensures that your code runs reliably on as many Linux flavors as possible. It shows you how to port your apps to the Linux Standard Base, then takes you through the LSB test tools to verify conformance."

30 of 41 comments (clear)

  1. "/." opinions are worthless by Anonymous Coward · · Score: 1, Insightful

    "If they were serious about a somewhat standard linux, they would have started with debian."

    1-LSB is more than just RPM.

    2-There's nothing wrong with RPM. Just the people who use it.

  2. Restricted access to spec? by xxxJonBoyxxx · · Score: 2
    If you want to certify your application, download and read the Application Product Standard associated with your target hardware platform.
    ...but if you click that link, you are prompted for authentication information. Anyone have a "public" version of this doc?
    1. Re:Restricted access to spec? by colonwq · · Score: 1

      Have you tried here?

      :wq

      --
      -- Phase 1: Collect under pants Phase 2: ? Phase 3: Profit
  3. Re:LSB is worthless by 0racle · · Score: 2, Insightful

    No, if they were serious they would have made it distro and packaging tool agnostic. Picking to base it on debs and the way Debian does things would be no different then picking rpm and how Red Hat does things.

    --
    "I use a Mac because I'm just better than you are."
  4. Re:LSB is worthless by RotateLeftByte · · Score: 1

    RedHat were somewhat a latecomer to the LSB group. The aim of LSB is admirable but probably fatally flawed as the first poster shows it all in his mention that Debian should have been used as its basis.
    The aim (I might be wrong here) was to be totally distro independant but make all the key bits be in the same place especially in /etc and a few other key directories.

    --
    I'd rather be riding my '63 Triumph T120.
  5. Re:LSB is worthless by tlhIngan · · Score: 3, Insightful

    and was just an attempt by redhat to push the subpar RPM package format. If they were serious about a somewhat standard linux, they would have started with debian.

    There is nothing wrong with the RPM format (I do prefer Debian, though - it's a more unix-y way of doing things). It's just that for a long time there was no centralized repository of RPM packages, so everything was a mishmash, and led you to dependency hell. Debian though, has a central repository and enforced the provision that all packages must have dependencies on things inside the repository to be accepted. It's not a format issue, it's a policy issue. E.g., I can't take my Debian installation, point it at Ubuntu's servers, then just do "apt-get update; apt-get dist-upgrade" and expect my system to migrate to Ubuntu. Most likely I'd be left with a half-functional mess. Is .deb broken because of this? I hope not!

    RedHat never enforced the policy nor maintained a central repository of packages. Debian has. And for a while, Debian had superior package management tools.

    In fact, I really preferred the old Familiar Linux IPK format - you only need gzip and tar (it was all tarballs) to hack through those packages rather than debian's usage of ar and tarballs.

    (And these days, with apt-rpm and yum, dependency issues have reduced significantly).

  6. Re:LSB just for packages? by krmt · · Score: 1

    Debian policy requires all packages to follow the filesystem hierarchy standard (FHS). If not, it's considered a bug. Any downstream derivatives of Debian should, as a result, also implement the FHS.

    --

    "I may not have morals, but I have standards."

  7. Re:LSB is worthless by rubycodez · · Score: 1

    Hoho, LSB is to make Linux more attractive to business. do you know how many enterprises/goverments I've seen using Debian in the last 8 years, zero.

  8. Re:LSB is worthless by xtracto · · Score: 1

    Talking about packaging mechanism I preffer the way closed source companies do things (like for example Google Picasa or Earth). This is, to link everything statically. Why not? That will warranty your application performance not mattering the libx.y.z.so the user has on its system.

    How much space can a statically linked program take? 10MB? 20MB? 30MB? everyone has 10GB of unused space nowadays...
    At least there should be that option, I will use it in order to avoid the hassle of having to download dependencies and all that shit.

    And even on deb based distributions, I have just installed Ubuntu in a PC that does not have internet access. Because of that it is a hell if I want to update or install new software as I have to download and search for dependencies... synaptic help a bit but only if I want to install new software that was in the list as I can not fetch a new list.

    If every program was compiled and linked with all the necessary functions statically, it would be a matter of downloading and extracting the binary file (maybe changing the permission to 555). I liked that about Picasa (I installed it without problems in the Ubuntu).

    Oh, and another good thing of doing that is that it may not be necessary to have ROOT access to run a program. Just now I am writing this from my university PC with Fedora, I do not have root access hence I can not install and run any new software. If I want to run something new I need to download the tarball and compile it, provided that the required libraries (with the required version) are isntalled, otherwise I am screwed. That is a flaw!

    Please someone provide a repository of statically linked open source software. Isnt that possible?, linked for the major distributions...

    --
    Ubuntu is an African word meaning 'I can't configure Debian'
  9. Re:LSB is worthless by amorsen · · Score: 1

    No, if they were serious they would have made it distro and packaging tool agnostic.

    They chose to base it on a file archive with a header. It was a bit unlucky that they picked the .rpm suffix for it, but apart from that I don't see the problem. It's trivial to install LSB packages on Debian.

    The real problems with LSB lie elsewhere. I have never used an LSB compliant application and I run Linux >95% of the time.

    --
    Finally! A year of moderation! Ready for 2019?
  10. Re:LSB is worthless by Dasaan · · Score: 1
    Funny you should say that. I got this from a Debian mailing list today:

    Dzongkha Version of Debian GNU/Linux 3.1 launched

    The Information and Communication minister of the Royal Government of
    Bhutan, Lyonpo Leki Dorji, launched "DzongkhaLinux", an entirely
    localised GNU/Linux distribution based on Debian GNU/Linux 3.1. This
    is the first operating system that fully supports the country's
    national language and which has been developed in Bhutan.

    The Bhutan Department of Information Technology chose Debian for its
    high versatility and reliability as well as the guarantee to always
    remain 100% Free Software. DzongkhaLinux developers have already
    contributed back their translations and development (fonts, input
    methods...) to both Debian and end-user applications, such as GNOME,
    OpenOffice.org and the Mozilla.

    The development of DzongkhaLinux was supported by the International
    Development Research Center, from Canada, and the PANl10n project,
    aimed at bringing localised computer use in several Asian countries.
    The system consists of one CD which can be either installed or used as
    a live system.

    Recent laws in the country have enforced the use of the national
    language in all official events and all official communication.
    DzongkhaLinux is the first opportunity for the entire Bhutanese
    population to join the information and communication age, using their
    own language.


    About Bhutan

    The Kingdom of Bhutan is a landlocked South Asian nation situated
    between India, Tibet and China and is often described as the last
    surviving traditional Himalayan Buddhist culture. The official
    language is Dzongkha, a language from the Sino-Tibetan family. Bhutan
    is very committed to preserve its local culture and traditions.


    About Debian

    Debian GNU/Linux is a free operating system, developed by more than a
    thousand volunteers from all over the world who collaborate via the
    Internet. Debian's dedication to Free Software, its non-profit nature,
    and its open development model make it unique among GNU/Linux
    distributions.

    The Debian project's key strengths are its volunteer base, its dedication
    to the Debian Social Contract, and its commitment to provide the best
    operating system possible.


    References

    Dzongkha Localisation Project
    http://dzongkha.sourceforge.net/

    IDRC, International Development Research Center
    http://www.idrc.ca/
    --
    XP is basicly 98 with a lot more extra features to hunt down and disable. --Dram
  11. Re:LSB is worthless by Otter · · Score: 1
    No, if they were serious they would have made it distro and packaging tool agnostic.

    If they did that, what would an LSB-compliant system have to look like? It would completely defeat the purpose of having the standard in the first place.

  12. Re:LSB is worthless by grimwell · · Score: 2, Informative

    Just now I am writing this from my university PC with Fedora, I do not have root access hence I can not install and run any new software. If I want to run something new I need to download the tarball and compile it, provided that the required libraries (with the required version) are isntalled, otherwise I am screwed. That is a flaw!

    Not a flaw, basic sysadmin'ing... don't want to users fucking things up.

    With the --prefix and --root switches for rpm, you can install software&libraries in your home directory.

    Chapter 2. Using RPM to Install Packages

    Please someone provide a repository of statically linked open source software.

    The downside with statically link executables is if there is a flaw(e.g. buffer overflow) with a library, you need to recompile&reinstall all the executables that have that library statically linked. Dynamically linked means just need to re-compile the offending library and restart the executable.

    If you ever start to care for & feed a machine or three, you'll start to see there is a method to the madness.

    --
    If the govt becomes a lawbreaker, it breeds contempt for law, it invites man to become his own law, it invites anarchy
  13. Re:LSB is worthless by xtracto · · Score: 1

    The downside with statically link executables is if there is a flaw(e.g. buffer overflow) with a library, you need to recompile&reinstall all the executables that have that library statically linked. Dynamically linked means just need to re-compile the offending library and restart the executable.

    For which you will update your application to the newest version containing already the patch uh? nothing too different to what happens now (for example firefox 1.0.0 ~ 1.5 updates). This would be achieved either by making a diff in the last version and current version and distributing an update binary or by distributing the whole new program.

    thanks for the RPM flags tho.

    --
    Ubuntu is an African word meaning 'I can't configure Debian'
  14. Re:LSB is worthless by jon787 · · Score: 1

    Actually you probably can dist-upgrade Debian to Ubuntu. This is not a task for a novice and is definetly not supported, but it should work.

    Its slighty more involved than "vim /etc/apt/sources.list;apt-get update;apt-get dist-upgrade" though.

    --
    X(7): A program for managing terminal windows. See also screen(1).
  15. Re:LSB is worthless by grimwell · · Score: 1

    For which you will update your application to the newest version containing already the patch uh?

    Yes, you're right. Go forth and spread your vision far&wide, so that the unwashed masses might be enlightened.

    --
    If the govt becomes a lawbreaker, it breeds contempt for law, it invites man to become his own law, it invites anarchy
  16. Re:Not required by ardor · · Score: 2, Insightful

    Rubbish.

    Autotools are the wrong solution, LSB is the right one. Autofoo is an awful build system (the nick "autohell" has its reasons, just see the results in google). They are horrible to use, the scripts are a nightmare to debug, and M4 is just plain from hell. SCons, CMake, Premake, Jam are better tools (btw, CMake has been created by autotools veterans and creators). The interest in better build systems is quite high, just look at the KDE guys (they moved everything from autofoo to CMake), or at Blender. Autotools may have been a good idea back then, but its time for some progress.
    Also, NO ONE ever uses autotools in Windows, there is just no reason to do that.

    CS is bad bad bad? Oh my. CS is THE ONLY WAY Linux is ever going to have serious games (is Doom3 OS? UT2004? NWN?) and if Adobe decides to port Photoshop, be prepared for a binary blob. Maya is closed source. Baad programs we don't need? Dream on. Besides, the aforementioned games have their issues with incompatible libc's etc. which is the precise reason why LSB is a GOOD thing.

    --
    This sig does not contain any SCO code.
  17. Re:LSB is worthless by rubycodez · · Score: 1

    that's great news, and I don't say that Debian or derived works are unsuitable for business, just that I've not seen it as choice in U.S. for business. Now if someday most of the world's population standardizes on a distro by virtual of India and China and South America's and surrounding countries going in a different direction, maybe then the U.S. would have to change just to do business.

  18. Why use LSB? by dhasenan · · Score: 2, Informative

    There are three distributions listed that conform to LSB3.0: SUSE, RedHat, and Asianux. Why should I write for LSB?

    FTFT (from the...tutorial): LSB has binary compatibility standards, so I can compile once and run anywhere. But if the application is GPL and nontrivial, it shouldn't be that hard to get it into the package repositories in question. Otherwise, it's probably in a scripting language, so the end user doesn't have to build or install it anyway.

    This is really only important for commercial Linux software.

    1. Re:Why use LSB? by draethus · · Score: 1

      Distributing applications in binary form isn't only useful for commercial software: consider Gaim and Inkscape, which use autopackages for this purpose. Apparently Inkscape is hard to install any other way. It's easier to run a pre-compiled executable than compile from source, it's less work for the developer if time isn't wasted packaging for different distributions where it will always be out of date, and it's one of the reasons Windows is so popular. LSB, autopackage and the like are steps in the right direction.

  19. Re:LSB is worthless by Anonymous Coward · · Score: 1, Insightful

    Binary installation should only be handled by priviliged users.

    Because source-based installation is pefectly safe, as we all read every line of code in the tarballs we ./configure && make && make install, right?

    Smartass.

  20. Re:Restricted access to "public" spec? by julesh · · Score: 1

    "Anyone have a "public" version of this doc?" ... that doesn't cost $40?

  21. Re:LSB is worthless by julesh · · Score: 2, Insightful

    How much space can a statically linked program take? 10MB? 20MB? 30MB? everyone has 10GB of unused space nowadays...

    You do realise it also saves RAM as well, if the library is in use in multiple applications? Not everyone has 10GB free RAM. Or even 10MB free RAM.

    Besides: my current Linux system is running of a 3.3GB partition on my total 10GB hard disc. Not everyone runs current hardware, and many Linux users consider the fact that it is better at supporting old hardware than current versions of Windows one of its most important benefits.

  22. Static is more trouble patching by A+nonymous+Coward · · Score: 2, Insightful

    The point of dynamic libs is not just the memory savings, both RAM and disk, but the bug fixing. You fix a bug in a lib, all the linked apps get it fixed by definition. Static apps require the vendor to relink and rerelease the apps.

    There is also a small slowdown with dynamic apps, load and runtime, but that has never bothered me.

  23. Re:LSB is worthless by wrong · · Score: 1

    A statically-linked program doesn't just use up more space on disk. It also uses more space in RAM. And caches.

  24. Re:Not required by Sparr0 · · Score: 1

    Quake 3 is open source. Check out Tremulous or the newest Rocket Arena for games using the engine.

  25. Re:LSB is worthless by int19h · · Score: 2, Informative

    Debian (and Ubuntu) have several lsb-packages that provides LSB-support (although the description of the package clearly states that the presence of the package should not be interpreted as a sign of full compliance (in similar (but different) wording)). Debian is also on the "team" behind the evolving LSB-standard (see freedesktop.org or search the web).

    I think LSB is great. For instance, people can write OpenGL-software and target lsb-graphics; instant portability.

    And, most important of all, if you're ever to sell shrink-wrapped boxes with linux-software, you can attach an "LSB-compliant" sticker to it. :)

  26. Re:LSB is worthless by mrchaotica · · Score: 1
    How much space can a statically linked program take? 10MB? 20MB? 30MB? everyone has 10GB of unused space nowadays...

    You say that now, but just wait until you try to statically link each and every KDE or GNOME app with 50 MB worth of libraries. I could easily see that taking up (50 MB * 500 programs =) 25 GIGABYTES worth of disk space.

    --

    "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

  27. You misunderstand LSB by WebCowboy · · Score: 1

    ...but don't feel bad, so do most people on this forum

    It' looks like it only applies to package formats. Am I wrong?

    Yes, you are almost completely wrong. LSB applies to much more than package file formatting. LSB distributions have a common set of libraries and such, so that every single LSB package has the exact same set of dependencies--those defined by the spec. There is even a package NAMING convention that must be followed to ensure there are no package naming conflicts.

    I would really love to see this implemented by everyone!!! http://en.wikipedia.org/wiki/Filesystem_Hierarchy_ Standard

    Then you'd really love to see LEB implemeted by everyone too, becasue the FHS is one aspect of the LSB.

  28. Re:LSB is worthless by jon787 · · Score: 1

    Not if the package versions need to go downward instead of upward

    --
    X(7): A program for managing terminal windows. See also screen(1).