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

Cleanup execution environment across wrappers and entrypoints #4147

Merged
merged 6 commits into from
Sep 18, 2023

Conversation

neoaggelos
Copy link
Contributor

Summary

Add a single use_snap_env helper function to configure the execution environment so that binaries and libraries take precedence over the ones from the host environment.

Changes

  • Add use_snap_env function to configure PATH, LD_LIBRARY_PATH, PYTHONPATH, LANG, LC_ALL, PYTHONNOUSERSITE, OPENSSL_CONF
  • Cleanup all wrappers and replace ad-hoc logic with the helper util
  • Change shebang from /bin/bash to /usr/bin/env bash to fix issues with foreign distributions.

@neoaggelos neoaggelos force-pushed the fix/envs branch 2 times, most recently from e18ee3b to 42ff182 Compare August 14, 2023 14:27
@ktsakalozos
Copy link
Member

@neoaggelos lets not forget to handle the LD_LIBRARY_PATH and PATH in the sudo -E calls.

@ktsakalozos ktsakalozos self-requested a review September 2, 2023 08:12
@neoaggelos neoaggelos force-pushed the fix/envs branch 2 times, most recently from 4ef0e5b to c38f763 Compare September 11, 2023 07:05
@ktsakalozos ktsakalozos merged commit 0a02b02 into master Sep 18, 2023
12 checks passed
@ktsakalozos ktsakalozos deleted the fix/envs branch September 18, 2023 06:22
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.

None yet

2 participants