Packaging/Debuginfo

From FedoraProject

Jump to: navigation, search

Contents

Debuginfo packages

This page contains information about debuginfo packages and common pitfalls about them for packagers. For usage information and an explanation why debuginfo packages are important, see StackTraces.

The discussion on this page assumes that the redhat-rpm-config package is installed.

Checking your debuginfo package for usefulness

A useful debuginfo package contains stripped symbols from ELF binaries (*.debug in /usr/lib/debug) as well as the source code related to them (in /usr/src/debug). The script that generates the packages is /usr/lib/rpm/find-debuginfo.sh, read it through to get a basic understanding of how they're generated. If your debuginfo package doesn't contain any files, or is missing the sources or the size of the *.debug files in it is unexpectedly small (typically *.debug are larger than the corresponding binary it was stripped from), it's likely that there's a flaw in your package. That's not always the case though, read on.

Useless or incomplete debuginfo packages due to packaging issues

Useless or incomplete debuginfo packages are often a result of packaging flaws. Typical flaws that often manifest themselves as debuginfo packages containing no files:

Flaws that manifest themselves as unexpectedly small *.debug in the debuginfo package and/or source files missing:

Useless or incomplete debuginfo packages due to other reasons

Empty debuginfo packages may also be generated in situations where there are no obvious packaging flaws present. Sometimes these are because of limitations of find-debuginfo.sh, sometimes not. Some usual cases:

If you wish to disable generation of the useless debuginfo package while waiting for improvements to find-debuginfo.sh or if it's unlikely that it could be enhanced to produce a good debuginfo for your package (for example no architecture dependent files, but package is not noarch because of the installation paths it uses), use %define debug_package %{nil} in the specfile, and be sure to add a comment next to it explaining why it was done.

Missing debuginfo packages

It is normal for noarch package builds to not produce a debuginfo package. If it's missing in other cases (where it has not been explicitly disabled), something's wrong. One such case is a missing %build section with some rpmbuild versions.

Resources