Hello community,

here is the log from the commit of package rsyslog for openSUSE:Factory checked 
in at 2014-09-23 17:16:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rsyslog (Old)
 and      /work/SRC/openSUSE:Factory/.rsyslog.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rsyslog"

Changes:
--------
--- /work/SRC/openSUSE:Factory/rsyslog/rsyslog.changes  2014-09-18 
08:02:48.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rsyslog.new/rsyslog.changes     2014-09-23 
17:16:56.000000000 +0200
@@ -1,0 +2,9 @@
+Mon Sep 22 19:50:42 UTC 2014 - [email protected]
+
+- fix build with json-c 0.12 with upstream patch
+  rsyslog-8.4.0-json-c-0.12.patch
+- json-c provides a compatibility pkg-config for "json". Add 
+  rsyslog-8.4.0-json-c-0.12-configure.patch to check for the
+  required function directly.
+
+-------------------------------------------------------------------

New:
----
  rsyslog-8.4.0-json-c-0.12-configure.patch
  rsyslog-8.4.0-json-c-0.12.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rsyslog.spec ++++++
--- /var/tmp/diff_new_pack.vMEd5f/_old  2014-09-23 17:16:57.000000000 +0200
+++ /var/tmp/diff_new_pack.vMEd5f/_new  2014-09-23 17:16:57.000000000 +0200
@@ -90,6 +90,11 @@
 Requires(pre):  %insserv_prereq %fillup_prereq /etc/init.d/syslog
 BuildRequires:  klogd
 %endif
+# for Patch3 rsyslog-8.4.0-json-c-0.12-configure.patch
+BuildRequires:  autoconf >= 2.61
+BuildRequires:  automake
+BuildRequires:  libtool
+#
 BuildRequires:  bison
 BuildRequires:  flex
 BuildRequires:  openssl-devel >= 0.9.7
@@ -186,6 +191,8 @@
 # PATCH-FIX-OPENSUSE rsyslog-unit.patch [email protected] Customize 
upstream systemd unit for openSUSE needs.
 Patch0:         rsyslog-unit.patch
 Patch1:         rsyslog-8.4.0_implicit_declaration.patch
+Patch2:         rsyslog-8.4.0-json-c-0.12.patch
+Patch3:         rsyslog-8.4.0-json-c-0.12-configure.patch
 
 # this is a dirty hack since % dir does only work for the specified directory 
and nothing above
 # but I want to be able to switch this to /etc/apparmor.d once the profiles 
received more testing
@@ -482,6 +489,8 @@
 %setup -q -n %{name}-%{upstream_version} -a 14
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 #
 %if %{with systemd}
 for file in rsyslog-service-prepare; do
@@ -493,6 +502,8 @@
 %endif
 
 %build
+# for Patch3 rsyslog-8.4.0-json-c-0.12-configure.patch
+autoreconf -fiv
 export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall -I../grammar 
-I../../grammar"
 # needs java
 #        --enable-gui            \

++++++ rsyslog-8.4.0-json-c-0.12-configure.patch ++++++
From: Andreas Stieger <[email protected]>
Subject: [PATCH] fix build with json-c 0.12 if it provides a compatibility 
json.pc
Date: Mon, 22 Sep 2014 20:40:53 +0100
Upstream: submitting
References: 

json-c on openSUSE provides a compatibility pkg-config for "json".
The autoconf check find it first, assuming it does not provide 
the function json_tokener_error_desc. Check for availability of 
function using AC_CHECK_FUNCS instead.

---
 configure.ac |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: rsyslog-8.4.0/configure.ac
===================================================================
--- rsyslog-8.4.0.orig/configure.ac     2014-08-18 10:41:34.000000000 +0100
+++ rsyslog-8.4.0/configure.ac  2014-09-22 20:34:18.000000000 +0100
@@ -32,14 +32,16 @@ PKG_PROG_PKG_CONFIG
 PKG_CHECK_MODULES(LIBESTR, libestr >= 0.1.9)
 PKG_CHECK_MODULES(LIBLOGGING_STDLOG, liblogging-stdlog >= 1.0.3)
 PKG_CHECK_MODULES([JSON_C], [json],, [
-       PKG_CHECK_MODULES([JSON_C], [json-c],
-              [AC_DEFINE([HAVE_JSON_TOKENER_ERROR_DESC], [1], [we have the 
newer JSON-C API])])
+       PKG_CHECK_MODULES([JSON_C], [json-c],,)
 ])
 
 # if int64 is supported, use it
 AC_CHECK_LIB(json-c, json_object_new_object,,)
 AC_CHECK_FUNCS(json_object_new_int64,,)
 
+# look for newer API
+AC_CHECK_FUNCS(json_tokener_error_desc,,)
+
 case "${host}" in
   *-*-linux*)
     AC_DEFINE([OS_LINUX], [1], [Indicator for a Linux OS])
++++++ rsyslog-8.4.0-json-c-0.12.patch ++++++
From: Rainer Gerhards <[email protected]>
Date:   Tue Aug 19 11:33:41 2014 +0200
Subject: build failure on systems which don't have json_tokener_errors
Upstream: Committed
References: 
https://github.com/rsyslog/rsyslog/commit/6b47dd542d07ed557f02af9970d1004eb262e1c1

    bugfix: build failure on systems which don't have json_tokener_errors
    
    Older versions of json-c need to use a different API (which don't exists
    on newer versions, unfortunately...)
    Thanks to Thomas D. for reporting this problem.

Build error:
[   77s] msg.c: In function 'MsgSetPropsViaJSON':
[   77s] msg.c:4077:14: error: 'json_tokener_errors' undeclared (first use in 
this function)
[   77s]      errMsg = json_tokener_errors[err];

diff --git a/runtime/msg.c b/runtime/msg.c
index 66c3b7b..81b13f9 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -4074,7 +4074,11 @@ MsgSetPropsViaJSON(msg_t *__restrict__ const pMsg, const 
uchar *__restrict__ con
 
                        err = tokener->err;
                        if(err != json_tokener_continue)
-                               errMsg = json_tokener_errors[err];
+#                              if HAVE_JSON_TOKENER_ERROR_DESC
+                                       errMsg = json_tokener_error_desc(err);
+#                              else
+                                       errMsg = json_tokener_errors[err];
+#                              endif
                        else
                                errMsg = "Unterminated input";
                } else if(!json_object_is_type(json, json_type_object))
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to