summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Privoznik <michal.privoznik@gmail.com>2022-06-14 17:52:04 +0200
committerSam James <sam@gentoo.org>2022-06-15 23:05:50 +0100
commitba9266b5c56d0d186e88a82e0a905ba0643d3b73 (patch)
treead60c088bc4c50d5640f7c35dbe12f091f079d9d /dev-perl/Sys-Virt
parentdev-php/libvirt-php: bump to v0.5.6 (diff)
downloadgentoo-ba9266b5c56d0d186e88a82e0a905ba0643d3b73.tar.gz
gentoo-ba9266b5c56d0d186e88a82e0a905ba0643d3b73.tar.bz2
gentoo-ba9266b5c56d0d186e88a82e0a905ba0643d3b73.zip
dev-perl/Sys-Virt: add 8.4.0
The upstream released 8.4.0. Unfortunately, there was a regression, so we need to backport a patch that fixes it. Signed-off-by: Michal Privoznik <michal.privoznik@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/25902 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-perl/Sys-Virt')
-rw-r--r--dev-perl/Sys-Virt/Manifest1
-rw-r--r--dev-perl/Sys-Virt/Sys-Virt-8.4.0.ebuild49
-rw-r--r--dev-perl/Sys-Virt/files/Sys-Virt-8.4.0-lib-Fix-parameter-detection-for-save-restore_domain.patch48
3 files changed, 98 insertions, 0 deletions
diff --git a/dev-perl/Sys-Virt/Manifest b/dev-perl/Sys-Virt/Manifest
index cdd6ff9086d5..ecf1e0a7606e 100644
--- a/dev-perl/Sys-Virt/Manifest
+++ b/dev-perl/Sys-Virt/Manifest
@@ -2,3 +2,4 @@ DIST Sys-Virt-v7.0.0.tar.gz 165365 BLAKE2B 9cb7aa66ce00c95957171fedad4fefbae5319
DIST Sys-Virt-v7.5.0.tar.gz 166656 BLAKE2B 466341cc081d1dedc0ad5ae9042a829256a310730aa410a93c795a983c6ee60099646d2a804626a076e435d3bd6d7742b4aa014f4642ee6b6078cd144b3cd8c0 SHA512 7da51e75fa53e81a68c32499ea865de0532fdb17f269b28310133d246be7dc59dfd6568850ffe66e393a7b7c2edbf4409618e2b461cdc35a62776ffbb97d7962
DIST Sys-Virt-v8.1.0.tar.gz 169008 BLAKE2B 23d3aee186b4ede35c1b5b99691a491e64995abf34e7ce65143c7b88851dca0841cfa27a3033e246f35bacda879dd09c3b31f9dcff54d04c0d47a77b4b61d723 SHA512 9d7660f96cf370a0e08140bf7badddae2dac84d7231f1fe7a616650ac4d333ba17c6531ab0662f34c4cb12b00ce39abe36ff24a1913f554026346725d0148fa7
DIST Sys-Virt-v8.3.0.tar.gz 169060 BLAKE2B cff54463afe9cc8ac2c6fab5f00bb00b3bb38eba816e09e417fc3d9881ae6efe8c076066b7d5c61bda2043eb6c728d025072069a059f61e954f8b482793cfa94 SHA512 902a1a16fbe64b1146998c57dce35dc32d9c717d3609933a288c9f449c12faeab9a1ef178c53b627869261b8036df50c2f39596df657d3a20cc6ceb9612634a3
+DIST Sys-Virt-v8.4.0.tar.gz 170680 BLAKE2B 0b6c40bcfeba0f5c98fea0e17e3ecc434cc5adf14ed5a92c9c7424a5745e3327c1a8ef05c79ba182d4eebd04b50abcafc68c59e8064ba28faf78bebbb500dbc2 SHA512 25c5b9013df2a916352c07be693c9a9410a4d3caf92a1da106176df314efa534078b5d4dc2501b9afda5ae1628ccf1394a346410972f6ebdd2282971c3efc17a
diff --git a/dev-perl/Sys-Virt/Sys-Virt-8.4.0.ebuild b/dev-perl/Sys-Virt/Sys-Virt-8.4.0.ebuild
new file mode 100644
index 000000000000..1c05a0dc8b88
--- /dev/null
+++ b/dev-perl/Sys-Virt/Sys-Virt-8.4.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Packages which get releases together:
+# app-emacs/nxml-libvirt-schemas
+# dev-python/libvirt-python
+# dev-perl/Sys-Virt
+# app-emulation/libvirt
+# Please bump them together!
+
+DIST_AUTHOR=DANBERR
+DIST_VERSION=v${PV}
+DIST_EXAMPLES=("examples/*")
+inherit perl-module
+
+DESCRIPTION="API for using the libvirt library from Perl"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ >=app-emulation/libvirt-${PV}
+"
+BDEPEND="${RDEPEND}
+ virtual/perl-ExtUtils-CBuilder
+ dev-perl/Module-Build
+ virtual/pkgconfig
+ test? (
+ dev-perl/CPAN-Changes
+ dev-perl/Test-More-UTF8
+ dev-perl/Test-Pod-Coverage
+ dev-perl/XML-XPath
+ virtual/perl-Test-Simple
+ virtual/perl-Time-HiRes
+ )"
+DEPEND="
+ >=app-emulation/libvirt-${PV}
+"
+
+PATCHES=(
+ # Can be dropped for 8.5.0
+ "${FILESDIR}"/${PN}-8.4.0-lib-Fix-parameter-detection-for-save-restore_domain.patch
+)
+
+src_compile() {
+ MAKEOPTS+=" -j1" perl-module_src_compile
+}
diff --git a/dev-perl/Sys-Virt/files/Sys-Virt-8.4.0-lib-Fix-parameter-detection-for-save-restore_domain.patch b/dev-perl/Sys-Virt/files/Sys-Virt-8.4.0-lib-Fix-parameter-detection-for-save-restore_domain.patch
new file mode 100644
index 000000000000..ae2597b68c75
--- /dev/null
+++ b/dev-perl/Sys-Virt/files/Sys-Virt-8.4.0-lib-Fix-parameter-detection-for-save-restore_domain.patch
@@ -0,0 +1,48 @@
+From be960176a8b045d54ac1dfa0cb76cef8ed9cc660 Mon Sep 17 00:00:00 2001
+Message-Id: <be960176a8b045d54ac1dfa0cb76cef8ed9cc660.1655221618.git.mprivozn@redhat.com>
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Tue, 14 Jun 2022 10:45:53 +0200
+Subject: [perl][PATCH] lib: Fix parameter detection for save/restore_domain
+
+Libvirt gained params alternative for
+virDomainSave/virDomainRestore APIs. As usual in our bindings, we
+don't expose these variants under new methods, rather wire them
+under existing ones and then have a small code that decides
+whether the old API or params API should be called. In case of
+save/restore_domain this is done by checking whether path to
+save/restore from was provided. However, the actual check is not
+written properly and checks for decoded string rather than perl
+argument. Not to mention this is done before the perl argument is
+decoded.
+
+Fixes: 1bdf37223b4870581deb0d5310489223ca34e88a
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ lib/Sys/Virt.xs | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Sys/Virt.xs b/lib/Sys/Virt.xs
+index de9f907..2fbfd99 100644
+--- a/lib/Sys/Virt.xs
++++ b/lib/Sys/Virt.xs
+@@ -2390,7 +2390,7 @@ restore_domain(con, fromsv=&PL_sv_undef, dxmlsv=&PL_sv_undef, params_sv=&PL_sv_u
+ virTypedParameterPtr params;
+ int nparams;
+ PPCODE:
+- if (!from && !SvOK(params_sv))
++ if (!SvOK(fromsv) && !SvOK(params_sv))
+ croak("Either $from or $params parameter must be supplied");
+
+ if (SvOK(dxmlsv))
+@@ -4553,7 +4553,7 @@ PREINIT:
+ virTypedParameterPtr params;
+ int nparams;
+ PPCODE:
+- if (!to && !SvOK(params_sv))
++ if (!SvOK(tosv) && !SvOK(params_sv))
+ croak("Either $to or $params parameter must be supplied");
+
+ if (SvOK(dxmlsv))
+--
+2.35.1
+