Bug 1266529

Summary: Applications breaks when certain software collections are enabled
Product: Red Hat Software Collections Reporter: Piyush Bhoot <pbhoot>
Component: python27Assignee: Charalampos Stratakis <cstratak>
Status: CLOSED ERRATA QA Contact: Branislav Náter <bnater>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: python27CC: bnater, drieden, jberan, kanderso
Target Milestone: rc   
Target Release: 2.2   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: python27-1.1-25.el6 python27-1.1-25.el7 Doc Type: Bug Fix
Doc Text:
Cause: XDG_DATA_DIRS variable is set to point to paths within scl directory only Consequence: Some applications which rely on XDG_DATA_DIRS variable fails to function Fix: extend XDG_DATA_DIRS variable definition with following paths: /usr/share and /usr/local/share Result: Applications which rely on XDG_DATA_DIRS variable should now work properly
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-31 10:24:45 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:

Description Piyush Bhoot 2015-09-25 14:12:13 UTC
Description of problem:
Applications breaks when certain software collections are enabled

Version-Release number of selected component (if applicable):
scl-utils-20120927-27.el6_6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. # evince dbg.pdf
(This should work)

# source scl_source enable python27

Actual results:
# evince dbg.pdf
(This should fail with the message unable to open document: File type application/octet-stream type (application/octet-stream) is not supported)

Expected results:
File should open


Additional info:

# unset XDG_DATA_DIRS
# evince dbg.pdf
(Should work now)

To workaround this issue, a symbolic link should be created between /usr/share/mime/packages/ and /opt/rh/python27/root/usr/share/mime/packages directories by executing below command :

ln -s /usr/share/mime/packages/ /opt/rh/python27/root/usr/share/mime/packages

and then execute 'update-mime-database /opt/rh/python27/root/usr/share/mime'

It should not set XDG_DATA_DIRS if /opt/rh/python27/root/usr/share/ does not contain required files.

We have following strategy 

/opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2/libstdc++.so

/opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2/libstdc++.so: 
ASCII C program text

/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf64-x86-64)
INPUT ( /usr/lib64/libstdc++.so.6 -lstdc++_nonshared )

Comment 2 Ľuboš Kardoš 2015-09-25 14:25:49 UTC
This has to be fixed in enable scriptlet of the collection. See also bug 1252845

Comment 5 Branislav Náter 2016-04-14 17:52:12 UTC
Fix is incorrect. There are two curly brackets in the enable script instead of just one.

# rpm -q python27
python27-1.1-23.el6.x86_64
# scl enable python27 bash
# env | grep XDG
XDG_DATA_DIRS=/opt/rh/python27/root/usr/share/usr/local/share:/usr/share} <-----

# cat /opt/rh/python27/enable | grep XDG
export XDG_DATA_DIRS=/opt/rh/python27/root/usr/share${XDG_DATA_DIRS:-/usr/local/share:/usr/share}} <------

Comment 7 Branislav Náter 2016-04-20 11:05:14 UTC
Reproduced on python27-1.1-17.el6 and python27-1.1-20.el7:
evince even did not start for rhel-7 ((evince:2118): GLib-GIO-ERROR **: No GSettings schemas are installed on the system) and doesn't display document for rhel-6.
                                                                                 
Verified on python27-1.1-24.el6 and python27-1.1-24.el7:                         
evince is able to display pdf document correctly on rhel-6 and rhel-7.

So customer issue is solved but unfortunately I've spotted another issue:

# env | grep XDG_DATA
XDG_DATA_DIRS=/opt/rh/python27/root/usr/share/usr/local/share:/usr/share

First two paths are not separated using colon. It should be:
/opt/rh/python27/root/usr/share:/usr/local/share:/usr/share
                               ^

Comment 9 Branislav Náter 2016-05-12 12:07:17 UTC
Verified on python27-1.1-25.el6 and python27-1.1-25.el7

evince works with collection enabled, path are set correctly.

# env | grep XDG
XDG_DATA_DIRS=/opt/rh/python27/root/usr/share:/usr/local/share:/usr/share

Comment 11 errata-xmlrpc 2016-05-31 10:24:45 UTC
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-2016:1166