TUX: Penguin Power!
Linux| Perl| PHP| Webserv| Databases| Sysadmin| Programming| Filesystems| Java| Webprog

Make Tux happy: Link to us!

       information)

SYNOPSIS
       dpkg-gensymbols [options]

DESCRIPTION
       dpkg-gensymbols scans a temporary build tree  (debian/tmp  by  default)
       looking for libraries and generate a symbols file describing them. This
       file, if non-empty, is then installed in the DEBIAN subdirectory of the
       build  tree  so  that it ends up included in the control information of
       the package.

       When generating those files, it uses as input some symbols  files  pro-
       vided  by the maintainer. It looks for the following files (and use the
       first that is found):

       o   debian/package.symbols.arch

       o   debian/symbols.arch

       o   debian/package.symbols

       o   debian/symbols

       The main interest of those files is  to  provide  the  minimal  version
       associated  to each symbol provided by the libraries. Usually it corre-
       sponds to the first version of that package that provided  the  symbol,
       but  it can be manually incremented by the maintainer if the ABI of the
       symbol is extended without breaking backwards compatibility.  It's  the
       responsibility  of  the  maintainer  to keep those files up-to-date and
       accurate, but dpkg-gensymbols helps him.

       When the generated symbols files differ from  the  maintainer  supplied
       one,  dpkg-gensymbols will print a diff between the two versions.  Fur-
       thermore if the difference are too significant, it will even fail  (you
       can customize how much difference you can tolerate, see the -c option).

MAINTAINING SYMBOLS FILES
       The  symbols files are really useful only if they reflect the evolution
       of the package through several releases. Thus  the  maintainer  has  to
       update  them  every time that a new symbol is added so that its associ-
       ated minimal version matches reality. To do this properly  he  can  use
       the  diffs contained in the build logs. In most cases, the diff applies
       directly to his debian/package.symbols file. That said, further  tweaks
       are  usually  needed:  it's  recommended for example to drop the Debian
       revision from the minimal version so that backports with a  lower  ver-
       sion  number  but the same upstream version still satisfy the generated
       dependencies.  If the Debian revision can't be dropped because the sym-
       bol  really  got  added  by the Debian specific change, then one should
       suffix the version with "~".

       Before applying any patch to the symbols file,  the  maintainer  should
       double-check  that it's sane. Public symbols are not supposed to disap-
       pear, so the patch should ideally only add new lines.
       it.  While  all  tags  are  parsed  and stored, only a some of them are
       understood by dpkg-gensymbols and trigger special handling of the  sym-
       bols. See subsection Standard symbol tags for reference of these tags.

       Tag  specification comes right before the symbol name (no whitespace is
       allowed in between). It always starts with an opening bracket  (,  ends
       with  a  closing  bracket ) and must contain at least one tag. Multiple
       tags are separated by the | character. Each tag can optionally  have  a
       value  which  is  separated  form  the tag name by the = character. Tag
       names and values can be arbitrary strings except  they  cannot  contain
       any of the special ) | = characters. Symbol names following a tag spec-
       ification can optionally be quoted with either '  or  "  characters  to
       allow  whitespaces in them. However, if there are no tags specified for
       the symbol, quotes are treated as part of the symbol name which contin-
       ues up until the first space.

        (tag1=i am marked|tag name with space)"tagged quoted symbol"@Base 1.0
        (optional)tagged_unquoted_symbol@Base 1.0 1
        untagged_symbol@Base 1.0

       The  first  symbol in the example is named tagged quoted symbol and has
       two tags: tag1 with value i am marked and tag name with space that  has
       no value. The second symbol named tagged_unquoted_symbol is only tagged
       with the tag named optional. The last symbol is an example of the  nor-
       mal untagged symbol.

       since  symbol  tags are an extension of the deb-symbols(5) format, they
       can only be part of the symbols files used in  source  packages  (those
       files  should then be seen as templates used to build the symbols files
       that are embedded in binary packages). When dpkg-gensymbols  is  called
       without  the  -t option, it will output symbols files compatible to the
       deb-symbols(5) format: it fully  processes  symbols  according  to  the
       requirements  of  their standard tags and strips all tags from the out-
       put. On the contrary, in template mode (-t) all symbols and their  tags
       (both standard and unknown ones) are kept in the output and are written
       in their orignal form as they were loaded.

   Standard symbol tags
       optional
              A symbol marked as optional can disappear from  the  library  at
              any time and that will never cause dpkg-gensymbols to fail. How-
              ever, disappeared optional symbols will continuously  appear  as
              MISSING  in  the diff in each new package revision.  This behav-
              iour serves as a reminder for the maintainer that such a  symbol
              needs  to  be  removed  from  the  symbol file or readded to the
              library. When the optional symbol, which was previously declared
              as  MISSING, suddenly reappears in the next revision, it will be
              upgraded back to the "existing" status with its minimum  version
              unchanged.

              This  tag  is  useful  for symbols which are private where their
              disappearance do not cause ABI breakage. For  example,  most  of
              C++  template  instantiations  fall into this category. Like any
              other tag, this one may also have an arbitrary value:  it  could
              (because the current host architecture  is  not  listed  in  the
              tag),  it is made arch neutral (i.e. the arch tag is dropped and
              the symbol will appear in the diff due to this change),  but  it
              is not considered as new.

              When operating in the default non-template mode, among arch-spe-
              cific symbols only those that match the current  host  architec-
              ture are written to the symbols file. On the contrary, all arch-
              specific symbols  (including  those  from  foreign  arches)  are
              always  written  to  the  symbol file when operating in template
              mode.

              The format of architecture list is the same as the one  used  in
              the  Build-Depends field of debian/control (except the enclosing
              square brackets []). For example, the first symbol from the list
              below  will  be  considered only on alpha, amd64, kfreebsd-amd64
              and ia64 architectures while the second one anywhere  except  on
              armel.

               (arch=alpha   amd64  kfreebsd-amd64  ia64)a_64bit_specific_sym-
              bol@Base 1.0
               (arch=!armel)symbol_armel_does_not_have@Base 1.0

       ignore-blacklist
              dpkg-gensymbols has an internal blacklist of symbols that should
              not  appear  in  symbols  files  as  they are usually only side-
              effects of implementation details of the toolchain. If for  some
              reason,  you  really want one of those symbols to be included in
              the symbols file, you should tag the symbol  with  ignore-black-
              list. It can be necessary for some low level toolchain libraries
              like libgcc.

   Using includes
       When the set of exported symbols differ between architectures,  it  may
       become  inefficient  to  use  a  single symbol file. In those cases, an
       include directive may prove to be useful in a couple of ways:

       o      You can factorize the common part  in  some  external  file  and
              include  that file in your package.symbols.arch file by using an
              include directive like this:

              #include "packages.symbols.common"

       o      The include directive may also be tagged like any symbol:

              (tag|..|tagN)#include "file_to_include"

              As a result, all symbols included from file_to_include  will  be
              considered to be tagged with tag .. tagN by default. You can use
              this feature to  create  a  common  package.symbols  file  which
              includes architecture specific symbol files:

                common_symbol1@Base 1.0
               (arch=amd64 ia64 alpha)#include "package.symbols.64bit"

       An  included  file  can repeat the header line containing the SONAME of
       the library. In that case, it  overrides  any  header  line  previously
       read.  However, in general it's best to avoid duplicating header lines.
       One way to do it is the following:

       #include "libsomething1.symbols.common"
        arch_specific_symbol@Base 1.0

   Using wildcards with versioned symbols
       Well maintained libraries have versioned  symbols  where  each  version
       corresponds  to  the  upstream  version  where the symbol got added. If
       that's the case, it's possible to write a symbols  file  with  wildcard
       entries  like  "*@GLIBC_2.0"  that would match any symbol associated to
       the version GLIBC_2.0. It's still possible to include specific  symbols
       in  the file, they'll take precedence over any matching wildcard entry.
       An example:

       libc.so.6 libc6 #MINVER#
        *@GLIBC_2.0 2.0
        [...]
        *@GLIBC_2.7 2.7
        access@GLIBC_2.0 2.2

       The symbol access@GLIBC_2.0 will lead to a minimal dependency on  libc6
       version  2.2  despite  the  wildcard entry *@GLIBC_2.0 which associates
       symbols versioned as GLIBC_2.0 with the minimal version 2.0.

       Note that using wildcards means that dpkg-gensymbols  can't  check  for
       symbols  that  might have disappeared and can't generate a diff between
       the maintainer-supplied symbols file  and  the  generated  one  in  the
       binary package.

   Good library management
       A well-maintained library has the following features:

       o   its  API is stable (public symbols are never dropped, only new pub-
           lic symbols are added) and changes in incompatible ways  only  when
           the SONAME changes;

       o   ideally, it uses symbol versioning to achieve ABI stability despite
           internal changes and API extension;

       o   it doesn't export private  symbols  (such  symbols  can  be  tagged
           optional as workaround).

       While  maintaining the symbols file, it's easy to notice appearance and
       disappearance of symbols. But it's more difficult to catch incompatible
       API  and  ABI  change.  Thus  the maintainer should read thoroughly the
       upstream changelog looking for cases where the rules  of  good  library
       management  have been broken. If potential problems are discovered, the
       upstream author should be notified as an upstream fix is always  better
       than a Debian specific work-around.

              package tree.

       -elibrary-file
              Only  analyze libraries explicitly listed instead of finding all
              public libraries. You can use a regular expression  in  library-
              file  to match multiple libraries with a single argument (other-
              wise you need multiple -e).

       -Ifilename
              Use filename as reference file to generate the symbols file that
              is integrated in the package itself.

       -O     Print the generated symbols file to standard output, rather than
              being stored in the package build tree.

       -Ofilename
              Store the generated symbols file as  filename.  If  filename  is
              pre-existing,  its  content  is  used as basis for the generated
              symbols file.  You can use this feature to update a symbols file
              so that it matches a newer upstream version of your library.

       -t     Write  the  symbol  file in template mode rather than the format
              compatible with deb-symbols(5). the main difference is  that  in
              the  template  mode  symbol  names and tags are written in their
              original form contrary to the post-processed symbol  names  with
              tags stripped in the compatibility mode.  Moreover, some symbols
              might be omitted when writing  a  standard  deb-symbols(5)  file
              (according  to  the  tag processing rules) while all symbols are
              always written to the symbol file template.

       -c[0-4]
              Define the checks to do when  comparing  the  generated  symbols
              file  with the file used as starting point. By default the level
              is 1.  Increasing levels do more checks and include  all  checks
              of  lower levels.  Level 0 disables all checks. Level 1 fails if
              some symbols have disappeared. Level 2 fails if some new symbols
              have been introduced.  Level 3 fails if some libraries have dis-
              appeared. Level 4 fails if some libraries have been introduced.

              This  value  can  be  overridden  by  the  environment  variable
              DPKG_GENSYMBOLS_CHECK_LEVEL.

       -d     Enable  debug  mode.  Numerous messages are displayed to explain
              what dpkg-gensymbols does.

       -h, --help
              Show the usage message and exit.

       --version
              Show the version and exit.

SEE ALSO
       http://people.redhat.com/drepper/symbol-versioning
Find all the song lyrics here: Lyrics Now!