diff options
author | Frank Ch. Eigler <fche@redhat.com> | 2023-04-11 23:35:25 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@redhat.com> | 2023-04-12 16:29:34 -0400 |
commit | 64242dcba918ae33dcefed495783bbe8c032f9d2 (patch) | |
tree | 1528ce14b189ebb2f5e8edb8cd005d31dd85cace /debuginfod/ChangeLog | |
parent | 6e9718089b05403947d8255423a849d425305925 (diff) | |
download | elfutils-64242dcba918ae33dcefed495783bbe8c032f9d2.tar.gz |
PR29472: debuginfod: add metadata query webapi, C api, clientusers/fche/try-pr29472e
This patch extends the debuginfod API with a "metadata query"
operation. It allows clients to request an enumeration of file names
known to debuginfod servers, returning a JSON response including the
matching buildids. This lets clients later download debuginfo for a
range of versions of the same named binaries, in case they need to to
prospective work (like systemtap-based live-patching). It also lets
server operators implement prefetch triggering operations for popular
but slow debuginfo slivers like kernel vdso.debug files on fedora.
Implementation requires a modern enough json-c library.
% debuginfod-find metadata file /bin/ls
% debuginfod-find metadata glob "/usr/local/bin/c*"
Documentation and testing are included.
Signed-off-by: Ryan Goldberg <rgoldber@redhat.com>
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
Diffstat (limited to 'debuginfod/ChangeLog')
-rw-r--r-- | debuginfod/ChangeLog | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index f13c28d5..ac3fd6aa 100644 --- a/debuginfod/ChangeLog +++ b/debuginfod/ChangeLog @@ -1,3 +1,26 @@ +2023-04-12 Ryan Golberg <rgoldberg@redhat.com>, Frank Ch. Eigler <fche@redhat.com> + + PR29472: debuginfod metadata query + * Makefile.am: Add json-c usage. + * debuginfod-client.c (debuginfod_find_metadata): New function. + (handle_data): New fields to hold metadata being received. + (debuginfod_clean_cache): Clean metadata too. + (header_callback): Simplify to realloc only. + (metadata_callback): New function. + (init_server_urls, init_handle, perform_queries, make_cache_path): + New refactored functions. + (debuginfod_query_server_by_buildid): Renamed, refactored. Update + callers. + * debuginfod-find.c (main): Handle metadata queries. + * debuginfod.cxx (DEBUGINFOD_SQLITE_DDL): Add an index or two. + (metadata_maxtime_s, parse_opt): New parameter for load control. + (add_client_federation_headers): New refactored function. + (handle_metadata): New function. + (handler_cb): Call it for /metadata URL. Trace it. + (groom): Tweak sqlite_ps object lifetimes. + * debuginfod.h.in (debuginfod_find_metadata): New decl. + * libdebuginfod.map: Export it under ELFUTILS_0.190. + 2023-03-30 Jan Alexander Steffens (heftig) <heftig@archlinux.org> * debuginfod-client.c (update_atime): New function. |