aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox
AgeCommit message (Collapse)Author
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>
2017-08-16busybox.inc: improve reproducibilityJuro Bystricky
For reproducible builds do not generate build timestamp as part of the version string. Remove host tools references from .config file. With this patch all eight busybox packages are built as binary reproducible. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16meta: Drop remnants of uclibc supportRichard Purdie
uclibc support was removed a while ago and musl works much better. Start to remove the various overrides and patches related to uclibc which are no longer needed. uclibc support in a layer would still be possible. I have strong reasons to believe nobody is still using uclibc since patches are missing and I doubt the metadata even parses anymore. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-14busybox: changes to support merged /usrAmarnath Valluri
Most of the shell scripts refer to /bin/sh inside the script. When 'usrmege' feature is enabled, this path would be /usr/bin/sh. Hence, to satisfy build dependency add '/bin/sh' to it's providers list. Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12busybox: add backported patch to support iproute 'scope'André Draszik
This is needed for avahi-autoipd, which attempts to create a link-scope route as part of its work. Without iproute scope support in busybox, the route is not created due to an error message, and hence we aren't accessible by, and can't access ourselves, IP addresses outside the link-local scope (169.254.0.0/16) unless we also have a proper non link-local IP address, which somehow defeats the purpose of zeroconf. Signed-off-by: André Draszik <adraszik@tycoint.com> Reviewed-by: Stephane Ayotte <sayotte@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-09busybox: fix a linking issueMing Liu
A following linking error was observed: | ========== | archival/lib.a(tar.o): In function `tar_main': | archival/tar.c:1168: undefined reference to `unpack_Z_stream' | archival/tar.c:1168: undefined reference to `unpack_Z_stream' | ld: busybox_unstripped: hidden symbol `unpack_Z_stream' isn't defined | ld: final link failed: Bad value this happened with clang compiler, with the following configs: | CONFIG_TAR=y | # CONFIG_FEATURE_SEAMLESS_Z is not set which can be fixed by adding IF_FEATURE_* checks in. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-05-29busybox: make SYSLOGD optionnalRomain Perier
Some distros might choose another syslogd provider like rsyslogd. update-alternative will update the link from syslogd to the right provider. However the syslogd feature is still present and enabled in busybox. This commit adds a new configuration fragment to make syslogd optionnal in busybox. Signed-off-by: Romain Perier <romain.perier@collabora.com> Acked-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-29busybox: make bash a valid login shell if enabledAndreas Oberritter
Add bash to /etc/shells if busybox is built with bash applet anabled to fix login via dropbear. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-21busybox: fix typo in CVE-2016-2147_2.patch Upstream-Status tagAndre McCurdy
Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-04-13busybox: drop unmaintained _git recipeAndre McCurdy
The busybox _git recipe is not formally tested or kept up to date. The gstreamer _git recipes were recently removed from oe-core and the justifications for that change apply to the busybox _git recipe too. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-04-12busybox: In defconfig enable ASH_CMDCMD for built-in 'command'Nathan Rossi
It is common for *ash shells to have 'command' available as a built-in function. POSIX 2008 also documents the availability of this command. Additionally the /etc/profile of base-files requires this command to be available as of commit e77cdb7611 ("base-files: profile: Do not assume that the tty command exists"). If it is not available the following message is output during login on a image using busybox. -sh: command: not found It however should be noted that tcsh and csh do not provide 'command' (built-in or otherwise). Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-08busybox: Security fix BUG9071Martin Balik
Signed-off-by: Martin Balik <martin.balik@siemens.com> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-08busybox: Security fix CVE-2016-6301Andrej Valek
ntpd: NTP server denial of service flaw CVE: CVE-2016-6301 Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-05busybox.inc: drop comment explaining '-e MAKEFLAGS=' in EXTRA_OEMAKEAndre McCurdy
EXTRA_OEMAKE no longer contains '-e MAKEFLAGS=' so the comment explaining that it needs to be removed / over-ridden is obsolete. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>