> Why does Debian enable -DSYS_BASHRC? This question does not seem to be answered anywhere.
It does make sense for Debian (and Ubuntu) to enable SYS_BASHRC by default, as a system-wide /etc/bash.bashrc is a useful (and needed) configuration tool for sysadmins. It's standard behavior for many packages to read system-wide config file(s) from /etc and then merge user settings from ~/.* or ~/.config, so I don't think this is the issue.
> Is there a workaround? Can someone release an alternate version of bash for Ubuntu without -DSYS_BASHRC?
There's no need for an alternate release: if you have enough privileges to install system-wide software with apt, it means you're the admin who can also edit /etc/bash.bashrc to be a blank file to effectively disable it.
If you're not the admin but want a custom bash for your user, you can compile bash yourself (without -DSYS_BASHRC or patched with a correct --rcfile behavior) and install it at ~/.local/bin.
So admins can easily modify/disable /etc/bash.bashrc, and non-admins are not supposed to be able to bypass it anyway, at least for login shells.
----
I believe the issue is not -DSYS_BASHRC being enabled by default, but rather `--rcfile` not behaving as it should, and documentation that mismatches current behavior.
> Why does Debian enable -DSYS_BASHRC? This question does not seem to be answered anywhere.
It does make sense for Debian (and Ubuntu) to enable SYS_BASHRC by default, as a system-wide /etc/bash.bashrc is a useful (and needed) configuration tool for sysadmins. It's standard behavior for many packages to read system-wide config file(s) from /etc and then merge user settings from ~/.* or ~/.config, so I don't think this is the issue.
> Is there a workaround? Can someone release an alternate version of bash for Ubuntu without -DSYS_BASHRC?
There's no need for an alternate release: if you have enough privileges to install system-wide software with apt, it means you're the admin who can also edit /etc/bash.bashrc to be a blank file to effectively disable it.
If you're not the admin but want a custom bash for your user, you can compile bash yourself (without -DSYS_BASHRC or patched with a correct --rcfile behavior) and install it at ~/.local/bin.
So admins can easily modify/disable /etc/bash.bashrc, and non-admins are not supposed to be able to bypass it anyway, at least for login shells.
----
I believe the issue is not -DSYS_BASHRC being enabled by default, but rather `--rcfile` not behaving as it should, and documentation that mismatches current behavior.