Bug 1377883

Summary: redcloth_path.so installed in incorrect location
Product: [Fedora] Fedora EPEL Reporter: Orion Poplawski <orion>
Component: rubygem-RedClothAssignee: greg.hellings
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: epel7CC: greg.hellings, vondruch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-RedCloth-4.2.9-14.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-11 17:21:07 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:
Attachments:
Description Flags
Fix lib install location none

Description Orion Poplawski 2016-09-20 22:07:01 UTC
Description of problem:

Trying to run a rake task that makes use of redcloth_scan I get:

# bundle exec rake snorby:setup
Jammit Warning: Asset compression disabled -- Java unavailable.
rake aborted!
cannot load such file -- redcloth_scan
Couldn't load redcloth_scan
The $LOAD_PATH was:
....
/usr/share/gems/gems/RedCloth-4.2.9/lib
/usr/share/gems/gems/RedCloth-4.2.9/lib/case_sensitive_require
/usr/share/gems/gems/RedCloth-4.2.9/ext
/usr/lib64/gems/ruby/RedCloth-4.2.9/lib
....

But redcloth_scan.so is installed here:
/usr/lib64/gems/ruby/RedCloth-4.2.9/redcloth_scan.so

Version-Release number of selected component (if applicable):
rubygem-RedCloth-4.2.9-13.el7

Comment 1 Orion Poplawski 2016-09-20 22:08:32 UTC
Created attachment 1203060 [details]
Fix lib install location

This appears to do the trick and fixes my rake error.

Comment 2 Vít Ondruch 2016-09-21 15:11:18 UTC
These are older guidelines which should be applied for EPEL7 packages:

https://fedoraproject.org/w/index.php?title=Packaging:Ruby&oldid=363159

precisely this part:


```
# If there are C extensions, mv them to the extdir.
# You must replace REQUIRE_PATHS according to your gem specifics.
mkdir -p %{buildroot}%{gem_extdir_mri}/REQUIRE_PATHS
mv %{buildroot}%{gem_instdir}/REQUIRE_PATHS/shared_object.so %{buildroot}%{gem_extdir_mri}/REQUIRE_PATHS/

You should replace REQUIRE_PATHS with the first value of the require_paths field in the gemspec file. It will typically be either "lib" or "ext". For instance if you find following line in your gemspec file:

   s.require_paths = ["lib"]

then the example above would look like:

mkdir -p %{buildroot}%{gem_extdir_mri}/lib
mv %{buildroot}%{gem_instdir}/lib/shared_object.so %{buildroot}%{gem_extdir_mri}/lib/
```

Comment 3 Orion Poplawski 2016-09-21 15:52:18 UTC
I think the same error is in rubygem-bcrypt.  Greg - you probably want to check your other EPEL7 rubygem packages as well.

Comment 4 greg.hellings 2016-09-23 13:53:01 UTC
(In reply to Orion Poplawski from comment #3)
> I think the same error is in rubygem-bcrypt.  Greg - you probably want to
> check your other EPEL7 rubygem packages as well.

Indeed, one of the gems I was trying to package that depended on bcrypt keeps having issues finding the library and I was struggling to identify why that was.

Comment 5 greg.hellings 2016-09-23 14:50:59 UTC
I've pushed a new version with the pathing change to Bodhi - it should come available in updates-testing in the next compose.

Comment 6 Fedora Update System 2016-09-26 22:49:18 UTC
rubygem-RedCloth-4.2.9-14.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-51dededba0

Comment 7 Fedora Update System 2016-10-11 17:21:07 UTC
rubygem-RedCloth-4.2.9-14.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.