[R-pkg-devel] Executable file warning in CRAN check

Sebastian Meyer @eb@meyer @end|ng |rom |@u@de
Tue Apr 9 10:17:09 CEST 2019


Let's look at the check_executables() function inside
tools:::.check_packages()
[https://svn.r-project.org/R/trunk/src/library/tools/R/check.R]. If the
'file' program is available on the check system, the check for
executable files is based on what 'file' thinks about each file in the
source package. R CMD check essentially scans for the term " executable"
in the output from 'file'.

The check result therefore depends on the version of 'file' (and on the
involved "magic number file") used on the check system. On my system with

$ file --version
> file-5.25
> magic file from /etc/magic:/usr/share/misc/magic

I get

$ file src/LZ4/LICENSE
> src/LZ4/LICENSE: ASCII text

so no complaint about that file from R CMD check.

It seems that the version of 'file' used on CRAN's macOS check platforms
returns something "executable" for that ASCII file, probably because the
executable bit is set.

To answer your initial question, I don't think there's anything you need
to do on your end.

Cheers,

	Sebastian


Am 09.04.19 um 00:56 schrieb Travers Ching:
> Thanks Sebastian, I'll give it a shot.  It seems weird that I can't
> replicate the warning on a mac laptop, or any other system.
> 
> Travers
> 
> On Mon, Apr 8, 2019 at 2:27 PM Sebastian Meyer <seb.meyer using fau.de> wrote:
>>
>> No false positive. This file is indeed marked as an executable file, see
>> also at https://github.com/cran/qs/blob/0.14.1/src/LZ4/LICENSE, which says
>>
>>> Executable File | 25 lines (20 sloc) | 1.28 KB
>>
>> On a Unix-based system you could do
>>
>>> chmod -x src/LZ4/LICENSE
>>
>> to remove the executable bit from that file.
>>
>> Cheers,
>>
>>         Sebastian
>>
>>
>> Am 08.04.19 um 23:02 schrieb Travers Ching:
>>> I see the following warning on CRAN:
>>>
>>> Result: WARN
>>>     Found the following executable file:
>>>      src/LZ4/LICENSE
>>>     Source packages should not contain undeclared executable files.
>>>     See section ‘Package structure’ in the ‘Writing R Extensions’ manual.
>>> https://cran.r-project.org/web/checks/check_results_qs.html
>>>
>>> This seems like a false positive since it's clearly not an executable,
>>> but I'm wondering if there's anything I should do on my end?
>>>
>>> Travers
>>>
>>> ______________________________________________
>>> R-package-devel using r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>>>
>>
>> ______________________________________________
>> R-package-devel using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list