Bug 100608 - [PATCH] Add mimetype for AppImage Type 2
Summary: [PATCH] Add mimetype for AppImage Type 2
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: Shared Mime Info group
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-07 08:59 UTC by Elvis Angelaccio
Modified: 2017-09-07 01:16 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch for AppImage Type 2 mimetype (228.09 KB, patch)
2017-04-07 08:59 UTC, Elvis Angelaccio
Details | Splinter Review
Patch for AppImage Type 2 mimetype (2.71 KB, patch)
2017-04-11 08:49 UTC, Elvis Angelaccio
Details | Splinter Review
Patch for AppImage Type 2 mimetype (2.68 KB, patch)
2017-09-06 17:50 UTC, Elvis Angelaccio
Details | Splinter Review

Description Elvis Angelaccio 2017-04-07 08:59:23 UTC
Created attachment 130741 [details] [review]
Patch for AppImage Type 2 mimetype

The Type 2 AppImage format inherits from application/vnd.squashfs rather than application/x-iso9660-image and the magic is different as well, so it needs a different mimetype. More info here: https://github.com/AppImage/AppImageSpec/blob/master/draft.md#type-2-image-format
Comment 1 Bastien Nocera 2017-04-10 08:42:19 UTC
The test suite doesn't pass. You'll also want to trim your example to be smaller.
Comment 2 Elvis Angelaccio 2017-04-11 08:49:14 UTC
Created attachment 130794 [details] [review]
Patch for AppImage Type 2 mimetype

Fixed failing test and trimmed the test file.
Comment 3 Elvis Angelaccio 2017-06-06 08:20:55 UTC
Ping?
Comment 4 Bastien Nocera 2017-06-06 08:30:52 UTC
Comment on attachment 130794 [details] [review]
Patch for AppImage Type 2 mimetype

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

::: freedesktop.org.xml.in
@@ +6992,5 @@
>      <glob pattern="*.sqsh"/>
>    </mime-type>
>  
> +  <mime-type type="application/vnd.appimage">
> +    <_comment>AppImage application bundle (Type 2)</_comment>

What difference does this make to the end-user or applications that would use the mime-type?

Could we not remove the type specific sub-class-of, add application/x-iso9660-appimage as an alias of the more generic application/vnd.appimage, and add the magic to the first type as well?

Seems akin to differentiating GIF formats to me.

@@ +7006,5 @@
> +        </match>
> +      </match>
> +    </magic>
> +    <glob pattern="*.appimage"/>
> +    <glob pattern="*.AppImage"/>

You can remove this one, the globs are case insensitive by default (I've corrected this in the original mime-type as well).
Comment 5 Bastien Nocera 2017-09-05 12:20:58 UTC
(In reply to Elvis Angelaccio from comment #3)
> Ping?

Ping as well :)
Comment 6 Elvis Angelaccio 2017-09-06 17:49:27 UTC
(In reply to Bastien Nocera from comment #4)
> Comment on attachment 130794 [details] [review] [review]
> Patch for AppImage Type 2 mimetype
> 
> Review of attachment 130794 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> ::: freedesktop.org.xml.in
> @@ +6992,5 @@
> >      <glob pattern="*.sqsh"/>
> >    </mime-type>
> >  
> > +  <mime-type type="application/vnd.appimage">
> > +    <_comment>AppImage application bundle (Type 2)</_comment>
> 
> What difference does this make to the end-user or applications that would
> use the mime-type?
> 
> Could we not remove the type specific sub-class-of, add
> application/x-iso9660-appimage as an alias of the more generic
> application/vnd.appimage, and add the magic to the first type as well?
> 
> Seems akin to differentiating GIF formats to me.

Sorry for the delay. Here's the answer of the AppImage maintainer:

> Type 1 uses ISO9660 whereas type 2 is an entirely different format. They are described in the AppImageSpec: https://github.com/AppImage/AppImageSpec/blob/master/draft.md

So it seems we do need another mimetype.
Comment 7 Elvis Angelaccio 2017-09-06 17:50:36 UTC
Created attachment 134021 [details] [review]
Patch for AppImage Type 2 mimetype

Dropped unnecessary glob pattern, as they are case-insensitive.
Comment 8 Bastien Nocera 2017-09-07 01:16:40 UTC
I removed the "Type 2" from the description, as it's of no value
to most users. Thanks!


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.