Bug 12620 - Support for Pack200 Java archives
Summary: Support for Pack200 Java archives
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: 2007-09-29 14:49 UTC by Ville Skyttä
Modified: 2008-04-21 05:55 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Recognize Pack200 Java archives (927 bytes, patch)
2007-09-29 14:50 UTC, Ville Skyttä
Details | Splinter Review
Sample pack200 archive (151 bytes, application/octet-stream)
2008-04-16 13:42 UTC, Ville Skyttä
Details

Description Ville Skyttä 2007-09-29 14:49:24 UTC
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
Comment 1 Ville Skyttä 2007-09-29 14:50:23 UTC
Created attachment 11822 [details] [review]
Recognize Pack200 Java archives
Comment 2 Bastien Nocera 2008-04-15 02:29:53 UTC
*.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?
Comment 3 Ville Skyttä 2008-04-16 13:42:29 UTC
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.
Comment 4 Bastien Nocera 2008-04-18 07:26:11 UTC
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.
Comment 5 Ville Skyttä 2008-04-19 01:38:03 UTC
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).
Comment 6 Bastien Nocera 2008-04-21 05:55:55 UTC
* 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.