From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cEJUF1kHZ2BwcwEAgWs5BA (envelope-from ) for ; Fri, 02 Apr 2021 14:00:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2BccElkHZ2C1WAAAbx9fmQ (envelope-from ) for ; Fri, 02 Apr 2021 12:00:25 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DB919F535 for ; Fri, 2 Apr 2021 14:00:24 +0200 (CEST) Received: from localhost ([::1]:35312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSITP-0002U3-SV for larch@yhetil.org; Fri, 02 Apr 2021 08:00:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSIT7-0002CD-Dd for guix-patches@gnu.org; Fri, 02 Apr 2021 08:00:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47769) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lSIT7-0001Hw-4i for guix-patches@gnu.org; Fri, 02 Apr 2021 08:00:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lSIT7-0000Vd-4F for guix-patches@gnu.org; Fri, 02 Apr 2021 08:00:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#46623] [PATCH 3/6] gnu: libvirt: Update to 7.2.0. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 02 Apr 2021 12:00:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46623 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46623@debbugs.gnu.org Cc: Pierre Langlois , Brice Waegeneire Received: via spool by 46623-submit@debbugs.gnu.org id=B46623.16173647741836 (code B ref 46623); Fri, 02 Apr 2021 12:00:05 +0000 Received: (at 46623) by debbugs.gnu.org; 2 Apr 2021 11:59:34 +0000 Received: from localhost ([127.0.0.1]:59305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSISV-0000TS-CJ for submit@debbugs.gnu.org; Fri, 02 Apr 2021 07:59:34 -0400 Received: from mout.gmx.net ([212.227.17.22]:36843) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSISI-0000S2-OD for 46623@debbugs.gnu.org; Fri, 02 Apr 2021 07:59:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1617364748; bh=+cZ6Wa6LjbQ1XwKzVTpKfWoC839avZ51KhSsZLJaRWU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=jzF47uJmYZ1KM5GRQAHpbs9+ONHtWdAl/Wm7ux3HA26A9rWsuRTWXDSfp2pz9MUQ2 vHcMCXlWVBHooVuq3TwCQilql3RuKFx4lqWtqn1E4xCHwZaoNcdbq2NaGqj2416Tfy T+yG3s2iySKbAtvrwBqsbFc0i64s+9TDpCZtj1yo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([82.69.64.142]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MG9kC-1lP3L60xQ4-00Gc3i; Fri, 02 Apr 2021 13:59:08 +0200 From: Pierre Langlois Date: Fri, 2 Apr 2021 12:58:59 +0100 Message-Id: <20210402115902.3474-3-pierre.langlois@gmx.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210402115902.3474-1-pierre.langlois@gmx.com> References: <87ft08vr1l.fsf@gmx.com> <20210402115902.3474-1-pierre.langlois@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:7Qjf+7NygA5fkKX2rvMTZc1DZqm2+T4xWISl2GP/jrNFvh86FD+ wdKYUITWiCG+WnwhUqpDhNMZI4qnDN9ku/uqtYEvkvt2oqtqHbrsj5SWVDeqw5jPHtn3Lux eu+PXk7lf2MUUKwowvAv7rhlnOcQZP96RpZXpCY6hLdaPH8ZePZ218xZ/12LwEoANb+Qevu NNrLhQTq8L8iHz/X7Nuyg== X-UI-Out-Filterresults: notjunk:1;V03:K0:d29xxKOUO3I=:+g9xHVfc/HRtZ7mBJ8O6yi COa7ykiR/J5tnCwm6o6873J0UThQGpt35osfxk48KMLXTVEn3RPDF3kUBVRGzRcjqcrBLKdP8 egMIeCu3DTm+pJ5nXMHzQWip6ApSxRzkVVMgQ6LPqS8QWBLbECAH6Lo4jjpltId87hgDKe4sj tuml6Gtre952laZo5QONTU0iLGI8w5XmbcM5U3Fd+0ylPn9mg4NCidxnfIsYSBjR5ea7KBgZQ z6ZKL/SxcOIE/+7xjz1cnPqLD1jRYufh5bQQY+t9gN4F5LOl2Uv0xmO402pgoqa/XiYCctOZo nzzWUu3I8koI9Ou/az4E9KYhFOvrcQjjSk+OYgXYVOgHBc2lmM8NbLXmIZ6vjM2lIwgFt/KvO Z7vyETaGcggHcsC3kYg4JO9HR7Ye9CWJs5zHOZ+oPI536ItQfTMEY9hIpJbLcVwcHD26c22Hn FkqU9bwALbPWDMZExr6MzwWTs7A5s7cykjjnTtGc62KfNRxKL0JXl2z2GHlzBCME+ufwVmDnR GCWFBSt9hA2taCRkSCIX5sQ95AHs62gdLgeTWISytK7aYKi7hxGKdSgUtM5J02HtImr81skP2 HL+fDZqqK4VteV9QWN3sq/acQL2MPEMpY3rxaK+THrar0W3oy8msgniVD9xE3ypeZ0eSBC9Oa gPUnihKV1csszV3R2TfeV3A9eGt5T92QgJua6Jmh6M77YzjP37kWIlbUupeGS/s/+OLPoS1t0 s75IyINMnvd0TmhMzdOI57yzBybqjQFMFoYWC+0jF1/HQSsmwfObCnPx4lOO/c5s4Eaq34HjT 07WzRba1IYDlMVukJzyiyYA/+It5ZEpaNlaI933PdpNI05HS1c3EW2CDKKzbeEUPUK6oMKxYV Ar7aG0Ps+o2hF13QM4uUQiKzQkJ/6sksEEPD76CIVFCEjpOPf4rK6EnQbZYIxJh4Fd9S6mdAk vrJifqZuN6TGBPGjFRMdsAfv/onRLi8ghTYZNzd2IWgopjB9vt0IGO+7g+/X0OmEmp9fYWH1o N3o7ncXr0Ew4KQ/ViZv36yOBkHGnySYEuya0Ex+DaEi6lR3k5GpNIRwhXQ0Xfil/53yRf9tPb tzsC+pvf1Gl89Iu1VakKSm3IcSoW0yQath2QzdoJ4ewpUaDv0WcLxXmo9pudpi21P4oH3HP2K qLWjNbCf+UccqOGyzCtkC/ahuaQu12tC+7Qx9NtpzLmCDF3alvTyYnSe/VaEW2S/L0BYVf4Fr U52Ycn+mvmVed8hHQ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617364825; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=cl5gSADOGBql2Mob8fH9LxwAj0AHAQ8qinL35zcX4ac=; b=r/P+hSl9f89C2FUqqvol507l3WP0e2bzqubI4QGCSg6Y9liE1qz1nmlnsFMbp0zz9+AP6/ h09b97nLEEgYPY/VG1N1Mf3QQ4KhCcK3aTTPuw1NLhqqVmmq2V89fYXE7TtXv9F1UZR0K9 Q5a9FoX5e2FJQ3YCBq44I4Wjo4/xXHTSl9wJcLZ82CKFU5ezcoM/sXZvP/WU0X6NCf5GHK ol+NN/kSw3YqFg5c0vNUNksoGbAoce4DqV9bfOENtJtAhrAfzmajM2htO4MoR9mLI+JTTx 0SirRuXejwLb46ErAwqPOwgNVIqUHuZS/sKX1NYjl54+Sw2e5HHx/k7nsVNYGQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617364825; a=rsa-sha256; cv=none; b=iXjg+TNAqdD0XcmO0hXKlzHWuNIzoaFOrmJ3fUZjp1hZPrcufi+MbXqmJm6cri06leg3h8 KNzaw14qjHqqOCeKGYPm1d+0bGnqbSdCFoTSSJRX1pndQJeb4WP4lDgloHuSa6mlq2Jw06 nPciCXUPWD/NK/9/M4tRSLjWuaUuGc2P42nFAxOCZBvZOY6jGLsKit/jUF8tci4loIH86S rEUnUgz6AXZ45e2M/b7ib1g0hmIXHJj5XRkh5O6qeRbDApBBhuq9N+rKu925HNC5Vv9IZb YOQ8KsUg7HzrAKUoEzKGnskz+HrP5ERwuv2FU10DFVhbvQ+isrrT/xWbu6/CFA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=jzF47uJm; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 1.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=jzF47uJm; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: DB919F535 X-Spam-Score: 1.17 X-Migadu-Scanner: scn0.migadu.com X-TUID: UJo5htSBHGsF From: Brice Waegeneire * gnu/packages/virtualization.scm (libvirt): Update to 7.2.0. [arguemnts]: Switch to meson, only build system supported by upstream. [inputs]: Add libssh2 and readline. [native-inputs]: Add bash-completion, gettext, python-docutils and rpcsvc-proto. * gnu/packages/patches/libvirt-add-install-prefix.patch: New file... * gnu/local.mk: ...add it. * gnu/packages/patches/libvirt-create-machine-cgroup.patch: Delete file, merged by upstream. Tested-by: Pierre Langlois =2D-- gnu/local.mk | 4 +- .../patches/libvirt-add-install-prefix.patch | 329 ++++++++++++++++++ gnu/packages/virtualization.scm | 82 ++--- 3 files changed, 367 insertions(+), 48 deletions(-) create mode 100644 gnu/packages/patches/libvirt-add-install-prefix.patch diff --git a/gnu/local.mk b/gnu/local.mk index 1a72e896a8..e0fff1f59c 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -34,7 +34,7 @@ # Copyright =C2=A9 2020, 2021 Felix Gruber # Copyright =C2=A9 2020 Ryan Prior # Copyright =C2=A9 2020 Jan Wielkiewicz -# Copyright =C2=A9 2020 Brice Waegeneire +# Copyright =C2=A9 2020, 2021 Brice Waegeneire # Copyright =C2=A9 2020 Tanguy Le Carrour # Copyright =C2=A9 2020 Martin Becze # Copyright =C2=A9 2020 Malte Frank Gerdes @@ -1263,7 +1263,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/kdbusaddons-kinit-file-name.patch \ %D%/packages/patches/libffi-3.3-powerpc-fixes.patch \ %D%/packages/patches/libffi-float128-powerpc64le.patch \ - %D%/packages/patches/libvirt-create-machine-cgroup.patch \ + %D%/packages/patches/libvirt-add-install-prefix.patch \ %D%/packages/patches/libziparchive-add-includes.patch \ %D%/packages/patches/localed-xorg-keyboard.patch \ %D%/packages/patches/kdiagram-Fix-missing-link-libraries.patch \ diff --git a/gnu/packages/patches/libvirt-add-install-prefix.patch b/gnu/p= ackages/patches/libvirt-add-install-prefix.patch new file mode 100644 index 0000000000..1331fa9b6f =2D-- /dev/null +++ b/gnu/packages/patches/libvirt-add-install-prefix.patch @@ -0,0 +1,329 @@ +Patch from NixOS: +https://raw.githubusercontent.com/NixOS/nixpkgs/b98031a49c66095dd1eb9185e= cdaeeb5e3cd752d/pkgs/development/libraries/libvirt/0001-meson-patch-in-an-= install-prefix-for-building-on-nix.patch + +From a896b0be849455edb83a9305dfec9b41447ef3e4 Mon Sep 17 00:00:00 2001 +From: Euan Kemp +Date: Thu, 14 Jan 2021 00:32:00 -0800 +Subject: [PATCH] meson: patch in an install prefix for building on nix + +Used in the nixpkgs version of libvirt so that we can install things in +the nix store, but read them from the root filesystem. +--- + meson.build | 9 +++++++++ + meson_options.txt | 2 ++ + src/libxl/meson.build | 6 +++--- + src/locking/meson.build | 8 ++++---- + src/lxc/meson.build | 6 +++--- + src/meson.build | 18 +++++++++--------- + src/network/meson.build | 12 ++++++------ + src/nwfilter/xml/meson.build | 2 +- + src/qemu/meson.build | 14 +++++++------- + src/remote/meson.build | 6 +++--- + src/security/apparmor/meson.build | 8 ++++---- + tools/meson.build | 4 ++-- + 12 files changed, 53 insertions(+), 42 deletions(-) + +diff --git a/meson.build b/meson.build +index b5164f6..33719f1 100644 +--- a/meson.build ++++ b/meson.build +@@ -39,6 +39,8 @@ if host_machine.system() =3D=3D 'windows' + conf.set('WINVER', '0x0600') # Win Vista / Server 2008 + endif + ++# patched in for nix ++install_prefix =3D get_option('install_prefix') + + # set various paths + +@@ -57,6 +59,13 @@ else + sysconfdir =3D prefix / get_option('sysconfdir') + endif + ++# nix: don't prefix the localstatedir; some things need to write to it, = so it ++# can't be in the nix store, and that's what the prefix is. ++# We'll prefix things ourselves where needed ++localstatedir =3D get_option('localstatedir') ++# Same for sysconfidr ++sysconfdir =3D get_option('sysconfdir') ++ + # if --prefix is /usr, don't use /usr/var for localstatedir or /usr/etc = for + # sysconfdir as this makes a lot of things break in testing situations + if prefix =3D=3D '/usr' +diff --git a/meson_options.txt b/meson_options.txt +index e5d79c2..081cd32 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -1,3 +1,5 @@ ++option('install_prefix', type: 'string', value: '', description: 'prefix= for nix store installation') ++ + option('no_git', type: 'boolean', value: false, description: 'Disable gi= t submodule update') + option('packager', type: 'string', value: '', description: 'Extra packag= er name') + option('packager_version', type: 'string', value: '', description: 'Extr= a packager version') +diff --git a/src/libxl/meson.build b/src/libxl/meson.build +index 3bb6cc5..78d7be0 100644 +--- a/src/libxl/meson.build ++++ b/src/libxl/meson.build +@@ -84,8 +84,8 @@ if conf.has('WITH_LIBXL') + } + + virt_install_dirs +=3D [ +- localstatedir / 'lib' / 'libvirt' / 'libxl', +- runstatedir / 'libvirt' / 'libxl', +- localstatedir / 'log' / 'libvirt' / 'libxl', ++ install_prefix + localstatedir / 'lib' / 'libvirt' / 'libxl', ++ install_prefix + runstatedir / 'libvirt' / 'libxl', ++ install_prefix + localstatedir / 'log' / 'libvirt' / 'libxl', + ] + endif +diff --git a/src/locking/meson.build b/src/locking/meson.build +index 8a28310..9da81cc 100644 +--- a/src/locking/meson.build ++++ b/src/locking/meson.build +@@ -243,14 +243,14 @@ if conf.has('WITH_LIBVIRTD') + } + + virt_install_dirs +=3D [ +- localstatedir / 'lib' / 'libvirt' / 'lockd', +- localstatedir / 'lib' / 'libvirt' / 'lockd' / 'files', +- runstatedir / 'libvirt' / 'lockd', ++ install_prefix + localstatedir / 'lib' / 'libvirt' / 'lockd', ++ install_prefix + localstatedir / 'lib' / 'libvirt' / 'lockd' / 'file= s', ++ install_prefix + runstatedir / 'libvirt' / 'lockd', + ] + + if conf.has('WITH_SANLOCK') + virt_install_dirs +=3D [ +- localstatedir / 'lib' / 'libvirt' / 'sanlock', ++ install_prefix + localstatedir / 'lib' / 'libvirt' / 'sanlock', + ] + endif + endif +diff --git a/src/lxc/meson.build b/src/lxc/meson.build +index f8e2a88..96d6687 100644 +--- a/src/lxc/meson.build ++++ b/src/lxc/meson.build +@@ -182,8 +182,8 @@ if conf.has('WITH_LXC') + } + + virt_install_dirs +=3D [ +- localstatedir / 'lib' / 'libvirt' / 'lxc', +- runstatedir / 'libvirt' / 'lxc', +- localstatedir / 'log' / 'libvirt' / 'lxc', ++ install_prefix + localstatedir / 'lib' / 'libvirt' / 'lxc', ++ install_prefix + runstatedir / 'libvirt' / 'lxc', ++ install_prefix + localstatedir / 'log' / 'libvirt' / 'lxc', + ] + endif +diff --git a/src/meson.build b/src/meson.build +index 7c47821..d33d16a 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -669,7 +669,7 @@ endforeach + + virt_conf_files +=3D 'libvirt.conf' + +-install_data(virt_conf_files, install_dir: confdir) ++install_data(virt_conf_files, install_dir: install_prefix + confdir) + install_data(virt_aug_files, install_dir: virt_aug_dir) + + # augeas_test_data: +@@ -729,7 +729,7 @@ foreach data : virt_daemon_confs + output: '@0@.conf'.format(data['name']), + configuration: daemon_conf, + install: true, +- install_dir: confdir, ++ install_dir: install_prefix + confdir, + ) + + if data.get('with_ip', false) +@@ -853,14 +853,14 @@ if conf.has('WITH_LIBVIRTD') + + install_data( + init_file, +- install_dir: sysconfdir / 'init.d', ++ install_dir: install_prefix + sysconfdir / 'init.d', + rename: [ init['name'] ], + ) + + if init.has_key('confd') + install_data( + init['confd'], +- install_dir: sysconfdir / 'conf.d', ++ install_dir: install_prefix + sysconfdir / 'conf.d', + rename: [ init['name'] ], + ) + endif +@@ -872,7 +872,7 @@ if init_script !=3D 'none' + foreach sysconf : sysconf_files + install_data( + sysconf['file'], +- install_dir: sysconfdir / 'sysconfig', ++ install_dir: install_prefix + sysconfdir / 'sysconfig', + rename: [ sysconf['name'] ], + ) + endforeach +@@ -897,10 +897,10 @@ endif + # Install empty directories + + virt_install_dirs +=3D [ +- localstatedir / 'cache' / 'libvirt', +- localstatedir / 'lib' / 'libvirt' / 'images', +- localstatedir / 'lib' / 'libvirt' / 'filesystems', +- localstatedir / 'lib' / 'libvirt' / 'boot', ++ install_prefix + localstatedir / 'cache' / 'libvirt', ++ install_prefix + localstatedir / 'lib' / 'libvirt' / 'images', ++ install_prefix + localstatedir / 'lib' / 'libvirt' / 'filesystems', ++ install_prefix + localstatedir / 'lib' / 'libvirt' / 'boot', + ] + + meson.add_install_script( +diff --git a/src/network/meson.build b/src/network/meson.build +index 3ec598c..b02040b 100644 +--- a/src/network/meson.build ++++ b/src/network/meson.build +@@ -79,9 +79,9 @@ if conf.has('WITH_NETWORK') + } + + virt_install_dirs +=3D [ +- localstatedir / 'lib' / 'libvirt' / 'network', +- localstatedir / 'lib' / 'libvirt' / 'dnsmasq', +- runstatedir / 'libvirt' / 'network', ++ install_prefix + localstatedir / 'lib' / 'libvirt' / 'network', ++ install_prefix + localstatedir / 'lib' / 'libvirt' / 'dnsmasq', ++ install_prefix + runstatedir / 'libvirt' / 'network', + ] + + configure_file( +@@ -89,12 +89,12 @@ if conf.has('WITH_NETWORK') + output: '@BASENAME@', + copy: true, + install: true, +- install_dir: confdir / 'qemu' / 'networks', ++ install_dir: install_prefix + confdir / 'qemu' / 'networks', + ) + + meson.add_install_script( + meson_python_prog.path(), python3_prog.path(), meson_install_symlink= _prog.path(), +- confdir / 'qemu' / 'networks' / 'autostart', ++ install_prefix + confdir / 'qemu' / 'networks' / 'autostart', + '../default.xml', 'default.xml', + ) + +diff --git a/src/nwfilter/xml/meson.build b/src/nwfilter/xml/meson.build +index 0d96c54..66c92a1 100644 +--- a/src/nwfilter/xml/meson.build ++++ b/src/nwfilter/xml/meson.build +@@ -25,4 +25,4 @@ nwfilter_xml_files =3D [ + 'qemu-announce-self.xml', + ] + +-install_data(nwfilter_xml_files, install_dir: sysconfdir / 'libvirt' / '= nwfilter') ++install_data(nwfilter_xml_files, install_dir: install_prefix + sysconfdi= r / 'libvirt' / 'nwfilter') +diff --git a/src/qemu/meson.build b/src/qemu/meson.build +index 90640b0..8802cec 100644 +--- a/src/qemu/meson.build ++++ b/src/qemu/meson.build +@@ -171,12 +171,12 @@ if conf.has('WITH_QEMU') + } + + virt_install_dirs +=3D [ +- localstatedir / 'lib' / 'libvirt' / 'qemu', +- runstatedir / 'libvirt' / 'qemu', +- localstatedir / 'cache' / 'libvirt' / 'qemu', +- localstatedir / 'log' / 'libvirt' / 'qemu', +- localstatedir / 'lib' / 'libvirt' / 'swtpm', +- runstatedir / 'libvirt' / 'qemu' / 'swtpm', +- localstatedir / 'log' / 'swtpm' / 'libvirt' / 'qemu', ++ install_prefix + localstatedir / 'lib' / 'libvirt' / 'qemu', ++ install_prefix + runstatedir / 'libvirt' / 'qemu', ++ install_prefix + localstatedir / 'cache' / 'libvirt' / 'qemu', ++ install_prefix + localstatedir / 'log' / 'libvirt' / 'qemu', ++ install_prefix + localstatedir / 'lib' / 'libvirt' / 'swtpm', ++ install_prefix + runstatedir / 'libvirt' / 'qemu' / 'swtpm', ++ install_prefix + localstatedir / 'log' / 'swtpm' / 'libvirt' / 'qemu= ', + ] + endif +diff --git a/src/remote/meson.build b/src/remote/meson.build +index 9ad2f6a..429a15b 100644 +--- a/src/remote/meson.build ++++ b/src/remote/meson.build +@@ -245,7 +245,7 @@ if conf.has('WITH_REMOTE') + } + + virt_install_dirs +=3D [ +- localstatedir / 'log' / 'libvirt', ++ install_prefix + localstatedir / 'log' / 'libvirt', + ] + + logrotate_conf =3D configuration_data() +@@ -259,7 +259,7 @@ if conf.has('WITH_REMOTE') + ) + install_data( + log_file, +- install_dir: sysconfdir / 'logrotate.d', ++ install_dir: install_prefix + sysconfdir / 'logrotate.d', + rename: [ name ], + ) + endforeach +@@ -309,7 +309,7 @@ endif + if conf.has('WITH_SASL') + install_data( + 'libvirtd.sasl', +- install_dir: sysconfdir / 'sasl2', ++ install_dir: install_prefix + sysconfdir / 'sasl2', + rename: [ 'libvirt.conf' ], + ) + endif +diff --git a/src/security/apparmor/meson.build b/src/security/apparmor/me= son.build +index af43780..e2d6c81 100644 +--- a/src/security/apparmor/meson.build ++++ b/src/security/apparmor/meson.build +@@ -17,22 +17,22 @@ foreach name : apparmor_gen_profiles + output: name, + configuration: apparmor_gen_profiles_conf, + install: true, +- install_dir: apparmor_dir, ++ install_dir: install_prefix + apparmor_dir, + ) + endforeach + + install_data( + [ 'libvirt-qemu', 'libvirt-lxc' ], +- install_dir: apparmor_dir / 'abstractions', ++ install_dir: install_prefix + apparmor_dir / 'abstractions', + ) + + install_data( + [ 'TEMPLATE.qemu', 'TEMPLATE.lxc' ], +- install_dir: apparmor_dir / 'libvirt', ++ install_dir: install_prefix + apparmor_dir / 'libvirt', + ) + + install_data( + 'usr.lib.libvirt.virt-aa-helper.local', +- install_dir: apparmor_dir / 'local', ++ install_dir: install_prefix + apparmor_dir / 'local', + rename: 'usr.lib.libvirt.virt-aa-helper', + ) +diff --git a/tools/meson.build b/tools/meson.build +index b8c6802..dacd0ff 100644 +--- a/tools/meson.build ++++ b/tools/meson.build +@@ -115,7 +115,7 @@ if conf.has('WITH_LOGIN_SHELL') + install_rpath: libvirt_rpath, + ) + +- install_data('virt-login-shell.conf', install_dir: sysconfdir / 'libvi= rt') ++ install_data('virt-login-shell.conf', install_dir: install_prefix + sy= sconfdir / 'libvirt') + endif + + if host_machine.system() =3D=3D 'windows' +@@ -274,7 +274,7 @@ configure_file( + if init_script =3D=3D 'systemd' + install_data( + 'libvirt-guests.sysconf', +- install_dir: sysconfdir / 'sysconfig', ++ install_dir: install_prefix + sysconfdir / 'sysconfig', + rename: 'libvirt-guests', + ) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization= .scm index 4e7f9c8e4e..3a71720599 100644 =2D-- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -12,7 +12,7 @@ ;;; Copyright =C2=A9 2018 Julien Lepiller ;;; Copyright =C2=A9 2019 Guy Fleury Iteriteka ;;; Copyright =C2=A9 2020 Jakub K=C4=85dzio=C5=82ka -;;; Copyright =C2=A9 2020 Brice Waegeneire +;;; Copyright =C2=A9 2020, 2021 Brice Waegeneire ;;; Copyright =C2=A9 2020 Mathieu Othacehe ;;; Copyright =C2=A9 2020 Marius Bakke ;;; Copyright =C2=A9 2020, 2021 Maxim Cournoyer @@ -42,6 +42,7 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages backup) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages build-tools) #:use-module (gnu packages check) @@ -97,6 +98,7 @@ #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages readline) #:use-module (gnu packages selinux) #:use-module (gnu packages sdl) #:use-module (gnu packages sphinx) @@ -1065,66 +1067,48 @@ manage system or application containers.") (define-public libvirt (package (name "libvirt") - (version "5.8.0") + (version "7.2.0") (source (origin (method url-fetch) (uri (string-append "https://libvirt.org/sources/libvirt-" version ".tar.xz")) (sha256 - (base32 "0m8cqaqflvys5kaqpvb0qr4k365j09jc5xk6x70yvg8qkcl2hcz2")) - (patches - (search-patches "libvirt-create-machine-cgroup.patch")))) - (build-system gnu-build-system) + (base32 "1l6i1rz1v9rnp61sgzlrlbsfh03208dbm3b259i0jl5sqz85kx01")) + (patches (search-patches "libvirt-add-install-prefix.patch")))) + (build-system meson-build-system) (arguments `(#:configure-flags - (list "--with-qemu" - "--with-qemu-user=3Dnobody" - "--with-qemu-group=3Dkvm" - "--with-storage-disk" - "--with-storage-dir" - "--with-polkit" - (string-append "--docdir=3D" (assoc-ref %outputs "out") "/sh= are/doc/" + (list "-Ddriver_qemu=3Denabled" + "-Dqemu_user=3Dnobody" + "-Dqemu_group=3Dkvm" + "-Dstorage_disk=3Denabled" + "-Dstorage_dir=3Denabled" + "-Dpolkit=3Denabled" + "-Dnls=3Denabled" ;translations + (string-append "-Ddocdir=3D" (assoc-ref %outputs "out") "/sh= are/doc/" ,name "-" ,version) + "-Dbash_completion=3Denabled" + (string-append "-Dinstall_prefix=3D" (assoc-ref %outputs "ou= t")) "--sysconfdir=3D/etc" "--localstatedir=3D/var") + #:meson ,meson-0.55 #:phases (modify-phases %standard-phases - (add-before 'configure 'fix-BOURNE_SHELL-definition - ;; BOURNE_SHELL is hard-#defined to =E2=80=98/bin/sh=E2=80=99,= causing test failures. - (lambda _ - (substitute* "config.h.in" - (("/bin/sh") (which "sh"))) - #t)) - (add-before 'configure 'patch-libtirpc-file-names - (lambda* (#:key inputs #:allow-other-keys) - ;; libvirt uses an m4 macro instead of pkg-config to determi= ne where - ;; the RPC headers are located. Tell it to look in the righ= t place. - (substitute* "configure" - (("/usr/include/tirpc") ;defined in m4/virt-xdr.m4 - (string-append (assoc-ref inputs "libtirpc") - "/include/tirpc"))) - #t)) (add-before 'configure 'disable-broken-tests (lambda _ - (let ((tests (list "commandtest" ; hangs idly - "qemuxml2argvtest" ; fails - "qemuhotplugtest" ; fails - "virnetsockettest" ; tries to network - "virshtest"))) ; fails - (substitute* "tests/Makefile.in" - (((format #f "(~a)\\$\\(EXEEXT\\)" (string-join tests "|= "))) + (let ((tests (list "commandtest" ; hangs idly + "qemuxml2argvtest" ; fails + "virnetsockettest"))) ; tries to networ= k + (substitute* "tests/meson.build" + (((format #f ".*'name': '(~a)'.*" (string-join tests "|"= ))) "")) #t))) - (replace 'install - ;; Since the sysconfdir and localstatedir should be /etc and /= var - ;; at runtime, we must prevent writing to them at installation - ;; time. - (lambda* (#:key make-flags #:allow-other-keys) - (apply invoke "make" "install" - "sysconfdir=3D/tmp/etc" - "localstatedir=3D/tmp/var" - make-flags)))))) + (add-before 'install 'no-polkit-magic + ;; Meson =E2=80=98magically=E2=80=99 invokes pkexec, which fai= ls (not setuid). + (lambda _ + (setenv "PKEXEC_UID" "something") + #t))))) (inputs `(("libxml2" ,libxml2) ("eudev" ,eudev) @@ -1133,11 +1117,13 @@ manage system or application containers.") ("dbus" ,dbus) ("libpcap" ,libpcap) ("libnl" ,libnl) + ("libssh2" ,libssh2) ;optional ("libtirpc" ,libtirpc) ;for ("libuuid" ,util-linux "lib") ("lvm2" ,lvm2) ;for libdevmapper ("curl" ,curl) ("openssl" ,openssl) + ("readline" ,readline) ("cyrus-sasl" ,cyrus-sasl) ("libyajl" ,libyajl) ("audit" ,audit) @@ -1148,11 +1134,15 @@ manage system or application containers.") ("iproute" ,iproute) ("iptables" ,iptables))) (native-inputs - `(("xsltproc" ,libxslt) + `(("bash-completion" ,bash-completion) + ("gettext" ,gettext-minimal) + ("xsltproc" ,libxslt) ("perl" ,perl) ("pkg-config" ,pkg-config) ("polkit" ,polkit) - ("python" ,python-wrapper))) + ("python" ,python-wrapper) + ("python-docutils" ,python-docutils) ;for rst2html + ("rpcsvc-proto" ,rpcsvc-proto))) ;for rpcgen (home-page "https://libvirt.org") (synopsis "Simple API for virtualization") (description "Libvirt is a C toolkit to interact with the virtualizat= ion =2D- 2.31.1