The attached patch adds recognition of Pack200 java archives to freedesktop.org.xml. More info and a downloadable file format spec at http://jcp.org/en/jsr/detail?id=200
Created attachment 11822 [details] [review] Recognize Pack200 Java archives
*.pack.gz would probably need a separate mime-type, just as for svgz (*.svg.gz), as those files would fail magic, and would be missing a sub-class-of for application/x-gzip. Could you also please provide a test file?
Created attachment 15961 [details] Sample pack200 archive All the information I've found about pack200 MIME types says that both *.pack and *.pack.gz should be sent as application/x-java-pack200 by web servers, and *.pack.gz additionally specifying Content-Encoding: pack200-gzip. For example http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/pack200.html (that doesn't seem to mention non-gzipped pack200 at all though). Now shared-mime-info doesn't AFAIK have a concept equivalent to HTTP's Content-Encoding nor is it primarily about web servers and their MIME types, but somehow I don't feel too happy about inventing nonstandard MIME types for the sake of differentiating compressed ones. Maybe addition of something like Content-Encoding to shared-mime-info should be considered? Sample pack200 archive attached, created by java-1.7.0-icedtea's pack200 on Fedora 8 from a simple jar file containing only the autogenerated manifest and a "hello world" text file.
Would any actual .pack.gz files actually make their way onto users' systems? From what I understand, those would be maybe available in the same way that some HTML pages can be gzipp'ed on the fly. The user wouldn't actually see those gzipped files. If that's the case, I'd remove the .pack.gz, which means it would be opened by file-roller and the .pack itself would then be available.
I think pack200 files are usually found on file systems as *.pack.gz, not *.pack. But your suggestion would certainly be ok at least until/if a better way to support them is found (although I have no experience with file-roller - based on quick googling I see it's a GNOME archive manager; I'm a KDE user).
* freedesktop.org.xml.in: * tests/hello.pack: * tests/list: Add mime-type for Pack200 archives, patch from Ville Skyttä <ville.skytta@iki.fi> (Closes: #12620)
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.