Linux Standard Base Explained

The Linux Standard Base (LSB) was a joint project by several Linux distributions under the organizational structure of the Linux Foundation to standardize the software system structure, including the Filesystem Hierarchy Standard. LSB was based on the POSIX specification, the Single UNIX Specification (SUS), and several other open standards, but extended them in certain areas.

According to LSB:

The goal of the LSB is to develop and promote a set of open standards that will increase compatibility among Linux distributions and enable software applications to run on any compliant system even in binary form. In addition, the LSB will help coordinate efforts to recruit software vendors to port and write products for Linux Operating Systems.

LSB compliance might be certified for a product by a certification procedure.[1]

LSB specified standard libraries (centered around the), a number of commands and utilities that extend the POSIX standard, the layout of the file system hierarchy, run levels, the printing system, including spoolers such as CUPS and tools like Foomatic, and several extensions to the X Window System. It also specified boot facilities, such as $local_fs, $network, which were used to indicate service dependencies in System V-style initialization scripts.[2] A machine readable comment block at the top of a script provided the information necessary to determine at which point of the initialization process the script should be invoked; it was called the LSB header.[3]

The command lsb_release -a was available in many systems to get the LSB version details, or could be made available by installing an appropriate package, for example the redhat-lsb package in Red-Hat-flavored distributions such as Fedora,[4] or the lsb-release package in Debian-based distributions.

The standard stopped being updated in 2015 and current Linux distributions do not adhere to or offer it; however, the lsb_release command is sometimes still available. On February 7, 2023, a former maintainer of the LSB wrote, "The LSB project is essentially abandoned."[5]

Backward compatibility

LSB was designed to be binary-compatible and produced a stable application binary interface (ABI) for independent software vendors. To achieve backward compatibility, each subsequent version was purely additive. In other words, interfaces were only added; no interfaces were removed. The LSB adopted an interface deprecation policy to give application developers enough time in case an interface was removed from LSB.

This allowed the developer to rely on every interface in LSB for a known time and also to plan for changes. Interfaces were only removed after having been marked "deprecated" for at least three major versions, or roughly eleven years.[6]

LSB 5.0 was the first major release that broke backward compatibility with earlier versions.[7]

Version history

ISO/IEC standard

The LSB, version 3.1, is registered as an official ISO/IEC international standard. The main parts of it are:

There is also ISO/IEC TR 24715:2006 which identifies areas of conflict between ISO/IEC 23360 (the Linux Standard Base 3.1 specification) and the ISO/IEC 9945:2003 (POSIX) International Standard.[12]

The LSB, version 5.0, is also registered as an official ISO/IEC international standard.

ISO/IEC 23360 and ISO/IEC TR 24715 can be freely downloaded from ISO website.[13]

Reception

While LSB was a standard and without a competitor, it was followed only by few Linux distributions. For instance, only 21 distribution releases (versions) were certified for LSB version 4.0, notably Red Flag Linux Desktop 6.0, Red Hat Enterprise Linux 6.0, SUSE Linux Enterprise 11, and Ubuntu 9.04 (Jaunty Jackalope);[14] even fewer were certified for version 4.1.

The LSB was criticized[15] [16] [17] [18] for not taking input from projects, most notably the Debian project, outside the sphere of its member companies.

Choice of the RPM package format

LSB specified that software packages should either be delivered as an LSB-compliant installer,[19] or (preferably) be delivered in a restricted form of the RPM Package Manager format.[20]

This choice of package format precluded the use of other existing package formats not compatible with RPM. To address this, the standard did not dictate which package format the system must use for its own packages, merely that RPM must be supported to allow packages from third-party distributors to be installed on a conforming system.

Limitations on Debian

Debian included optional support for LSB early on, at version 1.1 in "woody" (3.0; July 19, 2002), 2.0 in "sarge" (3.1; June 6, 2005), 3.1 in "etch" (4.0; April 8, 2007), 3.2 in "lenny" (5.0; February 14, 2009) and 4.1 in "wheezy" (7; May 4, 2013). To use foreign LSB-compliant RPM packages, the end-user needs to use Debian's Alien program to transform them into the native package format and then install them.

The LSB-specified RPM format had a restricted subset of RPM features—to block usage of RPM features that would be untranslatable to .deb with Alien or other package conversion programs, and vice versa, as each format has capabilities the other lacks. In practice, not all Linux binary packages were necessarily LSB-compliant, so while most could be converted between .rpm and .deb, this operation was restricted to a subset of packages.

