Commit Graph

674 Commits

Author SHA1 Message Date
Jesse Taube
80b5688700 package/busybox: use minimal.config for no MMU
By default, when Busybox is enabled, it uses the
package/busybox/busybox.config configuration file, even on noMMU
configurations. As this default configuration enables the 'ash' shell
which isn't available for noMMU targets, Busybox falls back to
enabling the 'hush' shell, but without enabling a number of its
sub-options that are quite relevant. In particular, it doesn't enable
umask, which is used in our startup scripts.

In order to have a default configuration that is more sensible, this
commit changes the Busybox package to use
package/busybox/busybox-minimal.config by default for noMMU
configurations.

Signed-off-by: Jesse Taube <Mr-Bossman075@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-08-21 14:59:35 +02:00
Bernd Kuhls
a7e4f557f5 package/busybox: bump version to 1.36.1
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-07-06 14:02:01 +02:00
Romain Naour
b6ce18b5ac package/busybox: fix busybox lineedit signal handling
Since the Busybox version bump to 1.36.0 the TestS6 fails during the
test teardown.

Backport an upstream patch fixing signal handling (SIGWINCH), see [1].

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/4322819388

[1] https://bugs.busybox.net/show_bug.cgi?id=15256

Signed-off-by: Romain Naour <romain.naour@gmail.com>
[Peter: use upstream commit as-is]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-05-28 21:41:17 +02:00
Romain Naour
f3fa74a8f7 package/busybox: disable stack optimization for i386 target
The toolchain-builder project reported an issue with Qemu 7.2.0 for
x86-core2--glibc--bleeding-edge toolchain [1]:

  Run /sbin/init as init process
  random: fast init done
  EXT4-fs (vda): warning: mounting unchecked fs, running e2fsck is recommended
  EXT4-fs (vda): re-mounted. Opts: (null). Quota mode: disabled.
  Starting syslogd: OK
  traps: syslogd[52] general protection fault ip:b7e21465 sp:bfe59e6c error:0 in libc.so.6[b7d9b000+123000]
  Starting klogd: OK
  traps: klogd[56] general protection fault ip:b7e94465 sp:bf8f069c error:0 in libc.so.6[b7e0e000+123000]
  Running sysctl: traps: logger[62] general protection fault ip:b7e48b6c sp:bfd7d194 error:0 in libc.so.6[b7e05000+123000]
  Segmentation fault
  traps: logger[64] general protection fault ip:b7dd3b6c sp:bf9b8604 error:0 in libc.so.6[b7d90000+123000]
  Segmentation fault

  (Followed by a kernel panic.)

Testing with the pevious Qemu release (7.1.0) allows to boot the system without any problem.

Building qemu sources between 7.1.0 and 7.2.0 allows to identify the first "bad" commit [2] and
report to the Qemu project [3].

Thanks to Qemu maintainers review, several issues was noticed:

  "The default i386 busybox build config does not respect glibc's requirements around stack alignment
  (see [4] for previous discussions and a workaround)."

Disabling CONFIG_STACK_OPTIMIZATION_386 option (as suggested in the Gentoo bug report) fixed the issue!

This option has been added and enabled by default in buxybox 1_29_0, so it was used since then the for
Buildroot's qemu defconfig.

Note: The x86-i686--glibc--bleeding-edge (generic x86) doesn't trigger the issue with
CONFIG_STACK_OPTIMIZATION_386 enabled.

Fixes:
https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/3731683337

[1] https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/3731683337
[2] 958e1dd130
[3] https://gitlab.com/qemu-project/qemu/-/issues/1478
[4] https://bugs.gentoo.org/725674

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-05-11 22:41:37 +02:00
Raphaël Mélotte
cd02f96b87 package: busybox: backport fix for missing getrandom()
The current Busybox version (1.36.0) fails to build with some
libc/linux combinations where getrandom() is not available. Two fixes
for glibc already exists upstream, so backport them here. A third
one (submitted upstream, not part of the main branch yet) was needed
to be able to compile with older musl and uClibc versions (or older
kernels).

