Hello community,
here is the log from the commit of package liblognorm for openSUSE:Factory checked in at 2016-08-05 18:17:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/liblognorm (Old)
and /work/SRC/openSUSE:Factory/.liblognorm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "liblognorm"
Changes:
--------
--- /work/SRC/openSUSE:Factory/liblognorm/liblognorm.changes 2016-07-28 23:46:04.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.liblognorm.new/liblognorm.changes 2016-08-05 18:17:43.000000000 +0200
@@ -1,0 +2,8 @@
+Thu Aug 4 08:04:19 UTC 2016 - astieger@suse.com
+
+- liblognorm 2.0.1:
+ * fix public headers, which invalidly contained a strndup()
+ definition
+ * fix some issues in pkgconfig file
+
+-------------------------------------------------------------------
Old:
----
liblognorm-2.0.0.tar.gz
New:
----
liblognorm-2.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ liblognorm.spec ++++++
--- /var/tmp/diff_new_pack.vKLq0x/_old 2016-08-05 18:17:44.000000000 +0200
+++ /var/tmp/diff_new_pack.vKLq0x/_new 2016-08-05 18:17:44.000000000 +0200
@@ -19,7 +19,7 @@
%define sover 5
%define with_html_docs 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
Name: liblognorm
-Version: 2.0.0
+Version: 2.0.1
Release: 0
Summary: Library and tool to normalize log data
License: LGPL-2.1+ and Apache-2.0
++++++ liblognorm-2.0.0.tar.gz -> liblognorm-2.0.1.tar.gz ++++++
++++ 3108 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/liblognorm-2.0.0/ChangeLog new/liblognorm-2.0.1/ChangeLog
--- old/liblognorm-2.0.0/ChangeLog 2016-07-22 08:49:17.000000000 +0200
+++ new/liblognorm-2.0.1/ChangeLog 2016-08-01 15:23:24.000000000 +0200
@@ -1,5 +1,15 @@
----------------------------------------------------------------------
-Version 2.0.0, 2015-07-21
+Version 2.0.1, 2016-08-01
+- fix public headers, which invalidly contained a strndup() definition
+ Thanks to Michael Biebel for this fix.
+- fix some issues in pkgconfig file
+ Thanks to Michael Biebel for this fix.
+- enhance build system to natively support systems with older
+ autoconf versions and/or missing autoconf-archive. In this case we
+ gracefully degrade functionality, but the build still is possible.
+ Among others, this enables builds on CentOS 5.
+----------------------------------------------------------------------
+Version 2.0.0, 2016-07-21
- completely rewritten, much feature-enhanced version
- requires libfastjson instead of json-c
- big improvements to testbench runs, especially on travis
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/liblognorm-2.0.0/configure.ac new/liblognorm-2.0.1/configure.ac
--- old/liblognorm-2.0.0/configure.ac 2016-07-22 08:48:10.000000000 +0200
+++ new/liblognorm-2.0.1/configure.ac 2016-08-01 15:23:59.000000000 +0200
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT([liblognorm], [2.0.0], [rgerhards@adiscon.com])
+AC_INIT([liblognorm], [2.0.1], [rgerhards@adiscon.com])
AM_INIT_AUTOMAKE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_SRCDIR([src/lognorm.c])
@@ -14,15 +14,31 @@
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CC_C99
-if test "$GCC" = "yes"
-then CFLAGS="$CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g"
-fi
AC_PROG_LIBTOOL
+m4_ifdef([AX_IS_RELEASE], [
+ AX_IS_RELEASE([git-directory])
+ m4_ifdef([AX_COMPILER_FLAGS], [
+ AX_COMPILER_FLAGS()
+ ], [
+ if test "$GCC" = "yes"
+ then CFLAGS="$CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g"
+ fi
+ AC_MSG_WARN([missing AX_COMPILER_FLAGS macro, not using it])
+ ])
+], [
+ if test "$GCC" = "yes"
+ then CFLAGS="$CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g"
+ fi
+ AC_MSG_WARN([missing AX_IS_RELEASE macro, not using AX_COMPILER_FLAGS macro because of this])
+])
+
+
+
# Checks for libraries.
save_LIBS=$LIBS
LIBS=
-AC_SEARCH_LIBS(clock_gettime, rt)
+AC_SEARCH_LIBS(clock_getm4_defn([AC_AUTOCONF_VERSION]), [2.68]time, rt)
LIBS=$save_LIBS
# Checks for header files.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/liblognorm-2.0.0/lognorm.pc.in new/liblognorm-2.0.1/lognorm.pc.in
--- old/liblognorm-2.0.0/lognorm.pc.in 2016-04-15 09:31:19.000000000 +0200
+++ new/liblognorm-2.0.1/lognorm.pc.in 2016-07-28 11:59:55.000000000 +0200
@@ -6,5 +6,7 @@
Name: lognorm
Description: fast samples-based log normalization library
Version: @VERSION@
-Libs: -L${libdir} -llognorm -lestr
+Requires: libfastjson
+Requires.private: libestr
+Libs: -L${libdir} -llognorm
Cflags: -I${includedir}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/liblognorm-2.0.0/m4/pkg.m4 new/liblognorm-2.0.1/m4/pkg.m4
--- old/liblognorm-2.0.0/m4/pkg.m4 1970-01-01 01:00:00.000000000 +0100
+++ new/liblognorm-2.0.1/m4/pkg.m4 2016-07-22 09:16:08.000000000 +0200
@@ -0,0 +1,275 @@
+dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+dnl serial 11 (pkg-config-0.29.1)
+dnl
+dnl Copyright © 2004 Scott James Remnant .
+dnl Copyright © 2012-2015 Dan Nicholson
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29.1])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+ [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+fi[]dnl
+])dnl PKG_PROG_PKG_CONFIG
+
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_default([$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])dnl _PKG_CONFIG
+
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
+
+
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ AC_MSG_RESULT([no])
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+ ])
+elif test $pkg_failed = untried; then
+ AC_MSG_RESULT([no])
+ m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see http://pkg-config.freedesktop.org/.])[]dnl
+ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ $3
+fi[]dnl
+])dnl PKG_CHECK_MODULES
+
+
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_INSTALLDIR
+
+
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+ [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_NOARCH_INSTALLDIR
+
+
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])dnl PKG_CHECK_VAR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/liblognorm-2.0.0/src/internal.h new/liblognorm-2.0.1/src/internal.h
--- old/liblognorm-2.0.0/src/internal.h 2016-04-28 11:08:12.000000000 +0200
+++ new/liblognorm-2.0.1/src/internal.h 2016-07-28 11:59:55.000000000 +0200
@@ -58,6 +58,8 @@
#include "liblognorm.h"
+#include
+
/* we need to turn off this warning, as it also comes up in C99 mode, which
* we use.
*/
@@ -95,4 +97,9 @@
const char * ln_DataForDisplayLiteral(__attribute__((unused)) ln_ctx ctx, void *const pdata);
const char * ln_JsonConfLiteral(__attribute__((unused)) ln_ctx ctx, void *const pdata);
+/* here we add some stuff from the compatibility layer */
+#ifndef HAVE_STRNDUP
+char * strndup(const char *s, size_t n);
+#endif
+
#endif /* #ifndef INTERNAL_H_INCLUDED */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/liblognorm-2.0.0/src/liblognorm.h new/liblognorm-2.0.1/src/liblognorm.h
--- old/liblognorm-2.0.0/src/liblognorm.h 2016-04-28 11:08:12.000000000 +0200
+++ new/liblognorm-2.0.1/src/liblognorm.h 2016-07-28 11:59:55.000000000 +0200
@@ -61,7 +61,6 @@
#ifndef LIBLOGNORM_H_INCLUDED
#define LIBLOGNORM_H_INCLUDED
#include /* we need size_t */
-#include
#include
/* error codes */
@@ -253,13 +252,4 @@
*/
int ln_normalize(ln_ctx ctx, const char *str, const size_t strLen, struct json_object **json_p);
-/* here we add some stuff from the compatibility layer. A separate include
- * would be cleaner, but would potentially require changes all over the
- * place. So doing it here is better. The respective replacement
- * functions should usually be found under ./compat -- rgerhards, 2015-05-20
- */
-#ifndef HAVE_STRNDUP
-char * strndup(const char *s, size_t n);
-#endif
-
#endif /* #ifndef LOGNORM_H_INCLUDED */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/liblognorm-2.0.0/src/pdag.c new/liblognorm-2.0.1/src/pdag.c
--- old/liblognorm-2.0.0/src/pdag.c 2016-07-11 17:12:58.000000000 +0200
+++ new/liblognorm-2.0.1/src/pdag.c 2016-07-28 12:04:08.000000000 +0200
@@ -433,7 +433,7 @@
* because that ID could acutally be created by two sets of rules.
* But this is the best we can do.
*/
-static const char *
+static void
fixComponentID(struct ln_pdag *const __restrict__ dag, const char *const new)
{
char *updated;
@@ -446,10 +446,11 @@
}
if(i >= 1 && curr[i-1] == '%')
--i;
- asprintf(&updated, "%.*s[%s|%s]", i, curr, curr+i, new+i);
+ if(asprintf(&updated, "%.*s[%s|%s]", i, curr, curr+i, new+i) == -1)
+ goto done;
deleteComponentID(dag);
dag->rb_id = updated;
- return updated;
+done: return;
}
/**
* Assign human-readable identifiers (names) to each node. These are
@@ -461,6 +462,8 @@
{
char *id = NULL;
+ if(prefix == NULL)
+ goto done;
if(dag->rb_id == NULL) {
dag->rb_id = strdup(prefix);
} else {
@@ -477,22 +480,26 @@
ln_parser_t *prs = dag->parsers+i;
if(prs->prsid == PRS_LITERAL) {
if(prs->name == NULL) {
- asprintf(&id, "%s%s", prefix,
- ln_DataForDisplayLiteral(dag->ctx, prs->parser_data));
+ if(asprintf(&id, "%s%s", prefix,
+ ln_DataForDisplayLiteral(dag->ctx, prs->parser_data)) == -1)
+ goto done;
} else {
- asprintf(&id, "%s%%%s:%s:%s%%", prefix,
+ if(asprintf(&id, "%s%%%s:%s:%s%%", prefix,
prs->name,
parserName(prs->prsid),
- ln_DataForDisplayLiteral(dag->ctx, prs->parser_data));
+ ln_DataForDisplayLiteral(dag->ctx, prs->parser_data)) == -1)
+ goto done;
}
} else {
- asprintf(&id, "%s%%%s:%s%%", prefix,
+ if(asprintf(&id, "%s%%%s:%s%%", prefix,
prs->name ? prs->name : "-",
- parserName(prs->prsid));
+ parserName(prs->prsid)) == -1)
+ goto done;
}
ln_pdagComponentSetIDs(ctx, prs->node, id);
free(id);
}
+done: return;
}
/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/liblognorm-2.0.0/src/samp.c new/liblognorm-2.0.1/src/samp.c
--- old/liblognorm-2.0.0/src/samp.c 2016-04-28 11:08:12.000000000 +0200
+++ new/liblognorm-2.0.1/src/samp.c 2016-07-28 12:04:08.000000000 +0200
@@ -202,7 +202,7 @@
* creation overhead
* @returns 0 on success, something else otherwise
*/
-static inline int
+static int
addFieldDescr(ln_ctx ctx, struct ln_pdag **pdag, es_str_t *rule,
size_t *bufOffs, es_str_t **str)
{
@@ -249,7 +249,7 @@
/**
* Construct a literal parser json definition.
*/
-static inline struct json_object *
+static json_object *
newLiteralParserJSONConf(char lit)
{
char buf[] = "x";
@@ -287,7 +287,7 @@
* @param str a work buffer, provided to prevent creation of a new object
* @return 0 on success, something else otherwise
*/
-static inline int
+static int
parseLiteral(ln_ctx ctx, struct ln_pdag **pdag, es_str_t *rule,
size_t *const __restrict__ bufOffs, es_str_t **str)
{
@@ -347,7 +347,7 @@
*
* @returns the new dag root (or NULL in case of error)
*/
-static inline int
+static int
addSampToTree(ln_ctx ctx,
es_str_t *rule,
ln_pdag *dag,
@@ -396,7 +396,7 @@
* @param[out] str string with "linetype-word" (newly created)
* @returns 0 on success, something else otherwise
*/
-static inline int
+static int
getLineType(const char *buf, es_size_t lenBuf, size_t *offs, es_str_t **str)
{
int r = -1;
@@ -426,7 +426,7 @@
* otherwise it is emptied.
* @returns 0 on success, something else otherwise
*/
-static inline int
+static int
getPrefix(const char *buf, es_size_t lenBuf, es_size_t offs, es_str_t **str)
{
int r;
@@ -452,7 +452,7 @@
* @param[in] offs offset to-be-added text starts
* @returns 0 on success, something else otherwise
*/
-static inline int
+static int
extendPrefix(ln_ctx ctx, const char *buf, es_size_t lenBuf, es_size_t offs)
{
return es_addBuf(&ctx->rulePrefix, (char*)buf+offs, lenBuf - offs);
@@ -467,7 +467,7 @@
* the tagbucket is created if it is NULL
* @returns 0 on success, something else otherwise
*/
-static inline int
+static int
addTagStrToBucket(ln_ctx ctx, es_str_t *tagname, struct json_object **tagBucket)
{
int r = -1;
@@ -500,7 +500,7 @@
* the tagbucket is created if it is NULL
* @returns 0 on success, something else otherwise
*/
-static inline int
+static int
processTags(ln_ctx ctx, const char *buf, es_size_t lenBuf, es_size_t *poffs, struct json_object **tagBucket)
{
int r = -1;
@@ -550,7 +550,7 @@
* @param[in] offs offset where rule starts
* @returns 0 on success, something else otherwise
*/
-static inline int
+static int
processRule(ln_ctx ctx, const char *buf, es_size_t lenBuf, es_size_t offs)
{
int r = -1;
@@ -577,7 +577,7 @@
}
-static inline int
+static int
getTypeName(ln_ctx ctx,
const char *const __restrict__ buf,
const size_t lenBuf,
@@ -623,7 +623,7 @@
* @param[in] offs offset where rule starts
* @returns 0 on success, something else otherwise
*/
-static inline int
+static int
processType(ln_ctx ctx,
const char *const __restrict__ buf,
const size_t lenBuf,
@@ -665,7 +665,7 @@
* @param [out] strTag obtained tag, if successful
* @returns 0 on success, something else otherwise
*/
-static inline int
+static int
getFieldName(ln_ctx __attribute__((unused)) ctx, const char *buf, es_size_t lenBuf, es_size_t *offs, es_str_t **strTag)
{
int r = -1;
@@ -695,7 +695,7 @@
* @param[in] len length of buffer
* @param[in/out] offs on entry: offset first unprocessed position
*/
-static inline void
+static void
skipWhitespace(ln_ctx __attribute__((unused)) ctx, const char *buf, es_size_t lenBuf, es_size_t *offs)
{
while(*offs < lenBuf && isspace(buf[*offs])) {
@@ -723,7 +723,7 @@
* @param [out] strTag obtained tag, if successful
* @returns 0 on success, something else otherwise
*/
-static inline int
+static int
getAnnotationOp(ln_ctx ctx, ln_annot *annot, const char *buf, es_size_t lenBuf, es_size_t *offs)
{
int r = -1;
@@ -785,7 +785,7 @@
* @param[in] offs offset where annotation starts
* @returns 0 on success, something else otherwise
*/
-static inline int
+static int
processAnnotate(ln_ctx ctx, const char *buf, es_size_t lenBuf, es_size_t offs)
{
int r;
@@ -823,7 +823,7 @@
* @param[in] offs offset where annotation starts
* @returns 0 on success, something else otherwise
*/
-static inline int
+static int
processInclude(ln_ctx ctx, const char *buf, const size_t offs)
{
int r;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/liblognorm-2.0.0/tests/Makefile.am new/liblognorm-2.0.1/tests/Makefile.am
--- old/liblognorm-2.0.0/tests/Makefile.am 2016-07-11 17:12:58.000000000 +0200
+++ new/liblognorm-2.0.1/tests/Makefile.am 2016-07-28 12:04:08.000000000 +0200
@@ -86,7 +86,7 @@
field_checkpoint-lea_jsoncnf.sh \
field_duration.sh \
field_duration_jsoncnf.sh \
- field_float.sh \
+ field_float.sh \
field_float_jsoncnf.sh \
very_long_logline_jsoncnf.sh
@@ -108,7 +108,7 @@
field_cef_v1.sh \
field_checkpoint-lea_v1.sh \
field_duration_v1.sh \
- field_float_v1.sh \
+ field_float_v1.sh \
field_cee-syslog_v1.sh \
field_tokenized.sh \
field_tokenized_with_invalid_ruledef.sh \