Commit Graph

2106 Commits

Author SHA1 Message Date
Raphaël Mélotte
3e931caf84 support/testing: add new test for python-urllib3
Importing urllib3 already allows us to check that for example zlib can
be loaded at runtime.

For good measure, also create the PoolManager object mentioned in the
user guide ([1]), and check that we can normalize a URL like it is
done in urllib3's 'test/test_util.py'.

[1]: https://urllib3.readthedocs.io/en/stable/user-guide.html

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-04-21 17:38:11 +02:00
Julien Olivain
a9b0e551af support/testing: new hyperfine runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-04-21 16:26:05 +02:00
Julien Olivain
aaf93ba27f support/testing: new openocd runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-04-21 16:23:55 +02:00
Julien Olivain
f438ae3422 support/testing: add lighttpd runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-04-20 17:37:28 +02:00
Julien Olivain
bedc44c073 support/testing: weston: fix the weston shutdown test
Commit [1] "support/testing: improve weston test reliability" moved
out the wait time from the emulator (to run on the test controller).

While doing so, the sleep time which was initially _after_ the
"killall weston" invocation to in stop_weston() was incorrectly
moved before the command invocation. In this state, the test can
succeed on fast host computer running the test. But it will most
likely fail on an average computer.

This commit fixes this issue by moving the sleep time after
the command invocation.

[1] 6561a5d773

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-04-19 23:42:54 +02:00
Vincent Stehlé
4f7e3f0bdd support/testing: test_edk2: add a few build tests
Some EDK II configurations have complex dependencies on several packages
and additional build options; build tests help keeping track of those
more easily.

Factorize some code common to all the build tests into a new
TestEdk2BuildBase class, which defines a base configuration and a method
to assert that binaries do indeed exist after the build.

While at it, add myself in DEVELOPERS.

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Dick Olsson <hi@senzilla.io>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-04-19 18:37:41 +02:00
Yann E. MORIN
a1012b363a support/download/git: use FOO_DL_OPTS
The manual states that FOO_DL_OPTS are valid for all the different
download backends, but that is not the case: at least the git backend
does not use them (it does not fail, it just ignores them).

Accept FOO_DL_OPTS in the git backend, and pass them to 'git fetch'.
There is no way that we can pass such options to submodules or lfs,
though.

Update the manual accordingly.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-04-19 17:10:07 +02:00
Gaël PORTAY
8fd537ae05 support/scripts/gen-bootlin-toolchains: allows armv8-a CPU to use armv7-a toolchains
The ARMV7-A toolchains are capable to compile binaries for ARMv8-A CPU
in AArch32 execution state.

This adds the BR2_ARM_CPU_ARMV8A option in the 'conditions' to allow
ARMV8-A CPU such as Cortex-A53 or Cortex-A72 to use ARMV7-A toolchains.

Signed-off-by: Gaël PORTAY <gael.portay+rtone@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-04-19 16:01:53 +02:00
Marcus Hoffmann
1ae65b1fb5 package/python-tzlocal: bump to 5.3.1
Switch the test assert to use 'Europe/Berlin' instead of
'posix/Europe/Berlin'. The tz-name is an internal implementation detail
anyway and the lookup changed to prefer the stated name in /etc/timezone
again, if it matches the configured timezone via /usr/share/zoneinfo.

Ref: 4ffac9232b

Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-04-15 19:16:25 +02:00
Thomas Petazzoni
203e9def71 support/scripts/pkg-stats: add -v/--verbose option
Running pkg-stats is currently quite verbose, as it shows one line per
package when checking for the upstream URL, and another one line per
package when checking for the latest version on
release-monitoring.org.

This noisy output is a bit annoying when pkg-stats is run in a
cronjob, like we do to update https://autobuild.buildroot.net/stats/
every day. This commit adds a -v/--verbose option, off by default, to
have a less noisy output.

Suggested-by: Peter Korsgaard <peter@korsgaard.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-04-14 16:50:10 +02:00
Romain Naour
8d3b1781f6 support/download/svn: use 'svn info' whith LC_ALL=C
Use the 'C' locale when retrieving the date of the last change using
'svn info' since the svn download helper script expect
"Last Changed Date" string.

If another locale is used, the 'date' is empty so the generated
archive (by mk_tar_gz) will not match the expected hash since
the file timestamp is not set properly.

If LANG=fr_FR.UTF-8 is defined in the host system, svn print some
"French encrypted" text:

  eval svn --non-interactive --config-option servers:global:http-timeout=10 info ''\''https://svn.code.sf.net/p/xmlrpc-c/code/advanced@r3176'\'''
  ...
  Date de la dernière modification: 2023-09-02 19:13:35 +0200 (sam. 02 sept. 2023)

diffoscope confirm that the file timestamp is not set correctly
in the generated archive:

$ diffoscope NOK/libxmlrpc-r3176-svn5.tar.gz OK/libxmlrpc-r3176-svn5.tar.gz

Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-04-03 21:48:27 +02:00
Yann E. MORIN
b974c91fe4 package/pkg-golang: support _SUBDIR
Some packages have their actual source tree in a sub-directory (even if
that is the only source in the repository); this is the case for example
with the Amazon ECR credential helper (to be packaged in a follow up
commit):
    https://github.com/awslabs/amazon-ecr-credential-helper

Do the build in _SUBDIR, and also do the vendoring in there.

We don't need the build to generate executables inside _SUBDIR, so we
just keep using $(@D)/bin as a place to generate them (and install them
from).

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Christian Stewart <christian@aperture.us>
Reviewed-by: Christian Stewart <christian@aperture.us>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-03-29 16:55:32 +01:00
Julien Olivain
356c70677c support/testing: test_gstreamer1: fix test by using bootlin toolchain
Since Buildroot commit [1], the test_gstreamer1 runtime test is
failing to build the tesseract-ocr package. The root cause is that
the test uses the default arm external toolchain, which is the Linaro
ARM 2018.05 based on gcc 7.3.1.

Since [1], tesseract-orc no longer compiles with gcc 7 (it requires at
least gcc 8).

This commit fixes the issue by switching the toolchain to the
bootlin versions (based on gcc 14 at the time of this commit).

Also, changing the compiler version slightly slowed down the video
encoding. This commit also increases the encoding command timeout.

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

[1] f32da8b984

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2025-03-25 21:39:51 +01:00
Julien Olivain
24efb23a10 support/testing: add git runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-03-25 19:34:58 +01:00
Alex Bennée
bfb490799e support/testing: make time setting portable
The busybox date applet accepts the following:

  date @1234567

but this confuses the coreutils version which doesn't implicitly set
time. As some tests might need coreutils binaries we should ensure the
emulator login will work with both. Fix this by passing the -s (set)
option to the command.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-03-24 22:35:13 +01:00
Marcus Hoffmann
6ca1ee306a package/python-tzlocal: new package
Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-03-22 16:25:02 +01:00
Sébastien Szymanski
d65c10c20a support/kconfig: handle backspace (^H) key
This is in the mainline kernel since v5.1-rc3:
9c38f1f04408 ("kconfig/[mn]conf: handle backspace (^H) key")

Quoting the commit's log:

"
Backspace is not working on some terminal emulators which do not send the
key code defined by terminfo. Terminals either send '^H' (8) or '^?' (127).
But currently only '^?' is handled. Let's also handle '^H' for those
terminals.
"

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-03-19 20:46:36 +01:00
Peter Korsgaard
781987d67e Merge branch 'next' 2025-03-18 15:41:43 +01:00
Peter Korsgaard
aa2d7ca53f Update for 2025.02
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-03-17 18:54:20 +01:00
Yann E. MORIN
3a2baca4b7 system/skeleton: move target of /etc/resolv.conf symlink
In commit ba70f94e62 (subversion makes it so we do not need a separate
tarball to store empty directories and symlinks for the target_skeleton.)
/etc/resolv.conf was made a symlink to ../tmp/resolv.conf. There was no
rationale behind this change, but back at the time (2006!), the only
location that Buildroot guaranteed to be writable was /tmp, and we
needed a writable location to create resolv.conf from a DHCP reply for
example, so the change made sense.