This fixes the following build failure raised since commit
d68b617993:

miscutils/seedrng.c:45:24: fatal error: sys/random.h: No such file or directory
 #include <sys/random.h>

Fixes:
- http://autobuild.buildroot.net/results/44a0476b86c579e6aa658f156f0292958d40513c
- http://autobuild.buildroot.net/results/ed028160db397581558fd8c96755621dd8298bb1
- https://gitlab.com/buildroot.org/buildroot/-/jobs/4122624008
- https://gitlab.com/buildroot.org/buildroot/-/jobs/4122624034
- https://gitlab.com/buildroot.org/buildroot/-/jobs/4122624044
- https://gitlab.com/buildroot.org/buildroot/-/jobs/4122624048
- https://gitlab.com/buildroot.org/buildroot/-/jobs/4122624051

It also fixes the following (similar) build failure, raised since the
same commit:

miscutils/lib.a(seedrng.o): In function `seedrng_main':
seedrng.c:(.text.seedrng_main+0x26c): undefined reference to `getrandom'
seedrng.c:(.text.seedrng_main+0x2e8): undefined reference to `getrandom'
collect2: error: ld returned 1 exit status

Fixes:
- https://gitlab.com/buildroot.org/buildroot/-/jobs/4122624028
- https://gitlab.com/buildroot.org/buildroot/-/jobs/4122624031

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-05-09 20:44:55 +02:00
Yann E. MORIN
4938d2d232 Revert "package: busybox: backport fix for missing getrandom()"
This casues build failures:

..../build/busybox-1.36.0/Makefile.flags:165: *** unterminated call to function 'shell': missing ')'.  Stop.

This reverts commit 441c44626f.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-05-08 23:40:48 +02:00
Raphaël Mélotte
441c44626f package: busybox: backport fix for missing getrandom()
The current Busybox version (1.36.0) fails to build with some
libc/linux combinations where getrandom() is not available. Two fixes
for glibc already exists upstream, so backport them here. A third
one (submitted upstream, not part of the main branch yet) was needed
to be able to compile with older musl and uClibc versions (or older
kernels).

This fixes the following build failure raised since commit
d68b617993:

miscutils/seedrng.c:45:24: fatal error: sys/random.h: No such file or directory
 #include <sys/random.h>

Fixes:
- http://autobuild.buildroot.net/results/44a0476b86c579e6aa658f156f0292958d40513c
- http://autobuild.buildroot.net/results/ed028160db397581558fd8c96755621dd8298bb1
- https://gitlab.com/buildroot.org/buildroot/-/jobs/4122624008
- https://gitlab.com/buildroot.org/buildroot/-/jobs/4122624034
- https://gitlab.com/buildroot.org/buildroot/-/jobs/4122624044
- https://gitlab.com/buildroot.org/buildroot/-/jobs/4122624048
- https://gitlab.com/buildroot.org/buildroot/-/jobs/4122624051

It also fixes the following (similar) build failure, raised since the
same commit:

miscutils/lib.a(seedrng.o): In function `seedrng_main':
seedrng.c:(.text.seedrng_main+0x26c): undefined reference to `getrandom'
seedrng.c:(.text.seedrng_main+0x2e8): undefined reference to `getrandom'
collect2: error: ld returned 1 exit status

Fixes:
- https://gitlab.com/buildroot.org/buildroot/-/jobs/4122624028
- https://gitlab.com/buildroot.org/buildroot/-/jobs/4122624031

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-05-08 21:26:02 +02:00
Romain Naour
a57c02a4ea package/busybox: disable sha1/sha256 hwaccel with x86
Buxybox's init segfault when built with x86 musl toolchain due to
recent changes about sha1 and sha156 hwaccel support in Busybox 1.36.0.

From Alpinelinux [1]:
"main/busybox: disable sha hwaccel
 the flag check for this seems incorrect- it triggers sha_ni use when
 the instructions aren't available, but avx512vl/bw is - Elly on irc

 causes failures in github actions, which have avx512 but no sha_no"

