From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id gGBRN+FpVmB5UAAA0tVLHw (envelope-from ) for ; Sat, 20 Mar 2021 21:32:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mHEnM+FpVmCZBQAAB5/wlQ (envelope-from ) for ; Sat, 20 Mar 2021 21:32:17 +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 5325113484 for ; Sat, 20 Mar 2021 22:32:17 +0100 (CET) Received: from localhost ([::1]:36398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNjCi-0007Jz-9a for larch@yhetil.org; Sat, 20 Mar 2021 17:32:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNjCV-0007In-Kq for guix-patches@gnu.org; Sat, 20 Mar 2021 17:32:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41687) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNjCU-0002iW-P3 for guix-patches@gnu.org; Sat, 20 Mar 2021 17:32:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNjCU-0004sK-M6 for guix-patches@gnu.org; Sat, 20 Mar 2021 17:32:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47285] [PATCH 1/4] gnu: libvirt: Update to 7.1.0. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 21:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47285 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47285@debbugs.gnu.org Cc: Pierre Langlois Received: via spool by 47285-submit@debbugs.gnu.org id=B47285.161627590818697 (code B ref 47285); Sat, 20 Mar 2021 21:32:02 +0000 Received: (at 47285) by debbugs.gnu.org; 20 Mar 2021 21:31:48 +0000 Received: from localhost ([127.0.0.1]:53228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNjCG-0004rN-8J for submit@debbugs.gnu.org; Sat, 20 Mar 2021 17:31:48 -0400 Received: from mout.gmx.net ([212.227.17.22]:58087) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNjC3-0004qd-97 for 47285@debbugs.gnu.org; Sat, 20 Mar 2021 17:31:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1616275888; bh=PjB6VlbNrEWGsIV7ofNL826dHiwfGUh7QX1i0IlNy9w=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=IzhGRO0/wSQw4Jy5EVDc+E9/Ky6sih9uos4XttwSBT2FTdauHTzDuNQcmkH5/Z4nn ItWIFmjZC7eM2Phf9pIGR+9nsJPQGjvvWvcXoFuzjyfNlRTLDx1rJWTvg4OoU6bhbx lyvacWIrg0L2OB9SLVqefP44oHte6d+5tIe2Ngoc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([82.69.64.142]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MS3mt-1lGk7X13pD-00TRoT; Sat, 20 Mar 2021 22:31:28 +0100 From: Pierre Langlois Date: Sat, 20 Mar 2021 21:31:22 +0000 Message-Id: <20210320213125.11295-1-pierre.langlois@gmx.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <87o8fdwmdn.fsf@gmx.com> References: <87o8fdwmdn.fsf@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Xq2A1Igjr+FKbJEkQdh4mhAQhD745Id4+ljJ7r/xyR4Q4cJBkQb 4uzZkgsSEuljbOt3yINSqT4zqFRQOX8+1bMw9PWqSim1+/C/WDCsjV12xkDYKguEq1yDt+d +SBs/8Wxa0CiZF1++KO5FtG+LKusOAHPHI2nMWBJHOwWrHPt8GsFOHwNmyh1NWhLQP7GclJ JJe6KGmdEranuz3e9/w3w== X-UI-Out-Filterresults: notjunk:1;V03:K0:FbhrL3kWqQQ=:Jhz2xS0ZU8VKGEbRpJVEmA ziysGeDzQbdIuCWO6majY+WVaLBRh2eSjjWjAgv1hLVGR67Y3tTPiVWPN2xaIpL81VzCmRb3h cd2gM26cU+qbqBs65NwzST8sS+Sve65+AX0d3PX1gHXusM9Wx6t1o9OVvRgRXOtlVK/FmN7rA 0ETa577VgCCJk2e/QD0m0oKtGn//Jp+ZdWmZnz3EWn1lYXjak83TSnmuhCu7GgAVI6kv4mobh wylcfmaDKbcFmhKElDq1iEzAwacdcb1wyIOF/94mm2ji3EP2aNb0v3aBR/jvbMSfD7HLu0dYV jy5PJyjhCiQw/TOlGFPHNS/BMYwElaQDXFHfTY9HFzlKrPop1VhpSrFeyeG6cCWLVsH79Ug23 7uog/czi5SpCgHenIM4oY81mom1Ir4CfZN3GquWcNKBKanPJQWq844g6IECJb3Fcy4+z1rG2v bFttUBotUMi3DT0JxZ5YkV5GrZ7GjFwHlRmoxFebafTFsyQOqvLgtUttc73NngWa1of/bk+wp Syuu9L9na9L8yhG2YwuoE2ykEk2FQ4pNXhyit6nexQdhLtzuNfAGlqZFEKVu+qTwccdrDWFeM 0i0ttiHJXGBa4w63rAvlbNEBYWupeLmTzYh8XeTcJt1VhScReXcS7oQdgcAYot6xsODnMtthV 6g/GBBDHfbYjMwNM3T6avkt+ZNDX4p0HrfXkgD4A03Du++w6ABMpCNCDdSBshJn+T5ysM6JvE CmdvtGdLMOJmkhWGoV8aPvGFuAkZ6lVuHiEvWR2BB3ajokCRdDwOxADTdAlq8xreXRUu7nY+x WbYW9rWjFX2oXNyzE6nQEAFFjZ++GRc4LHtXn7F0LbIQKo86WW2rWAb7WDogqpMEXT5bUiobq vdBCap6jj63ehHerkR7Q== 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=1616275937; 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=3aT6gHqO+Gobv2r+j+pfPY/M6LSVvv5l+P4Zl2XkZc8=; b=LbBHj1q7QDgwI5H4U2gNlMpG1R9RavUJkrLcFBw502Z7En/QYajCQRp7SW6kbSv6sKj4sj FWaI7Zx3ddTihSjoYpjrGeHZ4WVQCugeGcHG30FDWB8RRQS8jjSJGrqBk/9de49/uJP8U6 VYrjcxTDOMvk61yGh2pYENJLYgKbNt2rUH8iyeRsOnzy64t6GKp8b0Mx5gIApVrPzBAOIP 8k96uXH6o0+TQntSeh+da2mjoaJSTroAuHEPZuU+tckJxnFMYHMCLTkSMcqoxr7sbdc0oD PrV9nhPujeWmnBq731rI3Oh1O0/CBNM3z9nF5avO8J1ByU8+MQcvF4k8mPqLCQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616275937; a=rsa-sha256; cv=none; b=A6XMZA8syZpzyffTqfdQxAwWl4fcpwJ01DltHWfTsqqFoDDY/K2Qo0YJJLhC/1xVUANZha BMMpKMALhHkV/2E8yM6iFYgdwNX3hPppiWK4gL1CalrczaQiv4EOiHtcwr4xxdT8GCNu+v kZh/3K/HoHgofhTx9wDm92M1pLV32jSGcnZB0wEn3WmadcprYMv4weimDi6zgMMhgMBOih Iu4TeR/g14W3axWFU8egldOW8eaOjMguqbnC9ENRXQMqas6QpFvcfXHtRaXgpuoCMvMXb9 f0qZtyJqR6Bpq/H9ngYt99wskjQUv9ymNnl6kqfS6ivbZL3SsGMfTVobbT3TAA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b="IzhGRO0/"; 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: -0.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b="IzhGRO0/"; 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: 5325113484 X-Spam-Score: -0.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8Mvw1MI5QFMS * gnu/packages/virtualization.scm (libvirt): Update to 7.1.0. [source]: Remove libvirt-create-machine-cgroup.patch, add libvirt-do-not-create-var-dirs.patch. [build-system]: Switch to meson-build-system. [arguments]: Use meson-0.55. Adapt #:configure-flags for meson, there is = no need for --docdir anymore. Remove fix-BOURNE_SHELL-definition phase. Add fix-sysconfdir-and-localstatedir phase. Adapt disable-broken-tests to mes= on. [native-inputs]: Add python-docutils and rpcsvc-proto. * gnu/packages/patches/libvirt-create-machine-cgroup.patch: Delete. * gnu/packages/patches/libvirt-do-not-create-var-dirs.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add new patch, remove the other. =2D-- gnu/local.mk | 2 +- .../libvirt-create-machine-cgroup.patch | 48 ------------ .../libvirt-do-not-create-var-dirs.patch | 30 +++++++ gnu/packages/virtualization.scm | 78 ++++++++----------- 4 files changed, 64 insertions(+), 94 deletions(-) delete mode 100644 gnu/packages/patches/libvirt-create-machine-cgroup.pat= ch create mode 100644 gnu/packages/patches/libvirt-do-not-create-var-dirs.pa= tch diff --git a/gnu/local.mk b/gnu/local.mk index 3d4147a879..cd755f5d67 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -1257,7 +1257,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-do-not-create-var-dirs.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-create-machine-cgroup.patch b/gn= u/packages/patches/libvirt-create-machine-cgroup.patch deleted file mode 100644 index 585ac237e1..0000000000 =2D-- 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: =3D?UTF-8?q?Miguel=3D20=3DC3=3D81ngel=3D20Arruga=3D20Vivas?=3D - -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=3D1760233 =2D--- - 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 =2D--- 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; - =2D- if (virCgroupNew(-1, newPath, NULL, controllers, group) < 0) =2D- goto cleanup; =2D- - if (STRNEQ(newPath, "/")) { - char *tmp; - parentPath =3D 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; - } =2D-- -2.23.0 - diff --git a/gnu/packages/patches/libvirt-do-not-create-var-dirs.patch b/g= nu/packages/patches/libvirt-do-not-create-var-dirs.patch new file mode 100644 index 0000000000..640cb1696d =2D-- /dev/null +++ b/gnu/packages/patches/libvirt-do-not-create-var-dirs.patch @@ -0,0 +1,30 @@ +We define localstatedir as /var, and so we shouldn't be installing empty +directories there. + +diff --git a/src/meson.build b/src/meson.build +index f13b85b74e..58040f2c5d 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -893,22 +893,6 @@ if conf.has('WITH_DTRACE_PROBES') + ) + endif + +- +-# Install empty directories +- +-virt_install_dirs +=3D [ +- localstatedir / 'cache' / 'libvirt', +- localstatedir / 'lib' / 'libvirt' / 'images', +- localstatedir / 'lib' / 'libvirt' / 'filesystems', +- localstatedir / 'lib' / 'libvirt' / 'boot', +-] +- +-meson.add_install_script( +- meson_python_prog.path(), python3_prog.path(), meson_install_dirs_prog= .path(), +- virt_install_dirs, +-) +- +- + # Check driver files + + if host_machine.system() =3D=3D 'linux' diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization= .scm index fabac5b984..86a95b77f1 100644 =2D-- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -18,6 +18,7 @@ ;;; Copyright =C2=A9 2020, 2021 Maxim Cournoyer ;;; Copyright =C2=A9 2020 Brett Gilio ;;; Copyright =C2=A9 2021 Leo Famulari +;;; Copyright =C2=A9 2021 Pierre Langlois ;;; ;;; This file is part of GNU Guix. ;;; @@ -1065,64 +1066,49 @@ manage system or application containers.") (define-public libvirt (package (name "libvirt") - (version "5.8.0") + (version "7.1.0") (source (origin (method url-fetch) (uri (string-append "https://libvirt.org/sources/libvirt-" version ".tar.xz")) (sha256 - (base32 "0m8cqaqflvys5kaqpvb0qr4k365j09jc5xk6x70yvg8qkcl2hcz2")) + (base32 "0v50ckf56h6jd9bmqwp0lh2cmb7qqjmcb6y3mz2i2r15h06ih3w7")) (patches - (search-patches "libvirt-create-machine-cgroup.patch")))) - (build-system gnu-build-system) + (search-patches "libvirt-do-not-create-var-dirs.patch")))) + (build-system meson-build-system) (arguments - `(#:configure-flags - (list "--with-qemu" - "--with-qemu-user=3Dnobody" - "--with-qemu-group=3Dkvm" - "--with-polkit" - (string-append "--docdir=3D" (assoc-ref %outputs "out") "/sh= are/doc/" - ,name "-" ,version) - "--sysconfdir=3D/etc" - "--localstatedir=3D/var") + `(#:meson ,meson-0.55 ;; libvirt requires meson 0.54 or higher. + #:configure-flags + (list "-Ddriver_qemu=3Denabled" + "-Dqemu_user=3Dnobody" + "-Dqemu_group=3Dkvm" + "-Dpolkit=3Denabled") #: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. + (add-after 'unpack 'fix-sysconfdir-and-localstatedir (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"))) + (substitute* "meson.build" + ;; We set the prefix to be the package output, but we need + ;; localstatedir to be /var. Sadly the build system doesn= 't + ;; seem to allow that easily. + (("localstatedir =3D prefix / get_option\\('localstatedir'= \\)") + "localstatedir =3D get_option('localstatedir')") + ;; On the other hand, we keep sysconfdir using the prefix = so + ;; that we install configuration files in the package outp= ut. + ;; However, we need to make sure the C code refers to /etc= via + ;; SYSCONFDIR, and not the read-only configuration in the + ;; package output. + (("set_quoted\\('SYSCONFDIR', sysconfdir\\)") + "set_quoted('SYSCONFDIR', '/etc')")) #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 "|= "))) - "")) - #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)))))) + (substitute* "tests/meson.build" + (("\\{ 'name': 'commandtest'.*") "") ; hangs idly + (("\\{ 'name': 'qemuxml2argvtest'.*") "") ; fails + (("\\{ 'name': 'virnetsockettest'.*") "")) ; tries to net= work + #t))))) (inputs `(("libxml2" ,libxml2) ("eudev" ,eudev) @@ -1149,7 +1135,9 @@ manage system or application containers.") ("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.0