-
Notifications
You must be signed in to change notification settings - Fork 212
fix handling of quotes in rpath wrapper #4722
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
Open
Flamefire
wants to merge
7
commits into
easybuilders:develop
Choose a base branch
from
Flamefire:fix-rpath-wrapper
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In some software the compiler must be invoked with an argument containing a literal single quote which requires escaping in the call. E.g.: `gcc -DFOO=\'value\'` However the current rpath wrapper would remove those single quotes causing errors during compilation or erronous behavior of the compiled binary. Fix by replacing the `eval` of the `rpath_args.py` output by `readarray -t`. An array asignment could be used (`CMD_ARGS=( $(rpath_args.py ...) )`) but that would break up arguments containing spaces. Quotes from the output are kept literally, so quoting to avoid this is not possible. `readarray -t` works and is widely available. Also some minor fixes related to quoting in the bash script template.
156b79d
to
70ae337
Compare
70ae337
to
7981f47
Compare
45b6ee9
to
79e1831
Compare
@Flamefire Failing tests should be looked into, and meanwhile merge conflicts have emerged as well |
Resolved the merge conflicts. Test failures were mostly due to I also switched the separator to NULL similar to |
92cdf89
to
eb1144e
Compare
Added in Python 3 and implies `-E -s`. So use that fulfilling the TODO.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In some software the compiler must be invoked with an argument containing a literal single quote which requires escaping in the call. E.g.:
gcc -DFOO=\'value\'
However the current rpath wrapper would remove those single quotes causing errors during compilation or erronous behavior of the compiled binary.
Fix by replacing the
eval
of therpath_args.py
output byreadarray -t
. An array asignment could be used (CMD_ARGS=( $(rpath_args.py ...) )
) but that would break up arguments containing spaces. Quotes from the output are kept literally, so quoting to avoid this is not possible.readarray -t
works and is widely available.Also some minor fixes related to quoting in the bash script template.
Note: I used the NULL separator to separate arguments in the output as there is a (very small) chance an argument to the compiler contains newlines.