Commits 2f67d9e2fe (preparation for BR2_PACKAGE_BUSYBOX_SKELETON), in
2007, then d9119c0bc5 (move default skeleton to fs/ and drop busybox
skeleton), in 2010, and finally 6c3e3ad419 (New top-level directory:
system), in 2012, propagated that /etc/resolv.conf without any change in
the target of the symlink.

However, since commit d380dde1d2 (skeleton: make /run a proper
directory/filesystem), in 2015, a tmpfs has been mounted on /run, so it
is now guaranteed to be writable as well for SYS-V-based systems. That
has also been the case for openrc since commit a840e485d1
(package/skeleton-init-openrc: new package), in 2019. This has also
always been the case for systemd as well.

resolv.conf is not a temporary file [0]; it is really more of a runtime
data; its location in /tmp is just a historical artefact of a long-wrong
assertion.

Nowadays, distributions either have an actual file as /etc/resolv.conf
(when /etc is writable), or it is a symlink to a location below /run.

Although resolv.conf is used by the C library resolver, a lot of
applications now will directly use it; this is the case for some
container management tools, such as podman (and its helpers, like
netavark), that expect /etc/resolv.conf to either be a file or a symlink
to somewhere in /run, and fail to provide DNS services if that is not
the case.

So, we move the target of /etc/resolv.conf to ../run/resolv.conf.

As a consequence, we can drop the workaround in podman's runtime test.

To be noted: there are tow custom fstab files in Buildroot that do not
explicitly mount a tmpfs on /run:
  - one for a systemd runtime test, so /run would also be a tmpfs there
    anyway, as systemd does mount one;
  - one for the mender_x86_64_efi_defconfig; that's a not a problem:
    / is an ext4 that is mounted r/w (and /tmp is not a tmpfs either, so
    the symlink to /tmp would not not have worked if / was not r/w
    anyway).

This leaves people with their own fstab, to adapt. Cater to them by
adding a little blurb in the documentation.

Note: the following 43 tests all built and ran successfully:
    tests.init
    tests.package.test_apache
    tests.package.test_docker_compose
    tests.package.test_dropbear
    tests.package.test_iputils
    tests.package.test_podman
    tests.package.test_skopeo
    tests.package.test_wget

(no other runtime test were attempted)

[0] temporary, as in relatively short-lived.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-03-15 22:23:59 +01:00
Yann E. MORIN
54f79d804f package/podman: add option to use passt as network backend
passt/pasta is the officially supported network backend, with slirp4netns
only considered a legacy solution. However, some people have experienced
corner cases when using passt/pasta (as it still is a young stack), so we
do not want to do a blanket replace of slirp4netns just yet. Still, we
make passt/pasta the default option.

As a consequence, the existing runtime tests will now test passt/pasta,
so we introduce two new tests for slirp4netns as a network backend.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-03-15 22:23:23 +01:00
Yann E. MORIN
b36475315b package/aardvark-dns: new package
aardvark-dns is needed by netavark to provide cross-container DNS
resolving with Podman.

It is to be noted that netavark and aardvark-dns have to be updated in
lock-step [0].

Update the podman runtime test to validate this is working.

[0] https://github.com/containers/podman/blob/main/DISTRO_PACKAGE.md#networking-tools-netavark-aardvark-dns-passt

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-03-15 22:21:58 +01:00
Yann E. MORIN
ebbaac08e3 package/podman: new package
Podman is a container manager not unlike Docker, but is daemon-less.

Similarly to docker-engine, quite a few kernel config options are
required; as they are very similar in goals and features, the options
from docker-engine have been duplicated for podman. As that was not
enough, a few additional options have been added after trial-and-error
testing (they are not explicitly listed in the documentation).

The documentation [0] states that seccomp can be disabled (i.e. not
enabled). However, without seccomp support, starting containers requires
--security-opt=seccomp=unconfined to be specified; it does not look
trivial to make that the default, though [1]. Furthermore, containers
are about security, so disabling a security measure does not sound too
good. So we make seccomp support mandatory.

