public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Sys-Virt/files/, dev-perl/Sys-Virt/
@ 2017-06-08 23:11 Kent Fredric
  0 siblings, 0 replies; 2+ messages in thread
From: Kent Fredric @ 2017-06-08 23:11 UTC (permalink / raw
  To: gentoo-commits

commit:     2b1fb180623644ac8747e08e5255840f672d65c9
Author:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  8 22:44:58 2017 +0000
Commit:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Thu Jun  8 23:11:29 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b1fb180

dev-perl/Sys-Virt: Patch for '.' in @INC re bug #613584

This patches configure on all versions so that the "do $file" line
still works as upstream intended on Perl 5.26

Bug: https://bugs.gentoo.org/613584
Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-perl/Sys-Virt/Sys-Virt-1.1.2.ebuild  |  4 ++--
 dev-perl/Sys-Virt/Sys-Virt-1.2.9.ebuild  |  4 ++--
 dev-perl/Sys-Virt/Sys-Virt-1.3.2.ebuild  |  4 ++--
 dev-perl/Sys-Virt/Sys-Virt-2.4.0.ebuild  |  3 ++-
 dev-perl/Sys-Virt/Sys-Virt-2.5.0.ebuild  |  2 +-
 dev-perl/Sys-Virt/Sys-Virt-3.1.0.ebuild  |  2 +-
 dev-perl/Sys-Virt/files/no-dot-inc.patch | 40 ++++++++++++++++++++++++++++++++
 7 files changed, 50 insertions(+), 9 deletions(-)

diff --git a/dev-perl/Sys-Virt/Sys-Virt-1.1.2.ebuild b/dev-perl/Sys-Virt/Sys-Virt-1.1.2.ebuild
index edb51e30888..2bd597183f3 100644
--- a/dev-perl/Sys-Virt/Sys-Virt-1.1.2.ebuild
+++ b/dev-perl/Sys-Virt/Sys-Virt-1.1.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -20,7 +20,7 @@ DEPEND="${RDEPEND}
 		dev-perl/XML-XPath
 		virtual/perl-Time-HiRes
 	)"
-
+PATCHES=( "${FILESDIR}/no-dot-inc.patch" )
 SRC_TEST="do"
 
 src_compile() {

diff --git a/dev-perl/Sys-Virt/Sys-Virt-1.2.9.ebuild b/dev-perl/Sys-Virt/Sys-Virt-1.2.9.ebuild
index 5f7a4c1f157..c1ce63b56f7 100644
--- a/dev-perl/Sys-Virt/Sys-Virt-1.2.9.ebuild
+++ b/dev-perl/Sys-Virt/Sys-Virt-1.2.9.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -20,7 +20,7 @@ DEPEND="${RDEPEND}
 		dev-perl/XML-XPath
 		virtual/perl-Time-HiRes
 	)"
-
+PATCHES=( "${FILESDIR}/no-dot-inc.patch" )
 SRC_TEST="do"
 
 src_compile() {

diff --git a/dev-perl/Sys-Virt/Sys-Virt-1.3.2.ebuild b/dev-perl/Sys-Virt/Sys-Virt-1.3.2.ebuild
index 2bafb9acf3d..e94a68225d5 100644
--- a/dev-perl/Sys-Virt/Sys-Virt-1.3.2.ebuild
+++ b/dev-perl/Sys-Virt/Sys-Virt-1.3.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -19,7 +19,7 @@ DEPEND="${RDEPEND}
 		dev-perl/XML-XPath
 		virtual/perl-Time-HiRes
 	)"
-
+PATCHES=( "${FILESDIR}/no-dot-inc.patch" )
 src_compile() {
 	MAKEOPTS+=" -j1" perl-module_src_compile
 }

diff --git a/dev-perl/Sys-Virt/Sys-Virt-2.4.0.ebuild b/dev-perl/Sys-Virt/Sys-Virt-2.4.0.ebuild
index 90d881f1219..2b6b7c959e2 100644
--- a/dev-perl/Sys-Virt/Sys-Virt-2.4.0.ebuild
+++ b/dev-perl/Sys-Virt/Sys-Virt-2.4.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -20,6 +20,7 @@ DEPEND="${RDEPEND}
 		dev-perl/XML-XPath
 		virtual/perl-Time-HiRes
 	)"
+PATCHES=( "${FILESDIR}/no-dot-inc.patch" )
 
 src_compile() {
 	MAKEOPTS+=" -j1" perl-module_src_compile

diff --git a/dev-perl/Sys-Virt/Sys-Virt-2.5.0.ebuild b/dev-perl/Sys-Virt/Sys-Virt-2.5.0.ebuild
index 6755aa7e83b..7cdc0637c82 100644
--- a/dev-perl/Sys-Virt/Sys-Virt-2.5.0.ebuild
+++ b/dev-perl/Sys-Virt/Sys-Virt-2.5.0.ebuild
@@ -20,7 +20,7 @@ DEPEND="${RDEPEND}
 		dev-perl/XML-XPath
 		virtual/perl-Time-HiRes
 	)"
-
+PATCHES=( "${FILESDIR}/no-dot-inc.patch" )
 src_compile() {
 	MAKEOPTS+=" -j1" perl-module_src_compile
 }

diff --git a/dev-perl/Sys-Virt/Sys-Virt-3.1.0.ebuild b/dev-perl/Sys-Virt/Sys-Virt-3.1.0.ebuild
index 6755aa7e83b..7cdc0637c82 100644
--- a/dev-perl/Sys-Virt/Sys-Virt-3.1.0.ebuild
+++ b/dev-perl/Sys-Virt/Sys-Virt-3.1.0.ebuild
@@ -20,7 +20,7 @@ DEPEND="${RDEPEND}
 		dev-perl/XML-XPath
 		virtual/perl-Time-HiRes
 	)"
-
+PATCHES=( "${FILESDIR}/no-dot-inc.patch" )
 src_compile() {
 	MAKEOPTS+=" -j1" perl-module_src_compile
 }

diff --git a/dev-perl/Sys-Virt/files/no-dot-inc.patch b/dev-perl/Sys-Virt/files/no-dot-inc.patch
new file mode 100644
index 00000000000..b2b05c3e711
--- /dev/null
+++ b/dev-perl/Sys-Virt/files/no-dot-inc.patch
@@ -0,0 +1,40 @@
+From b04fcc43f602d865f9f5d4fdf90de47943e0027b Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentfredric@gmail.com>
+Date: Fri, 9 Jun 2017 10:19:57 +1200
+Subject: [PATCH] Fix spec.PL for Perl 5.26 '.' removal from @INC
+
+Perl 5.26 removes '.' from @INC, and this breaks the semantics
+of <<do $file>> where $file was assumed to be loaded from '.',
+but not explicitly stated, as 'do' is implemented using the same code
+as "require", that is, assuming @INC traversal.
+
+Inserting a leading "./" forces do to use a special-cased path
+where @INC is not consulted.
+
+Fixes RT#120697
+
+Bug: https://rt.cpan.org/Ticket/Display.html?id=120697
+---
+ perl-Sys-Virt.spec.PL | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/perl-Sys-Virt.spec.PL b/perl-Sys-Virt.spec.PL
+index aa3f6fc..d2d687c 100644
+--- a/perl-Sys-Virt.spec.PL
++++ b/perl-Sys-Virt.spec.PL
+@@ -6,10 +6,10 @@ use strict;
+ 
+ die unless (scalar @ARGV == 1);
+ 
+-unless (do 'lib/Sys/Virt.pm')
++unless (do './lib/Sys/Virt.pm')
+   {
+     if ($@) { die $@ };
+-    die "lib/Sys/Virt.pm: $!";
++    die "./lib/Sys/Virt.pm: $!";
+   }
+ 
+ local $/ = undef;
+-- 
+2.13.1
+


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Sys-Virt/files/, dev-perl/Sys-Virt/
@ 2022-06-15 22:06 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-06-15 22:06 UTC (permalink / raw
  To: gentoo-commits

commit:     ba9266b5c56d0d186e88a82e0a905ba0643d3b73
Author:     Michal Privoznik <michal.privoznik <AT> gmail <DOT> com>
AuthorDate: Tue Jun 14 15:52:04 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun 15 22:05:50 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba9266b5

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 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/25902
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-perl/Sys-Virt/Manifest                         |  1 +
 dev-perl/Sys-Virt/Sys-Virt-8.4.0.ebuild            | 49 ++++++++++++++++++++++
 ...rameter-detection-for-save-restore_domain.patch | 48 +++++++++++++++++++++
 3 files changed, 98 insertions(+)

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
+


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-15 22:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-15 22:06 [gentoo-commits] repo/gentoo:master commit in: dev-perl/Sys-Virt/files/, dev-perl/Sys-Virt/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2017-06-08 23:11 Kent Fredric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox