Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libaccounts-glib for 
openSUSE:Factory checked in at 2024-03-09 20:54:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libaccounts-glib (Old)
 and      /work/SRC/openSUSE:Factory/.libaccounts-glib.new.1770 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libaccounts-glib"

Sat Mar  9 20:54:13 2024 rev:9 rq:1156440 version:1.26

Changes:
--------
--- /work/SRC/openSUSE:Factory/libaccounts-glib/libaccounts-glib.changes        
2022-09-25 15:34:15.799472679 +0200
+++ 
/work/SRC/openSUSE:Factory/.libaccounts-glib.new.1770/libaccounts-glib.changes  
    2024-03-09 20:55:08.715600715 +0100
@@ -1,0 +2,11 @@
+Fri Mar  8 17:46:14 UTC 2024 - Christophe Marin <christo...@krop.fr>
+
+- Add upstream changes:
+  * 0001-ag-account-fix-incorrect-cleanup-in-ag_account_final.patch
+  * 0002-Build-Don-t-install-Python-overrides-by-default.patch
+  * 0003-Lib-do-not-attempt-to-terminate-the-GTask-twice.patch
+  * 0004-ag-provider-fix-memory-leak-on-provider-tags.patch
+  * 0006-ag-account-do-not-emit-misleading-enabled-signals-on.patch
+- Spec cleanup
+
+-------------------------------------------------------------------

New:
----
  0001-ag-account-fix-incorrect-cleanup-in-ag_account_final.patch
  0002-Build-Don-t-install-Python-overrides-by-default.patch
  0003-Lib-do-not-attempt-to-terminate-the-GTask-twice.patch
  0004-ag-provider-fix-memory-leak-on-provider-tags.patch
  0006-ag-account-do-not-emit-misleading-enabled-signals-on.patch

BETA DEBUG BEGIN:
  New:- Add upstream changes:
  * 0001-ag-account-fix-incorrect-cleanup-in-ag_account_final.patch
  * 0002-Build-Don-t-install-Python-overrides-by-default.patch
  New:  * 0001-ag-account-fix-incorrect-cleanup-in-ag_account_final.patch
  * 0002-Build-Don-t-install-Python-overrides-by-default.patch
  * 0003-Lib-do-not-attempt-to-terminate-the-GTask-twice.patch
  New:  * 0002-Build-Don-t-install-Python-overrides-by-default.patch
  * 0003-Lib-do-not-attempt-to-terminate-the-GTask-twice.patch
  * 0004-ag-provider-fix-memory-leak-on-provider-tags.patch
  New:  * 0003-Lib-do-not-attempt-to-terminate-the-GTask-twice.patch
  * 0004-ag-provider-fix-memory-leak-on-provider-tags.patch
  * 0006-ag-account-do-not-emit-misleading-enabled-signals-on.patch
  New:  * 0004-ag-provider-fix-memory-leak-on-provider-tags.patch
  * 0006-ag-account-do-not-emit-misleading-enabled-signals-on.patch
- Spec cleanup
BETA DEBUG END:

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

Other differences:
------------------
++++++ libaccounts-glib.spec ++++++
--- /var/tmp/diff_new_pack.6afptL/_old  2024-03-09 20:55:09.723637614 +0100
+++ /var/tmp/diff_new_pack.6afptL/_new  2024-03-09 20:55:09.723637614 +0100
@@ -23,10 +23,15 @@
 Release:        0
 Summary:        Account management library for GLib Applications
 License:        LGPL-2.1-only
-Group:          System/Libraries
 URL:            https://gitlab.com/accounts-sso/libaccounts-glib
 Source:         
https://gitlab.com/accounts-sso/libaccounts-glib/-/archive/%{version}/libaccounts-glib-%{version}.tar.gz
 Source1:        baselibs.conf
+# PATCH-FIX-UPSTREAM
+Patch0:         0001-ag-account-fix-incorrect-cleanup-in-ag_account_final.patch
+Patch1:         0002-Build-Don-t-install-Python-overrides-by-default.patch
+Patch2:         0003-Lib-do-not-attempt-to-terminate-the-GTask-twice.patch
+Patch3:         0004-ag-provider-fix-memory-leak-on-provider-tags.patch
+Patch4:         0006-ag-account-do-not-emit-misleading-enabled-signals-on.patch
 BuildRequires:  gtk-doc
 BuildRequires:  meson
 BuildRequires:  pkgconfig
@@ -46,24 +51,14 @@
 %description
 This package contains the shared libraries for use by applications.
 
-%package -n %{name}%{sover}
+%package -n libaccounts-glib%{sover}
 Summary:        Account management library for GLib Applications
-Group:          System/Libraries
 
-%description -n %{name}%{sover}
+%description -n libaccounts-glib%{sover}
 This package contains the shared libraries for use by applications.
 
