CVE and update status of the FreeBSD ports tree3,864 unaddressed CVEs in 671 portsAll times are CET
Port details

shells/bash 5.3.20

GNU Project's Bourne Again SHell

Port info

Maintainer
ehaupt@FreeBSD.org
Packages
latest: 5.3.20
Upstream
up to date
Last update
to 5.3.20 · 5c05bb2f2a
Quarterly
2026Q4: 5.3.20
Formerly
shells/bash-devel until 2014-03-03, shells/bash3 until 2004-08-11
WWW
https://www.gnu.org/software/bash/
Links
cgit · VuXML

Install

Package
# pkg install bash
installs 5.3.20 from latest; from quarterly (2026Q4) 5.3.20
Port
# cd /usr/ports/shells/bash && make install clean
# make -C /usr/ports/shells/bash config  # change options first
Size
1.9 MiB download · 9.9 MiB installed
Depends on
devel/gettext-runtime 1.0_1, print/indexinfo 0.3.1_1
License
GPLv3+
Options
4 of 8 on in the package: DOCS HELP NLS SYSBASHRC
Show the 4 options that are off
FDESCFS PORTS_READLINE STATIC SYSLOG

Packages by version and architecture

latest

FreeBSD versionamd64aarch64i386
FreeBSD 165.3.205.3.20–
FreeBSD 155.3.205.3.20–
FreeBSD 145.3.205.3.205.3.20

quarterly (2026Q4)

FreeBSD versionamd64aarch64i386
FreeBSD 155.3.205.3.20–
FreeBSD 145.3.205.3.205.3.20

version as in the ports tree (latest) or the most common one (quarterly) · different version · ✗ not built · – no packages for this platform. Package sets that have not been rebuilt for 60 days are left out.

Unaddressed and VuXML only (0)

No unaddressed CVE and nothing reported by pkg audit for the packaged version 5.3.20.

Fixed (3)

Show 3 fixed
VuXML entries whose affected range the packaged version has left.

Problem reports (0) · open in Bugzilla, most recently changed first

None.

Commits (330)

Emanuel Haupt (ehaupt) · 5.1
Patch committed in r557806 makes this parallel build safe again.
1e31e4f21b
Emanuel Haupt (ehaupt) · 5.1
In some cases bash fails to build parallel make jobs. Provide a patch.

[1] https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c2ebbf4b8bc660beb98cc2d845c73375d6e4f50

PR:		251755
Reported by:	mikael, freebsd@bengrimm.net, jakob@grimstveit.no
Submitted by:	rcarter@pinyon.org
Obtained from:	gentoo [1]
65828d7b4d
Piotr Kubaj (pkubaj) · 5.1
shells/bash: workaround build failure with -j32

Set MAKE_JOBS_UNSAFE=yes:
bashline.c:65:10: fatal error: 'builtins/builtext.h' file not found
63b3d200c4
Emanuel Haupt (ehaupt) · 5.1
Update to 5.1

Release notes:	https://lists.gnu.org/archive/html/info-gnu/2020-12/msg00003.html
a36bb63f83
Emanuel Haupt (ehaupt)
Update manual page to refer to ${LOCALBASE}/etc/profile instead of /etc/profile. See also ports/UPDATING (entry 20200716).

PR:		248805 (based on)
Submitted by:	0mp
b83961e1e3
Emanuel Haupt (ehaupt)
Cleanly decouple bash from base by reading `profile` from $LOCALBASE/etc/ instead of from /etc.

Document this change in UPDATING and provide a migration strategy.

PR:		247934 (based on)
Submitted by:	Michael Osipov <michael.osipov@siemens.com>
f95000d408
Emanuel Haupt (ehaupt)
Bash comes with a bundled version of libreadline and compiled with. Start using devel/readline by default but provide an option to keep using the bundled one.

