[mingw-libvirt: 2/22] Initial Fedora import from review (rhbz #467418)

Kalev Lember kalev at fedoraproject.org
Wed Mar 7 15:39:34 UTC 2012


commit b36d8dc793eda39aca24d8abe5cdb3c382a02a78
Author: Daniel P. Berrange <berrange at redhat.com>
Date:   Mon Sep 6 12:37:52 2010 +0100

    Initial Fedora import from review (rhbz #467418)

 .gitignore                          |    6 ++
 libvirt-0.8.3-daemon-man.patch      |   29 +++++++
 libvirt-0.8.3-qemu-syms.patch       |   45 ++++++++++
 libvirt-0.8.3-remote-protocol.patch |   59 +++++++++++++
 mingw32-libvirt.spec                |  153 +++++++++++++++++++++++++++++++++++
 sources                             |    1 +
 6 files changed, 293 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..c723482 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*.tar.gz
+.build*.log
+noarch
+*.src.rpm
+*~
+
diff --git a/libvirt-0.8.3-daemon-man.patch b/libvirt-0.8.3-daemon-man.patch
new file mode 100644
index 0000000..6652407
--- /dev/null
+++ b/libvirt-0.8.3-daemon-man.patch
@@ -0,0 +1,29 @@
+commit e7e9456bb4cce02dda7749434fec431a37a437cf
+Author: Diego Elio Pettenò <flameeyes at gmail.com>
+Date:   Fri Aug 6 03:17:37 2010 +0200
+
+    build-sys: fix build when daemon is disabled by not installing libvirtd.8
+    
+    Since the rule to build libvirtd.8 is within the WITH_LIBVIRTD conditional,
+    so declare the man page in there as well. Without this change, build
+    without daemon will fail.
+
+diff --git a/daemon/Makefile.am b/daemon/Makefile.am
+index 963d64f..dbf0ac3 100644
+--- a/daemon/Makefile.am
++++ b/daemon/Makefile.am
+@@ -41,12 +41,12 @@ EXTRA_DIST =						\
+ 	$(AVAHI_SOURCES)				\
+ 	$(DAEMON_SOURCES)
+ 
+-man_MANS = libvirtd.8
+-
+ BUILT_SOURCES =
+ 
+ if WITH_LIBVIRTD
+ 
++man_MANS = libvirtd.8
++
+ sbin_PROGRAMS = libvirtd
+ 
+ confdir = $(sysconfdir)/libvirt/
diff --git a/libvirt-0.8.3-qemu-syms.patch b/libvirt-0.8.3-qemu-syms.patch
new file mode 100644
index 0000000..48cf980
--- /dev/null
+++ b/libvirt-0.8.3-qemu-syms.patch
@@ -0,0 +1,45 @@
+commit 177e17e4626e18c1ce80f852e5a573ec2530db7c
+Author: Matthias Bolte <matthias.bolte at googlemail.com>
+Date:   Thu Aug 12 23:43:16 2010 +0200
+
+    Generate libvirt_qemu.def from libvirt_qemu.syms for MinGW builds
+
+diff --git a/configure.ac b/configure.ac
+index a2dcfa3..3968617 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1873,6 +1873,7 @@ case "$host" in
+     # Also set the symbol file to .def, so src/Makefile generates libvirt.def
+     # from libvirt.syms and passes libvirt.def instead of libvirt.syms to the linker
+     LIBVIRT_SYMBOL_FILE=libvirt.def
++    LIBVIRT_QEMU_SYMBOL_FILE=libvirt_qemu.def
+     # mingw's ld has the --version-script parameter, but it requires a .def file
+     # instead to work properly, therefore clear --version-script here and use
+     # -Wl, to pass the .def file to the linker
+diff --git a/src/Makefile.am b/src/Makefile.am
+index a66eb2a..b321657 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1010,7 +1010,7 @@ EXTRA_DIST += \
+   libvirt_daemon.syms		\
+   libvirt_nwfilter.syms
+ 
+-BUILT_SOURCES += libvirt.syms libvirt.def
++BUILT_SOURCES += libvirt.syms libvirt.def libvirt_qemu.def
+ 
+ libvirt.syms: libvirt_public.syms $(USED_SYM_FILES)
+ 	$(AM_V_GEN)rm -f $@-tmp $@ ; \
+@@ -1033,6 +1033,13 @@ libvirt.def: libvirt.syms
+ 	chmod a-w $@-tmp && \
+ 	mv $@-tmp libvirt.def
+ 
++libvirt_qemu.def: $(srcdir)/libvirt_qemu.syms
++	$(AM_V_GEN)rm -f -- $@-tmp $@ ; \
++	printf 'EXPORTS\n' > $@-tmp && \
++	sed -e '/^$$/d; /#/d; /:/d; /\}/d; /\*/d; /LIBVIRT_/d; s/[ \t]*\(.*\)\;/    \1/g' $^ >> $@-tmp && \
++	chmod a-w $@-tmp && \
++	mv $@-tmp libvirt_qemu.def
++
+ # Empty source list - it merely links a bunch of convenience libs together
+ libvirt_la_SOURCES =
+ libvirt_la_LDFLAGS = $(VERSION_SCRIPT_FLAGS)$(LIBVIRT_SYMBOL_FILE) \
diff --git a/libvirt-0.8.3-remote-protocol.patch b/libvirt-0.8.3-remote-protocol.patch
new file mode 100644
index 0000000..700389f
--- /dev/null
+++ b/libvirt-0.8.3-remote-protocol.patch
@@ -0,0 +1,59 @@
+commit b8564da17aafa280fadecdc89c7caefc7addbf93
+Author: Stefan Berger <stefanb at us.ibm.com>
+Date:   Tue Aug 17 06:37:27 2010 -0400
+
+    cygwin: build fix
+    
+    Fixing a problem in the build on cygwin due to missing #define's.
+
+diff --git a/src/remote/remote_protocol.c b/src/remote/remote_protocol.c
+index 0a33f0b..2483004 100644
+--- a/src/remote/remote_protocol.c
++++ b/src/remote/remote_protocol.c
+@@ -16,6 +16,12 @@
+ #ifndef IXDR_GET_INT32
+ # define IXDR_GET_INT32 IXDR_GET_LONG
+ #endif
++#ifndef IXDR_PUT_U_INT32
++# define IXDR_PUT_U_INT32 IXDR_PUT_U_LONG
++#endif
++#ifndef IXDR_GET_U_INT32
++# define IXDR_GET_U_INT32 IXDR_GET_U_LONG
++#endif
+ 
+ bool_t
+ xdr_remote_nonnull_string (XDR *xdrs, remote_nonnull_string *objp)
+diff --git a/src/remote/remote_protocol.h b/src/remote/remote_protocol.h
+index 4ec0895..afe9287 100644
+--- a/src/remote/remote_protocol.h
++++ b/src/remote/remote_protocol.h
+@@ -24,6 +24,12 @@ extern "C" {
+ #ifndef IXDR_GET_INT32
+ # define IXDR_GET_INT32 IXDR_GET_LONG
+ #endif
++#ifndef IXDR_PUT_U_INT32
++# define IXDR_PUT_U_INT32 IXDR_PUT_U_LONG
++#endif
++#ifndef IXDR_GET_U_INT32
++# define IXDR_GET_U_INT32 IXDR_GET_U_LONG
++#endif
+ #define REMOTE_MESSAGE_MAX 262144
+ #define REMOTE_MESSAGE_HEADER_MAX 24
+ #define REMOTE_MESSAGE_PAYLOAD_MAX 262120
+diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
+index 62450c4..8af469c 100644
+--- a/src/remote/remote_protocol.x
++++ b/src/remote/remote_protocol.x
+@@ -51,6 +51,12 @@
+ %#ifndef IXDR_GET_INT32
+ %# define IXDR_GET_INT32 IXDR_GET_LONG
+ %#endif
++%#ifndef IXDR_PUT_U_INT32
++%# define IXDR_PUT_U_INT32 IXDR_PUT_U_LONG
++%#endif
++%#ifndef IXDR_GET_U_INT32
++%# define IXDR_GET_U_INT32 IXDR_GET_U_LONG
++%#endif
+ 
+ /*----- Data types. -----*/
+ 
diff --git a/mingw32-libvirt.spec b/mingw32-libvirt.spec
new file mode 100644
index 0000000..09ae431
--- /dev/null
+++ b/mingw32-libvirt.spec
@@ -0,0 +1,153 @@
+%define __strip %{_mingw32_strip}
+%define __objdump %{_mingw32_objdump}
+%define _use_internal_dependency_generator 0
+%define __find_requires %{_mingw32_findrequires}
+%define __find_provides %{_mingw32_findprovides}
+%define __debug_install_post %{_mingw32_debug_install_post}
+
+Name:           mingw32-libvirt
+Version:        0.8.3
+Release:        1%{?dist}%{?extra_release}
+Summary:        MinGW Windows libvirt virtualization library
+
+License:        LGPLv2+
+Group:          Development/Libraries
+URL:            http://libvirt.org/
+Source0:        ftp://libvirt.org/libvirt/libvirt-%{version}.tar.gz
+Patch1:         libvirt-%{version}-remote-protocol.patch
+Patch2:         libvirt-%{version}-qemu-syms.patch
+Patch3:         libvirt-%{version}-daemon-man.patch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires:  mingw32-filesystem >= 23
+BuildRequires:  mingw32-gcc
+BuildRequires:  mingw32-binutils
+BuildRequires:  mingw32-libgpg-error
+BuildRequires:  mingw32-libgcrypt
+BuildRequires:  mingw32-gnutls
+BuildRequires:  mingw32-gettext
+BuildRequires:  mingw32-libxml2
+BuildRequires:  mingw32-portablexdr
+BuildRequires:  pkgconfig
+# Need native version for msgfmt
+BuildRequires:  gettext
+
+BuildArch:      noarch
+
+%{?_mingw32_debug_package}
+
+%description
+MinGW Windows libvirt virtualization library.
+
+
+%prep
+%setup -q -n libvirt-%{version}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+
+%build
+# XXX enable SASL in future
+%{_mingw32_configure} \
+  --without-sasl \
+  --without-avahi \
+  --without-polkit \
+  --without-python \
+  --without-xen \
+  --without-qemu \
+  --without-lxc \
+  --without-uml \
+  --without-vbox \
+  --without-openvz \
+  --without-one \
+  --without-phyp \
+  --without-netcf \
+  --without-libvirtd
+make
+
+
+%install
+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_datadir}/doc/*
+rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/gtk-doc/*
+
+rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libvirt.a
+rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libvirt-qemu.a
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%{_mingw32_bindir}/libvirt-0.dll
+%{_mingw32_bindir}/libvirt-qemu-0.dll
+%{_mingw32_bindir}/virsh.exe
+%{_mingw32_bindir}/virt-xml-validate
+%{_mingw32_bindir}/virt-pki-validate
+
+%{_mingw32_libdir}/libvirt.dll.a
+%{_mingw32_libdir}/libvirt.la
+%{_mingw32_libdir}/pkgconfig/libvirt.pc
+%{_mingw32_libdir}/libvirt-qemu.dll.a
+%{_mingw32_libdir}/libvirt-qemu.la
+
+%dir %{_mingw32_datadir}/libvirt/
+%dir %{_mingw32_datadir}/libvirt/schemas/
+%{_mingw32_datadir}/libvirt/schemas/domain.rng
+%{_mingw32_datadir}/libvirt/schemas/domainsnapshot.rng
+%{_mingw32_datadir}/libvirt/schemas/network.rng
+%{_mingw32_datadir}/libvirt/schemas/storagepool.rng
+%{_mingw32_datadir}/libvirt/schemas/storagevol.rng
+%{_mingw32_datadir}/libvirt/schemas/nodedev.rng
+%{_mingw32_datadir}/libvirt/schemas/capability.rng
+%{_mingw32_datadir}/libvirt/schemas/interface.rng
+%{_mingw32_datadir}/libvirt/schemas/nwfilter.rng
+%{_mingw32_datadir}/libvirt/schemas/secret.rng
+%{_mingw32_datadir}/libvirt/schemas/storageencryption.rng
+
+%{_mingw32_datadir}/libvirt/cpu_map.xml
+
+%{_mingw32_datadir}/locale/*/LC_MESSAGES/libvirt.mo
+
+%dir %{_mingw32_includedir}/libvirt
+%{_mingw32_includedir}/libvirt/libvirt.h
+%{_mingw32_includedir}/libvirt/virterror.h
+%{_mingw32_includedir}/libvirt/libvirt-qemu.h
+
+%{_mingw32_mandir}/man1/virsh.1*
+%{_mingw32_mandir}/man1/virt-xml-validate.1*
+%{_mingw32_mandir}/man1/virt-pki-validate.1*
+
+
+%changelog
+* Mon Sep  6 2010 Daniel P. Berrange <berrange at redhat.com> - 0.8.3-1
+- Initial Fedora import from review (rhbz #467418)
+- Update to use 0.8.3 sources
+
+* Thu Sep 25 2008 Richard Jones <rjones at redhat.com> - 0.4.6-3
+- BuildArch should be noarch
+
+* Wed Sep 24 2008 Richard W.M. Jones <rjones at redhat.com> - 0.4.6-2
+- Whitespace removal.
+
+* Wed Sep 24 2008 Richard W.M. Jones <rjones at redhat.com> - 0.4.6-1
+- New upstream release 0.4.6.
+- Rename mingw -> mingw32.
+
+* Mon Sep 22 2008 Daniel P. Berrange <berrange at redhat.com> - 0.4.5-4%{?extra_release}
+- Import crash fix from rawhide
+
+* Thu Sep 11 2008 Daniel P. Berrange <berrange at redhat.com> - 0.4.5-3%{?extra_release}
+- Add dep on gettext & pkgconfig
+
+* Wed Sep 10 2008 Richard W.M. Jones <rjones at redhat.com> - 0.4.5-2
+- Remove static lib.
+
+* Tue Sep  2 2008 Daniel P. Berrange <berrange at redhat.com> - 0.4.4-1
+- Initial RPM release, largely based on earlier work from several sources.
diff --git a/sources b/sources
index e69de29..e854bab 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+ae8535ce119d32a2e9fb1f46e2c8f325  libvirt-0.8.3.tar.gz


More information about the scm-commits mailing list