Bug 2117365

Summary: Default ~/.bashrc sources editor backups from ~/.bashrc.d after the changed file
Product: [Fedora] Fedora Reporter: adingman <adingman>
Component: bashAssignee: Siteshwar Vashisht <svashisht>
Status: ASSIGNED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 39CC: admiller, information, kasal, kdudka, svashisht
Target Milestone: ---Keywords: EasyFix, Patch, Reproducer
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:
Attachments:
Description Flags
Simple change to exclude file names ending in ~ kdudka: review+

Description adingman@mitre.org 2022-08-10 19:01:46 UTC
Created attachment 1904802 [details]
Simple change to exclude file names ending in ~

Description of problem:
Default .bashrc installed in /etc/skel will source editor backup files from ~/.bashrc.d . These sort lexically after the original file, which can cause changed settings to be effectively ignored.

Version-Release number of selected component (if applicable):
5.1.16-2.fc36

How reproducible:
Always

Steps to Reproduce:
1. cat > ~/.bashrc.d/oops <<EOF
export FOO=old
EOF
2. sed -i~ -e 's/=old/=new/' ~/.bashrc.d/oops
3. . /etc/skel/.bashrc
4. echo $FOO

Actual results:
old


Expected results:
new

Additional info:
Although the reproducer above uses sed, the '~' suffix is applied to backup files by default in Emacs and in Vim with the 'backup' option turned on. Seems common enough to be worth avoiding. Four-character simple fix attached as a git diff.

Comment 1 Ben Cotton 2023-04-25 17:45:03 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 2 Fedora Release Engineering 2023-08-16 08:14:43 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.