<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/shell, branch embed</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=embed</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=embed'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2018-10-22T08:43:57+00:00</updated>
<entry>
<title>Only disable tracing embedded scripts if they can't be listed</title>
<updated>2018-10-22T08:43:57+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2018-10-22T08:43:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=fa2f19771ab92dc2c56358b1b58d1218ca8a16ac'/>
<id>urn:sha1:fa2f19771ab92dc2c56358b1b58d1218ca8a16ac</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Allow shell scripts to be embedded in the binary</title>
<updated>2018-10-22T08:20:19+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2018-10-22T08:12:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=3994d5a52b8fa70637bffe4173f165267e6169fb'/>
<id>urn:sha1:3994d5a52b8fa70637bffe4173f165267e6169fb</id>
<content type='text'>
To assist in the deployment of shell scripts it may be convenient
to embed them in the BusyBox binary.

This patch adds two configuration options to the shell:

- 'Embed scripts in the binary' takes any files in the directory
  'embed', concatenates them with null separators, compresses them
  and embeds them in the binary.

- 'Allow the contents of embedded scripts to be listed' makes the
  shell argument '-L name' list the contents of the named script.

Both options are off by default.

When scripts are embedded in the binary:

- The shell argument '-L' lists the names of the scripts.

- Scripts can be run as 'sh name arg...'.

- An alias is added for each script, equivalent to "alias name='sh name'".
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2018-09-10T13:59:33+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2018-09-10T13:37:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=d89ced75b204f0eb5611f522864beb81d1b393f5'/>
<id>urn:sha1:d89ced75b204f0eb5611f522864beb81d1b393f5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>hush: tweak comment, no code changes</title>
<updated>2018-08-14T09:04:58+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-08-14T09:04:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=c97df2939ec82bdc36586897e02416f935e89519'/>
<id>urn:sha1:c97df2939ec82bdc36586897e02416f935e89519</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: add a comment on how globbing (should) work</title>
<updated>2018-08-11T16:44:11+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-08-11T16:44:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=4bf08542480fe6271692cc9359f9747e9d727a79'/>
<id>urn:sha1:4bf08542480fe6271692cc9359f9747e9d727a79</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: expand: Do not quote backslashes in unquoted parameter expansion</title>
<updated>2018-08-07T16:58:02+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-08-07T16:54:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=eb54ca8be0b45a101f9bdcf6efa26645c6b94a08'/>
<id>urn:sha1:eb54ca8be0b45a101f9bdcf6efa26645c6b94a08</id>
<content type='text'>
Upstream commit:

    Date: Wed, 28 Mar 2018 18:37:51 +0800
    expand: Do not quote backslashes in unquoted parameter expansion

    Here is a better example:

        a="/*/\nullx" b="/*/\null"; printf "%s\n" $a $b

    dash currently prints

        /*/\nullx
        /*/\null

    bash prints

        /*/\nullx
        /dev/null

    You may argue the bash behaviour is inconsistent but it actually
    makes sense.  What happens is that quote removal only applies to
    the original token as seen by the shell.  It is never applied to
    the result of parameter expansion.

    Now you may ask why on earth does the second line say "/dev/null"
    instead of "/dev/\null".  Well that's because it is not the quote
    removal step that removed the backslash, but the pathname expansion.

    The fact that the /de\v does not become /dev even though it exists
    is just the result of the optimisation to avoid unnecessarily
        calling stat(2).  I have checked POSIX and I don't see anything
    that forbids this behaviour.

    So going back to dash yes I think we should adopt the bash behaviour
    for pathname expansion and keep the existing case semantics.

    This patch does exactly that.  Note that this patch does not work
    unless you have already applied

        https://patchwork.kernel.org/patch/10306507/

    because otherwise the optimisation mentioned above does not get
    detected correctly and we will end up doing quote removal twice.

    This patch also updates expmeta to handle naked backslashes at
    the end of the pattern which is now possible.

    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

function                                             old     new   delta
expmeta                                              618     653     +35
memtodest                                            146     147      +1

Tested to work with both ASH_INTERNAL_GLOB on and off.

hush does not handle this correctly.

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: adopt ash's quote_in_varexp1.tests</title>
<updated>2018-08-05T18:03:04+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-08-05T18:03:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=77c18491b8647832422be3f95187e5aa5270e044'/>
<id>urn:sha1:77c18491b8647832422be3f95187e5aa5270e044</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: exec: Return 126 on most errors in shellexec</title>
<updated>2018-08-05T16:11:15+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-08-05T16:04:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=2596f412cd02d4b040262e5f40de2e7a7e6b32cf'/>
<id>urn:sha1:2596f412cd02d4b040262e5f40de2e7a7e6b32cf</id>
<content type='text'>
Upstream commit:

    Date: Sat, 19 May 2018 02:39:37 +0800
    exec: Return 126 on most errors in shellexec

    Currently when shellexec fails on most errors the shell will exit
    with exit status 2.  This patch changes it to 126 in order to avoid
    ambiguities with the exit status from a successful exec.

    The errors that result in 127 has also been expanded to include
    ENOTDIR, ENAMETOOLONG and ELOOP.

    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

function                                             old     new   delta
shellexec                                            245     254      +9

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: eval: Restore input files in evalcommand</title>
<updated>2018-08-05T16:11:15+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-08-05T15:07:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=1c5eb88cd84c90e4c3d014f4abc8f8310c008842'/>
<id>urn:sha1:1c5eb88cd84c90e4c3d014f4abc8f8310c008842</id>
<content type='text'>
Upstream commit:

    Date: Tue, 27 Mar 2018 00:39:35 +0800
    eval: Restore input files in evalcommand

    When evalcommand invokes a command that modifies parsefile and
    then bails out without popping the file, we need to ensure the
    input file is restored so that the shell can continue to execute.

    Reported-by: Martijn Dekker &lt;martijn@inlv.org&gt;
    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

function                                             old     new   delta
unwindfiles                                            -      20     +20
evalcommand                                         1635    1653     +18
getoptscmd                                           584     595     +11
popallfiles                                           20      10     -10
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/1 up/down: 49/-10)             Total: 39 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: parser: Fix parsing of ${}</title>
<updated>2018-08-05T16:11:15+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-08-05T13:58:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=58eb805c2c453c6764acbd65f5604465438d9272'/>
<id>urn:sha1:58eb805c2c453c6764acbd65f5604465438d9272</id>
<content type='text'>
Upstream commit:

    Date: Tue, 3 Apr 2018 00:40:25 +0800
    parser: Fix parsing of ${}

    dash -c 'echo ${}' should print "Bad subtitution" but instead
    fails with "Syntax error: Missing '}'".  This is caused by us
    reading an extra character beyond the right brace.  This patch
    fixes it so that this construct only fails during expansion rather
    than during parsing.

    Fixes: 3df3edd13389 ("[PARSER] Report substition errors at...")
    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

function                                             old     new   delta
readtoken1                                          2907    2916      +9

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
</feed>