The flag check was supposed to be fixed upstream by commit [2].

But init still crash with the latest 1_36_stable (with backported patch)
and master branch...

The same workaround has been applied to openembedded-core [3], which
states that they also have the issue with glibc.

Disable hardware sha acceleration on x86 (not x86_64), to avoid the
issue.

Checked that qemu_x86_64_defconfig with musl for x86_64 for core2 boot
as expected with sha hwaccel enabled.

Fixes:
https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/4202276721

[1] https://git.alpinelinux.org/aports/commit/main/busybox?id=ae2cfdf6f6da3dc46ee09d8ceafa26921f6e058e
[2] https://git.busybox.net/busybox/commit/?id=bd76b75f72f717150b909e8c64edfda725cabe11
[3] 22f639d611

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-05-07 15:01:28 +02:00
Arnout Vandecappelle
d68b617993 package/busybox: update to 1.36.0
Remove upstream patch 0003-awk-fix-use-after-free-CVE-2022-30065.patch
and update _IGNORE_CVES accordingly.

The two other CVE fixes are still not applied upstream. Renumber the
patches and update the comment in the .mk file.

Refresh busybox.config. All configs are set to the new defaults, except
for CONFIG_UDHCPC_DEFAULT_SCRIPT: for this one, reuse the script we also
use for DHCPv4. This is matches the behaviour previous to the bump,
where we had a single script handling both.

Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2023-02-07 14:30:56 +01:00
Ricardo Martincoski
29c9b44355 utils/checkpackagelib: warn about ifdef on .mk
There are two legitimate cases to prefer ifdef over ifeq in package
recipes: command-line overrides are allowed for busybox and uclibc
configs.

Except for that, all package in tree already use ifeq, so warn the
developer adding/changing a package to use ifeq instead of ifdef, in
order to keep consistence across packages.
file.mk:2: use ifeq ($(SYMBOL),y) instead of ifdef SYMBOL
file.mk:5: use ifneq ($(SYMBOL),y) instead of ifndef SYMBOL

The difference between ifeq and ifdef is that ifdef doesn't expand
recursively.

Add comments to busybox and uclibc packages to avoid a warning in such
special cases.

Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-06 14:22:38 +01:00
Ricardo Martincoski
01c0fb3862 package/busybox: add comment about variable override
The same comment already exists for UCLIBC_CONFIG_FILE.
Both variables can be override from command-line, as described in the
manual, at section 'Environment variables'.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-06 14:22:38 +01:00
Quentin Schulz
4a03d17172 package/busybox: fix CVE-2022-28391
The patches have been used by Alpine for 5 months now and they were
posted on the Busybox mailing list mid-July with no review or comment.

According to Ariadne Conill[1] - though NVD CVSS 3.x Base Score seems to
disagree - this has a low security impact so we could probably just wait
for upstream to merge the patches or implement it the way they want.

Considering those patches have been public for 5 months and upstream
hasn't acted until now, let's take the patches from the mailing list
anyway as there's no indication the CVEs will be fixed upstream soon.

[1] https://gitlab.alpinelinux.org/alpine/aports/-/issues/13661

Cc: Quentin Schulz <foss+buildroot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-09-19 21:34:41 +02:00
Quentin Schulz
c367b2dc86 package/busybox: fix CVE-2022-30065
This fixes CVE-2022-30065 by backporting a patch from the master branch.

Cc: Quentin Schulz <foss+buildroot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-09-19 21:34:41 +02:00
Remi Jouannet
b153345bec package/busybox: add -O staticroutes options to udhcpc
udhcpc default script can handle staticroutes but it is missing from the
default ifupdown options.

