summary refs log tree commit diff
Commit message (Collapse)AuthorAge
* Documentation: add VM File Access HEAD mainAlyssa Ross2024-05-29
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* img/app: install xdg-desktop-portal-spectrumAlyssa Ross2024-05-29
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* tools/xdg-desktop-portal-spectrum: initAlyssa Ross2024-05-29
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* img/app: install xdg-desktop-portal-gtkAlyssa Ross2024-05-29
| | | | | | | To be activated by dbus-daemon. This will be used for backends for portal interfaces that don't need to talk to the host. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* img/app: install xdg-desktop-portalAlyssa Ross2024-05-29
| | | | | | To be activated by dbus-daemon. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* img/app: run with D-Bus sessionAlyssa Ross2024-05-29
| | | | | | This will be required for portals. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* pkgs: dbus: add vsock patchesAlyssa Ross2024-05-29
| | | | | | | Upstream prospects for these look good — they just need a bit more work. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/rootfs: run xdg-desktop-portal-spectrum-hostAlyssa Ross2024-05-29
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* tools/xdg-desktop-portal-spectrum-host: initAlyssa Ross2024-05-29
| | | | | | | | It would be preferable to build this with Meson, but it seems like its Cargo support is not quite there yet. (The meson.build it generates for rustix tried to append to an unknown variable, for example.) Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/rootfs: install xdg-desktop-portal-gtkAlyssa Ross2024-05-29
| | | | | | This will be used by File Chooser portal backend to select files. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/rootfs: configure per-VM document portalAlyssa Ross2024-05-29
| | | | | | | This can be activated by the per-VM D-Bus daemon, and will be used by the File Chooser portal backend. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* lib/nixpkgs.default.nix: update to stagingAlyssa Ross2024-05-29
| | | | | | | This contains fixes necessary for the rest of the implementation of the file chooser portal. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/rootfs: run dbus-daemon for each VMAlyssa Ross2024-05-29
| | | | | | | This is required for the file chooser backend to talk to the document portal. We're still avoiding a global bus on the host. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vmm: provide a VSOCK device to VMsAlyssa Ross2024-05-29
| | | | | | | This will be used for communicating with the File Chooser portal implementation on the host. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/rootfs: always share a single dir with VMsAlyssa Ross2024-05-29
| | | | | | | | | | | | | | | | | | | | | This makes everything simpler. Having multiple virtio-fs devices would be inefficient, and would raise the question of how VMs should identify which one is which, and it doesn't seem to buy us anything over bind mounts into a single directory. As part of this change, I've removed the static configuration of shared directories rather than adapting it. It would be possible to implement it, but I think that (like much of the rest of Spectrum) we'll be able to better design static configuration if we get dynamic stuff working first. Currently, VMs get this single shared directory whether they want it or not. We could make it optional in future. mount now comes from util-linux, because if you do mount --bind -o ro with busybox mount, it'll just ignore the -o ro part. Terrifying. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/rootfs: set WAYLAND_DISPLAY globallyAlyssa Ross2024-05-29
| | | | | | | It needs to be possible to spawn Wayland clients other than as children of the compositor, for example portal dialogs. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* vm/app/gnome-text-editor: initAlyssa Ross2024-05-29
| | | | | | | | | | This will be useful for testing portals. GDK_DEBUG is set to force the use of portals. In future, we might be able to use the /.flatpak-info interface instead of using the debug environment variable. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* scripts/dist-cloud-hypervisor.sh: fix patch versionAlyssa Ross2024-05-20
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* lib/nixpkgs.default.nix: update to nixos-unstableAlyssa Ross2024-05-20
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* scripts/dist-cloud-hypervisor.sh: compress with gzAlyssa Ross2024-04-29
| | | | | | | Previously the tarballs were named ".xz", but actually weren't compressed at all. Oops! Signed-off-by: Alyssa Ross <hi@alyssa.is>
* lib/nixpkgs.default.nix: update to nixos-unstable-smallAlyssa Ross2024-04-29
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* lib/nixpkgs.default.nix: update to nixos-unstableAlyssa Ross2024-04-24
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* Add missing sfdisk-field.awk Make dependenciesAlyssa Ross2024-04-17
| | | | | | | Fixes: ec07104 ("host/initramfs: run QEMU from Make") Fixes: a96f09d ("host/initramfs: enable testing booting from loop") Fixes: 6af16d0 ("host/rootfs: use initramfs in "make run"") Signed-off-by: Alyssa Ross <hi@alyssa.is>
* release/installer: remove obsolete msize overrideAlyssa Ross2024-04-17
| | | | | | We're long past 5.15, so a bigger msize is now the default. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* Switch from writeReferencesToFile to writeClosureAlyssa Ross2024-04-04
| | | | | | writeReferencesToFile is deprecated. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* release/checks: use new create_machine interfaceAlyssa Ross2024-04-04
| | | | | | | The interface we were previously using now produces a deprecation warning. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* lib/nixpkgs.default.nix: update to nixos-unstableAlyssa Ross2024-04-04
| | | | | | The foot patch is finally upstream! Signed-off-by: Alyssa Ross <hi@alyssa.is>
* release/checks/wayland: avoid unnecessary rebuildsAlyssa Ross2024-04-04
| | | | | | | Building surface-notify doesn't require any Spectrum sources outside of its own directory. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* release/checks/wayland: fix raceAlyssa Ross2024-04-04
| | | | | | | | | | | The test might not have opened /run/surface-notify by the time the surfaec appears. In that case, opening the file write-only would cause Weston to block, and cause a deadlock. On Linux, we can open the pipe read/write to have the open succeed immediately, avoiding this problem. Fixes: f76b542b ("release/checks/wayland: init") Signed-off-by: Alyssa Ross <hi@alyssa.is>
* release/checks/wayland: fix surface-notify errorsAlyssa Ross2024-04-04
| | | | | | | | Weston's log handler might do other things that set errno before evaluating the format strings, so %m can produce the wrong result. Fixes: f76b542b ("release/checks/wayland: init") Signed-off-by: Alyssa Ross <hi@alyssa.is>
* scripts/dist-cloud-hypervisor.sh: initAlyssa Ross2024-04-03
| | | | | | | | I've already been using this to generate the distributions of the last couple of releases of the Cloud Hypervisor patchset, and it's worked well so far. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vmm: syn: 2.0.57 -> 2.0.58Alyssa Ross2024-04-03
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* Access PACKAGES through the shell instead of makeAlyssa Ross2024-04-03
| | | | | | | | | | | | | | | | The command line here was still getting too long for the shell. Previously, I assumed this was make-erofs.sh's command line, but it was probably actually the command line for the shell invoked by make with sh -c. To reduce the length of this, don't have make pass the whole PACKAGES list to the shell. Instead have the shell read it from the environment itself. PACKAGES is not defined in the Makefile, so it has to be provided either in the environment or on the make command line. POSIX specifies that macros defined on the make command line are added to the environment, so this should still work in both cases. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vmm: syn: 2.0.55 -> 2.0.57Alyssa Ross2024-04-01
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* scripts/make-erofs.sh: take paths on stdinAlyssa Ross2024-03-28
| | | | | | The command line for the rootfs EROFS is nearing argv limits. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vmm: itoa: 1.0.10 -> 1.0.11Alyssa Ross2024-03-26
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* vm: remove explicit CONFIG_EXPERTAlyssa Ross2024-03-25
| | | | | | | This is set in Nixpkgs since 3b07356d2d55 ("linux/kernel/common-config: support DFS radiations for ath(9|10)k drivers"). Signed-off-by: Alyssa Ross <hi@alyssa.is>
* vm: unset CONFIG_RC_CORE for kernelAlyssa Ross2024-03-25
| | | | | | | This will be required to keep the kernel config building once our Nixpkgs includes cb39b353041d ("linux/common-config: enable RC_CORE explicitly"). Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vmm: syn: 2.0.53 -> 2.0.55Alyssa Ross2024-03-24
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* lib/common.mk: remove unused stuffAlyssa Ross2024-03-24
| | | | | | | OBJCOPY has been unused since b72a136 ("img/live: switch to systemd-boot"), and .tar.ext4 has been unused since d0d7906 ("host/rootfs: switch to EROFS"). Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vmm: syn: 2.0.41 -> 2.0.53Alyssa Ross2024-03-22
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vmm: use a Meson option for panicAlyssa Ross2024-03-22
| | | | | | | | | | | This is a much more meson-y way to handle this, and it should make it easier to use Meson's new Cargo wraps. I don't like that it's the non-native dependencies that need to have this option, but it seems to fit into Meson much better this way, so it is what it is. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vmm: proc-macro2: 1.0.78 -> 1.0.79Alyssa Ross2024-03-22
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vmm: use meson -rs convention for depsAlyssa Ross2024-02-27
| | | | | | | | Meson has now standardised on Rust library dependencies having names ending in "-rs", so we should do that too. It'll make it easier to use Cargo wraps later. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vmm: remove unused inputAlyssa Ross2024-02-26
| | | | | Fixes: a2d362c ("host: allow VMs to be powered off") Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vmm: miniserde: 0.1.37 -> 0.1.38Alyssa Ross2024-02-26
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/rootfs: switch VMs to templated s6 servicesAlyssa Ross2024-02-23
| | | | | | | | | | | | | Now that VMMs and vhost-user devices are started immediately, we don't need the complexity of s6-rc for them any more. VMMs still depend on the vhost-user sockets, but since those will be available almost immediately, it's fine to just wait for them in ext-rc-init. Since we're now using pure s6, we can use s6 instanced services for these, which cuts down a lot on how much work ext-rc-init's up script has to do directly, and provides some nice namespacing. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host: properly namespace vhost-user backendsAlyssa Ross2024-02-23
| | | | | | | | Using a character that is not allowed in VM names to separate the VM name from the filesystem name means that there can't be conflicts between different VM/filesystem combinations. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vmm: allow VM names to contain commasAlyssa Ross2024-02-23
| | | | | | | | | This restriction was in place because we needed to be able to refer to VM directories on the cloud-hypervisor command line, where commas have special meaning. Now that we're instead using the JSON API for VM configuration, there's no need for the restriction. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host: allow VMs to be powered offAlyssa Ross2024-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, the s6 services for cloud-hypervisor and virtiofsd were only started when a VM was started, and vm-stop would bring the service down. The problem with this was that if a VM powered itself off, instead of being stopped on the host using vm-stop, the VM would instantly be restarted by s6. To fix this, we disentangle keeping cloud-hypervisor running from keeping the VM running. cloud-hypervisor will now always be running, so s6 will never restart it in normal operation, but it won't be running a VM until it's told to. Accomplishing this means having start-vmm (renamed from start-vm to reflect its new purpose) configure the VM in cloud-hypervisor without booting it, which is only possible using the API, not the command line. As a result, start-vm now depends on miniserde so that it can construct the VM config JSON object required by the API. The build of start-vm has been adjusted to accomodate the complexity stemming from the new dependencies. Tests are moved into passthru, because the start-vm used in Spectrum should have panic=abort, but tests need panic=unwind, and we can't use both in the same Meson instance without duplicating the non-native dependencies. We can't use s6-rc dependencies to automatically boot provider VMs in this setup, so vm-start has been modified to recurse into provider VMs. lsvm has been updated to check the Cloud Hypervisor API to see whether a VM is running, rather than just checking to see whether the s6 service is up. Because cloud-hypervisor is now to be started as early as possible, we need to make the dependencies of ext-rc-init more precise, so that cloud-hypervisor does not attempt to start before /dev/kvm or /dev/net/tun is available. We're not using Meson's support for Cargo subprojects yet, because it currently always builds crates with all features enabled. Signed-off-by: Alyssa Ross <hi@alyssa.is>