By using Alien, Debian was LSB-compatible for all intents and purposes, but according to the description of their lsb package,[21] the presence of the package "does not imply that we believe that Debian fully complies with the Linux Standard Base, and should not be construed as a statement that Debian is LSB-compliant."[21]

Debian strived to comply with the LSB, but with many limitations.[22] However, this effort ceased around July 2015 due to lack of interest and workforce inside the project.[23] In September 2015, the Debian project confirmed that while support for Filesystem Hierarchy Standard (FHS) would continue, support for LSB had been dropped.[24] Ubuntu followed Debian in November 2015.[25]

Quality of compliance test suites

Additionally, the compliance test suites were criticized for being buggy and incomplete—most notably, in 2005 Ulrich Drepper criticized the LSB for poorly written tests which can cause incompatibility between LSB-certified distributions when some implement incorrect behavior to make buggy tests work, while others apply for and receive waivers from complying with the tests.[26] He also denounced a lack of application testing, pointing out that testing only distributions can never solve the problem of applications relying on implementation-defined behavior.[26]

For the vendors considering LSB certifications in their portability efforts, the Linux Foundation sponsored a tool that analyzed and provided guidance on symbols and libraries that go beyond the LSB.[27]

See also

External links

Media:

Notes and References

  1. Web site: Certifying an Application to the LSB . . 2008 . 2010-04-26 . dead . https://web.archive.org/web/20090715171638/http://www.linuxfoundation.org/en/Certification . July 15, 2009 . mdy-all.
  2. Web site: Facility Names . Linux Standard Base Core Specification 3.1 . 2005.
  3. Web site: Comment conventions for init scripts . Linux Standard Base Core Specification 3.1 . 2005.
  4. Web site: Package redhat-lsb. fedoraproject.org. August 15, 2015. September 1, 2015. https://web.archive.org/web/20150901033736/https://apps.fedoraproject.org/packages/redhat-lsb. dead.
  5. Web site: Re: Archive of this Mailing List . lsb-discuss mailing list . February 7, 2023.
  6. Web site: LSB Roadmap . . 2008 . 2010-04-26.
  7. Web site: LSB 5.0 Release Notes . linuxfoundation.org . 3 June 2015 . dead . https://web.archive.org/web/20170708050131/https://wiki.linuxfoundation.org/en/ReleaseNotes50 . July 8, 2017.
  8. Web site: Java removed from Linux Standard Base 4.1 . djwm . 10 March 2011 . dead . https://web.archive.org/web/20131207045611/http://www.h-online.com/open/news/item/Java-removed-from-Linux-Standard-Base-4-1-1205368.html . December 7, 2013.
  9. Web site: Java removed from Linux Standard Base 4.1. March 10, 2011. h-online.com. August 15, 2015.
  10. Web site: LSB 5.0 Release Notes: Qt 3 Removed . linuxfoundation.org . 3 June 2015.
  11. 43781 . ISO/IEC 23360-1:2006 - Linux Standard Base (LSB) core specification 3.1 -- Part 1: Generic specification . 2011-10-15.
  12. 38825 . ISO/IEC TR 24715:2006 - Information technology -- Programming languages, their environments and system software interfaces -- Technical Report on the Conflicts between the ISO/IEC 9945 (POSIX) and the Linux Standard Base (ISO/IEC 23360) . 2011-10-15.
  13. Web site: ISO Publicly Available Standards . 2011-10-15.
  14. https://archive.today/20120804111738/https://www.linuxbase.org/lsb-cert/productdir.php?by_lsb Certified Products Product Directory
  15. Web site: bugs.debian.org.
  16. Web site: linuxfoundation.org .
  17. Web site: openacs.org.
  18. Web site: osnews.com.
  19. Web site: Chapter 22. Software Installation 22.1. Introduction . Linux Standard Base Core Specification 3.1 . 2005.
  20. Web site: Chapter 22. Software Installation 22.3. Package Script Restrictions . Linux Standard Base Core Specification 3.1 . 2005.
  21. Web site: Debian -- Details of package lsb in lenny (stable) -- Linux Standard Base 3.2 support package . . 2008-08-18 . 2010-04-26.
  22. Web site: Debian LSB . . 2010-04-26.
  23. Web site: Debian LSB ML discussion . . 2015-09-12.
  24. Web site: Debian dropping the Linux Standard Base. LWN.net.
  25. Web site: lsb 9.20150917ubuntu1 source package in Ubuntu. November 19, 2015 .
  26. Web site: Do you still think the LSB has some value? . Drepper, Ulrich . 2005-09-17 . 2010-04-26.
  27. Web site: All About the Linux Application Checker . . 2008 . 2010-04-26.