Skip to content
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

[Linux AppImage] support type 2 image format #832

Closed
probonopd opened this issue Oct 17, 2016 · 6 comments
Closed

[Linux AppImage] support type 2 image format #832

probonopd opened this issue Oct 17, 2016 · 6 comments

Comments

@probonopd
Copy link

probonopd commented Oct 17, 2016

Just a heads-up that we are working on the type 2 image format for AppImage. It will have a number of advantages:

  • Uses more mordern, more flexible squashfs rather than outdated zisofs
  • Optionally, can use different compressors
  • Optionally, can embed digital signatures in an ELF section inside the AppImage
  • Does not require fixed offsets
  • Stores optional update information in an ELF section
  • Is more future-proof

Since electron-builder is an important stakeholder in the AppImage ecosystem, some aspects of the type 2 image format were specifically designed with tools like electron-builder in mind that might want to use their own tools (e.g., mksquashfs, similar to xorriso) rather than the ones provided by AppImageKit, in fact this has been made super simple:

mksquashfs Your.AppDir Your.squashfs -root-owned -noappend
cat runtime >> Your.AppImage
cat Your.squashfs >> Your.AppImage
chmod a+x Your.AppImage

Note that there are no fixed offsets to observe, unlike with type 1 AppImages.

If you want to play with it, here are the tools (will move into AppImageKit when ready):
https://github.com/probonopd/appimagetool

Would electron-builder consider to switch to the type 2 image format? If no, what would need to be changed?

@develar
Copy link
Member

develar commented Oct 18, 2016

The only important reason why electron-builder doesn't use original tool to build AppImage — mappings.

mksquashfs also supports several source directories. If you don't want to complicate appimagetool — I realized, that there is a simple solution — copy using hard links (cp -al). So, I will try to use appimagetool soon.

Will be cool if you can provide appimagetool builds for x64/x32/arm, or at least, docker images to build :) (as far I see, runtime.c is a part of tool).

@develar
Copy link
Member

develar commented Oct 18, 2016

super simple

I see that now signing is supported, so, it will be better to use original tool to build AppImage. But — thanks that AppImage still can be built using standard tools.

@probonopd
Copy link
Author

probonopd commented Oct 18, 2016

mksquashfs also supports several source directories.

I don't think it lets you combine arbitrary directories. Specifically, you end up with only directories and no files in the root directory. Or am I missing something?

Will be cool if you can provide appimagetool builds for x64/x32/arm

Yes, I am looking into building on x64/x32 CentOS 6 at the moment.

@GitZamfir
Copy link

Hello.
I was wondering what the status of this is, it appears electron builder still only supports Type 1, which prevents issues when trying to extract and run inside docker containers, where the https://github.com/AppImage/AppImageKit/wiki/FUSE documentation seems to show that Type 2 Release 9 its a lot easier?

@develar
Copy link
Member

develar commented Sep 21, 2017

Status — overloaded :( Will be done in several weeks as part of Linux auto update.

develar added a commit to develar/electron-builder that referenced this issue Oct 2, 2017
develar added a commit to develar/electron-builder that referenced this issue Oct 2, 2017
develar added a commit to develar/electron-builder that referenced this issue Oct 2, 2017
develar added a commit to develar/electron-builder that referenced this issue Oct 2, 2017
@develar develar closed this as completed in c8cd76a Oct 2, 2017
@probonopd
Copy link
Author

probonopd commented Oct 2, 2017

👍

cc @TheAssassin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants