Bug 1032550 - scl command splits arguments with white-space
Summary: scl command splits arguments with white-space
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: scl-utils
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Zeleny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-20 11:44 UTC by Honza Horak
Modified: 2014-03-01 14:13 UTC (History)
2 users (show)

Fixed In Version: scl-utils-20140127-1.fc20
Clone Of:
Environment:
Last Closed: 2014-03-01 14:05:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Proposed patch -- use quotes for arguments in the bash script (1.01 KB, patch)
2013-11-20 11:51 UTC, Honza Horak
no flags Details | Diff

Description Honza Horak 2013-11-20 11:44:47 UTC
Description of problem:
When we run scl with -- separator and use a command that includes a white-space in an argument (we need to use quotes), the quotes disappear when a bash script is being created and as a consequence, scl call runs the command with different (split) arguments than the same command run without scl.

Version-Release number of selected component (if applicable):
scl-utils-20131017-1

How reproducible:
every-time

Steps to Reproduce:
1. cat >foo.sh<<EOF
#!/bin/bash
while [ ! -z "\$1" ] ; do
    echo \$1
    shift
done
EOF
2. $ chmod a+x foo.sh
3. $ export A="f g"
4. $ export B="h i"
5. $ echo "Without scl:"
6. $ ./foo.sh a b "c d" e $A "$B" j
7. $ echo "With scl:"
8. $ scl enable mysql55 -- ./foo.sh a b "c d" e $A "$B" j

Actual results:
Both outputs (run the same command using scl and without scl) differ:

Without scl:
a
b
c d
e
f
g
h i
j
With scl:
a
b
c
d
e
f
g
h
i
j

Expected results:
Both outputs are same:

Without scl:
a
b
c d
e
f
g
h i
j
With scl:
a
b
c d
e
f
g
h i
j

Comment 1 Honza Horak 2013-11-20 11:51:41 UTC
Created attachment 826574 [details]
Proposed patch -- use quotes for arguments in the bash script

Comment 2 Jan Zeleny 2013-11-20 12:09:33 UTC
Applied upstream, thanks for the patch.

Comment 3 Fedora Update System 2014-01-10 14:04:55 UTC
scl-utils-20140108-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/scl-utils-20140108-1.fc19

Comment 4 Fedora Update System 2014-01-10 14:05:15 UTC
scl-utils-20140108-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/scl-utils-20140108-1.fc20

Comment 5 Fedora Update System 2014-01-11 08:30:47 UTC
Package scl-utils-20140108-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing scl-utils-20140108-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0600/scl-utils-20140108-1.fc19
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-01-27 12:08:07 UTC
scl-utils-20140127-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/scl-utils-20140127-1.fc19

Comment 7 Fedora Update System 2014-01-27 12:08:39 UTC
scl-utils-20140127-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/scl-utils-20140127-1.fc20

Comment 8 Fedora Update System 2014-03-01 14:05:58 UTC
scl-utils-20140127-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2014-03-01 14:13:52 UTC
scl-utils-20140127-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


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