Bug#940222: libmagic1: wrong video detection

2020-04-26 Thread Christoph Biedl
Control: tags 940222 -moreinfo +confirmed
Control: severity 940222 important

Paolo Benvenuto wrote...

> I have an .avi file on a debian server. The file command reports a wrong 
> result:
> 
> $ file -i myfile.avi
> myfile.avi: image/x-tga; charset=binary
> 
> I get the same mime type with python3 and magic.from_file().
> 
> However, the same file on my ubuntu pc (rsynced) is correctly reported as a 
> video:
> 
> $ file -i myfile.avi 
> myfile.avi: video/mpeg; charset=binary

With the help of the reproducer: This is a regression introduced[1]
upstream between 5.32 and 5.33, and fixed[2] between 5.36 and 5.37.
Mapping to distributions, this exists in Debian 10 ("buster") and
Ubutunu (not checked) 19.04 and 19.10.

About Debian 10, this warrants a fix via a point release. Scheduled.

> Weirdly , nautilus sees it correctly as a video (doesn't it use the same 
> libmagic1 library?).

Possibly nautilus uses

| shared-mime-info - FreeDesktop.org shared MIME database and spec

which - if memory serves me right - is a different implementation.

Christoph

[1] FILE5_32-72-g8e6127de
[2] FILE5_36-4-gd75e8878


signature.asc
Description: PGP signature


Bug#940222: libmagic1: wrong video detection

2019-09-18 Thread Christoph Biedl
Control: tags 940222 moreinfo

Paolo Benvenuto wrote...

> I have an .avi file on a debian server. The file command reports a wrong 
> result:
>
> $ file -i myfile.avi
> myfile.avi: image/x-tga; charset=binary
>
> I get the same mime type with python3 and magic.from_file().
>
> However, the same file on my ubuntu pc (rsynced) is correctly reported as a 
> video:
>
> $ file -i myfile.avi
> myfile.avi: video/mpeg; charset=binary

Before digging further, could you please submit the version number of
file of that Ubuntu installation?

Regards,

Christoph


signature.asc
Description: PGP signature


Bug#940222: libmagic1: wrong video detection

2019-09-14 Thread Paolo Benvenuto
Package: file
Version: 1:5.35-4
Severity: normal

Dear Maintainer,

I have an .avi file on a debian server. The file command reports a wrong result:

$ file -i myfile.avi
myfile.avi: image/x-tga; charset=binary

I get the same mime type with python3 and magic.from_file().

However, the same file on my ubuntu pc (rsynced) is correctly reported as a 
video:

$ file -i myfile.avi 
myfile.avi: video/mpeg; charset=binary

Weirdly , nautilus sees it correctly as a video (doesn't it use the same 
libmagic1 library?).



-- System Information:
Debian Release: 10.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-5-amd64 (SMP w/12 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), 
LANGUAGE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libmagic1 depends on:
ii  libc6 2.28-10
ii  libmagic-mgc  1:5.35-4
ii  zlib1g1:1.2.11.dfsg-1

libmagic1 recommends no packages.

Versions of packages libmagic1 suggests:
ii  file  1:5.35-4

Versions of packages file depends on:
ii  libc6   2.28-10
ii  zlib1g  1:1.2.11.dfsg-1

-- no debconf information