AppImage / AppImage/AppImageKit

Submit AppImage to file/libmagic

Ouverte
#727 4 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
Aucune donnée de langage
Étoiles
9.4k
Forks
588
Métriques de merge des PR
Métriques de PR en attente

Description

Every developer and/or Linux user knows the command `file`, which can be used to display file types of arbitrary files.

At the moment, AppImages are recognized as ELF executables:

```
...AppImage: ELF 64-bit LSB executable, x86-64, version 1, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, stripped
```

I experimented a bit, and with the following definition (incomplete type 1), I can get a result like:

```sh
# contents of file "appimage"
8 string AI\01 AppImage (type 1)
8 string AI\02 AppImage (type 2)
```

```sh
# compile definition file "appimage" to "appimage.mgc"
> file -C -m appimage
# now use it for type 1 AppImage
> file -z -m appimage.mgc ...AppImage
...AppImage: AppImage (type 1), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=[...], stripped
# type 2 AppImage
> file -z -m appimage.mgc ...AppImage
...AppImage: AppImage (type 2), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, stripped
```

Many tools use libmagic instead of the shared MIME database (`/usr/share/mime`, package `shared-mime-info`), and therefore don't recognize AppImages. We should submit the AppImage specification as a definition to the maintainers of `file`/libmagic.

See http://openpreservation.org/blog/2012/08/09/magic-editing-and-creation-primer/ on how to submit definitions.

Information missing in the example definition:

- the corresponding MIME types (so that libmagic can provide a MIME type when asked, e.g., through `file -i `)
- type 1 AppImages don't necessarily need to embed the magic bytes, i.e., any file that is an ISO9660 image _and_ an executable needs to be recognized as an AppImage

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.