patch 4 debuginfod: symlink following mode

Mark Wielaard mark@klomp.org
Fri Nov 15 16:49:00 GMT 2019


Hi Frank,

On Thu, 2019-11-07 at 04:07 -0500, Frank Ch. Eigler wrote:
> From: "Frank Ch. Eigler" <fche@redhat.com>
> Date: Wed, 6 Nov 2019 18:53:31 -0500
> Subject: [PATCH 1/2] debuginfod 4: symbolic link traversal mode
> 
> In order to support file/rpm archives that are organized via symlink
> trees, add an "-L" option to debuginfod, meaning about the same as for
> find(1) or ls(1): to traverse rather than ignore symlinks.

Could you give an example of when exactly this is necessary?

I assume that it isn't really necessary for rpm archives, you probably
don't want to follow any symlinks from an archive that point to
something outside the archive, and you will see all files in the
archive anyway. So following symlinks doesn't seem helpful there.

Also why combine symlink following with cross-device searches?
Shouldn't that be separate options?

> --- a/tests/run-debuginfod-find.sh
> +++ b/tests/run-debuginfod-find.sh
> @@ -22,10 +22,11 @@ set -x
>  testfiles testfile-debuginfod-0.rpm testfile-debuginfod-1.rpm testfile-debuginfod-2.rpm
>  
>  DB=${PWD}/.debuginfod_tmp.sqlite
> +tempfiles $DB

> -########################################################################
> -
> -# Ensure debuginfod-find can be safely called with no arguments.
> -# Use a relative path to prevent automatic line breaks in the output
> -# due to excessive characters.
> -testrun_compare ../../debuginfod/debuginfod-find <<EOF
> -Usage: ../../debuginfod/debuginfod-find debuginfo BUILDID
> -  or:  ../../debuginfod/debuginfod-find executable BUILDID
> -  or:  ../../debuginfod/debuginfod-find source BUILDID /FILENAME
> -EOF
> -

This wasn't a very useful test, but did you really intend to remove it?

Cheers,

Mark



More information about the Elfutils-devel mailing list