[Rpm-ecosystem] Improving debuginfo packages

Michael Schroeder mls at suse.de
Fri May 20 14:43:52 UTC 2016

On Fri, May 20, 2016 at 04:36:08PM +0200, Mark Wielaard wrote:
> When discussing the above on irc people pointed out some other things
> about debuginfo packages that could be improved.
> - debuginfo-subpackages. Suse has some patches to create a debuginfo
>   package for each main binary package. Instead of one debuginfo package
>   per source rpm. This would make it possible to only install the
>   actually needed debuginfo.
> https://build.opensuse.org/package/view_file/openSUSE:Factory/rpm/debugsubpkg.diff?expand=1
>   I think it makes sense to try to pull this into upstream rpm.
> - Dependencies by Build-Id. Debian debs provide the Build-Id for each
>   ELF file (executable, shared library, etc) in the package. And similar
>   for their debug packages. This makes it easy request the matching
>   debuginfo package for a main package. I think it make sense to somehow
>   add that to rpm too. Then you could easily request a package or debug
>   package based on build-id directly. Currently that is possible if you
>   have a file list and can resolve a request for
>   the /usr/lib/debug/.build-id/XX/YYYYY.debug file.
>   But that is somewhat cumbersome.

SUSE automatically adds "debuginfo(build-id) = XXX" provides via the
following fileattr scriptlet:


while read instfile ; do
    case $instfile in
            if [ -f "$instfile" ] ; then
                BUILDID=$(echo $instfile | sed -ne 's|.*/usr/lib/debug/.build-id/\([0-9a-f]*\)/\([0-9a-f]*\)\.debug|\1\2|p')
                echo "debuginfo(build-id) = $BUILDID"

> - Suppress or split build sources from debuginfo package.
>   Not all debuginfo consumers also need the full build sources.
>   So it might make sense to split off the build sources into
>   a separate -debugsrc package (which the -debuginfo could recommend).

SUSE already does that, but we use "-debugsource" as suffix.


Michael Schroeder                                   mls at suse.de
SUSE LINUX GmbH,           GF Jeff Hawn, HRB 16746 AG Nuernberg

More information about the Rpm-ecosystem mailing list