Commit graph

157 commits

Author SHA1 Message Date
Elliott Hughes
0c3dc4139a Merge "Upgrade to mksh R56c." 2018-02-08 16:53:19 +00:00
Elliott Hughes
dd4abe0a6a 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
2018-02-07 12:46:26 -08:00
Elliott Hughes
ab3794bf03 Merge "adbd handles $TMPDIR now." 2017-12-12 00:29:50 +00:00
Elliott Hughes
80e6a7993f adbd handles $TMPDIR now.
Bug: http://b/19635681
Test: printenv
Change-Id: I5a957a5e68739bdbc2415962c0b9cd93e154090e
2017-12-11 10:40:13 -08:00
Xin Li
804f955aa6 Merge commit '5a8bf259a2eb7fab63a1106d05e6dc8363f6e6b3' into HEAD
Change-Id: I3f790483eaeff503b29812988dbedecb869183dd
2017-11-13 14:35:27 -08:00
Sandeep Patil
ecaf5bfb46 Merge "Move sh_vendor cflags to its own target"
am: f74f8d48e2

Change-Id: Idbfe973bc99c3afaabf9e36d5be2607c352d2287
2017-11-11 00:42:59 +00:00
Treehugger Robot
f74f8d48e2 Merge "Move sh_vendor cflags to its own target" 2017-11-11 00:38:33 +00:00
Sandeep Patil
fa7594efa4 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>
2017-11-10 09:44:17 -08:00
Jiyong Park
46fbc9c701 Merge "Undef before redefining macros"
am: 028c26c2d0

Change-Id: Ibfe534eca2845106f419150bcb1a027a82e77453
2017-10-22 12:40:11 +00:00
Treehugger Robot
028c26c2d0 Merge "Undef before redefining macros" 2017-10-22 12:36:44 +00:00
Jiyong Park
ac07b5ab5e 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
2017-10-22 17:25:33 +09:00
Jiyong Park
0aef897d8c Merge "switch to soong"
am: 7569b29092

Change-Id: I17a2932994dbcd82f1826f4b2a0040f38a641714
2017-10-22 07:41:31 +00:00
Treehugger Robot
7569b29092 Merge "switch to soong" 2017-10-22 07:38:51 +00:00
Jiyong Park
6709053dbb 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
2017-10-20 11:04:56 +09:00
Chih-hung Hsieh
5a8bf259a2 Merge "Use -Werror in external/mksh" am: 9da7e0f318 am: b6be55d35e
am: 95c8f2abd7

Change-Id: Ie5178680bfee7a48257f365416f802e2b1566e32
2017-10-12 20:52:35 +00:00
Chih-hung Hsieh
95c8f2abd7 Merge "Use -Werror in external/mksh" am: 9da7e0f318
am: b6be55d35e

Change-Id: I3bacddf544832686351f101b51042a0545a73404
2017-10-12 20:49:36 +00:00
Chih-hung Hsieh
b6be55d35e Merge "Use -Werror in external/mksh"
am: 9da7e0f318

Change-Id: Ia0889c3287082aaf9199f3548c1f7b64336cc99e
2017-10-12 20:44:33 +00:00
Chih-hung Hsieh
9da7e0f318 Merge "Use -Werror in external/mksh" 2017-10-12 20:33:07 +00:00
Chih-Hung Hsieh
f52e721264 Use -Werror in external/mksh
* Suppress existing warnings.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I8e8e88745daaf2fbaef2a8ba373d6de1039fe030
2017-10-11 13:12:45 -07:00
Elliott Hughes
8785c9f7c6 Merge "Stop setting $HOSTNAME in mkshrc." am: 5677920e65 am: 12d6e8bb3f
am: 4ee8234275

Change-Id: I4f8ac7303b8cec103ad7ada5258eac3f076eb40f
2017-10-03 22:45:48 +00:00
Elliott Hughes
4ee8234275 Merge "Stop setting $HOSTNAME in mkshrc." am: 5677920e65
am: 12d6e8bb3f

Change-Id: Iaf04be2499bf69f3367c653d4fed23ebd9f2cfd2
2017-10-03 22:38:23 +00:00
Elliott Hughes
12d6e8bb3f Merge "Stop setting $HOSTNAME in mkshrc."
am: 5677920e65

Change-Id: I694b38a3872a1e17fb2135a6a4635bb93fd801df
2017-10-03 22:29:17 +00:00
Elliott Hughes
5677920e65 Merge "Stop setting $HOSTNAME in mkshrc." 2017-10-03 21:57:49 +00:00
Elliott Hughes
1255a78d21 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
2017-10-03 08:42:27 -07:00
Elliott Hughes
d9bbbf9fc9 Merge "Upgrade to mksh R56b." am: a1899ee519 am: e1c2b662fd
am: 02bf36c734

Change-Id: I91b4d178871971b891709861ea9be2d6a5f941e0
2017-09-25 19:48:03 +00:00
Elliott Hughes
02bf36c734 Merge "Upgrade to mksh R56b." am: a1899ee519
am: e1c2b662fd

