summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox
AgeCommit message (Collapse)Author
2019-07-18busybox: enable unicode supportMikko Rapeli
While creating and deleting files with unicode or other encodings works, it's annoying when ls and other core utils show questionmarks instead of the unicode characters. In 2019, it's quite common that users of embedded devices based on yocto need unicode support. Debugging a box with unicode encoded file names is a bit annoying when core utils from busybox don't support them. The unicode config fragment has the same config as Debian in their deb and udeb builds of version 1:1.30.1-4. If developers do not want this or other default yocto features in busybox, or optimize the configuration for size, then they likely run a completely custom configuration. Thus I think it's safe to enable unicode support by default. Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-03busybox: 1.30.1 -> 1.31.0Andrej Valek
- update to last stable version 1.31.0 - remove and refresh already merged patches Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27busybox: Fix typo in syslog initscriptRichard Purdie
The change to ensure the existing processes shut down had a clear copy and paste error. This really fixes syslog to avoid errors on restart. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27busybox: Improve syslog restart handlingRichard Purdie
We're seeing races on the autobuilder where syslogd fails to shut down fast enough to be restarted leading to failures. Add some checks to ensure when restarting that processes exit before being restarted. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27busybox: make postinst run firstly before update-alternativesRobert Yang
The update-alternatives.bbclass' postinst script runs firstly before other postinst, but busybox needs set basic tools such as sed command firstly, otherwise, update-alternatives doesn't work, so run busybox' postinst firstly to fix the problem. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-30busybox-inittab/sysvinit-inittab: add rconflictsChangqing Li
when both installed, do_rootfs report error like: file /etc/inittab conflicts between attempted installs of busybox-inittab-1.30.1-r0.qemux86 and sysvinit-inittab-2.88dsf-r10.qemux86 so add each other to rconflicts Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-23busybox: fix ptest failure about 'dc'Chen Qi
Fix the following two failure of busybox ptest: FAIL: dc read FAIL: dc read string These two test cases relies on the functionalities enabled by CONFIG_FEATURE_DC_BIG. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-11busybox: Use PTEST binary directoryMariano Lopez
This will generate the symlinks in the ptest binary directory using the ptest class functionality instead of generating them manually. Because the ptest class uses update-alternatives to get the metadata for the symlinks it will respect the use of BUSYBOX_SPLIT_SUID automatically. [YOCTO #12597] Signed-off-by: Mariano Lopez <just.another.mariano@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-09busybox: Enable domain search list supportAlexey Brodkin
This option is enabled by default in Busybox and becomes useful in networks with internal resources becasue allows to use much shorter names. E.g. instead of "server.internal.company.com" it's possible to use just "server" if DHCP server is configured with: ---------------------------->8----------------------- option domain-search "internal.company.com"; ---------------------------->8----------------------- Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-02busybox: fix CONFIG_RFKILL enable logicMatt Porter
Currently CONFIG_RFKILL is enabled only if both bluetooth *and* wifi distro features are present. It should be enabled when either feature is present. Fix this by switching to use of bb.utils.contains_any(). Signed-off-by: Matt Porter <mporter@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-25busybox: enable CONFIG_FLOAT_DURATIONAdrian Bunk
The 1.29.3 -> 1.30.1 upgrade lost support for sleep with float values (e.g. "sleep 0.1") since this replacement for CONFIG_FEATURE_FLOAT_SLEEP (enabled in thud) was missing. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-18busybox: 1.29.3 -> 1.30.1Andrej Valek
- update to last stable version 1.30.1 - remove and refresh already merged patches - re-generate defconfig Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-06busybox: update to 1.29.3Dustin Bain
Updates busybox to version 1.29.3 to fix a bug related to parsing of config files: 2993551ef ("Revert "libbb: remove unnecessary variable in xmalloc_fgets"") Upgrading the recipe was chosen instead of backporting the fix as a patch because the only difference between version 1.29.2 and 1.29.3 is this revert. Signed-off-by: Dustin Bain <dustin.bain@garmin.com> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-11busybox: Enable mountpoint and setsid appletsKhem Raj
This is needed by some init system services and if init system is not sysvinit then we dont have it, therefore its useful to have it provided via busybox as a backup Enable CONFIG_SETSID to get setsid, needed by runit Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-11-23busybox: add zip to RDEPENDS of ptest packageChen Qi
busybox's unzip test case requires zip command. However, busybox itself does not provide one. So add zip as a runtime dependency. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23busybox: ship a symlink farm for ptestRoss Burton
Ship a symlink farm for busybox, which correctly considers SUID split. This ensures that all utilities used in busybox's test cases will first use that ones that are provided by busybox. Modify run-ptest to prepend the directory to PATH, and also change variable name from current_dir to current_path, as the former is a little misleading. `readlink -f $0' gets a path to the current script instead of the current directory. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23busybox: check CONFIG_DESKTOP before using 'od -t' in test caseChen Qi
The '-t' option support for 'od' is enabled by CONFIG_DESKTOP. So check it before using it in test cases. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23busybox: fix du-l-works test caseChen Qi
64 + 64 + 16 = 144K 144 + sizeof_a_directory >= 145 So fix to use 145 instead of 144. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23busybox: use example.org instead of google.com in wget test caseChen Qi
Use example.org to ensure it's always reachible. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23busybox: check uudecode before using it in test caseChen Qi
Check uudecode before using it in test case to avoid unexpected failure. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23busybox: enable bzip2 by defaultChen Qi
bunzip2 is enabled by default, but bzip2 is not. This is kind of strange, and it also causes busybox's ptest failure regarding bunzip2, as bunzip2's test case needs bzip2 command. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23recipes: Remove tab indentations in python codeRobert Yang
Use 4 spaces to replace a tab. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16busybox: skip known bugs in ptestChen Qi
Set SKIP_KNOWN_BUGS in run-ptest script to skip ptest cases which are known to relate to some known bugs. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16busybox: Provide /bin/ash when usrmerge is enabledWes Lindauer
When usrmerge is enabled, scripts that were explicitly using #!/bin/ash will cause a QA Error like the following: QA Issue: bar.sh contained in package foo requires /bin/ash, but no providers found in RDEPENDS_foo? [file-rdeps]. It seems perfectly acceptable for scripts to use /bin/ash so provide it along with /bin/sh. Signed-off-by: Wes Lindauer <wesley.lindauer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-13busybox: make busybox.links.{suid, nosuid} reproducibleMartin Hundebøll
The busybox.link.* files are generated from autoconf.h and applets.h, which are both auto-generated by the build system. The contents of the two files might be in different order, and so the link files are not reproducble as is. Fix this by sorting the lists using `sort`. Signed-off-by: Martin Hundebøll <martin@geanix.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-12busybox: move reboot out of init.cfgAnuj Mittal
reboot is needed for initramfs where no init manager is set. This partially reverts: commit b6fbb3f3d4d6367b0fd7921078f67057551c7ede Author: Chen Qi <Qi.Chen@windriver.com> Date: Mon Jul 30 17:41:57 2018 +0800 busybox: move init related configs to init.cfg Move init related configs to init.cfg. These config items do not make much sense unless busybox is selected as the init manager. They should belong to init.cfg. We would need to set up ALTERNATIVES for reboot in this case. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-10busybox: unify recipe styleAndrej Valek
- change spaces to tabs and unify indent level Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-10busybox: do not write grep outputs into logAndrej Valek
Make grep quiet for prevent to write information into logs. Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-10busybox: fix conflict with runlevel appletAndrej Valek
- remove OE runlevel script which conflicts with busybox's applet - don't install empty directories Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-07busybox/packagegroups: Break out the busybox-syslog dependencyRichard Purdie
The busybox-syslog rrecomends is proving tricky as it gets pulled in early and there are conflicts between its use of update-alternatives and busybox needing to provide those things. We already have recipes using BAD_RRECOMMENDS to remove this dependency, it probably makes sense to spell it out explicitly and allow it to be overridden more easily. This patch does this, dropping the now unneeded BAD_RRECOMMENDS. It preserves the dependency as a recommendation for now, further cleanup may allow simplication of that. This unbreaks certain build failures on the autobuilder, more as a workaround but is a change we probably want to make anyway. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-07busybox: Ensure busybox-syslog depends on busyboxRichard Purdie
If we don't do this, busybox-syslog can install before busybox which clearly doesn't make sense and can trigger postinst failures (missing sed which u-a depends upon). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-05busybox: Put klogd/syslogd alternative links in syslog packageRichard Purdie
Currently these are in ${PN} and ${PN}-syslog may get replaced by other packages but update-alternatives would error in the postinst if other files were installed first. Avoid the problems by putting the links in the correct package. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-05busybox: Sync arch and link locations with coreutilsRichard Purdie
coreutils installs these into bindir, folllow its lead to avoid postinst failures when installing coreutils and busybox together. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-05busybox: update to 1.29.2Andrej Valek
- refresh busybox-udhcpc-no_deconfig.patch - remove obsolete patches which are included in this update - update defconfig - Add newly required virtual/crypt depends [RB] Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-28busybox/mdev-mount.sh: Fix partition detect and cleanup mountpoint on failMike Looijmans
This fixes issues mainly seen when mounting eMMC devices: The wildcard /sys/block/${DEVBASE}/${DEVBASE}*1 matches both "mmcblk0p1" and "mmcblk0boot1" for example, and this results in syntax errors. Fix this by searching for a "partition" file instead, which only exists for real partitions and not 'fakes' like the eMMC extra's. When mount fails, the mountpoint file is left behind, causing later attempts at auto-mounting it to fail. If mount fails, remove the mountpoint, leaving the system in the state as it was before the mount attempt. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14busybox: move init related configs to init.cfgChen Qi
Move init related configs to init.cfg. These config items do not make much sense unless busybox is selected as the init manager. They should belong to init.cfg. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-07busybox: handle syslogYadi.hu
If CONFIG_KLOGD is not enabled, then the related service file should not be installed, The error message is below: Cannot add dependency job for unit busybox-klogd.service, ignoring: Unit busybox-klogd.service failed to load: No such file or directory. So we should first check the configuration before we install these service files. Signed-off-by: Yadi.hu <yadi.hu@windriver.com> Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-04busybox: Add patch to ignore -c on umount commandFabio Berton
Fix error when umounting filesystem on shutdown with a systemd distro. See more datails here: [https://github.com/systemd/systemd/issues/7786] (From OE-Core rev: ae23367c85d1a6c84c25736ac3c9a059acbc8dbe) Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-04busybox: Fix lzma segfaultsAndrej Valek
- fix multiple lzma segmentation faults - patch includes multiple fixing commits - test-cases have been removed due to binary data Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-12classes/recipes: Use expanded BUILD_REPRODUCIBLE_BINARIES valueJuro Bystricky
Replace the occurences of BUILD_REPRODUCIBLE_BINARIES with expanded values ${BUILD_REPRODUCIBLE_BINARIES} so the variable does not need to be exported. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04busybox: separate inittab into own package, due to SERIAL_CONSOLES being ↵Denys Dmytriyenko
machine-specific * Create busybox-inittab recipe to produce machine-specific package with /etc/inittab and necessary getty calls for a machine, based on SERIAL_CONSOLES, similar to how sysvinit-inittab was done * Since CONFIG_FEATURE_USE_INITTAB is controlled by VIRTUAL-RUNTIME_init_manager, make main busybox package RDEPENDS on busybox-inittab when init_manager is set to busybox Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04busybox: fix CVE-2017-15873Andrej Valek
Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com> Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-29busybox.inc: Add sanity check to test if the suid binary provides shNathan Rossi
Add a sanity check during the do_compile task to fail if the suid busybox provides /bin/sh. This is considered as a hard fail since not only is providing sh as suid problematic for security reasons but also because the sh configured for suid is less functional than the nosuid configured sh and breaks a number of required features (e.g. 64-bit test). Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-19busybox: drop obsolete CONFIG_FEATURE_SYSTEMD reference from musl.cfgAndre McCurdy
From 1.25.0 onwards, busybox dropped systemd compatibility from its version of syslogd: https://git.busybox.net/busybox/commit/?id=accd9eeb719916da974584b33b1aeced5f3bb346 Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-10busybox: CVE-2017-16544Zhixiong Chi
In the add_match function in libbb/lineedit.c in BusyBox through 1.27.2, the tab autocomplete feature of the shell, used to get a list of filenames in a directory, does not sanitize filenames and results in executing any escape sequence in the terminal. This could potentially result in code execution, arbitrary file writes, or other attacks. Backport the patch from: https://git.busybox.net/busybox/commit/?id=c3797d40a1c57352192c6106cc0f435e7d9c11e8 https://nvd.nist.gov/vuln/detail/CVE-2017-16544 Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-09busybox.inc: Fix bashism in compile, which fixes sh being suidNathan Rossi
Fix the bashism in the suid check. This ensures that the check works correctly on hosts that default sh to e.g. dash. If this check fails the suid shell workaround does not remove sh from the suid binary and results in the target system containing a busybox.suid with sh as well as /bin/sh -> /bin/busybox.suid. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Cc: Andrej Valek <andrej.valek@siemens.com> Cc: Radovan Scasny <radovan.scasny@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05busybox: Fix CVE-2011-5325Andrej Valek
Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com> Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-05busybox: 1.24.1 -> 1.27.2Andrej Valek
- fixed link creation to shell - reported bug with suid shells [https://bugs.busybox.net/show_bug.cgi?id=10346] - removed and modified already merged patches - updated defconfig regarding to new version Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-25busybox: fix syslog related meta dataChen Qi
Set RCONFLICTS to disallow multiple syslog daemon providers to be installed on the target at the same time, and remove codes which dealt with such situation. Supporting multiple syslog daemons on the same image doesn't have much sense. rsyslog and syslog-ng in meta-oe have set RCONFLICTS to disallow this. And we do the same for busybox. Also, remove the line of creating a meaningless symlink of /lib/systemd/syslog.service to /dev/null. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-13busybox: using ip instead of ifconfig for ifup/ifdownYi Zhao
There is an issue for requesting dynamic IP with ifup/ifdown command when using dhclient. Steps to reproduce: 1. Build a full-cmdline image and install dhcp-client as the default DHCP client. 2. Configure a static IP for eth0 in /etc/networking/interfaces and reboot. $ ifconfig eth0 eth0 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 $ ifdown eth0 3. Modify /etc/networking/interfaces to configure a dynamic IP for eth0 $ ifup eth0 $ ifconfig eth0 eth0 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 You could see the eth0 still has a static IP. But actually it also has a dynamic IP: $ ip addr show eth0 eth0: inet 192.168.1.2/24 brd 192.168.1.255 scope global eth0 inet 128.224.162.173/23 brd 128.224.163.255 scope global eth0 The root cause is the ifdown invokes "ifconfig" to down the eth0 but doesn't remove its IP. The dhclient would invoke "ip" to configure the interface. It can not remove an IP from down interface with "ip addr flush" and "ip addr add" command can set multiple IPs on one interface. To fix this issue, we should use the "ip" command to implement ifup/ifdown, rather than using the older "ifconfig". It will flush the IP before down the interface. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>