Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 May 2019 21:26:39 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 238248] shells/ksh93: after udpate to ksh93-20141224 it uses inproper date command
Message-ID:  <bug-238248-7788-Aj1OZGd8Vr@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-238248-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-238248-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238248

--- Comment #1 from Marcin Cie=C5=9Blak <saper@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=3D.
                      and place /opt/ast/bin before /bin and /usr/bin in $P=
ATH
                      (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 built=
ins
                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.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-238248-7788-Aj1OZGd8Vr>