usr.bin: Remove intrinsic utilities

These utilities can only function correctly if implemented as shell
builtins and exist only because POSIX previously required them.  As of
POSIX 2024, they have all been reclassified as intrinsic utilities and
are no longer required to exist in PATH.  We can therefore retire them.
Cf. XBD 1.7, XRAT C.1.8, Austin Group bug 854.

Note that kill(1) is also considered an intrinsic utility (because
only the shell can interpret job IDs correctly), but we have a working
standalone implementation, which we will keep.

PR:		291686
Relnotes:	yes
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D54239
This commit is contained in:
Dag-Erling Smørgrav 2025-12-19 18:13:23 +01:00
parent c8b3b605ae
commit 4100bd6caa
7 changed files with 34 additions and 57 deletions

View file

@ -51,6 +51,23 @@
# xargs -n1 | sort | uniq -d;
# done
# 20251215: Remove intrinsic utilities
OLD_FILES+=usr/bin/alias
OLD_FILES+=usr/bin/bg
OLD_FILES+=usr/bin/cd
OLD_FILES+=usr/bin/command
OLD_FILES+=usr/bin/fc
OLD_FILES+=usr/bin/fg
OLD_FILES+=usr/bin/getopts
OLD_FILES+=usr/bin/hash
OLD_FILES+=usr/bin/jobs
OLD_FILES+=usr/bin/read
OLD_FILES+=usr/bin/type
OLD_FILES+=usr/bin/ulimit
OLD_FILES+=usr/bin/umask
OLD_FILES+=usr/bin/unalias
OLD_FILES+=usr/bin/wait
# 20251208: Rename iwm8000C to correct name.
OLD_FILES+=boot/firmware/iwm8000C

View file

