Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I saw TheAssassin made this repo but nothing has been added, so instead of waiting here is my two cents of what a type3 AppImage must be.
Note: This is all already supported by the uruntime minus the
ARG0change which is something I want to get upstreamed first.Rationale behind some of these changes:
The reason is that this allows reusing already running AppImages instead of creating multiple mountpoints which wastes resources. Fixes AppImage/AppImageKit#1100
By making it a hash of the AppImage we avoid any possible conflict with other AppImages and make sure the mounpoint is reused by the same application only.
APPIMAGEWhich points to the location of the AppImage with symlinks followedARG0Which points to the location of the AppImage without following symlinksOWDPath to the working directory when the AppImage was executedThe reason I have changed
ARGV0forARG0is becasueARGV0causes a ton of problems with zsh to the point that I've seen projects code workarounds for this in their code instead of just unsetting the variable manually in theAppRunwhich that on its own is a terrible hack.Even I that I'm aware of this problem have been bitten by it multiple times, the most recent one was this, which was fixed previously...
HOME,XDG_DATA_HOME,XDG_CONFIG_HOMEandXDG_CACHE_HOMEby setting the following envrioment variables:*
REAL_HOMETo the value ofHOMEbefore chaging it*
REAL_XDG_DATA_HOMETo the value ofXDG_DATA_HOMEbefore chaging it*
REAL_XDG_CONFIG_HOMETo the value ofXDG_CONFIG_HOMEbefore changing it*
REAL_XDG_CACHA_HOMETo the value ofXDG_CACHE_HOMEbefore changing itREAL_*enviroment variables are already set, the AppImage MUST NOT change their valueREAL_*variables to the defaults specificed in the XDG Base directory specificationBy keeping the original values of these enviroment variables, the application can restore them before executing child processes. This fixes the issue of other apps using the portable directories of the AppImage.
Since the uruntime does this already, we have this
xdg-openwrapper with all of our sharun AppImages that restores the enviroment variables. For applications like terminal emulators I preload a library that does the same.snap also does something similar already btw
Now onto things I don't think need to be changed.
I don't think it is a good idea to mandate a specific filesystem or compression algo, because maybe in 5 years from now some new format that is much better comes out and we are not able to use it.
Instead it is better to mandate specific flags into the AppImage runtime, that way tools like libappimage can instead falllback to using
--appimage-extractfor example, and this can be done easily in a sandboxThis is also why
--appimage-extractmust extract to anAppDirdirectory instead ofsquashfs-root, since the filesystem may be completely different, the AppImage can instead make asquashfs-rootsymlink to keep compatiblity with existing scripts/tools that expect asquashfs-rootdirectory.I also don't think we need to change the magic bytes, since most of these changes do not break backwards compatibility with existing tools, for example
appimageupdatetoolhas no problem updating an AppImage that follows this type3 spec.