Re: Added hundreds of media types to /etc/mime.types

2021-01-15 Thread Charles Plessy
Hi Helmut, and everybody,

I have just uploaded media-types 4.0.0, which I hope removes all
regressions regarding duplicated file extensions in the `application/`
types.

Interestingly, there has been duplicates in our `mime.types` file for a
long time, but never within the `application/` type.  Several subtypes
are listed under both `text/` and `application/`, for instance `x-sh`.
I have left this unchanged as we are close to the release.

The changes I made are described in `debian/changelog` of course, and
I also kept a record of the cases where an arbitrary decision is needed
in the source package's `README.md` file.

https://salsa.debian.org/debian/media-types/-/blob/4.0.0/debian/changelog

https://salsa.debian.org/debian/media-types/-/blob/master/README.md

Le Mon, Jan 11, 2021 at 08:23:24AM +0100, Helmut Grohne a écrit :
> 
> That still leaves the question of why extensions suddenly are case
> sensitive (another regression of media-types) even though most consumers
> treat them as case insensitive. Alexandre Duret-Lutz filed #979554 to
> that end and we're still waiting for a response from Charles.

Earlier release of Debian already shipped a `mime.types` file with
upper-case file extension, so I think that their presence is not a
regression, although I agree that it might be a problem.  I propose
to resolve that in the next release.

Have a nice day,

Charles

-- 
Charles Plessy Nagahama, Yomitan, Okinawa, Japan
Debian Med packaging team http://www.debian.org/devel/debian-med
Tooting from work,   https://mastodon.technology/@charles_plessy
Tooting from home, https://framapiaf.org/@charles_plessy



Re: Added hundreds of media types to /etc/mime.types

2021-01-10 Thread Andrius Merkys
On 2021-01-09 01:22, Charles Plessy wrote:
> In the latest CI log of lighttpd on amd64, there is:
> 
> defconfigFAIL stderr: Duplicate mimetype: '.sdf' => 
> 'application/vnd.stardivision.math' (already have 'application/vnd.Kinar'), 
> merging to 'application/octet-stream'
> 
> Unfortunately, `sdf` is a legitimate extension for both media types.  I
> see that /usr/share/lighttpd/create-mime.conf.pl already has a section
> for resolving such conflicts, so I think that the best solution is
> to implement a choice in this script.

In /etc/mime.types, 'sdf' is also mentioned as an extension for
'chemical/x-mdl-sdfile'. I wonder why this is not reported as a conflict?

Andrius



Re: Added hundreds of media types to /etc/mime.types

2021-01-10 Thread Helmut Grohne
Hi Simon,

(Please continue Ccing light...@packages.debian.org)

On Sat, Jan 09, 2021 at 12:14:20AM +, Simon McVittie wrote:

Mit freundlichen Grüßen

Dipl.-Inf. Helmut Grohne
Research and Development
Application Engineering

Phone: +49 (371) 24354 0 | Fax:  +49 (371) 24354 020
helmut.gro...@intenta.de | https://www.intenta.de

Intenta GmbH ∙ Ahornstraße 55 ∙ 09112 Chemnitz, Germany
Managing Director: Dr.-Ing. Basel Fardi ∙ VAT/USt-IdNr.: DE 275745394
Commercial register: HRB 26404 Amtsgericht Chemnitz



> On Sat, 09 Jan 2021 at 08:22:26 +0900, Charles Plessy wrote:
> > I ran /usr/share/lighttpd/create-mime.conf.pl and only had duplicate
> > warnings, that do not cause errors (the scripts returns 0).
> ...
> > In the latest CI log of lighttpd on amd64, there is:
> > 
> > defconfigFAIL stderr: Duplicate mimetype: '.sdf' => 
> > 'application/vnd.stardivision.math' (already have 'application/vnd.Kinar'), 
> > merging to 'application/octet-stream'
> 
> By default, autopkgtest considers any output on stderr to be a failure,
> so warnings will make this test fail, unless it's marked with
> Restrictions: allow-stderr.
> 
> lighttpd maintainers: please consider whether it should be considered to
> be a pass or a fail if this particular test has output on stderr but
> exits 0? If it should pass, please add Restrictions: allow-stderr.

Yes, this is the purpose of the test: It shall ensure that a lighttpd
that uses a default configuration starts without any warnings or errors.