-%package -n python3-libaccounts
-Summary:        Python bindings for the Account management library
-Group:          Development/Languages/Python
-
-%description -n python3-libaccounts
-This package contains the python bindings for the account
-management library.
-
 %package -n %{typelib}
 Summary:        Account management library for GLib Applications -- 
Introspection Bindings
-Group:          System/Libraries
 
 %description -n %{typelib}
 This package contains the GObject Introspection bindings for the
@@ -71,10 +66,8 @@
 
 %package devel
 Summary:        Development files for libaccounts-glib
-Group:          Development/Libraries/C and C++
-Requires:       %{name}%{sover} = %{version}
+Requires:       libaccounts-glib%{sover} = %{version}
 Requires:       %{typelib} = %{version}
-Requires:       python3-libaccounts = %{version}
 
 %description devel
 This package contains the development files for the accounts-glib
@@ -82,7 +75,6 @@
 
 %package docs
 Summary:        Documentation for libaccounts-glib
-Group:          Documentation/HTML
 BuildArch:      noarch
 
 %description docs
@@ -91,8 +83,7 @@
 
 %package tools
 Summary:        Tools for libaccounts-glib
-Group:          Development/Tools/Other
-Requires:       %{name}%{sover} = %{version}
+Requires:       libaccounts-glib%{sover} = %{version}
 
 %description tools
 This package contains the tools for the accounts-glib library.
@@ -102,39 +93,36 @@
 
 %build
 %meson
+
 %meson_build
 
 %install
 %meson_install
 
-%post -n %{name}%{sover} -p /sbin/ldconfig
-%postun -n %{name}%{sover} -p /sbin/ldconfig
+%ldconfig_scriptlets -n libaccounts-glib%{sover}
 
-%files -n %{name}%{sover}
+%files -n libaccounts-glib%{sover}
 %doc NEWS
 %license COPYING
-%{_libdir}/%{name}.so.%{sover}*
+%{_libdir}/libaccounts-glib.so.%{sover}*
 # The library version wasn't updated in the 1.26 release
-%{_libdir}/%{name}.so.1.25
+%{_libdir}/libaccounts-glib.so.1.25
 
 %files -n %{typelib}
 %{_libdir}/girepository-1.0/Accounts-1.0.typelib
 
-%files -n python3-libaccounts
-%{python3_sitearch}/gi/overrides/
-
 %files devel
-%{_includedir}/%{name}/
+%{_includedir}/libaccounts-glib/
 %{_datadir}/gettext/
-%{_libdir}/%{name}.so
-%{_libdir}/pkgconfig/%{name}.pc
+%{_libdir}/libaccounts-glib.so
+%{_libdir}/pkgconfig/libaccounts-glib.pc
 %{_datadir}/gir-1.0/Accounts-1.0.gir
 %dir %{_datadir}/vala/
 %dir %{_datadir}/vala/vapi/
-%{_datadir}/vala/vapi/%{name}.*
+%{_datadir}/vala/vapi/libaccounts-glib.*
 
 %files docs
-%doc %{_datadir}/gtk-doc/html/%{name}/
+%doc %{_datadir}/gtk-doc/html/libaccounts-glib/
 
 %files tools
 %{_bindir}/ag-backup

++++++ 0001-ag-account-fix-incorrect-cleanup-in-ag_account_final.patch ++++++
>From 270a66d5efe1453a2be4bad10894b947fdd2923e Mon Sep 17 00:00:00 2001
From: Alberto Mardegan <ma...@users.sourceforge.net>
Date: Tue, 4 Oct 2022 20:58:27 +0300
Subject: [PATCH 1/8] ag-account: fix incorrect cleanup in ag_account_finalize

The wrong variable was passed to _ag_account_changes_free(); as a matter
of facts, this code was always a NOP, since prig->services had already
been nullified before, but it was a memory leak.

Fixes: https://gitlab.com/accounts-sso/libaccounts-glib/-/issues/13
---
 libaccounts-glib/ag-account.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libaccounts-glib/ag-account.c b/libaccounts-glib/ag-account.c
index 8d6995b..7e67ba7 100644
--- a/libaccounts-glib/ag-account.c
+++ b/libaccounts-glib/ag-account.c
@@ -994,7 +994,7 @@ ag_account_finalize (GObject *object)
     if (priv->changes)
     {
         DEBUG_INFO ("Finalizing account with uncommitted changes!");
-        g_clear_pointer (&priv->services, _ag_account_changes_free);
+        g_clear_pointer (&priv->changes, _ag_account_changes_free);
     }
 
     G_OBJECT_CLASS (ag_account_parent_class)->finalize (object);
-- 
2.44.0


