(debian-policy.info)The symbols files present on the system


Next: The symbols File Format Up: The symbols system
Enter node , (file) or (file)node

8.6.3.1 The ‘symbols’ files present on the system
.................................................

‘symbols’ files for a shared library are normally provided by the shared
library package as a control file, but there are several override paths
that are checked first in case that information is wrong or missing.
The following list gives them in the order in which they are read by
‘dpkg-shlibdeps’.  The first one that contains the required information
is used.

‘debian/*/DEBIAN/symbols’

     During the package build, if the package itself contains shared
     libraries with ‘symbols’ files, they will be generated in these
     staging directories by ‘dpkg-gensymbols’ (see Note: Providing a
     symbols file.).  ‘symbols’ files found in the build tree take
     precedence over ‘symbols’ files from other binary packages.

     These files must exist before ‘dpkg-shlibdeps’ is run or the
     dependencies of binaries and libraries from a source package on
     other libraries from that same source package will not be correct.
     In practice, this means that ‘dpkg-gensymbols’ must be run before
     ‘dpkg-shlibdeps’ during the package build.  (1)

‘/etc/dpkg/symbols/package.symbols.arch’ and ‘/etc/dpkg/symbols/package.symbols’

     Per-system overrides of shared library dependencies.  These files
     normally do not exist.  They are maintained by the local system
     administrator and must not be created by any Debian package.

‘symbols’ control files for packages installed on the system

     The ‘symbols’ control files for all the packages currently
     installed on the system are searched last.  This will be the most
     common source of shared library dependency information.  These
     files can be read with ‘dpkg-query --control-show package symbols’.

Be aware that if a ‘debian/shlibs.local’ exists in the source package,
it will override any ‘symbols’ files.  This is the only case where a
‘shlibs’ is used despite ‘symbols’ files being present.  See Note: The
shlibs files present on the system. and *note The shlibs system:
35. for more information.

   ---------- Footnotes ----------

   (1) An example may clarify.  Suppose the source package ‘foo’
generates two binary packages, ‘libfoo2’ and ‘foo-runtime’.  When
building the binary packages, the contents of the packages are staged in
the directories ‘debian/libfoo2’ and ‘debian/foo-runtime’ respectively.
(‘debian/tmp’ could be used instead of one of these.)  Since ‘libfoo2’
provides the ‘libfoo’ shared library, it will contain a ‘symbols’ file,
which will be installed in ‘debian/libfoo2/DEBIAN/symbols’, eventually
to be included as a control file in that package.  When ‘dpkg-shlibdeps’
is run on the executable ‘debian/foo-runtime/usr/bin/foo-prog’, it will
examine the ‘debian/libfoo2/DEBIAN/symbols’ file to determine whether
‘foo-prog’’s library dependencies are satisfied by any of the libraries
provided by ‘libfoo2’.  Since those binaries were linked against the
just-built shared library as part of the build process, the ‘symbols’
file for the newly-built ‘libfoo2’ must take precedence over a ‘symbols’
file for any other ‘libfoo2’ package already installed on the system.


automatically generated by info2www version 1.2.2.9