summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox
AgeCommit message (Collapse)Author
3 hoursrecipes: Avoid S = WORKDIRmaster-nextRichard Purdie
Where recipes use S = ${WORKDIR}, change them to set UNPACKDIR to a subdir of WORKDIR and make S point at this instead. Where WORKDIR is referenced in do_compile/do_install and similar, switch to using ${S} which conceptually makes more sense. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
29 hoursbusybox: remove busybox-udhcpc-no_deconfig.patchAlexander Kanavin
The option was introduced in: https://git.yoctoproject.org/poky/commit/?h=master&id=427472e980cd6254a5e4ef37209b327e15af259b for the purpose of a standalone udhcpc service. 18 months later the service was removed as it was clashing with the broader networking service, and the option isn't used anywhere else: https://git.yoctoproject.org/poky/commit/?h=master&id=a4b1e348484b74d055b8906413892789d3452f4a There's a slight chance the option still survives somewhere private, and is important in that context, but I'd rather drop the patch so it can be maintained where it's useful, and maybe even proposed upstream. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
29 hoursbusybox: submit CVE-2022-28391 patches upstreamAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-15busybox: Explicitly specify tty device for serial consolesAleksey Smirnov
Description: In case of two or more consoles are in inittab, and not specified tty device for first one, some keys works improperly, ex: arrows, backspace, pgup/pgdown; The patch is fixes this issue. Signed-off-by: Aleksey Smirnov <aleksey.smirnov@yadro.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-11-30busybox: Enable utmp support on musl systemsKhem Raj
runlevel misc applet is enabled when using init feature from busybox however this applet does not build right now because it depends on utmp feature and its disabled for musl systems. runlevel is used by update-rd.d tool during system maintenance e.g. opkg upgrade etc. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-10-11busybox-inittab: fix console handlingRoss Burton
A testing failure meant that the inittab changes made in 6c65544 didn't actually work. A copy-paste problems meant that start_getty was being invoked instead of getty, but start_getty is sysvinit-inittab-specific. Revert this inittab to calling getty directly. Remove the terminal type, this wasn't specified in the original inittab. Busybox's init has non-standard behaviour for the inittab's ID field. With SysV this is a four-character identifier and nothing more, but with busybox init this is the controlling terminal (minus /dev). If the terminal doesn't exist then busybox doesn't gracefully handle the failure but instead repeatedly fails to spawn. As getty will immediately issue a setsid() this isn't needed for getty entries, so the ID can be empty and ttyrun does the terminal detection. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-09busybox: use ttyrun to run getty only if the terminal existsRoss Burton
Wrap calls to start_getty with ttyrun, so that getty isn't started if the device doesn't exist. As we know start_getty is only called when the device exists we can remove the partial workaround for this problem in that scripts too. This neatly obsoletes SERIAL_CONSOLES_CHECK, whose sole purpose was to check what terminals are present at boot and rewrite inittab. Notably, this meant that SERIAL_CONSOLES_CHECK made using a read-only rootfs impossible. (From OE-Core rev: 950ecaabc04836efc346be0ac7e0331e2378872b) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-06busybox: Set PATH in syslog initscriptMartijn de Gouw
This script is not always called with /sbin and /usr/sbin in the PATH already, for example when called via ssh. Explicitly set PATH to make sure it includes /sbin and /usr/sbin since that's where start-stop-daemon is located. Signed-off-by: Martijn de Gouw <martijn.de.gouw@prodrive-technologies.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-18busybox: enable 64 bit shell arithmetic (via long long type)Alexander Kanavin
This matters on 32 bit systems where otherwise timestamp manipulation in shell scripts would overflow after 2038. One of the scripts in strace test suite exposed the issue. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07busybox: remove coreutils dependency in busybox-ptestRoss Burton
A dependency on coreutils was added to busybox-ptest in oe-core 658c5ed to fix a test failure. The failure is because one of the start-stop-daemon tests is known to fail if /bin/false is busybox. Instead of failing, we can check if /bin/false is a symlink to busybox and skip the test if so. [ YOCTO #15068 ] Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-28busybox: 1.36.0 -> 1.36.1uninative-4.0Andrej Valek
- regression on x86 is still in place Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-05busybox: move hwclock init earlier in startupChris Elledge
hwclock.sh had default update-rc parameters which made it run after other tasks that work with the clock such as connman. This causes a time obtained by NTP to be clobbered by a potentially incorrect time in the RTC. Provide non-default INITSCRIPT_PARAMS to have hwclock.sh run during the rc startup before runlevel initscripts start. Signed-off-by: Chris Elledge <celledge@siteworx.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-13busybox: Fix ptest dependenciesRichard Purdie
Ironically, busybox ptests don't all work without coreutils being present. This dependency fixes execution in minimal images but the failing start-stop-daemon test case should probably be investigated in due course and the dependency removed when possible. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-15busybox: Fix depmod patchSaul Wold
The original patch was actually allowing .debug modules though which was in-correct. This change blocks the parsing of .debug modules (which is correct). As noted in [YOCTO #15022] this should address the empty modules.dep when using the BusyBox depmod. Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-31busybox: Make provisions to disable sha256/sha1 accelaration on x86Khem Raj
busybox 1.36 has an ongoing regression on musl/i386 [1] we see same on glibc systems too. therefore avoid the affected code by disabling sha256/sha1 sum accelaration meanwhile CONFIG_SHA256_HWACCEL and CONFIG_SHA1_HWACCEL are enabled by default [1] http://lists.busybox.net/pipermail/busybox/2023-January/090078.html Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-01-31busybox: 1.35.0 -> 1.36.0Andrej Valek
- update to next (un)stable version 1.36.0 - refresh defconfig - disable new applets (tree, tsort, seedrng) - use hw-accel for sha1/256 sums when available - remove and refresh already merged patches Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-01-09busybox: rm temporary files if do_compile was interruptedAntonin Godard
To avoid working with undeterministic config files, remove all the temporary files to start from scratch. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-09busybox: always start do_compile with orig config filesAntonin Godard
When compiling busybox a second time (e.g. with `compile -f`), busybox can use an altered autoconf.h file for compiling, which can ultimately produces different and unwanted binaries. This can produce errors like this one: ERROR: busybox-1.35.0-r0 do_package: Error executing a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: <module> 0001: *** 0002:ptest_update_alternatives(d) 0003: File: '…/poky/meta/classes/ptest.bbclass', lineno: 100, function: ptest_update_alternatives 0096: for alt_name, alt_link, alt_target, _ in alternatives: 0097: # Some alternatives are for man pages, 0098: # check if the alternative is in PATH 0099: if os.path.dirname(alt_link) in bin_paths: *** 0100: os.symlink(alt_target, os.path.join(ptest_bindir, alt_name)) 0101:} 0102: 0103:do_configure_ptest_base[dirs] = "${B}" 0104:do_compile_ptest_base[dirs] = "${B}" Exception: FileExistsError: [Errno 17] File exists: '/bin/busybox.suid' -> '…/busybox/1.35.0-r0/package/usr/lib/busybox/ptest/bin/login' This happens because ALTERNATIVE:busybox contains `/bin/login` twice, initially that's because `/bin/login` is present in both busybox.links.suid and busybox.links.nosuid. The reason for that is because of the altered autoconf.h. Steps to reproduce above error: <add ptest to distro configs> bitbake busybox -c clean bitbake busybox -c package -f bitbake busybox -c compile -f bitbake busybox -c package -f This patch guards against potential bugs by: - making a backup of .config and autoconf.h that have matching timestamps. - make sure do_compile always starts with these files. - restore .config and autoconf.h at the end of do_compile. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-20busybox: add devmem 128-bit supportMingli Yu
Add devmem 128-bit support [1]. [1] https://git.busybox.net/busybox/commit/?id=d432049f288c9acdc4a7caa729c68ceba3c5dca1 Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-01busybox: fix CVE-2022-30065Ross Burton
Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-26busybox: Use base_bindir instead of hardcoding /bin pathKhem Raj
This symlink is not valid when using usrmerge and ptest packaging would fail Exception: FileExistsError: [Errno 17] File exists: '/usr/bin/busybox.suid' -> '/mnt/b/yoe/master/build/tmp/work/ppc64p9le-yoe-linux-musl/busybox/1.35.0-r0/package/usr/lib/busybox/ptest/bin/login' Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-19busybox: fix CVE-2022-28391Steve Sakoman
BusyBox through 1.35.0 allows remote attackers to execute arbitrary code if netstat is used to print a DNS PTR record's value to a VT compatible terminal. Alternatively, the attacker could choose to change the terminal's colors. https://nvd.nist.gov/vuln/detail/CVE-2022-28391 Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-03busybox: Exclude .debug from depmodSaul Wold
As with the kmod version of depmod, exclude .debug from being searched. Since busybox does not use the depmod.d and any configuration file option is ignored we just hardcode it. Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-20meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX ↵Richard Purdie
license identifiers An automated conversion using scripts/contrib/convert-spdx-licenses.py to convert to use the standard SPDX license identifiers. Two recipes in meta-selftest were not converted as they're that way specifically for testing. A change in linux-firmware was also skipped and may need a more manual tweak. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-26busybox: refresh defconfigAndrej Valek
- extend find command - disable rootfs skip - busybox-inittab_1.34.1 -> busybox-inittab_1.35.0 Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-11busybox: update 1.34.1 -> 1.35.0Alexander Kanavin
Drop upstreamed patch. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-21busybox: drop 0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patchAlexander Kanavin
This was added 10 years ago, is almost certainly non-upstreamable and it isn't clear what the issues it aims to fix are: the AB revealed no problems when the patch is removed. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-16reproducible: Drop BUILD_REPRODUCIBLE_BINARIES variableRichard Purdie
We want things to be reproduicble and the variable doesn't really change much any more. Drop the remaining uses and make those code paths always active. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-11busybox: 1.34.0 -> 1.34.1Andrej Valek
- update to next stable version 1.34.1 Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2021-09-07systemd: '${systemd_unitdir}/system' => '${systemd_system_unitdir}'Robert P. J. Day
Repo-wide replacement to use newer variable to represent systemd system unitdir directory. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-27busybox: 1.33.1 -> 1.34.0Andrej Valek
- update to next stable version 1.34.0 - refresh defconfig - remove and refresh already merged patches Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-30Convert to new override syntaxRichard Purdie
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-19busybox: support mounting swap via labelsRoss Burton
Enable support for swap partitions in the mount-via-label fragment. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2021-06-27busybox: add tmpdir option into mktemp appletAndrej Valek
- Make mktemp applet compatible with --tmpdir option in ca-certificate update script. Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-11busybox: upgrade 1.33.0 -> 1.33.1zhengruoqin
0001-decompress_gunzip-Fix-DoS-if-gzip-is-corrupt.patch removed since it is included in 1.33.1 Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-04busybox: Fix reproducibilityKhem Raj
The ensures that globbing results in same order irrespective of shell in use Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-03busybox: Enable long options for enabled appletsKhem Raj
certain applets are enabled but the long options are not enabled for them, it results in subtle failures in ptests where its expecting these options e.g. gzip --best is commonly used in many package tests e.g. root@qemux86-64:/usr/lib# grep -r "\-\-best" * acl/ptest/Makefile:GZIP_ENV = --best attr/ptest/Makefile:GZIP_ENV = --best coreutils/ptest/Makefile:GZIP_ENV = --best ethtool/ptest/Makefile:GZIP_ENV = --best libxml2/ptest/Makefile:GZIP_ENV = --best lttng-tools/ptest/Makefile:GZIP_ENV = --best opkg/ptest/Makefile:GZIP_ENV = --best perl/ptest/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm: COMPRESS ('gzip --best') python3.9/test/test_gzip.py: for compress_level in ('--fast', '--best'): ... this ensures that these options are enabled by default, which makes them more compatible than now with coreutils provided utilities busybox size grows by 4K which perhaps is acceptable --rwxr-xr-x root root 817704 ./bin/busybox.nosuid +-rwxr-xr-x root root 821800 ./bin/busybox.nosuid This makes autopoint-3/gettext pass This patch add all the long options to this fragment. The long options for a tool will only get enabled if the corresponding tool/feature is enabled in main defconfig, otherwise it will be ignored in final .config Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18Revert "inittab: Add getty launch on hvc0 for qemuppc64"Kevin Hao
This reverts commit ed69ef20167da0986bc9363d1a91e62001995af4. The console entry has already been added into /etc/inittab based on the SERIAL_CONSOLES. So drop this redundant entry. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18busybox: fix CVE-2021-28831Chen Qi
Backport patch to fix CVE-2021-28831. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-12busybox-inittab: rename for PV to match with busybox's PVMartin Jansa
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-12busybox: refresh the defconfig from 1.33.0Martin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-11inittab: Add getty launch on hvc0 for qemuppc64Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-26busybox: update 1.33.0Oleksandr Kravchuk
Removed upstreamed patch. Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-21recipes: Update common-licenses references to match new namesRichard Purdie
The licenses were renamed to match their SPDX names, fix the references in LIC_FILES_CHKSUM in OE-Core. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-31busybox.inc: install rcS, rcK and rcS.default only with busybox in ↵Martin Jansa
VIRTUAL-RUNTIME_init_manager * since https://git.openembedded.org/openembedded-core/commit/?id=991394be9e695f9ddb5e2fca167c06f7a56a7449 the rcS.default is in SRC_URI only when VIRTUAL-RUNTIME_init_manager is 'busybox' but this section in do_install was controlled by CONFIG_INIT=y in /.config which for busybox-initrd from meta-virtualization caused: ERROR: busybox-initrd-1.32.0-r0 do_install: Execution of '/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/busybox-initrd/1.32.0-r0/temp/run.do_install.1481880' failed with exit code 1: CONFIG_FEATURE_MDEV_CONF=y install: cannot stat '/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/busybox-initrd/1.32.0-r0/rcS.default': No such file or directory WARNING: exit code 1 from a shell command. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20busybox: Sync rcS.default with sysvinitKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20rcS: Define identifier for init system usedKhem Raj
This will help in defining init system specific portions of initscripts which are shared Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Sinan Kaya <okaya@kernel.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20busybox: Run mdev as daemonKhem Raj
When busybox is used for device management, kernel needs to support older/obsolete mechanism via CONFIG_UEVENT_HELPER and CONFIG_UEVENT_HELPER_PATH to enable /proc/sys/kernel/hotplug but this would require kernel defconfig change and will always be needed when mdev is used, intead run it in daemon mode Update mdev init script to run mdev in daemon mode Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20busybox: Install /etc/default/rcS when used as init systemKhem Raj
This helps in using sysvinit scripts with busybox init system as well Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-18busybox-inittab: Implement SYSVINIT_ENABLED_GETTYS and USE_VTKhem Raj
This ensures that busybox init can generate matching tty's in inittab as system defines, secondly resepcts USE_VT for creating virtual ttys Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>