-
Notifications
You must be signed in to change notification settings - Fork 0
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
Is it technically possible to make an AppImage that is also a valid zip file? #8
Comments
It could be standardized of course. Efficiency wise it's not a very good idea, but we could standardize a payload type for zip archives, too. The AppImage header format is capable of that. |
It probably became not clear what I meant yet:
Doable? |
That seems very complicated. Everything might be doable, but this is just not a good idea if you ask me. Rather educate users they have to Also, as said before, I'm not sure |
At least I keep hearing this as the reason why people put AppImages into zip files:
|
Well, this UX highly depends on whether it's possible to mix ELF and zip, like you did in type 1. Another question is, can we make it so the |
According to https://superuser.com/questions/411394/zip-files-without-compression/411398,
|
I think this could be the true killer use case for a type 3... |
That zero compression stuff might be nice, but it still doesn't tell us if we can make an ELF that is also recognized as a zip archive by software. I think it's only worth it if the thing can automatically convert itself into a "real" AppImage. |
Indeed. |
Zip files start with But why use Potentially crazy (and really bad) idea: Why not make Edit: seems like |
Yes. Let's continue to think along those lines. This is good. |
They're |
(I'm not sure this is a good idea but...) https://justine.lol/redbean/index.html is a webserver that's a pe+elf+macho+sh+zip polyglot |
I think we should just focus on what we're good at, which is shipping non-isolated-but-self-contained application containers with a binary runtime. I have heard of this APE project before, but it seems quite experimental, plus we don't really care about other OSes than Linux. (Fun fact: that the site is served with nginx, not with readbean.) |
Just meant to anwer the question that yes, you probably can make an ELF+ZIP polyglot, not that you should. |
Having a zip/elf combination is not only possible, it's also very easy as the magic numbers can be at any arbitrary point in the file, not just offset 0. You can append a zip file to an elf and both are valid, so you could simply extract it using any zip software. zip files (at least from info-zip) also do support POSIX permissions. I think the primary issues with zip are probably the bad compression ratio (also compressing files individually, so similar files will take up extra space), decompression performance and lack of file deduplication. Despite the cool factor, I think using zip files is a step in the wrong direction, at least for the primary format. SquashFS is superior to zip in every way except compatibility and the convenience of being able to extract it like any other zip file. |
You wouldn't make the zip file the actual storage. You'd take the regular appimage and then try to polyglot it into a zip quine so that the file extracts to an identical copy of itself. But with the exec bit set. |
Ah, yeah it's clever but I fail to see its usefulness as it would just double the disk usage (until someone deletes the first one) and creates the impression that AppImages aren't already compressed all for the sake of avoiding a check box or chmod command. The ideal macOS-like integration use case for AppImages really isn't possible without it being implemented on the OS-level, so for distros that refuse to give first-party support, there will always need to be some sort of workaround. I think that the current solution of just having the user make it executable is probably the most straightforward and expected solution, and it wouldn't hurt to discuss getting 1st party support to a distro maintainer every once and a while. |
is it technically possible to make an AppImage that is also a valid zip file?
Reason:
aforensics/HiddenVM#10 (comment)
Wouldn't it be ideal if we could have a zip file that would contain an AppImage, but that could also be used as an AppImage unzipped? Best of both worlds!
The text was updated successfully, but these errors were encountered: