Skip to content

Commit 12b2aaf

Browse files
authored
firecracker: 1.9.1 -> 1.10.1 (#373359)
2 parents c683d96 + fd5e1fa commit 12b2aaf

File tree

1 file changed

+32
-26
lines changed

1 file changed

+32
-26
lines changed

pkgs/by-name/fi/firecracker/package.nix

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,65 @@
22
lib,
33
stdenv,
44
fetchFromGitHub,
5-
makeRustPlatform,
6-
rustc,
7-
cargo,
8-
llvmPackages,
95
cmake,
106
gcc,
11-
12-
# gcc compile error at deps: aws-lc-sys, function 'memcpy' inlined from 'OPENSSL_memcpy'
13-
# error: '__builtin_memcpy' specified bound exceeds maximum object size
14-
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91397
15-
useRustPlatform ? makeRustPlatform {
16-
inherit rustc cargo;
17-
inherit (llvmPackages) stdenv;
18-
},
7+
rust-bindgen,
8+
rustPlatform,
199
}:
2010

21-
useRustPlatform.buildRustPackage rec {
11+
rustPlatform.buildRustPackage rec {
2212
pname = "firecracker";
23-
version = "1.9.1";
13+
version = "1.10.1";
2414

2515
src = fetchFromGitHub {
2616
owner = "firecracker-microvm";
2717
repo = "firecracker";
2818
rev = "v${version}";
29-
hash = "sha256-NgT06Xfb6j+d5EcqFjQeaiY08uJJjmrddzdwSoqpKbQ=";
19+
hash = "sha256-kLQPAHbj8Q425Z5zdwofyHz+sd3bf7zGmcMjKn9yTKc=";
3020
};
3121

32-
cargoLock = {
33-
lockFile = ./Cargo.lock;
34-
outputHashes = {
35-
"micro_http-0.1.0" = "sha256-bso39jUUyhlNutUxHw8uHtKWQIHmoikfQ5O3RIePboo=";
36-
};
37-
};
22+
useFetchCargoVendor = true;
23+
cargoHash = "sha256-TnEPNTeeX1KP+9HLD/oGF0sZGcXDHpc1Q1wCWw3L6mU=";
24+
25+
# For [email protected]: use external bindgen.
26+
AWS_LC_SYS_EXTERNAL_BINDGEN = "true";
27+
28+
# For [email protected]: fix gcc error:
29+
# In function 'memcpy',
30+
# inlined from 'OPENSSL_memcpy' at aws-lc/crypto/asn1/../internal.h
31+
# inlined from 'aws_lc_0_22_0_i2c_ASN1_BIT_STRING' at aws-lc/crypto/asn1/a_bitstr.c
32+
# glibc/.../string_fortified.h: error: '__builtin_memcpy' specified bound exceeds maximum object size [-Werror=stringop-overflow=]
33+
postPatch = ''
34+
substituteInPlace $cargoDepsCopy/aws-lc-sys-*/aws-lc/crypto/asn1/a_bitstr.c \
35+
--replace-warn '(len > INT_MAX - 1)' '(len < 0 || len > INT_MAX - 1)'
36+
'';
3837

3938
nativeBuildInputs = [
4039
cmake
4140
gcc
42-
useRustPlatform.bindgenHook
41+
rust-bindgen # for [email protected]
42+
rustPlatform.bindgenHook
4343
];
4444

4545
cargoBuildFlags = [ "--workspace" ];
46+
cargoTestFlags = [ "--package" "firecracker" "--package" "jailer" ];
4647

4748
checkFlags = [
48-
# requires /sys/devices/virtual/dmi
49+
# basic tests to skip in sandbox
4950
"--skip=fingerprint::dump::tests::test_read_valid_sysfs_file"
50-
# requires /dev/kvm
5151
"--skip=template::dump::tests::test_dump"
52+
"--skip=tests::test_filter_apply"
5253
"--skip=tests::test_fingerprint_dump_command"
5354
"--skip=tests::test_template_dump_command"
5455
"--skip=tests::test_template_verify_command"
5556
"--skip=utils::tests::test_build_microvm"
56-
# requires seccomp == 0
57-
"--skip=tests::test_filter_apply"
57+
# more tests to skip in sandbox
58+
"--skip=env::tests::test_copy_cache_info"
59+
"--skip=env::tests::test_dup2"
60+
"--skip=env::tests::test_mknod_and_own_dev"
61+
"--skip=env::tests::test_setup_jailed_folder"
62+
"--skip=env::tests::test_userfaultfd_dev"
63+
"--skip=resource_limits::tests::test_set_resource_limits"
5864
];
5965

6066
installPhase = ''

0 commit comments

Comments
 (0)