From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9CC133856DDA; Thu, 11 Aug 2022 14:43:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9CC133856DDA From: "rgoldber at redhat dot com" To: elfutils-devel@sourceware.org Subject: [Bug debuginfod/29472] New: Support querying the debuginfod-server for metadata Date: Thu, 11 Aug 2022 14:43:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: debuginfod X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rgoldber at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Aug 2022 14:43:48 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29472 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 meta= data matching certain conditions. This would allow for operations like seeing wh= at 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: `( ) =3D !=3D < > <=3D >=3D && ||` operators, following the standa= rd 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 chara= cter escapes for new=E2=80=90 lines, tabs, and other special characters (not including \0)) and printf(3) type formatters. In=20 place of the type specifier in the format string, use the debuginfod-field = you wish to query. For example: debuginfod-find metadata "{FILENAME}=3D/usr/bin/grep && {TYPE}=3DE" "{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}=3D/bin/bash" "{FILENAME}-{TYPE}\n" Might return /bin/bash-E /bin/bash-S /bin/bash-D --=20 You are receiving this mail because: You are on the CC list for the bug.=