Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract *-dbginfo subpackages to debuginfod folder #25

Open
joebonrichie opened this issue Jan 22, 2024 · 2 comments
Open

Extract *-dbginfo subpackages to debuginfod folder #25

joebonrichie opened this issue Jan 22, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@joebonrichie
Copy link

For any new packages matching the -dbginfo.eopkg glob unzip and extract the .debug files to a configurable debuginfod folder.

When a debuginfod service is running this should be enough to get that working.

@joebonrichie joebonrichie added enhancement New feature or request good first issue Good for newcomers labels Jan 22, 2024
@Justinzobel
Copy link

I have set it up temporarily and it's ready to test. I can confirm by symbols existing and the download logs from the server that it's pulling the debug files.

Test procedure:

  1. In a terminal run sleep 60
  2. While that is running, in another terminal find the PID of that sleep process and do kill -QUIT $PID
  3. Then do: export DEBUGINFOD_URLS=http://shared.getsol.us:8002/;coredumpctl gdb $PID

@Justinzobel
Copy link

With an added note, we'll need to set up a system to keep the debug symbol files cleaned up when packages are removed from the repository.

My first though:

Ferryd does the extraction of the debug files into the folder:

# Extract eopkg
unzip -p *.eopkg install.tar.xz > install.tar.xz
# Extract data tarball
tar xf install.tar.xz
# Move *.debug to current directory
find usr -name "*.debug" -print0 | xargs -0 -I {} mv {} .
# Cleanup
rm -rf install.tar.xz usr/ *.eopkg

During this process it notes down all the *.debug files and assigns them to a package, it could be just a text file in the same directory that is called nano-5-1-dbginfo.eopkg and lists a.debug b.debug etc, or an sqlite database with fields of pkg and debugfiles and debugfiles is just a list of the filenames.

Then whatever tool is used to trim the repository of excess files also jumps into the debug symbols directory, and if xyz-dbginfo package is removed, it checks for a xyz-dbginfo file there, removes the filenames listed in it and then the file itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: Todo
Development

No branches or pull requests

2 participants