Package: debhelper
Version: 13.2
Severity: normal
File: /usr/bin/dh_strip
Since compat level 9, debhelper uses build-ID-based detached debug symbols,
which are normally A Good Thing.
However, if two packages contain the same private shared library or
loadable module, and it's 100% reproducible, it can end up with the same
build-ID, causing those packages' detached debug symbols to collide.
One place where this legitimately happens is gnome-documents and
gnome-books, which both contain a copy of the libgd "copylib" (not to
be confused with the libgd2 graphics library, which is unrelated).
libgd is not API-stable, so a system-wide shared copy is undesirable
(and is not required by Debian Policy ยง4.13, because it is "explicitly
intended to be used in this way"). Normally the copy bundled with a
dependent project would be statically linked into the dependent project,
but gnome-documents and gnome-books are written in JavaScript and use
GObject-Introspection to call into libgd, which means it has to be built
as a shared library. Each app installs its copy into a separate private
library directory, which works fine.
At the moment gnome-documents and gnome-books happen to have identical
libgd source code, although this is by no means guaranteed in future
releases. They are built into binaries that differ, but the build-ID is
identical (presumably the code they contain doesn't differ in any way
that matters for debugging), so -documents-dbgsym and -books-dbgsym
have an undeclared conflict and cannot be co-installed. For now I'm
probably going to work around this by disabling the automatic debug
symbols packages.
Another place where I've seen this happen is that openarena and
openarena-server both ship the "game rules" for OpenArena, qagame*.so,
which is a dlopen()'d loadable module. This is duplication, but
I don't really want to bloat the Packages file by separating out an
openarena-common package to save 800K of installed size, particularly when
that's insignificant next to the 400M+ game data. I worked around this
by building a separate server-side qagame*.so with a different version
number string (0.8.8+dfsg-4/Debian/server vs. 0.8.8+dfsg-4/Debian)
and otherwise identical contents.
Possible solutions:
* perturb the build-ID somehow, similar to my workaround with the
(user-facing) version number string in openarena-server;
* in dh_strip, make it possible to go back to path-based filenames in
/usr/lib/debug;
* in dpkg, extend the reference-counting for identical files in
Multi-Arch: same packages to cover any identical file;
* deploy detached debug symbols in a way that is not dpkg-based
Any ideas?
Thanks,
smcv