[arch-dev-public] Debug packages for Arch Linux

Brett Cornwall ainola at archlinux.org
Sat Feb 5 05:31:49 UTC 2022


On 2022-02-04 13:49, Jelle van der Waa via arch-dev-public wrote:
>Hey all,
>
>On 30/01/2022 12:08, Morten Linderud via arch-dev-public wrote:
>>I'm very happy to announce that debug packages in Arch Linux has been deployed :)
>>
>>This work began after FOSDEM 2020 and was announced in November 2020. However
>>because of time constraints it took quite a while before we managed to deploy
>>it.
>>
>>Currently we have a debuginfod service which is capable of delivering source
>>listings and debug symbols to users with gdb, delve and other debuggers. This
>>can be enabled by installing the `debuginfod` package and setting the
>>environment variable `DEBUGINFOD_URLS="https://debuginfod.archlinux.org"`. The
>>`debuginfod` package is also going to be providing this variable :)
>>
>>The debug package repositories themself are not publicly accessible nor
>>distributed to our mirrors. This is because there is a general concern around
>>the repository size increase. The goal is to take a look at distributing them
>>and/or making them accessible in the future.
>>
>>Packages are being rebuilt for debug symbols where deemed needed by the packager
>>and I suspect we should have a discussion around enabling the debug option by
>>default or not. However see the section below around creating debug packages as
>>there are some caveats of the current approach.
>>
>>I have added some links to the work that has been done to accomplish all of this
>>at the bottom of this email.
>
>There are two questions which keep popping up around debug packages so 
>I thought it would be good to answer them here.
>
>* How do I create a debug package?
>
>Add 'debug' to the options array in your PKGBUILD, bump pkgrel and 
>rebuild. This should result into a debug package based on the 
>'pkgbase' of the package/PKGBUILD so for linux it ends up creating 
>linux-debug-$pkgver-$pkgrel.tar.zst.
>
>* How do I verify if the debug package is generated correctly?
>
>After installing the debug package, gdb $binary should reveal:
>
>[jelle at t14s][~]%gdb /usr/bin/cryptsetup
>Reading symbols from /usr/bin/cryptsetup...
>Reading symbols from /usr/lib/debug/usr/bin/cryptsetup.debug...
>
>Apart from that the debug package should not contain any other paths 
>then /usr/lib/debug and /usr/src/debug. Ideally namcap would print a 
>warning when this is not the case.
>
>Hope this helps,
>
>Jelle van der Waa

Thanks for the tl;dr rundown, Jelle.

This is very, very easy to do. All who worked on this should be very 
proud - this new functionality is like magic.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/arch-dev-public/attachments/20220204/e965640c/attachment.sig>


More information about the arch-dev-public mailing list