Signed-off-by: Remi Jouannet <remi.jouannet@outscale.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-09-18 18:06:48 +02:00
Ricardo Martincoski
2e83ab5992 package/busybox: fix typo on BR2_PACKAGE_NETCAT_OPENBSD
The typo was added in 2018 by commit
'f3da9ffff0 package/busybox: invert dependency with netcat-openbsd'

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-08-15 11:03:59 +02:00
Edgar Bonet
10aab0aaf6 package/busybox: speed up DHCP lease acquisition
Commit c343e01ac4 made udhcpc send a
single DHCP request (instead of 3) before going to the background, thus
speeding up the boot process if the DHCP lease is not obtained
immediately. Unfortunately, this can also slow down the acquisition of
the lease as, after going to the background, udhcpc waits for 20 seconds
(instead of 3) before retrying.

Speed up the lease acquisition by setting the retry timeout to 3
seconds.

Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-08-14 19:48:03 +02:00
Angelo Compagnucci
c343e01ac4 package/busybox: make udhcp discover faster
Instead of waiting almost 10 seconds foreground (3 discovery packets for
3 seconds retry delay) at each boot, make only one request then fork to
background. This way, the behavior is the same for working interfaces,
but it's way faster for interfaces where the address cannot be obtained
straight away.

Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-06-19 17:22:06 +02:00
Vincent Stehlé
3de486f8b0 package/busybox: fix udhcpc options in minimal config
The busybox-minimal.config, which is used by systems without an MMU, specifies
the "-b" command line option for udhcpc. However, this option is not supported
by BusyBox udhcpc anymore since version 1.27.0 when building for systems
without an MMU.

Remove the "-b" option from busybox-minimal.config to repair network
initialization on systems without an MMU.

This fixes the following network initialization failure:

  udhcpc: invalid option -- b
  FAIL

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-03-27 17:59:41 +02:00
Michael Fischer
b501e1a43d package/busybox: bump version to 1.35.0
Updating the busybox configuration files by loading and saving it back.

Signed-off-by: Michael Fischer <mf@go-sys.de>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-02-12 15:24:55 +01:00
Thomas De Schampheleire
dd8a410eaf core: introduce NORMALIZED_ARCH as non-kernel replacement for KERNEL_ARCH
The variable 'KERNEL_ARCH' is actually a normalized version of
'ARCH'/'BR2_ARCH'. For example, 'arcle' and 'arceb' both become 'arc', just
as all powerpc variants become 'powerpc'.

It is presumably called 'KERNEL_ARCH' because the Linux kernel is typically
the first place where support for a new architecture is added, and thus is
the entity that defines the normalized name.

However, the term 'KERNEL_ARCH' can also be interpreted as 'the architecture
used by the kernel', which need not be exactly the same as 'the normalized
name for a certain arch'. In particular, for cases where a 64-bit
architecture is running a 64-bit kernel but 32-bit userspace. Examples
include:
    * aarch64 architecture, with aarch64 kernel and 32-bit (ARM) userspace
    * x86_64 architecture, with x86_64 kernel and 32-bit (i386) userspace

In such cases, the 'architecture used by the kernel' needs to refer to the
64-bit name (aarch64, x86_64), whereas all userspace applications need to
refer the, potentially normalized, 32-bit name.

This means that there need to be two different variables:

KERNEL_ARCH:     the architecture used by the kernel
NORMALIZED_ARCH: the normalized name for the current userspace architecture

At this moment, both will actually have the same content. But a subsequent
patch will add basic support for situations described above, in which
KERNEL_ARCH may become overwritten to the 64-bit architecture, while
NORMALIZED_ARCH needs to remain the same (32-bit) case.

This commit replaces use of KERNEL_ARCH where actually the userspace arch is
needed.  Places that use KERNEL_ARCH in combination with building of kernel
modules are not touched.
There may be cases where a package builds both a kernel module as userspace,
in which case it may need to know about both KERNEL_ARCH and
NORMALIZED_ARCH, for the case where they differ. But this is to be fixed on
a per-need basis.

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
[Arnout: Also rename BR2_KERNEL_ARCH to BR2_NORMALIZED_ARCH]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-02-08 21:20:23 +01:00
Norbert Lange
c669bd5115 package/busybox: explicitly state binutils paths
We are not passing TARGET_CONFIGURE_OPTS when building busybox; instead
we are passing variables explicitly. As thus, it is missing the ar, nm,
and ranlib that we are using.

