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

--appimage-extract-and-run #842

Merged
merged 21 commits into from
Aug 16, 2018
Merged

Conversation

TheAssassin
Copy link
Member

Fixes #841.

This is still WIP, please don't merge yet.

@TheAssassin
Copy link
Member Author

The build fails due to us using a "too old" version of GLib. As we build it ourselves anyway, I'm updating GLib at the moment in AppImageBuild, and will push the up to date images as soon as possible. Then, we can simply retry the build. I don't want to upgrade GLib any further to retain some backwards compatibility, i.e., if it doesn't work, I'll have to replace the offending code.

@TheAssassin
Copy link
Member Author

My bad. The issue is of course not in GLib but glibc, which we can not upgrade. I'm replacing fts.h with good ol' ftw.h therefore, which supports LFS (large file systems) and also -D_FILE_OFFSET_BITS=64.

Note for myself: Don't try to use fts.h on glibc < 2.23.

@TheAssassin
Copy link
Member Author

As the PR introduces some larger changes, I'll take the time to re-read all diffs to find potential remaining issues. I will merge the PR as soon as possible.

@TheAssassin TheAssassin merged commit 581f982 into appimagetool/master Aug 16, 2018
@TheAssassin TheAssassin deleted the appimage-extract-and-run branch August 16, 2018 23:30
@bruce-one
Copy link
Contributor

We actually use a customised appimage runtime that automatically uses this (more accurately, our equivalent) functionality if the fuse/squashfs functionality fails.

Not sure if there's any interest in doing that here, but it removes the need for the argument and does it seamlessly if have_libloaded == 0 or if fusefs_main fails. (The code does the extraction to the mount path without the squashfs-root prefix, to keep the logic simple.)

Just a passing thought :-)

@TheAssassin
Copy link
Member Author

We actually use a customised appimage runtime that automatically uses this (more accurately, our equivalent) functionality if the fuse/squashfs functionality fails.

We decided that this is unacceptable for us, as it ruins AppImage's UX. Please don't call that an AppImage then. This is a workaround which must not be available by default! AppImages must not be degraded to self-extracting archives!

Quoting the spec:

MUST, when executed, mount the AppImage and execute the executable file AppRun contained in the root of the filesystem image

@bruce-one
Copy link
Contributor

Thanks for the heads up, absolutely understood :-)

@hongtron
Copy link

hongtron commented Nov 6, 2019

Is there a way to silence the extraction output? I'm using the neovim AppImage in a Docker container and alias nvim="/path/to/nvim.appimage --appimage-extract-and-run", but it's a bummer to get all that output whenever I need to run the image. I tried redirecting the output, but I think that's a no-go for opening an interactive program like a text editor.

@probonopd
Copy link
Member

probonopd commented Nov 6, 2019

Why not something like

/path/to/nvim.appimage --appimage-extract
alias nvim=$(readlink -f squashfs-root/AppRun)

?

That way you don't need to extract every time you want to run it.

@TheAssassin
Copy link
Member Author

Actually I support the idea of silencing the option. This is not the first time the issue is brought up. I'd rather introduce a export VERBOSE=1 or something for debugging.

@hongtron please make a separate issue. Random comments in closed issues are predestined to be lost.

@hongtron
Copy link

hongtron commented Nov 7, 2019

👍 @TheAssassin done: #1002

And thank you @probonopd, I think your workaround is feasible for my use case so I will explore that in the meantime.

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

Successfully merging this pull request may close these issues.

4 participants