1.0.2-10 (r2) - Evolution of the previous (rhbz#1478089, rhbz#1487787)

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
This commit is contained in:
Jan Pokorný 2017-10-14 01:02:29 +02:00
parent 95877b0e29
commit f7d9fcae36
No known key found for this signature in database
GPG Key ID: 61BBB23A9E8F8DE2
2 changed files with 15 additions and 15 deletions

View File

@ -1,4 +1,4 @@
From 0c8500a0c15f54250ce93c724451c36cde8b4499 Mon Sep 17 00:00:00 2001
From fd5eb6a3b137342f5f9594ab4c0e8ac34ec5fb80 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
Date: Fri, 6 Oct 2017 17:17:26 +0200
Subject: [PATCH 4/6] Med: add extra run-time (client, libqb) checks that
@ -61,11 +61,11 @@ scheme -- is not available at the point the macro-defined function gets
invoked, simply because qb_log_init hasn't been invoked by the time
that constructor gets triggered. However, what we can do is to add
a non-trapping libqb-residing reverse-testing of the client space that
invokes qb_log_init (being intrusive all of a sudden at some unknown
execution point, as opposed to constructor-like function, seems pretty
bad idea + libqb as a library is a mere helper, not an undertaker :)
-- this check can at least announce, via syslog (the only
initially enabled logging target) that the target logging won't work.
invokes qb_log_init (delivering abruption all of a sudden at some
unanticipated, as opposed to a well-timed like with constructors,
execution point, seems pretty bad idea + libqb as a library is a mere
helper, not an undertaker :) -- this check only announces, via syslog
(the only pre-enabled logging target), the target logging won't work.
After incorporating such a change (and extending log_test_mock.sh so as
to capture syslog stream within the container), nothing changes with the
@ -295,7 +295,7 @@ index 8a8d0ba..37d27b7 100644
+Libs.private: @LIBS@
Cflags: -I${includedir}
diff --git a/lib/log.c b/lib/log.c
index bfd218f..f30b8d8 100644
index bfd218f..3e9972e 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -853,6 +853,18 @@ qb_log_init(const char *name, int32_t facility, uint8_t priority)
@ -349,16 +349,16 @@ index bfd218f..f30b8d8 100644
QB_LOG_FILTER_FILE, "*", priority);
+
+ if (preinit_err == preinit_err_target_sec)
+ qb_util_log(LOG_ERR, "target chain supplied section not"
+ " observed by libqb, target's and/or"
+ qb_util_log(LOG_ERR, "(LOG@QB) target chain supplied section"
+ " not observed by libqb, target's and/or"
+ " libqb's linkage at fault and"
+ " logging of the target will not"
+ " work reliably");
+ else if (preinit_err == preinit_err_target_empty) {
+ qb_util_log(LOG_WARNING, "target chain supplied section empty,"
+ " target's linkage at fault and"
+ " logging of the target will not"
+ " work reliably");
+ qb_util_log(LOG_WARNING, "(LOG@QB) target chain supplied"
+ " section empty, target's linkage"
+ " at fault and logging of the target"
+ " will not work reliably");
+ }
}

View File

@ -1,4 +1,4 @@
From e911aae9c4474cc16d06be02fabcacde9f8d54b5 Mon Sep 17 00:00:00 2001
From 011085ef22f7ca94cb3c0492e735abeb43acef42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
Date: Fri, 6 Oct 2017 17:17:26 +0200
Subject: [PATCH 5/6] High: bare fix for libqb logging not working with
@ -510,7 +510,7 @@ index 37d27b7..bdcd3c8 100644
Libs.private: @LIBS@
Cflags: -I${includedir}
diff --git a/lib/log.c b/lib/log.c
index f30b8d8..e4b77d5 100644
index 3e9972e..514103f 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -40,6 +40,13 @@