crosvm: 77.12371.0.0-rc1 -> 79.12607.0.0-rc4

Replaced src munging with a custom unpackPhase because the previous
approach couldn't handle a newly introduced path with a space, and
this is cleaner anyway (but was impossible at the time due to
unpackPhase not being forwarded to fetchcargo).

+48 -43
+6 -6
pkgs/applications/virtualization/crosvm/default-seccomp-policy-dir.patch pkgs/applications/virtualization/crosvm/default-seccomp-policy-dir.diff
··· 1 - diff --git a/src/main.rs b/src/main.rs 2 - index 81f20a7..481ebd7 100644 3 - --- a/src/main.rs 4 - +++ b/src/main.rs 5 - @@ -158,7 +158,9 @@ impl Default for Config { 6 - wayland_dmabuf: false, 1 + diff --git a/src/crosvm.rs b/src/crosvm.rs 2 + index b7055df..5989c87 100644 3 + --- a/src/crosvm.rs 4 + +++ b/src/crosvm.rs 5 + @@ -141,7 +141,9 @@ impl Default for Config { 6 + x_display: None, 7 7 shared_dirs: Vec::new(), 8 8 sandbox: !cfg!(feature = "default-no-sandbox"), 9 9 - seccomp_policy_dir: PathBuf::from(SECCOMP_POLICY_DIR),
+35 -30
pkgs/applications/virtualization/crosvm/default.nix
··· 11 11 else if isx86_64 then "x86_64" 12 12 else throw "no seccomp policy files available for host platform"; 13 13 14 - # used to turn symlinks into real files because write permissions are necessary for the vendoring process 15 - delink = src: runCommand "${src.name}-delinked" { 16 - preferLocalBuild = true; 17 - allowSubstitutes = false; 18 - } '' 19 - cp -prL --reflink=auto ${src} $out 20 - ''; 14 + crosvmSrc = fetchgit { 15 + inherit (upstreamInfo.components."chromiumos/platform/crosvm") 16 + url rev sha256 fetchSubmodules; 17 + }; 21 18 22 - # used to place subtrees into the location they have in the Chromium monorepo 23 - move = src: target: runCommand "moved-${src.name}" { 24 - preferLocalBuild = true; 25 - allowSubstitutes = false; 26 - } '' 27 - mkdir -p $(dirname $out/${target}) 28 - ln -s ${src} $out/${target} 29 - ''; 30 - 31 - # used to check out subtrees from the Chromium monorepo 32 - chromiumSource = name: subtrees: delink (symlinkJoin { 33 - inherit name; 34 - paths = stdenv.lib.mapAttrsToList ( 35 - location: { url, rev, sha256, fetchSubmodules, ... }: 36 - move (fetchgit { 37 - inherit url rev sha256 fetchSubmodules; 38 - }) location) subtrees; 39 - }); 19 + adhdSrc = fetchgit { 20 + inherit (upstreamInfo.components."chromiumos/third_party/adhd") 21 + url rev sha256 fetchSubmodules; 22 + }; 40 23 41 24 in 42 25 ··· 44 27 pname = "crosvm"; 45 28 inherit (upstreamInfo) version; 46 29 47 - src = chromiumSource "${pname}-sources" upstreamInfo.components; 30 + unpackPhase = '' 31 + runHook preUnpack 48 32 49 - sourceRoot = "${src.name}/chromiumos/platform/crosvm"; 33 + mkdir -p chromiumos/platform chromiumos/third_party 34 + 35 + pushd chromiumos/platform 36 + unpackFile ${crosvmSrc} 37 + mv ${crosvmSrc.name} crosvm 38 + popd 39 + 40 + pushd chromiumos/third_party 41 + unpackFile ${adhdSrc} 42 + mv ${adhdSrc.name} adhd 43 + popd 44 + 45 + chmod -R u+w -- "$sourceRoot" 46 + 47 + runHook postUnpack 48 + ''; 49 + 50 + sourceRoot = "chromiumos/platform/crosvm"; 50 51 51 52 patches = [ 52 - ./default-seccomp-policy-dir.patch 53 + ./default-seccomp-policy-dir.diff 53 54 ]; 54 55 55 - cargoSha256 = "16cfp79c13ng5jjcrvz00h3cg7cc9ywhjiq02vsm757knn9jgr1v"; 56 + cargoSha256 = "1d7y07wkliy5qnlyx5zj6ni39avhs3s48sqgvwxm5g5zrahg2a85"; 56 57 57 58 nativeBuildInputs = [ pkgconfig ]; 58 59 ··· 72 73 cp seccomp/${arch}/* $out/share/policy/ 73 74 ''; 74 75 75 - passthru.updateScript = ./update.py; 76 + passthru = { 77 + inherit adhdSrc; 78 + src = crosvmSrc; 79 + updateScript = ./update.py; 80 + }; 76 81 77 82 meta = with stdenv.lib; { 78 83 description = "A secure virtual machine monitor for KVM";
+7 -7
pkgs/applications/virtualization/crosvm/upstream-info.json
··· 1 1 { 2 - "version": "77.12371.0.0-rc1", 2 + "version": "79.12607.0.0-rc4", 3 3 "components": { 4 4 "chromiumos/platform/crosvm": { 5 5 "url": "https://chromium.googlesource.com/chromiumos/platform/crosvm", 6 - "rev": "f5285c647acacb4f25ef8cf9334254b976e71686", 7 - "date": "2019-07-25T22:15:48+00:00", 8 - "sha256": "1ccjd540xmpad082w9ri13q78wkg95xxmq38b8ybcrj4f7lsxm6w", 6 + "rev": "cfb7db44eb9e5a0bca9a22bfb985252ef74ab251", 7 + "date": "2019-10-17T23:22:08+00:00", 8 + "sha256": "0gm1ggyzh9qfizm36jmh71c3anygxj1840cm94h71kzg9kiw0330", 9 9 "fetchSubmodules": false 10 10 }, 11 11 "chromiumos/third_party/adhd": { 12 12 "url": "https://chromium.googlesource.com/chromiumos/third_party/adhd", 13 - "rev": "a1c0d93d991daffb042b979ac807bbe9c1f9a3ee", 14 - "date": "2019-07-25T20:38:50-07:00", 15 - "sha256": "11bijqd876adarq96syywn6znfbiflqssgb2j4w032iw2vfnnsyy", 13 + "rev": "a8df1c52bde3bfd2aebc1d7adcd6f195eb212cb1", 14 + "date": "2019-10-17T18:53:18+00:00", 15 + "sha256": "1hyvnvwr5ka9zw4h7hhl6fpsfl2acp3zy4wr5qrw8s1cn8ljr9vy", 16 16 "fetchSubmodules": false 17 17 } 18 18 }