@ -26,7 +26,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd March 29, 2025
.Dd December 16, 2025
.Dt BUILTIN 1
.Os
.Sh NAME
@ -61,9 +61,9 @@ and the standard shells that provide them.
.It Ic \&[ Ta Yes Ta \&No Ta Yes
.It Ic { Ta \&No Ta \&No Ta Yes
.It Ic } Ta \&No Ta \&No Ta Yes
.It Ic alias Ta No* Ta Yes Ta Yes
.It Ic alias Ta \&No Ta Yes Ta Yes
.It Ic alloc Ta \&No Ta Yes Ta \&No
.It Ic bg Ta No* Ta Yes Ta Yes
.It Ic bg Ta \&No Ta Yes Ta Yes
.It Ic bind Ta \&No Ta \&No Ta Yes
.It Ic bindkey Ta \&No Ta Yes Ta \&No
.It Ic break Ta \&No Ta Yes Ta Yes
@ -71,9 +71,9 @@ and the standard shells that provide them.
.It Ic builtin Ta \&No Ta \&No Ta Yes
.It Ic builtins Ta \&No Ta Yes Ta \&No
.It Ic case Ta \&No Ta Yes Ta Yes
.It Ic cd Ta No* Ta Yes Ta Yes
.It Ic cd Ta \&No Ta Yes Ta Yes
.It Ic chdir Ta \&No Ta Yes Ta Yes
.It Ic command Ta No* Ta \&No Ta Yes
.It Ic command Ta \&No Ta \&No Ta Yes
.It Ic complete Ta \&No Ta Yes Ta \&No
.It Ic continue Ta \&No Ta Yes Ta Yes
.It Ic default Ta \&No Ta Yes Ta \&No
@ -93,22 +93,22 @@ and the standard shells that provide them.
.It Ic exit Ta \&No Ta Yes Ta Yes
.It Ic export Ta \&No Ta \&No Ta Yes
.It Ic false Ta Yes Ta \&No Ta Yes
.It Ic fc Ta No* Ta \&No Ta Yes
.It Ic fg Ta No* Ta Yes Ta Yes
.It Ic fc Ta \&No Ta \&No Ta Yes
.It Ic fg Ta \&No Ta Yes Ta Yes
.It Ic filetest Ta \&No Ta Yes Ta \&No
.It Ic fi Ta \&No Ta \&No Ta Yes
.It Ic for Ta \&No Ta \&No Ta Yes
.It Ic foreach Ta \&No Ta Yes Ta \&No
.It Ic getopts Ta No* Ta \&No Ta Yes
.It Ic getopts Ta \&No Ta \&No Ta Yes
.It Ic glob Ta \&No Ta Yes Ta \&No
.It Ic goto Ta \&No Ta Yes Ta \&No
.It Ic hash Ta No* Ta \&No Ta Yes
.It Ic hash Ta \&No Ta \&No Ta Yes
.It Ic hashstat Ta \&No Ta Yes Ta \&No
.It Ic history Ta \&No Ta Yes Ta \&No
.It Ic hup Ta \&No Ta Yes Ta \&No
.It Ic if Ta \&No Ta Yes Ta Yes
.It Ic jobid Ta \&No Ta \&No Ta Yes
.It Ic jobs Ta No* Ta Yes Ta Yes
.It Ic jobs Ta \&No Ta Yes Ta Yes
.It Ic kill Ta Yes Ta Yes Ta Yes
.It Ic limit Ta \&No Ta Yes Ta \&No
.It Ic local Ta \&No Ta \&No Ta Yes
@ -125,7 +125,7 @@ and the standard shells that provide them.
.It Ic printf Ta Yes Ta \&No Ta Yes
.It Ic pushd Ta \&No Ta Yes Ta \&No
.It Ic pwd Ta Yes Ta \&No Ta Yes
.It Ic read Ta No* Ta \&No Ta Yes
.It Ic read Ta \&No Ta \&No Ta Yes
.It Ic readonly Ta \&No Ta \&No Ta Yes
.It Ic rehash Ta \&No Ta Yes Ta \&No
.It Ic repeat Ta \&No Ta Yes Ta \&No
@ -148,27 +148,21 @@ and the standard shells that provide them.
.It Ic times Ta \&No Ta \&No Ta Yes
.It Ic trap Ta \&No Ta \&No Ta Yes
.It Ic true Ta Yes Ta \&No Ta Yes
.It Ic type Ta No* Ta \&No Ta Yes
.It Ic ulimit Ta No* Ta \&No Ta Yes
.It Ic umask Ta No* Ta Yes Ta Yes
.It Ic unalias Ta No* Ta Yes Ta Yes
.It Ic type Ta \&No Ta \&No Ta Yes
.It Ic ulimit Ta \&No Ta \&No Ta Yes
.It Ic umask Ta \&No Ta Yes Ta Yes
.It Ic unalias Ta \&No Ta Yes Ta Yes
.It Ic uncomplete Ta \&No Ta Yes Ta \&No
.It Ic unhash Ta \&No Ta Yes Ta \&No
.It Ic unlimit Ta \&No Ta Yes Ta \&No
.It Ic unset Ta \&No Ta Yes Ta Yes
.It Ic unsetenv Ta \&No Ta Yes Ta \&No
.It Ic until Ta \&No Ta \&No Ta Yes
.It Ic wait Ta No* Ta Yes Ta Yes
.It Ic wait Ta \&No Ta Yes Ta Yes
.It Ic where Ta \&No Ta Yes Ta \&No
.It Ic which Ta Yes Ta Yes Ta \&No
.It Ic while Ta \&No Ta Yes Ta Yes
.El
.Pp
\&No*: Commands marked
.Ql No*
exist externally, but are implemented as scripts using a
.Nm
command of the same name.
.Ss Keybinds
The command line environment also provides the following
default keyboard bindings:

View file

@ -128,7 +128,6 @@ DIRDEPS+= \
sbin/sysctl \
sbin/tunefs \
sbin/umount \
usr.bin/alias \
usr.bin/apply \
usr.bin/ar \
usr.bin/asa \

View file

@ -1,7 +1,6 @@
.include <src.opts.mk>
SUBDIR= alias \
apply \
SUBDIR= apply \
asa \
awk \
backlight \

View file

@ -1,19 +0,0 @@
SCRIPTS=generic.sh
SCRIPTSNAME=alias
LINKS= ${BINDIR}/alias ${BINDIR}/bg \
${BINDIR}/alias ${BINDIR}/cd \
${BINDIR}/alias ${BINDIR}/command \
${BINDIR}/alias ${BINDIR}/fc \
${BINDIR}/alias ${BINDIR}/fg \
${BINDIR}/alias ${BINDIR}/getopts \
${BINDIR}/alias ${BINDIR}/hash \
${BINDIR}/alias ${BINDIR}/jobs \
${BINDIR}/alias ${BINDIR}/read \
${BINDIR}/alias ${BINDIR}/type \
${BINDIR}/alias ${BINDIR}/ulimit \
${BINDIR}/alias ${BINDIR}/umask \
${BINDIR}/alias ${BINDIR}/unalias \
${BINDIR}/alias ${BINDIR}/wait
.include <bsd.prog.mk>

View file

@ -1,10 +0,0 @@
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View file

@ -1,3 +0,0 @@
#!/bin/sh
# This file is in the public domain.
builtin ${0##*/} ${1+"$@"}