Changes between Version 36 and Version 37 of RpmHowToPackagers


Ignore:
Timestamp:
Dec 29, 2015, 3:32:52 PM (9 years ago)
Author:
dmik
Comment:

Add Generating debug packages section

Legend:

Unmodified
Added
Removed
Modified
  • RpmHowToPackagers

    v36 v37  
    326326Note that the lines you insert contain a `@todo` block which you should leave in. It is to remind to replace these lines with simpler constructs when #119 is fixed.
    327327
     328== Generating debug packages ==
     329
     330RPM can automatically extract debug info from the EXEs and DLLs built by the .spec file and put this info into a separate sub-package named `PACKAGE-debug` where PACKAGE is the main .spec package name. In order to do that, the following directive needs to be added to the .spec file (usually, after all package and sub-package definitions and before the `%prep` section, surrounded by empty lines):
     331{{{
     332%debug_package
     333}}}
     334
     335Normally nothing else needs to be done, RPM will automatically handle all `*.exe`, `*.dll` and `*.pyd` files generated by your .spec. However, sometimes it's desirable to disable debug info generation for certain files. This may be done with the `%_strip_opts` definition placed at the beginning of the .spec file, e.g. as follows:
     336{{{
     337# Exclude myfile*.dll from the processed files
     338%define _strip_opts --debuginfo -x "myfile*.dll"
     339
     340# Add *.mymod files to the default list of files to be processed
     341%define _strip_opts --debuginfo -i "*.mymod"
     342
     343# Process only *.mymod files (do not process default extensions at all)
     344%define _strip_opts --debuginfo -n "*.mymod"
     345}}}
     346
     347Note that if you don't need any debug info generation at all, simply remove the `%debug_package` macro from your .spec file and debug file generation will be automatically suppressed (all the debug info will be silently discarded from the executable files during the compression phase in such case).
     348
    328349== OS/2 specific notes ==
    329350While the syntax of .spec files is the same used under Unix, not everything is currently working in the OS/2 port. Also many packages are already built and manually installed: this means RPM is not aware of their presence.