Bug 1486089 - CentOS 7 / Postgresql 9.5.7 Software Collections $XDG_DATA_DIRS side effect
Summary: CentOS 7 / Postgresql 9.5.7 Software Collections $XDG_DATA_DIRS side effect
Keywords:
Status: CLOSED DUPLICATE of bug 1464084
Alias: None
Product: softwarecollections.org
Classification: Community
Component: rh-postgresql95
Version: 1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Kubat
QA Contact: Databases Maintanance List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-29 01:08 UTC by Matt C.
Modified: 2017-08-29 07:49 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-29 07:49:09 UTC
Embargoed:


Attachments (Terms of Use)

Description Matt C. 2017-08-29 01:08:17 UTC
Description of problem:

When using software collections to install postgresql, and sourcing /opt/rh/rh-postgresql95/enable the XDG_DATA_DIRS environment variable is overwritten and causes graphical login to malfunction.

According to documentation here: https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

If $XDG_DATA_DIRS is either not set or empty, a value equal to /usr/local/share/:/usr/share/ should be used. 

However, the enable script concatenates an empty string w/ the path /opt/rh/rh-postgresql95/root/usr/share ... causing GNOME desktop to ignore /usr/share.

This issue is not likely to affect production systems w/o graphic login. (I found the issue in a development environment)

Version-Release number of selected component (if applicable): 9.5.7


How reproducible:


Steps to Reproduce:

1. Install CentOS 7 w/ minimal desktop as follows: 

yum -y update

yum -y groupinstall "X Window System"
yum -y install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts

unlink /etc/systemd/system/default.target
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target


2. Next install postgres w/ software collections

yum -y install centos-release-scl centos-release-scl-rh
yum -y install rh-postgresql95-postgresql-server rh-postgresql95

3. Create /etc/profiles.d/rh-postgresql95.sh

#!/bin/bash

source /opt/rh/rh-postgresql95/enable
export X_SCLS="`scl enable rh-postgresql95 'echo $X_SCLS'`"

4. Fix permissions

chmod 644 /etc/profiles.d/rh-postgresql95.sh

5. reboot

Actual results:

Graphical login for all users will fail

Expected results:

Graphical login for all users succeeds

Additional info:

The following fix allows graphical login to succeed ... however I'm not sure of side effects...

sed -i 's/^export XDG_DATA_DIRS/#export XDG_DATA_DIRS/' /opt/rh/rh-postgresql95/enable

Comment 1 Pavel Raiskup 2017-08-29 07:49:09 UTC
Thanks for the report, your work-around seems to be correct.  See the duplicate
bug.

*** This bug has been marked as a duplicate of bug 1464084 ***


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