Bug 43621 - squashfs MIME type.
Summary: squashfs MIME type.
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: Shared Mime Info group
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-08 01:04 UTC by dE
Modified: 2016-05-30 11:29 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Add application/vnd.squashfs (871 bytes, patch)
2016-05-26 03:55 UTC, Robert Ancell
Details | Splinter Review
Add application/vnd.squashfs (17.83 KB, patch)
2016-05-27 02:15 UTC, Robert Ancell
Details | Splinter Review
Add application/vnd.squashfs (17.86 KB, patch)
2016-05-30 03:20 UTC, Robert Ancell
Details | Splinter Review
Add application/vnd.snap (1.97 KB, patch)
2016-05-30 03:21 UTC, Robert Ancell
Details | Splinter Review
Add application/vnd.snap (1.97 KB, patch)
2016-05-30 11:06 UTC, Robert Ancell
Details | Splinter Review

Description dE 2011-12-08 01:04:29 UTC
Squashfs - 

http://squashfs.sourceforge.net/

Should have a mime type.

This's a very tempting and useful program not only for compressing OSs, but also for general data compression.

Sample file output - 

Squashfs filesystem, little endian, version 4.0, 36376784 bytes, 37 inodes, blocksize: 1048576 bytes, created: Thu Dec  8 14:18:30 2011
Comment 1 Bastien Nocera 2011-12-08 05:57:24 UTC
Please read http://cgit.freedesktop.org/xdg/shared-mime-info/tree/HACKING about adding new mime-types.
Comment 2 dE 2011-12-08 09:15:11 UTC
My main concern is - 

* Mime-types used should be IANA registered mime-types when possible

So is this mandatory? If so, I think it as impossible to convince people of IANA.
Comment 3 Bastien Nocera 2013-02-12 14:28:27 UTC
(In reply to comment #2)
> My main concern is - 
> 
> * Mime-types used should be IANA registered mime-types when possible
> 
> So is this mandatory? If so, I think it as impossible to convince people of
> IANA.

The fact that it says "when possible" is a pretty clear pointer that this isn't mandatory.
Comment 4 Robert Ancell 2016-05-26 03:55:21 UTC
Created attachment 124105 [details] [review]
Add application/vnd.squashfs
Comment 5 Bastien Nocera 2016-05-26 09:37:49 UTC
Comment on attachment 124105 [details] [review]
Add application/vnd.squashfs

Review of attachment 124105 [details] [review]:
-----------------------------------------------------------------

What is this useful for?
How is this different from the disk image mime-type (apart from the magic), and why wouldn't it descend from it?
Are we going to have to add every filesystem out there?
Comment 6 Robert Ancell 2016-05-26 21:30:41 UTC
> What is this useful for?

In my case, this is useful for viewing .snap files which a squashfs file. It's also used for other cases such as firmware updates, disk images and a general archive format.

I've added this so file-roller can open these files (https://bugzilla.gnome.org/show_bug.cgi?id=662519)

> How is this different from the disk image mime-type (apart from the magic),
> and why wouldn't it descend from it?
> Are we going to have to add every filesystem out there?

While it's described as a file system it's use is more like an archive that can happen to be mounted / unpacked as a filesystem. It's more similar to a .dmg / .tar.gz than an EXT4 image.
Comment 7 Robert Ancell 2016-05-26 21:31:44 UTC
Info about .snap:
http://askubuntu.com/questions/761245/what-is-the-snap-packaging-format
Comment 8 Bastien Nocera 2016-05-26 23:41:19 UTC
I just saw that you don't have any test files. Please check the HACKING file again about how to add those and test that they're well integrated into the system.
Comment 9 Robert Ancell 2016-05-27 02:15:40 UTC
Created attachment 124120 [details] [review]
Add application/vnd.squashfs

Added test file. Note the tests fail because the previous commit for application/raml+yaml seems to be missing their test file..
Comment 10 Bastien Nocera 2016-05-27 11:20:54 UTC
(In reply to Robert Ancell from comment #9)
> Created attachment 124120 [details] [review] [review]
> Add application/vnd.squashfs
> 
> Added test file. Note the tests fail because the previous commit for
> application/raml+yaml seems to be missing their test file..

That last commit is reverted, but that's still not enough:
image.sqsh, 'name' test: expected application/vnd.squashfs, got application/octet-stream
Comment 11 Robert Ancell 2016-05-30 03:20:26 UTC
Created attachment 124169 [details] [review]
Add application/vnd.squashfs

Ah, I see. The tests require an extension. Seems to work now.
Comment 12 Robert Ancell 2016-05-30 03:21:28 UTC
Created attachment 124170 [details] [review]
Add application/vnd.snap

Related to the last patch - this recognises *.snap as a snap package (which is itself is just a squashfs file)
Comment 13 Bastien Nocera 2016-05-30 09:38:19 UTC
example_42_all.snap, 'data' test: expected application/vnd.snap, got application/vnd.squashfs

Can you please test your patches before attaching them?
Comment 14 Bastien Nocera 2016-05-30 09:40:18 UTC
Comment on attachment 124169 [details] [review]
Add application/vnd.squashfs

Attachment 124169 [details] pushed as e96df89 - Add application/vnd.squashfs
Comment 15 Robert Ancell 2016-05-30 11:06:16 UTC
Created attachment 124174 [details] [review]
Add application/vnd.snap

Apologies, I did not read the output of make clearly enough...
Comment 16 Bastien Nocera 2016-05-30 11:29:06 UTC
Attachment 124174 [details] pushed as 4882ca0 - Add application/vnd.snap


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.