[File] [PATCH] Magdir/archive for LibreOffice/OpenOffice extension *.oxt versus Zip archive

Christos Zoulas christos at zoulas.com
Sat Mar 12 15:14:10 UTC 2022


Applied, thanks!

christos

> On Mar 8, 2022, at 10:38 AM, Jörg Jenderek <joerg.jen.der.ek at gmx.net> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello,
> 
> some days ago i had trouble with my spelling software. So i looked at
> the components. Some have the file name extension OXT.
> 
> When running file command version 5.41 on such extensions i get an
> output like:
> 
> Gallery-Puzzle.2.1.0.1.oxt: Zip data
> 			    (MIME type
> 		"application/vnd.openofficeorg.extension"?)
> all3.oxt:                   Zip archive data,
> 			    at least v2.0 to extract,
> 			    compression method=deflate
> business_pictogramme.oxt:   Zip archive data,
> 			    at least v2.0 to extract,
> 			    compression method=deflate
> no-description.oxt:         Zip archive data,
> 			    at least v2.0 to extract,
> 			    compression method=deflate
> qrcodejs.oxt:               Zip archive data,
> 			    at least v2.0 to extract,
> 			    compression method=deflate
> 
> With --extension option only ??? is displayed. Furthermore with -i
> option for many samples only generic application/zip is shown.
> 
> For comparison reason i run the file format identification utility
> TrID ( See https://mark0.net/soft-trid-e.html). This identifies also
> all samples generic as "ZIP compressed archive" by definition
> ark-zip.trid.xml. But many examples are described more precisely as
> "OpenOffice Extension" by oxt.trid.xml (See appended
> oxt_trid-v.txt.gz)
> 
> For comparison reason i also run the file format identification
> utility DROID ( See https://sourceforge.net/projects/droid/). This
> identifies all examples also only generic as "ZIP Format" by PUID
> x-fmt/263, but it complains about the file name extension OXT (See
> appended oxt_droid.csv.gz)
> 
> With the information of these tools i found a page about on File
> Format on openoffice.org. That information is expressed by comment
> line inside Magdir/archive like:
> 
> # URL:	https://wiki.openoffice.org/
> #	wiki/Documentation/DevGuide/Extensions/File_Format
> 
> According to that page OXT are just ZIP archives containing sometimes
> as first a 8 byte size file with name mimetype and with 39 byte mime
> type content string "application/vnd.openofficeorg.extension". I
> verified such examples by command like:
> 	unzip -Zv *.oxt
> 	7z l -slt *.oxt
> 
> The message for such OXT examples is triggered by part handling mime
> type "application/<OTHER>" meaning that there exist no code fragment
> for "vnd.openofficeorg.extension" application. This relationship is
> also listed on nirsoft website extension.nirsoft.net.
> So i insert after section for OpenOffice 1.x handled by vnd.sun.xml
> the new part. This now looks like
> 
>>> 50	string	vnd.openofficeorg.	OpenOffice
>>>> 68	string	extension		\b/LibreOffice Extension
> !:mime	application/vnd.openofficeorg.extension
> !:ext	oxt
> 
> I also find such extensions not only inside OpenOffice but also  in
> LibreOffice directories. And following some hints on the net probably
> also NeoOffice use that extensions, but i do not know if this true.
> 
> After applying the above mentioned modifications by patch
> file-5.41-archive-oxt.diff and using Magdir/zip then a few extension
> samples (Sorry only one of my examples) are now described more
> precisely. This now looks option like:
> 
> Gallery-Puzzle.2.1.0.1.oxt: OpenOffice/LibreOffice Extension
> all3.oxt:                   Zip archive data,
> 			    at least v2.0 to extract,
> 			    compression method=deflate
> business_pictogramme.oxt:   Zip archive data,
> 			    at least v2.0 to extract,
> 			    compression method=deflate
> no-description.oxt:         Zip archive data,
> 			    at least v2.0 to extract,
> 			    compression method=deflate
> qrcodejs.oxt:               Zip archive data,
> 			    at least v2.0 to extract,
> 			    compression method=deflate
> 
> 
> I hope my diff file can be applied in future version of file
> utility.
> 
> Unfortunately many OXT examples does not contains such starting
> mimetype member. So other checks must be done to recognise OXT or
> especially distinguish it from pure ZIP archive.
> 
> With best wishes
> Jörg Jenderek
> - --
> Jörg Jenderek
> 
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
> 
> iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCYid4UAAKCRCv8rHJQhrU
> 1qSXAKDiDpiANGB021AgLsd62WzLRmt4UACffNtDEDLsv43M2eRt8N7BuJ/4JCc=
> =Owut
> -----END PGP SIGNATURE-----
> <oxt_trid-v.txt.gz><oxt_droid.csv.gz><file-5_41-archive-oxt_diff.DEFANGED-66251><file-5_41-archive-oxt_diff_sig.DEFANGED-66252>--
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
> <sanitizer.log>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/file/attachments/20220312/76ef0f67/attachment.asc>


More information about the File mailing list