Package: file Version: 4.26-1 Severity: normal
The magic file that is shipped does not include the mimetypes for files in OpenDocument Format. There are tests for these type of files and they do set the filetype but not the mimetype. The only mimetype included is that for OpenDocument Text files and nothing else. Example: $ file my.odt my.odt: OpenDocument Text $ file --mime my.odt my.odt: application/vnd.oasis.opendocument.text Compare this with the same thing on a spreadsheet: $ file my.ods my.ods: OpenDocument Spreadsheet $ file --mime my.odt my.ods: application/octet-stream All ODF files except OpenDocument Text files return "application/octet-stream" The attached patch adds mimetypes for all the OpenDocument Format filetypes. It also adds one missing filetype "OpenDocument Image Template" -- System Information: Debian Release: 5.0.1 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.25-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages libmagic1 depends on: ii libc6 2.7-18 GNU C Library: Shared libraries ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime libmagic1 recommends no packages. Versions of packages libmagic1 suggests: ii file 4.26-1 Determines file type using "magic" Versions of packages file depends on: ii libc6 2.7-18 GNU C Library: Shared libraries ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime -- no debconf information
--- magic.orig 2009-04-28 13:23:32.000000000 +0200 +++ magic 2009-04-28 13:13:01.000000000 +0200 @@ -1982,20 +1982,43 @@ >>>>>77 byte !0x2d Text !:mime application/vnd.oasis.opendocument.text >>>>>77 string -template Text Template +!:mime application/vnd.oasis.opendocument.text-template >>>>>77 string -web HTML Document Template +!:mime application/vnd.oasis.opendocument.text-web >>>>>77 string -master Master Document ->>>>73 string graphics Drawing +!:mime application/vnd.oasis.opendocument.text-master +>>>>73 string graphics +>>>>>81 byte !0x2d Drawing +!:mime application/vnd.oasis.opendocument.graphics >>>>>81 string -template Template ->>>>73 string presentation Presentation +!:mime application/vnd.oasis.opendocument.graphics-template +>>>>73 string presentation +>>>>>85 byte !0x2d Presentation +!:mime application/vnd.oasis.opendocument.presentation >>>>>85 string -template Template ->>>>73 string spreadsheet Spreadsheet +!:mime application/vnd.oasis.opendocument.presentation-template +>>>>73 string spreadsheet +>>>>>84 byte !0x2d Spreadsheet +!:mime application/vnd.oasis.opendocument.spreadsheet >>>>>84 string -template Template ->>>>73 string chart Chart +!:mime application/vnd.oasis.opendocument.spreadsheet-template +>>>>73 string chart +>>>>>78 byte !0x2d Chart +!:mime application/vnd.oasis.opendocument.chart >>>>>78 string -template Template ->>>>73 string formula Formula +!:mime application/vnd.oasis.opendocument.chart-template +>>>>73 string formula +>>>>>80 byte !0x2d Formula +!:mime application/vnd.oasis.opendocument.formula >>>>>80 string -template Template +!:mime application/vnd.oasis.opendocument.formula-template >>>>73 string database Database ->>>>73 string image Image +!:mime application/vnd.oasis.opendocument.database +>>>>73 string image +>>>>>78 byte !0x2d Image +!:mime application/vnd.oasis.opendocument.image +>>>>>78 string -template Template +!:mime application/vnd.oasis.opendocument.image-template # Zoo archiver 20 lelong 0xfdc4a7dc Zoo archive data

