Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package otpclient for openSUSE:Factory 
checked in at 2026-09-01 15:47:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/otpclient (Old)
 and      /work/SRC/openSUSE:Factory/.otpclient.new.1265 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "otpclient"

Tue Sep  1 15:47:32 2026 rev:55 rq:1374887 version:5.1.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/otpclient/otpclient.changes      2026-08-09 
21:35:23.774297496 +0200
+++ /work/SRC/openSUSE:Factory/.otpclient.new.1265/otpclient.changes    
2026-09-01 15:48:51.529807620 +0200
@@ -1,0 +2,17 @@
+Mon Aug 31 13:03:50 UTC 2026 - Dominique Leuenberger <[email protected]>
+
+- Update to 5.1.8:
+  + FIX: no tray icon appeared in sandboxed builds even with a tray
+    host present, because the session bus refused the
+    process-derived org.kde.StatusNotifierItem-<pid>-1 name and the
+    tray tore itself down instead of falling back. The item is now
+    registered under the unique bus connection name whenever the
+    well-known one cannot be had, so the icon appears regardless of
+    what the sandbox grants.
+  + FIX: two sandboxed applications could not both show a tray
+    icon. Every Flatpak process sees itself as pid 2 under bwrap
+    --unshare-pid, so their process-derived StatusNotifierItem
+    names collided and whichever lost the race silently got none.
+    Both now get an icon.
+
+-------------------------------------------------------------------

Old:
----
  v5.1.7.tar.gz
  v5.1.7.tar.gz.asc

New:
----
  v5.1.8.tar.gz
  v5.1.8.tar.gz.asc

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

Other differences:
------------------
++++++ otpclient.spec ++++++
--- /var/tmp/diff_new_pack.7C0O6z/_old  2026-09-01 15:48:52.511841881 +0200
+++ /var/tmp/diff_new_pack.7C0O6z/_new  2026-09-01 15:48:52.515842020 +0200
@@ -18,7 +18,7 @@
 
 %define uclname OTPClient
 Name:           otpclient
-Version:        5.1.7
+Version:        5.1.8
 Release:        0
 Summary:        Simple GTK+ client for managing TOTP and HOTP
 License:        GPL-3.0-or-later

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.7C0O6z/_old  2026-09-01 15:48:52.595844812 +0200
+++ /var/tmp/diff_new_pack.7C0O6z/_new  2026-09-01 15:48:52.602845056 +0200
@@ -1,6 +1,6 @@
-mtime: 1785912198
-commit: f5e85cbf85fbc5370791666edeaed64554619ee2b7814a17142e78e9c325e62b
+mtime: 1788181557
+commit: 68e894b631a825821e8a5f14d21f927b84ced20e99c69a35f7958c522d823d12
 url: https://src.opensuse.org/GNOME/otpclient
-revision: f5e85cbf85fbc5370791666edeaed64554619ee2b7814a17142e78e9c325e62b
+revision: 68e894b631a825821e8a5f14d21f927b84ced20e99c69a35f7958c522d823d12
 projectscmsync: https://src.opensuse.org/GNOME/_ObsPrj
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-08-31 15:05:57.000000000 +0200
@@ -0,0 +1,4 @@
+*.obscpio
+*.osc
+_build.*
+.pbuild


++++++ v5.1.7.tar.gz -> v5.1.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-5.1.7/CMakeLists.txt 
new/OTPClient-5.1.8/CMakeLists.txt
--- old/OTPClient-5.1.7/CMakeLists.txt  2026-08-04 10:31:45.000000000 +0200
+++ new/OTPClient-5.1.8/CMakeLists.txt  2026-08-21 14:21:28.000000000 +0200
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 3.25)
-project(OTPClient VERSION "5.1.7" LANGUAGES "C")
+project(OTPClient VERSION "5.1.8" LANGUAGES "C")
 include(GNUInstallDirs)
 include(CTest)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OTPClient-5.1.7/data/com.github.paolostivanin.OTPClient.appdata.xml 
