-
Notifications
You must be signed in to change notification settings - Fork 158
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
autoinstall: Don't use snap env when invoking early and late commands #1811
autoinstall: Don't use snap env when invoking early and late commands #1811
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from the code standpoint, thanks!
I am concerned about breaking the ability to run curtin in-target [...]
in late-commands though. I think we need to think about what it means for autoinstall users who are going to take a new subiquity snap.
a0a7bba
to
7261d6c
Compare
10100ba
to
196667b
Compare
b470bcb
to
fa20e09
Compare
fa20e09
to
0d03eea
Compare
I believe the requested changes from @ogayot are resolved - if that's in error let's fix that later, as he's not available right now to comment further. @Chris-Peterson444 - one last check - have you tried this in a VM and confirmed that doing |
I tested in a VM with |
I tried |
0d03eea
to
8f28063
Compare
Revert "Merge pull request canonical#1811 from Chris-Peterson444/lp-2032961-clean-environment-commands" This reverts commit 85af88e, reversing changes made to 143d8e3. The fix proposed in this patch caused more issues than it fixed. We will have to revisit this in a more nuanced way in the future. In the meantime users can make use of `env` directly to strip/modify the subcommand environment.
LP #2032961: We are not cleaning the environment provided to subprocesses correctly. When trying to invoke a program that should run outside of the snap context, the
LD_LIBRARY_PATH
variable is pointing to the linker on the snap, which causes errors like:We had a similar issue solved in #1300. This fix similarly uses
orig_environ
to clean the environment before running commands in the respective command controllers.I would especially appreciate some input if the license header on the new test file looks correct. It's an exact copy and paste from one of the other new tests files from this year, but I just want to be sure.