feat: Add --no-eval for OCI compatible argument and env var handling #704
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Pull Request (PR):
Address #487 by adding a
--no-eval
actions flag, which does the following:Quotes environment variable values in the
inject-singularity-env.sh
generated script using single quotes toensure the values are not evaluated when the injection script is sourced.
This behavior applies to existing and newly created images.
Uses an alternate path in the generated runscript for images built from OCI sources, that avoids evaluating CMD / ENTRYPOINT parts, and args in the shell.
This behavior only applies to newly created images, that contain the new form of the generated OCI runscript.
The
--no-eval
flag is implictly added by the Docker/OCI--compat
mode.Also adds test cases that cover this new functionality, the historic behavior, and general handling of CMD / ENTRYPOINT/ CMD+ENTRYPOINT handling and overrides in Docker/OCI images. This should help us a lot in catching any changes to the 'historic' behaviour, that has been modified inadvertently in the past.
There is no change to the historic behavior of Singularity (run without
--no-eval
or--compat
) at this time. OCI / Docker compatible handling by default may be considered for a future release.This fixes or addresses the following GitHub issues:
Before submitting a PR, make sure you have done the following:
make check
and tested this PR locally with amake test
, andmake testall
if possible (see CONTRIBUTING.md).