Commit graph

17 commits

Author SHA1 Message Date
is
9c5e6fdd19 Update to mksh-39c on suggestion from Thorsten Glaser. 2010-05-28 12:26:49 +00:00
jmmv
9a786011ff Bump PKGREVISION to reflect the recent change in pkginstall/shells to use
etcutils to update /etc/shells.
2010-05-07 12:02:43 +00:00
ahoka
2aaae24f73 mksh R39 evolved into these through various means:
[tg] Shut up a bogus gcc warning during configuration process
[tg] Spell AT&T consistently in the source code
[tg] Tweak mksh(1) manual page, from wbx@ and «lewellyn:#ksh»
[tg] dot.mkshrc: fix $@ vs. $* mix-up
[tg] dot.mkshrc: add DJB cdb hash function
[tg] Sync with oksh: fix Vi editing mode word erase handling, again
[tg] Skip whitespace between POSIX style shell function name and its definition parenthesēs during detection if an alias of the same name already exists to be more robust (Debian Closes: #535970)
[tg] Build system improvements for ACK and nwcc, both on Debian sid
[tg] Fix spelling error in changelog discovered by Lintian
[tg] Aligh “set -o nounset” / “set -u” behaviour with future POSIX standard, as discussed with GNU bash maintainers, David Korn from AT&T ksh93, and The Open Group; prompted by use in Debian; Closes: #539538
[tg] add an unsupported way to make printf(1) a builtin
[tg] Build system and regression test code and comment improvements: better and more comments matching reality better; more reliability w.r.t. passed CPPFLAGS; more of the MKSH_SMALL changes may be overridden, all of them are now enumerated on the webpage; fixed some breakage; portability
[tg] MKSH_NOPWNAM and MKSH_SMALL will now both disable the ~fac/ (homedir) expansion code wholly if defined, not just getpwnam(3) calls
[tg] shells without job control no longer define the standard “stop” and “suspend” aliases (they are pointless anyway); regression tests know
[tg] use system RCS ID macros on MirBSD if decent enough
[tg] shut up bogus gcc 4.5/trunk warnings caused by over-optimisation
[tg] restore ANSI C compilability broken in R38 (speed up, even)
[tg] use memcpy(3) ipv strlcpy(3) if possible and safe and secure
2009-12-05 13:31:18 +00:00
joerg
f0bbd1517d Remove @dirrm entries from PLISTs 2009-06-14 18:13:25 +00:00
ahoka
6db67b0c01 mksh R38c contains the following fixes:
*  [tg] Fix regression tests on OSes insisting on a shebang (Cygwin)
    *  [Sean Boudreau] QNX 6.4.2 ed(1) is said to have the bugs fixed
    *  [tg] Build.sh bugfixes: -DMKSH_BINSHREDUCED can also
        be given without -DMKSH_SMALL; allow HAVE_REALPATH=x and
        HAVE_REVOKE=x in the environment to re-enable these even if
        -DMKSH_SMALL disables them by default, like mknod already did
    *  [tg] -DMKSH_ASSUME_UTF8=0 skips the environment checks, like
        -DMKSH_ASSUME_UTF8=1, but disables the utf8-mode
    *  [tg] Apply some more KNF – style(9) – to the source; clean it up
        and further optimise for small size
    *  [OpenBSD] Fix segfaults caused by missing check for end of input
        in the tokeniser on “let --” and other input
    *  [OpenBSD] Make Vi editing mode ^W behave like Emacs mode’s
    *  [tg] If no killpg(3) is avaiable, use kill(2) and hope it works
    *  [tg] -DMKSH_NO_LIMITS skips trying to build the ulimit code
2009-06-14 11:51:41 +00:00
ahoka
ec83379c75 Update to mksh R38b:
mksh R38b fixes the following problems:


    *  [André Wösten] Add __NO_EXT_QNX to avoid picking up the wrong
        waitfor() from <libutil.h> in (while porting to) QNX 6.4

    *  [tg] Plug memory corruption issue introduced in R38

    *  [tg] Amend dot.mkshrc with a base64 en-/decoder in shell

    *  [tg] Import a manpage fix via OpenBSD from Alan R. S. Bueno


mksh R38 comes with these changes and fixes applied:


    *  [tg] Improve regression test output debugging

    *  [tg] Fix <libutil.h> prerequisites on MidnightBSD in mirtoconf

    *  [tg] Mention that RedHat BZ#496791 cannot currently be fixed in the
        manpage by discouraging use of apostrophes in comments in comsubs; add
        appropriate (expected-fail) regression tests

    *  [tg] Sync with OpenBSD ksh (mostly a no-op)

    *  [James Butler] Add search-history-up and search-history-down keybindings
        (tcsh-like) to the Emacs command line editing mode

    *  [tg] Bind new search-history-{up,down} to ANSI PgUp and PgDn keys

    *  [tg] Document ANSI default keybindings (↑↓←→ Home End Del PgUp PgDn)
        in the mksh(1) manual page as well

    *  [tg] Optimise internal UTF-8 handling code for size and reusability

    *  [tg] Incompatible change: ${foo:1:2} and ${#foo} now
        operate on characters, not on bytes. Characters are octets (set +U)
        or (utf8-mode) MirOS OPTU-8 multibyte characters (set -U)

    *  [tg] Improve regression tests relating to ${foo:1:2} and
        ${#foo} and let wc=1#x and utf8-mode

    *  [tg] Use per-file copyright notices, move global text to manpage

    *  [tg] Expose new MKSH_MIDNIGHTBSD01ASH_COMPAT ifdef; change it to
        only trigger if FPOSIX (or MKSH_BINSHREDUCED and /bin/sh)

    *  [tg] Remove already-dead “#if 0” style debugging code

    *  [tg] Change some code into a more portable fashion, optimise

    *  [tg] Allow [[ $foo ]] (ksh93 extension) mentioned by pgas

    *  [tg] Clean up mksh and the contributed arc4random.c for some
        conversion, enum and other warnings for gcc-snapshot trunk r147610

    *  [tg] Ensure no function uses more than 768 bytes of stack either

    *  [tg, wbx] Add extension to make “!string” lines work like in GNU bash
2009-06-03 13:46:03 +00:00
ahoka
13684d66b6 mksh R37c provides these follow-up fixes:
.[tg] Improve præprocessor detection/work in Build.sh
.[tg] Decouple MKSH_CONSERVATIVE_FDS from MKSH_SMALL
.[tg] Enable MKSH_CONSERVATIVE_FDS by default on Minix 3
.[tg] Work around the (in-)famous ACK "const" bug
.[tg] Optimise structure alignment and padding; Closes: #522778
.[tg] Retain LOCPATH (for glibc locale) in check.pl
.[tg] Document, simplify and clean up the code better
.[tg] Use mirbsd.org eMail addresses consistently

mksh R37b comes with the following fixes on top:

.[tg] Clean up build system and dot.mkshrc some more
.[tg] Add getrusage(2) implementation using times(3) if none found
.[tg] Add jobless mode (for Minix 3, Plan 9, .)
.[tg] Detect the Amsterdam Compiler Kit in the build system
.[tg] If no RLIM_INFINITY don.t try to do ulimit
.[tg] Work around gcc4 strict warnings vs. broken system headers
.[tg] Work around systems with mmap(2) but no munmap(2)
.[tg] Fix (disallow) bind key macro recursion (instead of beeping and going into an endless loop), allow multi-line bind key macros (mostly from Alexander Hall), remove dead code (the beeping) and optimise
.[tg] Add (commented out, undesired, standards compliance breaking) compatibility code to MidnightBSD 0.1 /bin/sh for ctriv
.[tg] Clarify the mksh(1) manual page even more
.[tg] Port to Minix 3 + GCC

mksh R37 has major standards compliance improvements:

.[tg] Rename -o utf8-hack to -o utf8-mode
.[tg] Fix spacing mode error (pasto) in the mdoc(7) format manpage
.[tg] Implement $((#.)) unsigned arithmetic calculation, needed for arc4random_uniform(3)-in-korn-shell implementation
.[tg] Really preserve LD_LIBRARY_PATH in check.pl
.[tg] New Build.sh option .-combine. for building mksh(1) at once with .-fwhole-program --combine. (gcc4, llvm-gcc4) if available
.[tg] Always set COLUMNS and LINES trying as hard as we can, using TIOCGWINSZ even if used without FTALKING, and with the sane 80x24 default if the ioctl(2) fails
.[tg] Handle _POSIX_VDISABLE being undefined (e.g. Linux/klibc)
.[tg] <sys/file.h> is only required for flock(2)
.[tg] Fix multi-column output routine for the corner case if the screen is less wide than one output column; 10x Gábor Gergely
.[tg] Fix ${foo/@(%)/\\x} in UTF-8 mode (utf_widthadj for control characters U+0080.U+009F is slightly broken; this fix shifts the brokenness into the command line editing mode only)
.[tg] Introduce mksh_ari_t and mksh_uari_t internal types to limit arithmetics to 32 bit on all systems; currently depending on the already-used standard int32_t and uint32_t types. Future expansion to 64 bit possible. Document that shell integer variables use this type.
.[tg] The variables PGRP, PPID, RANDOM and USER_ID are now unsigned
.[tg] Fix two off-by-ones breaking PS1 ending with a newline; bug reported by Matthias Diener
.[tg] Just pass through C1 control characters for now
.[tg] Code and internal interfaces cleanup
.[tg] Regression test fixes for Cygwin env(1) being unsorted
.[tg] Replace the memory allocator by something equally simple and homegrown but optimised for use with mksh and free checking
.[tg] Import a couple of minor fixes (e.g. spelling) from oksh
.[tg] Fix problems with "set -e" for real; from oksh, Closes: #518359
.[tg] In "set -o posix" mode, have limited echo(1) to improve standards compliance; the exact feature set is open for discussion, e.g. with pkgsrc® people; for now, only -n as first arg
.[tg] Make test builtin operator precedence consistent; from oksh
.[tg] Revamp and fold and enhance the regression tests
.[tg] Document somewhat surprising behaviour in mksh(1) better; here: [ x -eq y ]; for gps23 from #ksh
.[tg] Reduce memory consumption by allocator simplification
.[tg] Fix bugs spotted by DEC ucode cc (ULTRIX) and gcc 1.42 (BSD/OS)
.[laffer1] Make mksh the default /bin/sh in MidnightBSD
2009-04-13 19:48:34 +00:00
ahoka
04f2d4187d Update to version R36.
Major changes:

* Digital UNIX (DEC OSF/1) V2.0 (MIPS) is now supported using the DEC C and ucode toolchain. (We could not run the testsuite, though.)
* The ‘-Q’ option to Build.sh is gone without replacement.
* A new option can be enabled by adding -DMKSH_BINSHREDUCED to $CPPFLAGS, intended mostly for Debian. This option adds extra code to determine whether mksh(1) is called as sh or -sh and switch to “set -o posix” mode if so, disabling brace expansion and some security features, because legacy scripts, such as debconf, depend on such reduced functionality /bin/shs.
* Input lines beginning with an IFS character of IFS white space are no longer pushed into the history. Some other, less surprising, changes were also made to both Emacs and Vi command line editing modes.
* The arc4random.c contributed file is now stored with the RCS version number appended, and has been updated.
2008-10-25 18:58:13 +00:00
ahoka
51e345d96d Update mksh to R35b.
mksh R35b comes with the following bug fixes:
IRIX also has no UTF-8 locale at all, confirmed by Elias Pipping
Fix regression test suite for MKSH_SMALL
Bring in latest changes from oksh (OpenBSD ksh, not DeliLinux crap)
Fix abuse and unsafe use of str_save() and str_nsave()
Optimise the implementations of str_save() and str_nsave()
If MKSH_AFREE_DEBUG is defined, guard against afree()ing a pointer which has not been allocated from the given pool, from Todd C. Miller
Fix attempt to free a pointer to stack (function-local) storage when redefining a function containing a call to the “time” built-in, discovered by Elias Pipping, patch by Jared Yanovich, help from Todd C. Miller
Protect a little against people not running “./test.sh -v” but calling it with, for instance, GNU bash (as homsn did…)
Honour $PERL environment variable in test.sh, improve scanning for Perl, do not use potentially undefined $^O, print Perl version
Add <sys/types.h> as <ulimit.h> requirement (dietlibc)
Work around bug in BSD/OS 3.1 /bin/ksh (PD KSH v5.2.8 96/08/19)
Add regression tests from OpenBSD’s <bsd.regress.mk> suite
Use better CPPFLAGS for AIX, Minix 3 (from pdksh)
Expose the “s ≠ NULL” str_[n]save_() API and use it where the string can never be NULL (local stack storage), from gcc-4.2 warnings
Clean up pointer-to-integer-cast warnings in the mirtoconf process

mksh R35 comes with helluva changes:
Simplify and refactor the ulimit builtin, partially from oksh
Some style cleanup; use appropriate integer types
Fix a bug in table (e.g. kill -l, tab completion) display: the width of non-ASCII characters is now honoured in the utf8-hack mode
Improve handling of invalid UTF-8 in certain areas, and multibyte (UTF-8 / CESU-8) in general
When using “typeset -Z«n»” on an integer variable with a base other than ten, zero-pad the value instead of the base – pdksh, oksh, zsh, and AT&T ksh93 are wrong here; GNU bash doesn’t even have typeset
Improve parsing of “set +o” output where done (dot.mkshrc, check.t)
Improve regression tests
Support for base-1 numbers: in non-utf8-hack mode, ‘1#x’ means the same as the ASCII code for ‘x’ (e.g. 78hex), where ‘x’ is any single octet (byte); in utf8-hack mode, ‘x’ is either a valid and minimalistically encoded UTF-8 multibyte character in the range 0000‥FFFD, or a single octet with no trailing octets (bytes), which will then be converted as if it were an ASCII value, or, if bit7 is set, be mapped into the PUA range of EF80‥EFFF assigned by CSUR for this purpose; this mapping is, in both cases, bidirectional; the planned base-0 number support is not possible with the code, so use base-1 (with utf8-hack disabled, or & 0xFF) instead (while it is recommended to parse only single octets, there is a regression test showing correct and safe multibyte parsing, which however is error-prone to implement and thusly not recommended) – “genial” replaced@TNG, “this sounds fun” ggergely, agreed bsiegert@ and others
Pull in more current versions of supplied files; use Unicode 5.0
Clean up unused definitions in build system; document MKSH_CLS_STRING
Remove advertising clause from copyright file; while we’d be pleased to be mentioned if something contains our code, tg@ will no longer enforce the requirement to advertise with that specific formula, and we’d prefer if people remember the OpenHAL vs ath5k incident and that they cannot simply change licencing of existing code; patches sent to the MirOS Project for inclusion shall be accepted if they’re agreed to match this licence
Simplify dot.mkshrc sample file: licence is merged into the main copyright file; AT&T ksh93 compatibility was improved
Fix a display problem regarding fullwidth characters (e.g. CJK)
Set the “C” locale in Build.sh for tool execution; otherwise, certain OEs behave strange; thanks to Adam “replaced” Hoka for spotting
Use en_US.utf8 as UTF-8 locale for the testsuite for now
If setlocale(LC_CTYPE, "") is not available, look at the environment variables ourselves – brings UTF-8 support to poor OSes
Remove some now-dead code; speed up configuration process; shrink
Default to no setlocale(3) due to stubbed or missing locale support on GNU/Cygwin, OpenBSD, OSF/1 in Build.sh; a few more that are quite unlikely to have a UTF-8 locale: BSD/OS, Interix, Minix, PW32, Ultrix, AT&T UWIN; default to always UTF-8 on Plan 9
Fix for testsuite unexpected failure if running as root in one case
Initialise all shell integer variables (OPTIND, PPID, RANDOM, SECONDS, TMOUT) to base 10
Reintroduce from mksh pre-R24 shell integer variable PGRP set to the PID of the process group leader via getpgrp(2)
New shell integer variable USER_ID set to the geteuid(2) and used by dot.mkshrc to speed up logins, saves a spawn of id(1), mentioned by and realisation planned with Andreas "gecko2" Gockel
Fix dot.mkshrc tilde replacement in both $PS1 and the pushd/popd/dirs implementation when the home directory is empty, the root directory, or ends with a slash (disable replacement in that case)
Support dietlibc, force it into providing a BSDish caddr_t
Do not use LDFLAGS and LIBS while compiling with -c
Add realpath(3) builtin, to further speed up logins and chdirs
Optimise the code somewhat by making use of possible assumptions
Set the “C” locale in test.sh as well to quell warnings
Split the regression tests that use locale between en_US.utf8 and en_US.UTF-8, since not all OSes support either one, and make only HP-UX and GNU use the latter
Fix kill, mknod(8) builtin usage msg, from Igor Sobrado via oksh
Use proper ptrdiff_t casts for pointer arithmetics, inspired by an oksh commit from Federico Schwindt
Remove check category “pdksh” from check.t and test script
Improve Darwin, OSF/1, HP aCC, SUNpro version reporting
Support GNU bash “&>” extension, even better than they do, suggested by Lukas “smultron” Upton from MidnightBSD
Basic support for LLVM+clang in the build system with experimental “ccc” compiler driver; llvm-gcc worked as-is before already
Better support for contributed arc4random.c file
Do not spin if unlink(2) fails on $HISTFILE, from Decklin Foster
Dump the perl(1) $^O variable in test.sh to logs
Pull in latest changes from oksh
Allow white space between a here string indicator and the string, accidentally discovered by twkm (#ksh, freenode)
Allow fd specifications outside the 0‥9 range for I/O redirections, and bounds check them to be lower than the FDBASE definition, currently still 10 if MKSH_SMALL, 24 otherwise (unportable)
Improve the regression test suite: for one test, we had a bizarre constraint telling it won’t work on UWIN, which was based upon false assumptions, but Tru64 would fail it since its cat(1) unexpectedly outputs some error messages (fix by closing stderr for cat); another test would unexpectedly print no error message on Solaris (fix by making the error message optional in the perlre(1) used)
Switch back to en_US.UTF-8 for glibc, Debian can do both, Mandriva fails on en_US.utf8 (XXX no libc5 auto-detection to disable it)
2008-10-06 21:22:31 +00:00
wiz
aaf474cc3a Update to R33d:
No changes in mksh R33c except for Ultrix support. None in R33d.

In mksh R33b, much more compilers are detected, even if not all of
them are supported. The OE (OS and CC/LD) versions are now dumped
too. Instead of #error, forced link failures are now used as the
mechanism to auto-detect some things in the target environment.
Features are now much better detected, and some annoying warnings
don't show up any longer due to this.  Less tools are required to
build.

Please be reminded that you should run ./test.sh -v inside an
environment with /dev/tty available (as device node) and usable
(e.g. use script(1) or GNU screen if you're doing auto-builds
detached from controlling terminal). Use -v to see failures.

No surprises in mksh R33 either, but the build system now gives
more detailed output on the version actually built, to aid tracking
down FTBFSen (build errors) with access to only the build logs.
Regression tests now work with Intel's compiler on SLES too, which
requires a custom LD_LIBRARY_PATH formerly stripped by the script.
2008-04-17 05:55:50 +00:00
bjs
7ac931559a Update from version R30 to R32, with myriad changes:
R32:
     * Make checks for symbol declarations compile checks instead of link
       checks, as the binding may not succeed due to different symbol types,
       for instance on AIX, if the declaration does not match
     * Widen the range of array indices to [0..2^3ý-1], with negative values
       being mapped into the high-bit31 range for simplicity
     * Fix the pipeline-as-coprocess internal error
     * Do not require certain integer types to be defined any more
R31d:
     * Support pcc (the ragge version of the Portable C Compiler)
     * Add pushd/popd/dirs functions (csh) and precmd/chpwd hooks (zsh) to
       dot.mkshrc which now requires readlink(1) with -f; requested by many
       (e.g. some Gentoo users; XTaran of symlink.ch)
     * Enable colour escapes in dot.mkshrc since almost nobody groks how to
       do it right from the manual
     * Remove -DMKSH_NEED_MKNOD checks from Build.sh, people should use the
       HAVE_MKNOD environment variable
     * Implement parallel make in Build.sh
     * Fix another busy-loop spinning problem introduced by an icc warning,
       thanks to spaetzle@freewrt.org for keeping to bug me to look for it,
       as it affected GNU/Linux most, followed by Solaris, rarely BSD
     * Improve standard integer type detection in Build.sh
     * Cleanups in code, build script and manual page
R31b:
     * Fix typo (blsk -> bksl) in check.t test naming
     * Autoscan for uint32_t, u_int etc. presence
     * Fix some memory leaks, mostly by NetBSD(R) via OpenBSD
     * The "unset" builtin always returns zero, even if the variable was
       already unset, as per SUSv3 (reported by Arkadiusz Miskiewicz via
       pld-linux -> oksh)
     * In tab-completion, escape the question mark, reminded by
       cbiere@netbsd.org, via oksh
     * Fix a busy-loop problem, Debian #296446 via oksh
     * Fix a few display output problems in the build script
     * Shut up some gcc warnings on Fedora; beautify some code
     * Support OSF/1 with gcc2.8, thanks to Jupp Schugt
     * Fix gcc4 detection of __attribute__() on non-SSP targets
R31:
     * Support the TenDRA compiler (possibly also Ten15, not tried)
     * Begin supporting Fabrice Bellard's Tiny C Compiler (tcc on Debian
       cannot link due to duplicate symbols in GNU libc, thus unfinished)
     * Improve some mirtoconf checks (most notably, mknod(2) and macros)
     * Add new emacs editing command "clear-screen" (ESC ^L) as requested by
       D. Adam Karim <archite@midnightbsd.org>
     * Support building for MidnightBSD
     * Add new shell alias "source", semantics like the GNU bash builtin
     * Add new shell option "set ño arc4random", controlling whether rand(3)
       or arc4random(3) is used for the $RANDOM value, use
       arc4random_pushb(3)
     * Add new builtin "rename" (just calls rename(2) on its arguments)
     * Fix the inofficial OpenBSD port, from D. Adam "Archite" Karim, 10x
     * Disable the less(1) history file by default (privacy issues) in the
       sample dot.mkshrc file; mention other things in etc_profile
     * Fix a syntax error in Build.sh checking for TenDRA
2007-11-23 07:58:57 +00:00
rillig
d49c1dac9c Removed the MD5, SHA256 and TIGER checksums. How did they get in here? 2007-08-18 16:47:48 +00:00
jlam
096522cddc Update shells/mksh to version 30. Changes from version 29.6 include:
* If the basename of argv[0] starts with "sh", activate FPOSIX early,
  preventing some typical ksh aliases from being defined.

* If FPOSIX, don't pre-define aliases (except integer and local) to
  benefit operating environments that never heard of the great Korn Shell.

* Support x=(a b c) bash-like array initialisation
* Support ${foo:2:3} bash-like substring expansion

* Don't try to execute ELF, a.out, COFF, gzip or MZ binaries, e.g.
  mksh /bin/sh.

* Prefer well-known signal names to alphabetically earlier ones

* Fix a bug delivering ERR and EXIT pseudo-signals to traps combined
  with "set -e".

Update from mirabilos#pkgsrc with small fixups by me.
2007-08-07 19:38:11 +00:00
joerg
ac24d53756 Maintainer/author update to mksh-R29f to fix a regression in the last
version. Some other small bugfixes and portability fixes are included
as well. From Thorsten Glaser.
2007-06-20 17:20:45 +00:00
joerg
d8a79343a1 Update to mksh-R29e. Fixes a number of display bugs, cursor positioning
bugs and issues shown by Coverity Prevent. From Thorsten Glaser.

Add DESTDIR support.
2007-05-23 11:02:32 +00:00
wiz
6e2c35c083 pkglint cleanup; update HOMEPAGE/MASTER_SITES.
From Sergey Svishchev in private mail.
2007-02-22 19:01:13 +00:00
joerg
f260bb8026 Import mksh. From Thorsten Glaser in private mail.
From DESCR:
mksh is the MirBSD enhanced version of the Public Domain Korn
shell (pdksh), a bourne-compatible shell which is largely si-
milar to the original AT&T Korn shell.  It includes bug fixes
and feature improvements in order to produce a modern, robust
shell good for interactive and especially script use.
2006-09-15 13:00:37 +00:00