[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] Alert on unknown file: magic_file(...) failed: line 156
From: |
Michal Nowak |
Subject: |
Re: [Nano-devel] Alert on unknown file: magic_file(...) failed: line 156: regex error 10 |
Date: |
Sat, 13 Apr 2019 11:41:45 +0200 |
On 04/12/19 07:04 PM, Benno Schulenberg wrote:
Hello Michal,
Hi Benno,
Op 10-04-19 om 13:53 schreef Michal Nowak:
As OpenIndiana is based on from illumos an non-GNU operating system, and GNU is
now what's in many cases expected, in some cases functionality of the system are
delivered "twice".
So, e.g. we ship two magic.h headers, the former one from
https://github.com/file/file and the latter one from illumos:
usr/include/magic.h pkg:/library/address@hidden
usr/include/ast/magic.h pkg:/system/address@hidden
Maybe the illumos ast/magic.h was picked instead of the GNU one?
You could check by running:
strace -f make 2>TRAIL; grep magic.h TRAIL
But I don't think it matters which header gets used but which data files.
When I run:
strace src/nano README 2>TRAIL; grep magic TRAIL
and press ^X, it opened /etc/magic and /usr/share/misc/magic.mgc.
The first is empty apart from two comment lines, and the second
is filled with binary data. Possibly in your case it finds multiple
binary data files?
It seems to me that only /usr/share/misc/magic.mgc is taken into account:
stat("/export/home/newman/.magic.mgc", 0xFFFFFD7FFFDFF040) Err#2 ENOENT
stat("/export/home/newman/.magic", 0xFFFFFD7FFFDFF040) Err#2 ENOENT
open("/usr/share/misc/magic.mgc", O_RDONLY) = 3
fstat(3, 0xFFFFFD7FFFDFF120) = 0
mmap(0x00000000, 5408368, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) =
0xFFFFFD7FEEC00000
close(3) = 0
/usr/share/misc/magic.mgc is provided by the expected GNU file package:
$ pkg search /usr/share/misc/magic.mgc
INDEX ACTION VALUE PACKAGE
path file usr/share/misc/magic.mgc
pkg:/library/address@hidden
This is what the GNU `file` says about the file in question:
$ gfile file
file: ASCII text
This is what illumos `file` says about it:
$ file file
file: ascii text
Michal
I think going with --disable-libmagic is the best for us for now.
Sounds good.
Benno