[Bug 238248] shells/ksh93: after udpate to ksh93-20141224 it uses inproper date command
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu May 30 21:26:41 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238248
--- Comment #1 from Marcin Cieślak <saper at saper.info> ---
ksh93 is a part of a larger tookit called AST ( AT&T Software Technology ) and
along with it there are some utilities built-in with the shell:
> whence -v date
date is a shell builtin version of /bin/date
> whence -a date
date is a shell builtin version of /bin/date
There are quite a few of them:
builtin | grep /opt/ast/bin
> builtin | grep /opt/ast/bin | sed 's,/opt/ast/bin/,,' | paste - - - -
basename cat chgrp chmod
chown cksum cmp comm
cp cut date dirname
egrep expr fds fgrep
fmt fold getconf grep
head iconv id join
ln logname ls md5sum
mkdir mkfifo mktemp mv
od paste pathchk pids
readlink realpath rev rm
rmdir sha1sum sha256sum sha2sum
sha384sum sha512sum stty sum
sync tail tee tr
tty uname uniq vmstate
wc xargs xgrep
(in reality, not all of them are availbe - chmod is but chown isn't).
Here is an excerpt from the description
The stanadlone ksh is statically linked with the ast libcmd
library which provides several builtin versions of /bin
commands. "builtin | grep /opt/ast/bin" lists the libcmd
builtins on the standard output. /opt/ast/bin/FOO accesses
the FOO builtin, whether the /opt/ast/bin directory exists
or not. "builtin FOO" allows /opt/ast/bin/FOO to be accessed
as FOO, bypassing the $PATH setting. To enable all libcmd
builtins do one of the following:
(a) create the directory /opt/ast/bin and the file
/opt/ast/bin/.paths with this line
BUILTIN_LIB=.
and place /opt/ast/bin before /bin and /usr/bin in $PATH
(this will affect all ksh subshells and scripts)
(b) run "builtin $( builtin | sed -e '/\//!d' -e 's,.*/,,' )"
(this will affect only the current shell)
Some scripts may run significantly faster with libcmd builtins
enabled.
The point here is to have a consistent set of mostly used utilities and to make
ksh93 run much faster.
I think I have inadvertedly changed the way ksh93 was built and that might have
enabled the builtins. Need to check.
I guess the new port (formerly ksh93-devel) does not have this issue.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list