Bug 1374582

Summary: Symlink in /etc/profile.d to /usr/bin/virtualenvwrapper.sh breaks su
Product: [Fedora] Fedora EPEL Reporter: Lachlan <datakid>
Component: python-virtualenvwrapperAssignee: Fedora Infrastructure SIG <infra-sig>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: epel7CC: infra-sig, kevin, rbean
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-07 20:12:06 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:

Description Lachlan 2016-09-09 06:51:44 UTC
Description of problem:

Installing python-virtualenvwrapper creates a symlink in /etc/profile.d to /usr/bin/virtualenvwrapper.sh which in turn tries to create directories. This breaks when using su (without  -l) to change users.


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

python-virtualenvwrapper.noarch 0:4.3.1-1.el7 


How reproducible:


Steps to Reproduce:
1. yum install python-virtualenvwrapper
2. su <different user>
3. <permissions error as old user trying to create directories in the new user's space>  


Actual results:

virtualenvwrapper over enthusiastically tries to create directories because it's in /etc/profile.d


Expected results:

Don't do that.


Additional info:

su -l doesn't have this issue.

Comment 1 Kevin Fenzi 2016-09-10 19:05:10 UTC
So, it looks like this was fixed in Fedora by switching from virtualenvwrapper.sh to virtualenvwrapper_lazy.sh

So, I think if we just update to the latest version this would be fixed. 

Can you please try this scratch build and let us know if it fixes the issue?

https://koji.fedoraproject.org/koji/taskinfo?taskID=15575287

Comment 2 Lachlan 2016-09-14 01:52:16 UTC
Thanks Kevin, a couple of things - 
1. I'm unsure where to find that rpm
2. It looks like that's pointing to a failed build?

cheers
L.

Comment 3 Kevin Fenzi 2016-09-14 02:20:19 UTC
Sorry about that. Try this one: 

https://koji.fedoraproject.org/koji/taskinfo?taskID=15623446

Comment 4 Lachlan 2016-09-14 06:22:27 UTC
My testing indicates that this solves the problem I previously had. Thank you

Comment 5 Kevin Fenzi 2016-09-14 15:56:15 UTC
Great. Will push an update then...

Comment 6 Kevin Fenzi 2017-11-07 20:12:06 UTC
This was pushed last year. :)