Commit Graph

16 Commits

Author SHA1 Message Date
Lukáš Doktor
7e11489daf
ci: shellcheck - collection of fixes
manual fixes of various issues.

Related to: #10951

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
2025-03-19 12:26:23 +01:00
Lukáš Doktor
154a4ddc00
ci: shellcheck SC2292
SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh. This might
result in different handling of globs and some ops which we don't use.

Related to: #10951

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
2025-03-19 12:26:03 +01:00
Lukáš Doktor
667e26036c
ci: shellcheck SC2250
Treat the SC2250 require-variable-braces in CI. There are no functional
changes.

Related to: #10951

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
2025-03-19 12:25:44 +01:00
Gabriela Cervantes
096f32cc52 ci: Fix indentation of install libseccomp script
This PR fixes the indentation of the install libseccomp script.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-09-17 16:38:53 +00:00
Beraldo Leal
c99ba42d62 deps: bumping yq to v4.40.7
Since yq frequently updates, let's upgrade to a version from February to
bypass potential issues with versions 4.41-4.43 for now. We can always
upgrade to the newest version if necessary.

Fixes #9354
Depends-on:github.com/kata-containers/tests#5818

Signed-off-by: Beraldo Leal <bleal@redhat.com>
2024-05-31 13:28:34 -04:00
Fabiano Fidêncio
1d32410a83 ci: install_libseccomp: Do not depend on the tests repo
It makes things way simpler, waaaaay simpler.

Fixes: #7974 -- part 0

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-09-16 12:52:49 +02:00
Jianyong Wu
35d6d86ab5 static-build: enable cross-build for image build
It's too long a time to cross build agent based on docker buildx, thus
we cross build rootfs based on a container with cross compile toolchain
of gcc and rust with musl libc. Then we get fast build just like native
build.

rootfs initrd cross build is disabled as no cross compile tolchain for
rust with musl lib if found for alpine and based on docker buildx takes
too long a time.

Fixes: #6557
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2023-08-01 23:28:52 +02:00
Manabu Sugimoto
92f7d6bf8f ci: Use versions.yaml for the libseccomp
It would be nice to use `versions.yaml` for the maintainability.
Previously, we have been specified the `libseccomp` and the `gperf` version
directly in this script without using the `versions.yaml` because the current
snap workflow is incomplete and fails.
This is because snap CI environment does not have kata-cotnainers repository
under ${GOPATH}. To avoid the failure, the `rootfs.sh` extracts the libseccomp
version and url in advance and pass them to the `install_libseccomp.sh` as
environment variables.

Fixes: #4941

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2022-08-19 09:05:08 +09:00
Manabu Sugimoto
78231a36e4 ci: Update libseccomp version
Updates the libseccomp version that is being used in the Kata CI.

Fixes: #4858, #4939

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2022-08-17 15:39:22 +09:00
Jakob Naucke
df511bf179
packaging: Enable cross-building agent
Requires setting ARCH and CC.

- Add CC linker option for building agent.
- Set host for building libseccomp.

Fixes: #3681
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2022-03-07 11:58:46 +01:00
Sebastian Hasler
adffd3f8b6 scripts: Use shebang /usr/bin/env bash
Not all distros have `/bin/bash`, e.g. NixOS.

Fixes: #3450

Signed-off-by: Sebastian Hasler <sebastian.hasler@stuvus.uni-stuttgart.de>
2022-01-13 22:53:28 +01:00
James O. D. Hunt
7f54674834 CI: Revert "CI: Switch to a mirror as gnu.org is down"
This reverts commit 321995b7df.

Now that gnu.org is back online, we don't need to use a mirror.

Fixes: #3313.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-01-11 09:22:58 +00:00
James O. D. Hunt
321995b7df CI: Switch to a mirror as gnu.org is down
All CI jobs are failing as www.gnu.org is down, so switch to a mirror
for the time being.

Fixes: #3314.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-12-20 11:22:56 +00:00
Wainer dos Santos Moschetta
9b270d72d1 ci/install_libseccomp: use a temporary work directory
It is safer to download the tarballs and work on a temporary directory
which can be proper cleaned up when the script finishes.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-10-29 13:00:27 -03:00
Wainer dos Santos Moschetta
98b4406196 ci/install_libseccomp: Fix fail when DESTDIR is set
If DESTDIR is set on the environment then gperf will be installed
in an unexpected directory, resulting on the libseccomp's configure
not being able to find it. To avoid that issue this changed the
ci/install_libseccomp.sh so that PREFIX and DESTDIR are unset
inside the script.

Fixes #2932
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-10-29 12:58:09 -03:00
Manabu Sugimoto
a3647e3486 osbuilder: Set up libseccomp library
The osbuilder needs to set up libseccomp library to build the kata-agent
because the kata-agent supports seccomp currently.
The library is built from the sources to create a static library for musl libc.
In addition, environment variables for the libseccomp crate are set to
link the library statically.

Fixes: #1476

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2021-10-27 19:06:13 +09:00