[perl-Sys-Virt/f14/master] Fix hostname test

Daniel P. Berrange berrange at fedoraproject.org
Sat Aug 14 20:17:35 UTC 2010


commit c7adfb4b8b5707604b31ac856639d485d3059b3d
Author: Daniel P. Berrange <berrange at redhat.com>
Date:   Sat Aug 14 16:17:23 2010 -0400

    Fix hostname test

 Sys-Virt-0.2.4-hostname.patch |   11 +++++++++++
 perl-Sys-Virt.spec            |    3 +++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/Sys-Virt-0.2.4-hostname.patch b/Sys-Virt-0.2.4-hostname.patch
new file mode 100644
index 0000000..64ca741
--- /dev/null
+++ b/Sys-Virt-0.2.4-hostname.patch
@@ -0,0 +1,11 @@
+diff -rup Sys-Virt-0.2.4.orig/t/100-connect.t Sys-Virt-0.2.4.new/t/100-connect.t
+--- Sys-Virt-0.2.4.orig/t/100-connect.t	2010-05-19 07:56:18.000000000 -0400
++++ Sys-Virt-0.2.4.new/t/100-connect.t	2010-08-14 16:06:45.987592899 -0400
+@@ -67,6 +67,7 @@ is($max, 32, "max cpus");
+ 
+ my $thishost = hostname();
+ my ($canonhost, $other) = gethostbyname($thishost);
++$canonhost = $thishost unless $canonhost;
+ my $host = $conn->get_hostname();
+ is($host, $canonhost, "hostname");
+ 
diff --git a/perl-Sys-Virt.spec b/perl-Sys-Virt.spec
index 9e3dda2..987bb7e 100644
--- a/perl-Sys-Virt.spec
+++ b/perl-Sys-Virt.spec
@@ -6,6 +6,7 @@ License:        GPLv2+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Sys-Virt/
 Source0:        http://www.cpan.org/authors/id/D/DA/DANBERR/Sys-Virt-%{version}.tar.gz
+Patch1:         Sys-Virt-%{version}-hostname.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  perl(ExtUtils::MakeMaker)
 BuildRequires:  perl(Test::Pod)
@@ -21,6 +22,7 @@ virtualization containers to be managed with a consistent API.
 
 %prep
 %setup -q -n Sys-Virt-%{version}
+%patch1 -p1
 
 sed -i -e '/Sys-Virt\.spec/d' Makefile.PL
 sed -i -e '/\.spec\.PL$/d' MANIFEST
@@ -57,6 +59,7 @@ rm -rf $RPM_BUILD_ROOT
 %changelog
 * Sat Aug 14 2010 Daniel P. Berrange <berrange at redhat.com> - 0.2.4-2
 - Rebuild against perl 5.12.0
+- Fix hostname test
 
 * Wed May 19 2010 Daniel P. Berrange <berrange at redhat.com> - 0.2.4-1
 - Update to 0.2.4 release



More information about the perl-devel mailing list