We've considered adding allow-stderr already, but doing so would also
hide other problems that this test is supposed to catch.

I note that this change in media-types consitutes a regression. It used
to be free of duplicates (which is why the autopkgtest previously
passed). Charles' reasoning that this property cannot be hold up for
vendor extensions makes sense. For that reason Glenn Strauss has
implemented a change where duplicates on vendor types will be silently
merged to application/octet-stream. The change is pending an upload.

That still leaves the question of why extensions suddenly are case
sensitive (another regression of media-types) even though most consumers
treat them as case insensitive. Alexandre Duret-Lutz filed #979554 to
that end and we're still waiting for a response from Charles.

For these reasons, I think that media-types is rightly blocked from
migrating to testing by lighttpd's autopkgtest. We strongly suggest that
media-types itself adds unit tests to its own build to ensure some level
of sanity on the data it provides:
 * Disregarding the vendor space, extensions should be unique.
 * There should be no extensions that differ in case only.

Helmut



Re: Added hundreds of media types to /etc/mime.types

2021-01-09 Thread Bernd Zeimetz



On 1/9/21 12:22 AM, Charles Plessy wrote:
 implement a choice in this script.
> 
> If this is too close to the freeze, I can temporarly remove `sdf` for
> `application/vnd.stardivision.math` and re-add it later.



sdf from Stardivision Math rings a bell as something I've used when I
was in School. Which is ... long...long ago.

For those who don't remember it: Stardivision had a really nice office
suite which was at some point bought by Sun. Years later libreoffice is
still able to open Staroffice Writer files. But as far as I can tell
libreoffice math is not even able to read sdf files anymore.

So I think it is really save to drop that in favour of the other one (no
clue what that is, though).



-- 
 Bernd ZeimetzDebian GNU/Linux Developer
 http://bzed.dehttp://www.debian.org
 GPG Fingerprint: ECA1 E3F2 8E11 2432 D485  DD95 EB36 171A 6FF9 435F



Re: Added hundreds of media types to /etc/mime.types

2021-01-08 Thread Simon McVittie
On Sat, 09 Jan 2021 at 08:22:26 +0900, Charles Plessy wrote:
> I ran /usr/share/lighttpd/create-mime.conf.pl and only had duplicate
> warnings, that do not cause errors (the scripts returns 0).
...
> In the latest CI log of lighttpd on amd64, there is:
> 
> defconfigFAIL stderr: Duplicate mimetype: '.sdf' => 
> 'application/vnd.stardivision.math' (already have 'application/vnd.Kinar'), 
> merging to 'application/octet-stream'

By default, autopkgtest considers any output on stderr to be a failure,
so warnings will make this test fail, unless it's marked with
Restrictions: allow-stderr.

lighttpd maintainers: please consider whether it should be considered to
be a pass or a fail if this particular test has output on stderr but
exits 0? If it should pass, please add Restrictions: allow-stderr.

