This is GNU Bash. Bash is the GNU Project's Bourne Again SHell,
a complete implementation of the POSIX.2 shell spec, but also
with interactive command line editing, job control on architectures
that support it, csh-like features such as history substitution and
brace expansion, and a slew of other features.
===> The following configuration options are available for bash-5.3.20:
DOCS=on: Build and/or install documentation
FDESCFS=off: Enable use of /dev/fd
HELP=on: Enable builtin help
NLS=on: Native Language Support
PORTS_READLINE=off: libreadline from ports instead of bundled one
STATIC=off: Build static executables and/or libraries
SYSBASHRC=on: Enable system-wide rc files
SYSLOG=off: Syslog logging support
===> Use 'make config' to modify these settings
Reason:
The SYSBASHRC option is now enabled by default. For those who use bash
interactively the system-wide RC file shall be sourced automatically
giving the user the same experience as invoking it as a login shell.
Reason:
Bash has been updated to version 5.2. In previous versions, the default port
option-set used to link against libreadline from ports. However, the current
version of devel/readline is too old for bash 5.2.
For now, the default option has been switched to use the bundled version of
libreadline and the other option is marked broken. Once devel/readline is
updated this can be reverted.
If you're updating bash from source and you've previously explicitly set to
use use PORTS_READLINE, you'll have to disable the PORTS_READLINE option
before updating:
# cd /usr/ports/shells/bash
# make config
or flush it entirely:
# cd /usr/ports/shells/bash
# make rmconfig
2021-04-16
Affects: users of shells/bash, shells/bash-static with PORTS_READLINE=off
Author: olce.freebsd@certner.fr
Reason:
Bundled readline now will use LOCALBASE/etc/inputrc as its ultimate default
inputrc file (instead of /etc/inputrc). This puts these ports in line with
what devel/readline has been doing recently (since 20210103).
shells/bash: fix build on powerpc64le/CURRENT
Clang crashes with the default -mcpu, but builds with -O0:
Assertion failed: (Subtarget->hasP9Vector() && "XSCMPUQP requires Power9
Vector"), function SelectCC, file
/usr/src/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp, line
4271.
shells/bash: Reintroduce PORTS_READLINE
Now that readline has been updated to 8.3, the option to use the library from
ports rather than the bundled version can be restored. The option remains
disabled by default to avoid unexpected build or runtime changes for users
and to maintain consistency with previous releases.
PR: 288208
shells/bash-static: Exclude PORTS_READLINE and NLS options with STATIC
Summary:
When building the static version of bash, runtime dependencies on
gettext-runtime and readline should not be present as the binary is
statically linked. This change excludes the PORTS_READLINE and NLS
options in the slave port to avoid unnecessary dependencies.
Differential Revision: https://reviews.freebsd.org/D49191
*/*: Simply future removal of GNU_CONFIGURE_MANPREFIX
Simplify the future removal of GNU_CONFIGURE_MANPREFIX after the
manprefix migration is complete. The current placement of
GNU_CONFIGURE_MANPREFIX will not result in consecutive blank lines or
comments when lines containing GNU_CONFIGURE_MANPREFIX are removed in
batches.
Notified by: mat
shells/bash: Remove unsed makeinfo use flag
Makeinfo is not actually used because, after patching, it updates the
timestamps of *.info files, preventing doc/Makefile from wanting to
regenerate bash.info.
While here, sort USES.
PR: 275439
shells/bash: Unbreak this port after readline 8.2 update
- Add BUILD_DEPENDS to avoid the users building this port with readline 8.1.x
Approved by: portmgr (blanket)
shells/bash: Revise fix when NLS is off
The fix commited in 17f1bb50e42a45dc64fc898cd9cae905d7262bda clashed
with cc83ec0f744fb159bd48303d15c09aa0c6cb38a4.
The later is a more elegant solution that doesn't require to drop
the header files from being installed.
This commit reverts changes from 17f1bb50e42a45dc64fc898cd9cae905d7262bda.
shells/bash: fix static build
The logic in m4/strtoimax.m4 is inverted: it replaces strtoimax() if and only
if it is present and functional.
files/patch-configure avoids having to run autoreconf in the port and can be
removed once the fix has been adopted upstream.
differential Revision: https://reviews.freebsd.org/D36849
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
shells: remove 'Created by' lines
A big Thank You to the original contributors of these ports:
* Adam Weinberger <adamw@FreeBSD.org>
* Andreas Kohn <andreas@syndrom23.de>
* Carlos Jacobo Puga Medina <cpm@FreeBSD.org>
* Cyrille.Lefevre@laposte.net
* Danijel Tasov <danielt@pilgerer.org>
* David O'Brien <obrien@NUXI.com>
* Emanuel Haupt <ehaupt@FreeBSD.org>
* Hajimu UMEMOTO <ume@FreeBSD.org>
* Igor Pokrovsky <ip@unixway.org>
* Jean-Yves Lefort <jylefort@brutele.be>
* Kai Wang <kaiw27@gmail.com>
(Only the first 15 lines of the commit message are shown above )
*/*: Remove redundant '-[0-9]*' from CONFLICTS
The conflict checks compare the patterns first against the package
names without version (as reported by "pkg query "%n"), then - if
there was no match - agsinst the full package names including the
version (as reported by "pkg query "%n-%v").
Many CONFLICTS definitions used patterns like "bash-[0-9]*" to filter
for the bash package in any version. But that pattern is functionally
identical with just "bash".
Approved by: portmgr (blanket)
shells/bash: fix compilation after libncurses split in base
bash actually only requires libtinfo, but up to recent change in
14.0-CURRENT, libtinfo and libncurses were bundled into one single libs,
so linking only to libncurses was not a problem.
By telling bash to link to libtinfo and not to libncurses, it works on
both system where ncurses has been split and those without the split as
there is a libtinfow.so symlink to libncursesw.so on those.
shells/bash:Prefix '/etc/inputrc' in bundled readline and documentation
Bundled readline now will use LOCALBASE/etc/inputrc as its ultimate
default inputrc file (instead of /etc/inputrc). This puts these ports in
line with what devel/readline has been doing recently (since 20210103).
PR: 255126
Submitted by: olivier.freebsd@free.fr
NEW PORT: shells/bashc: GNU Bourne Again shell extended with two-panel file
manager
Bash Commander is a fork of GNU Bourne Again Shell. It's main feature is
a visual two-panel mode, much like Midnight Commander and other text-mode
visual shells.
WWW: https://github.com/sergev/bash-commander
Also add bashc to the CONFLICTS section of shells/bash.
PR: 253783, 253784
Submitted by: Igor Pokrovsky <ip AT unixway DOT org>
Enforce using libncursesw like the rest of the ports
The whole ports tree has been enforced on libncursesw (widechar) version for a
while.
With the exception of a few ports including bash.
This is even more problematic in the case of bash because it links to
libreadline which is
linked to libncursesw.so
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
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>
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>
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.
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
- 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]
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
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
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
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)
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>
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
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
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
[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
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>
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