The package mime-support
is installed by default on Debian
systems. It has two roles: first to provide the file /etc/mime.types
that
associates media types (formerly called MIME types) to suffixes of file
names, and second to provide the
mailcap system that associates
media types with programs. I adopted this package at the
end of the development cycle of Wheezy.
Changes since Wheezy.
The version distributed in Jessie brings a few additions in
/etc/mime.types
. Among them,
application/vnd.debian.binary-package
and
text/vnd.debian.copyright
,
which as their name suggest describe two file formats designed by Debian. I
registered these types to the
IANA,
which is more open to the addition of new types since the
RFC 6838.
The biggest change is the automatic extraction of the associations between
programs and media types that are declared in the menu files in FreeDesktop
format.
Before, it was the maintainer of the Debian package who had to extract this
information and translate it in mailcap format by hand. The automation is
done via dpkg
triggers.
A big thank you to Kevin Ryde who gave me a precious help for the
developments and corrections to the run-mailcap
program, and to all the
other
contributors.
Your help is always welcome!
Security updates.
In December, Debian has been contacted by Timothy D. Morgan, who found that
an attacker could get run-mailcap
to execute commands by inserting them in
file names
(CVE-2014-7209).
This first security update for me went well, thanks to the help and
instructions of Salvatore Bonaccorso from the Security team. The problem is
solved in Wheezy, Jessie and Sid, as well as in Squeeze through its
long term support.
One of the consequences of this security update is that run-mailcap
will
systematically use the absolute path to the files to open. For harmless
files, this is a bit ugly. This will perhaps be improved after Jessie is
released.
Future projects
The file /etc/mime.types
is kept up to date by hand; this is slow and
inefficient. The package shared-mime-info
contains similar
information, that could be used to autogenerate this file, but that would
require to parse a XML source that is quite complex. For the moment, I am
considering to import Fedora's
mailcap
package, where
the file /etc/mime.types
is very well kept up to date. I have not yet
decided how to do it, but maybe just by moving that file from one package to
the other. In that case, we would have the mime-support
package that
would provide mailcap
support, and the package whose source is Fedora's
mailcap
package who would provide /etc/mime.types
. Perhaps it will be
better to use clearer names, such as mailcap-support
for the first and
media-types
for the second?
Separating the two main functionalities of mime-support
would have an
interesting consequence: the possibility of not installing the support for
the mailcap system, or to make it optional, and instead to use the
FreeDesktop sytem (xdg-open
), from the package xdg-utils
.
Something to keep in mind...