[rsyslog/f20] - backport support for platforms without atomic instructions

Dan Horák sharkcz at fedoraproject.org
Thu Apr 17 09:28:37 UTC 2014


commit f681383aa0aa25f8b3c67f3cabdda551d7780d6a
Author: Jakub Čajka <jcajka at redhat.com>
Date:   Thu Apr 17 08:35:36 2014 +0200

    - backport support for platforms without atomic instructions

 rsyslog-7.4.7-atomicops.patch |   53 +++++++++++++++++++++++++++++++++++++++++
 rsyslog.spec                  |    7 ++++-
 2 files changed, 59 insertions(+), 1 deletions(-)
---
diff --git a/rsyslog-7.4.7-atomicops.patch b/rsyslog-7.4.7-atomicops.patch
new file mode 100644
index 0000000..4a9c7f7
--- /dev/null
+++ b/rsyslog-7.4.7-atomicops.patch
@@ -0,0 +1,53 @@
+From 612f881d541aaf3a8725276d41ff4ed3948e2d01 Mon Sep 17 00:00:00 2001
+From: Rainer Gerhards <rgerhards at adiscon.com>
+Date: Fri, 18 Oct 2013 07:11:44 +0200
+Subject: [PATCH] bugfix: omelasticsearch did not compile on platforms without
+ atomic instructions
+
+---
+ plugins/omelasticsearch/omelasticsearch.c | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/plugins/omelasticsearch/omelasticsearch.c b/plugins/omelasticsearch/omelasticsearch.c
+index b82968d..8f51e1a 100644
+--- a/plugins/omelasticsearch/omelasticsearch.c
++++ b/plugins/omelasticsearch/omelasticsearch.c
+@@ -608,7 +608,7 @@ curlPost(instanceData *pData, uchar *message, int msglen, uchar **tpls, int nmsg
+ 		case CURLE_COULDNT_RESOLVE_PROXY:
+ 		case CURLE_COULDNT_CONNECT:
+ 		case CURLE_WRITE_ERROR:
+-			STATSCOUNTER_INC(indexHTTPReqFail, mutHTTPReqFail);
++			STATSCOUNTER_INC(indexHTTPReqFail, mutIndexHTTPReqFail);
+ 			indexHTTPFail += nmsgs;
+ 			DBGPRINTF("omelasticsearch: we are suspending ourselfs due "
+ 				  "to failure %lld of curl_easy_perform()\n",
+@@ -1001,18 +1001,18 @@ CODEmodInit_QueryRegCFSLineHdlr
+ 	/* support statistics gathering */
+ 	CHKiRet(statsobj.Construct(&indexStats));
+ 	CHKiRet(statsobj.SetName(indexStats, (uchar *)"omelasticsearch"));
+-	STATSCOUNTER_INIT(indexSubmit, mutCtrIndexSubmit);
++	STATSCOUNTER_INIT(indexSubmit, mutIndexSubmit);
+ 	CHKiRet(statsobj.AddCounter(indexStats, (uchar *)"submitted",
+-		ctrType_IntCtr, &indexSubmit));
+-	STATSCOUNTER_INIT(indexHTTPFail, mutCtrIndexHTTPFail);
++		ctrType_Int, &indexSubmit));
++	STATSCOUNTER_INIT(indexHTTPFail, mutIndexHTTPFail);
+ 	CHKiRet(statsobj.AddCounter(indexStats, (uchar *)"failed.http",
+-		ctrType_IntCtr, &indexHTTPFail));
+-	STATSCOUNTER_INIT(indexHTTPReqFail, mutCtrIndexHTTPReqFail);
++		ctrType_Int, &indexHTTPFail));
++	STATSCOUNTER_INIT(indexHTTPReqFail, mutIndexHTTPReqFail);
+ 	CHKiRet(statsobj.AddCounter(indexStats, (uchar *)"failed.httprequests",
+-		ctrType_IntCtr, &indexHTTPReqFail));
+-	STATSCOUNTER_INIT(indexESFail, mutCtrIndexESFail);
++		ctrType_Int, &indexHTTPReqFail));
++	STATSCOUNTER_INIT(indexESFail, mutIndexESFail);
+ 	CHKiRet(statsobj.AddCounter(indexStats, (uchar *)"failed.es",
+-		ctrType_IntCtr, &indexESFail));
++		ctrType_Int, &indexESFail));
+ 	CHKiRet(statsobj.ConstructFinalize(indexStats));
+ ENDmodInit
+ 
+-- 
+1.8.5.3
+
diff --git a/rsyslog.spec b/rsyslog.spec
index a2e4f1e..f099c4d 100644
--- a/rsyslog.spec
+++ b/rsyslog.spec
@@ -13,7 +13,7 @@
 Summary: Enhanced system logging and kernel message trapping daemon
 Name: rsyslog
 Version: 7.4.8
-Release: 1%{?dist}
+Release: 1%{?dist}.1
 License: (GPLv3+ and ASL 2.0)
 Group: System Environment/Daemons
 URL: http://www.rsyslog.com/
@@ -36,6 +36,7 @@ Patch6: rsyslog-7.4.8-dont-link-libee.patch
 Patch7: rsyslog-7.4.8-bz1026804-imjournal-message-loss.patch
 Patch8: rsyslog-7.4.8-ompgsql-delay-connection.patch
 Patch9: rsyslog-7.4.8-ommongodb-dont-require-tpl.patch
+Patch10: rsyslog-7.4.7-atomicops.patch
 
 BuildRequires: bison
 BuildRequires: flex
@@ -261,6 +262,7 @@ of source ports.
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
+%patch10 -p1
 
 %build
 %ifarch sparc64
@@ -490,6 +492,9 @@ done
 %{_libdir}/rsyslog/omudpspoof.so
 
 %changelog
+* Tue Apr 15 2014 Jakub Čajka <jcajka at redhat.com> 7.4.8-1.1
+- backport support for platforms without atomic instructions
+
 * Thu Feb 20 2014 Tomas Heinrich <theinric at redhat.com> 7.4.8-1
 - rebase to 7.4.8
 - add an explicit requirement on the version of libestr


More information about the scm-commits mailing list