The previous patch posted to this bug was incomplete. The following
patch agrees with the magic file and properly detects OpenOffice files
and discerns them from zip files.

Please apply this patch to the file package.

Regards,
Thomas
--- /usr/share/file/magic.mime	2007-09-12 22:52:17.000000000 +0200
+++ .magic.mime	2007-12-17 11:08:33.000000000 +0100
@@ -300,7 +300,66 @@
 # gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver)
 #0       string          \037\213        application/x-gzip
 
-0		string			PK\003\004		application/x-zip
+0	string		PK\003\004
+>4	byte		0x09		application/x-zip
+>4	byte		0x0a		application/x-zip
+>4	byte		0x0b		application/x-zip
+>4	byte		0x14
+>>30	ubelong		!0x6d696d65	application/x-zip
+
+# OpenOffice.org / KOffice / StarOffice documents
+# From: Abel Cheung <[EMAIL PROTECTED]>
+# Listed here because they are basically zip files
+>>30	string		mimetype
+
+# KOffice (1.2 or above) formats
+>>>50	string	vnd.kde.
+>>>>58	string	karbon			application/vnd.kde.karbon
+>>>>58	string	kchart			application/vnd.kde.kchart
+>>>>58	string	kformula		application/vnd.kde.kformula
+>>>>58	string	kivio			application/vnd.kde.kivio
+>>>>58	string	kontour			application/vnd.kde.kontour
+>>>>58	string	kpresenter		application/vnd.kde.kpresenter
+>>>>58	string	kspread			application/vnd.kde.kspread
+>>>>58	string	kword			application/vnd.kde.kword
+
+# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7)
+>>>50	string	vnd.sun.xml.
+>>>>62	string	writer			application/vnd.sun.xml.writer
+>>>>>68	byte	!0x2e			application/vnd.sun.xml.writer
+>>>>>68	string	.template		application/vnd.sun.xml.writer.template
+>>>>>68	string	.global			application/vnd.sun.xml.global
+>>>>62	string	calc			application/vnd.sun.xml.calc
+>>>>>66	byte	!0x2e			application/vnd.sun.xml.calc
+>>>>>66	string	.template		application/vnd.sun.xml.calc.template
+>>>>62	string	draw			application/vnd.sun.xml.draw
+>>>>>66	byte	!0x2e			application/vnd.sun.xml.draw
+>>>>>66	string	.template		application/vnd.sun.xml.draw.template
+>>>>62	string	impress			application/vnd.sun.xml.impress
+>>>>>69	byte	!0x2e			application/vnd.sun.xml.impress
+>>>>>69	string	.template		application/vnd.sun.xml.impress.template
+>>>>62	string	math			application/vnd.sun.xml.math
+
+# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8)
+# http://lists.oasis-open.org/archives/office/200505/msg00006.html
+>>>50	string	vnd.oasis.opendocument.
+>>>>73	string	text
+>>>>>77	byte	!0x2d			application/vnd.oasis.opendocument.text
+>>>>>77	string	-template		application/vnd.oasis.opendocument.text-template
+>>>>>77	string	-web			application/vnd.oasis.opendocument.text-web
+>>>>>77	string	-master			application/vnd.oasis.opendocument.text-master
+>>>>73	string	graphics		application/vnd.oasis.opendocument.graphics
+>>>>>81	string	-template		application/vnd.oasis.opendocument.graphics.template
+>>>>73	string	presentation		application/vnd.oasis.opendocument.presentation
+>>>>>85	string	-template		application/vnd.oasis.opendocument.presentation-template
+>>>>73	string	spreadsheet		application/vnd.oasis.opendocument.spreadsheet
+>>>>>84	string	-template		application/vnd.oasis.opendocument.spreadsheet-template
+>>>>73	string	chart			application/vnd.oasis.opendocument.chart
+>>>>>78	string	-template		application/vnd.oasis.opendocument.chart-template
+>>>>73	string	formula			application/vnd.oasis.opendocument.formula
+>>>>>80	string	-template		application/vnd.oasis.opendocument.formula-template
+>>>>73	string	database		application/vnd.oasis.opendocument.database
+>>>>73	string	image			application/vnd.oasis.opendocument.image
 
 # RAR archiver (Greg Roelofs, [EMAIL PROTECTED])
 0	string		Rar!		application/x-rar

Attachment: signature.asc
Description: Digital signature

Reply via email to