aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox.inc
AgeCommit message (Collapse)Author
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-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: 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-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-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-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-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>
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: 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-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-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-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>
2017-03-21busybox: ignore the largefile distro feature ( always enable LFS )Andre McCurdy
Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23busybox: Guard against interrupted compilesRichard Purdie
If busybox is interrupted during do_compile, it can corrupt .config with the suid version, or worse. Typically this leads to files disappearing, particularly /etc/init.d/* which leads to an empty busybox-hwclock. That then results in errors at do_rootfs time due to the missing package. The fix is to use any 'orig' present to restore stat at the start of compile. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16meta: remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-11sysklogd and busybox: ignore return code from init script stopMarkus Lehtonen
The init script will return '1' if we try to stop the service and it is not currently running. The prerm scriptlet must not fail because of this because it will cause package deinstallation of upgrade fail if opkg package manager is used. [YOCTO #10299] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-13busybox: allow overriding compiler name in KConfigJérémy Rosen
The KConfig infrastructure needs to build HOST binaries in order to provide its infratstructure. Yocto needs to force the HOSTCC and HOSTCPP variables to BUILD_CC and BUILD_CPP to make sure that the proper compiler is used when compiling host binaries Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-10busybox: Fix busybox-init on non-tty consolesStefan Agner
When using non-tty consoles (e.g. VirtIO console /dev/hvc0) the current init system fails with: process '/sbin/getty 115200 hvc0' (pid 545) exited. Scheduling for restart. can't open /dev/ttyhvc0: No such file or directory The first field needs to be a valid device. The BusyBox inittab example explains as follows: "<id>: WARNING: This field has a non-traditional meaning for BusyBox init! The id field is used by BusyBox init to specify the controlling tty for the specified process to run on. The contents of this field are appended to "/dev/" and used as-is." Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-09busybox.inc: add tail symlink so busybox can commit suicide cleanlyAlejandro del Castillo
update-alternatives-opkg uses tail, which requires a temporary symlink on tmpdir during removal, to avoid errors of the type: /usr/bin/update-alternatives: line 113: tail: command not found Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11udhcpc: specify full path for ip command callsMark O'Donovan
Signed-off-by: Mark O'Donovan <modonovan@biotector.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-04busybox/gtk/perl/base-passwd: Ensure data is correctly expandedRichard Purdie
Where variables are used in python, we need to ensure they are expanded. This happens to work at the moment but likely will not happen in future and isn't good code practise. Its mostly an issue around key values, since bitbake has already performed key expansion when these functions are executed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24busybox: Add support for busybox-initKhem Raj
in config metadata we can configure busybox based init and device initializer ( mdev ) using e.g. VIRTUAL-RUNTIME_dev_manager = "busybox-mdev" VIRTUAL-RUNTIME_login_manager = "busybox" VIRTUAL-RUNTIME_init_manager = "busybox" VIRTUAL-RUNTIME_initscripts = "initscripts" VIRTUAL-RUNTIME_keymaps = "keymaps" DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" busybox can be used to provide init system combined with mdev it makes it a complete init system for really tiny systems. This patch uses above defines to configure features in busybox to enable the init system and mdev in a configurable manner Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-27busybox: generalize recipe to work with arbitrary install directoriesMatthias Schiffer
Allow configuring base_bindir, base_sbindir, bindir and sbindir arbitrarily. Also change the temporary symlinks created in the postinst script from relative to absolute to make the code simpler and more flexible. There was no reason to use relative links anyways, as directly afterwards update-alternatives would replace them by absolute links anyways. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-01busybox.inc: remove '-e MAKEFLAGS=' from EXTRA_OEMAKEAndre McCurdy
Busybox Kbuild likes to control its own MAKEFLAGS (it adds -rR, etc), so avoid over-riding MAKEFLAGS. Relying on 'make -e' is no longer required so remove that too. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-01busybox.inc: set CC=${CC} via make command lineAndre McCurdy
Busybox currently relies on 'make -e' to over-ride CC and the make command line to over-ride LD. Set CC via the make command line to be consistent with LD and to allow '-e' to be dropped from EXTRA_OEMAKE. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-01busybox.inc: fix CONFIG_EXTRA_CFLAGS configmangleAndre McCurdy
With current busybox Kbuild, setting .config to: CONFIG_EXTRA_CFLAGS="foo" "bar" and then running 'make oldconfig' results in .config containing: CONFIG_EXTRA_CFLAGS="foo" ie the CONFIG_EXTRA_CFLAGS configmangle in the busybox.inc doesn't currently work as intended. Remove the extra \" \" to ensure that ${HOST_CC_ARCH} gets added to CONFIG_EXTRA_CFLAGS. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-01busybox.inc: don't set .config CROSS_COMPILER_PREFIXAndre McCurdy
Setting CROSS_COMPILER_PREFIX via .config is redundant (setting CROSS_COMPILE via the make command line will always over-ride it). Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-01busybox: move EXTRA_OEMAKE etc into busybox.incAndre McCurdy
EXTRA_OEMAKE options and do_install_ptest() are common to both busybox recipes, so move into busybox.inc. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-01busybox.inc: don't export EXTRA_OEMAKEAndre McCurdy
EXTRA_OEMAKE is private to OE and shouldn't be exported to the busybox build. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-16busybox: Schedule mdev after mountallKhem Raj
mdev does automounting of block media, which expects /run/ to be mounted, so let mounting happen before running mdev service and mountall is done with at 03 so trigger mdev at 04 This helps in mounting the devices which are plugged on boot Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-12busybox.inc: remove redundant @DATADIR@ replacementAndre McCurdy
The busybox defconfig doesn't contain a @DATADIR@ marker, so the attempt to replace it in do_prepare_config is redundant. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-09-06busybox: fixes for when base_bindir != /binJoshua Lock
* Replace all hard-coded paths with variables * Run sed over busybox.links.* to replace /bin with ${base_bindir} Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-19busybox-mdev: Support automatic mounting of block devicesmike.looijmans@topic.nl
Upon inserting a USB stick or similar device, mdev will run an automounter script that mounts valid partitions on /media/<device>. The script first checks /etc/fstab entries so that mounting on UUID or LABEL or using custom mount options is still possible. If /etc/fstab does not contain particular mount options, the script will create (and remove) the mountpoint automatically. The script also supports full disk partitions (devices without partition table). The following environments can be set in /etc/default/mdev: MDEV_AUTOMOUNT=n (Disables automounting completely) MDEV_AUTOMOUNT_ROOT=/media (Change the mount root location) Automatic mounting for a particular device can be disabled by creating a file "/dev/<device>.nomount". This is helpful in scripts that create partitions for example, and want to perform specific actions which require the device to remain unmounted. A more complex variation (using LABEL based mounts) on this script has been in use in OpenPLi for many years now, and I've used this one on many projects already, so it's about time to push this to mainline. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-19busybox-mdev: Install missing find-touchscreen.shmike.looijmans@topic.nl
mdev.conf references the find-touchscreen.sh script, but this file was not being installed. Add the script to the busybox-mdev package. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Acked-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-06-14busybox: handle syslog related files properlyChen Qi
If CONFIG_SYSLOGD is not enabled, then the related service file should not be installed as it will always fail at system start-up. The error message is as following. [FAILED] Failed to start System Logging Service. The same logic applies to CONFIG_KLOGD. So we should first check the configuration before we install these service files. [YOCTO #5302] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06busybox: put udhcpc in backgroundSaul Wold
If the interface is slow to come up udhcpc will continue in the background [YOCTO #6339] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>