(It isn't really clear whether considering stderr to be a failure by
default was a good idea or a design mistake - it depends on the test,
and can be argued both ways. However, it's part of the autopkgtest spec,
so changing it now would be more trouble than it's worth.)

smcv



Re: Added hundreds of media types to /etc/mime.types

2021-01-08 Thread Charles Plessy
[Please CC me, I am not subscribed].

Le Fri, Jan 08, 2021 at 05:54:43PM +0100, Paul Gevers a écrit :
> 
> autopkgtest [12:47:41]: test defconfig: [---
> Duplicate mimetype: '.png' => 'image/vnd.mozilla.apng' (already have
> 'image/png'), merging to 'application/octet-stream'
> Duplicate mimetype: '.pcx' => 'image/vnd.zbrush.pcx' (already have
> 'image/pcx'), merging to 'application/octet-stream'
> Error: duplicate array-key: .pgb. Please get rid of the duplicate entry.
> 2021-01-07 12:47:41: (configfile.c.1966) source:
> /usr/share/lighttpd/create-mime.conf.pl line: 495 pos: 8 parser failed
> somehow near here: (COMMA)
> 2021-01-07 12:47:41: (configfile.c.1966) source:
> /etc/lighttpd/lighttpd.conf line: 48 pos: 8 parser failed somehow near
> here: (EOL)
> autopkgtest [12:47:42]: test defconfig: ---]
> 
> found in
> https://ci.debian.net/data/autopkgtest/testing/armhf/l/lighttpd/9433211/log.gz

Thanks Paul,

I have removed `png` from `image/vnd.mozilla.apng` and will remove
`image/pcx` entirely as `image/vnd.zbrush.pcx` is preferred now.

I ran /usr/share/lighttpd/create-mime.conf.pl and only had duplicate
warnings, that do not cause errors (the scripts returns 0).  With the
latest /etc/mime-types file in Sid, I do not have parser errors.

In the latest CI log of lighttpd on amd64, there is:

defconfigFAIL stderr: Duplicate mimetype: '.sdf' => 
'application/vnd.stardivision.math' (already have 'application/vnd.Kinar'), 
merging to 'application/octet-stream'

Unfortunately, `sdf` is a legitimate extension for both media types.  I
see that /usr/share/lighttpd/create-mime.conf.pl already has a section
for resolving such conflicts, so I think that the best solution is
to implement a choice in this script.

If this is too close to the freeze, I can temporarly remove `sdf` for
`application/vnd.stardivision.math` and re-add it later.

Have a nice day,

Charles

-- 
Charles Plessy Nagahama, Yomitan, Okinawa, Japan
Tooting from work,   https://mastodon.technology/@charles_plessy
Tooting from home, https://framapiaf.org/@charles_plessy



Re: Added hundreds of media types to /etc/mime.types

2021-01-08 Thread Paul Gevers
Hi Charles,

On 06-01-2021 23:40, Charles Plessy wrote:
> [Please CC me, I am not subscribed].

Done.

> Just a quick heads-up on the contents of /etc/mime.types: it did not
> receive major updates for years, but I just added hundreds of
> IANA-registered media types in the upload I just made for the
> media-types package.  It might affect what servers declare as media
> types for the files they transmit, when they base their choices solely
> on file extensions.  The changes I made were pulled from the latest
> Fedora stable package distributing /etc/mime.types, so I expect that it
> was tested to some extent, but in a few cases I also removed deprecated
> mime types in favor of the IANA-registered version.  In case of
> problems, please feel free to ask me to comment some lines or NMU if you
> feel some urgency.

Does this ring a bell?

autopkgtest [12:47:41]: test defconfig: [---
Duplicate mimetype: '.png' => 'image/vnd.mozilla.apng' (already have
'image/png'), merging to 'application/octet-stream'
Duplicate mimetype: '.pcx' => 'image/vnd.zbrush.pcx' (already have
'image/pcx'), merging to 'application/octet-stream'
Error: duplicate array-key: .pgb. Please get rid of the duplicate entry.
2021-01-07 12:47:41: (configfile.c.1966) source:
/usr/share/lighttpd/create-mime.conf.pl line: 495 pos: 8 parser failed
somehow near here: (COMMA)
2021-01-07 12:47:41: (configfile.c.1966) source:
/etc/lighttpd/lighttpd.conf line: 48 pos: 8 parser failed somehow near
here: (EOL)
autopkgtest [12:47:42]: test defconfig: ---]

found in
https://ci.debian.net/data/autopkgtest/testing/armhf/l/lighttpd/9433211/log.gz

Paul



OpenPGP_signature
Description: OpenPGP digital signature


Added hundreds of media types to /etc/mime.types

2021-01-06 Thread Charles Plessy
[Please CC me, I am not subscribed].

Dear all,

happy new year!

Just a quick heads-up on the contents of /etc/mime.types: it did not
receive major updates for years, but I just added hundreds of
IANA-registered media types in the upload I just made for the
media-types package.  It might affect what servers declare as media
types for the files they transmit, when they base their choices solely
on file extensions.  The changes I made were pulled from the latest
Fedora stable package distributing /etc/mime.types, so I expect that it
was tested to some extent, but in a few cases I also removed deprecated
mime types in favor of the IANA-registered version.  In case of
problems, please feel free to ask me to comment some lines or NMU if you
feel some urgency.

Have a nice day,

Charles

-- 
Charles Plessy Nagahama, Yomitan, Okinawa, Japan
Debian Med packaging team http://www.debian.org/devel/debian-med
Tooting from work,   https://mastodon.technology/@charles_plessy
Tooting from home, https://framapiaf.org/@charles_plessy