#516152 bash: --rcfile documentation doesnt match actual behavior

Package:
bash
Source:
bash
Description:
GNU Bourne Again SHell
Submitter:
qqqqqqqqq9
Date:
2024-08-10 09:09:10 UTC
Severity:
normal
Tags:
#516152#5
Date:
2009-02-19 15:19:51 UTC
From:
To:
Hi,

in the manpage it is stated:

#516152#10
Date:
2009-02-19 16:19:24 UTC
From:
To:
Am 2009-02-19 16:19:51, schrieb qqqqqqqqq9:

AFAIK does it require a full path where ~ and ${HOME} are acceptable

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

#516152#15
Date:
2009-03-10 11:17:13 UTC
From:
To:
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:

#516152#22
Date:
2012-02-06 18:59:47 UTC
From:
To:
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)

#516152#27
Date:
2016-02-18 10:29:40 UTC
From:
To:
using the --rcfile option, as per the documentation.
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

#516152#32
Date:
2016-02-24 05:50:29 UTC
From:
To:
Tags: patch
#516152#39
Date:
2023-11-14 13:10:59 UTC
From:
To:
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.