Bug 1339106

Summary: sh profile.d improvements: don't leak $ID, don't fail on nounset
Product: [Fedora] Fedora Reporter: Ville Skyttä <ville.skytta>
Component: vimAssignee: Karsten Hopp <karsten>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ignatenko, karsten, moshima.web
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: vim-7.4.1835-1.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-24 11:53:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
sh profile.d improvements: don't leak $ID, don't fail on nounset none

Description Ville Skyttä 2016-05-24 07:37:33 UTC
Avoid errors if "set -u" (or "nounset") is in effect, don't leak $ID
in the environment, drop unnecessary test for /usr/bin/id.

'git am'able patch attached, let me know if you'd like me to push and
build this for devel.

Comment 1 Ville Skyttä 2016-05-24 07:37:37 UTC
Created attachment 1160902 [details]
sh profile.d improvements: don't leak $ID, don't fail on nounset

Comment 2 Ville Skyttä 2016-05-24 07:40:00 UTC
BTW I think it'd be cleaner to have vim.sh and vim.csh as separate scripts instead of being embedded in the specfile. Suppose the only reason for the embedding is the use of %{_bindir} in vim.sh which could be replaced by "hardcoded" /usr/bin/id. vim.csh already does that so there should be no reason to embed it. I can take care of this as well, just let me know.

Comment 3 Karsten Hopp 2016-05-24 09:42:48 UTC
You're right, thanks for noticing the ID leak. No harm done by that, but it's unnecessary. I'll push a new vim package soon with these fixes and move vim.sh and vim.csh into rpm source files.