(debian-policy.info)The shlibs File Format


Next: Providing a shlibs file Prev: The shlibs files present on the system Up: The shlibs system
Enter node , (file) or (file)node

8.6.4.2 The ‘shlibs’ File Format
................................

Each ‘shlibs’ file has the same format.  Lines beginning with ‘#’ are
considered to be comments and are ignored.  Each line is of the form:

     [type: ]library-name soname-version dependencies ...

We will explain this by reference to the example of the ‘zlib1g’
package, which (at the time of writing) installs the shared library
‘/usr/lib/libz.so.1.2.3.4’.

‘type’ is an optional element that indicates the type of package for
which the line is valid.  The only type currently in use is ‘udeb’.  The
colon and space after the type are required.

‘library-name’ is the name of the shared library, in this case ‘libz’.
(This must match the name part of the soname, see below.)

‘soname-version’ is the version part of the ELF ‘SONAME’ attribute of
the library, determined the same way that the soversion component of the
recommended shared library package name is determined.  See Note:
Run-time shared libraries. for the details.

‘dependencies’ has the same syntax as a dependency field in a binary
package control file.  It should give details of which packages are
required to satisfy a binary built against the version of the library
contained in the package.  See Note: Syntax of relationship fields.
for details on the syntax, and Note: Shared library ABI changes.
for details on how to maintain the dependency version constraint.

In our example, if the last change to the ‘zlib1g’ package that could
change behavior for a client of that library was in version
‘1:1.2.3.3.dfsg-1’, then the ‘shlibs’ entry for this library could say:

     libz 1 zlib1g (>= 1:1.2.3.3.dfsg)

This version restriction must be new enough that any binary built
against the current version of the library will work with any version of
the shared library that satisfies that dependency.

As zlib1g also provides a udeb containing the shared library, there
would also be a second line:

     udeb: libz 1 zlib1g-udeb (>= 1:1.2.3.3.dfsg)


automatically generated by info2www version 1.2.2.9