Bug 16495 - No MIME type entry for .msi files; causes Wine to be unable to open
Summary: No MIME type entry for .msi files; causes Wine to be unable to open
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-24 03:05 UTC by Scott Ritchie
Modified: 2009-01-05 09:34 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Adds application/x-msi as a sub-type of application/x-ole-storage (552 bytes, patch)
2008-06-25 01:09 UTC, Scott Ritchie
Details | Splinter Review
shared-mime-info-msi-no-magic.patch (532 bytes, patch)
2008-10-15 05:42 UTC, Stanislav Brabec
Details | Splinter Review

Description Scott Ritchie 2008-06-24 03:05:07 UTC
Originally found on launchpad:

https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/229062

There's a patch there as well, which looks correct.  It would be very useful to have mime info for .msi files.  Thank you.
Comment 1 Bastien Nocera 2008-06-24 06:08:14 UTC
Do you have a minimal test file available somewhere?

Could you please also attach the patch here (minus the dup glob, they're case insensitive...)
Comment 2 Scott Ritchie 2008-06-25 01:09:21 UTC
Created attachment 17361 [details] [review]
Adds application/x-msi as a sub-type of application/x-ole-storage

Here is the patch, I hope it applies cleanly to the latest.

Sorry I do not have a test case, I've never dealt with this source code before and don't really know how to make one.
Comment 3 Bastien Nocera 2008-06-25 02:45:26 UTC
(In reply to comment #2)
> Sorry I do not have a test case, I've never dealt with this source code before
> and don't really know how to make one.

A small MSI file will do just fine. Apparently there is some magic available, and I'd like to be able to test it as well.
Comment 4 A. Walton 2008-06-28 15:39:44 UTC
http://www.apache.org/dist/httpd/binaries/win32/apache_2.2.9-win32-x86-no_ssl-r2.msi

Too big to attach to the bug (1000kb limit). 
Comment 5 Scott Ritchie 2008-07-18 15:52:20 UTC
Any updates?  I'm worried this will fall by the wayside due to me not finding a small test msi file.
Comment 6 Bastien Nocera 2008-07-21 02:38:20 UTC
2008-07-21  Bastien Nocera  <hadess@hadess.net>

	* freedesktop.org.xml.in: Add MSI (Windows Installer) mime-type,
	including magic, based on work from Scott Ritchie
	<scott@open-vote.org> (Closes: #16495)
	* tests/list:
	* tests/test.msi: add test case for the above
Comment 7 Felix Möller 2008-09-27 02:43:06 UTC
This patch causes the detecten of ms-word documents to fail, see https://bugzilla.novell.com/show_bug.cgi?id=430389
Comment 8 Bastien Nocera 2008-09-27 03:48:21 UTC
This is a bug in kmimetypefinder, which only shows you the first matching mime-type, instead of the highest matching one (see the accuracy number).

KDE doesn't use the xdgmime code, which works fine with this.

Reopen a new bug if you have proof this is a shared-mime-info bug.
Comment 9 Stanislav Brabec 2008-10-15 05:42:41 UTC
Created attachment 19663 [details] [review]
shared-mime-info-msi-no-magic.patch

The patch here is correct, but actual freedesktop.org.xml.in in 0.51 is incorrect, as it assigns generic OLE magic to both application/x-ole-storage and application/x-msi. It causes match for many Microsoft Word Document files.

The magic attached to application/x-msi is a generic magic for application/x-ole-storage. Both matches have the same priority, but the match string for application/x-ole-storage is a substring of application/x-msi. This may cause prefix clash security warning, kmimetypefinder decides to prefer application/x-msi. This behavior is not in contradiction with spec as well.

Proposed patch reverts version 0.51 back to the version proposed in previous patch. I am not a Microsoft OLE expert, I cannot provide a real application/x-msi specific magic.
Comment 10 Stanislav Brabec 2008-10-15 05:54:04 UTC
As proposed in comment 8, I opened new bug 18072 for the new problem.
Comment 11 David Faure 2009-01-05 09:34:32 UTC
For the record (replying to comment 8) : kmimetypefinder does NOT show the first match, it does show the highest match. The bug is in the msi magic, see bug 18072.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.