-
-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
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/magicfile anymore or we have to mention that it may be absent. - It would be great to parse the compiled
magic.mgcfile instead and replace the internalmagic.gzwith themagic.mgc. - Even if we can't parse the compiled
magic.mgcthen at least we can update magic db from the actualmagic/Magdirwhich is constantly updated. - I tried to use
archiveandcompressfiles from themagic/Magdirbut some entries are failed to parse. This means that their format is more advanced and thesimplemagicshould be adjusted. - The
magic.mgcfile is more than 5mb which is quite a lot it is worth to consider Slim version without internal config files #63
Metadata
Metadata
Assignees
Labels
No labels