| Summary: | Not able to build a rubygem RPM with additional SCL package | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Software Collections | Reporter: | Satoe Imaishi <simaishi> | ||||
| Component: | ruby | Assignee: | ruby maint <ruby-maint> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | rh-ruby23 | CC: | jorton, slukasik, vondruch | ||||
| Target Milestone: | alpha | ||||||
| Target Release: | 2.2 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-10-03 10:15:52 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: | |||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1378545 | ||||||
| Attachments: |
|
||||||
|
Description
Satoe Imaishi
2016-09-27 12:30:55 UTC
I don't understand why the default_dir logic is failing in operating_system.rb (will leave that to Vit & Pavel), but you could work around that by over-riding X_SCLS:
%{?scl:scl enable %{scl} rh-postgresql95 - << \EOF}
X_SCLS="rh-ruby23"
%gem_install
%{?scl:EOF}
AFAICT this shouldn't make any difference to the build.
Thank you for the workaround, verified it builds fine with X_SCLS. (In reply to Joe Orton from comment #1) > X_SCLS="rh-ruby23" This is definitely not the right solution, since it installs the gem files into rh-ruby23 directory structure. What is the collection you are working on? Is it the "cfme" collection and is this [1] the metapackage? I am asking, since the error is actually in your collection metapackage. It does not set GEM_PATH env variable, as is suggested by the guidelines [2]. But this metapackage is complete rubbish I must say (no offense). It does not even contain the 'enable' scriptlet nor other stuff we commonly provide in meta package, such as -build, -runtime and -scldevel subpackages. Please take look at rh-ror42 metapackage [3], which is metapackage of collection building atop of rh-ruby23. [1] http://pkgs.devel.redhat.com/cgit/rpms/cfme/tree/cfme.spec?h=cfme-rh-ruby23-5.7-rhel-7 [2] https://access.redhat.com/documentation/en-US/Red_Hat_Software_Collections/2/html/Packaging_Guide/sect-Extending_the_rh-ruby22_Software_Collections.html [3] http://pkgs.devel.redhat.com/cgit/rpms/rh-ror42/tree/rh-ror42.spec?h=rhscl-2.3-rh-ror42-rhel-7 No, it's not 'cfme', but it's 'rubygem-pg' [1].
This itself isn't a new collection, but just a rubygem RPM that goes with rh-ruby23. So I don't think we need to build all those subpackages described in the guideline. But I will go over the document. Thank you for the reference.
I've added "X_SCLS=%{scl}" in the spec file (rather than hard-coding rh-ruby23). I see rh-ror42 is setting it the same way, so at least that part is good, I hope.
[1] http://pkgs.devel.redhat.com/cgit/rpms/rubygem-pg/tree/rubygem-pg.spec?h=cfme-rh-ruby23-5.7-rhel-7&id=ebbb088138aca7a3f03e589ec5c13da9f474f57c
(In reply to Satoe Imaishi from comment #4) > No, it's not 'cfme', but it's 'rubygem-pg' [1]. > > This itself isn't a new collection, but just a rubygem RPM that goes with > rh-ruby23. I am sorry, but something like this is not supported. The only supported way how to extend the collection is described in the documentation I referred above. > So I don't think we need to build all those subpackages > described in the guideline. But I will go over the document. Thank you for > the reference. > > I've added "X_SCLS=%{scl}" in the spec file (rather than hard-coding > rh-ruby23). You are not supposed to install anything into rh-ruby23 directory structure. > I see rh-ror42 is setting it the same way, so at least that part > is good, I hope. rh-ror42 is doing so, because it is metapackage. That is completely different reason. I am sorry, but I am closing this ticket, since you are not following guidelines and best practices. Of course please don't hesitate to contact me if you need some help creating proper SCL extension, i.e. proper metapackage and rubygem-pg packages. |