Description of problem: If a customer installs a ruby gem that contains binaries the binaries will not be found in $PATH Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Boot a CFME appliance. 2. % cd /var/www/miq/vmdb 3. % gem install <any gem that contains a binary> e.g.: % gem install gempath 4. % which gempath /usr/bin/which: no gempath in<... BLA BLA BLA> Actual results: Binary was not found in $PATH Expected results: The binary included in the installed gem should be found in $PATH Additional info: Work around is to update $PATH as follows: 1. % PATH=$PATH:/opt/rh/rh-ruby22/root/usr/local/bin/ 2. % which gempath /opt/rh/rh-ruby22/root/usr/local/bin/gempath 3. % gempath ovirt /opt/rh/cfme-gemset/gems/ovirt-0.6.0 The fix is to upate PATH in the enable script when it is created in the RPM spec for cfme-gemset. On appliance see: /opt/rh/cfme-gemset/enable
JoeV is writing a fix into the cfme-gemset enable script to add /opt/rh/rh-ruby22/root/usr/local/bin to the PATH, which should solve this issue. However, the real problem is in the SCL, as *that* package should be adding that to the PATH. I am going to open a separate ticket with them to get that added.
The diff to the cfme-gemset.spec: diff --git a/cfme-gemset.spec b/cfme-gemset.spec index c108356..4b75bfc 100644 --- a/cfme-gemset.spec +++ b/cfme-gemset.spec @@ -2,7 +2,7 @@ Name: cfme-gemset Version: 5.5.0.10 -Release: beta2.1.1%{?dist} +Release: beta2.1.2%{?dist} Summary: CloudForms Management Engine Gemset Group: Applications/System License: "GPLv2+, Apache Public License 2.0, The MIT License and Ruby License" @@ -20,7 +20,7 @@ cat <<"EOF" > enable export APPLIANCE="true" export BUNDLE_PATH=/opt/rh/cfme-gemset export GEM_PATH=/opt/rh/cfme-gemset:$(gem env path) -export PATH=/opt/rh/cfme-gemset/bin:$PATH +export PATH=/opt/rh/cfme-gemset/bin:$PATH:/opt/rh/rh-ruby22/root/usr/local/bin/ [[ -f /var/www/miq/vmdb/Gemfile.lock ]] && rm -f /var/www/miq/vmdb/Gemfile.lock ln -s /opt/rh/cfme-gemset/vmdb/Gemfile.lock /var/www/miq/vmdb/Gemfile.lock @@ -66,6 +66,9 @@ rm -rf $RPM_BUILD_ROOT %{app_root}/enable %changelog +* Tue Nov 17 2015 Joe VLcek <jvlcek> - 5.5.0.10-beta2.1.2 +- Updated enable script to include /opt/rh/rh-ruby22/root/usr/local/bin/ in PATH + * Tue Nov 10 2015 Satoe Imaishi <simaishi> - 5.5.0.10-beta2.1.1 - Building 5.5.0.10 beta2.1.1
Note to QE for how to test this fix: 1. Boot and log into a CFME appliance. 2. % cd /var/www/miq/vmdb 3. % gem install <any gem that contains an executable> e.g.: % gem install gempath The gempath gem happens to contain an executable with the same name. 4. Use the linux which(1) command to display the path to the executable included in the gem. e.g.: % which gempath 5. Invoke the executable included in the installed gem: e.g.: gempath rake If steps 4 and 5 are successful the fix is working. 6. Run the full suite of CFME tests against this appliance to confirm this fix did not adversely effect the appliance.
Verified in 5.5.0.11
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2015:2551