The libdebuginfod package ships a profile.d script that reads
/etc/debuginfod/*.urls files, but that mechanism doesn't work on
Duranium because users can install gdb via coldbrew and coldbrew's
bubblewrap sandbox doesn't bind-mount the host's /etc so any .urls file
on the host is invisible inside the sandbox. I considered addign this to
the dev-tools sysext, but coldbrew is always installed and making users
install a sysext just to set a variable when they're already able to
install gdb via coldbrew didn't seem like great UX
Setting the environment variable via a profile.d script works for both
mutable pmOS and Duranium since the host's login shell sources it, and
coldbrew inherits the host's environment. I considered using a .urls
file for mutable pmOS but that would require adding a subpkg with an
`install_if=libdebuginfod` AND a profile.d thing like this for duranium,
so just adding a single profile.d file for both seemed a lot simpler
even if it's ignoring libdebuginfod's existing profile.d mechanism.
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9468>