[File] Building a specific version of magic.mgc ?

Christos Zoulas christos at zoulas.com
Tue Jun 1 15:06:22 UTC 2021


You need to copy the latest magic definitions into the source tree of the file version you need to use them with and build the magic.mgc file there.
If it complains about syntax, you can comment out the entries the older version of file does not like.

Best,

christos

> On Jun 1, 2021, at 10:58 AM, Frédéric Nass <frederic.nass at univ-lorraine.fr> wrote:
> 
> Hello,
> 
> Is it possible to use the latest magic.mgc definitions (downloaded and built from the Github repository) with an older file, lets say file v5.33 from RHEL 8 ?
> 
> I built file magic.mgc with git clone https://github.com/file/file && cd file && autoreconf -f -i && ./configure --disable-silent-rules && make -j4 but when I try to use it with file v5.33 it says:
> 
> $ file -m ./magic/magic.mgc /tmp/test.pptx
> file: File 5.33 supports only version 14 magic files. `./magic/magic.mgc' is version 16 (No such file or directory)
> 
> Is it possible to built a specific version of magic.mgc based on the latest definitions?
> 
> Best regards,
> 
> Frédéric.
> 
> --
> Cordialement,
> 
> Frédéric Nass
> 
> Direction du Numérique
> Sous-Direction Infrastructures et Services
> Université de Lorraine.
> 
> --
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/file/attachments/20210601/d13a3637/attachment.asc>


More information about the File mailing list