-
Notifications
You must be signed in to change notification settings - Fork 13
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
$HOME ends up hardcoded in shebangs #12
Comments
Stuff in shebangs can't be trusted with this plugin. The best solution is to always write your own AppRun script, and hand it to linuxdeploy with |
This is what I am doing now, but let's also keep in mind that the main payload app might call other scripts, in which case the custom |
You can't have "relative" paths in shebangs. The only thing we could do would be to remove all shebangs and force you to use a script anyway. |
Are you sure about this? Let's play around with variations of
|
https://stackoverflow.com/a/33225083 recommends
|
The first solution doesn't work as we don't set The second one is super ugly, and noone really knows whether that'd work reliably... (there's different implementations of AWK)... but it might go in the right direction... |
The |
Which is still better than a hardcoded path which everyone knows with certainty will not work ;-) |
You probably haven't tested on all X distros against all implementations of awk, did you? Also, who says awk might be installed? It's not part of a default installation. Again: my "solution" is to remove all shebangs. |
What happens if Python script A tries to exec Python script B? |
Why should they not do it in Python directly? You shouldn't rely on such stuff. Also, why these virtual questions? You can't auto fix this in a good way, I guess we've come to this conclusion. If you find a solution, please feel free to send a PR. But right now, I don't see any good ways. |
The awk above is better than leaving a hardcoded string that never works, can we agree on that? |
No, because that string would a) have to be generated for every file in every directory relative to the Python interpreter. It's a huge mess! |
@probonopd are you willing to send a PR implementing your |
Right now I cant`do it due to lack of time, maybe when I next time run into the issue... or maybe someone else does it in the meantime. How does @niess handle this type of thing in https://github.com/niess/linuxdeploy-plugin-python? |
@probonopd: following the install of python and extra packages (using pip), the plugin script looks for any Python script under /bin and replaces its absolute shebang with a relative one (see L179). I use the I have to say that I didn't investigate the pros and cons of the various options discussed there. I implemented the |
@niess mind to send us a PR? I mean, as long as only the shebang is modified, it won't break anything. The recommended way is to avoid relying on shebangs, though. |
This removes some of the wrong paths pointing to the build location of the AppImage by using a different shebang and some environment variables. Fixes linuxdeploy#12, linuxdeploy#25 and linuxdeploy#32
This removes some of the wrong paths pointing to the build location of the AppImage by using a different shebang and some environment variables. Fixes linuxdeploy#12, linuxdeploy#25 and linuxdeploy#32
This removes some of the wrong paths pointing to the build location of the AppImage by using a different shebang and some environment variables. Fixes linuxdeploy#12, linuxdeploy#25 and linuxdeploy#32
This removes some of the wrong paths pointing to the build location of the AppImage by using a different shebang and some environment variables. Fixes linuxdeploy#12, linuxdeploy#25 and linuxdeploy#32
This removes some of the wrong paths pointing to the build location of the AppImage by using a different shebang and some environment variables. Fixes linuxdeploy#12, linuxdeploy#25 and linuxdeploy#32
This removes some of the wrong paths pointing to the build location of the AppImage by using a different shebang and some environment variables. Fixes linuxdeploy#12, linuxdeploy#25 and linuxdeploy#32
This removes some of the wrong, absolute paths pointing to the build location of the AppImage by using a different shebang and some environment variables, set by the linuxdeploy-plugin-conda-hook at the AppImage start. Fixes linuxdeploy#12, fixes linuxdeploy#25 and fixes linuxdeploy#32
This removes some of the wrong, absolute paths pointing to the build location of the AppImage by using a different shebang and some environment variables, set by the linuxdeploy-plugin-conda-hook at the AppImage start. Fixes linuxdeploy#12, fixes linuxdeploy#25 and fixes linuxdeploy#32
This removes some of the wrong, absolute paths pointing to the build location of the AppImage by using a different shebang and some environment variables, set by the linuxdeploy-plugin-conda-hook at the AppImage start. Fixes linuxdeploy#12, fixes linuxdeploy#25 and fixes linuxdeploy#32
Using this script, and then deleting the original
AppDir
, I get when I try to run the AppImage:/home/me/AppDir/
was the location of theAppDir
at creation time. It should not be hardcoded, especially not in shebangs.The text was updated successfully, but these errors were encountered: