From 7a53c8ed2373f503569c7deaaa8ca41905489a1a40e13b415ce1c4a76b8d57ba Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Wed, 23 Sep 2009 17:18:30 +0000 Subject: [PATCH] Workaround for missing pkgconfig file in device-mapper-devel OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=7 --- detach-disk.patch | 2 +- devmap-no-pkgconfig.patch | 32 ++++++++++++++++++++++++++++++++ libvirt.changes | 7 +++++++ libvirt.spec | 20 +++++++++++++------- xen-pv-cdrom.patch | 2 +- 5 files changed, 54 insertions(+), 9 deletions(-) create mode 100644 devmap-no-pkgconfig.patch diff --git a/detach-disk.patch b/detach-disk.patch index 7bdb510..d6df91f 100644 --- a/detach-disk.patch +++ b/detach-disk.patch @@ -2,7 +2,7 @@ Index: libvirt-0.7.1/src/xend_internal.c =================================================================== --- libvirt-0.7.1.orig/src/xend_internal.c +++ libvirt-0.7.1/src/xend_internal.c -@@ -5875,7 +5875,7 @@ virDomainXMLDevID(virDomainPtr domain, +@@ -5877,7 +5877,7 @@ virDomainXMLDevID(virDomainPtr domain, return -1; xenUnifiedLock(priv); xref = xenStoreDomainGetDiskID(domain->conn, domain->id, diff --git a/devmap-no-pkgconfig.patch b/devmap-no-pkgconfig.patch new file mode 100644 index 0000000..6956081 --- /dev/null +++ b/devmap-no-pkgconfig.patch @@ -0,0 +1,32 @@ +diff --git a/configure.in b/configure.in +index cb5ce55..d1711fd 100644 +--- a/configure.in ++++ b/configure.in +@@ -1227,11 +1227,22 @@ if test "$with_storage_mpath" = "yes"; then + DEVMAPPER_REQUIRED=0.0 + DEVMAPPER_CFLAGS= + DEVMAPPER_LIBS= +- PKG_CHECK_MODULES(DEVMAPPER, devmapper >= $DEVMAPPER_REQUIRED, +- [], [ +- AC_MSG_ERROR( +- [You must install device-mapper-devel >= $DEVMAPPER_REQUIRED to compile libvirt]) +- ]) ++ PKG_CHECK_MODULES([DEVMAPPER], [devmapper >= $DEVMAPPER_REQUIRED], [], [DEVMAPPER_FOUND=no]) ++ if test "$DEVMAPPER_FOUND" = "no"; then ++ # devmapper is missing pkg-config files in ubuntu, suse, etc ++ save_LIBS="$LIBS" ++ save_CFLAGS="$CFLAGS" ++ DEVMAPPER_FOUND=yes ++ AC_CHECK_HEADER([libdevmapper.h],,[DEVMAPPER_FOUND=no]) ++ AC_CHECK_LIB([devmapper], [dm_task_run],,[DEVMAPPER_FOUND=no]) ++ DEVMAPPER_LIBS="-ldevmapper" ++ LIBS="$save_LIBS" ++ CFLAGS="$save_CFLAGS" ++ fi ++ if test "$DEVMAPPER_FOUND" = "no" ; then ++ AC_MSG_ERROR([You must install device-mapper-devel/libdevmapper >= $DEVMAPPER_REQUIRED to compile libvirt]) ++ fi ++ + fi + AC_SUBST([DEVMAPPER_CFLAGS]) + AC_SUBST([DEVMAPPER_LIBS]) diff --git a/libvirt.changes b/libvirt.changes index ae47a90..c00a639 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Sep 23 11:10:37 MDT 2009 - jfehlig@novell.com + +- Workaround for missing pkgconfig file in device-mapper-devel + devmap-no-pkgconfig.patch + bnc#540942 + ------------------------------------------------------------------- Mon Sep 21 10:30:02 MDT 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index 2008ec8..c467aac 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -83,14 +83,19 @@ Requires: PolicyKit >= 0.6 %endif Source0: %{name}-%{version}.tar.bz2 Source1: libvirtd.init -Patch0: socat.patch -Patch1: libvirtd-defaults.patch +# Upstream patches +Patch0: devmap-no-pkgconfig.patch +# Need to go upstream +Patch1: socat.patch Patch2: clone.patch -Patch3: xen-pv-cdrom.patch -Patch4: detach-disk.patch -Patch5: migrate-params.patch -Patch6: suse-network.patch -Patch7: snapshots.patch +Patch3: migrate-params.patch +Patch4: xen-pv-cdrom.patch +Patch5: detach-disk.patch +# Our patches +Patch6: libvirtd-defaults.patch +Patch7: suse-network.patch +Patch8: snapshots.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -190,6 +195,7 @@ Authors: %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 %build %if ! %{with_xen} diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index 021af60..73c0874 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -2,7 +2,7 @@ Index: libvirt-0.7.1/src/xend_internal.c =================================================================== --- libvirt-0.7.1.orig/src/xend_internal.c +++ libvirt-0.7.1/src/xend_internal.c -@@ -5304,7 +5304,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co +@@ -5306,7 +5306,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); } else {