Package Details: crosvm-git r5881.4a740f380-1

Git Clone URL: https://aur.archlinux.org/crosvm-git.git (read-only, click to copy)
Package Base: crosvm-git
Description: The Chrome OS Virtual Machine Monitor
Upstream URL: https://chromium.googlesource.com/crosvm/crosvm
Licenses: custom:chromiumos
Conflicts: crosvm
Provides: crosvm
Submitter: gdamjan
Maintainer: gdamjan
Last Packager: gdamjan
Votes: 0
Popularity: 0.000000
First Submitted: 2018-05-17 13:42 (UTC)
Last Updated: 2023-02-16 11:54 (UTC)

Latest Comments

gdamjan commented on 2023-02-16 16:07 (UTC)

thanks @zifeitong. applied

5kg commented on 2023-02-16 07:31 (UTC) (edited on 2023-02-16 07:31 (UTC) by 5kg)

Thanks for the package!

The minijail hack is no longer needed. Additionally, "seccomp/x86_64/*" was moved.

diff --git a/PKGBUILD b/PKGBUILD
index 250434a..5c4d071 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -31,11 +31,6 @@ prepare() {
   git config submodule."third_party/depot_tools".url "$srcdir/depot_tools"
   git config submodule."third_party/vmm_vhost".url "$srcdir/vhost"
   git -c protocol.file.allow=always submodule update
-
-  # The in-tree minijail is too old to use, upstream crosvm builds seem to use ebuild shenanigans to patch this out of
-  # the .toml and use the chromeos minijail version.  Short of pulling random ebuild repos to find their preferred
-  # revision, this is the closest approximation of what upstream dev builds do.
-  ( cd third_party/minijail && git checkout --detach origin/main)
 }

 pkgver() {
@@ -52,7 +47,7 @@ package() {
   cd crosvm
   install -Dm755 target/release/crosvm "$pkgdir/usr/bin/crosvm"
   install -d "$pkgdir/usr/share/policy/crosvm/"
-  cp -r seccomp/x86_64/* "$pkgdir/usr/share/policy/crosvm/"
+  cp -r jail/seccomp/x86_64/* "$pkgdir/usr/share/policy/crosvm/"
   install -m644 -D LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
   install -m644 -D README.md "$pkgdir"/usr/share/licenses/$pkgname/README.md
 }

gdamjan commented on 2022-12-12 11:57 (UTC)

Thanks @Nephyrin,

patch applied.

Nephyrin commented on 2022-12-10 20:39 (UTC)

This also wont build due to the minijail submodule which is too old. It looks like upstream doesn't use this for their own builds, instead using the OS provided one, with some ebuild-level hacks to modify Cargo.toml in that case. The ebuild doesn't specify any particular version, so they just build against whatever is latest in ChromeOS.

Adding cd third_party/minijail && git checkout main fixes this. Presumably upstream usually targets the latest release of minijail, but for a -git build this is probably the most-correct as long as it builds?

Here's a patch that gets this building again

--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,5 +2,5 @@

 pkgname=crosvm-git
-pkgver=r4188.57470a47
+pkgver=r5465.795ee5b4b
 pkgrel=1
 pkgdesc="The Chrome OS Virtual Machine Monitor"
@@ -16,7 +16,9 @@ source=("git+https://chromium.googlesource.com/crosvm/crosvm"
         "git+https://chromium.googlesource.com/chromiumos/platform/minigbm"
         "git+https://chromium.googlesource.com/chromiumos/third_party/virglrenderer"
-        "git+https://android.googlesource.com/platform/external/minijail"
+        "git+https://chromium.googlesource.com/chromiumos/platform/minijail"
+        "git+https://chromium.googlesource.com/chromium/tools/depot_tools"
+        "git+https://chromium.googlesource.com/chromiumos/third_party/rust-vmm/vhost"
         )
-sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
+sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')

 prepare() {
@@ -27,5 +29,12 @@ prepare() {
   git config submodule."third_party/virglrenderer".url "$srcdir/virglrenderer"
   git config submodule."third_party/minijail".url "$srcdir/minijail"
-  git submodule update
+  git config submodule."third_party/depot_tools".url "$srcdir/depot_tools"
+  git config submodule."third_party/vmm_vhost".url "$srcdir/vhost"
+  git -c protocol.file.allow=always submodule update
+
+  # The in-tree minijail is too old to use, upstream crosvm builds seem to use ebuild shenanigans to patch this out of
+  # the .toml and use the chromeos minijail version.  Short of pulling random ebuild repos to find their preferred
+  # revision, this is the closest approximation of what upstream dev builds do.
+  ( cd third_party/minijail && git checkout --detach origin/main)
 }

gdamjan commented on 2021-06-27 14:43 (UTC)

We lost so much dependencies

sorry?

lhjay1 commented on 2021-06-27 07:36 (UTC)

We lost so much dependencies

gdamjan commented on 2021-04-12 08:44 (UTC)

tbh while i appreciate the attempt to save bandwidth, maybe it'll be easier to just checkout the whole repo so that there are no forward compat issues :)

well it's considered an anti-pattern for PKGBUILDS, alas, yeah it would be easier.

kang commented on 2021-04-12 00:53 (UTC) (edited on 2021-04-12 01:01 (UTC) by kang)

chromium dir structure changed a good bit so the whole checkout thing has to be fixed for the current Cargo.toml

tbh while i appreciate the attempt to save bandwidth, maybe it'll be easier to just checkout the whole repo so that there are no forward compat issues :)

rageltman commented on 2021-01-14 00:19 (UTC)

Seems to be having a crate problem:

[2021-01-13T17:26:14.185Z] info: installing component 'rust-docs'
[2021-01-13T17:26:14.185Z] info: installing component 'rust-std'
[2021-01-13T17:26:14.185Z] info: installing component 'rustc'
[2021-01-13T17:26:14.185Z] info: installing component 'rustfmt'
[2021-01-13T17:26:14.185Z] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[2021-01-13T17:26:14.185Z] 
[2021-01-13T17:26:14.185Z] Caused by:
[2021-01-13T17:26:14.185Z]   failed to load source for dependency `libvda`