summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox
Commit message (Collapse)AuthorAgeFilesLines
* busybox: Skip a non-posix awk ptest on musl systemsKhem Raj13 days4-1/+32
| | | | | | | | | | | | | | The test depends on BSD extension REG_STARTEND which is not in POSIX, glibc does implement this extention so it works on glibc systems but musl does not and it needs to be skipped and LIBC environment variable is used in this test as well to run it conditionally. (From OE-Core rev: a74eaca8e1830d09c5ff678c7d361cedbfc6f68a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove consecutive blank linesAlexander Kanavin2025-06-201-1/+0
| | | | | | | | | | | | | | | | | Some of them were introduced by mass-removal of S = WORKDIR/git assignments; rather than try to fix up (or redo) just these, I've run this sed command over the whole tree: sed -i -z -E 's/([ \t\f\v\r]*\n){3,}/\n\n/g' `find . -name *.bb -o -name *.inc` The rationale is that more than one empty line is wasting vertical screen space, and does nothing for readability. (From OE-Core rev: cedc4ff7c9bcfb22a20e43e47f9759f4007a4f1a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: set S from UNPACKDIR in recipes that use only local filesAlexander Kanavin2025-06-201-2/+1
| | | | | | | | | | | | | | | There is no need to have two assignments; also setting S from UNPACKDIR (and not vice versa) is more logical as unpack task comes first, and tasks that come after unpack use S to access unpack results. Also adjust reference test data in selftest/recipeutils to reflect changes in test recipes. (From OE-Core rev: f64b7e5fb3181734c8dde87b27e872a026261a74) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: Do not define global 'const' with clangKhem Raj2025-05-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | This helps fix segfaults when compiling with clang, the option to define global const is configurable now in busybox [1] [2] Turn ptr_to_globals and bb_errno to be non const writing to a const variable is undefined behavior This is undefined as per (C99 6.7.3 paragraph 5) see [1] errno and ptr_to_globals is written to in code, this fails with segfaults when compiled with clang [1] https://git.busybox.net/busybox/commit/?id=1f925038a [2] https://lists.busybox.net/pipermail/busybox/2022-January/089413.html (From OE-Core rev: 091d162f29dfefe2716d3b793cea55b9f14d684d) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: Fix build on architectures without SYS_settimeofdayKhem Raj2025-05-222-0/+53
| | | | | | | | | | | | | | | Fixes following errors on riscv32/musl | util-linux/hwclock.c:143:20: error: use of undeclared identifier 'SYS_settimeofday' | 143 | int ret = syscall(SYS_settimeofday, NULL, tz); | | ^ | 1 error generated. (From OE-Core rev: 2d19a43c18c2c5b87e9a99f4c672ca7c6a202b80) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: fix CVE-2023-39810Chen Qi2025-05-122-0/+142
| | | | | | | | | | | | | Backport patch to fix CVE-2023-39810. Note that the patch adds a config option which is disabled by default. So users wanting this feature needs to enable that option. (From OE-Core rev: b16c9a295d5d2c5d2100bce11fffeae6beb766c5) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: drop net-tools from defconfigEnrico Jörns2025-02-201-5/+5
| | | | | | | | | | | | | | The 'net-tools' have been deprecated 15 years ago! [1] Let's remove their busybox pendants from the defconfig to prevent people from accidentally starting projects with ancient technology. [1] https://lists.debian.org/debian-devel/2009/03/msg00780.html (From OE-Core rev: cad9d9671baf7f475e3c629d73badce4d509812e) Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: Change symlink locations to match alternativeAlexander van Gessel2025-02-011-1/+5
| | | | | | | | | | | | | | | Change the symlink locations of start-stop-daemon and base32 to from BASE_S?BINDIR to S?BINDIR, to match dpkg and coreutils, respectively. Related to bug #14804 [1]. [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=14804 (From OE-Core rev: 9998d91f982cd323fa5da20edda8b1828bd4fb5d) Signed-off-by: Alexander van Gessel <ai0867@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: Correct SPDX license referenceBastian Germann2025-01-271-1/+1
| | | | | | | | | | | | | | | | Commit 6238ee3ecd (recipes-core/busybox: fixup licensing information) claims that there is no applicable license identifier in SPDX, so a bzip2-1.0.4 is made up. There is no bzip2-1.0.4 license defined in SPDX. However, bzip2-1.0.6 is the same license. License-Update: wrong SPDX identifier (From OE-Core rev: 1b51a0cbfbb64d85756ef231c81aeff02b74bd52) Signed-off-by: Bastian Germann <bage@debian.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: add klogd service to FILESAdrian Freihofer2024-12-171-1/+8
| | | | | | | | | | | | | | | busybox syslog.service file contains: Also=busybox-klogd.service That's why busybox-klog.service got automatically added to FILES:busybox-syslog. Since this incorrect auto adding feature gets dropped from systemd.bbclass this needs to be added explicitly. (From OE-Core rev: 60f1a82e25bd422fb1c380cd5b397718ab6dae13) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: disable defconfig options from mount-via-label.cfgEnrico Jörns2024-11-012-14/+11
| | | | | | | | | | | | | | | Accidentally enabled in 6a6c6442 ("busybox: refresh the defconfig from 1.33.0"). With this, also CONFIG_FEATURE_VOLUMEID_EROFS was enabled accidentally. To not break possible existing use cases, we add it to the existing fragment manually. (From OE-Core rev: 166c255b9294edc878977d7b214929d6e83b4d67) Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: disable long options in defconfigEnrico Jörns2024-11-011-4/+4
| | | | | | | | | | | | | | | | | These are activated by the longopts.cfg fragment, thus there should be no need to set them in the defconfig. The individual long options where enabled without mentioning a specific need, mostly while adding the corresponding command, thus it should be safe to disable them. Note that we cannot disable the general 'LONG_OPTS' feature in the defconfig since this is e.g. required by CONFIG_HWCLOCK (since v1.37). (From OE-Core rev: 8cf9c7bd40e58fd363bfbeaf448de399e2e16c71) Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: disable defconfig options from getopts.cfg and move long optsEnrico Jörns2024-11-013-4/+3
| | | | | | | | | | | | | | | | | | | | This disables getopts.cfg fragment options in the defconfig which were accidentally enabled in 4335cd24 ("busybox: refresh the defconfig from 1.33.0"). Since there is longopts.cfg for long options, move CONFIG_FEATURE_GETOPT_LONG there. It was probably not placed there originally since it does not match the naming scheme of the other long options. Note that CONFIG_LONG_OPTS will just be dropped since it is enabled in defconfig anyway. (From OE-Core rev: 9022cff09c78fa1e0ac8e2b94c1992caa40074c4) Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: disable defconfig options from unicode.cfgEnrico Jörns2024-11-011-6/+6
| | | | | | | | | | | Accidentally enabled in 4335cd24 ("busybox: refresh the defconfig from 1.33.0"). (From OE-Core rev: fc843212c23c04dd177039d8b0529d241e013326) Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: disable defconfig options from login-utilities.cfgEnrico Jörns2024-11-012-14/+17
| | | | | | | | | | | | | | | Accidentally enabled in 4335cd24 ("busybox: refresh the defconfig from 1.33.0"). Since this would also enforce wrong ID ranges due to busbox kconfig's bad handling of 'inactive' options, manually add them to the login-utilities.cfg fragment. (From OE-Core rev: 4f58193b8ecad12945e8b06d270b04d89ecbf2cd) Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: mdev.cfg: remove CONFIG_SETSIDEnrico Jörns2024-11-011-1/+0
| | | | | | | | | | | Was explicitly enabled in defconfig in 456010a0 ("busybox: Enable mountpoint and setsid applets"). (From OE-Core rev: 64a05e47e454f1adf3954f48de7ce98a7bff14c7) Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: disable defconfig options from syslog.cfgEnrico Jörns2024-11-011-15/+11
| | | | | | | | | | | Accidentally enabled in 4335cd24 ("busybox: refresh the defconfig from 1.33.0"). (From OE-Core rev: 9a54f36a5a82d861536e42cc844641455b4c3738) Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: disable defconfig options from simpler fragmentsEnrico Jörns2024-11-011-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | This disables options from the defconfig file that are enabled by explicit config fragments. Having them enabled in the defconfig renders the fragments useless and takes away the ability to disable options with SRC_URI:remove = "<fragment>.cfg". The respective options were all deactivated once but got accidentally enabled in 4335cd24 ("busybox: refresh the defconfig from 1.33.0"). This commit disables the features for: - sha1sum.cfg - sha256sum.cfg - resize.cfg - pgrep.cfg - rev.cfg (From OE-Core rev: ad4bd190836d2de4bda6a7e59b55bcf8d118fd14) Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: sync config for busybox 1.37Enrico Jörns2024-11-011-0/+7
| | | | | | | | | | | | | | | | | | | Done by disabling all current cfg fragments in SRC_URI, running bitbake -c configure busybox and copying the generated .config back to the defconfig file. Changes to CONFIG_EXTRA_CFLAGS were omitted. CONFIG_SHA1_HWACCEL and CONFIG_SHA256_HWACCEL are disabled explicitly in the respective fragments (sha1sum.cfg, sha256sum.cfg), thus it makes sense they've been enabled by default. (From OE-Core rev: e68e47722514f550c27d877959f16b2e5a1f475e) Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: 1.36.1 -> 1.37.0Andrej Valek2024-10-2415-610/+121
| | | | | | | | | | | | | | | | | | - update to next stable version 1.37.0 - refresh defconfig - disable new applets (ip_link_can) - enable new applets (time64, find_exec_ok, getfattr, udhcpd_bootp) - disable sha acceleration by default - enable it just for x86-64, other possible option (x86) is broken - submitted to mailing list - fix problem with syslogd when nothing was logged - fix problem with start-stop-daemon tests - remove and refresh already merged patches (From OE-Core rev: 21753f16a364e32050cf8d79bfa7e0f89be52ce7) Signed-off-by: Andrej Valek <andrej.v@skyrain.eu> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: Fix cut with "-s" flagColin McAllister2024-09-102-0/+67
| | | | | | | | | | | | | | | This fixes and issue that allows blank lines to be incorrectly output when the "-s" flag is included. This issue propogates into the populate-volatile.sh script in initscripts. If a volatiles drop file contains blank lines, a blank line will be included in combined users, which will incorrectly result in a difference in the number of combined users versus defined users. If this happens, the volatiles file will not be executed. (From OE-Core rev: dfbcf0581ab3dd47037726a7b8aa06f777792473) Signed-off-by: Colin McAllister <colinmca242@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: Add fix for CVE-2023-42366Khem Raj2024-07-182-0/+38
| | | | | | | | (From OE-Core rev: 34ba71151c93d6fb19469555131519dcb820ab3c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: CVE-2023-42364 and CVE-2023-42365 fixesKhem Raj2024-07-183-0/+295
| | | | | | | | | | | | backport upstream fix for CVEs and fix the regression that introduced [1] [1] http://lists.busybox.net/pipermail/busybox/2024-May/090766.html (From OE-Core rev: 91d7580344fe5a15a9bf059dceedab42f7ba3e54) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: Fix tc applet build when using kernel 6.8+Khem Raj2024-07-182-0/+62
| | | | | | | | | | | | | | We now have 6.9 kernel headers in master which means busybox builds with CONFIG_TC will fail to build due to CBQ being dropped in kernel 6.8+ Apply a fix which is reported upstream (From OE-Core rev: 3afbeb1ea418a69a452e82cbce00c36452b75f1e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: Patch CVE-2023-42363Peter Marko2024-07-132-0/+68
| | | | | | | | | Backport patch for CVE-2023-42363. (From OE-Core rev: 814f97922e1d6c24a36b03ee0e865f2210ff6d7c) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: Patch CVE-2021-42380Peter Marko2024-07-133-0/+194
| | | | | | | | | | Backport patch for CVE-2021-42380. Additionally backport clang regression fix caused by this patch. (From OE-Core rev: 66543769ff79d81508bb703bd2fc34871a16e2c7) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: reconfigure wget https support by default for securityRichard Purdie2024-07-131-3/+3
| | | | | | | | | | | | | | | | | | | | | The default busybox wget https support is suboptimal, it silently ignores checking certificate validity which isn't great for security. Switch our defaults to disable the internal busybox tls code and the https support using it and configure the openssl backend instead. This this is done by spawning an openssl command, we don't need dependencies on openssl for build. For runtime, we can assume people would install openssl if they need/want this. These changes put our default busybox configuration in a more secure initial set of settings. [YOCTO #14125] (From OE-Core rev: 5d4ad13462f12355ff0f2bc1773ab4b1814b165a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: Switch away from S = WORKDIRRichard Purdie2024-05-211-1/+2
| | | | | | | | | | | | | Where recipes use S = ${WORKDIR}, change them to set UNPACKDIR to a subdir of WORKDIR and make S point at this instead. I've chosen not to force S into any standard UNPACKDIR we may pick in future just so the S = UNPACKDIR case is clearly visible by the directory naming under WORKDIR as that should aid usability. (From OE-Core rev: d9328e3b0b062f0621de3d114584b44f384a1c02) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: Update WORKDIR references to UNPACKDIRRichard Purdie2024-05-021-23/+23
| | | | | | | | | | Since we want to be able to stop unpacking to WORKDIR, correct the WORKDIR references in recipe do_compile/do_install tasks to use UNPACKDIR in the appropraite places instead. (From OE-Core rev: d73595df69667fe9d12ecd407b77a0b8dae2109c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: Update S = WORKDIR recipes to use ${S} correctlyRichard Purdie2024-05-021-1/+1
| | | | | | | | | | Where recipes use S = ${WORKDIR}, ensure they are referencing ${S} correctly to access files as soon we want to stop doing this in WORKDIR at which point they would break unless corrected. (From OE-Core rev: f25dd633fffe6560f191526d1869e657e129bad9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: remove busybox-udhcpc-no_deconfig.patchAlexander Kanavin2024-04-252-88/+0
| | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: e9dfd3a422d7448ee93ae0dd7e8756a831a578f7) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: submit CVE-2022-28391 patches upstreamAlexander Kanavin2024-04-252-2/+2
| | | | | | | (From OE-Core rev: 64c026024b1c86797de338760b9f29d7e949926c) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: Explicitly specify tty device for serial consolesAleksey Smirnov2024-02-151-1/+1
| | | | | | | | | | | | 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. (From OE-Core rev: 7eea4ef84d74e618fb00fa73c773acdf775d052a) Signed-off-by: Aleksey Smirnov <aleksey.smirnov@yadro.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: Enable utmp support on musl systemsKhem Raj2023-11-301-1/+0
| | | | | | | | | | | | | 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. (From OE-Core rev: de62069c32fedd094c279b99b2ff389c7e0012aa) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox-inittab: fix console handlingRoss Burton2023-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 71202782a06ed1f0a17e00072b74b21195f2f5f9) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: use ttyrun to run getty only if the terminal existsRoss Burton2023-10-091-34/+12
| | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 6c655441ff5cd0d8877891ff37f8cfa983363a2a) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: Set PATH in syslog initscriptMartijn de Gouw2023-10-061-0/+2
| | | | | | | | | | | | | 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. (From OE-Core rev: fa53f898eaba15dff030f9eadf86e5bca7d954fa) 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>
* busybox: enable 64 bit shell arithmetic (via long long type)Alexander Kanavin2023-09-181-1/+1
| | | | | | | | | | | 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. (From OE-Core rev: 8165c980338d4719004bf62644e0fe24ef309fe0) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: remove coreutils dependency in busybox-ptestRoss Burton2023-09-073-1/+37
| | | | | | | | | | | | | | | | | 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 ] (From OE-Core rev: 37482e404cf4dcf9360c29986ced8db78baf249b) 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>
* busybox: 1.36.0 -> 1.36.1Andrej Valek2023-05-282-1/+1
| | | | | | | | | - regression on x86 is still in place (From OE-Core rev: 09c5499f5885662a55a8810078e7208a1696b29f) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: move hwclock init earlier in startupChris Elledge2023-04-051-0/+1
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: 3012bac35ada9a9f66d9e6e2fecaee09527b9d44) 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>
* busybox: Fix ptest dependenciesRichard Purdie2023-03-131-1/+1
| | | | | | | | | | | 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. (From OE-Core rev: 658c5ed34e279983b1827abfe4e439524b72d4a9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: Fix depmod patchSaul Wold2023-02-151-1/+1
| | | | | | | | | | | | | | 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. (From OE-Core rev: 339c3c3abe8d405cfe7b3f34db9b3547bcaaf878) 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>
* busybox: Make provisions to disable sha256/sha1 accelaration on x86Khem Raj2023-01-314-3/+4
| | | | | | | | | | | | | | | | | | 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 (From OE-Core rev: 22f639d61127f4b82a79008c5305e44e090a3680) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: 1.35.0 -> 1.36.0Andrej Valek2023-01-318-167/+17
| | | | | | | | | | | | | | | - 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 (From OE-Core rev: 2e9989a8f8b5b93476e551475df010add32aac31) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: rm temporary files if do_compile was interruptedAntonin Godard2023-01-091-0/+3
| | | | | | | | | To avoid working with undeterministic config files, remove all the temporary files to start from scratch. (From OE-Core rev: 74cd440c4e3df0ed3b81cf5c60a3f92e0dd3fe6c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: always start do_compile with orig config filesAntonin Godard2023-01-091-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 6b4a0f063edcfe0a5a4f418842e86ac0c46d9cad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: add devmem 128-bit supportMingli Yu2022-09-212-0/+129
| | | | | | | | | | | | Add devmem 128-bit support [1]. [1] https://git.busybox.net/busybox/commit/?id=d432049f288c9acdc4a7caa729c68ceba3c5dca1 (From OE-Core rev: d0d78aa7a34fbd7065b31ffc224be8e1984cb7aa) 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>
* busybox: fix CVE-2022-30065Ross Burton2022-07-012-0/+30
| | | | | | | | (From OE-Core rev: bf3d981b0303eab91d4cb19092ac27b489c8ad27) 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>
* busybox: Use base_bindir instead of hardcoding /bin pathKhem Raj2022-04-261-1/+1
| | | | | | | | | | | | 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' (From OE-Core rev: 238fd30689054c7b44176dce7180fb6dac4e1b6f) 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>