Podman needs netavark as a the network backend (it missing is a hard
error at runtime). It is supposed to also require aardvark-dns, an
authoritative DNS resolver, but it missing does not look to adversely
affect networking, so it is not used (as not even packaged in Buildroot
yet).

Podman can run either as the root user, or it can run rootless, i.e. by
a non-root user, which requires a bit of setup (see below, in the
runtime test) and a few other dependencies: slirp4netns [2] (to provide
network connectivity in userland), and support for subordinate UIDs and
GIDs with the shadow library. Rootless mode is one of the main selling
point for podman, so we decided that this would not be configurable in
Buildroot.

Similar to Docker, podman can inject a minimalist init as PID1 in
containers, and like Docker, this is optional; podman however by default
uses catatonit as such an init [3]. As for Docker-engine, we offer a
choice of which init package to use to provide podman-init.

Podman requires at least three config files; they can be either per-user
or system-wide:
  - containers.conf [4]: defines various settings for the container
    runtimes;
  - policy.json [5]: defines what signature to accept to validate
    images; without one such file, podman just refuses to pull images;
  - registries.conf [6]: defines where to pull images from; without it,
    podman does not know how to pull un-qualified images (i.e. images
    where the registry is not specified in the path, and which Docker
    would fetch from the Docker Hub, e.g. "busybox:latest").

For those three files, we provide a very minimal default that (in the
same order as above):
  - uses the slirp4netns network backend for rootless operation (the
    default in podman is to use pasta [1], so we need to explicitly
    configure it to use slirp4netns);
  - allows pulling images which signature can't be verified;
  - pulls unqualified images from the Docker Hub, as is traditional.

Providing actual files is going to be use-case dependent, and interested
parties will have to provide their own config files, e.g. in a rootfs
overlay.

Finally, we add a runtime test for podman. Podman is a huge binary, and
may call other huge binaries (netavark...); this can be quite slow in
the emulated machine (even when running on a very fast host machine), so
we use a huge timeout for all commands involving podman, even those that
exit the containers, as that may need to tear down podman setup.

The default kernel used in runtime tests is missing a lot of features,
so we need to build our own; we use the same version as the bundled
kernel. We can't use cpio either, because we need a filesystem that can
be used as a lower and upper of overlayfs, which is not possible with
the filesystem the cpio is extracted into; ext2 fits the bill, so we use
that. We need a bit of space to store images and stuff, so let's be
generous and allocate 256M.

To test rootless operation, we need a non-root user that has some
special setup [7]; it is easier to run the commands from the infra
rather than carry a user-definition table and a rootfs overlay. We need
that user to have the same prompts (main and continuation) so that the
REPLWrapper still detects those; it has the unfortunate side effect that
it is not immediately obvious whether a command was run as root or not,
and one has to look back up in the run-log to see whether there was a
transition to another user earlier.

Still for rootless containers, podman/netavark expect /etc/resolv.conf
to be either a plain file, or a symlink that points either deeper in
/etc or anywhere in /run; if resolv.conf resolves to any other location,
DNS in rootless containers does not work. This is reasonable, and is
what already happens on a systemd-based system (and thus all major
distributions nowadays. However, in Buildroot, we put the actual file in
/tmp; this is historical, and dates back to the days where Buildroot did
not have a guaranteed-writable /run. So, we work around this limitation
in the test (for now).

The official busybox image on the Docker Hub supports a lot of
architectures, of which armv7 which we use for this runtime test.
Finding a small image that also supports armv7 on other registries was
a bit of a challenge; we eventually found one busybox image on quay.io,
but it is not an official busybox image; still, it fits the bill, so we
use it.

There is no runtime test with systemd, as this requires quite some
additional setup that does not look very trivial to do; when it detects
it is running under systemd in rootless mode, podman expects that a full
user session exists, or it whines about it every time it is started,
reverting to non-systemd behaviour; getting a full user session does not
look to be that trivial (PAM?), so this would not exercise the actual
integration with systemd, so the test would not be meaningful, so it is
not provided. This is left as an exercise to an interested party to
extend the tests.

PS: Hat-tip to Raphael, who provided some pointers and hints on this
change, especially for rootless mode. Thanks! 👍

[0] https://podman.io/docs/installation#get-source-code
[1] it looks like we can provide a custom seccomp profile, by specifying
seccomp_profile="PATH" in containers.conf; that would still require
seccomp support to use that file, though, so that does not change the
outcome.
[2] it is possible to use another backend, but it is not packaged in
in Buildroot yet: https://passt.top/passt/about/#pasta-pack-a-subtle-tap-abstraction
[3] podman expects a 'catatonit' helper in /usr/libexec/podman, so even
if tini would be usable instead, it would not feel right to use it to
impersonate catatonit. So let's assume that only catatonit is supported.
[4] https://github.com/containers/common/blob/main/docs/containers.conf.5.md
[5] https://github.com/containers/image/blob/main/docs/containers-policy.json.5.md
[6] https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md
[7] https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Raphael Pavlidis <raphael.pavlidis@gmail.com>
Cc: Christian Stewart <christian@aperture.us>
Cc: Julien Olivain <ju.o@free.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-03-15 22:19:29 +01:00
Yann E. MORIN
5c77357c58 package/skopeo: add target variant
Skopeo can be used to manipulate container images, and so can be useful
on target devices that are going to be used as a host to run containers.

So, add a target variant for skopeo.

... with a runtime test while at it.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Christian Stewart <christian@aperture.us>
Cc: Yann E. MORIN <yann.morin@orange.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-03-15 22:09:10 +01:00
Yann E. MORIN
cf8641b73e support/testing: set date in emulated machine
When time comes to check certificates, the date and time in the emulated
machine should be close enough to the actual values, so that certificate
validity can be checked.

Some Qemu machines have an RTC (e.g. arm vexpress-a9 has a pl031), and
the kernel needs a driver for those RTC. It is not guaranteed that the
machine used for a test meets those two conditions; in such a case, the
time in the machine starts way back in the past (1970-01-01T00:00:00Z on
sysv, or the release date of systemd). This is the case with the default
kernel, so such tests do not have the proper time.

Set the date to the date of the host system. This is going to be accurate
to the second, which is, by far, enough for our purpose.

To avoid having to consider what combination of emulated machine and kernel
configuration are being used, we always set the date, as this is a
generic step that should be done by the infra (like login in as root is).

The Emulator() class doesn't inherit from unittest.TestCase, so we can't
call any of the usual self.assertXXX() methods; instead, we just raise
a standard exception, like is done a few lines above to detect the login
prompt.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-03-15 21:57:45 +01:00
Fiona Klute (WIWA)
ec2735686a support/testing: fix MyPy warnings about BRConfigTest
This removes warnings in editors/IDEs with MyPy typechecking
integration. Test classes override "config" with strings (different
type than None).

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-02-28 21:11:01 +01:00
Fiona Klute (WIWA)
1b9bba8599 support/testing: include init script in iptables test
Check a save/start/stop cycle based on the rules created by direct
commands in the pre-existing test.

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-02-28 21:10:58 +01:00
Fiona Klute (WIWA)
1af307504a support/testing: test for nftables init script
The new test checks that a pre-defined rules file can be loaded and
works as expected, and that after flushing the blocked IP responds to
ping again.

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-02-28 21:10:54 +01:00
Peter Korsgaard
eae53ae0f4 Update for 2024.11.2
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 2287e900c4)
[Peter: drop Makefile change]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-21 15:52:13 +01:00
Peter Korsgaard
882d0129ca support/docker/apt-sources.list: move to 20250218 snapshot
With the TARGETPLATFORM fix we need to rebuild the container so move to the
latest snapshot to get updated (security) fixes.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-20 20:15:44 +01:00
Peter Korsgaard
9f7fb95286 support/docker/Dockerfile: fix typo in tar configure options
Commit 12e9fc1da5 ("support/docker: add tar 1.35") added logic to download
and build tar for the host, but mistyped a configure option:

configure: WARNING: unrecognized options: --disable-year2028

Fix that.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-20 20:15:15 +01:00
Peter Korsgaard
ea30149c13 support/docker/Dockerfile: unbreak 32bit support for x86-64
Fixes ttps://gitlab.com/buildroot.org/buildroot/-/jobs/9153298207

Commit 3bc94471ca ("support/docker: prepare for Aarch64 Docker images")
reworked the Dockerfile to only add the 32bit support when building for
x86-64, but it forgot to add a TARGETPLATFORM argument so the conditionals
never triggers.

Fix it by adding a TARGETPLATFORM argument as explained here:
https://forums.docker.com/t/build-multi-arch-images-with-different-commands-per-architecture-in-docker-file/134795

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-20 20:15:02 +01:00
Vincent Fazio
9bc3bbce38 support/testing: test_python_{gnupg, spake2}: increase timeout value
Previously, these tests had the potential for timing out with the
default 5 second timeout value if initializing /dev/urandom took too
long.

Now the tests use a 10 second timeout value.

Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-02-16 12:13:44 +01:00
Vincent Fazio
41b08a779b support/testing: test_python_txaio: include twisted sample
Prior to b7d251293a, txaio would test both asyncio and twisted.

Add back the twisted sample and include the twisted package in the
config so both modes of the package are tested.

Fixes: b7d251293a ("package/python-txaio: drop python 2 support")
Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-02-16 12:05:11 +01:00
Peter Korsgaard
03b0379426 support/docker/Dockerfile: use correct ENV syntax
buildx correctly complains about our ENV lines:

3 warnings found (use docker --debug to expand):
- LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 21)
- LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 94)
- LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 95)

The ENV syntax is defined as ENV FOO=BAR, not ENV FOO BAR, so adjust the
Dockerfile to match to get rid of this warning.

https://docs.docker.com/reference/dockerfile/#env

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-12 11:24:30 +01:00
Romain Naour
3bc94471ca support/docker: prepare for Aarch64 Docker images
With the new 'buildx' command using 'BuildKit' since Docker 23.0 [1],
it become easy to build the same image for several architectures [2].
The only requirement is to use a Dockerfile without any architecture
specific definition.

Since our current Dockefile contains already some i386 specific
packages (g++-multilib,libc6:i386) to provide x86 32bits support,
we have to install them conditionally.

Update the build process described in the Dockerfile accordingly.

For now, Aarch64 hosts can't be used by the Buildroot testsuite (yet)
since the Bootlin external toolchain (used by default) currently only
support x86_64 hosts.

[1] https://docs.docker.com/engine/release-notes/23.0/
[2] https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/
[3] https://www.docker.com/blog/multi-arch-build-what-about-gitlab-ci/

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-12 11:08:19 +01:00
Peter Korsgaard
12e9fc1da5 support/docker: add tar 1.35
Since commit b11956fb66 ("support/dependencies: require tar >= 1.35"),
Buildroot will build host-tar if the host does not have >= 1.35 available,
so add it to the container to save build time.

Debian 12 only provides tar 1.34.  Tar 1.35 is available in testing - But
that then depends on a newer glibc, so instead build it from source using
the --disable-year2038 flag like we do for host-tar and install it into
/usr/local/bin so it shadows the Debian one.

