You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From what I see the magic.gz file which is included into the simplemagic.jar is outdated.
It was originally copied from CentOS and looks like you are updating it manually instead of copy it from the fresh /etc/magic.
Even more, the /etc/magic file is not present anymore on the current Linux distributions.
The MIME db file is part of the file utility which migrated to libmagic and changed the directories layout.
First of all the MIME types DB is located in the file's directory magic/Magdir. Then it's compiled to /usr/share/file/magic.mgc file.
Maybe MacOS or some FreeBSD still have the /etc/magic file but I don't think so.
So, here is few things:
It doesn't make any sense to mention the non existing /etc/magic file anymore or we have to mention that it may be absent.
It would be great to parse the compiled magic.mgc file instead and replace the internal magic.gz with the magic.mgc.
Even if we can't parse the compiled magic.mgc then at least we can update magic db from the actual magic/Magdir which is constantly updated.
I tried to use archive and compress files from the magic/Magdir but some entries are failed to parse. This means that their format is more advanced and the simplemagic should be adjusted.
I found the same when trying to use latest version of "archive" and "cafebabe" magic files.
The parser barfs at types name and use, which are perhaps added to the file format standard at a later time.
From what I see the
magic.gz
file which is included into thesimplemagic.jar
is outdated.It was originally copied from CentOS and looks like you are updating it manually instead of copy it from the fresh
/etc/magic
.Even more, the
/etc/magic
file is not present anymore on the current Linux distributions.The MIME db file is part of the file utility which migrated to libmagic and changed the directories layout.
First of all the MIME types DB is located in the file's directory magic/Magdir. Then it's compiled to
/usr/share/file/magic.mgc
file.Maybe MacOS or some FreeBSD still have the
/etc/magic
file but I don't think so.So, here is few things:
/etc/magic
file anymore or we have to mention that it may be absent.magic.mgc
file instead and replace the internalmagic.gz
with themagic.mgc
.magic.mgc
then at least we can update magic db from the actualmagic/Magdir
which is constantly updated.archive
andcompress
files from themagic/Magdir
but some entries are failed to parse. This means that their format is more advanced and thesimplemagic
should be adjusted.magic.mgc
file is more than 5mb which is quite a lot it is worth to consider Slim version without internal config files #63The text was updated successfully, but these errors were encountered: