12

I was reading about the Linux Standard Base and was wondering if the structure used in Ubuntu is the same that is suggested in the LSB. I know some distros do not follow or do some changes to the LSB, so I also want to know if Ubuntu has some changes, and what changes these are.

3

2 Answers 2

8

For 11.10 and 12.04 the Linux Standard base version is 4.0, as noted on Launchpad. As explained at the Linux Foundation, LSB is

a core standard for the Linux operating system that encourages interoperability between applications and the platform. It includes a written binary interface specification, a set of test suites for both distributions and applications writing to the standard, and a sample implementation for testing purposes.

The LSB specification outlines standards for many things such as the filesystem, core libraries and key functions such as libc system calls. It also specifies software packaging standards and that a distribution must support the rpm standard even if its default package system does not use the rpm system.

The specification also contains the standard for runlevels and init scripts, and a related package included in Ubuntu is lsb-base. This package, according to its own description, contains the

init-functions shell library, which may be used by other packages' initialization scripts for console logging and other purposes.

The easiest way to demonstrate Ubuntu support for these init standards is to run

grep -ri "BEGIN INIT INFO" /etc/init.d

and then examine one of the files listed. Sudo, for example, will have the LSB header specifications at the start of the script:

### BEGIN INIT INFO
# Provides:          sudo
# Required-Start:    $local_fs $remote_fs
# Required-Stop:
# X-Start-Before:    rmnologin
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Provide limited super user privileges to specific users
# Description: Provide limited super user privileges to specific users.
### END INIT INFO

The directories such as $local_fs that are mentioned by these LSB headers are listed in /etc/insserv.conf. For more information on init, see page 168 of this Ubuntu book

It is difficult to find the specific areas in which Ubuntu diverges from the LSB standards, and the disclaimer on the LSB packages is that the existence of those packages does

not imply that Debian fully complies with the Linux Standard Base, and should not be construed as a statement that Debian is LSB-compliant.

In general, however, both Ubuntu and Debian do intend to be compliant and they include the command lsb_release to indicate the distributions' general compliance. However, they will make occasional divergences when necessary, with relation to such things as the filesystem hierarchy, as noted in the answers here:

3
  • I gotta say excellent Answer. Will +1 vote when I get the points for it. Nov 17, 2012 at 20:26
  • 1
    This answer explain details about standard LSB and links to ubuntu official lsb package. But I don't found here official status ubuntu vs lsb considering for example current LTS or any progress in direction to compliance. I don't know whether was performed some compilance tests performed in 12.04. On LSB webpage I don't found any such information. So I'm looking on ubuntu and I found nothing. So I suppose that current ubuntu development are not focused on LSB at all. Am I right? Or not?
    – karolszk
    Nov 19, 2012 at 19:06
  • @karolszk I am also still looking for more information and may expand the answer if I find more specific facts about the current LSB status. As Ubuntu is based on Debian, it may be worth looking at Debain policy and thinking on LSB too.
    – user76204
    Nov 19, 2012 at 19:24
3

Ubuntu like Debian 'strives to comply with the LSB' through the 'alien' program but is not believed to be fully compliant.

1
  • 3
    There's more to LSB than RPM packages. For completeness it would be better to include some cursory information on the lsb-base package.
    – Jjed
    Jan 8, 2012 at 4:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .