Commit Graph

12 Commits

Author SHA1 Message Date
stevenhorsman
1cf1a332a5 packaging: virtiofsd: Allow building a specific commit
#10714 added support for building a specific commit,
but due to the clone only having `--depth=1`, we can only
reset to a commit if it's the latest on the `main` branch,
otherwise we will get:
```
+ git clone --depth 1 --branch main https://gitlab.com/virtio-fs/virtiofsd virtiofsd
Cloning into 'virtiofsd'...
warning: redirecting to https://gitlab.com/virtio-fs/virtiofsd.git/
+ pushd virtiofsd
+ git reset --hard cecc61bca981ab42aae6ec490dfd59965e79025e
...
fatal: Could not parse object 'cecc61bca981ab42aae6ec490dfd59965e79025e'.
```

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-01-31 11:24:23 +00:00
Fabiano Fidêncio
0af3536328 packaging: virtiofsd: Allow building a specific commit
Right now we've been only building releases from virtiofsd, but we'll
need to pin a specific commit till v1.14.0 is out, thus let's add the
needed machinery to do so.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2025-01-08 14:07:34 +01:00
Zvonko Kaiser
4a455bf24a ci: virtiofsd no sudo
build virtiofsd without sudo docker this is not needed. This is part 8 of N

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2024-05-28 14:19:58 +00:00
Jianyong Wu
2205fb9d05 static-build: enable cross build for virtiofsd
Based on messense/rust-musl-cross which offer cross build musl lib
environment to cross compile virtiofsd.

Fixes: #6557
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2023-08-01 22:10:46 +02:00
Amulyam24
856ab66871 virtiofsd: fix the build on ppc64le
link-self-contained is not supported on ppc64le rust target.
Hence, do not pass it while building virtiofsd.

Fixes: #6195

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2023-02-02 13:59:12 +05:30
Gabriela Cervantes
8be0817305 tools: Fix indentation of build static virtiofsd script
This Pr removes single spaces and fix the indentation of the script.

Fixes #5630

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-11-09 17:09:13 +00:00
Hyounggyu Choi
43fcb8fd09 virtiofsd: Not use "link-self-contained=yes" on s390x
The compile option link-self-contained=yes asks rustc to use
C library startup object files that come with the compiler,
which are not available on the target s390x-unknown-linux-gnu.
A build does not contain any startup files leading to a
broken executable entry point (causing segmentation fault).

Fixes: #5522

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2022-10-26 23:43:22 +02:00
Fabiano Fidêncio
7e5941c578 virtiofsd: Build inside a container
When moving to building the CI artefacts using the kata-deploy scripts,
we've noticed that the build would fail on any machine where the tarball
wasn't officially provided.

This happens as rust is missing from the 1st layer container.  However,
it's a very common practice to leave the 1st layer container with the
minimum possible dependencies and install whatever is needed for
building a specific component in a 2nd layer container, which virtiofsd
never had.

In this commit we introduce the second layer containers (yes,
comtainers), one for building virtiofsd using musl, and one for building
virtiofsd using glibc.  The reason for taking this approach was to
actually simplify the scripts and avoid building the dependencies
(libseccomp, libcap-ng) using musl libc.

Fixes: #5425

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-10-14 12:41:21 +02:00
Fabiano Fidêncio
9773838c01 virtiofsd: export env vars needed for building it
@jongwu, mentioned on an PR[0] that env vars should be exported to
ensure that virtiofsd is statically built for non-x86_64 architectures.

[0]: https://github.com/kata-containers/kata-containers/pull/4308#issuecomment-1137125592

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-06-10 13:27:02 +02:00
Jianyong Wu
10c13d719a qemu: remove virtiofsd option in qemu config
As virtiofsd will be built base on rust, "virtiofsd" option is no longer
needed in qemu.

Fixes: #4258
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2022-05-23 12:57:59 +08:00
Jianyong Wu
d20bc5a4d2 virtiofsd: build rust based virtiofsd from source for non-x86_64
Based on @fidencio's opoinon,
On Arm: static build virtiofsd using musl lib;
on ppc64 & s390: static build virtiofsd using gnu lib;

Fixes: #4258
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2022-05-23 12:57:59 +08:00
Fabiano Fidêncio
8e2042d055 tools: add script to pull virtiofsd
Right now this is very much x86_64 specific, but I'd like to count on
the maintainers of the other architectures to expand it.

Also, the name as it's now may be misleading, as we're actually only
pulling the binary that's statically built using `musl` and released as
part of virtiofsd official releases.  But we'll need to build it for the
other architectures, thus I'm following the naming of the scripts used
by the other components.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-05-13 11:37:21 +02:00