Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package bolt for openSUSE:Factory checked in 
at 2022-09-05 21:22:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bolt (Old)
 and      /work/SRC/openSUSE:Factory/.bolt.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bolt"

Mon Sep  5 21:22:06 2022 rev:9 rq:1001234 version:0.9.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/bolt/bolt.changes        2022-01-29 
20:59:21.287773692 +0100
+++ /work/SRC/openSUSE:Factory/.bolt.new.2083/bolt.changes      2022-09-05 
21:22:09.725158457 +0200
@@ -1,0 +2,9 @@
+Wed Aug 24 06:07:41 UTC 2022 - Paolo Stivanin <[email protected]>
+
+- Update to 0.9.3:
+  * Work around a glib fix that changed behavior of the log API where now
+    calling `g_log_set_writer_func` results in an hard error, which broke
+    the test suite since aforementioned function was indeed called more
+    than once. Nothing a level of indirection couldn't fix.
+
+-------------------------------------------------------------------

Old:
----
  bolt-0.9.2.tar.bz2

New:
----
  bolt-0.9.3.tar.bz2

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

Other differences:
------------------
++++++ bolt.spec ++++++
--- /var/tmp/diff_new_pack.lL9OQg/_old  2022-09-05 21:22:10.213159745 +0200
+++ /var/tmp/diff_new_pack.lL9OQg/_new  2022-09-05 21:22:10.221159766 +0200
@@ -18,7 +18,7 @@
 
 %global _hardened_build 1
 Name:           bolt
-Version:        0.9.2
+Version:        0.9.3
 Release:        0
 Summary:        Thunderbolt 3 device manager
 License:        GPL-2.0-or-later

++++++ bolt-0.9.2.tar.bz2 -> bolt-0.9.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bolt-0.9.2/.gitlab-ci.yml 
new/bolt-0.9.3/.gitlab-ci.yml
--- old/bolt-0.9.2/.gitlab-ci.yml       2022-01-27 15:50:48.000000000 +0100
+++ new/bolt-0.9.3/.gitlab-ci.yml       2022-08-23 00:26:52.000000000 +0200
@@ -26,12 +26,6 @@
     OS: arch
   <<: *build
 
-debian:
-  stage: build
-  variables:
-    OS: debian
-  <<: *build
-
 alpine:
   stage: build
   variables:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bolt-0.9.2/CHANGELOG.md new/bolt-0.9.3/CHANGELOG.md
--- old/bolt-0.9.2/CHANGELOG.md 2022-01-27 15:50:48.000000000 +0100
+++ new/bolt-0.9.3/CHANGELOG.md 2022-08-23 00:26:52.000000000 +0200
@@ -1,3 +1,18 @@
+Version 0.9.3
+-------------
+_Fix for the fix_
+Released: 2022-08-23
+
+* Work around a glib fix that changed behavior of the log API where now
+  calling `g_log_set_writer_func` results in an hard error, which broke
+  the test suite since aforementioned function was indeed called more
+  than once. Nothing a level of indirection couldn't fix.
+
+* CI: disable Debian based ci for now. Another glib fix broke the Debian
+  and Arch based docker container. Fedora has patched glib to bake the
+  fix out again so it is fine.
+
+
 Version 0.9.2
 -------------
 _Please get along_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bolt-0.9.2/meson.build new/bolt-0.9.3/meson.build
