[sblim-sfcb/f20] Fix providerMgr trace for localconnect, Add few configure options, build require openslp-devel

vcrhonek vcrhonek at fedoraproject.org
Tue Jan 21 12:56:38 UTC 2014


commit 31fa28b8967294fbd325fb4b286398c9fb33a650
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date:   Tue Jan 21 13:56:51 2014 +0100

    Fix providerMgr trace for localconnect, Add few configure options, build require openslp-devel

 sblim-sfcb-1.4.5-1.fc21.src.rpm                    |  Bin 1210269 -> 0 bytes
 ...sfcb-1.4.5-providerMgr-trace-localconnect.patch |   38 ++++++++++++++++++++
 sblim-sfcb.spec                                    |   14 ++++++-
 3 files changed, 50 insertions(+), 2 deletions(-)
---
diff --git a/sblim-sfcb-1.4.5-providerMgr-trace-localconnect.patch b/sblim-sfcb-1.4.5-providerMgr-trace-localconnect.patch
new file mode 100644
index 0000000..7db7e77
--- /dev/null
+++ b/sblim-sfcb-1.4.5-providerMgr-trace-localconnect.patch
@@ -0,0 +1,38 @@
+diff -up sblim-sfcb-1.4.5/providerMgr.c.orig sblim-sfcb-1.4.5/providerMgr.c
+--- sblim-sfcb-1.4.5/providerMgr.c.orig	2013-06-28 20:54:15.000000000 +0200
++++ sblim-sfcb-1.4.5/providerMgr.c	2014-01-20 16:44:30.941378672 +0100
+@@ -1508,11 +1508,16 @@ invokeProviders(BinRequestContext * binC
+   _SFCB_TRACE(1, ("--- %d providers", binCtx->pCount));
+   for (i = 0; i < binCtx->pCount; i++, binCtx->pDone++) {
+     binCtx->provA = binCtx->pAs[i];
+-    _SFCB_TRACE_VAR(ProviderInfo *info = pReg->ft->getProviderById(pReg, binCtx->provA.ids.provId));
+-    _SFCB_TRACE(1, ("--- Calling provider id: %d type=%lu %s (%s)",
+-        info->id, info->type, info->providerName, info->className));
++    if (pReg) {
++      _SFCB_TRACE_VAR_PTR(ProviderInfo *info, pReg->ft->getProviderById(pReg,
++          binCtx->provA.ids.provId));
++      _SFCB_TRACE(1, ("--- Calling provider id: %d type=%lu %s (%s)",
++          info->id, info->type, info->providerName, info->className));
++    } else {
++      _SFCB_TRACE(1, ("--- Calling provider id: %d", binCtx->provA.ids.provId));
++    }
+     resp[i] = intInvokeProvider(binCtx, sockets);
+-    _SFCB_TRACE(1, ("--- back from calling provider id: %d", info->id));
++    _SFCB_TRACE(1, ("--- back from calling provider id: %d", binCtx->provA.ids.provId));
+     *count += resp[i]->count;
+     resp[i]->rc--;
+     if (*err == 0 && resp[i]->rc != 0)
+diff -up sblim-sfcb-1.4.5/trace.h.orig sblim-sfcb-1.4.5/trace.h
+--- sblim-sfcb-1.4.5/trace.h.orig	2014-01-20 16:47:33.026116013 +0100
++++ sblim-sfcb-1.4.5/trace.h	2014-01-20 16:47:42.913159031 +0100
+@@ -34,6 +34,10 @@ extern unsigned long *_ptr_sfcb_trace_ma
+ /* to wrap variables used only in trace statements */
+ #define _SFCB_TRACE_VAR(f) f;
+ 
++/* we want the scope of variable v outside the if block */
++#define _SFCB_TRACE_VAR_PTR(v,f) \
++  v = ((*_ptr_sfcb_trace_mask & __traceMask)) ? f : NULL;
++
+ #define _SFCB_TRACE(LEVEL,STR) \
+   if ((*_ptr_sfcb_trace_mask & __traceMask) && (LEVEL<=_sfcb_debug) && (LEVEL>0) ) \
+   _sfcb_trace(LEVEL,__FILE__,__LINE__,_sfcb_format_trace STR);
diff --git a/sblim-sfcb.spec b/sblim-sfcb.spec
index 1a68dca..583d3f2 100644
--- a/sblim-sfcb.spec
+++ b/sblim-sfcb.spec
@@ -8,7 +8,7 @@ Name: sblim-sfcb
 Summary: Small Footprint CIM Broker
 URL: http://sblim.wiki.sourceforge.net/
 Version: 1.4.5
-Release: 2%{?dist}
+Release: 3%{?dist}
 Group: Applications/System
 License: EPL
 Source0: http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2
@@ -26,6 +26,8 @@ Patch1: sblim-sfcb-1.3.15-fix-provider-debugging.patch
 Patch2: sblim-sfcb-1.3.16-maxMsgLen.patch
 # Patch3: we'll install own service file
 Patch3: sblim-sfcb-1.4.5-service.patch
+# Patch4: fix providerMgr trace for localconnect, backported from upstream
+Patch4: sblim-sfcb-1.4.5-providerMgr-trace-localconnect.patch
 Provides: cim-server = 0
 Requires: cim-schema
 Requires: sblim-sfcCommon
@@ -38,6 +40,7 @@ BuildRequires: bison flex
 BuildRequires: sblim-cmpi-devel
 BuildRequires: systemd
 BuildRequires: sblim-sfcCommon-devel
+BuildRequires: openslp-devel
 Requires(post): systemd-units
 Requires(preun): systemd-units
 Requires(postun): systemd-units
@@ -56,9 +59,12 @@ Programming Interface (CMPI).
 %patch1 -p1 -b .fix-provider-debugging
 %patch2 -p1 -b .maxMsgLen
 %patch3 -p1 -b .service
+%patch4 -p1 -b .providerMgr-trace-localconnect
 
 %build
-%configure --enable-debug --enable-uds --enable-ssl --enable-pam --enable-ipv6 CFLAGS="$CFLAGS -D_GNU_SOURCE -fPIE -DPIE" LDFLAGS="$LDFLAGS -Wl,-z,now -pie"
+%configure --enable-debug --enable-uds --enable-ssl --enable-pam --enable-ipv6 \
+    --enable-slp --enable-large_volume_support --enable-optimized-enumeration --enable-relax-mofsyntax \
+    CFLAGS="$CFLAGS -D_GNU_SOURCE -fPIE -DPIE" LDFLAGS="$LDFLAGS -Wl,-z,now -pie"
  
 make 
 
@@ -113,6 +119,10 @@ fi;
 %files -f _pkg_list
 
 %changelog
+* Tue Jan 21 2014 Vitezslav Crhonek <vcrhonek at redhat.com> - 1.4.5-3
+- Fix providerMgr trace for localconnect
+- Add few configure options, build require openslp-devel
+
 * Wed Oct 09 2013 Vitezslav Crhonek <vcrhonek at redhat.com> - 1.4.5-2
 - Add version to cim-server virtual provides
 


More information about the scm-commits mailing list