5 commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
micha
|
9de017e999 |
shells/bosh: Update to 20191025
Based on schilytools release from 2019-10-25. Changelog ========= - include/schily/wchar.h: Some fallback definitions for mbsinit() mbrtowc() wcrtomb() have been moved to make them always visible and not only in case that <wchar.h> exists. - include/schily/wchar.h: Before, we checked for HAVE_ISWPRINT to catch the HP-UX-10.20 case where wchar_t is in stdlib.h. Now we check (SIZEOF_WCHAR == 0 || SIZEOF_WCHAR_T == 0) as this works on Ultrix as well. - libgetopt: The getopt() function now supports options in the form: +o, ++long-option or +long-option if the optstring starts with a '+'. A new exported variable "optflags" has the bit "OPT_PLUS" set, in case that an actual option starts with '+'. If more than one of the flag characters ':', '+' or "()" are used, "()" must be last. - Bourne Shell: The testsuite no longer tries to check ISO-8859-1 strings as we cannot set this up reliably on all platforms and as Mac OS does not allow to create the related filenames. - Bourne Shell: The getopts(1) builtin command now supports options in. the form: +o, ++long-option or +long-option if the optstring starts with a '+'. The shell variable "$NAME" has a leading '+' in case that an actual option starts with '+'. Note that this makes getopts(1) in the Bourne Shell compatible at shell script level to the extensions in the getopts(1) implementation in ksh93 for: -o/+o Short options with either a leading - or + --long GNU style long options as aliases to short -o options ++long GNU style long options as aliases to short +o options Our enhancements to support: -long UNIX style long options as aliases to short -o options +long UNIX style long options as aliases to short +o options - Long options the have no related short option Are not supported by ksh93. |
||
micha
|
7f4ab48e7c |
shells/bosh: Update to 20191007
Based on SchilyTools Release from 2019-10-07. Changelog ========= - configure: Some shells report a syntax error with "< file (cmd)" and need the redirection statement to be *after* the command. Our changes to support the V7 shell by adding round braces caused ash variants like "dash" to fail. Thanks to Harald van Dijk for reporting - cont/cc-config.sh: canged some :>some-file statements into (:)>some-file. they have meen missed when introducing work arounds for the V7 Shell on Ultrix that does not support I/O redirection for builtin commands. Thanks to Robert Clausecker for reporting - libschily/comerr.c: If the environment COMERR_EXCODE has been set to a value that starts with '0', the normal exit code mapping is switched off, but all potential exit code values != 0 that follow the rule (excode % 256) == 0 are mapped to -64. This helps to avoid unexpected behavior with historic shells that still use the old waitpid() and modern shells (using waitid() but in a backward compatible default mode) where a program that terminates with exit(256); is evaluated in conditional statements as if the exit code was 0. - Bourne Shell: Missing Makefile.dot added. - Bourne Shell / bsh / ved: The dotdiles TAR archives are now again named */dotfiles.tar.bz2 as the change in the previous release caused problems. Thanks for Gabriele Balducci balducci@units.it and Robert Clausecker for reporting - Bourne Shell: Cstyle changes (long lines removed) in io.c & expand.c - Bourne Shell: Fixed a bug that prevented to forward the special exit cause (NOTFOUND or NOEXEC) to the vfork() parent process via. struct siginfo.si_code in some cases. These values are added beyond the POSIX CLD_* values in siginfo.si_code from the POSIX standard. They are passed back from the vfork()ed child to the parent via the shared memory from the vfork() implementation. - Bourne Shell: introduced shared memory to be able to forward the special exit cause (NOTFOUND or NOEXEC) to the parent even in case it used fork() instead of vfork(). - Bourne Shell: Added support for a new automatic parameter "$/" to complement the existing parameter "$?". This is a result from a discussion in a POSIX teleconference from April 2016. This new parameter returns *decimal numbers* for a normal command termination and *text* for abnormal command termination: number<>Exit code from normal termination. This is a signed 32 bit value from the exit() parameter on POSIX systems and a 8 bit value on pre-POSIX systems like Linux. signame>A signal name (see kill -l) if the command has been terminated by a signal. This is the signal name with the leading "SIG" stripped off. NOEXEC<>The command was found but could not be executed, e.g. as a result of missing permissions or because the name points to a directory. NOTFOUND The command could not be found. Note that currently, the strings "NOEXEC" and "NOTFOUND" are passed back reliably from vfork(2) childs or when the related state is already known by the cache. In other cases, the reliability of $/ with respect to "NOEXEC" and "NOTFOUND" has not yet been verified. It thus may return 126 or 127 as with $?. The string values "NOEXEC" and "NOTFOUND" cannot be passed back from a subshell, using only the waitid() mechanism. To circumvent that problem, from fork()ed subshells,. shared memory or non-fork()ed virtual subshells would work. If you detect a complex command where you get 126 or 127 instead of the exoected "NOEXEC" or "NOTFOUND", please send a report. We for now choose to use shared memory as this is easier to implement. Later versions will mosy likely implement virtual fork()less subshells. - Bourne Shell: minor Cstyle changes on word.c and macro.c - Bourne Shell: New version date |
||
micha
|
a487949e58 |
bosh: Switch to latest distfile.
Changelog ========= Release 2019-03-29: - Bourne Shell: local(1), export(1) and readonly(1) now all support to. expand the '~' character in environment variables like e.g. PATH. - Bourne Shell: Added unit tests for the tilde expansion and the related changes. Release 2019-04-29: - libshedit/bsh/Bourne Shell: The TAB file name expansion now uses a new expansion funtion that is not based on pattern matching but on strstr() and thus is no longer fooled by file names that contain pattern matching meta characters. - Bourne Shell: "trap -- ..." now correctly handles "--" even if the next argument is "-". - Bourne Shell: trap now supports a new option -p that allows to restore the whole trap state using the following commands: old_traps=$(trap -p) trap "some commands" INT QUIT ... eval "$old_traps" This is possible because "trap -p" outputs the state for all signals and not only for those signals that are not in the default state. The new trap interfase was agreed on in the 2019-04-11 POSIX teleconference. Bourne Shell: The exception for "while true; do date; done | uniq -c" in job control handling that has been introduced in November 2015 has been refined to prevent it from causing "(bosh)" to stop from SIGTTIN. Thanks to Robert Elz <kre@munnari.OZ.AU> for reporting. - Bourne Shell: A new #define JOB_DEBUG has been added. - Bourne Shell: The command: (trap '' SEGV; $SHELL -c 'kill -s SEGV $$; echo survived') caused the shell not to print "survived" because a previous exception for SIGSEGV from the 1977 Bourne Shell version had not been removed for the POSIX variant of the shell. The problem occured because it was possible to unignore an ignored (at startup) SIGSEGV. Thanks to Robert Elz <kre@munnari.OZ.AU> for reporting. - Bourne Shell: The code now uses SIG2STR_MAX for the size of the sig2str() output buffer. - Bourne Shell: the behavior related to SIGINT on the command line in the case that the history editor is enabled has been changed to match the behavior of ksh. The Bourne Shell now calls trap commands for SIGINT when ^C is typed on the command line. Note that the classical Bourne Shell behavior (which is still active in case the history editor has been disabled via "set +o ved") is that the trap command is called after ^C is followed by a CR if both are typed on a PS1 prompt. Note: The behavior for "trap" in this area is currently not specified in POSIX. - Bourne Shell: After jobcontrol has been introduced into the Bourne Shell: When in jobcontrol mode, the shell could no longer get signals at the same time as foreground jobs because when using jobcontrol, the shell is in a different process group than the foreground job. The Bourne Shell now derives the information about a delivered signal from the waitid() return data and thus is now able to work the same way as it has been designed in 1977. This is the same way as ksh works. If a foreground program catches such signals, the shell is still not able to detect the signal, but it is now closer to the original behavior from 1977. - Bourne Shell: new version date 2019-04-17 Release 2019-05-28: - Bourne Shell: Similar to what ksh88 does, scripts are now checked before they are run. If there is a nul byte before a newline in the first 256 bytes, a file is rejected as alien binary instead of trying to interpret it as a script. Release 2019-06-13: - Bourne Shell: A new option "set -o globskipdot" has been added. If set, the entries "." and ".." are skipped and not shown in globbing results. If not set, the entries "." and ".." are always returned, even when they are not part of the readdir(3) results. - Bourne Shell: The option "set -o globskipdot" has been made the new dfault behavior for "bosh", but not for "pbosh" Note that this new shell option has been introduced as a result of a related BUG discussion in the Austin Group telephone conference. The background is to permit shell scripts to check whether a shell grants to hide the "." and ".." for all filesystems. Release 2019-07-15: - Bourne Shell: If OPTIND is set to a new value, the getopt() internal variable "_sp" is now reset to 1. This is needed in order to make sure that a combined option string can be parsed correctly. - Bourne Shell/libshedit/bsh: The TAB expander now again gives .. as a. result if the pattern is .. This is needed in order to let ..TAB result in ../ on the command line editor. Release 2019-09-22: - Bourne Shell: The new function isbinary() that has been introduced in May and that should prevent the shell from interpreting binary files as shell scripts had a problem: In case that a disconnected TCP/IP based remote login caused a SIGTERM followed by the read() function on stdin returning EIO, the shell could go into a complex endless loop as the failing read() with "trapnote" set caused a longjmp() before the next prompt without first clearing "trapnote". As a result, the shell did hang endlessly around while just consuming CPU time. The shell now avoids to call the read() routine inside isbinary() when "trapnote" is set and this way is able to avoid the longjmp() on error. - Bourne Shell: Fixed some typos in comment Thanks to Robert Clausecker for reporting - Bourne Shell: print.c: Changed err++ for a BOOL typed variable into err = TRUE. Thanks to Robert Clausecker for reporting - Bourne Shell, with obosh compilation type: Avoid an "unused" warning with word.c - Bourne Shell: defs.h now includes an "extern int optopt;" in order to support Ultrix where this delcaration is missing in unistd.h. Thanks to Robert Clausecker for reporting - bsh/Bourne Shell: test.c Now using a #if defined(S_IFPORT) && S_IFPORT != S_IFIFO to work around a strange definition on Ultrix Thanks to Robert Clausecker for reporting - Bourne Shell: New version date |
||
wiz
|
1b6c59faa4 |
bosh: update to 20190311.
Update provided by Michael Bäuerle via pkgsrc-wip. Changelog ========= Release 2019-02-18: - libgetopt: The undocumented variable "_sp" from SVr4 has been renamed to "opt_sp" and (on platforms that support "#pragma weak") there is a weak reference _sp to that new variable, giving backwards compatibility. The reason for doing this is to make sure that people on Illumos or Oracle Solaris, who still have an outdated version of getopt() in their local libc, do not try to link the Bourne Shell only against their old getopt(). If they did this, they would not get the documented enhanced getopt() features from the Bourne Shell. - Bourne Shell: The shell now uses "opt_sp" as the name for the undocumented additional getopt() interface from AT&T. This has been done to avoid being able to link the Bourne Shell on Illumos or Oracle Solaris without using our libgetopt. If this was done, we could not support UNIX/MULTICS style long options and we could not support -help/--help, since the latter is implemented via long options that are not an alias to short options. - Bourne Shell: added a new timestamp to the Bourne Shell version. Release 2018-11-21: - Bourne Shell: make it exit the whole shell with set -e after a command substitution failed on the right side of a variable assignment that has no command. This is required by POSIX. - Bourne Shell: added a unit tests for the above case. - Bourne Shell: New version date set to 2018-12-08 the this change. Release 2019-01-22: - bsh / Bourne Shell / star: the function hop_dirs() no longer checks for p2 != NULL before calling *p2 = '/' as p2 has been granted to be != NULL from a break with strchr(p, '/') == NULL Thanks to Pavel Raiskup for poiting to a related Coverity message. - Bourne Shell: Added a missing /* FALLTHROUGH */ comment.. Thanks to Pavel Raiskup for poiting to a related Coverity message. - Bourne Shell: added a range check for $OPTIND to tge getopts(1) implementation Thanks to Pavel Raiskup for poiting to a related Coverity message. - Bourne Shell: Removed a nonsense variable in expand() that caused Coverity not to understand that a directory was correctly closed() Thanks to Pavel Raiskup for poiting to a related Coverity message. - Bourne Shell: Added a paranoia comparison to make Coverity quiet. Thanks to Pavel Raiskup for poiting to a related Coverity message. - Bourne Shell: avoid to call catpath() with a NULL pointer for path Thanks to Pavel Raiskup for poiting to a related Coverity message. - Bourne Shell: check the write() return code in io.c Thanks to Pavel Raiskup for poiting to a related Coverity message. - Bourne Shell: Added a paranopia check for "test -o" to make Coperity quiet. Thanks to Pavel Raiskup for poiting to a related Coverity message. - Bourne Shell: Added (void) before fcntl() in hope to make Coverity quiet. Thanks to Pavel Raiskup for poiting to a related Coverity message. - Bourne Shell: Removed dead code from readwc() Thanks to Pavel Raiskup for poiting to a related Coverity message. - Bourne Shell: Cstyle changes to xec.c - Bourne Shell: "builtin -d ..." did access free()d memory. Thanks to Pavel Raiskup for poiting to a related Coverity message. - Bourne Shell: expand.c: added a check for fd == -1 to avoid calling openat() with that fd. Thanks to Pavel Raiskup for poiting to a related Coverity message. -Bourne Shell: func.c: added a check for fd == -1 to avoid calling read()/close() with that fd. Thanks to Pavel Raiskup for poiting to a related Coverity message. - Bourne Shell: jobs.c: enlarged a buffer to be of same size as numbuf[] to avoid a potential buffer overflow. Thanks to Pavel Raiskup for poiting to a related Coverity message. - Bourne Shell: print.c::prt_cntl() had a very old (AT&T) bug with printing byte sequences that get an error with mbtowc() and it did not print byte sequences correctly that refer to legal but "nonprintable" multi byte characters. Thanks to Pavel Raiskup for poiting to a related Coverity message. - Bourne Shell: xec.c: the reserved word "time" could cause to access uninitialized memory if the string in $TIMEFORMAT contains the format %J Thanks to Pavel Raiskup for poiting to a related Coverity message. - Bourne Shell: xec.c: added a paranoia check on whether findnam("funcname") returns NULL even though the existence of a function with that name already has been verified via the hash service. Thanks to Pavel Raiskup for poiting to a related Coverity message. Release 2019-02-18: - Bourne Shell: Another vfork() problem has been fixed. "trap cmd EXIT" has incorrectly called "cmd" after a non-existing command was. called by the shell. This was a result of the shared data from vfork(). Thanks to Martijn Dekker for reporting. - Bourne Shell: A unit test case for the above bug has been added. - Bourne Shell: __growstak() now always uses realloc() on modern platforms. This may speed up things up to 15%. Thanks to Jan Engelhardt for reporting. Release 2019-03-11: - libgetopt/Bourne Shell: added an #ifndef __CYGWIN__ in order to avoid overwriting non-standard definitions by standard definitions on Cygwin for the global getopt() variables. Thanks to Heiko Ei[eszett]feldt for proposing this fix. - Bourne Shell: better comment in bltin.c |
||
wiz
|
e19b1b3819 |
shells/bosh: import bosh-20181030
Packaged for wip by Michael Bäuerle. The Schily Bourne Shell The Schily Bourne Shell was derived from the Bourne Shell sources from OpenSolaris. The Schily Bourne Shell is actively maintained and enhanced on a regular base. It can be compiled into three variants: - The non-POSIX SVr4/OpenSolaris variant (obosh) - The minimal POSIX compliant variant (pbosh) - The POSIX compliant extended variant (bosh) This package contains the third variant. |