We add explicit AR, NM, and RANLIB, so that the ones we want to use
(i.e. the gcc-wrapped ones) are actually used.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
[yann.morin.1998@free.fr:
  - reword the commit log to explain why we need that
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-09 16:03:38 +01:00
Norbert Lange
bf01e51f3c skeleton + init: prepare /run/lock and adjust compat symlinks
Linux distros changed /var/run and /var/lock to reside on an tmpfs in
/run a long time ago, and buildroot seems to agree by providing this
tmpfs on all supported init systems.

Packages on the other hand are currently free to either use /var/run
or /run, and similarly using /var/lock should be identical to the
replacement /run/lock.

This series aims to ensure that *if* /var/lock is needed, then
it will be a symlink to /run/lock. Allowing packages to continue
working and allowing them to migrate to using /run/lock.

If all relevant packages are fixed,
the compatibility symlinks in /var can be dropped.

Status before this patch:

*   Systemd

    /run will be mounted by PID1, /var/run will be recreated by
    /usr/lib/tmpfiles.d/var.conf.

    Creating /run/lock/subsys and the compatibility symlink is handled
    in /usr/lib/tmpfiles.d/legacy.conf.
    But this is *currently not installed* by Buildroot, see [1].

*   OpenRC

    Seems to check for existence of a /run directory and does all
    necessary setup.

*   SysV

    /var/lock is currently a symlink to /tmp.

*   Busybox

    Same as sysv (Buildroot uses the sysv skeleton)

Note that we create /run/lock/subsys, so sysv scrips could expect this
directory to exist. Apart from simplifying scripts, creating the dir
early as root adds some security.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 11:28:56 +01:00
Lothar Felten
2f33654365 busybox: background udhcpc by default if no lease is obtained
The current behavior for busybox' udhcpc is to terminate if no lease is
obtained at start up. Therefore no address is acquired if the link is
established afterwards.

By setting the -b flag udhcpc will background allowing the link to be
established at any time.

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
[Peter: drop incompatible -n, also fixup busybox-minimal.config]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-08 13:32:18 +01:00
Michael Fischer
c0da70ac4b package/busybox: bump version to 1.34.1
patch 0003: already applied upstream

Signed-off-by: Michael Fischer <mf@go-sys.de>
Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-11-03 22:50:20 +01:00
Petr Vorel
98503116b4 package/busybox: bump version to 1.34.0
* backport fix from 1_34_stable branch
* refresh patches

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-09-22 23:03:53 +02:00
Sam Voss
e1ddac352d package/busybox: add systemd service for telnetd
Signed-off-by: Sam Voss <sam.voss@collins.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[yann.morin.1998@free.fr:
  - introduce BUSYBOX_INSTALL_TELNET_SERVICE
  - move _INSTALL_INIT_SYSTEMD alphabetically between openrc and sysv
  - drop the comment about Type=simple  (Arnout)
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-08-27 23:26:35 +02:00
Peter Korsgaard
94c41eef61 package/busybox/udhcpc.script: ensure action argument is correctly passed to hook scripts
commit f79a420825 (package/busybox/udhcpc.script: support RFC3442
static routes) used 'set --' clobbering the positional arguments, causing
the action argument to not be correctly forwarded to hook scripts for the
renew / bound cases if static routes are provided by the server.

As a workaround, save the action argument at the beginning of the script and
use that when calling hook scripts.

Reported-by: 王琦 <wangwangqi2011@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2021-08-17 12:19:22 +02:00
Arnout Vandecappelle (Essensium/Mind)
e5637786be package/busybox: correctly set BUSYBOX_KCONFIG_SUPPORTS_DEFCONFIG
Commit e6b3913cfc converted busybox to the generic kconfig help text
infrastructure, but set the wrong variable to flag that it doesn't
support defconfig files. Fix that.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-07-25 15:46:32 +02:00
Yann E. MORIN
e6b3913cfc package: use the generic _HELP_CMDS for kconfig-based packages
As Thomas put it:

    The <pkg>_HELP_CMDS variable allows packages using the
    kconfig-package infrastructure to display their specific
    targets related to the handling of their configuration.

    However, it was not consistently used and handled by the
    different packages.

So, this commit switches all the kconfig-based package to use the
generic help helper.

As a consequence:

  - all kconfig packages now advetise their kconfig-related actions,
    where some were previously missing: at91bootstrap3, linux-backports,
    swupdate, xvisor;

  - busybox advertises it does not support defconfig files;

  - the 'foo-savedfconfig' action is no longer advertised: it is to be
    considered an internal implementation detail.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-07-25 15:20:24 +02:00
Michael Fischer
67bb68f861 package/busybox: bump version to 1.33.1
patch 0003: already applied upstream
patch 0004: already applied upstream

Signed-off-by: Michael Fischer <mf@go-sys.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-06-26 15:08:38 +02:00
Peter Korsgaard
0f4ec05ed0 package/busybox: add upstream gunzip security fix
Fixes the following security issue:

- CVE-2021-28831: decompress_gunzip.c in BusyBox through 1.32.1 mishandles
  the error bit on the huft_build result pointer, with a resultant invalid
  free or segmentation fault, via malformed gzip data.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2021-04-07 09:26:16 +02:00
Samuel Mendoza-Jonas
09ad6f392f package/busybox: Fix check for IPv6 default route in udhcpc
The check for a default route is inverted, causing the script to wait
for the timeout even when a default IPv6 route is available. Fix this up
so that it exits early as expected.

Reported-by: Bhattiprolu RaviKumar <ravikumar.bhattiprolu@gmail.com>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2021-02-02 16:35:56 +01:00
Thomas Petazzoni
792f92db2b linux, package: do not use <pkg>_NAME when defining CPE ID variables
As we discussed on the mailing list, using $(<pkg>_NAME) when defining
CPE ID variables feels a bit odd and needlessly complicated. Just use
the package name directly.

Cc: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2021-01-15 08:02:08 +01:00
Bernd Kuhls
b1a17ef2e8 package/busybox: fix selinux-related build error
Fixes:
http://autobuild.buildroot.net/results/b89/b89b7d0f0601bb706e76cea31cf4e43326e5540c/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-01-10 14:43:10 +01:00
Bernd Kuhls
160838abf8 package/busybox: bump version to 1.33.0
Rebased patch 0002.

Removed patch 0003 which was applied upstream:
https://git.busybox.net/busybox/commit/?h=1_33_stable&id=1a5d6fcbb5e606ab4acdf22afa26361a25f1d43b

Switched _SITE to https.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-01-09 23:28:21 +01:00
Matt Weber
63332c33aa package: provide CPE ID details for numerous packages
This patch adds CPE ID information for a significant number of
packages.

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-01-04 21:43:54 +01:00
Klaus Heinrich Kiwi
8b4b9289aa package/busybox: Fix hwclock for glibc 2.31+
Pick the below patch from upstream, in order to fix
'settimeofday: Invalid argument' introduced by using glibc v2.31+.
(busybox hasn't tagged a new version since).

See https://bugs.busybox.net/show_bug.cgi?id=12756 for more info.

Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-11-12 22:03:20 +01:00
Yann E. MORIN
ca76d0336d package/busybox: update licensing info
Busybox is mainly licensed under the GPL-2.0, but the bzip2 part is a
modified copy of the bzip2/libbzip2 project, which comes with its own
license.

Update the licensing information accordingly.

Add the hash for the new license file, and fixup indentation (2 spaces).

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-11-03 23:04:08 +01:00
Sven Oliver Moll
aebefc1e5a package/busybox: install example zcip.script when zcip is enabled
this way zcip will work out of the box when configured

Signed-off-by: Sven Oliver Moll <buildroot@svol.li>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-10-25 09:50:28 +01:00
Derrick Lyndon Pallas
c93d636489 package/ipcalc: new package
ipcalc is an ancient and venerable tool for manipulating IP addresses,
networks, & interfaces from shell scripts.  There is a subtool in busybox,
but it does not support everything the upstream tool [1] supports.

[1] https://gitlab.com/ipcalc/ipcalc

Signed-off-by: Derrick Lyndon Pallas <derrick@meter.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-10-15 23:36:40 +02:00
Peter Korsgaard
f79a420825 package/busybox/udhcpc.script: support RFC3442 static routes
RFC3442 specifies a DHCP extension to provide the client with a list of
static routes to use.  This is already handled by udhcpc and exposed as the
"staticroutes" environment variable, but currently not handled by the action
script.

Extend the script to do so.  The RFC specifies that if this option is
provided by the server then the normal "routes" (3) option should be
ignored, so ensure that is done.

As we may now have more than just a default route on the interface, extend
the route cleanup logic to handle all routes for the interface (except for
the implied local 0.0.0.0 one).

Notice that this option is only sent by servers if explicitly requested by
the client, E.G.  using the -O staticroutes option to udhcpc.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-09-21 22:35:44 +02:00
Peter Korsgaard
c287d789b7 Merge branch 'next'
A number of merge conflicts, but hopefully they are all sorted out now.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-09-02 18:14:46 +02:00
Lukasz Tekieli
3c5ca644ef package/busybox: fix avahi-autoipd error message
When using a combination of udhcpc and avahi-autoipd in case of receiving IP
from a DHCP server, the following message can be seen:
"Failed to kill daemon: No such file or directory".
Add a check for a running avahi-autoipd to fix this issue.

Signed-off-by: Lukasz Tekieli <tekieli.lukasz@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-08-31 22:03:59 +02:00
Alejandro González
d4ed6b7b85 package/watchdog: new package
watchdog is a flexible watchdog daemon that improves on the already
available Busybox watchdog daemon by providing more advanced features,
like defining custom system status checks and executing repair scripts
to react upon invariants that don't hold.

Due to "watchdog" being also provided by Busybox, we need to make that
package/watchdog installs the watchdog binary in the same place as
Busybox (i.e in /sbin), and need to add a dependency of Busybox on
this new watchdog package.

Signed-off-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-08-29 14:30:05 +02:00
Petr Vorel
03fa0f119c package/busybox: bump version to 1.32.0
Dropped patches accepted upstream, refresh 2nd patch.

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-08-08 18:19:55 +02:00
Norbert Lange
c2caf816e9 package/busybox: enable flags for use as systemd pager
If the less package is not enable and systemd is enabled,
then configure the less applet to fully work with systemd.

systemd sets the flags for less in an environment variable
and requires a few options for correct display.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-08-06 10:00:56 +02:00
Yann E. MORIN
c488f647af boot/busybox: don't specify .config to munge
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Adam Duskett <aduskett@gmail.com>
Cc: Carlos Santos <unixmania@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-05-01 15:50:27 +02:00
Carlos Santos
5a8f2da98d package/busybox: add BUSYBOX_INSTALL_INIT_OPENRC
Install the sysvinit scripts, for the moment, but not S02sysctl, since
openrc provides /etc/init.d/sysctl.

Signed-off-by: Carlos Santos <unixmania@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-04-19 16:29:08 +02:00
Carlos Santos
8920c41a9d package/busybox: use same S02sysctl script as procps-ng
The scripts were already the same, except for some comments, so make the
busybox S02sysctl a symlink to the procps-ng one, which works with both
versions of the "sysctl" utility.

Signed-off-by: Carlos Santos <unixmania@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-03-30 07:24:46 +02:00
Carlos Santos
9ab1d565ee package/busybox: fix target-finalize hook
It was searching for CONFIG_ASH=y and CONFIG_HUSH=y at $(@D)/.config,
which does not contain the package build path at the target-finalize
step. Use $(BUSYBOX_DIR), instead.

Signed-off-by: Carlos Santos <unixmania@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-03-25 07:33:56 +01:00