Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Porting to the Linux Standard Base

timothy posted more than 8 years ago | from the make-it-fully-operational dept.

41

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."

cancel ×

41 comments

Sorry! There are no comments related to the filter you selected.

LSB is worthless (0, Flamebait)

Clockwurk (577966) | more than 8 years ago | (#15750052)

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.

"/." opinions are worthless (1, Insightful)

Anonymous Coward | more than 8 years ago | (#15750086)

"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.

Re:LSB is worthless (2, Insightful)

0racle (667029) | more than 8 years ago | (#15750217)

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.

Re:LSB is worthless (1)

amorsen (7485) | more than 8 years ago | (#15750577)

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.

Re:LSB is worthless (1)

Otter (3800) | more than 8 years ago | (#15750665)

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.

Re:LSB is worthless (0)

Anonymous Coward | more than 8 years ago | (#15755639)

It'd probably look something like Slackware. Minimal packaging, no retarded dependancy checking that requires upgrades for minor build changes, and Just Works(tm).

Re:LSB is worthless (1)

RotateLeftByte (797477) | more than 8 years ago | (#15750237)

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.

Re:LSB is worthless (0)

Anonymous Coward | more than 8 years ago | (#15751499)

No, the aim of the LSB is to allow binary distribution of software on Linux systems. It's a binary compatibility layer. It's all about being able to sell software for Linux the same way people sell software for Windows.

Re:LSB is worthless (3, Insightful)

tlhIngan (30335) | more than 8 years ago | (#15750242)

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).

Re:LSB is worthless (1)

xtracto (837672) | more than 8 years ago | (#15750355)

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...

Re:LSB is worthless (0)

Anonymous Coward | more than 8 years ago | (#15750523)

No, it isn't a flaw.

Binary installation should only be handled by priviliged users. Random application installation without forethought as to the consequences of the system kills not only security, but stability.

If you were in my lab, I'd wouldn't let you on anything but that old C64 in the corner.

Untar and compile code over there; just try it. :P

Re:LSB is worthless (1, Insightful)

Anonymous Coward | more than 8 years ago | (#15751422)

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.

Re:LSB is worthless (2, Informative)

grimwell (141031) | more than 8 years ago | (#15750677)

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 [rpm.org]

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.

Re:LSB is worthless (1)

xtracto (837672) | more than 8 years ago | (#15750762)

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.

Re:LSB is worthless (1)

grimwell (141031) | more than 8 years ago | (#15751069)

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.

Re:LSB is worthless (0)

Anonymous Coward | more than 8 years ago | (#15751608)

Try searching slashdot for the libz vulns from several years ago. Users were left wondering how they could find out if they had applications which were vulnerable. The answer is to use 'find' to make a list of everything that had it statically linked. Then go download and reinstall a dozen different programs. That's not fun, but if everything that uses libz had statically linked to it the list would have had several hundred entries instead of just a dozen.

Re:LSB is worthless (2, Insightful)

julesh (229690) | more than 8 years ago | (#15751465)

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.

Static is more trouble patching (2, Insightful)

A nonymous Coward (7548) | more than 8 years ago | (#15751664)

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.

Re:LSB is worthless (1)

wrong (27761) | more than 8 years ago | (#15752571)

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

Re:LSB is worthless (1)

mrchaotica (681592) | more than 8 years ago | (#15753680)

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.

Re:LSB is worthless (1)

jon787 (512497) | more than 8 years ago | (#15750775)

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.

Re:LSB is worthless (0)

Anonymous Coward | more than 8 years ago | (#15754870)

haha, in fact, contrary to your expectations, it IS just as simple as that - edit the sources.list, and then update and upgrade. a number of people have reported this working perfectly on the ubuntuforums.org.

so... yet another point in favor of the debian package repository system :)

Re:LSB is worthless (1)

jon787 (512497) | more than 8 years ago | (#15754928)

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

Re:LSB is worthless (1)

rubycodez (864176) | more than 8 years ago | (#15750312)

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.

Re:LSB is worthless (1)

Dasaan (644170) | more than 8 years ago | (#15750597)

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/ [sourceforge.net]

IDRC, International Development Research Center
http://www.idrc.ca/ [www.idrc.ca]

Re:LSB is worthless (1)

rubycodez (864176) | more than 8 years ago | (#15751103)

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.

Re:LSB is worthless (0)

Anonymous Coward | more than 8 years ago | (#15752633)

YOU are worthless!!!1!!1!!ONE!!

Re:LSB is worthless (2, Informative)

int19h (156487) | more than 8 years ago | (#15752701)

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. :)

Restricted access to spec? (2)

xxxJonBoyxxx (565205) | more than 8 years ago | (#15750124)

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?

Restricted access to "public" spec? (0)

Anonymous Coward | more than 8 years ago | (#15750373)

"Anyone have a "public" version of this doc?"

Building Applications with the Linux Standard Base [amazon.com]

Re:Restricted access to "public" spec? (1)

julesh (229690) | more than 8 years ago | (#15751436)

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

Re:Restricted access to spec? (1)

colonwq (258221) | more than 8 years ago | (#15751453)

Have you tried here [freestandards.org] ?

:wq

LSB just for packages? (0)

Anonymous Coward | more than 8 years ago | (#15750131)

Wikipeida entry for LSB: http://en.wikipedia.org/wiki/Linux_Standard_Base [wikipedia.org]

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

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

Re:LSB just for packages? (1)

krmt (91422) | more than 8 years ago | (#15750275)

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.

You misunderstand LSB (1)

WebCowboy (196209) | more than 8 years ago | (#15754773)

...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_ [wikipedia.org] Standard

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

Not required (-1, Troll)

ajs318 (655362) | more than 8 years ago | (#15750487)

GNU Autoconf and Automake, when used properly, allow for packages to build on any almost-POSIX-compliant system {I won't say fully-POSIX-compliant because AFAIK nothing is fully-POSIX-compliant}. That's Linux, BSD, AIX, Solaris, Apple; and even Windows NT4 / 2000 / XP. Windows 98 / Me with Cygwin.

LSB is merely a way to push closed source software onto Linux through the back door. We have language specifications and POSIX to ensure source compatibility. Binary compatibility is not necessary, and there are valid arguments suggesting it is not even desirable.

Re:Not required (2, Insightful)

ardor (673957) | more than 8 years ago | (#15751102)

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.

Re:Not required (1)

Sparr0 (451780) | more than 8 years ago | (#15752636)

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

Re:Not required (0)

Anonymous Coward | more than 8 years ago | (#15751634)

GNU Autoconf and Automake, when used properly

Fuck them, dude... Both are a bloated wet-scriptkiddie-dreams. Any project that relies on those two bitches needs at least one developer to maintain them. Debian has two different autoconf versions included where one works worse or better than the other...

I rather change my code or add the whole codebase of a lib into my code befre I start thinking about those two bitches who bitch about shit that has nothing to do with getting the project done!

I wonder if the autoconf developers can even spell or understand the meaning of the word "lite" since autoconf's only job should be to find files (*.h and libs) and stuff inside these files and define macros accordingly. But it does everything else and bitch about it... ooops-here M4-bullshit-there..

It's a complete mess... and here you are suggesting to use autoconf and automake to build packages?

DIE MONSTER!!!!

Why use LSB? (2, Informative)

dhasenan (758719) | more than 8 years ago | (#15751211)

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.

Re:Why use LSB? (1)

draethus (991374) | more than 8 years ago | (#15789634)

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.
Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>