Bug 1029795 - RFE: Allow to call main man page simply
RFE: Allow to call main man page simply
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: scl-utils (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jan Zeleny
Fedora Extras Quality Assurance
:
Depends On: 1031009 1031011
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-13 03:50 EST by Honza Horak
Modified: 2015-01-29 23:44 EST (History)
5 users (show)

See Also:
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-29 23:28:50 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proof-of-concept patch to implement `scl man myscl` shortcut (1.47 KB, patch)
2013-11-13 07:02 EST, Honza Horak
no flags Details | Diff
alternative patch that generally allows to use generic actions (2.74 KB, patch)
2013-11-13 08:33 EST, Honza Horak
no flags Details | Diff

  None (edit)
Description Honza Horak 2013-11-13 03:50:54 EST
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 04:08:58 EST
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 07:02:59 EST
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 08:33:43 EST
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 07:47:47 EDT
Upstream ticket:
https://fedorahosted.org/SoftwareCollections/ticket/10
Comment 6 Fedora Update System 2015-01-21 03:27:01 EST
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 03:27:21 EST
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 18:04:46 EST
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-29 23:28:50 EST
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-29 23:44:20 EST
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.

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