.. _blueprint-debuginfod-server:

=================
debuginfod server
=================

Related issue: :issue:`Provide debuginfod server <957>`

Most of the debuginfod work is implemented.  See
:artifact:`debian:debug-symbols`, :collection:`debian:suite`,
:collection:`debian:archive`, :task:`Sbuild`,
:workflow:`package_publish`, :ref:`package-repositories`, and
:ref:`use-debuginfod-with-gdb`.

This blueprint retains only remaining design that is not implemented yet.

Archive option to control debug-symbol builds
=============================================

The :collection:`debian:archive` collection should expose a per-archive
configuration option (similar to Launchpad's ``build_debug_symbols``,
default ``true``) controlling whether debug symbols are extracted for that
archive.  When disabled, ``DEB_BUILD_OPTIONS=noautodbgsym`` should be passed
to sbuild to suppress ``-dbgsym`` package generation entirely.

Until this exists, extraction always runs when a ``-dbgsym`` package is
present in the build output.

Possible future work
====================

These items were explicitly out of scope for the initial implementation and
remain unimplemented:

- **Source file serving** (``/buildid/<id>/source``): the
  :manpage:`debuginfod(8)` man page notes that, due to Debian and Ubuntu
  packaging policies, debuginfod often cannot resolve source files for
  ``.deb`` and ``.ddeb`` packages.  `debuginfod.debian.net has the same
  limitation <https://wiki.debian.org/Debuginfod#The_service_isn.27t_working.21__I_can.27t_download_the_source_code_while_debugging_a_package.21>`_.
- **Executable serving** (``/buildid/<id>/executable``):
  :artifact:`debian:binary-package` stores the whole ``.deb`` as a single
  file rather than broken-out binaries.
- **DWZ supplement ingestion**: ``-dbgsym`` packages built with DWZ
  compression ship a shared supplement under ``/usr/lib/debug/.dwz/``.
  Until those are ingested, requests for the supplement's build-ID return
  ``404``; debugging still works, but DWZ-using debug info may lack the
  alternate strings table.
- **Metrics** (``/metrics``), **metadata search** (``/metadata``), **IMA
  signatures**, and **upstream federation** to servers such as
  ``debuginfod.debian.net``.
