<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/scripts/gen_build_files.sh, branch long_paths</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=long_paths</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=long_paths'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2021-06-05T15:36:19+00:00</updated>
<entry>
<title>gen_build_files: Use C locale when calling sed on globbed files</title>
<updated>2021-06-05T15:36:19+00:00</updated>
<author>
<name>Khem Raj</name>
<email>raj.khem@gmail.com</email>
</author>
<published>2021-05-12T20:01:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=c0f8113f86871f40daee690d7dd944bd5a31d95b'/>
<id>urn:sha1:c0f8113f86871f40daee690d7dd944bd5a31d95b</id>
<content type='text'>
When include/applets.h is re-generated

it generates code macros in include/applets.h e.g.

IF_XZCAT(APPLET_ODDNAME(xzcat, unxz, BB_DIR_USR_BIN, BB_SUID_DROP, xzcat))
...
IF_CHVT(APPLET_NOEXEC(chvt, chvt, BB_DIR_USR_BIN, BB_SUID_DROP, chvt))
...

sed is used to process source files like below to feed into this header
generation

sed -n 's@^//applet:@@p' "$srctree"/*/*.c "$srctree"/*/*/*.c

this means we let shell decide the order of .c files being fed into sed
tool, applets.h has code snippets thats generated out of code fragments
from these .c files and the order of the generated code depends on the
order of .c files being fed to sed and then piped to generate tool, even
though the generated code is logically same, it does result in re-odered
code in applets.h based on which shell was used during build on exact busybox
sources since sort order is different based on chosen locale and also default shell
being bash or dash

This sets the environment variable LC_ALL to the value C, which will
enforce bytewise sorting, irrespective of the shell

Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: allow hush to run embedded scripts</title>
<updated>2018-11-27T15:13:07+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2018-11-27T14:34:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=71df2d3589e3e682cd6770f41f0b184841b78702'/>
<id>urn:sha1:71df2d3589e3e682cd6770f41f0b184841b78702</id>
<content type='text'>
Embedded scripts require a shell to be present in the BusyBox
binary.  Allow either ash or hush to be used for this purpose.
If both are enabled ash takes precedence.

The size of the binary is unchanged in the default configuration:
both ash and hush are present but support for embedded scripts
isn't compiled into hush.

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>Tweaks to build process for embedded scripts</title>
<updated>2018-11-27T09:38:10+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2018-11-21T10:11:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=7b42f8fc76d78fe9c6b0cbe15e1425f2fd9fb5e8'/>
<id>urn:sha1:7b42f8fc76d78fe9c6b0cbe15e1425f2fd9fb5e8</id>
<content type='text'>
- Force a rebuild if a script in applets_sh is changed.

- Move the dummy usage messages for custom applets to usage.h and
  change the name from 'dummy' to 'scripted'.

- Hide an error from gen_build_files.sh if an embed directory exists
  but is empty.

- Tidy up embedded_scripts script.

v2: Remove a couple of unnecessary tests in embedded_scripts, as
    pointed out by Xabier Oneca.
    Drop the stripping of comments.

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>Treat custom and applet scripts as applets</title>
<updated>2018-11-17T20:16:33+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2018-11-17T17:48:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=3778898f97a64e7b42b53194af7f3b93cc9c07a3'/>
<id>urn:sha1:3778898f97a64e7b42b53194af7f3b93cc9c07a3</id>
<content type='text'>
BusyBox has support for embedded shell scripts.  Two types can be
distinguished:  custom scripts and scripts implementing applets.

Custom scripts should be placed in the 'embed' directory at build
time.  They are given a default applet configuration and appear
as applets to the user but no further configuration is possible.

Applet scripts are integrated with the BusyBox build system and
are intended to be used to ship standard applets that just happen
to be implemented as scripts.  They can be configured at build time
and appear just like native applets.

Such scripts should be placed in the 'applets_sh' directory.  A stub
C program should be written to provide the usual applet configuration
details and placed in a suitable subsystem directory.  It may be
helpful to have a configuration option to enable any dependencies the
script requires:  see the 'nologin' applet for an example.

function                                             old     new   delta
scripted_main                                          -      41     +41
applet_names                                        2773    2781      +8
applet_main                                         1600    1604      +4
i2cdetect_main                                       672     674      +2
applet_suid                                          100     101      +1
applet_install_loc                                   200     201      +1
applet_flags                                         100     101      +1
packed_usage                                       33180   33179      -1
tryexec                                              159     152      -7
evalcommand                                         1661    1653      -8
script_names                                           9       -      -9
packed_scripts                                       123     114      -9
complete_cmd_dir_file                                826     811     -15
shellexec                                            271     254     -17
find_command                                        1007     990     -17
busybox_main                                         642     624     -18
run_applet_and_exit                                  100      78     -22
find_script_by_name                                   51       -     -51
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 6/9 up/down: 58/-174)          Total: -116 bytes
   text	   data	    bss	    dec	    hex	filename
 950034	    477	   7296	 957807	  e9d6f	busybox_old
 949918	    477	   7296	 957691	  e9cfb	busybox_unstripped

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>remove "local" bashism from a few scripts</title>
<updated>2017-01-24T19:52:42+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2017-01-24T19:52:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=bca4ea8b68403e6f751341b82c65937f14590679'/>
<id>urn:sha1:bca4ea8b68403e6f751341b82c65937f14590679</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>build system: for "find", use POSIX not operator (!) instead of -not</title>
<updated>2014-03-16T11:05:58+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2014-03-16T11:05:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=29f352604868c5d17c81948ea30e332491cecada'/>
<id>urn:sha1:29f352604868c5d17c81948ea30e332491cecada</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>build system: fix non-portable sed constructs.</title>
<updated>2014-01-10T10:54:37+00:00</updated>
<author>
<name>Matthias Andree</name>
<email>matthias.andree@gmx.de</email>
</author>
<published>2014-01-10T10:54:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=9b76f895bcd50c97df66c7e0192e045245eb519f'/>
<id>urn:sha1:9b76f895bcd50c97df66c7e0192e045245eb519f</id>
<content type='text'>
This includes proper line breaks for labels and closing braces,
and removing non-portable \n and \t in s/// functions.

Signed-off-by: Matthias Andree &lt;matthias.andree@gmx.de&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>gen_build_files.sh: exclude hidden directories</title>
<updated>2012-01-30T01:34:56+00:00</updated>
<author>
<name>Paulius Zaleckas</name>
<email>paulius.zaleckas@gmail.com</email>
</author>
<published>2012-01-30T01:34:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=1c7724bf2acb6ebe28b24bd6da3b740e716b46cf'/>
<id>urn:sha1:1c7724bf2acb6ebe28b24bd6da3b740e716b46cf</id>
<content type='text'>
I am using quilt to manage patches internally. Quilt creates dir .pc
and stores unmodified files there. Since I made change in one of
Config.src quilt made a copy in .pc/xxx.patch/xxx/Config.src. When
I run make it calls gen_build_files.sh and it generates
.pc/xxx.patch/xxx/Config.in. Now when I want to pop patch quilt
thinks I have made changes to original xxx/Config.in.

IMO the best solution is just to ignore hidden directories in
gen_build_files.sh. This also results in shorter build time in case
busybox is under git/svn versioning, since it avoids searching
many directories for Config.src.

Signed-off-by: Paulius Zaleckas &lt;paulius.zaleckas@gmail.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>gen_build_files.sh: simplify "print everything up to INSERT line" part</title>
<updated>2011-10-19T19:17:20+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2011-10-19T19:17:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=4ea37d62c2b90e360a97c43ffdb10afabaac46d9'/>
<id>urn:sha1:4ea37d62c2b90e360a97c43ffdb10afabaac46d9</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>gen_build_files: don't pass 200k+ strings as params. Closes 4321</title>
<updated>2011-10-19T15:54:42+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2011-10-19T15:54:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=efd08bfa0adab3ae299be7abdd45161a15804a3b'/>
<id>urn:sha1:efd08bfa0adab3ae299be7abdd45161a15804a3b</id>
<content type='text'>
Also removes one grep per generated file.

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