Compare commits
7 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9611e99b9c | ||
|
|
3da25addbe | ||
|
|
e6b2ae4709 | ||
|
|
d2ad18c7f4 | ||
|
|
bf4bfbdc37 | ||
|
|
bfab8c66ff | ||
|
|
d2906841a4 |
3 changed files with 185 additions and 10 deletions
152
0002-rhbug2416542-crash-under-gs_flatpak_refine_wildcard.patch
Normal file
152
0002-rhbug2416542-crash-under-gs_flatpak_refine_wildcard.patch
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
diff -up gnome-software-48.4/plugins/flatpak/gs-flatpak.c.1 gnome-software-48.4/plugins/flatpak/gs-flatpak.c
|
||||
--- gnome-software-48.4/plugins/flatpak/gs-flatpak.c.1 2025-08-01 09:22:18.000000000 +0200
|
||||
+++ gnome-software-48.4/plugins/flatpak/gs-flatpak.c 2025-11-24 16:50:36.718634380 +0100
|
||||
@@ -3653,16 +3653,19 @@ gboolean
|
||||
gs_flatpak_refine_wildcard (GsFlatpak *self, GsApp *app,
|
||||
GsAppList *list, GsPluginRefineFlags refine_flags,
|
||||
gboolean interactive,
|
||||
+ XbSilo **inout_silo,
|
||||
+ gchar **inout_silo_filename,
|
||||
+ GHashTable **inout_installed_by_desktopid,
|
||||
GHashTable **inout_components_by_id,
|
||||
GHashTable **inout_components_by_bundle,
|
||||
GCancellable *cancellable, GError **error)
|
||||
{
|
||||
const gchar *id;
|
||||
GPtrArray* components = NULL;
|
||||
+ XbSilo *silo;
|
||||
+ GHashTable *silo_installed_by_desktopid;
|
||||
+ const gchar *silo_filename;
|
||||
g_autoptr(GError) error_local = NULL;
|
||||
- g_autoptr(XbSilo) silo = NULL;
|
||||
- g_autoptr(GHashTable) silo_installed_by_desktopid = NULL;
|
||||
- g_autofree gchar *silo_filename = NULL;
|
||||
|
||||
GS_PROFILER_BEGIN_SCOPED (FlatpakRefineWildcard, "Flatpak (refine wildcard)", NULL);
|
||||
|
||||
@@ -3671,10 +3674,15 @@ gs_flatpak_refine_wildcard (GsFlatpak *s
|
||||
if (id == NULL)
|
||||
return TRUE;
|
||||
|
||||
- silo = gs_flatpak_ref_silo (self, interactive, &silo_filename, &silo_installed_by_desktopid, cancellable, error);
|
||||
- if (silo == NULL)
|
||||
+ if (*inout_silo == NULL)
|
||||
+ *inout_silo = gs_flatpak_ref_silo (self, interactive, inout_silo_filename, inout_installed_by_desktopid, cancellable, error);
|
||||
+ if (*inout_silo == NULL)
|
||||
return FALSE;
|
||||
|
||||
+ silo = *inout_silo;
|
||||
+ silo_filename = *inout_silo_filename;
|
||||
+ silo_installed_by_desktopid = *inout_installed_by_desktopid;
|
||||
+
|
||||
GS_PROFILER_BEGIN_SCOPED (FlatpakRefineWildcardQuerySilo, "Flatpak (query silo)", NULL);
|
||||
|
||||
if (*inout_components_by_id != NULL) {
|
||||
diff -up gnome-software-48.4/plugins/flatpak/gs-flatpak.h.1 gnome-software-48.4/plugins/flatpak/gs-flatpak.h
|
||||
--- gnome-software-48.4/plugins/flatpak/gs-flatpak.h.1 2025-08-01 09:22:18.000000000 +0200
|
||||
+++ gnome-software-48.4/plugins/flatpak/gs-flatpak.h 2025-11-24 16:51:02.182466824 +0100
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <gnome-software.h>
|
||||
#include <flatpak.h>
|
||||
+#include <xmlb.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@@ -85,6 +86,9 @@ gboolean gs_flatpak_refine_wildcard (GsF
|
||||
GsAppList *list,
|
||||
GsPluginRefineFlags flags,
|
||||
gboolean interactive,
|
||||
+ XbSilo **inout_silo,
|
||||
+ gchar **inout_silo_filename,
|
||||
+ GHashTable **inout_installed_by_desktopid,
|
||||
GHashTable **inout_components_by_id,
|
||||
GHashTable **inout_components_by_bundle,
|
||||
GCancellable *cancellable,
|
||||
diff -up gnome-software-48.4/plugins/flatpak/gs-plugin-flatpak.c.1 gnome-software-48.4/plugins/flatpak/gs-plugin-flatpak.c
|
||||
--- gnome-software-48.4/plugins/flatpak/gs-plugin-flatpak.c.1 2025-08-01 09:22:18.000000000 +0200
|
||||
+++ gnome-software-48.4/plugins/flatpak/gs-plugin-flatpak.c 2025-11-24 16:53:21.846630991 +0100
|
||||
@@ -593,12 +593,29 @@ gs_plugin_flatpak_refine_app (GsPluginFl
|
||||
return gs_flatpak_refine_app (flatpak, app, flags, interactive, FALSE, cancellable, error);
|
||||
}
|
||||
|
||||
+typedef struct {
|
||||
+ XbSilo *silo;
|
||||
+ gchar *silo_filename;
|
||||
+ GHashTable *installed_by_desktopid;
|
||||
+ GHashTable *components_by_id;
|
||||
+ GHashTable *components_by_bundle;
|
||||
+} RefineInstallationData;
|
||||
+
|
||||
static void
|
||||
-unref_nonnull_hash_table (gpointer ptr)
|
||||
+refine_installation_data_free (gpointer ptr)
|
||||
{
|
||||
- GHashTable *hash_table = ptr;
|
||||
- if (hash_table != NULL)
|
||||
- g_hash_table_unref (hash_table);
|
||||
+ RefineInstallationData *data = ptr;
|
||||
+
|
||||
+ if (data == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ g_clear_pointer (&data->silo_filename, g_free);
|
||||
+ g_clear_pointer (&data->installed_by_desktopid, g_hash_table_unref);
|
||||
+ g_clear_pointer (&data->components_by_id, g_hash_table_unref);
|
||||
+ g_clear_pointer (&data->components_by_bundle, g_hash_table_unref);
|
||||
+ /* free the silo as the last, just in case, because the data from it is in the above hash tables */
|
||||
+ g_clear_object (&data->silo);
|
||||
+ g_free (data);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -678,8 +695,7 @@ refine_thread_cb (GTask *task,
|
||||
GsAppList *list = data->list;
|
||||
GsPluginRefineFlags flags = data->flags;
|
||||
gboolean interactive = gs_plugin_has_flags (GS_PLUGIN (self), GS_PLUGIN_FLAGS_INTERACTIVE);
|
||||
- g_autoptr(GPtrArray) array_components_by_id = NULL; /* (element-type GHashTable) */
|
||||
- g_autoptr(GPtrArray) array_components_by_bundle = NULL; /* (element-type GHashTable) */
|
||||
+ g_autoptr(GPtrArray) installation_data = NULL; /* (element-type RefineInstallationData) */
|
||||
g_autoptr(GsAppList) app_list = NULL;
|
||||
g_autoptr(GError) local_error = NULL;
|
||||
|
||||
@@ -700,10 +716,9 @@ refine_thread_cb (GTask *task,
|
||||
* (e.g. inserting an app in the list on every call results in
|
||||
* an infinite loop) */
|
||||
app_list = gs_app_list_copy (list);
|
||||
- array_components_by_id = g_ptr_array_new_full (self->installations->len, unref_nonnull_hash_table);
|
||||
- g_ptr_array_set_size (array_components_by_id, self->installations->len);
|
||||
- array_components_by_bundle = g_ptr_array_new_full (self->installations->len, unref_nonnull_hash_table);
|
||||
- g_ptr_array_set_size (array_components_by_bundle, self->installations->len);
|
||||
+
|
||||
+ installation_data = g_ptr_array_new_full (self->installations->len, refine_installation_data_free);
|
||||
+ g_ptr_array_set_size (installation_data, self->installations->len);
|
||||
|
||||
for (guint j = 0; j < gs_app_list_length (app_list); j++) {
|
||||
GsApp *app = gs_app_list_index (app_list, j);
|
||||
@@ -713,16 +728,20 @@ refine_thread_cb (GTask *task,
|
||||
|
||||
for (guint i = 0; i < self->installations->len; i++) {
|
||||
GsFlatpak *flatpak = g_ptr_array_index (self->installations, i);
|
||||
- GHashTable *components_by_id = array_components_by_id->pdata[i];
|
||||
- GHashTable *components_by_bundle = array_components_by_bundle->pdata[i];
|
||||
+ RefineInstallationData *inst_data = g_ptr_array_index (installation_data, i);
|
||||
+
|
||||
+ if (inst_data == NULL) {
|
||||
+ inst_data = g_new0 (RefineInstallationData, 1);
|
||||
+ installation_data->pdata[i] = inst_data;
|
||||
+ }
|
||||
|
||||
- if (!gs_flatpak_refine_wildcard (flatpak, app, list, flags, interactive, &components_by_id, &components_by_bundle,
|
||||
+ if (!gs_flatpak_refine_wildcard (flatpak, app, list, flags, interactive, &inst_data->silo,
|
||||
+ &inst_data->silo_filename, &inst_data->installed_by_desktopid,
|
||||
+ &inst_data->components_by_id, &inst_data->components_by_bundle,
|
||||
cancellable, &local_error)) {
|
||||
g_task_return_error (task, g_steal_pointer (&local_error));
|
||||
return;
|
||||
}
|
||||
- array_components_by_id->pdata[i] = components_by_id;
|
||||
- array_components_by_bundle->pdata[i] = components_by_bundle;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
%global appstream_version 0.14.0
|
||||
%global flatpak_version 1.9.1
|
||||
%global fwupd_version 1.5.6
|
||||
%global glib2_version 2.70.0
|
||||
%global gtk4_version 4.14.0
|
||||
%global appstream_version 0.16.4
|
||||
%global flatpak_version 1.14.1
|
||||
%global fwupd_version 1.6.2
|
||||
%global glib2_version 2.76.0
|
||||
%global gtk4_version 4.16.0
|
||||
%global json_glib_version 1.6.0
|
||||
%global libadwaita_version 1.6~alpha
|
||||
%global libxmlb_version 0.1.7
|
||||
%global libadwaita_version 1.6.0
|
||||
%global libxmlb_version 0.3.4
|
||||
%global packagekit_version 1.2.5
|
||||
|
||||
# Disable WebApps for RHEL builds
|
||||
|
|
@ -25,14 +25,16 @@
|
|||
%global __provides_exclude_from ^%{_libdir}/%{name}/plugins-%{gs_plugin_version}/.*\\.so.*$
|
||||
|
||||
Name: gnome-software
|
||||
Version: 48~beta
|
||||
Release: 1%{?dist}
|
||||
Version: 48.4
|
||||
Release: 2%{?dist}
|
||||
Summary: A software center for GNOME
|
||||
|
||||
License: GPL-2.0-or-later
|
||||
URL: https://apps.gnome.org/Software
|
||||
Source0: https://download.gnome.org/sources/gnome-software/48/%{name}-%{tarball_version}.tar.xz
|
||||
|
||||
Patch: 0002-rhbug2416542-crash-under-gs_flatpak_refine_wildcard.patch
|
||||
|
||||
# ostree and flatpak not on i686 for Fedora and RHEL 10
|
||||
# https://github.com/containers/composefs/pull/229#issuecomment-1838735764
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 10
|
||||
|
|
@ -288,6 +290,27 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
|
|||
%{_datadir}/gtk-doc/html/gnome-software/
|
||||
|
||||
%changelog
|
||||
* Mon Nov 24 2025 Milan Crha <mcrha@redhat.com> - 48.4-2
|
||||
- Add patch for bug #2416542 (Crash under gs_flatpak_refine_wildcard())
|
||||
|
||||
* Fri Aug 01 2025 Milan Crha <mcrha@redhat.com> - 48.4-1
|
||||
- Update to 48.4
|
||||
|
||||
* Fri Jun 27 2025 Milan Crha <mcrha@redhat.com> - 48.3-1
|
||||
- Update to 48.3
|
||||
|
||||
* Mon Jun 02 2025 Milan Crha <mcrha@redhat.com> - 48.2-1
|
||||
- Update to 48.2
|
||||
|
||||
* Fri Apr 11 2025 Milan Crha <mcrha@redhat.com> - 48.1-1
|
||||
- Update to 48.1
|
||||
|
||||
* Fri Mar 14 2025 Milan Crha <mcrha@redhat.com> - 48.0-1
|
||||
- Update to 48.0
|
||||
|
||||
* Mon Mar 03 2025 Milan Crha <mcrha@redhat.com> - 48~rc-1
|
||||
- Update to 48.rc
|
||||
|
||||
* Mon Feb 03 2025 Milan Crha <mcrha@redhat.com> - 48~beta-1
|
||||
- Update to 48.beta
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (gnome-software-48.beta.tar.xz) = 7f6744bea6e1adb136f9bccd619c9753fa94d5f00a19a3a9e8ef2806b1ea572345abe7462b20ba66e86c9a77a25a0c6cd94ffafd6607f8712e15ed66ebe3dec4
|
||||
SHA512 (gnome-software-48.4.tar.xz) = e789c13ecbc84de1b8ae407a3b7050cccb25f33223db5f5980e917be806d0ec7e61781115a5310f65afd8899ab354de6f4f6bd171e376bbdb3413094f1ae18e1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue