Re: Policy or best practices for debug packages?
On Mon, Jul 07, 2008 at 05:39:00PM +0200, Mike Hommey wrote:
> On Mon, Jul 07, 2008 at 10:56:14AM -0400, Theodore Tso <tytso@MIT.EDU> wrote:
> > True, although it means there's a bit more work to actually install
> > the source package, and then running "./debian/rules build" in order
> > to make sure the sources are unpacked and patches appropriately
> > applied. With Red Hat all you have to do is unpack the debuginfo
> > package, and the sources that were used to build the binaries are made
> > available with no muss and no fuss in
> > /usr/lib/debug/usr/src/<pkgname>". (And an obvious thing for Red Hat
> > to have done is to hack gdb to automatically figure out the location
> > of the source files, possibly by encoding it in the build-id ---
> > although I don't know if they have done it.0
I think they do this, using "debugedit". We (CodeSourcery) do it for
our libraries too. It's incredibly useful - but very spoiling; every
time I'm without the automatic debug sources and source paths I get
grumpy about it.
> There are 3 kind of people who need -dbg packages.
> - Users, when they are asked to provide proper backtraces in bug reports
> - Developers, when they need to debug stuff
> - Maintainers
> Obviously, the latter will be able to get the sources themselves, so do
> the second, most of the time, though the debian/rules patch thing might be
> a problem, especially when you need to install cdbs or some other stuff to
> get it working (only to apply dumb patches, d'uh).
There are a number of other complications. One of them is generated
files; you need to extract some sources from the object directory.
Another is manual setup of paths. GDB's recently added set
substitute-path command makes this easier than it used to be, but it's
still a hassle.
I wouldn't want them in the archive for everything, but it would be
nice to be able to generate automatically usable source packages.
Also debug packages without having to create them in debian/control
and debian/rules. That would enable build daemons to generate and
stash the packages somewhere if we decide to make them available.