[mingw-libvirt: 12/22] Update to 0.9.7 release

Kalev Lember kalev at fedoraproject.org
Wed Mar 7 15:40:26 UTC 2012


commit b335228d37dac1d7580a67d22c9121e68ac34163
Author: Daniel P. Berrange <berrange at redhat.com>
Date:   Wed Nov 9 13:48:36 2011 +0000

    Update to 0.9.7 release

 libvirt-0.9.7-gnulib-mingw32.patch |   71 +++++++++++++++++++++++++++++++++++
 mingw32-libvirt.spec               |   73 ++++++++++++++++++++++++++++++-----
 sources                            |    2 +-
 3 files changed, 134 insertions(+), 12 deletions(-)
---
diff --git a/libvirt-0.9.7-gnulib-mingw32.patch b/libvirt-0.9.7-gnulib-mingw32.patch
new file mode 100644
index 0000000..45fbc33
--- /dev/null
+++ b/libvirt-0.9.7-gnulib-mingw32.patch
@@ -0,0 +1,71 @@
+Commit f7bd00c12 pulled in a gnulib module that fails to compile
+on mingw.  Work around it while waiting for an upstream gnulib fix.
+
+* gnulib/local/lib/pty.in.h (openpty): Provide forward
+declarations of opaque structs not present on mingw.
+* gnulib/local/lib/openpty.c (openpty): Provide stub for mingw.
+---
+ gnulib/local/lib/openpty.c.diff |   26 ++++++++++++++++++++++++++
+ gnulib/local/lib/pty.in.h.diff  |   13 +++++++++++++
+ 2 files changed, 39 insertions(+), 0 deletions(-)
+ create mode 100644 gnulib/local/lib/openpty.c.diff
+ create mode 100644 gnulib/local/lib/pty.in.h.diff
+
+diff --git a/gnulib/local/lib/openpty.c.diff b/gnulib/local/lib/openpty.c.diff
+new file mode 100644
+index 0000000..f17e566
+--- /dev/null
++++ b/gnulib/local/lib/openpty.c.diff
+@@ -0,0 +1,26 @@
++diff --git c/lib/openpty.c i/lib/openpty.c
++index c398db5..d61d5ba 100644
++--- c/lib/openpty.c
+++++ i/lib/openpty.c
++@@ -32,6 +32,21 @@ rpl_openpty (int *amaster, int *aslave, char *name,
++                   (struct winsize *) winp);
++ }
++
+++#elif (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* mingw */
+++
+++# include <errno.h>
+++
+++int
+++openpty (int *amaster _GL_UNUSED, int *aslave _GL_UNUSED,
+++         char *name _GL_UNUSED,
+++         struct termios const *termp _GL_UNUSED,
+++         struct winsize const *winp _GL_UNUSED)
+++{
+++  /* Mingw lacks pseudo-terminals altogether.  */
+++  errno = ENOSYS;
+++  return -1;
+++}
+++
++ #else /* AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 10, mingw */
++
++ # include <fcntl.h>
+diff --git a/gnulib/local/lib/pty.in.h.diff b/gnulib/local/lib/pty.in.h.diff
+new file mode 100644
+index 0000000..9470700
+--- /dev/null
++++ b/gnulib/local/lib/pty.in.h.diff
+@@ -0,0 +1,13 @@
++diff --git c/lib/pty.in.h i/lib/pty.in.h
++index aff989c..00eecc6 100644
++--- c/lib/pty.in.h
+++++ i/lib/pty.in.h
++@@ -92,6 +92,8 @@ _GL_WARN_ON_USE (forkpty, "forkpty is not declared consistently - "
++ /* Create pseudo tty master slave pair and set terminal attributes
++    according to TERMP and WINP.  Return handles for both ends in
++    *AMASTER and *ASLAVE, and return the name of the slave end in NAME.  */
+++struct termios;
+++struct winsize;
++ # if @REPLACE_OPENPTY@
++ #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
++ #   undef openpty
+-- 
+1.7.4.4
+
+--
+libvir-list mailing list
+libvir-list at redhat.com
+https://www.redhat.com/mailman/listinfo/libvir-list
diff --git a/mingw32-libvirt.spec b/mingw32-libvirt.spec
index cf77f74..aded5d1 100644
--- a/mingw32-libvirt.spec
+++ b/mingw32-libvirt.spec
@@ -5,8 +5,24 @@
 %define __find_provides %{_mingw32_findprovides}
 %define __debug_install_post %{_mingw32_debug_install_post}
 
+# The mingw build is client only.  Set up defaults for hypervisor drivers
+# that talk via a native remote protocol, and for which prereq mingw
+# libraries exist.
+%define with_phyp          0%{!?_without_phyp:1}
+%define with_esx           0%{!?_without_esx:1}
+# missing libwsman, so can't build hyper-v
+%define with_hyperv        0%{!?_without_hyperv:0}
+%define with_xenapi        0%{!?_without_xenapi:1}
+
+# RHEL ships ESX but not PowerHypervisor, HyperV, or libxenserver (xenapi)
+%if 0%{?rhel}
+%define with_phyp 0
+%define with_xenapi 0
+%define with_hyperv 0
+%endif
+
 Name:           mingw32-libvirt
-Version:        0.9.6
+Version:        0.9.7
 Release:        1%{?dist}%{?extra_release}
 Summary:        MinGW Windows libvirt virtualization library
 
@@ -14,6 +30,7 @@ License:        LGPLv2+
 Group:          Development/Libraries
 URL:            http://libvirt.org/
 Source0:        ftp://libvirt.org/libvirt/libvirt-%{version}.tar.gz
+Patch1:         libvirt-%{version}-gnulib-mingw32.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  mingw32-filesystem >= 23
@@ -29,6 +46,13 @@ BuildRequires:  pkgconfig
 # Need native version for msgfmt
 BuildRequires:  gettext
 
+%if %{with_phyp}
+BuildRequires: mingw32-libssh2
+%endif
+%if %{with_esx}
+BuildRequires: mingw32-curl
+%endif
+
 BuildArch:      noarch
 
 %{?_mingw32_debug_package}
@@ -39,26 +63,48 @@ MinGW Windows libvirt virtualization library.
 
 %prep
 %setup -q -n libvirt-%{version}
-
+%patch1 -p1
+(cd gnulib && patch -p1 <local/lib/pty.in.h.diff)
+(cd gnulib && patch -p1 <local/lib/openpty.c.diff)
 
 %build
+%if ! %{with_phyp}
+%define _without_phyp --without-phyp
+%endif
+
+%if ! %{with_esx}
+%define _without_esx --without-esx
+%endif
+
+%if ! %{with_hyperv}
+%define _without_hyperv --without-hyperv
+%endif
+
+%if ! %{with_xenapi}
+%define _without_xenapi --without-xenapi
+%endif
+
 # XXX enable SASL in future
 %{_mingw32_configure} \
+  --without-xen \
+  --without-qemu \
+  --without-openvz \
+  --without-lxc \
+  --without-vbox \
+  %{?_without_xenapi} \
   --without-sasl \
   --without-avahi \
   --without-polkit \
   --without-python \
-  --without-xen \
-  --without-qemu \
-  --without-lxc \
+  --without-libvirtd \
   --without-uml \
-  --without-vbox \
-  --without-openvz \
-  --without-phyp \
+  %{?_without_phyp} \
+  %{?_without_esx} \
+  %{?_without_hyperv} \
+  --without-vmware \
   --without-netcf \
   --without-audit \
-  --without-dtrace \
-  --without-libvirtd
+  --without-dtrace
 make
 
 
@@ -67,7 +113,7 @@ rm -rf $RPM_BUILD_ROOT
 
 make DESTDIR=$RPM_BUILD_ROOT install
 
-rm -rf $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/libvirt
+rm -rf $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/libvirt/nwfilter
 rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/doc/*
 rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/gtk-doc/*
 
@@ -83,6 +129,8 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root)
+%config(noreplace) %{_mingw32_sysconfdir}/libvirt/libvirt.conf
+
 %{_mingw32_bindir}/libvirt-0.dll
 %{_mingw32_bindir}/virsh.exe
 %{_mingw32_bindir}/virt-xml-validate
@@ -127,6 +175,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Wed Nov  9 2011 Daniel P. Berrange <berrange at redhat.com> - 0.9.7-1
+- Update to 0.9.7 release
+
 * Thu Sep 22 2011 Daniel P. Berrange <berrange at redhat.com> - 0.9.6-1
 - Update to 0.9.6 release
 
diff --git a/sources b/sources
index 55185f3..5efd9ef 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b74df374b524d00a22a6c89cfc23099f  libvirt-0.9.6.tar.gz
+4308b3f4d23f5b0c5196260a9a22a38b  libvirt-0.9.7.tar.gz


More information about the scm-commits mailing list