From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37712 invoked by alias); 13 Feb 2020 15:02:25 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 37664 invoked by uid 48); 13 Feb 2020 15:02:21 -0000 From: "fche at redhat dot com" To: elfutils-devel@sourceware.org Subject: [Bug debuginfod/25548] New: also support canonicalized source-file name lookups in webapi Date: Thu, 13 Feb 2020 15:02:00 -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: fche 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-SW-Source: 2020-q1/txt/msg00105.txt https://sourceware.org/bugzilla/show_bug.cgi?id=3D25548 Bug ID: 25548 Summary: also support canonicalized source-file name lookups in webapi Product: elfutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: debuginfod Assignee: unassigned at sourceware dot org Reporter: fche at redhat dot com CC: elfutils-devel at sourceware dot org, jan.kratochvil at redhat dot com, kkleine at redhat dot= com Target Milestone: --- It turns out that some debuginfo consumers canonicalize source-code file na= mes by the time they get the convenient chance to fall back to debuginfod. This means that path substrings that POSIX defines as no-ops are lost. debuginf= od should extend a gracious embrace to these tools by also permitting such pat= hs to be used during the /buildid/hexcode/source/PATH webapi. Implementing this should not be too hard. The dwarf_extract_source_paths c= ould add both waldo and a new canonicalize_posix_path(waldo) to the returned debug_sourcefiles[] set. That's it. The canonicalize_posix_path() function would perform these textual rewrites, repeating until convergence: /./ -> / /FOO/../ -> / # NB: FOO must not be . or .. because /../../ !=3D / // -> / (realpath(3) is not helpful because it looks at the host filesystem to do resolution, which we cannot when dealing with archive-resident file names.) --=20 You are receiving this mail because: You are on the CC list for the bug.