AppImage / AppImage/AppImageKit

Submit AppImage to file/libmagic

Đang mở
#727 4 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
9.4k
Fork
588
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.