This step runs as root (and needs to for make install), so add
FORCE_UNSAFE_CONFIGURE=1 as otherwise the configure script errors out.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-09 22:18:29 +01:00
Peter Korsgaard
f3e7e28979 support/docker: add curl
Commit afece24a72 ("support/download: introduce curl backend for FTP
transfers") added curl download support, so add it to the container as well.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-09 22:18:28 +01:00
Peter Korsgaard
c95d5b8e1e support/docker: move to current bookworm (Debian 12) snapshot
Debian 11 is out of security support since 15 August 2024, so move to
current Debian 12 instead.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-09 22:18:28 +01:00
Romain Naour
0100c6e402 support/scripts/mkusers: fix shellcheck error related to auto_id
SC2086 is now reported for auto_id since shellcheck 0.9.0:

In support/scripts/mkusers line 453:
                add_one_group "${g}" ${auto_id}
                                     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

So quote it to get rid of this error.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
[Peter: quote variable instead of disabling check]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-09 15:20:41 +01:00
Romain Naour
13deac1e39 support/download/{curl, cvs, git, svn}: disable new shellcheck 0.9.0 errors
As for SC1090 and SC2016 [1], disable SC1091 and SC2294 too since they
are now reported by shellcheck 0.9.0:

In support/download/curl line 42:
    eval ${CURL} "${@}"
                  ^--^ SC2294 (warning): eval negates the benefit of arrays. Drop eval to preserve whitespace/symbols (or eval as string).

[1] bcee3ca6d6

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-09 15:17:46 +01:00
Romain Naour
ef15efdd2c support/testing/tests/package: sample_python_*: fix flake8 errors
flake8 5.0.4 provided by Debian 12 (bookworm) now detect a missing
whitespace after 'assert' keyword:

  E275 missing whitespace after keyword

Signed-off-by: Romain Naour <romain.naour@smile.fr>
[Peter: fix subject, drop extra paranthesises]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-09 11:10:21 +01:00
Romain Naour
f26dfdc842 support/docker: add flake8 command
When check-package fail due to flake8 coding style checks, it suggest
to use flake8 command line:

  run 'flake8' and fix the warnings

But flake8 is actually missing from the container used by
utils/docker-run, so add it to the container as well.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-09 11:07:03 +01:00
Thomas Petazzoni
edb4d9724b toolchain/toolchain-external/toolchain-external-bootlin: drop Microblaze/bleeding-edge
GCC 14.x has a significant bug where libatomic lacks some important
functions, causing the toolchain to be pretty much
unusable. Therefore, let's drop this toolchain entirely from our
listing for now.

See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118280 for more
details.

Fixes:

  http://autobuild.buildroot.net/results/dd081ca3c5746b980b0bcdf1f12b1a26c6b7ef86/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-02-08 21:38:47 +01:00
Julien Olivain
b0ff88423f support/testing: fix test_atf by bumping atf to 2.11
Since commit [1], test_atf is failing. See [2].

Passing -no-pie to ld does not produce the bl31.elf file (and does not
generate an error). TF-A 2.11 reworked its makefiles and switched to
gcc to link files. This commit fixes this failing test by updating to
this newer TF-A version.

Fixes: [2].

[1] 248c2d045e
[2] https://gitlab.com/buildroot.org/buildroot/-/jobs/8609307891

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2025-02-05 13:05:22 +01:00
Thomas Petazzoni
824c660c75 support/testing/tests/package/test_python_waitress: rework assertion
Like Yann E. Morin did for
support/testing/tests/package/test_python_django.py, adjust the logic
to avoid the weird "self.assertTrue(False, ...)" construct, and
instead test exit_code after the loop.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-02-05 11:19:27 +01:00
Marcus Hoffmann
1d4a61247d package/python-waitress: new package
The test runs the flask sample app through the waitress wsgi server
instead of the flask development server.

Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-02-05 11:14:30 +01:00
Francois Perrad
48bce6ad8f package/lynis: new package
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-02-04 17:33:36 +01:00
Thomas Petazzoni
3ea79058c0 support/testing/tests: new NetworkManager/GOI test
This test is inspired from the details provided by Fiona Klute's cover
letter for a GOI/glib bump series at:

  https://lore.kernel.org/buildroot/20250120211707.2381182-1-fiona.klute@gmx.de/

Which itself uses the example code at:

  https://networkmanager.dev/docs/developers/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-02-04 16:16:16 +01:00
Thomas Petazzoni
91e51e2679 support/testing/tests/package/test_python_sdbus_networkmanager: use more recent toolchain
Since the bump of NetworkManager to 1.50.0 in Buildroot commit
489d1f9249, the
tests.package.test_python_sdbus_networkmanager.TestPythonPy3SdbusNetworkmanager
is failing to build as NM >= 1.50.0 needs headers >= 4.20.

We fix this test by using a newer toolchain. This means we can't use
anymore the basic toolchain config, so we use a fully specific
defconfig for this test.

Fixes:

  https://gitlab.com/buildroot.org/buildroot/-/jobs/9019173666

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-02-04 16:16:09 +01:00