ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Anton Gorlov <stalker@altlinux.ru>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: [devel] обновление mime-database
Date: Tue, 21 Feb 2012 12:58:05 +0400
Message-ID: <4F435C9D.4090607@altlinux.ru> (raw)

Есть предложение немного обновить mime-database, так как сейчас на файлы 
mkv оно выдаёт
  file --mime-type test.mkv
test.mkv: application/octet-stream



почитав http://www.matroska.org/  получились следующие изменения

[root@flashback file]# diff -uN magic_ magic
--- magic_      2011-07-14 16:29:34.000000000 +0400
+++ magic       2012-02-21 12:44:45.000000000 +0400
@@ -9335,11 +9335,21 @@
  #

  # EBML id:
-0              belong          0x1a45dfa3
+0               belong          0x1a45dfa3
  # DocType id:
->5             beshort         0x4282
+>0              search/4096     \x42\x82
  # DocType contents:
->>8            string          matroska        Matroska data
+>>&1            string          matroska        Matroska data
+!:mime  video/x-matroska
+
+# EBML id:
+0               belong          0x1a45dfa3
+# DocType id:
+>0              search/4096     \x42\x82
+# DocType contents:
+>>&1            string          webm    WebM
+!:mime  video/webm
+


file --mime-type /opt/1/test.mkv
/opt/1/test.mkv: video/x-matroska



так же заметил что всеми любимый  php и вовсе не юзает mime-database 
(даже  в стрейсе не видно попыток открыть базу если специально не 
попросить об  этом) хотя по документации php по дефолту должен брать 
инфу из /usr/share/misc/magic

Name of a magic database file, usually something like 
/path/to/magic.mime. If not specified, the MAGIC environment variable is 
used. If this variable is not set either, /usr/share/misc/magic is used 
by default. A .mime and/or .mgc suffix is added if needed.

Passing NULL or an empty string will be equivalent to the default value.



             reply	other threads:[~2012-02-21  8:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-21  8:58 Anton Gorlov [this message]
2012-02-21  9:13 ` Anton Gorlov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F435C9D.4090607@altlinux.ru \
    --to=stalker@altlinux.ru \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git