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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Updating directly to 4.x is too difficult and complex, as mender 4.x is
a complete rewrite in C++, with several new dependencies and changes.
As such, update to the last version that was written in Go, which is
3.5.3. The following changes are necessary:
The artifact_info file is no longer supported. Instead, mender now expects a
bootstrap.mender artifact created by mender-artifact /var/lib/mender.
See the following for more information:
https://northerntech.atlassian.net/browse/MEN-2585https://northerntech.atlassian.net/browse/MEN-2583https://docs.mender.io/release-information/release-notes-changelog/mender-client#mender-3-5-0-1https://github.com/mendersoftware/mender/blob/3.5.3/Documentation/automatic-bootstrap-artifact.md
- Remove all instances of creating or copying an artifact_info file
from board examples and package/mender.
- Add a generate_mender_bootstrap_artifact method to
board/mender/x86_64/post-image-efi.sh which creates a proper
bootstrap.mender file and places it in the data partition.
- Add a post-build.sh script to support/testing/tests/package/test_mender
with the same generate_mender_bootstrap_artifact method with one change:
As the rootfs.ext4 file is not yet created; we omit the optional
--provides "rootfs-image.checksum:${img_checksum}" argument when
generating the bootstrap.mender file.
Mender expects the device_type file to exist in /var/lib/mender/device_type.
This is further supported by the following line in tests/Dockerfile.daemon:
`echo device_type=docker-client > /var/lib/mender/device_type`
Add a migration section in docs/manual/migrating.adoc
Update the package/mender/readme.txt to include a quick mention of the
bootstrap.mender artifact change.
License changes:
New:
vendor/github.com/klauspost/compress/internal/snapref/LICENSE (BSD-3-Clause)
vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt (MIT)
Removed:
vendor/github.com/klauspost/compress/internal/snapref/LICENSE
vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt
Modified:
LICENSE: Update year from 2022 to 2024
LIC_FILES_CHKSUM.sha256: Sum of all Licenses changed
vendor/github.com/mendersoftware/mender-artifact/LICENSE
- Update year from 2022 to 2023
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
[Arnout:
- fix LIC_FILES_CHKSUM.sha256 hash
- Better URL for bootstrap artifact doc
- Migrate to 2025.02 instead of 2024.11
- Improve migrating text (editorial changes)
]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
- Move the check for /var/run/mender.pid to before self.run_mender_test()
for the two tests using sysvinit.
- Instead of checking for /var/run/mender.pid during the systemd test,
check to ensure "systemctl is-active mender-client" returns "active"
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
[Arnout: fix flake8 issue]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
Revision 0 is very old and misses a number of features. From man mkfs.ext2:
Set the file system revision for the new file system. Note that 1.2
kernels only support revision 0 file systems. The default is to create
revision 1 file systems.
We are unlikely to have a lot of Linux 1.2.x users, so drop support for it.
As revision 1 is the default, drop the -E revision argument to mkfs.ext2 for
simplicity.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Rather than fork+exec:ing a whole bash process for every file of
interest, split up the work into ${PARALLEL_JOBS} separate file lists,
and then fork off a single worker per list.
Since workers now run in a fork, we also don't have to re-parse the
arguments on every call to patch_file().
In the worker, we also add a low-overhead check for the ELF magic,
which allows us to skip all non-ELFs without having to fork off
additional processes. In the event that we encounter an invalid ELF,
that is still taken care of by the existing exitcode-test in
patch_file().
On a 4-core/8-thread box, this cuts down the time it takes to fix the
RPATHS in the host directory from around 25s to 1.5s.
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
[Peter: fix shellcheck issues]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The commit 6889056f1e (support/scripts/genimage.sh) adds support for
creating bmap images.
Since then, the script genimage.sh looses the error returned by the
genimage command.
As a consequence, the target-finalize target looses the error as well,
and so on up to make.
This adds the shell option -e to exit immediately if a command ends with
an error, so the error is not ignored.
Fixes:
gportay@archlinux ~/src/rtone-br2-external $ make
(...)
>>> Executing post-image script support/scripts/genimage.sh
INFO: cmd: "mkdir -p "/home/gportay/src/rtone-br2-external/output/build/genimage.tmp"" (stderr):
INFO: cmd: "rm -rf "/home/gportay/src/rtone-br2-external/output/build/genimage.tmp"/*" (stderr):
INFO: cmd: "mkdir -p "/home/gportay/src/rtone-br2-external/output/build/genimage.tmp"" (stderr):
INFO: cmd: "cp -a "/tmp/tmp.EclKGwtA4R" "/home/gportay/src/rtone-br2-external/output/build/genimage.tmp/root"" (stderr):
INFO: cmd: "mkdir -p "/home/gportay/src/rtone-br2-external/output/images"" (stderr):
INFO: vfat(efi-part.vfat): cmd: "mkdosfs '/home/gportay/src/rtone-br2-external/output/images/efi-part.vfat'" (stderr):
INFO: vfat(efi-part.vfat): adding file 'efi-part/EFI' as 'EFI' ...
INFO: vfat(efi-part.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -sp -i '/home/gportay/src/rtone-br2-external/output/images/efi-part.vfat' '/home/gportay/src/rtone-br2-external/output/images/efi-part/EFI' '::EFI'" (stderr):
Disk full
INFO: vfat(efi-part.vfat): cmd: "rm -f "/home/gportay/src/rtone-br2-external/output/images/efi-part.vfat"" (stderr):
ERROR: vfat(efi-part.vfat): failed to generate efi-part.vfat
INFO: cmd: "rm -rf "/home/gportay/src/rtone-br2-external/output/build/genimage.tmp/"" (stderr):
make[1]: Leaving directory '/home/gportay/src/rtone-br2-external/buildroot'
gportay@archlinux ~/src/rtone-br2-external $ echo $?
0
Signed-off-by: Gaël PORTAY <gael.portay+rtone@gmail.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Current test runs a Xen hypervisor and a Linux dom0, from which we can
detect that we run under Xen but not much more. Indeed, with current
test's setup the Xen tools are not functional.
We add back networking to our stripped-down kernel config to repair Xen
tools.
With Xen tools functionals, we can enhance the test with the creation of
a VM. To be able to use the rootfs that we build in both the dom0 and in
this new dom1, we switch to an initramfs; no more rootfs partition in
the image. After stripping the ramdisk a bit we can even reduce Qemu's
memory to 1 GB.
Suggested-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Previously, ZFS tests were limited to x86-64 due to lack of cross-platform support.
However, upstream efforts have improved cross-platform compatibility.
Update the ZFS test platform from x86-64 to aarch64, aligning it with other tests.
Signed-off-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
The previous version, Linux 5.15.35, is outdated.
Upgrade to the latest LTS release.
Signed-off-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Since commit d10d22221f (utils/get-developers: read patch from stdin
when it's not a tty), get-developers accepts to read a patch fromn its
stdin when it is not a tty.
Add a test for this.
Reported-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
get-developers will check its stdin to decide whether it is a tty or
not, and behave differently whether it is or not. So, when we run the
tests, we need an actual tty.
However, when running in a CI pipeline, like on Gitlab-CI, there is no
tty available on stdin.
Fake one. We don't need anything too fancy, so just a slave pty will
suffice.
Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/8830671800
Fixes: d10d22221f (utils/get-developers: read patch from stdin when
it's not a tty)
Reported-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
We are going to remove nios2 support, so remove the Bootlin nios2
external toolchain.
Remove this toolchain from the Buildroot testsuite.
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Nios2 will be removed from Buildroot, so Bootlin toolchains will
no longer provide nios2 toolchain in further releases.
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Since commit 9c0c7846cd (support/dependencies: don't check for python
on the host), we no longer check for a host python interpreter installed
on the system.
Drop the comment in support/dependencies/check-host-python3.sh, as it is
now confusing.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
parser.error() reports a nice error message, that also displays a short
reminder of the available options.
Adapt the test-suite accordingly: previously, the error string was an
exact string in the stdout list, while it now is a substring in one of
the strings in stderr. The exit code changes, too.
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Julien Olivain <ju.o@free.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Remove the download fix introduced by [1] now the edk2 git repository
has been fixed in version stable202411 [2].
[1] 47fc9e5509.
[2] 95d8a1c255
Cc: Julien Olivain <ju.o@free.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>