-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
bin/docker: fix broken escaping and variable substitution #24793
Conversation
In containers#24034 more variables were added to the envsubst input, but there is no escaping with envsubst, so the resulting bash script never used XDG_CONFIG_HOME. Also it replaced HOME with the build time HOME env var breaking the runtime subsitution, resulting in something bogus like: [ -e "\${XDG_CONFIG_HOME-\/home/build/.config}/containers/nodocker" ] Fix by telling envsubst to just replace BINDIR and ETCDIR and remove the broken escaping in the envsubst input. Signed-off-by: Christoph Reiter <[email protected]>
9e52dc0
to
9c14d15
Compare
(I assume there is no way to test this in the test suite? regarding the CI/label etc.) |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe, lazka The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
Thanks @lazka |
thanks! |
In #24034 more variables were added to the envsubst input, but there is no escaping with envsubst, so the resulting bash script never used XDG_CONFIG_HOME. Also it replaced HOME with the build time HOME env var breaking the runtime subsitution, resulting in something bogus like:
[ -e "\${XDG_CONFIG_HOME-\/home/build/.config}/containers/nodocker" ]
Fix by telling envsubst to just replace BINDIR and ETCDIR (double $$ for make escaping) and remove the broken escaping in the envsubst input.
Does this PR introduce a user-facing change?