Received: (at 46623) by debbugs.gnu.org; 18 Feb 2021 20:48:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 18 15:48:42 2021 Received: from localhost ([127.0.0.1]:48195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lCqDx-00051c-HU for submit <at> debbugs.gnu.org; Thu, 18 Feb 2021 15:48:42 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]:38551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <brice@HIDDEN>) id 1lCqDq-00050f-6F for 46623 <at> debbugs.gnu.org; Thu, 18 Feb 2021 15:48:32 -0500 Received: from localhost (i15-les02-ntr-176-181-186-101.sfr.lns.abo.bbox.fr [176.181.186.101]) (Authenticated sender: brice@HIDDEN) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 4C73C100004 for <46623 <at> debbugs.gnu.org>; Thu, 18 Feb 2021 20:48:18 +0000 (UTC) From: Brice Waegeneire <brice@HIDDEN> To: 46623 <at> debbugs.gnu.org Subject: [PATCH 4/4] gnu: libvirt: Update to 7.0.0. Date: Thu, 18 Feb 2021 21:48:12 +0100 Message-Id: <20210218204812.21093-4-brice@HIDDEN> X-Mailer: git-send-email 2.30.1 In-Reply-To: <87zh015d48.fsf@HIDDEN> References: <87zh015d48.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46623 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * gnu/packages/virtualization.scm (libvirt): Update to 7.0.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. --- gnu/local.mk | 4 +- .../patches/libvirt-add-install-prefix.patch | 329 ++++++++++++++++++ .../libvirt-create-machine-cgroup.patch | 48 --- gnu/packages/virtualization.scm | 83 ++--- 4 files changed, 368 insertions(+), 96 deletions(-) create mode 100644 gnu/packages/patches/libvirt-add-install-prefix.patch delete mode 100644 gnu/packages/patches/libvirt-create-machine-cgroup.patch diff --git a/gnu/local.mk b/gnu/local.mk index 250901f6d9..ce3a1aef96 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -34,7 +34,7 @@ # Copyright © 2020 Felix Gruber <felgru@HIDDEN> # Copyright © 2020 Ryan Prior <rprior@HIDDEN> # Copyright © 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@HIDDEN> -# Copyright © 2020 Brice Waegeneire <brice@HIDDEN> +# Copyright © 2020, 2021 Brice Waegeneire <brice@HIDDEN> # Copyright © 2020 Tanguy Le Carrour <tanguy@HIDDEN> # Copyright © 2020 Martin Becze <mjbecze@HIDDEN> # Copyright © 2020 Malte Frank Gerdes <mate.f.gerdes@HIDDEN> @@ -1219,7 +1219,7 @@ dist_patch_DATA = \ %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/packages/patches/libvirt-add-install-prefix.patch new file mode 100644 index 0000000000..1331fa9b6f --- /dev/null +++ b/gnu/packages/patches/libvirt-add-install-prefix.patch @@ -0,0 +1,329 @@ +Patch from NixOS: +https://raw.githubusercontent.com/NixOS/nixpkgs/b98031a49c66095dd1eb9185ecdaeeb5e3cd752d/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 <euank@HIDDEN> +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() == 'windows' + conf.set('WINVER', '0x0600') # Win Vista / Server 2008 + endif + ++# patched in for nix ++install_prefix = get_option('install_prefix') + + # set various paths + +@@ -57,6 +59,13 @@ else + sysconfdir = 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 = get_option('localstatedir') ++# Same for sysconfidr ++sysconfdir = 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 == '/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 git submodule update') + option('packager', type: 'string', value: '', description: 'Extra packager name') + option('packager_version', type: 'string', value: '', description: 'Extra 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 += [ +- 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 += [ +- localstatedir / 'lib' / 'libvirt' / 'lockd', +- localstatedir / 'lib' / 'libvirt' / 'lockd' / 'files', +- runstatedir / 'libvirt' / 'lockd', ++ install_prefix + localstatedir / 'lib' / 'libvirt' / 'lockd', ++ install_prefix + localstatedir / 'lib' / 'libvirt' / 'lockd' / 'files', ++ install_prefix + runstatedir / 'libvirt' / 'lockd', + ] + + if conf.has('WITH_SANLOCK') + virt_install_dirs += [ +- 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 += [ +- 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 += '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 != '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 += [ +- 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 += [ +- 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 = [ + 'qemu-announce-self.xml', + ] + +-install_data(nwfilter_xml_files, install_dir: sysconfdir / 'libvirt' / 'nwfilter') ++install_data(nwfilter_xml_files, install_dir: install_prefix + sysconfdir / '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 += [ +- 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 += [ +- localstatedir / 'log' / 'libvirt', ++ install_prefix + localstatedir / 'log' / 'libvirt', + ] + + logrotate_conf = 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/meson.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 / 'libvirt') ++ install_data('virt-login-shell.conf', install_dir: install_prefix + sysconfdir / 'libvirt') + endif + + if host_machine.system() == 'windows' +@@ -274,7 +274,7 @@ configure_file( + if init_script == 'systemd' + install_data( + 'libvirt-guests.sysconf', +- install_dir: sysconfdir / 'sysconfig', ++ install_dir: install_prefix + sysconfdir / 'sysconfig', + rename: 'libvirt-guests', + ) diff --git a/gnu/packages/patches/libvirt-create-machine-cgroup.patch b/gnu/packages/patches/libvirt-create-machine-cgroup.patch deleted file mode 100644 index 585ac237e1..0000000000 --- a/gnu/packages/patches/libvirt-create-machine-cgroup.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 9ca0b2955edea162b255b428e493cd8ffac52167 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= - <rosen644835@HIDDEN> -Date: Fri, 1 Nov 2019 17:29:00 +0100 -Subject: [PATCH] vircgroup: Ensure /machine group is associated with its - parent. - -Call first virCgroupNew on the parent group virCgroupNewPartition if -it is available on before the creation of the child group. This -ensures that the creation of a first level group on the unified -architecture, as the check at virCgroupV2ParseControllersFile as the -parent file is there. - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1760233 ---- - src/util/vircgroup.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c -index b46f20abfd..33c61f2d45 100644 ---- a/src/util/vircgroup.c -+++ b/src/util/vircgroup.c -@@ -855,9 +855,6 @@ virCgroupNewPartition(const char *path, - if (virCgroupSetPartitionSuffix(path, &newPath) < 0) - goto cleanup; - -- if (virCgroupNew(-1, newPath, NULL, controllers, group) < 0) -- goto cleanup; -- - if (STRNEQ(newPath, "/")) { - char *tmp; - parentPath = g_strdup(newPath); -@@ -868,7 +865,12 @@ virCgroupNewPartition(const char *path, - - if (virCgroupNew(-1, parentPath, NULL, controllers, &parent) < 0) - goto cleanup; -+ } - -+ if (virCgroupNew(-1, newPath, parent, controllers, group) < 0) -+ goto cleanup; -+ -+ if (parent) { - if (virCgroupMakeGroup(parent, *group, create, VIR_CGROUP_NONE) < 0) - goto cleanup; - } --- -2.23.0 - diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 319b57445e..4f0ba1c8ff 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -12,7 +12,7 @@ ;;; Copyright © 2018 Julien Lepiller <julien@HIDDEN> ;;; Copyright © 2019 Guy Fleury Iteriteka <hoonandon@HIDDEN> ;;; Copyright © 2020 Jakub Kądziołka <kuba@HIDDEN> -;;; Copyright © 2020 Brice Waegeneire <brice@HIDDEN> +;;; Copyright © 2020, 2021 Brice Waegeneire <brice@HIDDEN> ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@HIDDEN> ;;; Copyright © 2020 Marius Bakke <mbakke@HIDDEN> ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@HIDDEN> @@ -41,7 +41,9 @@ #: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) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) @@ -93,6 +95,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) @@ -1015,66 +1018,48 @@ manage system or application containers.") (define-public libvirt (package (name "libvirt") - (version "5.8.0") + (version "7.0.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 "12fxkpy7j2qhfxypw9jg3bzdd9xx6vf6x96iy5kjihh89n236f6a")) + (patches (search-patches "libvirt-add-install-prefix.patch")))) + (build-system meson-build-system) (arguments `(#:configure-flags - (list "--with-qemu" - "--with-qemu-user=nobody" - "--with-qemu-group=kvm" - "--with-storage-disk" - "--with-storage-dir" - "--with-polkit" - (string-append "--docdir=" (assoc-ref %outputs "out") "/share/doc/" + (list "-Ddriver_qemu=enabled" + "-Dqemu_user=nobody" + "-Dqemu_group=kvm" + "-Dstorage_disk=enabled" + "-Dstorage_dir=enabled" + "-Dpolkit=enabled" + "-Dnls=enabled" ;translations + (string-append "-Ddocdir=" (assoc-ref %outputs "out") "/share/doc/" ,name "-" ,version) + "-Dbash_completion=enabled" + (string-append "-Dinstall_prefix=" (assoc-ref %outputs "out")) "--sysconfdir=/etc" "--localstatedir=/var") + #:meson ,meson-0.55 #:phases (modify-phases %standard-phases - (add-before 'configure 'fix-BOURNE_SHELL-definition - ;; BOURNE_SHELL is hard-#defined to ‘/bin/sh’, 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 determine where - ;; the RPC headers are located. Tell it to look in the right 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 network + (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=/tmp/etc" - "localstatedir=/tmp/var" - make-flags)))))) + (add-before 'install 'no-polkit-magic + ;; Meson ‘magically’ invokes pkexec, which fails (not setuid). + (lambda _ + (setenv "PKEXEC_UID" "something") + #t))))) (inputs `(("libxml2" ,libxml2) ("eudev" ,eudev) @@ -1083,11 +1068,13 @@ manage system or application containers.") ("dbus" ,dbus) ("libpcap" ,libpcap) ("libnl" ,libnl) + ("libssh2" ,libssh2) ;optional ("libtirpc" ,libtirpc) ;for <rpc/rpc.h> ("libuuid" ,util-linux "lib") ("lvm2" ,lvm2) ;for libdevmapper ("curl" ,curl) ("openssl" ,openssl) + ("readline" ,readline) ("cyrus-sasl" ,cyrus-sasl) ("libyajl" ,libyajl) ("audit" ,audit) @@ -1098,11 +1085,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 virtualization -- 2.30.1
guix-patches@HIDDEN
:bug#46623
; Package guix-patches
.
Full text available.Received: (at 46623) by debbugs.gnu.org; 18 Feb 2021 20:48:26 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 18 15:48:26 2021 Received: from localhost ([127.0.0.1]:48192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lCqDq-00051B-7s for submit <at> debbugs.gnu.org; Thu, 18 Feb 2021 15:48:26 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:60171) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <brice@HIDDEN>) id 1lCqDn-00050b-RQ for 46623 <at> debbugs.gnu.org; Thu, 18 Feb 2021 15:48:24 -0500 X-Originating-IP: 176.181.186.101 Received: from localhost (i15-les02-ntr-176-181-186-101.sfr.lns.abo.bbox.fr [176.181.186.101]) (Authenticated sender: brice@HIDDEN) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 42D39240005 for <46623 <at> debbugs.gnu.org>; Thu, 18 Feb 2021 20:48:16 +0000 (UTC) From: Brice Waegeneire <brice@HIDDEN> To: 46623 <at> debbugs.gnu.org Subject: [PATCH 2/4] services: libvirt: Change unix-sock-group default. Date: Thu, 18 Feb 2021 21:48:10 +0100 Message-Id: <20210218204812.21093-2-brice@HIDDEN> X-Mailer: git-send-email 2.30.1 In-Reply-To: <87zh015d48.fsf@HIDDEN> References: <87zh015d48.fsf@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46623 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) When accessing libvrt remotely, polkit can't be used so unless using the root account it's better give access to the libvirt-sock to the libvirt group by default. * gnu/services/virtualization.scm (libvirt-configuration)[unix-sock-group]: Change default from "root" to "libvirt". --- gnu/services/virtualization.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index a45da14a80..afc47ff578 100644 --- a/gnu/services/virtualization.scm +++ b/gnu/services/virtualization.scm @@ -168,7 +168,7 @@ stopping the Avahi daemon.") "Default mDNS advertisement name. This must be unique on the immediate broadcast network.") (unix-sock-group - (string "root") + (string "libvirt") "UNIX domain socket group ownership. This can be used to allow a 'trusted' set of users access to management capabilities without becoming root.") -- 2.30.1
guix-patches@HIDDEN
:bug#46623
; Package guix-patches
.
Full text available.Received: (at 46623) by debbugs.gnu.org; 18 Feb 2021 20:48:26 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 18 15:48:26 2021 Received: from localhost ([127.0.0.1]:48190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lCqDp-000513-SS for submit <at> debbugs.gnu.org; Thu, 18 Feb 2021 15:48:26 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:50497) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <brice@HIDDEN>) id 1lCqDn-00050Y-3z for 46623 <at> debbugs.gnu.org; Thu, 18 Feb 2021 15:48:24 -0500 Received: from localhost (i15-les02-ntr-176-181-186-101.sfr.lns.abo.bbox.fr [176.181.186.101]) (Authenticated sender: brice@HIDDEN) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 44BDD200009 for <46623 <at> debbugs.gnu.org>; Thu, 18 Feb 2021 20:48:15 +0000 (UTC) From: Brice Waegeneire <brice@HIDDEN> To: 46623 <at> debbugs.gnu.org Subject: [PATCH 1/4] gnu: libvirt: Enable disk and directory storage. Date: Thu, 18 Feb 2021 21:48:09 +0100 Message-Id: <20210218204812.21093-1-brice@HIDDEN> X-Mailer: git-send-email 2.30.1 In-Reply-To: <87zh015d48.fsf@HIDDEN> References: <87zh015d48.fsf@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46623 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) * gnu/packages/virtualization.scm (libvirt)[inputs]: Add parted. [arguments]: Add configure flags to support disk and directory storage. --- gnu/packages/virtualization.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 8da57cf6ab..319b57445e 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -1031,6 +1031,8 @@ manage system or application containers.") (list "--with-qemu" "--with-qemu-user=nobody" "--with-qemu-group=kvm" + "--with-storage-disk" + "--with-storage-dir" "--with-polkit" (string-append "--docdir=" (assoc-ref %outputs "out") "/share/doc/" ,name "-" ,version) @@ -1092,6 +1094,7 @@ manage system or application containers.") ("dmidecode" ,dmidecode) ("dnsmasq" ,dnsmasq) ("ebtables" ,ebtables) + ("parted" ,parted) ("iproute" ,iproute) ("iptables" ,iptables))) (native-inputs -- 2.30.1
guix-patches@HIDDEN
:bug#46623
; Package guix-patches
.
Full text available.Received: (at 46623) by debbugs.gnu.org; 18 Feb 2021 20:48:26 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 18 15:48:25 2021 Received: from localhost ([127.0.0.1]:48188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lCqDp-000511-JB for submit <at> debbugs.gnu.org; Thu, 18 Feb 2021 15:48:25 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:44609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <brice@HIDDEN>) id 1lCqDn-00050c-Nr for 46623 <at> debbugs.gnu.org; Thu, 18 Feb 2021 15:48:24 -0500 Received: from localhost (i15-les02-ntr-176-181-186-101.sfr.lns.abo.bbox.fr [176.181.186.101]) (Authenticated sender: brice@HIDDEN) by relay12.mail.gandi.net (Postfix) with ESMTPSA id DB9C2200006 for <46623 <at> debbugs.gnu.org>; Thu, 18 Feb 2021 20:48:17 +0000 (UTC) From: Brice Waegeneire <brice@HIDDEN> To: 46623 <at> debbugs.gnu.org Subject: [PATCH 3/4] services: libvirt: Add qemu field. Date: Thu, 18 Feb 2021 21:48:11 +0100 Message-Id: <20210218204812.21093-3-brice@HIDDEN> X-Mailer: git-send-email 2.30.1 In-Reply-To: <87zh015d48.fsf@HIDDEN> References: <87zh015d48.fsf@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46623 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) * gnu/services/virtualization.scm (libvirt-configuration): Add 'qemu' field. (libvirt-service-type): Replace 'qemu' package with the one specified in the service configuration. --- gnu/services/virtualization.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index afc47ff578..a0820c9bab 100644 --- a/gnu/services/virtualization.scm +++ b/gnu/services/virtualization.scm @@ -131,6 +131,10 @@ (libvirt (package libvirt) "Libvirt package.") + (qemu + (package qemu) + "Qemu package.") + (listen-tls? (boolean #t) "Flag listening for secure TLS connections on the public TCP/IP port. @@ -485,7 +489,7 @@ potential infinite waits blocking libvirt.")) (lambda (config) (list (libvirt-configuration-libvirt config) - qemu))) + (libvirt-configuration-qemu config)))) (service-extension activation-service-type %libvirt-activation) (service-extension shepherd-root-service-type -- 2.30.1
guix-patches@HIDDEN
:bug#46623
; Package guix-patches
.
Full text available.Received: (at submit) by debbugs.gnu.org; 18 Feb 2021 20:35:06 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 18 15:35:06 2021 Received: from localhost ([127.0.0.1]:48148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lCq0h-0002Z6-CT for submit <at> debbugs.gnu.org; Thu, 18 Feb 2021 15:35:06 -0500 Received: from lists.gnu.org ([209.51.188.17]:55780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <brice@HIDDEN>) id 1lCq0f-0002Yy-QZ for submit <at> debbugs.gnu.org; Thu, 18 Feb 2021 15:34:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <brice@HIDDEN>) id 1lCq0e-0006Wp-Km for guix-patches@HIDDEN; Thu, 18 Feb 2021 15:34:49 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:34577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <brice@HIDDEN>) id 1lCq0b-0000j8-0i for guix-patches@HIDDEN; Thu, 18 Feb 2021 15:34:48 -0500 Received: from localhost (i15-les02-ntr-176-181-186-101.sfr.lns.abo.bbox.fr [176.181.186.101]) (Authenticated sender: brice@HIDDEN) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 324E7200004 for <guix-patches@HIDDEN>; Thu, 18 Feb 2021 20:34:38 +0000 (UTC) From: Brice Waegeneire <brice@HIDDEN> To: guix-patches@HIDDEN Subject: [PATCH 0/4] gnu: libvirt: Update to 7.0.0. Date: Thu, 18 Feb 2021 21:24:24 +0100 Message-ID: <87zh015d48.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.178.232; envelope-from=brice@HIDDEN; helo=relay12.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.3 (/) This patch set update libvirt to 7.0.0, it has only 3 package depending on it. The build system is changed to meson as upstream deprecated the one we where ussing. It also add the ability to select with qemu package, libvirt service uses. Brice Waegeneire (4): gnu: libvirt: Enable disk and directory storage. services: libvirt: Change unix-sock-group default. services: libvirt: Add qemu field. gnu: libvirt: Update to 7.0.0. gnu/local.mk | 4 +- .../patches/libvirt-add-install-prefix.patch | 329 ++++++++++++++++++ .../libvirt-create-machine-cgroup.patch | 48 --- gnu/packages/virtualization.scm | 82 ++--- gnu/services/virtualization.scm | 8 +- 5 files changed, 375 insertions(+), 96 deletions(-) create mode 100644 gnu/packages/patches/libvirt-add-install-prefix.patch delete mode 100644 gnu/packages/patches/libvirt-create-machine-cgroup.patch -- 2.30.1
Brice Waegeneire <brice@HIDDEN>
:guix-patches@HIDDEN
.
Full text available.guix-patches@HIDDEN
:bug#46623
; Package guix-patches
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.