new/OTPClient-5.1.8/data/com.github.paolostivanin.OTPClient.appdata.xml
--- old/OTPClient-5.1.7/data/com.github.paolostivanin.OTPClient.appdata.xml     
2026-08-04 10:31:45.000000000 +0200
+++ new/OTPClient-5.1.8/data/com.github.paolostivanin.OTPClient.appdata.xml     
2026-08-21 14:21:28.000000000 +0200
@@ -90,6 +90,16 @@
   </content_rating>
 
   <releases>
+    <release version="5.1.8" date="2026-08-21">
+      <description>
+        <p>Bug-fix release. Minimize-to-tray did not work in the Flatpak: the 
switch was greyed out as if the desktop had no system tray, and granting the 
missing permission by hand still produced no icon. The sandbox refuses the 
process-derived bus name the tray asks to own, so the tray now registers with 
the tray host under its unique connection name instead, which needs no 
permission and works in any sandbox. The Flatpak was also missing the 
permissions Auto-Lock needs, so locking on screen lock silently did nothing; 
that is fixed in the Flathub packaging, though locking on suspend stays 
unavailable there.</p>
+        <ul>
+          <li>FIX: no tray icon appeared in sandboxed builds even with a tray 
host present, because the session bus refused the process-derived 
StatusNotifierItem name and the tray gave up. It now falls back to registering 
under its unique bus connection name, which is what Qt applications do, so the 
icon appears regardless of what the sandbox grants (Flathub #79)</li>
+          <li>FIX: two sandboxed applications could not both show a tray icon: 
every Flatpak process sees itself as pid 2, so the process-derived 
StatusNotifierItem names collided and whichever lost the race silently got 
none. Both now get an icon (Flathub #79)</li>
+          <li>PACKAGING: the Flatpak lacked the D-Bus permissions the tray and 
Auto-Lock need. Access to the StatusNotifierWatcher name un-greys the 
minimize-to-tray switch, which had reported "No system tray was detected on 
this desktop" on desktops that do run one, and access to the desktop 
screensaver services makes Auto-Lock on screen lock work, which had been a 
no-op. Auto-Lock on suspend stays unavailable in the Flatpak because it needs 
logind, which Flathub does not permit, so the "Could not subscribe to suspend 
events" warning remains there (Flathub #79)</li>
+        </ul>
+      </description>
+    </release>
     <release version="5.1.7" date="2026-08-04">
       <description>
         <p>Minimize-to-tray is now offered in default builds. It had been an 
opt-in build flag because turning it on could strand the application: on a 
desktop with no system tray, closing the window hid it anyway and left 
OTPClient running invisibly, holding a decrypted database, with no icon to 
bring it back. The app now confirms a tray host is really there before it will 
hide to one, and restores the window if the tray goes away. The feature itself 
is still off by default in Settings.</p>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-5.1.7/src/gui/tray.c 
new/OTPClient-5.1.8/src/gui/tray.c
--- old/OTPClient-5.1.7/src/gui/tray.c  2026-08-04 10:31:45.000000000 +0200
+++ new/OTPClient-5.1.8/src/gui/tray.c  2026-08-21 14:21:28.000000000 +0200
@@ -93,11 +93,12 @@
     gulong close_handler_id;
     gchar *bus_name;
     TrayHostState host;
-    gboolean desired;       /* the user's minimize-to-tray preference */
-    gboolean publishing;    /* bus name request in flight, not yet confirmed */
-    gboolean published;     /* the watcher accepted our item: a tray icon 
exists */
-    gboolean holding;       /* a g_application_hold of ours is outstanding */
-    gboolean window_hidden; /* we tucked the window away on close */
+    gboolean desired;          /* the user's minimize-to-tray preference */
+    gboolean publishing;       /* bus name request in flight, not yet 
confirmed */
+    gboolean published;        /* the watcher accepted our item: a tray icon 
exists */
+    gboolean used_unique_name; /* we registered under :1.x, not the well-known 
name */
+    gboolean holding;          /* a g_application_hold of ours is outstanding 
*/
+    gboolean window_hidden;    /* we tucked the window away on close */
 } TrayData;
 
 static TrayData *tray_data = NULL;
@@ -366,7 +367,9 @@
     (void) name;
 
     TrayData *td = user_data;
-    td->connection = connection;
+    /* Our own reference: the connection has to outlive a refused name request,
+     * because that is exactly when the fallback below still needs it. */
+    g_set_object (&td->connection, connection);
 
     GError *err = NULL;
 
@@ -451,28 +454,41 @@
     tray_sync_hold (tray_data);
 }
 
