Bug 1058796
Summary: | Add support for SCL in shebangs | |||
---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Vít Ondruch <vondruch> | |
Component: | scl-utils | Assignee: | Jan Zeleny <jzeleny> | |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | rawhide | CC: | bkabrda, hhorak, iakov.gan, jzeleny, lzap, msuchy | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | scl-utils-2.0.1-2.fc21 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1369788 (view as bug list) | Environment: | ||
Last Closed: | 2015-01-30 04:28:51 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 949833, 1369788, 1390495 |
Description
Vít Ondruch
2014-01-28 14:36:16 UTC
Note that since bug 924120 you can use -- as delimiter, which can get you help rid of quotes: /usr/bin/scl enable ruby193 -- ruby But that does not solve the problem with shebang behaviour :( I would not like modification of scl itself. Because it opens question how to parse options which contains spaces: ruby -e puts\ "foo" Instead we can ship with scl-utils script called scl-shebang, which will be: #!/bin/bash ACTION = $1 COLLECTION = $2 shift 2 scl "$ACTION" "$COLLECTION" $@ And you should be then able to run #!/usr/bin/scl-shebang enable ruby193 -- ruby --some-param (In reply to Miroslav Suchý from comment #1) > Instead we can ship with scl-utils script called scl-shebang, which will be: > #!/bin/bash > ACTION = $1 > COLLECTION = $2 > shift 2 > scl "$ACTION" "$COLLECTION" $@ > > And you should be then able to run > #!/usr/bin/scl-shebang enable ruby193 -- ruby --some-param IIUIC, the script gets only $1 set to value 'enable ruby193 -- ruby --some-param' in this example, so it should have to look differently; e.g. like the following: #!/bin/sh eval scl $@ Anyway, +1 for additional script, since making scl more complex doesn't seem like a good idea for me. Thank you guys for your input. Definitely good idea with scl-shebang wrapper. Nevertheless, I am still slightly in favor of my original proposal for single reason - it does not need any additional documentation IMO. Using "#!/usr/bin/scl enable ruby193 ruby" shebang is naturally the first thing people will try and fail with confusing: "Need at least 3 arguments. Run scl --help to get help." So I would first try to modify the scl and if this attempt fails, I would go with something like scl-shebang. Btw I agree with Honza's commet #2 (did not tested it though ;). Upstream ticket: https://fedorahosted.org/SoftwareCollections/ticket/13 scl-utils-2.0-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/scl-utils-2.0-2.fc20 scl-utils-2.0-2.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/scl-utils-2.0-2.fc21 Package scl-utils-2.0-2.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing scl-utils-2.0-2.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-0479/scl-utils-2.0-2.fc21 then log in and leave karma (feedback). scl-utils-2.0.1-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/scl-utils-2.0.1-1.fc21 scl-utils-2.0.1-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/scl-utils-2.0.1-1.fc20 Can you please post here, what solution you choose? How this report was resolved? This works as of scl-utils-2.0: #!/usr/bin/scl enable <collection> -- <command> If you find any problems, let us know. scl-utils-2.0.1-2.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. scl-utils-2.0.1-2.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. Any idea when/how scl-utils-2.0.1 will be avalible for RHEL? (In reply to iakov Gan from comment #14) > Any idea when/how scl-utils-2.0.1 will be avalible for RHEL? I would not expect it any time soon due to backward compatibility issues. |