Bug 1029795

Summary: RFE: Allow to call main man page simply
Product: [Fedora] Fedora Reporter: Honza Horak <hhorak>
Component: scl-utilsAssignee: Jan Zeleny <jzeleny>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: bkabrda, hhorak, jzeleny, ovasik, vondruch
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: Environment:
Last Closed: 2015-01-30 04:28:50 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: 1031009, 1031011    
Bug Blocks:    
Attachments:
Description Flags
proof-of-concept patch to implement `scl man myscl` shortcut
none
alternative patch that generally allows to use generic actions none

Description Honza Horak 2013-11-13 08:50:54 UTC
Description of problem:
We'd like to have a common man page for every Software Collection, which would provide general introduction to the collections, but it should have some specific features:

* should be located under /opt/.. root, so there is no collision with system man pages and we generally want to avoid files located outside /opt

* should be easy to reach -- `scl enable myscl "man myscl"` seems too complicated for anyone who isn't familiar with SCL concept yet; something like `scl man myscl` seems much better.

I'll attach a proof-of-concept patch with a solution above later today.

Comment 1 Vít Ondruch 2013-11-13 09:08:58 UTC
If we go by "scl man myscl", I would like to see some generic solution, which would allow to have various scriptlets in place of man. I can imagine that "scl run ruby193 -- -v" would be equivalent to "scl enable ruby193 'ruby -v'", or "scl service mariadb55" would start the mariadb daemon.

Comment 2 Honza Horak 2013-11-13 12:02:59 UTC
Created attachment 823377 [details]
proof-of-concept patch to implement `scl man myscl` shortcut

As Vit said, this is probably not the smartest solution from general POV; it's rather hack. I'll try a better one.

Comment 3 Honza Horak 2013-11-13 13:33:43 UTC
Created attachment 823449 [details]
alternative patch that generally allows to use generic actions

(In reply to Vít Ondruch from comment #1)
> If we go by "scl man myscl", I would like to see some generic solution,
> which would allow to have various scriptlets in place of man. I can imagine
> that "scl run ruby193 -- -v" would be equivalent to "scl enable ruby193
> 'ruby -v'", or "scl service mariadb55" would start the mariadb daemon.

I agree and believe we are allowed to afford such a change. What we know about using generic actions other than "enable" right now is probably the only thing what scl(1) says:
"<action> is a script name to execute in a bash environment before the application itself takes in executed. Currently only enable scriptlet is mandatory which is needed to update search paths, etc."

This is really not what scl command does right now and the attached patch is something scl utility should actually do to correspond with such man page description.

Particularly, according to the man page, other actions shouldn't enable SCL environment (X_SCLS is adjusted for every action now; however, we can use scl_source for that generally in other actions' scripts, if we explicitly need it), but should just execute some bash script. In that case it doesn't make sense to enforce a command for such actions, so it should be mandatory only for enable action. Specifying an arbitrary command for other actions could be done by -- separator though.

So what the attached patch does is that it changes usage of other than enable actions as follows:

       scl enable <collection1> [<collection2> ...] <command>
       scl enable <collection1> [<collection2> ...] -- <command>
       scl <action> <collection1> [<collection2> ...]
       scl <action> <collection1> [<collection2> ...] -- <command>

I'm aware that this is a change of behaviour, but the behaviour is based on undocumented functionality, so everybody, who's used it, has done it on his own responsibility.

So, in case we want to have something similar in scl-utils 2.0, I guess we can implement something similar in current scl-utils as well.

Comment 5 Jan Zeleny 2014-04-08 11:47:47 UTC
Upstream ticket:
https://fedorahosted.org/SoftwareCollections/ticket/10

Comment 6 Fedora Update System 2015-01-21 08:27:01 UTC
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

Comment 7 Fedora Update System 2015-01-21 08:27:21 UTC
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

Comment 8 Fedora Update System 2015-01-21 23:04:46 UTC
Package scl-utils-2.0.1-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.1-2.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-1006/scl-utils-2.0.1-2.fc21
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2015-01-30 04:28:50 UTC
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.

Comment 10 Fedora Update System 2015-01-30 04:44:20 UTC
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.