+/* Ask the watcher to adopt the item, and listen to the answer: whether an icon
+ * actually exists decides whether closing the window is allowed to hide it.
+ * `service` is the bus name the item can be reached at, either our well-known
+ * name or, where the bus refused to hand that out, the unique one. */
 static void
-on_name_acquired (GDBusConnection *connection,
-                  const gchar     *name,
-                  gpointer         user_data)
+tray_register_with_watcher (GDBusConnection *connection,
+                            const gchar     *service)
 {
-    (void) user_data;
-
-    /* Ask the watcher to adopt the item, and this time listen to the answer:
-     * whether an icon actually exists decides whether closing the window is
-     * allowed to hide it. */
     g_dbus_connection_call (connection,
                             WATCHER_BUS_NAME,
                             WATCHER_OBJECT_PATH,
                             "org.kde.StatusNotifierWatcher",
                             "RegisterStatusNotifierItem",
-                            g_variant_new ("(s)", name),
+                            g_variant_new ("(s)", service),
                             NULL,
                             G_DBUS_CALL_FLAGS_NONE,
                             -1, NULL, on_item_registered, NULL);
 }
 
 static void
+on_name_acquired (GDBusConnection *connection,
+                  const gchar     *name,
+                  gpointer         user_data)
+{
+    (void) user_data;
+
+    /* A NameAcquired that arrives after the fallback already registered us
+     * would put a second item in the tray. */
+    if (tray_data == NULL || tray_data->used_unique_name)
+        return;
+
+    tray_register_with_watcher (connection, name);
+}
+
+static void
 on_name_lost (GDBusConnection *connection,
               const gchar     *name,
               gpointer         user_data)
@@ -484,6 +500,27 @@
     if (tray_data == NULL)
         return;
 
+    /* GLib runs on_bus_acquired before this, so the item is already exported 
on
+     * a live connection and only the name is missing. Sandboxes are the usual
+     * reason: xdg-dbus-proxy answers RequestName with ServiceUnknown unless 
the
+     * Flatpak manifest grants --own-name, and every sandboxed app is pid 2, so
+     * the pid-derived name collides between apps anyway. The watcher does not
+     * need a well-known name, so register the unique one instead, which is 
what
+     * Qt's tray does (QDBusMenuConnection passes baseService()). */
+    if (tray_data->publishing && !tray_data->published &&
+        !tray_data->used_unique_name && tray_data->connection != NULL)
+    {
+        const gchar *unique = g_dbus_connection_get_unique_name 
(tray_data->connection);
+        if (unique != NULL)
+        {
+            tray_data->used_unique_name = TRUE;
+            g_info ("Could not own %s, registering the tray item as %s 
instead",
+                    tray_data->bus_name, unique);
+            tray_register_with_watcher (tray_data->connection, unique);
+            return;
+        }
+    }
+
     g_info ("Lost bus name for StatusNotifierItem");
     tray_unpublish (tray_data);
 }
@@ -497,10 +534,13 @@
         return;
 
     td->publishing = TRUE;
+    /* DO_NOT_QUEUE: a pid-derived name is not worth waiting in line for, and
+     * queueing is what would deliver a late NameAcquired on top of a fallback
+     * registration. Two sandboxed apps both at pid 2 now each get an icon. */
     td->bus_name_id =
         g_bus_own_name (G_BUS_TYPE_SESSION,
                         td->bus_name,
-                        G_BUS_NAME_OWNER_FLAGS_NONE,
+                        G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE,
                         on_bus_acquired,
                         on_name_acquired,
                         on_name_lost,
@@ -523,7 +563,7 @@
             g_dbus_connection_unregister_object (td->connection, 
td->menu_registration_id);
             td->menu_registration_id = 0;
         }
-        td->connection = NULL;
+        g_clear_object (&td->connection);
     }
 
     if (td->bus_name_id != 0)
@@ -534,6 +574,7 @@
 
     td->publishing = FALSE;
     td->published = FALSE;
+    td->used_unique_name = FALSE;
     tray_sync_hold (td);
 
     /* The panel can go away (extension toggled off, shell restarted) while the

Reply via email to