Change-Id: I3d34550ff13238b36c16c050405522c9f3742d6d
2017-09-25 19:45:03 +00:00
Elliott Hughes
e1c2b662fd Merge "Upgrade to mksh R56b."
am: a1899ee519

Change-Id: Iec6d19cc20406d06df71398b6f6479513dfe3f4b
2017-09-25 19:42:34 +00:00
Elliott Hughes
a1899ee519 Merge "Upgrade to mksh R56b." 2017-09-25 19:37:27 +00:00
Elliott Hughes
23925bb36e 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
2017-09-22 16:21:10 -07:00
padarshr
75a803934c Merge "Build vendor shell unconditionally." am: bba8f4a328 am: 8547d5a6a9 am: 83c29a0b24
am: 0a685140c5

Change-Id: I0960b248ffc238f017a7fce637866b0f08805dfb
2017-06-27 19:26:00 +00:00
padarshr
0a685140c5 Merge "Build vendor shell unconditionally." am: bba8f4a328 am: 8547d5a6a9
am: 83c29a0b24

Change-Id: Ia67e60e4389d9a21efb9c4a0d508ad71751a021e
2017-06-27 19:03:15 +00:00
padarshr
83c29a0b24 Merge "Build vendor shell unconditionally." am: bba8f4a328
am: 8547d5a6a9

Change-Id: I338f80a7e8bb5132988c9030ad70a4cb4c05ee75
2017-06-27 19:00:16 +00:00
padarshr
8547d5a6a9 Merge "Build vendor shell unconditionally."
am: bba8f4a328

Change-Id: Icf13f5feb51106fd9b373517ae082018dfe7bab9
2017-06-27 18:57:15 +00:00
Treehugger Robot
bba8f4a328 Merge "Build vendor shell unconditionally." 2017-06-27 18:47:31 +00:00
padarshr
8749a1ed1f 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
2017-06-23 23:21:47 +05:30
Yifan Hong
7742e45f68 sh_vendor link to libc as a shared library. am: d79560268f -s ours
am: a0f2ab0af0  -s ours

Change-Id: I7873684ea7e736a3cf53afdac1bedb4107917be5
2017-06-22 22:56:58 +00:00
Yifan Hong
a0f2ab0af0 sh_vendor link to libc as a shared library.
am: d79560268f  -s ours

Change-Id: Ifdcb08d50c43d406291a007ab687ec9207dc579f
2017-06-22 22:44:26 +00:00
Yifan Hong
3447df5387 Merge "sh_vendor link to libc as a shared library." am: 02aa26d9ab am: 17d120feef am: 140506d9d2
am: cc5acf1455

Change-Id: I762a63f820b4d2a566b64921ce6029e3a6ee39f5
2017-06-22 19:29:42 +00:00
Yifan Hong
cc5acf1455 Merge "sh_vendor link to libc as a shared library." am: 02aa26d9ab am: 17d120feef
am: 140506d9d2

Change-Id: I7ea4311f215fe3837119e7c06e5fc6e6c1659266
2017-06-22 19:26:12 +00:00
Yifan Hong
140506d9d2 Merge "sh_vendor link to libc as a shared library." am: 02aa26d9ab
am: 17d120feef

Change-Id: I690fa32795488aa9678dcce1bc4fb0df6f92ff08
2017-06-22 19:22:47 +00:00
Yifan Hong
17d120feef Merge "sh_vendor link to libc as a shared library."
am: 02aa26d9ab

Change-Id: If97c273883223e2a516bd788df2d58f25681666c
2017-06-22 19:18:11 +00:00
Treehugger Robot
02aa26d9ab Merge "sh_vendor link to libc as a shared library." 2017-06-22 19:14:23 +00:00
Yifan Hong
5c1d501b91 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
2017-06-21 17:31:43 -07:00
Yifan Hong
d79560268f 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
2017-06-21 17:31:17 -07:00
Sandeep Patil
5bd990e130 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
2017-06-21 23:10:42 +00:00
Sandeep Patil
1942fd0335 Merge "install copy of shell in vendor partition" am: ee224ea092 am: 5a6144a098 -s ours
am: 632282bc91  -s ours

Change-Id: Id61c8fccafce31b17a9c90d506db05bb64b9c7c2
2017-06-21 23:07:41 +00:00
Sandeep Patil
632282bc91 Merge "install copy of shell in vendor partition" am: ee224ea092
am: 5a6144a098  -s ours

Change-Id: I05b9d8ad63a5b69fec0c7a4dc768d1fcade3a8a6
2017-06-21 23:04:59 +00:00
Sandeep Patil
5a6144a098 Merge "install copy of shell in vendor partition"
am: ee224ea092

Change-Id: Id919730d78760daefef01bba45b64556658cf8a5
2017-06-21 23:01:42 +00:00
Sandeep Patil
ee224ea092 Merge "install copy of shell in vendor partition" 2017-06-21 22:58:33 +00:00
Sandeep Patil
f3308fef45 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 c203611510)
2017-06-21 14:21:30 -07:00