diff --git a/debian/changelog b/debian/changelog index c5221b73..7a40d163 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +bash (5.2.15-2ubuntu2) noble; urgency=medium + + * Correct the bash(1) man-page to note that --rcfile does not prevent the + execution of the system-wide /etc/bash.bashrc file (LP: #1097467) + + -- Dave Jones Tue, 14 Nov 2023 11:31:40 +0000 + bash (5.2.15-2ubuntu1) lunar; urgency=medium * Merge with Debian; remaining changes: diff --git a/debian/patches/fix-rcfile-man.diff b/debian/patches/fix-rcfile-man.diff new file mode 100644 index 00000000..cda132a3 --- /dev/null +++ b/debian/patches/fix-rcfile-man.diff @@ -0,0 +1,57 @@ +Author: Dave Jones +Forwarded: yes +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516152 +Bug-Ubuntu: https://bugs.launchpad.net/gnubash/+bug/1097467 +Description: Document that --rcfile does not exclude SYS_BASHRC from running + This patch fixes the content added by man-bashrc.diff to correctly state that + the --rcfile switch only changes the execution of the user's personal + initialization file and that the system initialization file (SYS_BASHRC which + is /etc/bashrc.bash on Ubuntu) is still executed. + . + Given that man-bashrc.diff originates from Debian, I'm proposed this separate + additional patch in Ubuntu, but in Debian I've proposed a modification to + man-bashrc.diff itself. If that is accepted, this patch should simply be + dropped in our subsequent merge. + +--- a/doc/bash.1 ++++ b/doc/bash.1 +@@ -202,14 +202,14 @@ Display a usage message on standard outp + .PD + Execute commands from + .I file +-instead of the system wide initialization file +-.I /etc/bash.bashrc +-and the standard personal initialization file ++instead of the standard personal initialization file + .I ~/.bashrc + if the shell is interactive (see + .SM + .B INVOCATION +-below). ++below). Note that the system wide initialization file ++.I /etc/bash.bashrc ++is still executed. + .TP + .B \-\-login + Equivalent to \fB\-l\fP. +@@ -359,8 +359,8 @@ This may be inhibited by using the + option. + The \fB\-\-rcfile\fP \fIfile\fP option will force + .B bash +-to read and execute commands from \fIfile\fP instead of +-\fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP. ++to read and execute commands from \fIfile\fP instead of \fI~/.bashrc\fP. ++Note that \fI/etc/bash.bashrc\fP will still be read. + .PP + When + .B bash +@@ -454,7 +454,8 @@ The + .B \-\-norc + option may be used to inhibit this behavior, and the + .B \-\-rcfile +-option may be used to force another file to be read, but neither ++option may be used to force another file to be read instead of ++\fI~/.bashrc\fP, but neither + \fIrshd\fP nor \fIsshd\fP generally invoke the shell with those options + or allow them to be specified. + .PP diff --git a/debian/patches/series b/debian/patches/series index 79c2dee8..c52af30b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -33,3 +33,4 @@ use-system-texi2html.diff man-macro-warnings.diff man-vx-opts.diff bash-musl.diff +fix-rcfile-man.diff