Bug#830115: licensecheck invokes find with -follow

Sandro Mani manisandro at gmail.com
Wed Jul 6 07:56:36 UTC 2016


Package: licensecheck
Version: 3.0.1

Following is a trimmed version of the downstream bug at [1], already 
reported
for devscripts at [2].

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1350021
[2] http://bugs.debian.org/828088

Description of problem:
When licensecheck ran, it reported:

find: File system loop detected; ‘./src/giac’ is part of the same file 
system loop as ‘./src’.
Can't close(GLOB(0x668db0)) filehandle: '' at /usr/bin/licensecheck line 387

There are two bugs here: licensecheck tries to close a file handle on 
line 387
even when the handle is already closed due to find exiting with an 
error, and
licensecheck invokes find with the -follow option.

The find man page says that -follow is deprecated and -L should be used 
instead, by the way.
But I can't conceive of any situation where using -follow/-L is the 
right thing to do.
I think it should be removed, for three reasons.
Reason 1: self loops like the one in giac make find, and therefore 
licensecheck, fail.
Reason 2: symlinks can point anywhere.  Do you really want to let 
licensecheck run over arbitrary parts of the filesystem?
Reason 3: every file in a package *should* be reachable without 
traversing symlinks at all.  (If fedora-review doesn't have a check for 
that, it probably should.)

Steps to Reproduce:
1. mkdir loop
2. ln -s . loop/loop
3. licensecheck -r -v loop

Actual results:
The error messages reported above, and no license output.

Expected results:
A report on licenses.

Additional info:
The filesystem type might have something to do with this.  I do NOT see 
this behavior if I create the loop under /tmp (tmpfs), but I do see it 
if the loop is under my /home directory (ext4).



More information about the pkg-perl-maintainers mailing list