--- old/bolt-0.9.2/meson.build  2022-01-27 15:50:48.000000000 +0100
+++ new/bolt-0.9.3/meson.build  2022-08-23 00:26:52.000000000 +0200
@@ -1,6 +1,6 @@
 project('bolt',
   'c',
-  version: '0.9.2',
+  version: '0.9.3',
   license : 'LGPL-2.1+',
   meson_version: '>= 0.46.0',
   default_options: ['warning_level=1',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bolt-0.9.2/tests/test-integration 
new/bolt-0.9.3/tests/test-integration
--- old/bolt-0.9.2/tests/test-integration       2022-01-27 15:50:48.000000000 
+0100
+++ new/bolt-0.9.3/tests/test-integration       2022-08-23 00:26:52.000000000 
+0200
@@ -1144,6 +1144,7 @@
         env = os.environ.copy()
         env['G_DEBUG'] = 'fatal-criticals'
         env['UMOCKDEV_DIR'] = self.testbed.get_root_dir()
+        env['SYSTEMD_DEVICE_VERIFY_SYSFS'] = '0'
         env['STATE_DIRECTORY'] = self.dbpath
         env['RUNTIME_DIRECTORY'] = self.rundir
         if sdnotify:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bolt-0.9.2/tests/test-logging.c 
new/bolt-0.9.3/tests/test-logging.c
--- old/bolt-0.9.2/tests/test-logging.c 2022-01-27 15:50:48.000000000 +0100
+++ new/bolt-0.9.3/tests/test-logging.c 2022-08-23 00:26:52.000000000 +0200
@@ -38,6 +38,34 @@
 #include <stdlib.h>
 #include <stdio.h>
 
+
+typedef struct _TestContext
+{
+  GLogWriterFunc logger;
+  gpointer       logger_data;
+} TestContext;
+
+static GLogWriterOutput
+test_context_logger (GLogLevelFlags   log_level,
+                     const GLogField *fields,
+                     gsize            n_fields,
+                     gpointer         user_data)
+{
+  TestContext *ctx = user_data;
+
+  g_assert_nonnull (ctx);
+  g_assert_nonnull (ctx->logger);
+
+  return ctx->logger (log_level, fields, n_fields, ctx->logger_data);
+}
+
+static void
+test_context_set_logger (TestContext *ctx, GLogWriterFunc logger, gpointer 
user_data)
+{
+  ctx->logger = logger;
+  ctx->logger_data = user_data;
+}
+
 typedef struct _LogData
 {
   GLogLevelFlags level;
@@ -52,8 +80,12 @@
 static void
 test_log_setup (TestLog *tt, gconstpointer user_data)
 {
+  TestContext *ctx = (TestContext *) user_data;
+
+  /* reset logger */
+  test_context_set_logger (ctx, g_log_writer_standard_streams, NULL);
+
   tt->data.fields = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, 
g_free);
-  g_log_set_writer_func (g_log_writer_standard_streams, NULL, NULL);
 }
 
 static void
@@ -149,9 +181,11 @@
 static void
 test_log_basic (TestLog *tt, gconstpointer user_data)
 {
+  TestContext *ctx = (TestContext *) user_data;
+
   log_expect (tt, G_LOG_LEVEL_MESSAGE, "bolt-test", "test", NULL);
 
-  g_log_set_writer_func (test_writer, &tt->data, NULL);
+  test_context_set_logger (ctx, test_writer, &tt->data);
   bolt_log ("bolt-test", G_LOG_LEVEL_MESSAGE, "test");
 
   g_assert_nonnull (bolt_log_level_to_string (G_LOG_LEVEL_ERROR));
@@ -175,13 +209,14 @@
   g_autoptr(GError) error = NULL;
   const char *domain = "bolt-gerror";
   GLogLevelFlags lvl = G_LOG_LEVEL_INFO;
+  TestContext *ctx = user_data;
   const char *msg;
 
   msg = "no udev";
   g_set_error_literal (&error, BOLT_ERROR, BOLT_ERROR_UDEV, msg);
   log_expect (tt, lvl, domain, NULL, "ERROR_MESSAGE", msg, NULL);
 
-  g_log_set_writer_func (test_writer, &tt->data, NULL);
+  test_context_set_logger (ctx, test_writer, &tt->data);
   bolt_log (domain, lvl, LOG_ERR (error), NULL);
 
   /* check we handle NULL GErrors without crashing */
@@ -199,6 +234,7 @@
   const char *msg;
   GLogLevelFlags lvl;
   const char *uid_a = "fbc83890-e9bf-45e5-a777-b3728490989c";
+  TestContext *ctx = user_data;
 
   a = g_object_new (BOLT_TYPE_DEVICE,
                     "uid", uid_a,
@@ -213,7 +249,8 @@
               BOLT_LOG_DEVICE_UID, uid_a,
               NULL);
 
-  g_log_set_writer_func (test_writer, &tt->data, NULL);
+  test_context_set_logger (ctx, test_writer, &tt->data);
+
   bolt_log (domain, lvl, LOG_DEV (a), msg);
 }
 
@@ -222,10 +259,11 @@
 {
   g_autoptr(GError) error = NULL;
   GLogLevelFlags lvl = G_LOG_LEVEL_INFO;
+  TestContext *ctx = user_data;
 
   const char *msg = "da steht ich nun ich armer test";
 
-  g_log_set_writer_func (test_writer, &tt->data, NULL);
+  test_context_set_logger (ctx, test_writer, &tt->data);
 
   log_expect (tt, G_LOG_LEVEL_MESSAGE, G_LOG_DOMAIN, msg, NULL);
   bolt_msg (msg);
@@ -257,10 +295,10 @@
 }
 
 static GLogWriterOutput
-test_log_logger_stdstream (GLogLevelFlags   level,
-                           const GLogField *fields,
-                           gsize            n_fields,
-                           gpointer         user_data)
+test_logger_stdstream (GLogLevelFlags   level,
+                       const GLogField *fields,
+                       gsize            n_fields,
+                       gpointer         user_data)
 {
   g_autoptr(BoltLogCtx) ctx = NULL;
 
@@ -276,10 +314,10 @@
 }
 
 static GLogWriterOutput
-test_log_logger_journal (GLogLevelFlags   level,
-                         const GLogField *fields,
-                         gsize            n_fields,
-                         gpointer         user_data)
+test_logger_journal (GLogLevelFlags   level,
+                     const GLogField *fields,
+                     gsize            n_fields,
+                     gpointer         user_data)
 {
   g_autoptr(BoltLogCtx) ctx = NULL;
   char message[2048] = {0, };
@@ -304,23 +342,24 @@
 }
 
 static void
-test_log_logger (TestLog *tt, gconstpointer user_data)
+check_log_logger (TestLog *tt, gconstpointer user_data, gboolean journal)
 {
   g_autoptr(GError) err = NULL;
   const char *msg = NULL;
   const char *uid1 = "884c6edd-7118-4b21-b186-b02d396ecca0";
   const char *uid2 = "884c6ede-7118-4b21-b186-b02d396ecca0";
   const char *uid3 = "884c6edf-7118-4b21-b186-b02d396ecca0";
+  TestContext *ctx = (TestContext *) user_data;
 
   if (g_test_subprocess ())
     {
       g_autoptr(BoltDomain) dom = NULL;
       g_autoptr(BoltDevice) dev = NULL;
 
-      if (GPOINTER_TO_INT (user_data) == 1)
-        g_log_set_writer_func (test_log_logger_journal, tt, NULL);
+      if (journal)
+        test_context_set_logger (ctx, test_logger_journal, tt);
       else
-        g_log_set_writer_func (test_log_logger_stdstream, tt, NULL);
+        test_context_set_logger (ctx, test_logger_stdstream, tt);
 
       dom = g_object_new (BOLT_TYPE_DOMAIN,
                           "id", "domain0",
@@ -379,57 +418,71 @@
     }
 }
 
+static void
+test_log_logger_stdstream (TestLog *tt, gconstpointer user_data)
+{
+  check_log_logger (tt, user_data, FALSE);
+}
+
+static void
+test_log_logger_journal (TestLog *tt, gconstpointer user_data)
+{
+  check_log_logger (tt, user_data, TRUE);
+}
 
 int
 main (int argc, char **argv)
 {
+  TestContext test_ctx;
 
   setlocale (LC_ALL, "");
 
   g_test_init (&argc, &argv, NULL);
 
+  g_log_set_writer_func (test_context_logger, &test_ctx, NULL);
+
   bolt_dbus_ensure_resources ();
 
   g_test_add ("/logging/basic",
               TestLog,
-              NULL,
+              &test_ctx,
               test_log_setup,
               test_log_basic,
               test_log_tear_down);
 
   g_test_add ("/logging/gerror",
               TestLog,
-              NULL,
+              &test_ctx,
               test_log_setup,
               test_log_gerror,
               test_log_tear_down);
 
   g_test_add ("/logging/device",
               TestLog,
-              NULL,
+              &test_ctx,
               test_log_setup,
               test_log_device,
               test_log_tear_down);
 
   g_test_add ("/logging/macros",
               TestLog,
-              NULL,
+              &test_ctx,
               test_log_setup,
               test_log_macros,
               test_log_tear_down);
 
   g_test_add ("/logging/logger/stdstream",
               TestLog,
-              GINT_TO_POINTER (0),
+              &test_ctx,
               test_log_setup,
-              test_log_logger,
+              test_log_logger_stdstream,
               test_log_tear_down);
 
   g_test_add ("/logging/logger/journal",
               TestLog,
-              GINT_TO_POINTER (1),
+              &test_ctx,
               test_log_setup,
-              test_log_logger,
+              test_log_logger_journal,
               test_log_tear_down);
 
   return g_test_run ();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bolt-0.9.2/tests/test-store.c 
new/bolt-0.9.3/tests/test-store.c
--- old/bolt-0.9.2/tests/test-store.c   2022-01-27 15:50:48.000000000 +0100
+++ new/bolt-0.9.3/tests/test-store.c   2022-08-23 00:26:52.000000000 +0200
@@ -47,13 +47,50 @@
 {
   char      *path;
   BoltStore *store;
+
 } TestStore;
 
+typedef struct
+{
+  GLogWriterFunc logger;
+} TestContext;
+
+static void
+test_context_set_logger (TestContext *data, GLogWriterFunc logger)
+{
+  data->logger = logger;
+}
+
+static GLogWriterOutput
+test_context_logger (GLogLevelFlags   log_level,
+                     const GLogField *fields,
+                     gsize            n_fields,
+                     gpointer         user_data)
+{
+  const TestContext *data = user_data;
+
+  return data->logger (log_level, fields, n_fields, NULL);
+}
+
+static GLogWriterOutput
+null_logger (GLogLevelFlags   log_level,
+             const GLogField *fields,
+             gsize            n_fields,
+             gpointer         user_data)
+{
+  return G_LOG_WRITER_HANDLED;
+}
 
 static void
 test_store_setup (TestStore *tt, gconstpointer user_data)
 {
   g_autoptr(GError) error = NULL;
+  TestContext *ctx = (TestContext *) user_data;
+
+  /* reset logger */
+  test_context_set_logger (ctx, g_log_writer_default);
+
+  ctx->logger = g_log_writer_default;
 
   tt->path = g_dir_make_tmp ("bolt.auth.XXXXXX",
                              &error);
@@ -75,7 +112,6 @@
     }
 
   g_debug ("store at '%s'", tt->path);
-
 }
 
 static void
@@ -444,16 +480,6 @@
     }
 }
 
-static GLogWriterOutput
-null_logger (GLogLevelFlags   log_level,
-             const GLogField *fields,
-             gsize            n_fields,
-             gpointer         user_data)
-{
-  return G_LOG_WRITER_HANDLED;
-}
-
-
 static void
 test_store_invalid_data (TestStore *tt, gconstpointer user_data)
 {
@@ -463,6 +489,7 @@
   g_autoptr(GError) err = NULL;
   g_autoptr(BoltDevice) dev = NULL;
   static const char *uid = "399d33cb-c9cf-4273-8f92-9445437e0b43";
+  TestContext *ctx = (TestContext *) user_data;
   gboolean ok;
   int r;
 
@@ -475,9 +502,9 @@
   g_assert_no_error (err);
   g_assert_true (ok);
 
-  g_log_set_writer_func (null_logger, NULL, NULL);
+  test_context_set_logger (ctx, null_logger);
   dev = bolt_store_get_device (tt->store, uid, &err);
-  g_log_set_writer_func (g_log_writer_default, NULL, NULL);
+  test_context_set_logger (ctx, g_log_writer_default);
 
   g_assert_null (dev);
   g_assert_error (err, BOLT_ERROR, BOLT_ERROR_FAILED);
@@ -905,72 +932,75 @@
 int
 main (int argc, char **argv)
 {
+  TestContext test_context;
 
   setlocale (LC_ALL, "");
 
   g_test_init (&argc, &argv, NULL);
 
+  g_log_set_writer_func (test_context_logger, &test_context, NULL);
+
   bolt_dbus_ensure_resources ();
 
   g_test_add ("/daemon/key",
               TestStore,
-              NULL,
+              &test_context,
               test_store_setup,
               test_key,
               test_store_tear_down);
 
   g_test_add ("/daemon/store/basic",
               TestStore,
-              NULL,
+              &test_context,
               test_store_setup,
               test_store_basic,
               test_store_tear_down);
 
   g_test_add ("/daemon/store/update",
               TestStore,
-              NULL,
+              &test_context,
               test_store_setup,
               test_store_update,
               test_store_tear_down);
 
   g_test_add ("/daemon/store/config",
               TestStore,
-              NULL,
+              &test_context,
               test_store_setup,
               test_store_config,
               test_store_tear_down);
 
   g_test_add ("/daemon/store/invalid_data",
               TestStore,
-              NULL,
+              &test_context,
               test_store_setup,
               test_store_invalid_data,
               test_store_tear_down);
 
   g_test_add ("/daemon/store/times",
               TestStore,
-              NULL,
+              &test_context,
               test_store_setup,
               test_store_times,
               test_store_tear_down);
 
   g_test_add ("/daemon/store/domain",
               TestStore,
-              NULL,
+              &test_context,
               test_store_setup,
               test_store_domain,
               test_store_tear_down);
 
   g_test_add ("/daemon/store/journal",
               TestStore,
-              NULL,
+              &test_context,
               test_store_setup,
               test_store_journal,
               test_store_tear_down);
 
   g_test_add ("/daemon/store/upgrade",
               TestStore,
-              NULL,
+              &test_context,
               test_store_setup,
               test_store_upgrade,
               test_store_tear_down);

Reply via email to