++++++ 0002-Build-Don-t-install-Python-overrides-by-default.patch ++++++
>From eac26830b73c74fcb0cfec96cab01c97358645fa Mon Sep 17 00:00:00 2001
From: "FeRD (Frank Dana)" <ferd...@gmail.com>
Date: Thu, 2 Feb 2023 16:59:18 -0500
Subject: [PATCH 2/8] Build: Don't install Python overrides by default

It's not clear when (if ever) it's necessary to install the
overrides file for Python's gobject introspection. A new option
'install-py-overrides' controls whether that install is attempted.
The option defaults to 'false', so installing the overrides will
now require adding `-Dinstall-py-overrides=true` to the initial
`meson` setup command.

Signed-off-by: FeRD (Frank Dana) <ferd...@gmail.com>
---
 libaccounts-glib/pygobject/meson.build | 31 ++++++++++++++++----------
 meson_options.txt                      |  1 +
 2 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/libaccounts-glib/pygobject/meson.build 
b/libaccounts-glib/pygobject/meson.build
index 955c78d..39ef700 100644
--- a/libaccounts-glib/pygobject/meson.build
+++ b/libaccounts-glib/pygobject/meson.build
@@ -1,19 +1,26 @@
 py_override = get_option('py-overrides-dir')
+install_overrides = get_option('install-py-overrides')
 
-if py_override == ''
-    python3 = import('python3')
-    python_exec = python3.find_python()
+if install_overrides
+    if py_override == ''
+        python3 = import('python3')
+        python_exec = python3.find_python()
 
-    python_exec_result = run_command(python_exec, ['-c', 'import gi; from 
os.path import abspath; print(abspath(gi._overridesdir))'])
+        python_exec_result = run_command(
+            python_exec, [
+                '-c',
+                'import gi; from os.path import abspath; 
print(abspath(gi._overridesdir))'
+            ])
 
-    if python_exec_result.returncode() != 0
-        error('Failed to retreive the python GObject override directory')
+        if python_exec_result.returncode() != 0
+            error('Failed to retreive the python GObject override directory')
+        endif
+
+        py_override = python_exec_result.stdout().strip()
     endif
 
-    py_override = python_exec_result.stdout().strip()
+    install_data(
+        'Accounts.py',
+        install_dir: py_override
+    )
 endif
-
-install_data(
-    'Accounts.py',
-    install_dir: py_override
-)
diff --git a/meson_options.txt b/meson_options.txt
index 2c33804..44161de 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1 +1,2 @@
+option('install-py-overrides', type: 'boolean', value: false, description: 
'Install Python gi overrides file')
 option('py-overrides-dir', type : 'string', value : '', description: 'Path to 
pygobject overrides directory')
-- 
2.44.0


++++++ 0003-Lib-do-not-attempt-to-terminate-the-GTask-twice.patch ++++++
>From 6236136418a437b5dc2d11c9c83b6e74f246aece Mon Sep 17 00:00:00 2001
From: Alberto Mardegan <ma...@users.sourceforge.net>
Date: Wed, 26 Apr 2023 21:05:37 +0300
Subject: [PATCH 3/8] Lib: do not attempt to terminate the GTask twice

Move the "finish" label after the calls to g_task_return_*() since we
already called g_task_return_error_if_cancelled() in case the job was
cancelled.

Fixes: #11
---
 libaccounts-glib/ag-manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libaccounts-glib/ag-manager.c b/libaccounts-glib/ag-manager.c
index 5460b0b..a9136e6 100644
--- a/libaccounts-glib/ag-manager.c
+++ b/libaccounts-glib/ag-manager.c
@@ -1108,7 +1108,6 @@ exec_transaction_idle (StoreCbData *sd)
                                      "Generic error");
     }
 
-finish:
     if (error != NULL)
     {
         g_task_return_error (sd->task, error);
@@ -1118,6 +1117,7 @@ finish:
         g_task_return_boolean (sd->task, TRUE);
     }
 
+finish:
     _ag_account_store_completed (account, sd->changes);
 
     priv->locks = g_list_remove (priv->locks, sd);
-- 
2.44.0


++++++ 0004-ag-provider-fix-memory-leak-on-provider-tags.patch ++++++
>From 1619ea3f108e33384dcd33a57f1b1e548f90ecfb Mon Sep 17 00:00:00 2001
From: Alberto Mardegan <ma...@users.sourceforge.net>
Date: Mon, 6 Nov 2023 12:57:03 +0300
Subject: [PATCH 4/8] ag-provider: fix memory leak on provider tags

Commit a689b87e5a9185d36669822646f5f5bc57d8f846 adder support for tags
in provider files, but was not properly freeing the allocated memory.
---
 libaccounts-glib/ag-provider.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libaccounts-glib/ag-provider.c b/libaccounts-glib/ag-provider.c
index 8a79616..bd11ac9 100644
--- a/libaccounts-glib/ag-provider.c
+++ b/libaccounts-glib/ag-provider.c
@@ -545,6 +545,7 @@ ag_provider_unref (AgProvider *provider)
         g_clear_pointer (&provider->plugin_name, g_free);
         g_clear_pointer (&provider->file_data, g_free);
         g_clear_pointer (&provider->default_settings, g_hash_table_unref);
+        g_clear_pointer (&provider->tags, g_hash_table_unref);
         g_slice_free (AgProvider, provider);
     }
 }
