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.