-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Externally-visible metadata? #10
Comments
Hi @sagebind, welcome to AppImage! The
They have different magic numbers which can be used to determine the file type.
If you have a clear case why you need another filesystem, we could think about type 3 AppImages, with, you guessed it, |
Maybe I misunderstood the draft spec, but I did not think type 2 was specific to squashfs and that using squashfs was an implementation detail. From the draft:
Also, in the announcement of the type 2 format: http://discourse.appimage.org/t/the-future-of-appimage-type-2-and-new-tools/65/2:
If type 2 is squashfs-specific, then we should probably say so in the draft. Otherwise, I see the fs implementation as distinct from the spec version. We could have a different set of magic bytes at a different offset for that. To be clear, I don't think that we should replace squashfs with something else, but add some means to identify if an image is squashfs or something else. A type 3 sounds like it supersedes type 2, which is not my goal. |
Actually you are right, the spec for type 2 allows any type of filesystem to be used. I forgot that I had intentionally made it that generic, so thanks for reminding me. An external application wishing to determine the filesystem format would, in this case, need to get the offset to the beginning of the filesystem (= the byte after the end of the ELF) and then determine from the magic bytes of that filesystem what it actually is. |
@sagebind still I'd be interested in your motivation to go with zip rather than squashfs. |
That's a good point, it shouldn't be too hard to read the magic bytes right after the offset of the ELF, that seems like a reasonable solution to me. I should have thought of that... I'm mostly experimenting for the heck of it, but I decided to use zip for three reasons:
I'm also concerned about performance; in theory zip lookup tables are quite fast, but in-file seeking is an issue. I think I can do some benchmarks once my implementation is more complete. The compression algorithm used might have a big effect on performance too. |
Yes @sagebind I'd be very interested in benchmarks, e.g., of LibreOffice launch times. |
I've been working on an alternate implementation to be compliant with the AppImage type 2 spec using Zip as the image file system (https://github.com/sagebind/appimagezip), but now I realize there is no way for external tools to know what file system an AppImage actually uses. Would it be a good idea to add some metadata to a new ELF section?
I'm thinking something like this:
Being able to identify the file system type could be useful, so that tools don't have to guess the format by scanning the file. For example, if we want to extract an AppImage or list its contents, we would need to know the file system format first. It may also be useful to record the application used to generate the AppImage.
We can't store this metadata in the
.desktop
file since we can't access it without reading the file system format first.The text was updated successfully, but these errors were encountered: