We are discussing about always sourcing /etc/bashrc for interactive mode in bug 1193590 [1]. Currently /etc/bashrc is sourced by user's bashrc script and if a user forgets to source it, some of the default configurations will not be set (for e.g. see bug 1390780 [2]). I am pondering over the idea to source /etc/bashrc by default (see commmit at [3]) and fix current /etc/bashrc script to avoid double sourcing [4]. This change may cause undesirable effects if a custom /etc/bashrc is prone to double sourcing and might break some systems. Any comments about this change are welcome.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1193590 [2] https://bugzilla.redhat.com/show_bug.cgi?id=1390780 [3] https://github.com/fedora-testing/bash/commit/87ac935a6643a9afee44a957577141... [4] https://bugzilla.redhat.com/show_bug.cgi?id=1193590#c20
On Tue, May 2, 2017 at 4:42 PM, Siteshwar Vashisht svashisht@redhat.com wrote:
I am pondering over the idea to source /etc/bashrc by default (see commmit at [3])
FWIW, I've been recently told that Debian does this. (Well the name there is /etc/bash.bashrc.)
and fix current /etc/bashrc script to avoid double sourcing [4].
See also https://bugzilla.redhat.com/show_bug.cgi?id=1193590#c27
This change may cause undesirable effects if a custom /etc/bashrc is prone to double sourcing and might break some systems.
One reported breakage is here, although it's quite probably a bash-completion bug: https://github.com/scop/bash-completion/pull/117
----- Original Message -----
From: "Siteshwar Vashisht" svashisht@redhat.com To: devel@lists.fedoraproject.org Sent: Tuesday, May 2, 2017 3:42:14 PM Subject: RFC: Always sourcing /etc/bashrc for interactive mode in bash
We are discussing about always sourcing /etc/bashrc for interactive mode in bug 1193590 [1]. Currently /etc/bashrc is sourced by user's bashrc script and if a user forgets to source it, some of the default configurations will not be set (for e.g. see bug 1390780 [2]). I am pondering over the idea to source /etc/bashrc by default (see commmit at [3]) and fix current /etc/bashrc script to avoid double sourcing [4]. This change may cause undesirable effects if a custom /etc/bashrc is prone to double sourcing and might break some systems. Any comments about this change are welcome.
This breaks some use cases as it modifies order of sourcing of /etc/bashrc file. Due to this change /etc/bashrc gets sourced before user's ~/.bashrc and there is no way to set configurations before /etc/bashrc is sourced (See comment here[1]). It looks like making this work will possibly require significant refactoring of startup scripts in fedora (that might cause some compatbility issues). The scripts under /etc/profile.d are sourced by /etc/profile for login shells and by /etc/bashrc for non-login shells. Refactoring the startup scripts will lead to a more cleaner solution, however it may also break existing setups.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1193590 [2] https://bugzilla.redhat.com/show_bug.cgi?id=1390780 [3] https://github.com/fedora-testing/bash/commit/87ac935a6643a9afee44a957577141... [4] https://bugzilla.redhat.com/show_bug.cgi?id=1193590#c20
--
Siteshwar Vashisht _______________________________________________ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-leave@lists.fedoraproject.org
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1193590#c40
devel@lists.stg.fedoraproject.org