Re: linking binfmt_misc with mime-types
On Tue, Oct 05, 1999 at 08:50:29PM +1000, Brian May wrote:
> This is getting a bit off the original thread...
Just a little ;)
> IMHO, any magic type of database, is a "hacked" solution.
As long as the maguc type is based on the content of the file, it works
rather well. As we don't need a full classification, but only for those fies
we actually will execute, there will hardly be confusion about this.
> What I really would like is a filesystem that can store a mime-type for
> every file... That way no magic databases are required.
That's a nice idea. Where we are at it, we should also store the package
information for a file, so we don't have an external database
(var/lib/dpkg/info) for this. It would also speed up the dpkg -S command
> In addition, the
> kernel could be configured to assign default mime-types for different
> file extensions, or something.
You say a magic type database is a hack, and on the other hand file
exetensions are a better indicator? Phew. Microsoft uses file extension
(".tgz file" if it can't recognize). I think examining the content is a
much better strategy.
> This would mean instead of having lots of different programs trying
> to determine file types (each with a very different method - some use
> extensions, others use magic databases or a combination of the two).
Mmh. I like to think of the file utility as the standard reference. I didn't
knew about any other such databases. That apache uses file extensions is
bad, but it's reasonable for a browser which only serves a well defined set
> Programs like Apache wouldn't have to work out the mime type from the
> extension, but could just look at the value given by the filesystem.
> Changing the mime-type for one file would automatically effect
> all programs.
Yep. For this and other stuff (package managment) a filesystem which can
store arbitrary metadata would be nice.
`Rhubarb is no Egyptian god.' Debian http://www.debian.org Check Key server
Marcus Brinkmann GNU http://www.gnu.org for public PGP Key
Marcus.Brinkmann@ruhr-uni-bochum.de, firstname.lastname@example.org PGP Key ID 36E7CD09