Page MenuHomeFreeBSD

shells/bash: Enable SYSBASHRC option by default
ClosedPublic

Authored by michaelo on Jul 8 2025, 11:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 7, 3:33 PM
Unknown Object (File)
Sat, Sep 27, 12:52 AM
Unknown Object (File)
Wed, Sep 24, 9:19 AM
Unknown Object (File)
Sat, Sep 20, 9:50 AM
Unknown Object (File)
Tue, Sep 16, 4:59 AM
Unknown Object (File)
Sep 14 2025, 6:07 AM
Unknown Object (File)
Sep 14 2025, 1:10 AM
Unknown Object (File)
Sep 13 2025, 7:38 AM
Subscribers
None

Details

Summary

Approved by: jrm (mentor), otis (mentor), ehaupt (maintainer)

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

michaelo created this revision.

Discussed this via e-mail with @ehaupt in prior, I will take the fallout after the change.

Please commit as discussed previously. Thanks Michael.

This revision is now accepted and ready to land.Jul 8 2025, 4:32 PM

Based on the UPDATING message, I assume this will only affect those who use bash as their login shell. It looks like shells/bash is a run dependency for a few hundred ports. Could you confirm that nothing changes for those with bash installed only because it's a dependency?

It looks like this simply /enables/ sourcing of the system-wide configuration file, but no configuration file is installed. Is that correct?

In D51201#1169135, @jrm wrote:

Based on the UPDATING message, I assume this will only affect those who use bash as their login shell. It looks like shells/bash is a run dependency for a few hundred ports. Could you confirm that nothing changes for those with bash installed only because it's a dependency?

Not login shell, only interactive shell. Login shell only sources LOCALBASE/etc/profile. For those who don't have the system-wide RC file nothing changes.

It looks like this simply /enables/ sourcing of the system-wide configuration file, but no configuration file is installed. Is that correct?

Yes, that is correct. The file is up to the user. The default file is supplied. It just enables the obvious.

The default file is supplied. It just enables the obvious.

Can you point me to this default configuration file (that will now be sourced?)? I don't see it.

root@15amd64-default:/usr/ports/shells/bash # pkg info bash | grep SYSBASHRC
        SYSBASHRC      : on
root@15amd64-default:/usr/ports/shells/bash # pkg info -l bash | grep '/etc'
In D51201#1169157, @jrm wrote:

The default file is supplied. It just enables the obvious.

Can you point me to this default configuration file (that will now be sourced?)? I don't see it.

root@15amd64-default:/usr/ports/shells/bash # pkg info bash | grep SYSBASHRC
        SYSBASHRC      : on
root@15amd64-default:/usr/ports/shells/bash # pkg info -l bash | grep '/etc'

Sorry for misleading you, bash uses the default path of LOCALBASE/etc/bash.bashrc, but the port does not provide one neither does bash itself.

This is patched for LOCALBASE: https://github.com/bminor/bash/blob/6794b5478f660256a1023712b5fc169196ed0a22/pathnames.h.in#L28
This one as well: https://github.com/bminor/bash/blob/6794b5478f660256a1023712b5fc169196ed0a22/config-top.h#L100

bash really makes a distinction being login or interactive or even running without a tty attached (scripted).