Bug 956618 - scl-utils: better support for passing command arguments
Summary: scl-utils: better support for passing command arguments
Keywords:
Status: CLOSED DUPLICATE of bug 924120
Alias: None
Product: Fedora
Classification: Fedora
Component: scl-utils
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Zeleny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 953462
TreeView+ depends on / blocked
 
Reported: 2013-04-25 10:18 UTC by Florian Weimer
Modified: 2014-03-26 11:16 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-06-19 08:10:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Florian Weimer 2013-04-25 10:18:07 UTC
If I want to run a program with "scl enable COLLECTION", I have to put the program and its arguments in a single argument string, with appropriate shell quoting.  It would be more convenient (and safer for custom-written scripts) if the scl program would accept a program and its arguments, preserve the argument list internally, and finally pass it to the program being executed.  This is similar to how "sudo" works, for instance.

Comment 1 Stewart Brodie 2013-06-17 14:32:04 UTC
This is show stopper for me.

I have a wrapper script for 'make' that my build system uses to set environment variables before calling the real make, so it sets things up and then does:  exec make "$@"

I now have a need to run make within an scl environment so I can use an alternative toolchain, but it doesn't work as I cannot re-quote the contents of $@ such that scl processes it correctly.

Comment 2 Jan Zeleny 2013-06-19 08:10:36 UTC
The only possible solution of this issue is requested in bug #924120

*** This bug has been marked as a duplicate of bug 924120 ***

Comment 3 Stewart Brodie 2014-03-26 11:09:46 UTC
Bug #924120 is not a duplicate of this issue.  That bug represents introducing the proper -- marker to delimit the scl parameters from the command to be executed.

This bug is about the command being executed with the wrong parameters, because scl is confused by quotes in parameters.

Now, the parameters are being written into the underlying script with unsafe quoting, so that if parameters contain quotes, it breaks.

If it really must write the command to a temporary shell script, the scl utility needs to use single quotes for the parameters and then carefully escape any single quotes found in the arguments that it is preserving.

However, it's no longer a show stopper for me as I wrote my own version of the scl utility as a very short shell script instead.

Comment 4 Stewart Brodie 2014-03-26 11:16:15 UTC
Bug #1030929 would probably fix this issue, instead.


Note You need to log in before you can comment on or make changes to this bug.