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.
diff --git a/debian/changelog b/debian/changelog
index cd2b7c6d..b645fec8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+bash (5.2.15-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * d/p/man-bashrc.diff: Correct the bash(1) man-page to note that --rcfile
+    does not prevent the execution of the system-wide /etc/bash.bashrc file.
+    Closes: #516152.
+
+ -- Dave Jones <[email protected]>  Tue, 14 Nov 2023 11:31:40 +0000
+
 bash (5.2.15-2) unstable; urgency=medium
 
   * Remove one more pdf file without source. Closes: #1024598.
diff --git a/debian/patches/man-bashrc.diff b/debian/patches/man-bashrc.diff
index 300d3ebf..1602a98c 100644
--- a/debian/patches/man-bashrc.diff
+++ b/debian/patches/man-bashrc.diff
@@ -2,17 +2,17 @@
 
 --- a/doc/bash.1
 +++ b/doc/bash.1
-@@ -187,7 +187,9 @@ Display a usage message on standard outp
- .PD
- Execute commands from
- .I file
--instead of the standard personal initialization file
-+instead of the system wide initialization file
-+.I /etc/bash.bashrc
-+and the standard personal initialization file
- .I ~/.bashrc
+@@ -192,7 +192,9 @@ instead of the standard personal initial
  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.
 @@ -218,7 +220,9 @@ reads these files when it is invoked as
  below).
  .TP
@@ -36,13 +36,12 @@
  option.
  The \fB\-\-rcfile\fP \fIfile\fP option will force
  .B bash
--to read and execute commands from \fIfile\fP instead of \fI~/.bashrc\fP.
-+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
-@@ -426,8 +432,8 @@ or the secure shell daemon \fIsshd\fP.
+@@ -426,14 +432,15 @@ or the secure shell daemon \fIsshd\fP.
  If
  .B bash
  determines it is being run non-interactively in this fashion,
@@ -53,7 +52,15 @@
  It will not do this if invoked as \fBsh\fP.
  The
  .B \-\-norc
-@@ -11581,6 +11587,9 @@ The \fBbash\fP executable
+ 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
+@@ -11672,6 +11679,9 @@ The \fBbash\fP executable
  .FN /etc/profile
  The systemwide initialization file, executed for login shells
  .TP

Reply via email to