[R-pkg-devel] Executable file warning in CRAN check
@eb@meyer @end|ng |rom |@u@de
Tue Apr 9 10:17:09 CEST 2019
Let's look at the check_executables() function inside
[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
> magic file from /etc/magic:/usr/share/misc/magic
$ 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.
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.
> 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.
>> Am 08.04.19 um 23:02 schrieb Travers Ching:
>>> I see the following warning on CRAN:
>>> Result: WARN
>>> Found the following executable file:
>>> Source packages should not contain undeclared executable files.
>>> See section ‘Package structure’ in the ‘Writing R Extensions’ manual.
>>> 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?
>>> R-package-devel using r-project.org mailing list
>> R-package-devel using r-project.org mailing list
More information about the R-package-devel