[Bug 589496] Re: bash --rcfile does not behave as documented
[TL;DR: Bash developer Chet Ramey claimed in 2015 that this is a documentation bug. Then, in 2016, a documentation patch has been proposed to (and possibly accepted by?) Debian.] On 16 Sep 2016, Chet Ramey released version 4.4 of bash. This inspired me to check and see if this long standing issue has been fixed. Here is what I learned. Debian bug # 343673 from 2005. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343673 Debian bug # 516152 from 2009. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516152 GNU Savannah bug #107950 from 2012. https://savannah.gnu.org/support/index.php?107950 In 2015, Chet Ramey commented on the above Savannah bug report: "Debian made that documentation error. If you compile with -DSYS_BASHRC, it's always executed, as is ~/.bashrc (or the file specified with --rcfile)" In other words, Ramey claims this is a documentation bug. I do not know if -DSYS_BASHRC has only the one above effect, or if it also has other effects as well. In 2016, Tom Levy posted the following comment on Debian bug #516152 (see above link). "Convincing Chet that the behaviour in Debian's documentation is preferable to the current behaviour seems hard considering his 3-year response time. I propose changing the documentation." Levy also included a patch to Debian's bash man page. The patch is here: https://bugs.debian.org/cgi-bin/bugreport.cgi?att=3;bug=516152;filename =man-bashrc.diff.patch;msg=27 I am not an expert on the Debian development process, so I am unable to determine if the patch has been accepted by Debian. The patch does not appear to have been applied to the following file, but this might not be the correct place to look for the patch. (Again, I am not a Debian expert.) http://sources.debian.net/src/bash/4.4-1/doc/bash.1/ -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/589496 Title: bash --rcfile does not behave as documented To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/589496/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 589496] Re: bash --rcfile does not behave as documented
This patch fixes the behaviour of --rcfile. It was also reported in both Debian and upstream. But since Ubuntu is usually much more responsive, the fix could be patched in Ubuntu until either Debian or GNU merges. Also, to speed things up, everyone interested could voice their opinion in GNU's bug report at https://savannah.gnu.org/support/index.php?107950 , there's a VOTE section that maybe would help getting attention to this issue ** Patch added: Do not execute /etc/bash.bashrc if --rcfile is set https://bugs.launchpad.net/ubuntu/+source/bash/+bug/589496/+attachment/2720257/+files/0001-SYS_BASHRC-do-not-execute-etc-bash.bashrc-if-rcfile-is-set.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/589496 Title: bash --rcfile does not behave as documented To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/589496/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 589496] Re: bash --rcfile does not behave as documented
The attachment Do not execute /etc/bash.bashrc if --rcfile is set of this bug report has been identified as being a patch. The ubuntu- reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report. [This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.] ** Tags added: patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/589496 Title: bash --rcfile does not behave as documented To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/589496/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 589496] Re: bash --rcfile does not behave as documented
Debian bug #516152 is from 2009, and #343673 from 2006 ... none of them are fixed, so I don't think they care. This is not an irrelevant package we are talking about, its a flaw in invocation of something critical like bash. Is there any chance this could be patched ASAP in Ubuntu and then the patch submitted to Debian afterwards? Also, this is not only a bug in documentation as #516152 and #343673 suggests: with current behaviour, it's impossible to disable the execution of /etc/bash.bashrc and still give the user a choice of executing a personal rcfile. Samples: $ cat /etc/bash.bashrc echo etcbashrc $ cat ~/customrc echo customrc $ cat ~/.bashrc echo bashrc $ bash etcbashrc bashrc $ bash --rcfile ~/customrc etcbashrc customrc $ bash --norc --rcfile ~/customrc $ -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/589496 Title: bash --rcfile does not behave as documented To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/589496/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 589496] Re: bash --rcfile does not behave as documented
** Changed in: bash (Debian) Status: Unknown = New -- bash --rcfile does not behave as documented https://bugs.launchpad.net/bugs/589496 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 589496] Re: bash --rcfile does not behave as documented
Merged the two Debian bugs for you. ** Also affects: bash (Debian) via http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343673 Importance: Unknown Status: Unknown -- bash --rcfile does not behave as documented https://bugs.launchpad.net/bugs/589496 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 589496] Re: bash --rcfile does not behave as documented
** Changed in: bash (Ubuntu) Status: New = Confirmed -- bash --rcfile does not behave as documented https://bugs.launchpad.net/bugs/589496 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 589496] Re: bash --rcfile does not behave as documented
Yes, I confirmed it. Ubuntu 10.04 bash. when execute /bin/bash --rcfile someexistedrcfile, it still read and execute /etc/bash.bashrc and will not read ~./bashrc -- bash --rcfile does not behave as documented https://bugs.launchpad.net/bugs/589496 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 589496] Re: bash --rcfile does not behave as documented
here are two upstream bugs (debian is upstream, right?) http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516152 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343673 note: those two bugs are duplicates of each other, but i was not able to find out how to mark bugs as duplicate in the debian bug tracker. ** Bug watch added: Debian Bug tracker #516152 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516152 ** Bug watch added: Debian Bug tracker #343673 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343673 -- bash --rcfile does not behave as documented https://bugs.launchpad.net/bugs/589496 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs