Hello community,
here is the log from the commit of package liblognorm for openSUSE:Factory checked in at 2016-12-05 16:34:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-08-05 18:17:43.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.liblognorm.new/liblognorm.changes 2016-12-05 16:34:14.000000000 +0100
@@ -1,0 +2,10 @@
+Sun Dec 4 20:26:49 UTC 2016 - astieger@suse.com
+
+- liblognorm 2.0.2:
+ * bugfix: no error was emitted on invalid "annotate" line
+ * "annnotate": permit inline comments
+ * bugfix: abort in literal path compaction when using
+ "alternative" parser
+ * bugfix: lognormalizer could loop
+
+-------------------------------------------------------------------
Old:
----
liblognorm-2.0.1.tar.gz
New:
----
liblognorm-2.0.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ liblognorm.spec ++++++
--- /var/tmp/diff_new_pack.ep64e7/_old 2016-12-05 16:34:16.000000000 +0100
+++ /var/tmp/diff_new_pack.ep64e7/_new 2016-12-05 16:34:16.000000000 +0100
@@ -19,7 +19,7 @@
%define sover 5
%define with_html_docs 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
Name: liblognorm
-Version: 2.0.1
+Version: 2.0.2
Release: 0
Summary: Library and tool to normalize log data
License: LGPL-2.1+ and Apache-2.0
++++++ liblognorm-2.0.1.tar.gz -> liblognorm-2.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/ChangeLog new/liblognorm-2.0.2/ChangeLog
--- old/liblognorm-2.0.1/ChangeLog 2016-08-01 15:23:24.000000000 +0200
+++ new/liblognorm-2.0.2/ChangeLog 2016-11-14 10:17:49.000000000 +0100
@@ -1,9 +1,30 @@
----------------------------------------------------------------------
+Version 2.0.2, 2016-11-15
+- bugfix: no error was emitted on invalid "annotate" line
+- "annnotate": permit inline comments
+- fix a problem with cross-compilation
+ see also: https://github.com/rsyslog/liblognorm/pull/221
+ Thanks to Luca Boccassi for the patch
+- bugfix: abort in literal path compaction when useing "alternative" parser
+ When using the "alternative" parser, literals nodes could be created with
+ multiple reference count. This is valid. However, literal path compaction
+ did not consider this case, and so "merged" these nodes, which lead to
+ pdag corruption and quickly to segfault.
+ closes https://github.com/rsyslog/liblognorm/issues/220
+ closes https://github.com/rsyslog/liblognorm/issues/153
+- bugfix: lognormalizer could loop
+ This also caused the testbench to fail on some platforms.
+ due too incorrect data type
+ Thanks to Michael Biebl for this fix.
+- fix misleading compiler warning
+ Thanks to Michael Biebl for this fix.
+- testbench: add test for "annotate" functionality
+----------------------------------------------------------------------
Version 2.0.1, 2016-08-01
- fix public headers, which invalidly contained a strndup() definition
- Thanks to Michael Biebel for this fix.
+ Thanks to Michael Biebl for this fix.
- fix some issues in pkgconfig file
- Thanks to Michael Biebel for this fix.
+ Thanks to Michael Biebl 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.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/Makefile.in new/liblognorm-2.0.2/Makefile.in
--- old/liblognorm-2.0.1/Makefile.in 2016-08-01 15:24:09.000000000 +0200
+++ new/liblognorm-2.0.2/Makefile.in 2016-11-14 10:18:07.000000000 +0100
@@ -359,6 +359,7 @@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkg_config_libs_private = @pkg_config_libs_private@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/compat/Makefile.in new/liblognorm-2.0.2/compat/Makefile.in
--- old/liblognorm-2.0.1/compat/Makefile.in 2016-08-01 15:24:09.000000000 +0200
+++ new/liblognorm-2.0.2/compat/Makefile.in 2016-11-14 10:18:07.000000000 +0100
@@ -295,6 +295,7 @@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkg_config_libs_private = @pkg_config_libs_private@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/configure new/liblognorm-2.0.2/configure
--- old/liblognorm-2.0.1/configure 2016-08-01 15:24:09.000000000 +0200
+++ new/liblognorm-2.0.2/configure 2016-11-14 10:18:07.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for liblognorm 2.0.1.
+# Generated by GNU Autoconf 2.69 for liblognorm 2.0.2.
#
# Report bugs to .
#
@@ -590,8 +590,8 @@
# Identity of this package.
PACKAGE_NAME='liblognorm'
PACKAGE_TARNAME='liblognorm'
-PACKAGE_VERSION='2.0.1'
-PACKAGE_STRING='liblognorm 2.0.1'
+PACKAGE_VERSION='2.0.2'
+PACKAGE_STRING='liblognorm 2.0.2'
PACKAGE_BUGREPORT='rgerhards@adiscon.com'
PACKAGE_URL=''
@@ -651,6 +651,7 @@
PCRE_CFLAGS
ENABLE_REGEXP_FALSE
ENABLE_REGEXP_TRUE
+pkg_config_libs_private
JSON_C_LIBS
JSON_C_CFLAGS
LIBESTR_LIBS
@@ -1369,7 +1370,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures liblognorm 2.0.1 to adapt to many kinds of systems.
+\`configure' configures liblognorm 2.0.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1440,7 +1441,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of liblognorm 2.0.1:";;
+ short | recursive ) echo "Configuration of liblognorm 2.0.2:";;
esac
cat <<\_ACEOF
@@ -1575,7 +1576,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-liblognorm configure 2.0.1
+liblognorm configure 2.0.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2044,7 +2045,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by liblognorm $as_me 2.0.1, which was
+It was created by liblognorm $as_me 2.0.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2907,7 +2908,7 @@
# Define the identity of the package.
PACKAGE='liblognorm'
- VERSION='2.0.1'
+ VERSION='2.0.2'
cat >>confdefs.h <<_ACEOF
@@ -14859,6 +14860,9 @@
$as_echo "yes" >&6; }
fi
+# add libestr flags to pkgconfig file for static linking
+pkg_config_libs_private=$LIBESTR_LIBS
+
# Regular expressions
# Check whether --enable-regexp was given.
@@ -15716,7 +15720,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by liblognorm $as_me 2.0.1, which was
+This file was extended by liblognorm $as_me 2.0.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15782,7 +15786,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-liblognorm config.status 2.0.1
+liblognorm config.status 2.0.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/configure.ac new/liblognorm-2.0.2/configure.ac
--- old/liblognorm-2.0.1/configure.ac 2016-08-01 15:23:59.000000000 +0200
+++ new/liblognorm-2.0.2/configure.ac 2016-11-14 10:17:54.000000000 +0100
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT([liblognorm], [2.0.1], [rgerhards@adiscon.com])
+AC_INIT([liblognorm], [2.0.2], [rgerhards@adiscon.com])
AM_INIT_AUTOMAKE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_SRCDIR([src/lognorm.c])
@@ -65,6 +65,8 @@
# modules we require
PKG_CHECK_MODULES(LIBESTR, libestr >= 0.0.0)
PKG_CHECK_MODULES(JSON_C, libfastjson,, )
+# add libestr flags to pkgconfig file for static linking
+AC_SUBST(pkg_config_libs_private, $LIBESTR_LIBS)
# Regular expressions
AC_ARG_ENABLE(regexp,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/doc/Makefile.in new/liblognorm-2.0.2/doc/Makefile.in
--- old/liblognorm-2.0.1/doc/Makefile.in 2016-08-01 15:24:09.000000000 +0200
+++ new/liblognorm-2.0.2/doc/Makefile.in 2016-11-14 10:18:07.000000000 +0100
@@ -243,6 +243,7 @@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkg_config_libs_private = @pkg_config_libs_private@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/lognorm.pc.in new/liblognorm-2.0.2/lognorm.pc.in
--- old/liblognorm-2.0.1/lognorm.pc.in 2016-07-28 11:59:55.000000000 +0200
+++ new/liblognorm-2.0.2/lognorm.pc.in 2016-11-14 09:47:53.000000000 +0100
@@ -7,6 +7,6 @@
Description: fast samples-based log normalization library
Version: @VERSION@
Requires: libfastjson
-Requires.private: libestr
Libs: -L${libdir} -llognorm
+Libs.private: @pkg_config_libs_private@
Cflags: -I${includedir}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/src/Makefile.in new/liblognorm-2.0.2/src/Makefile.in
--- old/liblognorm-2.0.1/src/Makefile.in 2016-08-01 15:24:09.000000000 +0200
+++ new/liblognorm-2.0.2/src/Makefile.in 2016-11-14 10:18:07.000000000 +0100
@@ -352,6 +352,7 @@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkg_config_libs_private = @pkg_config_libs_private@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/src/annot.c new/liblognorm-2.0.2/src/annot.c
--- old/liblognorm-2.0.1/src/annot.c 2016-04-28 11:08:12.000000000 +0200
+++ new/liblognorm-2.0.2/src/annot.c 2016-11-14 09:47:53.000000000 +0100
@@ -220,7 +220,7 @@
const char *tagCstr;
int i;
- ln_dbgprintf(ctx, "ln_annotate called");
+ ln_dbgprintf(ctx, "ln_annotate called [aroot=%p]", ctx->pas->aroot);
/* shortcut: terminate immediately if nothing to do... */
if(ctx->pas->aroot == NULL)
goto done;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/src/lognormalizer.c new/liblognorm-2.0.2/src/lognormalizer.c
--- old/liblognorm-2.0.1/src/lognormalizer.c 2016-04-28 11:17:01.000000000 +0200
+++ new/liblognorm-2.0.2/src/lognormalizer.c 2016-10-17 10:09:16.000000000 +0200
@@ -179,7 +179,7 @@
size_t line_capacity = DEFAULT_LINE_SIZE;
char *line = NULL;
size_t line_len = 0;
- char ch = 0;
+ int ch = 0;
do {
ch = fgetc(fp);
if (ch == EOF) break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/src/parser.c new/liblognorm-2.0.2/src/parser.c
--- old/liblognorm-2.0.1/src/parser.c 2016-04-28 11:08:12.000000000 +0200
+++ new/liblognorm-2.0.2/src/parser.c 2016-10-17 10:09:16.000000000 +0200
@@ -161,7 +161,7 @@
int second;
__attribute__((unused)) int secfrac; /* fractional seconds (must be 32 bit!) */
__attribute__((unused)) int secfracPrecision;
- char OffsetHour; /* UTC offset in hours */
+ int OffsetHour; /* UTC offset in hours */
int OffsetMinute; /* UTC offset in minutes */
size_t len;
size_t orglen;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/src/pdag.c new/liblognorm-2.0.2/src/pdag.c
--- old/liblognorm-2.0.1/src/pdag.c 2016-07-28 12:04:08.000000000 +0200
+++ new/liblognorm-2.0.2/src/pdag.c 2016-10-17 16:58:51.000000000 +0200
@@ -350,6 +350,7 @@
if(!( prs->prsid == PRS_LITERAL
&& prs->name == NULL
&& prs->node->flags.isTerminal == 0
+ && prs->node->refcnt == 1
&& prs->node->nparsers == 1
&& prs->node->parsers[0].prsid == PRS_LITERAL)
)
@@ -361,7 +362,6 @@
CHKR(ln_combineData_Literal(prs->parser_data, child_prs->parser_data));
ln_pdag *const node_del = prs->node;
prs->node = child_prs->node;
-
child_prs->node = NULL; /* remove, else this would be destructed! */
ln_pdagDelete(node_del);
}
@@ -834,7 +834,8 @@
struct ln_pdag **nextnode)
{
int r;
- LN_DBGPRINTF(ctx, "ln_pdagAddParserInstance: %s", json_object_to_json_string(prscnf));
+ LN_DBGPRINTF(ctx, "ln_pdagAddParserInstance: %s, nextnode %p",
+ json_object_to_json_string(prscnf), *nextnode);
ln_parser_t *const parser = ln_newParser(ctx, prscnf);
CHKN(parser);
LN_DBGPRINTF(ctx, "pdag: %p, parser %p", pdag, parser);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/src/samp.c new/liblognorm-2.0.2/src/samp.c
--- old/liblognorm-2.0.1/src/samp.c 2016-07-28 12:04:08.000000000 +0200
+++ new/liblognorm-2.0.2/src/samp.c 2016-11-14 10:08:52.000000000 +0100
@@ -739,13 +739,19 @@
goto done; /* nothing left to process (no error!) */
}
- if(buf[i] == '+') {
+ switch(buf[i]) {
+ case '+':
opc = ln_annot_ADD;
- } else if(buf[i] == '-') {
+ break;
+ case '#':
+ ln_dbgprintf(ctx, "inline comment in 'annotate' line: %s", buf);
+ *offs = lenBuf;
+ r = 0;
+ goto done;
+ case '-':
ln_dbgprintf(ctx, "annotate op '-' not yet implemented - failing");
- goto fail;
- } else {
- ln_dbgprintf(ctx, "invalid annotate opcode '%c' - failing" , buf[i]);
+ /*FALLTHROUGH*/
+ default:ln_errprintf(ctx, 0, "invalid annotate operation '%c': %s", buf[i], buf+i);
goto fail;
}
i++;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/src/v1_parser.c new/liblognorm-2.0.2/src/v1_parser.c
--- old/liblognorm-2.0.1/src/v1_parser.c 2016-04-28 11:08:12.000000000 +0200
+++ new/liblognorm-2.0.2/src/v1_parser.c 2016-10-17 10:09:16.000000000 +0200
@@ -200,7 +200,7 @@
int second;
__attribute__((unused)) int secfrac; /* fractional seconds (must be 32 bit!) */
__attribute__((unused)) int secfracPrecision;
- char OffsetHour; /* UTC offset in hours */
+ int OffsetHour; /* UTC offset in hours */
int OffsetMinute; /* UTC offset in minutes */
size_t len;
size_t orglen;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/src/v1_samp.c new/liblognorm-2.0.2/src/v1_samp.c
--- old/liblognorm-2.0.1/src/v1_samp.c 2016-04-28 11:08:12.000000000 +0200
+++ new/liblognorm-2.0.2/src/v1_samp.c 2016-10-17 10:05:56.000000000 +0200
@@ -758,11 +758,11 @@
ln_v1_processSamp(ln_ctx ctx, const char *buf, es_size_t lenBuf)
{
struct ln_v1_samp *samp = NULL;
- es_str_t *typeStr = NULL;
- es_size_t offs;
+ es_str_t *typeStr = NULL;
+ es_size_t offs;
- if(getLineType(buf, lenBuf, &offs, &typeStr) != 0)
- goto done;
+ if(getLineType(buf, lenBuf, &offs, &typeStr) != 0)
+ goto done;
if(!es_strconstcmp(typeStr, "prefix")) {
if(getPrefix(buf, lenBuf, offs, &ctx->rulePrefix) != 0) goto done;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/tests/Makefile.am new/liblognorm-2.0.2/tests/Makefile.am
--- old/liblognorm-2.0.1/tests/Makefile.am 2016-07-28 12:04:08.000000000 +0200
+++ new/liblognorm-2.0.2/tests/Makefile.am 2016-11-14 10:08:52.000000000 +0100
@@ -40,9 +40,11 @@
seq_simple.sh \
runaway_rule.sh \
runaway_rule_comment.sh \
+ annotate.sh \
alternative_simple.sh \
alternative_three.sh \
alternative_nested.sh \
+ alternative_segfault.sh \
repeat_very_simple.sh \
repeat_simple.sh \
repeat_mismatch_in_while.sh \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/tests/Makefile.in new/liblognorm-2.0.2/tests/Makefile.in
--- old/liblognorm-2.0.1/tests/Makefile.in 2016-08-01 15:24:09.000000000 +0200
+++ new/liblognorm-2.0.2/tests/Makefile.in 2016-11-14 10:18:07.000000000 +0100
@@ -502,6 +502,7 @@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkg_config_libs_private = @pkg_config_libs_private@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
@@ -546,9 +547,9 @@
usrdef_ipaddr_dotdot2.sh usrdef_ipaddr_dotdot3.sh \
missing_line_ending.sh names.sh include.sh \
include_RULEBASES.sh seq_simple.sh runaway_rule.sh \
- runaway_rule_comment.sh alternative_simple.sh \
+ runaway_rule_comment.sh annotate.sh alternative_simple.sh \
alternative_three.sh alternative_nested.sh \
- repeat_very_simple.sh repeat_simple.sh \
+ alternative_segfault.sh repeat_very_simple.sh repeat_simple.sh \
repeat_mismatch_in_while.sh repeat_while_alternative.sh \
repeat_alternative_nested.sh parser_prios.sh \
parser_whitespace.sh parser_whitespace_jsoncnf.sh parser_LF.sh \
@@ -997,6 +998,13 @@
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+annotate.sh.log: annotate.sh
+ @p='annotate.sh'; \
+ b='annotate.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
alternative_simple.sh.log: alternative_simple.sh
@p='alternative_simple.sh'; \
b='alternative_simple.sh'; \
@@ -1017,6 +1025,13 @@
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+alternative_segfault.sh.log: alternative_segfault.sh
+ @p='alternative_segfault.sh'; \
+ b='alternative_segfault.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
repeat_very_simple.sh.log: repeat_very_simple.sh
@p='repeat_very_simple.sh'; \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/tests/alternative_segfault.sh new/liblognorm-2.0.2/tests/alternative_segfault.sh
--- old/liblognorm-2.0.1/tests/alternative_segfault.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/liblognorm-2.0.2/tests/alternative_segfault.sh 2016-10-17 16:58:51.000000000 +0200
@@ -0,0 +1,16 @@
+# added 2016-10-17 by Rainer Gerhards
+# This file is part of the liblognorm project, released under ASL 2.0
+
+. $srcdir/exec.sh
+
+test_def $0 "a case that caused a segfault in practice"
+add_rule 'version=2'
+add_rule 'rule=:%host:ipv4% %{"type":"alternative","parser":[{"type":"literal","text":"-"},{"type":"number","name":"identd"}]}% %OK:word%'
+execute '1.2.3.4 - TEST_OK'
+assert_output_json_eq '{ "OK": "TEST_OK", "host": "1.2.3.4" }'
+execute '1.2.3.4 100 TEST_OK'
+assert_output_json_eq '{ "OK": "TEST_OK", "identd": "100", "host": "1.2.3.4" }'
+execute '1.2.3.4 ERR TEST_OK'
+assert_output_json_eq '{ "originalmsg": "1.2.3.4 ERR TEST_OK", "unparsed-data": "ERR TEST_OK" }'
+
+cleanup_tmp_files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/tests/annotate.sh new/liblognorm-2.0.2/tests/annotate.sh
--- old/liblognorm-2.0.1/tests/annotate.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/liblognorm-2.0.2/tests/annotate.sh 2016-11-14 10:08:52.000000000 +0100
@@ -0,0 +1,23 @@
+# added 2016-11-08 by Rainer Gerhards
+. $srcdir/exec.sh
+
+test_def $0 "annotate functionality"
+
+reset_rules
+add_rule 'version=2'
+add_rule 'rule=ABC,WIN:<%-:number%>1 %-:date-rfc5424% %-:word% %tag:word% - - -'
+add_rule 'rule=ABC:<%-:number%>1 %-:date-rfc5424% %-:word% %tag:word% + - -'
+add_rule 'rule=WIN:<%-:number%>1 %-:date-rfc5424% %-:word% %tag:word% . - -'
+add_rule 'annotate=WIN:+annot1="WIN" # inline-comment'
+add_rule 'annotate=ABC:+annot2="ABC"'
+
+execute '<37>1 2016-11-03T23:59:59+03:00 server.example.net TAG . - -'
+assert_output_json_eq '{ "tag": "TAG", "annot1": "WIN" }'
+
+execute '<37>1 2016-11-03T23:59:59+03:00 server.example.net TAG + - -'
+assert_output_json_eq '{ "tag": "TAG", "annot2": "ABC" }'
+
+execute '<6>1 2016-09-02T07:41:07+02:00 server.example.net TAG - - -'
+assert_output_json_eq '{ "tag": "TAG", "annot1": "WIN", "annot2": "ABC" }'
+
+cleanup_tmp_files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/tests/exec.sh new/liblognorm-2.0.2/tests/exec.sh
--- old/liblognorm-2.0.1/tests/exec.sh 2016-04-26 16:27:14.000000000 +0200
+++ new/liblognorm-2.0.2/tests/exec.sh 2016-11-14 10:08:52.000000000 +0100
@@ -27,7 +27,11 @@
echo "====================="
set -x
fi
- echo "$1" | $cmd $ln_opts -r tmp.rulebase -e json > test.out
+ if [ "$1" == "file" ]; then
+ $cmd $ln_opts -r tmp.rulebase -e json > test.out < $2
+ else
+ echo "$1" | $cmd $ln_opts -r tmp.rulebase -e json > test.out
+ fi
echo "Out:"
cat test.out
if [ "x$debug" == "xon" ]; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liblognorm-2.0.1/tools/Makefile.in new/liblognorm-2.0.2/tools/Makefile.in
--- old/liblognorm-2.0.1/tools/Makefile.in 2016-08-01 15:24:09.000000000 +0200
+++ new/liblognorm-2.0.2/tools/Makefile.in 2016-11-14 10:18:07.000000000 +0100
@@ -250,6 +250,7 @@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkg_config_libs_private = @pkg_config_libs_private@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@