RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1032460 - RFE: provide delimiter between collections and command
Summary: RFE: provide delimiter between collections and command
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: scl-utils
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Jan Zeleny
QA Contact: Lukáš Zachar
URL:
Whiteboard:
Depends On: 924120 1029517 1040861
Blocks: 953462 965565 1007875
TreeView+ depends on / blocked
 
Reported: 2013-11-20 09:20 UTC by Jan Zeleny
Modified: 2014-06-18 08:01 UTC (History)
8 users (show)

Fixed In Version: scl-utils-20130529-2.el7
Doc Type: Enhancement
Doc Text:
Clone Of: 1029517
Environment:
Last Closed: 2014-06-13 11:44:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Zeleny 2013-11-20 09:20:44 UTC
+++ This bug was initially created as a clone of Bug #1029517 +++

+++ This bug was initially created as a clone of Bug #924120 +++

Description of problem:
scl has syntax:
  scl <action> [<collection1> <collection2> ...] <command>
So only last param is evaluated as command.

Now imagine real life situation of porting application to SC. I have command in init.d script:
THIN="/usr/bin/thin"
$THIN start --user foreman --environment production --group foreman --config /etc/foreman/thin.yml --rackup /usr/share/foreman/config.ru

I can easily replace THIN in %build phase of spec file. So I will get
THIN="scl enable ruby193"
But then the command is evaluated to:
scl enable ruby193 thin start --user foreman --environment production --group foreman --config /etc/foreman/thin.yml --rackup /usr/share/foreman/config.ru
But that means that "thin" and "start" etc. are treated as collection names.
Resulting in error:
Unable to open /etc/scl/prefixes/thin!

I learn that I have to run
scl enable ruby193 'thin start --user foreman --environment production --group foreman --config /etc/foreman/thin.yml --rackup /usr/share/foreman/config.ru'
But this is much harder to do automatically.

Life would be much easier if scl would have some delimiter. I.e. if the syntax would be:
 scl <action> [<collection1> <collection2> ...] [--] <command>
So I can write something like
 scl enable ruby193 -- echo ahoj
Where everything after "--" would be taken as command.

--- Additional comment from Jan Zeleny on 2013-06-19 10:10:36 CEST ---



--- Additional comment from Fedora Update System on 2013-10-16 09:42:18 CEST ---

scl-utils-20131015-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/scl-utils-20131015-1.fc20

--- Additional comment from Fedora Update System on 2013-10-16 09:43:00 CEST ---

scl-utils-20131015-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/scl-utils-20131015-1.fc19

--- Additional comment from Miroslav Suchý on 2013-10-16 09:56:37 CEST ---

FAILQA

[root@dri//tmp]# rpm -Uvh ruby193-runtime-1-9.el6.x86_64.rpm ruby193-1-9.el6.x86_64.rpm --nodeps
Preparing...                          ################################# [100%]
Updating / installing...
   1:ruby193-1-9.el6                  ################################# [ 50%]
   2:ruby193-runtime-1-9.el6          ################################# [100%]
[root@dri//tmp]# scl enable ruby193 -- echo ahoj
Unable to open /etc/scl/conf/--!
[root@dri//tmp]# scl enable ruby193  echo ahoj
Unable to open /etc/scl/conf/echo!


[root@dri//tmp]# rpm -q scl-utils
scl-utils-20131015-1.fc19.x86_64

--- Additional comment from Jan Zeleny on 2013-10-16 10:53:49 CEST ---

My bad, sorry. New update on the way.

--- Additional comment from Jan Zeleny on 2013-10-16 12:32:01 CEST ---

The new update is here:
https://admin.fedoraproject.org/updates/scl-utils-20131016-1.fc19

--- Additional comment from Jan Zeleny on 2013-10-17 16:22:21 CEST ---

While testing on real-life collections I found one unrelated issue in scl-utils, a new update has been issued:

https://admin.fedoraproject.org/updates/scl-utils-20131017-1.fc19

--- Additional comment from Fedora Update System on 2013-10-17 22:32:20 CEST ---

Package scl-utils-20131017-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing scl-utils-20131017-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-19205/scl-utils-20131017-1.fc20
then log in and leave karma (feedback).

--- Additional comment from Fedora Update System on 2013-11-10 08:18:59 CET ---

scl-utils-20131017-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Ludek Smid 2014-06-13 11:44:54 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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