-- 
2.44.0


++++++ 0006-ag-account-do-not-emit-misleading-enabled-signals-on.patch ++++++
>From e7ad15bc5ca5649f719679c3791244eccba0f057 Mon Sep 17 00:00:00 2001
From: Alberto Mardegan <ma...@users.sourceforge.net>
Date: Mon, 6 Nov 2023 13:00:29 +0300
Subject: [PATCH 6/8] ag-account: do not emit misleading enabled signals on
 account services

Something must have changed in the internals of GHashTable, so that now
the keys happen to be ordered in such a way that broke a libaccounts-qt
test in Ubuntu 22.04 [1]. The failure has been traced back to
libaccounts-glib, and happens when the enabled properties on an account
and on one of its services are changed in such a way that the overall
service status should remain disabled, yet two enabled signals (first
one with value "enabled", second "disabled") are emitted on the account
service. While the end result is correct, the two signals would be
better not be emitted at all, since the account service enabledness
never actually changed.

To fix this, instead of emitting the AgAccount::enabled signals while we
iterate the changes, we delay their emission until the end of the update
loop, so that the AgAccountService will already have the updated
information on the enabledness status and won't emit its enabled signal.

[1]: 
https://gitlab.com/accounts-sso/libaccounts-qt/-/merge_requests/18#note_1138904460
---
 libaccounts-glib/ag-account.c | 28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)

diff --git a/libaccounts-glib/ag-account.c b/libaccounts-glib/ag-account.c
index 7e67ba7..ab19ba2 100644
--- a/libaccounts-glib/ag-account.c
+++ b/libaccounts-glib/ag-account.c
@@ -223,6 +223,11 @@ typedef struct {
     gpointer user_data;
 } AsyncReadyCbWrapperData;
 
+typedef struct {
+    gchar *service_name;
+    gboolean enabled;
+} EnabledSignalParams;
+
 #define AG_ITER_STAGE_UNSET     0
 #define AG_ITER_STAGE_ACCOUNT   1
 #define AG_ITER_STAGE_SERVICE   2
@@ -584,6 +589,7 @@ update_settings (AgAccount *account, GHashTable *services)
     AgServiceChanges *sc;
     gchar *service_name;
     GList *watch_list = NULL;
+    GSList *enabled_signals = NULL;
 
     g_hash_table_iter_init (&iter, services);
     while (g_hash_table_iter_next (&iter,
@@ -641,10 +647,12 @@ update_settings (AgAccount *account, GHashTable *services)
                     {
                         priv->enabled =
                             value ? g_variant_get_boolean (value) : FALSE;
-                        g_signal_emit (account, signals[ENABLED], 0,
-                                       NULL, priv->enabled);
                         g_object_notify_by_pspec ((GObject *)account,
                                                   properties[PROP_ENABLED]);
+                        EnabledSignalParams *params = g_new 
(EnabledSignalParams, 1);
+                        params->service_name = NULL;
+                        params->enabled = priv->enabled;
+                        enabled_signals = g_slist_prepend (enabled_signals, 
params);
                         continue;
                     }
                 }
@@ -665,12 +673,24 @@ update_settings (AgAccount *account, GHashTable *services)
             {
                 gboolean enabled =
                     value ? g_variant_get_boolean (value) : FALSE;
-                g_signal_emit (account, signals[ENABLED], 0,
-                               service_name, enabled);
+                EnabledSignalParams *params = g_new (EnabledSignalParams, 1);
+                params->service_name = service_name;
+                params->enabled = enabled;
+                enabled_signals = g_slist_prepend (enabled_signals, params);
             }
         }
     }
 
+    /* Emit all enabled signals */
+    while (enabled_signals)
+    {
+        EnabledSignalParams *params = enabled_signals->data;
+        g_signal_emit (account, signals[ENABLED], 0,
+                       params->service_name, params->enabled);
+        g_free (params);
+        enabled_signals = g_slist_delete_link (enabled_signals, 
enabled_signals);
+    }
+
     /* Invoke all watches
      * While whatches are running, let the receivers retrieve the changes
      * table with _ag_account_get_service_changes(): set it into the
-- 
2.44.0

Reply via email to