public inbox for
 help / color / mirror / Atom feed
From: "rgoldber at redhat dot com" <>
Subject: [Bug debuginfod/29472] New: Support querying the debuginfod-server for metadata
Date: Thu, 11 Aug 2022 14:43:48 +0000	[thread overview]
Message-ID: <> (raw)

            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:
and should be referenced using {...}, noting that field names are case

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"
Will query all executables with the name /usr/bin/grep and might return the

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

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

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

             reply	other threads:[~2022-08-11 14:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11 14:43 rgoldber at redhat dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).