Add a runtime test for swupdate using the default swupdate
configuration.
An SWU image containing a single file, installed by the "rawfile"
handler, is generated at build time with host-swugenerator. Since the
default configuration has no crypto backend, the image is generated
without hashes.
At runtime, the test checks that:
- the swupdate daemon is started by the init script,
- the embedded webserver serves the default website,
- a dry run through swupdate-client does not install anything,
- the SWU image is correctly installed through swupdate-client,
- an invalid SWU image is rejected and the daemon keeps running.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
[Julien: change post-build.sh to use /bin/sh]
Signed-off-by: Julien Olivain <ju.o@free.fr>
Starting with Mender version 4, the program is rewritten from Go to C++ using
CMake.
The current package provided by Buildroot is 3.5.3, which is quite old, having
been released on 12/6/2024. Since then, several changes have occurred,
necessitating a substantially large patch with many changes all at once.
The following is a list of changes:
MAJOR:
- Mender is now a C++ project
- Mender depends on systemd
- Drops sysvinit support
- Mender is split into two binaries:
- mender-authd
- mender-updated
MINOR:
- Drop the 0001-openssl-v4-update.patch.
- Add 0001-src-common-crypto-platform-openssl-crypto.cpp-fix-bu.patch
Which allowd building without OpenSSL engine support.
This patch is tested against OpenSSL 4.0.2 which is not yet applied
to the master branch.
- The following busyboxy options are required by the rootfs module and are
enabled by default:
- flock
- stat
- stat_format
- sync_fancy
- wget
- wget_https
- wget_openssl
Note: While sync_fancy isn't strictly necessary, enabling this feature
prevents several messages about sync ignoring all arguments.
- New dependencies are as follows:
- boost
- dbus
- libarchive
- libglib2
- lmdb
- openssl
- systemd
- yaml-cpp
The configs/mender_x86_64_efi_defconfig file is updated to
use systemd by default.
Mender is configured with -DBUILD_SHARED_LIBS=OFF as the bundled
libyaml and tiny-process-library .so files are not installed when
-DBUILD_SHARED_LIBS=ON is selected.
The support/testing/tests/package/test_mender.py is updated:
- Uses systemd
- Bumped kernel version to 6.18.59
- Adds a simple network as mender-authd requires network-online.target
- Drops sysvinit tests
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To keep parity with board/mender/x86_64/overlay/etc/mender/mender.conf,
change /var/lib/mender/device_type to /etc/mender/device_type and
add a /etc/mender/mender.conf file.
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Changes relevant for packaging:
* SysV init script support has been removed, remove the associated
options "sysvinit-path" and "sysvrcnd-path" ("rc-local" was never
set).
* Support for libidn has been removed, IDN functionality now requires
libidn2. The Meson option "libidn" is deprecated and has no
effect. Remove the optional dependency and config option.
* Required versions of various dependencies have been raised. The
respective Buildroot packages meet the version requirements, but
external toolchains with very old glibc versions might not work any
more.
* cryptsetup 2.0.1/2.3.0 -> 2.4.0
* elfutils 0.158 -> 0.177 (NEWS is missing the "0.")
* libblkid 2.24 -> 2.37
* libseccomp 2.3.1 -> 2.4.0
* glibc 2.31 -> 2.34
* libxcrypt or libcrypt from glibc -> libxcrypt 4.4.0 only
* OpenSSL 1.1.0 -> 3.0.0
* Python 3.7.0 -> 3.9.0
* Linux kernel version requirements have been updated, too. Set
BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 accordingly.
* baseline 5.4 -> 5.10
* recommended baseline 5.7 -> 5.14
* 6.6 for full functionality
New options:
* "libcrypt" enables libxcrypt support
* "compat-sysv-interfaces" does two things:
* restore runlevel[0-6].target units that were removed in v258
* enable installation of legacy.conf for tmpfiles
Buildroot has its own legacy.conf in package/skeleton-init-systemd
and there was no need to restore runlevel targets, so disable
unconditionally.
* "default-oci-registry", used only with importd
Please see the upstream NEWS file for other changes [1]. Note that the
new "report" and "mstack" features mentioned in NEWS do not have
feature flags.
Due to increased kernel version requirements "systemctl status"
reports "Tainted: old-kernel" with the pre-built 5.10 kernel in
support/testing/tests/init/test_systemd.py. Adjust the code to accept
that as long as it is the only taint flag.
Hash of LICENSES/README.md changed due to removal of a SysV-related
script [2].
[1] https://github.com/systemd/systemd/blob/v260.6/NEWS
[2] 986fee6217
Signed-off-by: Fiona Klute (othermo GmbH) <fiona.klute@gmx.de>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Just like the generate_mender_bootstrap_artifact method in
board/mender/x86_64/post-image-efi.sh, calculate the rootfs-image checksum.
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Newer versions of mender-artifact echo deprecation warnings when using
the --device-type argument and tell users to use --compatible-types.
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Setuptools 82 removed pkg_resources, but older U-Boot Binman versions
still use it. Package the standalone PyPA snapshot so these consumers
can keep working when setuptools is updated.
Add a small setuptools pyproject.toml to build the module from its
repository-root layout, and include the license addition proposed
upstream. Supply packaging, jaraco.text and platformdirs explicitly,
as the standalone module imports all three at runtime.
Add a host runtime test covering resource access, dependency resolution
and cache lookup.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
5dbba2616f ("package/pkg-autotools.mk:
also handle libtool 2.6.x") added some patching logic for libtool
2.6.x, in order to fix a build issue in cryptsetup, which uses libtool
2.6.2.
However, the change in this commit applied the newly added libtool
patch to all 2.6.x libtool versions.. which broke libmodbus that uses
libtool 2.6.0, and unfortunately the ltmain.sh in libtool 2.6.0 and
2.6.2 is sufficiently different that the same patch doesn't apply to
both.
So we:
1. Rename buildroot-libtool-v2.6.patch to buildroot-libtool-v2.6.2.patch
2. Introduce a buildroot-libtool-v2.6.0.patch
3. Update the logic in pkg-autotools.mk to apply
buildroot-libtool-v2.6.0.patch to libtool 2.6.0 and 2.6.1, and
buildroot-libtool-v2.6.2.patch to libtool 2.6.2 and later. Note that
we didn't test with libtool 2.6.1 as we didn't identify a package
using this libtool version: we for now assume that it will be like
2.6.0, and will fix later if needed.
Fixes: https://autobuild.buildroot.net/results/3faf9e6889cbe33019141450a95023c730a6d03c/
Fixes: 5dbba2616f ("package/pkg-autotools.mk: also handle libtool 2.6.x")
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
For release notes since edk-stable202602, see [1] and [2].
The "GCC5" toolchain was marked as deprecated in upstream commit [3]
(first included in release edk2-stable202305), and then removed in
upstream commit [4] (first included in release edk2-stable202605).
The toolchain is now simply named "GCC". This commit reflects that
change.
This commit removes the edk2 package patch, which is included in
this new version.
This commit also updates the edk2-platforms packages with the last
commit merged at the edk2 release date (2026-08-12), which
corresponds to commit [5]. The edk2-non-osi package is also updated
the same way, which corresponds to commit [6].
This commit also removes the ARM SGI-575 platform support, which was
removed upstream in commit [7].
This commit has been runtime tested with tests using EDK2 package,
with commands:
support/testing/run-tests \
-d dl -o output_folder \
tests.boot.test_edk2 \
tests.boot.test_grub.TestGrubAArch64EFI \
tests.boot.test_grub.TestGrubRiscV64EFI \
tests.boot.test_grub.TestGrubX8664EFI \
tests.package.test_fwts
It has also been runtime tested (by booting in qemu) with defconfigs
using EDK2 package:
qemu_aarch64_sbsa_defconfig
qemu_loongarch64_virt_efi_defconfig
qemu_riscv64_virt_efi_defconfig
qemu_x86_64_efi_defconfig
[1] https://github.com/tianocore/edk2/releases/tag/edk2-stable202605
[2] https://github.com/tianocore/edk2/releases/tag/edk2-stable202608
[3] 0fc07b1c6a
[4] bdadb269e3
[5] f8dbb5c603
[6] 7ac12d81e0
[7] 6e1048980f
Cc: Dick Olsson <hi@senzilla.io>
Cc: Romain Naour <romain.naour@smile.fr>
Cc: Vincent Stehlé <vincent.stehle@arm.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Add a simple test case that imports the module and does a simple
compress decompress routine.
Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
When running tests depending on entropy pool being ready on armv7 (eg:
test_openscap.py, which runs the 'oscap' binary, which tries to get
random bytes, even with simple commands), the test may fail on timeout
due to the entropy pool not being ready; this is confirmed by the test
being blocked until "crng init done" line appears in the kernel logs.
A solution could be to just increase the test timeout to a value large
enough to make sure that the entropy pool will be ready in most cases,
but it may be hard to find a value that fits all use cases, and all
tests depending on entropy being ready would deserve the same fix.
Another solution is to replicate what commit 7acb32dabb
("support/testing: add builtin armv5 kernel 4.19 with entropy") did: it
added the virtio-rng-pci argument to allow the guest machine to use host
entropy. The armv7 kernel used for testing seems to be built with the
relevant virtio configuration to allow a similar pass-through, so pass
virtio-rng-device to armv7 kernel when running tests.
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
The servers already redirect from HTTP to HTTPS. Use HTTPS directly to
prevent manipulation along the way.
Also switch from the autobuild.buildroot.net alias to
autobuild.buildroot.org, like all other toolchain downloads from the
Buildroot autobuilder.
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Both autobuild.buildroot.org and toolchains.bootlin.com support HTTPS,
and even redirect from HTTP to HTTPS. Use HTTPS directly to prevent
manipulation along the way.
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Julien Olivain <ju.o@free.fr>
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y is supposed to make the build fail
if any download cannot be successfully verified against a known
hash. However, support/download/check-hash would only warn if there
was no hash file at all for the package in question, and allow the
build to continue.
This is a security fix and should be backported to all stable
branches.
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Adapt the code added to the host test with
928cc5dc5c ("package/uboot-tools: fix
host FIT signature support") to run on the target.
Signed-off-by: Fiona Klute (othermo GmbH) <fiona.klute@gmx.de>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Exercise synchronous and asynchronous HTTP requests with python-httpx2
against a local HTTP server, checking the response status and JSON body.
This covers the httpcore2 socket transports and the AnyIO asyncio backend
used by the asynchronous client.
Bind the server to an ephemeral loopback port so the test does not depend
on external services, and shut it down when the sample finishes.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
The $HOME folder of the br-user inside the container is currently
read-write for the br-user. However, practically speaking, it is only
read-write when the UID of the user running the container from the
host machine is 1000, equal to the UID of the br-user inside the
container. For any other UID on the host machine, the $HOME folder is
in fact already read-only.
Because we do not expect Buildroot to write into $HOME, and in order
to have a consistent behavior regardless of the UID of the user on the
host machine, we change our Docker image to make the $HOME folder of
the br-user entirely non-writable.
Suggested-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Add test for CycloneDX vulnerability generation.
If multiple packages ignore the same vulnerability but provide different
analyses, the generator must produce multiple vulnerability entries with
the same vulnerability ID but different analysis information.
This situation can occur when generating a CycloneDX SBOM from the
output of 'make show-info-all'. The resulting SBOM includes packages
that exist in multiple versions within Buildroot (gnupg for instance).
In such a case, one package version may ignore a vulnerability because
it is not affected, while another package version may address it through
a patch.
Therefore, multiple vulnerability entries must be generated, each with
its own analysis and reference information.
This adds a test case for this scenario.
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
[Arnout: give next() a None default to return None instead of raise
StopIteration]
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
The commit [1] fixed a formatting bug with the SCP style git sites
declaration.
Add this style of link to the test case to keep a track of it.
[1] ebcfdb8b0a utils/generate-cyclonedx: fixup scp-style git sites
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
Fixes:
https://autobuild.buildroot.org/results/e6159cee14f84569c85a61f77824b2b58d68a4bc/
Libtool 2.6.x is starting to be used by upstreams when generating
release tarballs (e.g. cryptsetup-2.8.8). As LIBTOOL_PATCH_HOOK does
not know about it, ltmain.sh is left unpatched, so libtool relinks
libraries at install time and adds -L/usr/lib, which is rejected by
the toolchain wrapper:
i686-buildroot-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '-L/usr/lib'
The v2.4.4 patch no longer applies cleanly, so add a v2.6 variant,
rebased on libtool 2.6.2, and use it for 2.6.x versions.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Assisted-by: Claude:claude-opus-5
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
build and run an SQLiteCpp example to check database writes and queries.
Assisted-by: GitHub Copilot:GPT-6 Sol
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Added package for ServeStatic, version 4.3.2.
https://github.com/Archmonger/ServeStatic
Added a runtime test that verifies static-file responses through both
the WSGI and ASGI interfaces. Also verified that the installed
servestatic command-line entry point starts successfully.
Signed-off-by: Sebastian Michel <sebastian.michel@oss.othermo.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
pkg-stats columns are sorted either alphabetically or numerically. This
does not make much sense for the "Latest version" column.
This commit orders the column by whether the package is up-to-date or
not.
Signed-off-by: Franciszek Stachura <fbstachura@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This test uses the option added in the previous commits to build a
disk image with squashfs root and matching verity tree, and boots from
it. Building a kernel is necessary to get the required device-mapper
and squashfs support.
The test also serves to demonstrate usage of a verity image, more
complex setup may use an initramfs instead of dm-mod.create.
Signed-off-by: Fiona Klute (othermo GmbH) <fiona.klute@gmx.de>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Add basic tests for openscap, ensuring that it builds and runs a minimal
command with different cryptographic backends:
- libgcrypt
- libnss
- no crypto backend
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Add an infrastructure test case to verify that the per-package
<PKG>_FLAT_STACKSIZE variable correctly configures the stack size in the
generated FLAT binary header.
Signed-off-by: Fengwei Tan <tfx2001@outlook.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
The ARMv7 EABIhf toolchains can currently be selected with ARMv8 cores
selected, even when EABI is used due to how the condition is
constructed. This obviously fails as those toolchains are EABIhf,
causing the following build issue:
Incorrect ABI setting: EABI selected, but toolchain is incompatible
This is for example what happens with:
BR2_arm=y
BR2_cortex_a32=y
BR2_ARM_EABI=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_GLIBC_BLEEDING_EDGE=y
In order to address this, we adjust the script generating the Bootlin
toolchain package so that EABIhf is required for both ARMv7 and
ARMv8.
Please note that we already require BR2_arm for those toolchains, so
we are *only* talking about ARMv8 cores being used in 32-bit mode.
This will be needed to fix:
https://autobuild.buildroot.org/results/3ce1dbd480c71b782ef722c39034cb039a036523/
Reported-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Largely a bugfix release. Fixes an encryption issue if the cleartext was
exactly 8KB + N*64KB long.
https://git.sr.ht/~min/agec/refs/1.0.0
Drop now upstreamed 0001-io.c-isarmor-do-not-set-eof-for-35-byte-files.patch:
7a529662f9
Upstream renamed the agec-keygen utility to agecgen, so update the test to
match.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Regenerate the Bootlin toolchain Kconfig and test configurations using
support/scripts/gen-bootlin-toolchains.
This adds BR2_USE_MMU to the affected uClibc entries and to the
architecture support conditions, and updates the generated tests.
The glibc and musl changes only reorder their existing BR2_USE_MMU
dependencies.
Signed-off-by: Fengwei Tan <tfx2001@outlook.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
The Bootlin uClibc toolchains for m68k-68xxx, riscv32-ilp32d, and
xtensa-lx60 require an MMU. However, their generated Kconfig entries
lack a BR2_USE_MMU dependency, allowing them to be selected for noMMU
configurations. External toolchain validation then fails with:
MMU support available in C library, please enable BR2_USE_MMU
Add the missing BR2_USE_MMU dependencies for these architectures to
prevent them from being selected for noMMU targets.
Signed-off-by: Fengwei Tan <tfx2001@outlook.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Add a basic runtime test for nano. The test attempts to write a file
using the editor.
Signed-off-by: Franciszek Stachura <fbstachura@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
The mdnsd runtime test can randomly fail on slow runners.
It's hard to reproduce locally (only one failure after a few attempts)
but we can reproduce it easily by removing the while loop entirely.
It turns out that mdnsd is started by S50mdnsd before the
emulator.login() change the system date:
[BRTEST# date -s @1788032864
Sat Aug 29 19:47:44 UTC 2026
Since the minimal rootfs.cpio generated for TestMdnsd doesn't have any
ntp client installed, it start with "January 1, 1970".
The date change may cause some issue to the mdnsd daemon which blocks
any response from mquery command.
When the problem occurs, "mquery -T _http._tcp" reply is empty:
# mquery -T _http._tcp
Querying _http._tcp.local. for PTR (12) ... press Ctrl-C to stop
To workaround the issue, restart mdnsd manually.
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/16185948555
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>