Debian Bug report logs -
#516152
bash: --rcfile documentation doesnt match actual behavior
Reply or subscribe to this bug.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, qqqqqqqqq9@web.de, Matthias Klose <doko@debian.org>:
Bug#516152; Package bash.
(Thu, 19 Feb 2009 15:27:04 GMT) (full text, mbox, link).
Acknowledgement sent
to qqqqqqqqq9 <qqqqqqqqq9@web.de>:
New Bug report received and forwarded. Copy sent to qqqqqqqqq9@web.de, Matthias Klose <doko@debian.org>.
(Thu, 19 Feb 2009 15:27:19 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: bash
Version: 3.2-4
Severity: normal
Hi,
in the manpage it is stated:
--rcfile file
Execute commands from file instead of the system wide initialization file /etc/bash.bashrc and the standard personal initialization file ~/.bashrc if the shell is interactive (see INVOCATION below).
i however get:
$ /bin/bash --rcfile emptyfile
etcbashrc
which means, that the /etc/bash.bashrc ist read contrary to what the manpage says.
-- System Information:
Debian Release: 5.0
APT prefers experimental
APT policy: (990, 'experimental'), (500, 'gutsy'), (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.28-8-generic (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF8, LC_CTYPE=de_DE.UTF8 (charmap=UTF-8) (ignored: LC_ALL set to de_DE.UTF8)
Shell: /bin/sh linked to /bin/bash
Versions of packages bash depends on:
ii base-files 5 Debian base system miscellaneous f
ii debianutils 2.31 Miscellaneous utilities specific t
ii libc6 2.9-1 GNU C Library: Shared libraries
ii libncurses5 5.7+20090214-1 shared libraries for terminal hand
Versions of packages bash recommends:
pn bash-completion <none> (no description available)
Versions of packages bash suggests:
pn bash-doc <none> (no description available)
-- debconf-show failed
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#516152; Package bash.
(Thu, 19 Feb 2009 16:21:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Michelle Konzack <michelle.konzack@tamay-dogan.net>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
(Thu, 19 Feb 2009 16:21:05 GMT) (full text, mbox, link).
Message #10 received at 516152@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Am 2009-02-19 16:19:51, schrieb qqqqqqqqq9:
> --rcfile file
> Execute commands from file instead of the system wide initialization file /etc/bash.bashrc and the standard personal initialization file ~/.bashrc if the shell is interactive (see INVOCATION below).
AFAIK does it require a full path where ~ and ${HOME} are acceptable
> i however get:
> $ /bin/bash --rcfile emptyfile
> etcbashrc
>
> which means, that the /etc/bash.bashrc ist read contrary to what the manpage says.
It seems to be a fallbak function since bash can not find your empty
file. Also, AFAIK, an ZERO lenght file is considered as non-existent.
A behaviour which I have seen in many programs.
Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
+49/177/9351947 50, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
[signature.pgp (application/pgp-signature, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#516152; Package bash.
(Tue, 10 Mar 2009 11:45:05 GMT) (full text, mbox, link).
Acknowledgement sent
to 1 <qqqqqqqqq9@web.de>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
(Tue, 10 Mar 2009 11:45:05 GMT) (full text, mbox, link).
Message #15 received at 516152@bugs.debian.org (full text, mbox, reply):
Hi
when i try
$ /bin/bash --rcfile /home/promotion/emptyfile
i get the same behaviour
etcbashrc
emptyfile
$ cat /home/promotion/emptyfile
echo emptyfile
export horst=ps
$ cat /etc/bash.bashrc
echo etcbashrc
Guido
Michelle Konzack schrieb:
> Am 2009-02-19 16:19:51, schrieb qqqqqqqqq9:
>> --rcfile file
>> Execute commands from file instead of the system wide initialization file /etc/bash.bashrc and the standard personal initialization file ~/.bashrc if the shell is interactive (see INVOCATION below).
>
> AFAIK does it require a full path where ~ and ${HOME} are acceptable
>
>> i however get:
>> $ /bin/bash --rcfile emptyfile
>> etcbashrc
>>
>> which means, that the /etc/bash.bashrc ist read contrary to what the manpage says.
>
> It seems to be a fallbak function since bash can not find your empty
> file. Also, AFAIK, an ZERO lenght file is considered as non-existent.
>
> A behaviour which I have seen in many programs.
>
>
> Thanks, Greetings and nice Day/Evening
> Michelle Konzack
> Systemadministrator
> 24V Electronic Engineer
> Tamay Dogan Network
> Debian GNU/Linux Consultant
>
>
Merged 343673 516152.
Request was from Jonathan Wiltshire <debian@jwiltshire.org.uk>
to control@bugs.debian.org.
(Fri, 27 Aug 2010 17:57:03 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#516152; Package bash.
(Mon, 06 Feb 2012 19:03:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Rodrigo Silva <linux@rodrigosilva.com>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
(Mon, 06 Feb 2012 19:03:03 GMT) (full text, mbox, link).
Message #22 received at 516152@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
User should be able to prevent system rc and selecting a custom rc by using the --rcfile option, as per the documentation.
To fix the behavior so it matches the documentation, SYS_BASHRC should only
be executed if --rcfile is NOT used. And I truly hope the BEHAVIOR is changed, NOT the documentaion.
Also, documentation should be updated to clarify that --norc option disables --rcfile option.
Last but not least, -DSYS_BASHRC compile option should be properly documented, or at least included in configure options (as in --enable-system-bashrc)
The attached files are:
0000-xxx.patch: enables SYS_BASHRC so bug can be reproduced and the fix can be tested (not needed for the Debian source package, since SYS_BASHRC is already enabled by another patch in Debian systems
0001-xxx.patch: Fixes the bug. This is the ONLY patch meant for merge.
They were succesfully tested on upstream git "master" branch (4.2 patchlevel 20)
This was also reported (and submited) in upstream https://savannah.gnu.org/support/index.php?107950 , so I would be glad if everyone interested would voice their opinion (and vote) there too!
Sincerely,
Rodrigo Silva (MestreLion in Launchpad)
[0000-SYS_BASHRC-enabled-in-config-top.h.patch (application/octet-stream, attachment)]
[0001-SYS_BASHRC-do-not-execute-etc-bash.bashrc-if-rcfile-is-set.patch (application/octet-stream, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#516152; Package bash.
(Thu, 18 Feb 2016 10:33:08 GMT) (full text, mbox, link).
Acknowledgement sent
to hddqsb <hddqsb@gmail.com>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
(Thu, 18 Feb 2016 10:33:08 GMT) (full text, mbox, link).
Message #27 received at 516152@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
On Mon, 06 Feb 2012 16:59:47 -0200 Rodrigo Silva <linux@rodrigosilva.com>
wrote:
> User should be able to prevent system rc and selecting a custom rc by
using the --rcfile option, as per the documentation.
> ...
> This was also reported (and submited) in upstream
https://savannah.gnu.org/support/index.php?107950
Chet Ramey (an upstream Project Admin for Bash) rejected that report,
saying Debian's documentation is wrong.
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. The Debian file
debian/patches/man-bashrc.diff is affected.
I attached a new version of man-bashrc.diff, without the two parts that
change the documentation of --rcfile.
I've also attached a patch (man-bashrc.diff.patch) to get from the original
man-bashrc.diff to my proposed man-bashrc.diff.
Regards,
Tom Levy
[Message part 2 (text/html, inline)]
[man-bashrc.diff (text/plain, attachment)]
[man-bashrc.diff.patch (text/x-patch, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#516152; Package bash.
(Wed, 24 Feb 2016 05:54:03 GMT) (full text, mbox, link).
Acknowledgement sent
to hddqsb <hddqsb@gmail.com>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
(Wed, 24 Feb 2016 05:54:03 GMT) (full text, mbox, link).
Message #32 received at 516152@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Tags: patch
[Message part 2 (text/html, inline)]
Added tag(s) patch.
Request was from hddqsb <hddqsb@gmail.com>
to control@bugs.debian.org.
(Wed, 24 Feb 2016 07:57:06 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#516152; Package bash.
(Tue, 14 Nov 2023 13:15:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Dave Jones <dave.jones@canonical.com>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
(Tue, 14 Nov 2023 13:15:02 GMT) (full text, mbox, link).
Message #39 received at 516152@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Attaching an updated patch based on the current state of unstable. Some
bits of the prior patch already appeared in the documentation, other
bits needed a little re-working, but the intent is the same: the
behaviour of bash is unchanged, this just changes the documentation to
match the behaviour.
Best regards,
Dave Jones.
[516152-1.debdiff (text/x-diff, attachment)]
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Thu Aug 8 03:48:33 2024;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.