PR:		247932 (based on)
Submitted by:	Michael Osipov <michael.osipov@siemens.com>
62b3240624
Emanuel Haupt (ehaupt)
Update to 5.0.18

Changelog:	http://ftp.gnu.org/gnu/bash/bash-5.0-patches/bash50-018
42bd830fab
Emanuel Haupt (ehaupt)
Update to 5.0.17
3aa8bfb3a8
Emanuel Haupt (ehaupt)
Update to 5.0.16
dcf6847c94
Emanuel Haupt (ehaupt)
Update to 5.0.11
bd36ec12f7
Emanuel Haupt (ehaupt)
Update to 5.0.9
9a4734de8f
Mathieu Arnold (mat)
Convert to UCL & cleanup pkg-message (categories s)
bc89cd3d2c
Emanuel Haupt (ehaupt)
Update to 5.0.7
83f5d1af42
Emanuel Haupt (ehaupt)
Update to 5.0.3
17fd02e8f6
Emanuel Haupt (ehaupt)
Do not attempt to build 'loadables' in the install target when the static build option is selected.

Loadables will not build statically. The upstream makefile handles this by
ignoring a non-zero exit status by prefixing the build instruction with a minus.
Nevertheless this causes plenty of confusion among our user base.

No PORTREVISION bump as this is a NOOP.
aa878105d8
Emanuel Haupt (ehaupt)
Update to 5.0.2
5ebe8e567a
Emanuel Haupt (ehaupt) · 5.0_2
Properly fix broken man pages by removing unsupported characters.

PR:		234992 (based on)
Reviewed by:	bapt
Reported by:	bapt
c2cb5922fc
Emanuel Haupt (ehaupt) · 5.0_1
Mandoc'ify man pages to avoid dependency to groff.

PR:		234992 (based on)
Submitted by:	sakisp@gmail.com
24ef4acdf0
Emanuel Haupt (ehaupt) · 5.0
Update to 5.0

PR:		234827
Exp-run by:	antoine
848b794ff2
Baptiste Daroussin (bapt)
Install texinfo files (GNU info) into ${PREFIX}/share/info

After a discussion on the mailing list on moving manpages to
${PREFIX}/share/man for consistency with base where it is
installed in usr/share/man, it appeared the same should happen
to GNU info files which were installed under share in base and
not in ports.

Now texinfo is not in base on any of the supported version of FreeBSD
it is possible to proceed to this move and it is easier to do than
the manpage change.

Other benefit than consistency are less patching: all build tools but
cmake are expecting info files to be under share/info and cmake (patched here)
was having an exception for BSD so the patch makes FreeBSD case less
specific for them

Bump revision of all impacted ports

PR:		232907
exp-run by:	antoine
Differential Revision:	https://reviews.freebsd.org/D17816
7990f81066
Emanuel Haupt (ehaupt)
- Update to 4.4.23 - Pass -Wl,-export-dynamic to LDFLAGS instead of CFLAGS in order to avoid warning:   cc: warning: -Wl,-export-dynamic: 'linker' input unused [-Wunused-command-line-argument]
995181be7c
Emanuel Haupt (ehaupt)
- Update to patchlevel 19 - Simplify MASTER_SITES [1]

Submitted by:	gerald (via mail) [1]
2e0f57ae91
Kirill Ponomarev (krion)
Set LLD_UNSAFE=yes that the port will continue to link with ld.bfd if /usr/bin/ld is lld, until the issue can be addressed.

PR:		214864
Approved by:	portmgr (LLD_UNSAFE blanket)
Sponsored by:	The FreeBSD Foundation
f2bf703bec
Emanuel Haupt (ehaupt)
Provide an option to enable system-wide rc files.

This enables:

  - System-wide .bashrc file for interactive shells
    ${PREFIX}/etc/bash.bashrc

  - System-wide .bash_logout for login shells
    ${PREFIX}/etc/bash.bash_logout

PR:		222973
Submitted by:	ilyushkeane@gmail.com
83b393bb52
Emanuel Haupt (ehaupt)
Update WWW, current URL is a permanent redirect.
70698bb3fa
Emanuel Haupt (ehaupt)
Make bash use of fdescfs use optional, disabled by default, and forced off when disabled.

This allows users to avoid mounting an extra FS that we don't enable by default.

Only display pkg-message with fdescfs instructions when option is enabled.

Submitted by:	swills
Differential Revision:	https://reviews.freebsd.org/D10394
a781072372
Emanuel Haupt (ehaupt)
Default path includes the string %%LOCALBASE%%. This was intended to be replaced with the real value of LOCALBASE by the port Makefile at some point, but it isn't at the moment.

Set this value in the Makefile by defining CPPFLAGS accordingly.

PR:             217451
Submitted by:   Dan McGregor <dan.mcgregor@usask.ca>
MFH:            2017Q1 (blanket)
4cb2ee99e3
Emanuel Haupt (ehaupt)
The late mount option is required for systems with a seperate boot partition (e.g. systems with an encrypted root partition) where it is impossible for the fdescfs module to be autoloaded when /boot/kernel isn't available yet. Change pkg-message accordingly.

Also change 'fdesc' mount point name to 'fdescfs' to simplify things: this way
'mount fdescfs' will work just as fine as 'umount fdescfs'. The less things to
remember - the better it is.

PR:		216985
Submitted by:	John Smith <godevilove@ya.ru>
673874ad03
Emanuel Haupt (ehaupt)
Rectify license
6bbacfbe18
Emanuel Haupt (ehaupt)
Update to 4.4.12

Changelog:

Fixes a bug. When -N is used, the input is not supposed to be split
using $IFS, but leading and trailing IFS whitespace was still removed.

MFH:		2017Q1
283ff92a46
Emanuel Haupt (ehaupt)
Update to 4.4.11

Changelog:

Under certain circumstances, bash will evaluate arithmetic expressions as
part of reading an expression token even when evaluation is suppressed. This
happens while evaluating a conditional expression and skipping over the
failed branch of the expression.

There is a race condition in add_history() that can be triggered by a fatal
signal arriving between the time the history length is updated and the time
the history list update is completed. A later attempt to reference an
invalid history entry can cause a crash.

Depending on compiler optimizations and behavior, the `read' builtin may not
save partial input when a timeout occurs.

Subshells begun to run command and process substitutions may attempt to
set the terminal's process group to an incorrect value if they receive
a fatal signal.  This depends on the behavior of the process that starts
the shell.

MFH:		2017Q1
93f2d182cb
Emanuel Haupt (ehaupt)
Update to 4.4.7

Changelog:

- Out-of-range negative offsets to popd can cause the shell to crash attempting
  to free an invalid memory block.
- When performing filename completion, bash dequotes the directory name being
  completed, which can result in match failures and potential unwanted
  expansion.

MFH:		2017Q1
e397b8a6d9
Emanuel Haupt (ehaupt)
Re-use PATCH_SITES for cklatest target instead of hardcoding.
27b2526ee8
Emanuel Haupt (ehaupt)
Update to 4.4.5
e8c5a8907b
Emanuel Haupt (ehaupt) · 4.4
Update to 4.4

Differential Revision:  https://reviews.freebsd.org/D8085
ac46fd3765
Emanuel Haupt (ehaupt)
Update cklatest-host. Old one returns permission denied.
14354397ff
Mathieu Arnold (mat)
Fix build on FreeBSD 9 WITHOUT=NLS.

Sponsored by:	Absolight
f7e05824e6
Emanuel Haupt (ehaupt)
Remove stray ICONV patch that breaks unicode support if NLS is disabled.

PR:             210654
Submitted by:   yuri@rawbw.com
ab750f3abc
Emanuel Haupt (ehaupt)
[1] Make USES=iconv permanent, instead of being only for NLS=on case.

The reason is that NLS is related to message translations to different
    languages.

    And bash has the general feature that \uNNNN is translated into the unicode
    character using iconv. This is unicode support, and should have nothing to
    do with translations.

    bash also currently has a bug that --disable-nls causes it to fail to find
    iconv. This bug has been reported upstream to bash-devel ML. In the future,
    when bash will fix this, this will make a difference.

    Note that this uses iconv from libc.

[2] Update to 4.3.46

PR:             206903 [1], 210620 [2]
Submitted by:   yuri@rawbw.com [1], pkubaj@anongoth.pl [2]
Discussed with: adamw
75b1a2a76b
Dmitry Marakasov (amdmi3)
Remove NLS, DOCS, EXAMPLES and IPV6 from OPTIONS_DEFAULT, they are enabled by default anyway and don't need to be listed

Approved by:	portmgr blanket
c86e9d9724
Dmitry Marakasov (amdmi3)
- Fix trailing whitespace in pkg-descrs, categories [p-x]*

Approved by:	portmgr blanket
1f8b48b772
Emanuel Haupt (ehaupt)
The latest patch (42) has been slightly adjusted. See the following diff:

--- diff begins here ---
--- /usr/distfiles/bash.old/bash43-042	2015-08-13 21:41:06.000000000 +0200
+++ /usr/distfiles/bash/bash43-042	2015-12-01 22:57:39.000000000 +0100
@@ -27,7 +27,7 @@
 + 		lex_rwlen = 0;
   	    }
   	}
-*** ../bash-4.3-patched/parse.y	2015-05-18 19:27:05.000000000 -0400
+*** ../bash-4.3-patched/y.tab.c	2015-05-18 19:27:05.000000000 -0400
 --- y.tab.c	2015-06-29 10:59:27.000000000 -0400
 ***************
 *** 6021,6024 ****
--- diff ends here ---

Notified by:	many
c43a81c6fc
Emanuel Haupt (ehaupt)
Update to 4.3.42
70ddfde405
Conrad Meyer (cem)
bash: Export symbols for "enable -f"

PR:		201959
Reviewed by:	ehaupt
Approved by:	markj (mentor)
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3231
b621c53816
Emanuel Haupt (ehaupt)
In addition to the previous commit also define USE_MKSTEMP=1 for a different code section.

Notified by:	naddy
98468372e9
Emanuel Haupt (ehaupt)
Scripts like https://github.com/henricj/scripts/blob/master/stir.sh often generate a bunch of,    cannot make pipe for process substitution: File exists errors.

The problem lies with colliding pipe names.

The code in sh_mktmpname() in lib/sh/tmpfile.c uses a combination of things like
the current time, the PID, and an incrementing counter. Since the child PIDs
tend to be sequential (barring kern.randompid=1), there are collisions.

Fix this problem without rewriting upstream code by defining USE_MKTEMP=1 to
use the mktemp(3) code of bash.

FreeBSD's mktemp() is not nearly as bad as the bash default and isn't
brain-damaged like some platforms (which is likely why the bash code tries to
do it's own thing). In FreeBSD, "mktemp(3)" it uses arc4random to pick one of
62 symbols for each "X".

Submitted by:   Henric Jungheim <software@henric.org>
72451773c8
Emanuel Haupt (ehaupt)
Update to 4.3.39
42a77ab07a
Mathieu Arnold (mat)
Cleanup DIST* variables.

When appropriate:
- Try to use DISTVERSION{SUF,PRE}FIX
- Replace PORTNAME-PORTVERSION by DISTNAME
- Convert MASTER_SITES to use macros
- Other light cleanup

With hat:	portmgr
Sponsored by:	Absolight
88bfe4bd43
Emanuel Haupt (ehaupt)
Ports should not change their pkgname depending on options. Change the way how the slave port is handled.

PR:		197818
Submitted by:	mat
c73a7391d6