public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug debuginfod/29472] New: Support querying the debuginfod-server for metadata
@ 2022-08-11 14:43 rgoldber at redhat dot com
  2022-08-12  9:05 ` [Bug debuginfod/29472] " mliska at suse dot cz
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: rgoldber at redhat dot com @ 2022-08-11 14:43 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=29472

            Bug ID: 29472
           Summary: Support querying the debuginfod-server for metadata
           Product: elfutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: debuginfod
          Assignee: unassigned at sourceware dot org
          Reporter: rgoldber at redhat dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

It would be beneficial to be able to query a debuginfod-server for its metadata
matching certain conditions. This would allow for operations like seeing what
executable files are available without attempting to download them or seeing
which files are larger than a certain size, which could be used to
prefetch+cache large required files, before the user needs them.

The proposed format is as follows:
debuginfod-find [OPTION]... metadata CONDITION QUERYFMT

Query all of the metadata matching the given CONDITION and return it as
described by QUERYFMT

The supported debuginfod-fields are:
    BUILDID, FILENAME, MODIFIED_TIME, SIZE, TYPE, SOURCE_TYPE, SOURCE
and should be referenced using {...}, noting that field names are case
insensitive.

CONDITION is a boolean expression composed of debuginfod-fields, constants
(strings and integers)
and the: `( ) = != < > <= >= && ||` operators, following the standard
conditional precedence order

QUERYFMT is a modified version of the standard printf(3) formatting.
The format is made up of static strings (which may include standard C character
escapes for new‐
lines, tabs, and other special characters (not including \0)) and printf(3)
type formatters. In 
place of the type specifier in the format string, use the debuginfod-field you
wish to query.

For example:

debuginfod-find metadata "{FILENAME}=/usr/bin/grep && {TYPE}=E"
"{FILENAME}({BUILDID})\t{SOURCE_TYPE}\n"
Will query all executables with the name /usr/bin/grep and might return the
following

/usr/bin/grep(90e7d8894b94f47ad17722ff8658f833f329b035)    R
/usr/bin/grep(e81e4e6e322030178260ae4f6055f781cd4997e1)    F

debuginfod-find metadata "{FILENAME}=/bin/bash" "{FILENAME}-{TYPE}\n"
Might return
/bin/bash-E
/bin/bash-S
/bin/bash-D

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-03-01 23:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-11 14:43 [Bug debuginfod/29472] New: Support querying the debuginfod-server for metadata rgoldber at redhat dot com
2022-08-12  9:05 ` [Bug debuginfod/29472] " mliska at suse dot cz
2022-08-12  9:05 ` mliska at suse dot cz
2022-08-22 18:24 ` rgoldber at redhat dot com
2022-08-31 14:52 ` rgoldber at redhat dot com
2022-09-02 17:25 ` rgoldber at redhat dot com
2022-11-01 14:23 ` PATCH: Bug debuginfod/29472 followup Frank Ch. Eigler
2022-11-01 22:20   ` Mark Wielaard
2022-11-10 17:12     ` Frank Ch. Eigler
2023-03-01 23:32       ` Mark Wielaard
2023-02-28 22:21 ` [Bug debuginfod/29472] Support querying the debuginfod-server for metadata mark at klomp dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).