Merge pull request #187211 from fpletz/pkgs/libvirt-8.6.0
libvirt: 8.5.0 -> 8.6.0, bugfixes
This commit is contained in:
commit
c050aba1a8
6 changed files with 65 additions and 8 deletions
|
@ -282,7 +282,7 @@ in
|
|||
setuid = true;
|
||||
owner = "root";
|
||||
group = "root";
|
||||
source = "/run/${dirName}/nix-helpers/qemu-bridge-helper";
|
||||
source = "${cfg.qemu.package}/libexec/qemu-bridge-helper";
|
||||
};
|
||||
|
||||
systemd.packages = [ cfg.package ];
|
||||
|
@ -308,7 +308,7 @@ in
|
|||
ln -s --force "$emulator" /run/${dirName}/nix-emulators/
|
||||
done
|
||||
|
||||
for helper in libexec/qemu-bridge-helper bin/qemu-pr-helper; do
|
||||
for helper in bin/qemu-pr-helper; do
|
||||
ln -s --force ${cfg.qemu.package}/$helper /run/${dirName}/nix-helpers/
|
||||
done
|
||||
|
||||
|
|
|
@ -284,6 +284,7 @@ in {
|
|||
libreswan = handleTest ./libreswan.nix {};
|
||||
librewolf = handleTest ./firefox.nix { firefoxPackage = pkgs.librewolf; };
|
||||
libuiohook = handleTest ./libuiohook.nix {};
|
||||
libvirtd = handleTest ./libvirtd.nix {};
|
||||
lidarr = handleTest ./lidarr.nix {};
|
||||
lightdm = handleTest ./lightdm.nix {};
|
||||
lighttpd = handleTest ./lighttpd.nix {};
|
||||
|
|
49
nixos/tests/libvirtd.nix
Normal file
49
nixos/tests/libvirtd.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
name = "libvirtd";
|
||||
meta.maintainers = with pkgs.lib.maintainers; [ fpletz ];
|
||||
|
||||
nodes = {
|
||||
virthost =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
virtualisation = {
|
||||
cores = 2;
|
||||
memorySize = 2048;
|
||||
|
||||
libvirtd.enable = true;
|
||||
};
|
||||
networking.nameservers = [ "192.168.122.1" ];
|
||||
security.polkit.enable = true;
|
||||
environment.systemPackages = with pkgs; [ virt-manager ];
|
||||
};
|
||||
};
|
||||
|
||||
testScript = let
|
||||
nixosInstallISO = (import ../release.nix {}).iso_minimal.${pkgs.hostPlatform.system};
|
||||
virshShutdownCmd = if pkgs.stdenv.isx86_64 then "shutdown" else "destroy";
|
||||
in ''
|
||||
start_all()
|
||||
|
||||
virthost.wait_for_unit("sockets.target")
|
||||
|
||||
with subtest("enable default network"):
|
||||
virthost.succeed("virsh net-start default")
|
||||
virthost.succeed("virsh net-autostart default")
|
||||
virthost.succeed("virsh net-info default")
|
||||
|
||||
with subtest("check if partition disk pools works with parted"):
|
||||
virthost.succeed("fallocate -l100m /tmp/foo; losetup /dev/loop0 /tmp/foo; echo 'label: dos' | sfdisk /dev/loop0")
|
||||
virthost.succeed("virsh pool-create-as foo disk --source-dev /dev/loop0 --target /dev")
|
||||
virthost.succeed("virsh vol-create-as foo loop0p1 25MB")
|
||||
virthost.succeed("virsh vol-create-as foo loop0p2 50MB")
|
||||
|
||||
with subtest("check if nixos install iso boots and network works"):
|
||||
virthost.succeed(
|
||||
"virt-install -n nixos --osinfo=nixos-unstable --ram=1024 --graphics=none --disk=`find ${nixosInstallISO}/iso -type f | head -n1`,readonly=on --import --noautoconsole"
|
||||
)
|
||||
virthost.succeed("virsh domstate nixos | grep running")
|
||||
virthost.wait_until_succeeds("ping -c 1 nixos")
|
||||
virthost.succeed("virsh ${virshShutdownCmd} nixos")
|
||||
virthost.wait_until_succeeds("virsh domstate nixos | grep 'shut off'")
|
||||
'';
|
||||
})
|
|
@ -36,6 +36,7 @@
|
|||
, xhtml1
|
||||
, yajl
|
||||
, writeScript
|
||||
, nixosTests
|
||||
|
||||
# Linux
|
||||
, acl ? null
|
||||
|
@ -113,13 +114,13 @@ stdenv.mkDerivation rec {
|
|||
# NOTE: You must also bump:
|
||||
# <nixpkgs/pkgs/development/python-modules/libvirt/default.nix>
|
||||
# SysVirt in <nixpkgs/pkgs/top-level/perl-packages.nix>
|
||||
version = "8.5.0";
|
||||
version = "8.6.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-x6TnMFYjcUSdQZd9ctN2hITCAl9TGVb7/qAObGb9xMk=";
|
||||
sha256 = "sha256-bSId7G2o808WfHGt5ioFEIhPyy4+XW+R349UgHKOvQU=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
@ -133,6 +134,10 @@ stdenv.mkDerivation rec {
|
|||
sed -i '/virnetsockettest/d' tests/meson.build
|
||||
# delete only the first occurrence of this
|
||||
sed -i '0,/qemuxml2argvtest/{/qemuxml2argvtest/d;}' tests/meson.build
|
||||
'' + optionalString isLinux ''
|
||||
sed -i 's,define PARTED "parted",define PARTED "${parted}/bin/parted",' \
|
||||
src/storage/storage_backend_disk.c \
|
||||
src/storage/storage_util.c
|
||||
'' + optionalString isDarwin ''
|
||||
sed -i '/qemucapabilitiestest/d' tests/meson.build
|
||||
sed -i '/vircryptotest/d' tests/meson.build
|
||||
|
@ -345,6 +350,8 @@ stdenv.mkDerivation rec {
|
|||
update-source-version perlPackages.SysVirt "$sysvirtVersion" --file="pkgs/top-level/perl-packages.nix"
|
||||
'';
|
||||
|
||||
passthru.tests.libvirtd = nixosTests.libvirtd;
|
||||
|
||||
meta = {
|
||||
homepage = "https://libvirt.org/";
|
||||
description = ''
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "libvirt";
|
||||
version = "8.5.0";
|
||||
version = "8.6.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "libvirt";
|
||||
repo = "libvirt-python";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-/OS+qBo0h9jshKDuxKX++cRPAjegImQROb7Uh+imOUA=";
|
||||
sha256 = "sha256-eJ0RPxJ4Gm+VGs6NeTWP2FbvDnJy4mURPlFbgvkSgo0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
|
|
@ -22599,12 +22599,12 @@ let
|
|||
|
||||
SysVirt = buildPerlModule rec {
|
||||
pname = "Sys-Virt";
|
||||
version = "8.4.0";
|
||||
version = "8.5.0";
|
||||
src = fetchFromGitLab {
|
||||
owner = "libvirt";
|
||||
repo = "libvirt-perl";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-nw9KG3dO0Oxre2NVp+4Z+kgIluU5j1xOu8grZJRXhik=";
|
||||
sha256 = "sha256-VuM4rPrG15vXnF5e1MBSGB76zLI+8nkSiJmwWg8aJgE=";
|
||||
};
|
||||
nativeBuildInputs = [ pkgs.pkg-config ];
|
||||
buildInputs = [ pkgs.libvirt CPANChanges TestPod TestPodCoverage XMLXPath ];
|
||||
|
|
Loading…
Reference in a new issue