OSDN Git Service
Josh Gao [Thu, 29 Mar 2018 20:19:27 +0000 (20:19 +0000)]
Merge "mkshrc: set +o nohup."
Josh Gao [Thu, 22 Mar 2018 01:03:34 +0000 (18:03 -0700)]
mkshrc: set +o nohup.
Turn off nohup in mkshrc so that backgrounded jobs receive SIGHUP when
the parent shell exits.
Bug: http://b/
76116378
Test: manual
Change-Id: I347d25013df107e6bd2e985a0a14e022c9fdf2ab
Elliott Hughes [Thu, 8 Feb 2018 16:53:19 +0000 (16:53 +0000)]
Merge "Upgrade to mksh R56c."
Elliott Hughes [Mon, 5 Feb 2018 23:55:19 +0000 (15:55 -0800)]
Upgrade to mksh R56c.
R56c is a bugfix-only release everyone must upgrade to:
[komh] Remove redundant OS/2-specific code, clean up others
[komh, tg] Fix drive-qualified (absolute and relative) DOS-style path support in realpath functionality, partially other places
[tg] Don’t substitute ${ENV:-~/.mkshrc} result again
[tg] Improve OS/2 $PATH (et al.) handling, drive-relative paths
[tg] Add MKSH_ENVDIR compile-time option for Jehanne and Plan 9
[tg] Limit nesting when parsing malformed code (Debian #878947)
[tg] Update wcwidth data with bugfixed script (still Unicode 10; resulting values are identical to glibc git master for extant chars)
[Dr. Werner Fink] Raise some time limits in the testsuite
[Shamar] Add support for the Jehanne operating system
[komh] Set stdin to text mode before executing child processes on OS/2
[komh] Pass arguments via a resonse file if executing a child fails
[Dr. Werner Fink] Early locale tracking as a compile-time option
[tg] Fix regressions introduced with new fast character classes
Bug: N/A
Test: builds and boots
Change-Id: I44da7a8bb9859a0357bcd59891dd4f2cfc199733
Elliott Hughes [Tue, 12 Dec 2017 00:29:50 +0000 (00:29 +0000)]
Merge "adbd handles $TMPDIR now."
Elliott Hughes [Mon, 11 Dec 2017 18:40:13 +0000 (10:40 -0800)]
adbd handles $TMPDIR now.
Bug: http://b/
19635681
Test: printenv
Change-Id: I5a957a5e68739bdbc2415962c0b9cd93e154090e
Xin Li [Mon, 13 Nov 2017 22:35:27 +0000 (14:35 -0800)]
Merge commit '
5a8bf259a2eb7fab63a1106d05e6dc8363f6e6b3' into HEAD
Change-Id: I3f790483eaeff503b29812988dbedecb869183dd
Sandeep Patil [Sat, 11 Nov 2017 00:42:59 +0000 (00:42 +0000)]
Merge "Move sh_vendor cflags to its own target"
am:
f74f8d48e2
Change-Id: Idbfe973bc99c3afaabf9e36d5be2607c352d2287
Treehugger Robot [Sat, 11 Nov 2017 00:38:33 +0000 (00:38 +0000)]
Merge "Move sh_vendor cflags to its own target"
Sandeep Patil [Fri, 10 Nov 2017 02:01:21 +0000 (18:01 -0800)]
Move sh_vendor cflags to its own target
The cc_defaults.vendor doesn't work due to VNDK being disabled.
(b/
69133815). So, the conversion to soon caused the sh_vendor to start
using $PATH from the environment (instead of the hardcoded one) that in
turn caused vendor shell scripts trying to run system toybox commands.
Bug:
68771183
Test: m -j sh_vendor; adb sync; adb shell; /vendor/bin/sh; echo $PATH
Test: Boot marlin with no denials from init_radio, init_power domains.
Change-Id: Ia90b74a4cffdeba9b53f3b8fb8a56c98386794fa
Signed-off-by: Sandeep Patil <sspatil@google.com>
Jiyong Park [Sun, 22 Oct 2017 12:40:11 +0000 (12:40 +0000)]
Merge "Undef before redefining macros"
am:
028c26c2d0
Change-Id: Ibfe534eca2845106f419150bcb1a027a82e77453
Treehugger Robot [Sun, 22 Oct 2017 12:36:44 +0000 (12:36 +0000)]
Merge "Undef before redefining macros"
Jiyong Park [Sun, 22 Oct 2017 08:17:47 +0000 (17:17 +0900)]
Undef before redefining macros
-Werror,-Wmacro-redefined was turned on because of -Werror, -Wall.
Undefine the overridden macros before redefining them to let compiler
know that the redifinition is intentional.
Test: m -j sh_vendor
Change-Id: If324124e4504f05a37afd1021cff179fdfe4c08e
Jiyong Park [Sun, 22 Oct 2017 07:41:31 +0000 (07:41 +0000)]
Merge "switch to soong"
am:
7569b29092
Change-Id: I17a2932994dbcd82f1826f4b2a0040f38a641714
Treehugger Robot [Sun, 22 Oct 2017 07:38:51 +0000 (07:38 +0000)]
Merge "switch to soong"
Jiyong Park [Tue, 26 Sep 2017 00:07:54 +0000 (09:07 +0900)]
switch to soong
sh is converted to Android.bp
Bug:
66914194
Test: build. sh is found in both /system/bin and /vendor/bin
Change-Id: Iee59e7f2a60c3855c76935e64b8100b7f8eb4802
Chih-hung Hsieh [Thu, 12 Oct 2017 20:52:35 +0000 (20:52 +0000)]
Merge "Use -Werror in external/mksh" am:
9da7e0f318 am:
b6be55d35e
am:
95c8f2abd7
Change-Id: Ie5178680bfee7a48257f365416f802e2b1566e32
Chih-hung Hsieh [Thu, 12 Oct 2017 20:49:36 +0000 (20:49 +0000)]
Merge "Use -Werror in external/mksh" am:
9da7e0f318
am:
b6be55d35e
Change-Id: I3bacddf544832686351f101b51042a0545a73404
Chih-hung Hsieh [Thu, 12 Oct 2017 20:44:33 +0000 (20:44 +0000)]
Merge "Use -Werror in external/mksh"
am:
9da7e0f318
Change-Id: Ia0889c3287082aaf9199f3548c1f7b64336cc99e
Chih-hung Hsieh [Thu, 12 Oct 2017 20:33:07 +0000 (20:33 +0000)]
Merge "Use -Werror in external/mksh"
Chih-Hung Hsieh [Wed, 11 Oct 2017 20:08:29 +0000 (13:08 -0700)]
Use -Werror in external/mksh
* Suppress existing warnings.
Bug:
66996870
Test: build with WITH_TIDY=1
Change-Id: I8e8e88745daaf2fbaef2a8ba373d6de1039fe030
Elliott Hughes [Tue, 3 Oct 2017 22:45:48 +0000 (22:45 +0000)]
Merge "Stop setting $HOSTNAME in mkshrc." am:
5677920e65 am:
12d6e8bb3f
am:
4ee8234275
Change-Id: I4f8ac7303b8cec103ad7ada5258eac3f076eb40f
Elliott Hughes [Tue, 3 Oct 2017 22:38:23 +0000 (22:38 +0000)]
Merge "Stop setting $HOSTNAME in mkshrc." am:
5677920e65
am:
12d6e8bb3f
Change-Id: Iaf04be2499bf69f3367c653d4fed23ebd9f2cfd2
Elliott Hughes [Tue, 3 Oct 2017 22:29:17 +0000 (22:29 +0000)]
Merge "Stop setting $HOSTNAME in mkshrc."
am:
5677920e65
Change-Id: I694b38a3872a1e17fb2135a6a4635bb93fd801df
Elliott Hughes [Tue, 3 Oct 2017 21:57:49 +0000 (21:57 +0000)]
Merge "Stop setting $HOSTNAME in mkshrc."
Elliott Hughes [Tue, 3 Oct 2017 15:42:27 +0000 (08:42 -0700)]
Stop setting $HOSTNAME in mkshrc.
bash sets this itself. mksh doesn't, but we can set it in adbd instead.
Bug: N/A
Test: `adb shell printenv` and `adb shell`, `printenv`
Change-Id: I3967681c9c6f7bf9b1365f8361e4960e40e4f916
Elliott Hughes [Mon, 25 Sep 2017 19:48:03 +0000 (19:48 +0000)]
Merge "Upgrade to mksh R56b." am:
a1899ee519 am:
e1c2b662fd
am:
02bf36c734
Change-Id: I91b4d178871971b891709861ea9be2d6a5f941e0
Elliott Hughes [Mon, 25 Sep 2017 19:45:03 +0000 (19:45 +0000)]
Merge "Upgrade to mksh R56b." am:
a1899ee519
am:
e1c2b662fd
Change-Id: I3d34550ff13238b36c16c050405522c9f3742d6d
Elliott Hughes [Mon, 25 Sep 2017 19:42:34 +0000 (19:42 +0000)]
Merge "Upgrade to mksh R56b."
am:
a1899ee519
Change-Id: Iec6d19cc20406d06df71398b6f6479513dfe3f4b
Elliott Hughes [Mon, 25 Sep 2017 19:37:27 +0000 (19:37 +0000)]
Merge "Upgrade to mksh R56b."
Elliott Hughes [Fri, 22 Sep 2017 23:04:20 +0000 (16:04 -0700)]
Upgrade to mksh R56b.
R56b is a bugfix-only release everyone should upgrade to:
[tg] Reference the FAQ webpage
[panpo, Riviera] Fix documentation bug wrt. Esc+Ctrl-L
[tg, Larry Hynes] Fix “0” movement in vi mode
[tg] Replace broken libcs’ offsetof macro with MirBSD’s
R56 is a bugfix release with some experimental fixes:
[tg, Seb] Do not apply alias name restrictions to hash/tilde tracking
[tg] Restore ‘.’, ‘:’ and ‘[’ in alias names (“[[” is still forbidden)
[tg] Fix accidentally defanged $PATHSEP test
[tg] On ^C (INTR and QUIT edchars), shove edit line into history
[iSKUNK, tg] Begin porting to z/OS using EBCDIC encoding, incomplete
[tg] Redo fast character classes code, adding POSIX and other helpers
[tg] bind parses backslash-escaped ‘^’ (and ‘\’) as escaped
[tg] Building with -DMKSH_ASSUME_UTF8=0 no longer causes a known failure in the testsuite
[tg] New test.sh option -U to pass a UTF-8 locale to use in the tests
[tg] re_format(7) BSD: [[ $x = *[[:\<:]]foo[[:\>:]]* ]]
[tg, iSKUNK] Use Config in check.pl only if it exists
[tg] New matching code for bracket expressions, full POSIX (8bit)
[komh] Exclude FAT/HPFS/NTFS-unsafe tests on OS/2 (and Cygwin/MSYS)
[tg] Update to Unicode 10.0.0
[tg, selk] Make readonly idempotent
[tg, multiplexd] When truncating the persistent history, do not change the underlying file, do all operations on the locked one; do not stop using the history at all if it has been truncated
[tg, Jörg] Turn off UTF-8 mode upon turning on POSIX mode
[Martijn Dekker, Geoff Clare, many on the Austin list, tg] In POSIX mode, make the exec builtin force a $PATH search plus execve
[tg] Fix GCC 7, Coverity Scan warnings
[tg, Michal Hlavinka] Track background process PIDs even interactive
[tg] Always expose mksh’s hexdump shell function; speed it up by working on the input in chunks; use character classes to make it EBCDIC safe
[tg] Revamp dot.mkshrc default editor selection mechanism
Bug: N/A
Test: builds and boots
Change-Id: I35d624c4352c1b7c1ee499f9680712a30c64323b
padarshr [Tue, 27 Jun 2017 19:26:00 +0000 (19:26 +0000)]
Merge "Build vendor shell unconditionally." am:
bba8f4a328 am:
8547d5a6a9 am:
83c29a0b24
am:
0a685140c5
Change-Id: I0960b248ffc238f017a7fce637866b0f08805dfb
padarshr [Tue, 27 Jun 2017 19:03:15 +0000 (19:03 +0000)]
Merge "Build vendor shell unconditionally." am:
bba8f4a328 am:
8547d5a6a9
am:
83c29a0b24
Change-Id: Ia67e60e4389d9a21efb9c4a0d508ad71751a021e
padarshr [Tue, 27 Jun 2017 19:00:16 +0000 (19:00 +0000)]
Merge "Build vendor shell unconditionally." am:
bba8f4a328
am:
8547d5a6a9
Change-Id: I338f80a7e8bb5132988c9030ad70a4cb4c05ee75
padarshr [Tue, 27 Jun 2017 18:57:15 +0000 (18:57 +0000)]
Merge "Build vendor shell unconditionally."
am:
bba8f4a328
Change-Id: Icf13f5feb51106fd9b373517ae082018dfe7bab9
Treehugger Robot [Tue, 27 Jun 2017 18:47:30 +0000 (18:47 +0000)]
Merge "Build vendor shell unconditionally."
padarshr [Fri, 23 Jun 2017 17:48:38 +0000 (23:18 +0530)]
Build vendor shell unconditionally.
Always build vendor shell irrespective of whether
PRODUCT_FULL_TREBLE is enabled or not, as even on Non-Full
treble builds this can be useful to start vendor scripts.
Change-Id: I93e514760cfcfd4f7f4ce401eae50d839638c51c
Yifan Hong [Thu, 22 Jun 2017 22:56:58 +0000 (22:56 +0000)]
sh_vendor link to libc as a shared library. am:
d79560268f -s ours
am:
a0f2ab0af0 -s ours
Change-Id: I7873684ea7e736a3cf53afdac1bedb4107917be5
Yifan Hong [Thu, 22 Jun 2017 22:44:26 +0000 (22:44 +0000)]
sh_vendor link to libc as a shared library.
am:
d79560268f -s ours
Change-Id: Ifdcb08d50c43d406291a007ab687ec9207dc579f
Yifan Hong [Thu, 22 Jun 2017 19:29:42 +0000 (19:29 +0000)]
Merge "sh_vendor link to libc as a shared library." am:
02aa26d9ab am:
17d120feef am:
140506d9d2
am:
cc5acf1455
Change-Id: I762a63f820b4d2a566b64921ce6029e3a6ee39f5
Yifan Hong [Thu, 22 Jun 2017 19:26:12 +0000 (19:26 +0000)]
Merge "sh_vendor link to libc as a shared library." am:
02aa26d9ab am:
17d120feef
am:
140506d9d2
Change-Id: I7ea4311f215fe3837119e7c06e5fc6e6c1659266
Yifan Hong [Thu, 22 Jun 2017 19:22:47 +0000 (19:22 +0000)]
Merge "sh_vendor link to libc as a shared library." am:
02aa26d9ab
am:
17d120feef
Change-Id: I690fa32795488aa9678dcce1bc4fb0df6f92ff08
Yifan Hong [Thu, 22 Jun 2017 19:18:11 +0000 (19:18 +0000)]
Merge "sh_vendor link to libc as a shared library."
am:
02aa26d9ab
Change-Id: If97c273883223e2a516bd788df2d58f25681666c
Treehugger Robot [Thu, 22 Jun 2017 19:14:22 +0000 (19:14 +0000)]
Merge "sh_vendor link to libc as a shared library."
Yifan Hong [Thu, 22 Jun 2017 00:05:15 +0000 (17:05 -0700)]
sh_vendor link to libc as a shared library.
Test: BOARD_VNDK_VERSION m -j -k
Test: m -j -k and boots
Bug:
33241851
Change-Id: Ica98c551892ff83b7e9e661d2ddfa4bac7d2c6f4
Merged-In: Ica98c551892ff83b7e9e661d2ddfa4bac7d2c6f4
Yifan Hong [Thu, 22 Jun 2017 00:05:15 +0000 (17:05 -0700)]
sh_vendor link to libc as a shared library.
Test: BOARD_VNDK_VERSION m -j -k
Test: m -j -k and boots
Bug:
33241851
Change-Id: Ica98c551892ff83b7e9e661d2ddfa4bac7d2c6f4
Merged-In: Ica98c551892ff83b7e9e661d2ddfa4bac7d2c6f4
Sandeep Patil [Wed, 21 Jun 2017 23:10:42 +0000 (23:10 +0000)]
Merge "install copy of shell in vendor partition" am:
ee224ea092 am:
5a6144a098 -s ours am:
632282bc91 -s ours
am:
1942fd0335 -s ours
Change-Id: I90596692e63df5f814d3da3f1ed38af4764bc85f
Sandeep Patil [Wed, 21 Jun 2017 23:07:41 +0000 (23:07 +0000)]
Merge "install copy of shell in vendor partition" am:
ee224ea092 am:
5a6144a098 -s ours
am:
632282bc91 -s ours
Change-Id: Id61c8fccafce31b17a9c90d506db05bb64b9c7c2
Sandeep Patil [Wed, 21 Jun 2017 23:04:59 +0000 (23:04 +0000)]
Merge "install copy of shell in vendor partition" am:
ee224ea092
am:
5a6144a098 -s ours
Change-Id: I05b9d8ad63a5b69fec0c7a4dc768d1fcade3a8a6
Sandeep Patil [Wed, 21 Jun 2017 23:01:42 +0000 (23:01 +0000)]
Merge "install copy of shell in vendor partition"
am:
ee224ea092
Change-Id: Id919730d78760daefef01bba45b64556658cf8a5
Sandeep Patil [Wed, 21 Jun 2017 22:58:32 +0000 (22:58 +0000)]
Merge "install copy of shell in vendor partition"
Sandeep Patil [Thu, 13 Apr 2017 01:02:50 +0000 (18:02 -0700)]
install copy of shell in vendor partition
This is to be used by vendor processes. Particularly, vendor shell
scripts that get launched as init services. The shell is restricted from
running as interactive mode in SEPolicy. Unless it is launched from rooted
system shell. The change also adds the ability to override the default
$PATH regardless of the environment.
Bug:
36463595
Test: Boot sailfish with new shell and ensure all init services exit
with status 0
Merged-In: I1eaf2c8a8f6905caf00d53e067add67eaea00e09
Change-Id: I1eaf2c8a8f6905caf00d53e067add67eaea00e09
Signed-off-by: Sandeep Patil <sspatil@google.com>
(cherry picked from commit
c2036115102d80c026b70846812a42204522f9ac)
Sandeep Patil [Fri, 14 Apr 2017 21:03:40 +0000 (21:03 +0000)]
install copy of shell in vendor partition am:
c203611510
am:
5bfe1ea22e
Change-Id: I7040d3e62b6709013fdb3798ebff318c4693d40c
Sandeep Patil [Fri, 14 Apr 2017 21:01:07 +0000 (21:01 +0000)]
install copy of shell in vendor partition
am:
c203611510
Change-Id: I6a1da672c65522768647550df8768f9cd3285b23
Elliott Hughes [Fri, 14 Apr 2017 06:59:17 +0000 (06:59 +0000)]
Merge "Upgrade to mksh R55." am:
693c2ea1e4 am:
e0d2df7f07 am:
0d2db5fba1
am:
651a7bb8b8
Change-Id: I1137b9d86533f909f850ba2ec4b6b0a98a4c29a0
Elliott Hughes [Fri, 14 Apr 2017 06:07:26 +0000 (06:07 +0000)]
Merge "Upgrade to mksh R55." am:
693c2ea1e4 am:
e0d2df7f07
am:
0d2db5fba1
Change-Id: I14e66c15ea92f0ae7b282245bb07f911dfccf935
Elliott Hughes [Fri, 14 Apr 2017 06:00:07 +0000 (06:00 +0000)]
Merge "Upgrade to mksh R55." am:
693c2ea1e4
am:
e0d2df7f07
Change-Id: I2e1ef7d4911a211b3dc58e3cab8e6c6e0ad2778a
Elliott Hughes [Fri, 14 Apr 2017 05:53:42 +0000 (05:53 +0000)]
Merge "Upgrade to mksh R55."
am:
693c2ea1e4
Change-Id: If722a24bb137ba653d1374814397c705f3b10af2
Elliott Hughes [Fri, 14 Apr 2017 05:43:06 +0000 (05:43 +0000)]
Merge "Upgrade to mksh R55."
Sandeep Patil [Thu, 13 Apr 2017 01:02:50 +0000 (18:02 -0700)]
install copy of shell in vendor partition
This is to be used by vendor processes. Particularly, vendor shell
scripts that get launched as init services. The shell is restricted from
running as interactive mode in SEPolicy. Unless it is launched from rooted
system shell. The change also adds the ability to override the default
$PATH regardless of the environment.
Bug:
36463595
Test: Boot sailfish with new shell and ensure all init services exit
with status 0
Change-Id: I1eaf2c8a8f6905caf00d53e067add67eaea00e09
Signed-off-by: Sandeep Patil <sspatil@google.com>
Elliott Hughes [Wed, 12 Apr 2017 23:52:30 +0000 (16:52 -0700)]
Upgrade to mksh R55.
R55 is mostly a feature release with summary bugfixes:
[komh] Fix OS/2 search_access() and UNC path logic
[tg] Undocument printf(1) to avoid user confusion
[Jean Delvare, tg] Fix printf builtin -R option
[tg] Make ${var@x}, unknown x, fail (thanks izabera)
[tg] ${var=x} must evaluate x in scalar context (10x Martijn Dekker)
[tg] Fixup relation between lksh and mksh, reduce delta
[tg] Improve manpage display; add OS/2 $PATH FAQ
[Jean Delvare] Fix bugs in manpage
[tg] Review tilde expansion, removing “odd use of KEEPASN” and introduce POSIX “declaration utility” concept; wait isn’t one
[tg] Add \builtin utility, declaration utility forwarder
[tg] Make $'\xz' expand to xz, not \0
[tg] Use fixed string pooling (requires the above change in host mksh)
[tg] POSIX declaration commands can have varassign and redirections
[Martijn Dekker] Add typeset -g, replacing homegrown “global”
[Harvey-OS] Disable NOPROSPECTOFWORK, APEX is reportedly fixed now
[tg] Display ulimit -a output with flags; improve Haiku
[tg] Drop old let] hack, use \builtin internally
[tg] Fix padding in Lb64encode in dot.mkshrc
[tg] Move FAQ content to a separate, new FAQ section in the manpage
[tg] Add new standard variable PATHSEP (‘:’, ‘;’ on OS/2)
[Martijn Dekker] Fix LINENO in eval and alias
[komh] Fix “\builtin” on OS/2
[tg] Improve (internal) character classes code for speed
[tg] Fix: the underscore is no drive letter
[tg] No longer hard-disable persistent history support in lksh
[tg] Introduce build flag -T for enabling “textmode” on OS/2 (supporting CR+LF line endings, but incompatible with mksh proper)
[tg] Merge mksh-os2
[tg] Permit changing $OS2_SHELL during a running shell
[tg] Fix multibyte handling in ^R (Emacs search-history)
[tg] Allow “typeset -p arrname[2]” to work
[tg] Make some error messages more consistent
[tg, komh] Disable UTF-8 detection code for OS/2 as unrealistic
[tg, sdaoden] Limit alias name chars to POSIX plus non-leading ‘-’
[tg, Martijn Dekker] Expand aliases at COMSUB parse time
[tg] Make “typeset -f” output alias-resistent
[tg, Martijn Dekker] Permit “eval break” and “eval continue”
[tg] Make -masm=intel safe on i386
[tg] Disambiguate $((…)) vs. $((…)…) in “typeset -f” output
[Jean Delvare] Clarify the effect of exit and return in a subshell
[tg] Simplify compile-time asserts and make them actually compile-time
[tg] Fix ^O in Emacs mode if the line was modified (LP#
1675842)
[tg] Address Coverity Scan… stuff… now that it builds again
[Martijn Dekker, tg] Add test -v
[tg] Document set -o posix/sh completely
Bug: N/A
Test: manual
Change-Id: Ifce1d879933a5773e98b4f34f4a9bb86a6bdff3b
Elliott Hughes [Thu, 22 Dec 2016 01:49:59 +0000 (01:49 +0000)]
Merge "Restore the "print" builtin." am:
ad7a062c12 am:
be32749ec0 am:
57198a7ef7
am:
2ad3638506
Change-Id: I56028e1c1930f472e39a6d2b6097d8bff89df144
Elliott Hughes [Thu, 22 Dec 2016 01:44:58 +0000 (01:44 +0000)]
Merge "Restore the "print" builtin." am:
ad7a062c12 am:
be32749ec0
am:
57198a7ef7
Change-Id: Ia1ce7e6b20ffe477b92220e515d6922c8cd7eb9e
Elliott Hughes [Thu, 22 Dec 2016 01:39:28 +0000 (01:39 +0000)]
Merge "Restore the "print" builtin." am:
ad7a062c12
am:
be32749ec0
Change-Id: I2632c14de0896ff3d43b8af4b8fa6c5d978d8215
Elliott Hughes [Thu, 22 Dec 2016 01:33:27 +0000 (01:33 +0000)]
Merge "Restore the "print" builtin."
am:
ad7a062c12
Change-Id: Ie3efc027233d111d15546e70da7d94c9798b752d
Treehugger Robot [Thu, 22 Dec 2016 01:25:53 +0000 (01:25 +0000)]
Merge "Restore the "print" builtin."
Elliott Hughes [Wed, 21 Dec 2016 18:59:39 +0000 (10:59 -0800)]
Restore the "print" builtin.
otapreopt_script is currently using this. We should probably move it onto
the more portable echo or printf, but for now I'm assuming there's a reason
why print is being used --- the use of -u implies isn't not just a typo for
printf.
(Even if we can switch to echo or printf, I'm tempted to just leave print be
anyway, since unlike the other disabled mksh builtins, it's not shadowing a
better implementation, so it's not causing confusion about why the "same"
command in different contexts behaves differently. The worst it will do is
cause portability problems if we move away from mksh, and in the meantime
print is documented on the mksh man page for users sophisticated enough to
know that we're using mksh, so it's arguably more surprising for it to be
missing.)
Bug: http://b/
33761687
Test: manual
Change-Id: I440d759a3c4ef6fa24fd496ea832093e18b7060e
Elliott Hughes [Fri, 9 Dec 2016 02:25:18 +0000 (02:25 +0000)]
Merge "Upgrade to mksh R40." am:
ceb0b57de2 am:
caf111e450 am:
7fba070015
am:
6e9f7fbc73
Change-Id: Ic9e97307012402b0c0f4b5565d1849400dbccc56
Elliott Hughes [Fri, 9 Dec 2016 02:20:36 +0000 (02:20 +0000)]
Merge "Upgrade to mksh R40." am:
ceb0b57de2 am:
caf111e450
am:
7fba070015
Change-Id: I880307b7a52a252c9d7f56b8a6be684da6f6b471
Elliott Hughes [Fri, 9 Dec 2016 02:15:36 +0000 (02:15 +0000)]
Merge "Upgrade to mksh R40." am:
ceb0b57de2
am:
caf111e450
Change-Id: I1c004b01a61d85022defd2c461a12c5db8778307
Elliott Hughes [Fri, 9 Dec 2016 02:10:35 +0000 (02:10 +0000)]
Merge "Upgrade to mksh R40."
am:
ceb0b57de2
Change-Id: Ib164451b87d9653f15c276c8ecd441a05ff6253e
Treehugger Robot [Fri, 9 Dec 2016 02:06:25 +0000 (02:06 +0000)]
Merge "Upgrade to mksh R40."
Elliott Hughes [Thu, 8 Dec 2016 23:56:04 +0000 (15:56 -0800)]
Upgrade to mksh R40.
From the release notes...
R54 is a bugfix release with moderate new features:
[tg] Simplify and improve code and manual page
[tg] Try GCC 5’s new -malign-data=abi
[tg] Allow interrupting builtin cat even on fast devices (LP#
1616692)
[tg] Update to Unicode 9.0.0
[Andreas Buschka] Correct English spelling
[tg] Handle set -e-related error propagation in || and && constructs correctly
[tg] Initialise memory for RNG even when not targeting Valgrind
[tg] Shrink binary size
[Brian Callahan] Improve support for the contemporary pcc compiler
[tg] Fix side effects with lazy evaluation; spotted by ormaaj
[tg] New flags -c (columnise), -l, -N for the print builtin
[Larry Hynes] Fix English, spelling mistakes, typos in the manpage
[tg, ormaah] Return 128+SIGALRM if read -t times out, like GNU bash
[Martijn Dekker] Install both manpages from Build.sh
[Martijn Dekker] Document case changes are ASCII-only
[Ronald G. Minnich, Elbing Miss, Álvaro Jurado, tg] Begin porting to Harvey-OS and APEX (similar to Plan 9 and APE)
[KO Myung-Hun] More infrastructure for the OS/2 (EMX, KLIBC) port
I've continued to disable the cat, realpath, and sleep builtins,
and added print to the list (now I've realized it's unrelated to
the print on the desktop).
Bug: N/A
Test: manual
Change-Id: Iead4c1b572c6f288b2ab2b884125dcb606f1e356
Elliott Hughes [Sat, 27 Aug 2016 03:20:39 +0000 (03:20 +0000)]
Merge "Restore some of the mksh builtins." am:
cd79a34d28 am:
b48d5773d8 am:
10787a6eee
am:
ff0f07eb15
Change-Id: Ie3e81fdba2724ab3a1551819c2a34f1414267b87
Elliott Hughes [Sat, 27 Aug 2016 02:50:44 +0000 (02:50 +0000)]
Merge "Restore some of the mksh builtins." am:
cd79a34d28 am:
b48d5773d8
am:
10787a6eee
Change-Id: I49b1c553ffc8749c9c3e15e73cf036b08a3d18dd
Elliott Hughes [Sat, 27 Aug 2016 02:47:14 +0000 (02:47 +0000)]
Merge "Restore some of the mksh builtins." am:
cd79a34d28
am:
b48d5773d8
Change-Id: I8c6a2f2b317fda8699b33990eb33af61d8e48211
Elliott Hughes [Sat, 27 Aug 2016 02:44:16 +0000 (02:44 +0000)]
Merge "Restore some of the mksh builtins."
am:
cd79a34d28
Change-Id: I4916f190dc300a629f7266d0409d34a8bbfd3bf4
Treehugger Robot [Sat, 27 Aug 2016 02:36:56 +0000 (02:36 +0000)]
Merge "Restore some of the mksh builtins."
Elliott Hughes [Sat, 27 Aug 2016 01:10:18 +0000 (18:10 -0700)]
Restore some of the mksh builtins.
This makes us match bash in terms of what is/isn't a builtin.
Bug: http://b/
20720875
Change-Id: Id90aeb115cf5e5217084bc1c5f382e14033b7d49
Elliott Hughes [Thu, 25 Aug 2016 20:16:55 +0000 (20:16 +0000)]
Merge "Disable various mksh builtins." am:
bf92a24781 am:
28c041f5a3 am:
b894dff617
am:
93d7921fa0
Change-Id: I6a1e5bb6c469d96a31a42f16969e264ecf4a012c
Elliott Hughes [Thu, 25 Aug 2016 19:56:30 +0000 (19:56 +0000)]
Merge "Disable various mksh builtins." am:
bf92a24781 am:
28c041f5a3
am:
b894dff617
Change-Id: Ia9862beb35b52782b4e77d48bac80d038e500ad7
Elliott Hughes [Thu, 25 Aug 2016 19:53:29 +0000 (19:53 +0000)]
Merge "Disable various mksh builtins." am:
bf92a24781
am:
28c041f5a3
Change-Id: I4ba944ff459b419d316f0a97f901fa1290428036
Elliott Hughes [Thu, 25 Aug 2016 19:50:31 +0000 (19:50 +0000)]
Merge "Disable various mksh builtins."
am:
bf92a24781
Change-Id: I8de5f26b5b9c7fe338c9402bc5b39eb00bee90a7
Treehugger Robot [Thu, 25 Aug 2016 19:41:32 +0000 (19:41 +0000)]
Merge "Disable various mksh builtins."
Elliott Hughes [Thu, 25 Aug 2016 00:18:10 +0000 (17:18 -0700)]
Disable various mksh builtins.
They're buggy and/or lacking in functionality. Disable them and use toybox
instead.
Bug: http://b/
27064311
Bug: http://b/
20720875
Change-Id: Ie57efffd7b98f172eafe9d4bd5ddf723811b6f29
Elliott Hughes [Sat, 13 Aug 2016 18:37:04 +0000 (18:37 +0000)]
Merge "Upgrade to mksh R53a." am:
c19d20531c am:
8b302a0123 am:
c8ed698e56
am:
0ff4e75810
Change-Id: I6dfd2d1ae1cde2c5d9d556ba9d18904bf9794dc0
Elliott Hughes [Sat, 13 Aug 2016 18:32:27 +0000 (18:32 +0000)]
Merge "Upgrade to mksh R53a." am:
c19d20531c am:
8b302a0123
am:
c8ed698e56
Change-Id: Iabb58f30fb722bf021f8f164780a8422403299de
Elliott Hughes [Sat, 13 Aug 2016 18:28:26 +0000 (18:28 +0000)]
Merge "Upgrade to mksh R53a." am:
c19d20531c
am:
8b302a0123
Change-Id: I7316be74d3aeb694790612601aef692d3663545e
Elliott Hughes [Sat, 13 Aug 2016 18:25:00 +0000 (18:25 +0000)]
Merge "Upgrade to mksh R53a."
am:
c19d20531c
Change-Id: I999ef9dd8ef426549886c70ea8757ff3b89c28c5
Elliott Hughes [Sat, 13 Aug 2016 18:19:55 +0000 (18:19 +0000)]
Merge "Upgrade to mksh R53a."
Elliott Hughes [Fri, 12 Aug 2016 22:06:53 +0000 (15:06 -0700)]
Upgrade to mksh R53a.
Note that we skipped R52c because it wouldn't build with clang (thanks to
the "Shave 200 bytes off .text by revisiting string pooling" change).
From the release notes:
R53a is a snapshot/feature release:
[lintian] Fix spelling
[tg] Unbreak multi-line command history broken by history flush
[tg] Fix redefining POSIX functions that were Korn functions before
[tg, TNF] Fix bounds checks in Vi editing mode
[tg] Handle combining characters at end of string or output correctly
[tg] Fix ${!#} ${!?} ${!-} (POSIX, prompted by izabera)
[tg] Fix shf.c-internal buffer overread on printing digits
[J�rg] Fix a typo in the testsuite
[arekm] Increase default edit line size (unless MKSH_SMALL)
[tg] Improve description of Emacs mode keybindings, especially ^U
[tg, arekm, jilles] Abort read builtin in case of read(2) errors
[tg, izabera, carstenh] Fix most of the ambiguous corner cases related to ${[pfx]var[op[word]]} (${@:-1} still unsupported)
[carstenh] Contribute some more testsuite coverage
[tg] WDS_TPUTS now emits QCHAR newline reentrant-safe
[tg] Fix var=<< implementation (LP#
1380389)
[tg, FreeBSD] Make XSI test(1) extensions behave as if they were POSIX
[tg, izabera] Add $(<<<x) and $(<<EOF…) implementation
[tg] Lower minimum screen size accepted as “sane” from the OS to 4×2
[tg, Torsten Sillke] Simplify tilde-expanded parameters
[tg, Torsten Sillke] Fix default PS1 for substring matches
[tg] Apply defer-builtin-with-arguments logic to realpath builtin
[tg] Rework string pooling (own vs. compiler’s) (LP#
1580348)
[tg] Feature: print -A, prints arguments as characters
[tg, izabera] Replace <<< and >>> as ROL and ROR operators with their new ^< and ^> spelling as per this proposal
[tg, slagtc] Clear-to-EOL under tmux to work around its anti-feature
[tg, p120ph37] Remove support for using file descriptors with more than a single digit, in preparation for named file descriptors
[tg] Correct, but simplify (at the potential cost of more tty I/O than strictly necessary, though never redundant and (probably) not more than before when it was miscalculated), line clearing and redrawing
[slagtc, tg] Implement new evaluate-region editing command Esc+Ctrl-E
[tg] Prefer external rename utility over the recovery builtin
[tg] Remove redundant full-line redraws
[tg, Natureshadow] Fix errorlevel of ‘.’ (“dot” special builtin) when the sourced script does not run any commands, for POSIX compliance
[tg] Refactor op tokens and edchars to shave off some more bytes
[tg] Fix some bugs in the manpage and some occasional/minor code bugs
[tg, Brian Callahan] Mark tests requiring new perl as !need-pass
[tg, slagtc] Add $KSH_MATCH and, to make it usable, ${foo@/bar/baz}
[tg, Score_Under] Fix bogus patch from OpenBSD: only NULL the global source in unwind when actually reclaiming its Area
[izabera] Mention in the manpage that integer bases go up to 36
[Natureshadow] Fix /= operator broken during refactoring
R52c is a bugfix-only release:
[tg] Shave 200 bytes off .text by revisiting string pooling
[tg, J�rg] Fix manpage for ditroff on Schillix
[tg, wbx] Use sed 1q instead of unportable head(1)
[tg] Implement underrun debugging tool for area-based memory allocator
[tg] Fix history underrun when first interactive command is entered
[tg, bef0rd] Do not misinterpret “${0/}” as “${0//”, fixes segfault
[tg, Stéphane Chazelas] Fix display problems with special parameters
[tg, Stéphane Chazelas] Catch attempt to trim $* and $@ with ?, fixes segfault (Todd Miller did this in 2004 for ${x[*]} already, so just sync)
[Martijn Dekker] Fix “command -p” with -Vv to behave as POSIX requires
[tg, jilles, Oleg Bulatov] Fix recusive parser with active heredocs
[tg] Flush even syntax-failing or interrupted commands to history
[tg, fmunozs] Fix invalid memory access for “'\0'” in arithmetics
[tg] Explicitly reserve SIGEXIT and SIGERR for ksh
[tg, izabera] Catch missing here documents at EOF even under “set -n”
[kre, tg] Document Austin#1015 handling (not considered a violation)
[tg, fmunozs] Fix buffer overread for empty nameref targets
[tg] Fix warnings pointed out by latest Debian gcc-snapshot
[tg, Martijn Dekker] Document upcoming set +o changes
[Martijn Dekker] Expand testsuite for command/whence
Change-Id: Ife475b25acae5a85277757cfe9f14c6575eac0cd
Elliott Hughes [Wed, 3 Feb 2016 01:14:56 +0000 (01:14 +0000)]
Merge "Upgrade to mksh R52b."
Elliott Hughes [Tue, 2 Feb 2016 23:26:47 +0000 (15:26 -0800)]
Upgrade to mksh R52b.
From the release notes:
R52b is a strongly recommended bugfix-only release:
[tg] Recognise ksh93 compiled scripts and LZIP compressed files as binary (i.e. to not run as mksh plaintext script)
[tg] Document that we will implement locale tracking later
[tg] Add EEXIST to failback strerror(3)
[jilles] Make set -C; :>foo race-free
[tg] Don’t use unset in portable build script
[tg] Plug warning on GNU/kFreeBSD, GNU/Hurd
[tg] Document read -a resets the integer base
[J�rg] Fix manpage: time is not a builtin but a reserved word
[J�rg, tg] Make exit (and return) eat -1
[tg] parse “$( (( … ) … ) … )” correctly (LP#
1532621), Jan Palus
[tg] reduce memory footprint by free(3)ing more aggressively
[tg] fix buffer overrun (LP#
1533394), bugreport by izabera
[tg] correctly handle nested ADELIM parsing (LP#
1453827), Teckids
[tg] permit “read -A/-a arr[idx]” as long as only one element is read; fix corruption of array indicēs with this construct (LP#
1533396), izabera
[tg] Sanitise OS-provided signal number in even more places
[tg] As requested by J�rg, be clear manpage advice is for mksh
[tg] Revert (as it was a regression) POSIX bugfix from R52/2005 related to accent gravis-style command substitution until POSIX decides either way
[tg] Handle export et al. after command (Austin#351)
[tg] Catch EPIPE in built-in cat and return as SIGPIPE (LP#
1532621)
[tg] Fix errno in print/echo builtin; optimise that and unbksl
[tg] Update documentation, point out POSIX violation (Austin#1015)
R52 is a strongly recommended bugfix release:
[_0bitcount] Move moving external link from mksh(1) to the #ksh channel homepage linked therein
[tg] Make setenv “set -u”-safe and fix when invoked with no args
[tg] Make “typeset -f” output reentrant if name is a reserved word
[oksh] Zero-pad seconds in “time” output to align columns
[tg] Check signals and errorlevels from OS to be within bounds
[komh, tg] Quote and document ‘;’ as PATH separator in some places
[oksh, tg] Simplify code to call afree() even if arg is NULL
[tg] Fix tree-printing and reentrancy of multiple here documents
[tg] Work around LP#
1030581 by permitting exactly one space after
[tg, oksh] Code quality work, cleanups
[tg] New code for here documents/strings with several bugfixes
[tg] Stop using issetugid(2) for ±p checks, wrong tool for the job
[tg] Reintroduce some -o posix changes lost in 2005, plus fixes
[tg] Make “source” into a built-in command
[tg] Drop “stop” alias, lksh(1) functionality to auto-unalias
[tg] Fix \u0000 ignored in $'…' and print
[tg] Improve portability of Build.sh
[Jilles Tjoelker] Improve portability of testsuite
[tg] Fix tilde expansion for some substitutions (izabera, Chet, Geoff)
[tg] Improve reparsing of ((…) |…) as ( (…) |…)
[Martijn Dekker] Fix test(1) not returning evaluation errors
[tg] Fix ${*:+x} constructs (carstenh)
[tg] Make (( … )) into a compound command (ormaaj)
[tg] Repair a few parameter substitution expansion mistakes
Change-Id: I3d875b5c648c60cc6203c964f11d8cbd42648d9c
Elliott Hughes [Mon, 16 Nov 2015 23:42:01 +0000 (23:42 +0000)]
Merge "adbd sets $TERM now."
Elliott Hughes [Mon, 16 Nov 2015 19:09:40 +0000 (11:09 -0800)]
adbd sets $TERM now.
Bug: http://b/
25601436
Change-Id: I532233a1cf349ac0117bdfb898ef050c42357178
Elliott Hughes [Mon, 2 Nov 2015 22:45:42 +0000 (22:45 +0000)]
Merge "adbd sets HOME/LOGNAME/SHELL/USER now."
Elliott Hughes [Mon, 2 Nov 2015 21:32:07 +0000 (13:32 -0800)]
adbd sets HOME/LOGNAME/SHELL/USER now.
We also don't need to export variables we inherited --- they're
automatically exported.
Bug: http://b/
19635681
Change-Id: Ie8e8480e7487ddc0fb9e984235b8b5ea0c587686
Elliott Hughes [Fri, 25 Sep 2015 15:15:02 +0000 (15:15 +0000)]
Merge "Remove hd."
Elliott Hughes [Fri, 25 Sep 2015 15:14:36 +0000 (15:14 +0000)]
Merge "Remove setenv."
Elliott Hughes [Fri, 25 Sep 2015 15:14:14 +0000 (15:14 +0000)]
Merge "Remove auto addition of ~/bin subdirectories to the path."