From 142b342f076d0d237abb8feacb0c46ffbe7f0c0f Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 11 Feb 2022 11:39:45 +0100 Subject: [PATCH 001/138] Update to 42.beta --- gnome-software.spec | 12 +++++++----- sources | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gnome-software.spec b/gnome-software.spec index 221afbc..7929076 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -1,4 +1,5 @@ %global appstream_version 0.14.0 +%global libadwaita_version 1.0.1 %global libxmlb_version 0.1.7 %global glib2_version 2.61.1 %global gtk4_version 4.4.0 @@ -11,8 +12,8 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 42~alpha -Release: 2%{?dist} +Version: 42~beta +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -36,7 +37,7 @@ BuildRequires: pkgconfig(gtk4) >= %{gtk4_version} BuildRequires: gtk-doc BuildRequires: json-glib-devel >= %{json_glib_version} BuildRequires: libdnf-devel -BuildRequires: pkgconfig(libadwaita-1) +BuildRequires: pkgconfig(libadwaita-1) >= %{libadwaita_version} BuildRequires: libsoup-devel BuildRequires: libxmlb-devel >= %{libxmlb_version} BuildRequires: malcontent-devel @@ -147,8 +148,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_bindir}/gnome-software %{_datadir}/applications/gnome-software-local-file.desktop %{_datadir}/applications/org.gnome.Software.desktop -%dir %{_datadir}/gnome-software -%{_datadir}/gnome-software/*.png %{_mandir}/man1/gnome-software.1.gz %{_datadir}/icons/hicolor/*/apps/org.gnome.Software.svg %{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Software-symbolic.svg @@ -198,6 +197,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Fri Feb 11 2022 Milan Crha - 42.beta-1 +- Update to 42.beta + * Thu Jan 20 2022 Fedora Release Engineering - 42~alpha-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 3210d9f..2f9377d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-42.alpha.tar.xz) = fa63ab4cffe72f9f8b348cd7e021da515963258271310d3933d985f00190c3ffe0f1d664d65ec5ff577d153c6de5d11eef9b1e6d9aa1e171d27f0f1b570dbdeb +SHA512 (gnome-software-42.beta.tar.xz) = 3ae22c9a37a134a6340191aabc7b02f6b53322820853aacd36e6d43893d7118d177defff44de93b627e488411798570b9c82c99b354966a899563e27d8c32a6a From e15fddd1ebefe13b85df32f5beacba63085ab60f Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 11 Feb 2022 11:39:45 +0100 Subject: [PATCH 002/138] Update to 42.beta --- gnome-software.spec | 12 +++++++----- sources | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gnome-software.spec b/gnome-software.spec index 221afbc..7929076 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -1,4 +1,5 @@ %global appstream_version 0.14.0 +%global libadwaita_version 1.0.1 %global libxmlb_version 0.1.7 %global glib2_version 2.61.1 %global gtk4_version 4.4.0 @@ -11,8 +12,8 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 42~alpha -Release: 2%{?dist} +Version: 42~beta +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -36,7 +37,7 @@ BuildRequires: pkgconfig(gtk4) >= %{gtk4_version} BuildRequires: gtk-doc BuildRequires: json-glib-devel >= %{json_glib_version} BuildRequires: libdnf-devel -BuildRequires: pkgconfig(libadwaita-1) +BuildRequires: pkgconfig(libadwaita-1) >= %{libadwaita_version} BuildRequires: libsoup-devel BuildRequires: libxmlb-devel >= %{libxmlb_version} BuildRequires: malcontent-devel @@ -147,8 +148,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_bindir}/gnome-software %{_datadir}/applications/gnome-software-local-file.desktop %{_datadir}/applications/org.gnome.Software.desktop -%dir %{_datadir}/gnome-software -%{_datadir}/gnome-software/*.png %{_mandir}/man1/gnome-software.1.gz %{_datadir}/icons/hicolor/*/apps/org.gnome.Software.svg %{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Software-symbolic.svg @@ -198,6 +197,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Fri Feb 11 2022 Milan Crha - 42.beta-1 +- Update to 42.beta + * Thu Jan 20 2022 Fedora Release Engineering - 42~alpha-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 3210d9f..2f9377d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-42.alpha.tar.xz) = fa63ab4cffe72f9f8b348cd7e021da515963258271310d3933d985f00190c3ffe0f1d664d65ec5ff577d153c6de5d11eef9b1e6d9aa1e171d27f0f1b570dbdeb +SHA512 (gnome-software-42.beta.tar.xz) = 3ae22c9a37a134a6340191aabc7b02f6b53322820853aacd36e6d43893d7118d177defff44de93b627e488411798570b9c82c99b354966a899563e27d8c32a6a From f6af9a7826fd165c5f82401798d9769940d92b56 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 11 Feb 2022 12:28:17 +0100 Subject: [PATCH 003/138] Correct files list for popular plugin removal --- gnome-software.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnome-software.spec b/gnome-software.spec index 7929076..d77af53 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -166,7 +166,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_fwupd.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_generic-updates.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_hardcoded-blocklist.so -%{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_hardcoded-popular.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_icons.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_malcontent.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_modalias.so @@ -178,6 +177,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_rewrite-resource.so %{_sysconfdir}/xdg/autostart/gnome-software-service.desktop %{_datadir}/app-info/xmls/org.gnome.Software.Featured.xml +%{_datadir}/app-info/xmls/org.gnome.Software.Popular.xml %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service %{_datadir}/dbus-1/services/org.gnome.Software.service %{_datadir}/gnome-shell/search-providers/org.gnome.Software-search-provider.ini From dbdd7dcc5955af71d0dc0fa6785e1277f7ef0890 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 11 Feb 2022 12:28:17 +0100 Subject: [PATCH 004/138] Correct files list for popular plugin removal --- gnome-software.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnome-software.spec b/gnome-software.spec index 7929076..d77af53 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -166,7 +166,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_fwupd.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_generic-updates.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_hardcoded-blocklist.so -%{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_hardcoded-popular.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_icons.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_malcontent.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_modalias.so @@ -178,6 +177,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_rewrite-resource.so %{_sysconfdir}/xdg/autostart/gnome-software-service.desktop %{_datadir}/app-info/xmls/org.gnome.Software.Featured.xml +%{_datadir}/app-info/xmls/org.gnome.Software.Popular.xml %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service %{_datadir}/dbus-1/services/org.gnome.Software.service %{_datadir}/gnome-shell/search-providers/org.gnome.Software-search-provider.ini From 1fac831a3136d218196aece5b6da4200f953641b Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 16 Feb 2022 17:41:29 +0100 Subject: [PATCH 005/138] Resolves: #2054939 (Crash on a PackageKit app install) --- 0002-packagekit-crash-on-app-install.patch | 28 ++++++++++++++++++++++ gnome-software.spec | 6 ++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0002-packagekit-crash-on-app-install.patch diff --git a/0002-packagekit-crash-on-app-install.patch b/0002-packagekit-crash-on-app-install.patch new file mode 100644 index 0000000..04e85b3 --- /dev/null +++ b/0002-packagekit-crash-on-app-install.patch @@ -0,0 +1,28 @@ +From 73d1c9fd58d2fdf2c2d84e70cce678390679baa9 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 16 Feb 2022 15:01:46 +0100 +Subject: [PATCH] PackageKit: Fix a crash on app install + +The array should be NULL-terminated, thus add the NULL at the end. + +Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1648 +--- + plugins/packagekit/gs-plugin-packagekit.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c +index 1ad913af5..56ddb1ccc 100644 +--- a/plugins/packagekit/gs-plugin-packagekit.c ++++ b/plugins/packagekit/gs-plugin-packagekit.c +@@ -612,6 +612,8 @@ gs_plugin_app_install (GsPlugin *plugin, + return FALSE; + } + ++ g_ptr_array_add (array_package_ids, NULL); ++ + gs_app_set_state (app, GS_APP_STATE_INSTALLING); + + for (i = 0; i < gs_app_list_length (addons); i++) { +-- +GitLab + diff --git a/gnome-software.spec b/gnome-software.spec index d77af53..b30cd16 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -13,7 +13,7 @@ Name: gnome-software Version: 42~beta -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -21,6 +21,7 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch +Patch02: 0002-packagekit-crash-on-app-install.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -197,6 +198,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Wed Feb 16 2022 Milan Crha - 42.beta-2 +- Resolves: #2054939 (Crash on a PackageKit app install) + * Fri Feb 11 2022 Milan Crha - 42.beta-1 - Update to 42.beta From 899c5e4c98176047adac0a5f06021507455f7c7b Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 16 Feb 2022 17:41:29 +0100 Subject: [PATCH 006/138] Resolves: #2054939 (Crash on a PackageKit app install) --- 0002-packagekit-crash-on-app-install.patch | 28 ++++++++++++++++++++++ gnome-software.spec | 6 ++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0002-packagekit-crash-on-app-install.patch diff --git a/0002-packagekit-crash-on-app-install.patch b/0002-packagekit-crash-on-app-install.patch new file mode 100644 index 0000000..04e85b3 --- /dev/null +++ b/0002-packagekit-crash-on-app-install.patch @@ -0,0 +1,28 @@ +From 73d1c9fd58d2fdf2c2d84e70cce678390679baa9 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 16 Feb 2022 15:01:46 +0100 +Subject: [PATCH] PackageKit: Fix a crash on app install + +The array should be NULL-terminated, thus add the NULL at the end. + +Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1648 +--- + plugins/packagekit/gs-plugin-packagekit.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c +index 1ad913af5..56ddb1ccc 100644 +--- a/plugins/packagekit/gs-plugin-packagekit.c ++++ b/plugins/packagekit/gs-plugin-packagekit.c +@@ -612,6 +612,8 @@ gs_plugin_app_install (GsPlugin *plugin, + return FALSE; + } + ++ g_ptr_array_add (array_package_ids, NULL); ++ + gs_app_set_state (app, GS_APP_STATE_INSTALLING); + + for (i = 0; i < gs_app_list_length (addons); i++) { +-- +GitLab + diff --git a/gnome-software.spec b/gnome-software.spec index d77af53..b30cd16 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -13,7 +13,7 @@ Name: gnome-software Version: 42~beta -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -21,6 +21,7 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch +Patch02: 0002-packagekit-crash-on-app-install.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -197,6 +198,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Wed Feb 16 2022 Milan Crha - 42.beta-2 +- Resolves: #2054939 (Crash on a PackageKit app install) + * Fri Feb 11 2022 Milan Crha - 42.beta-1 - Update to 42.beta From 422e17de7730df6eb6696ce702c7733faaaf591c Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 16 Feb 2022 17:49:57 +0100 Subject: [PATCH 007/138] Add a temporary workaround for gtk_widget_measure error flood on GsAppRow --- ...pprow-gtk_widget_measure-error-flood.patch | 39 +++++++++++++++++++ gnome-software.spec | 4 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch diff --git a/0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch b/0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch new file mode 100644 index 0000000..0a24881 --- /dev/null +++ b/0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch @@ -0,0 +1,39 @@ +diff -up gnome-software-42.beta/src/gs-app-row.ui.3 gnome-software-42.beta/src/gs-app-row.ui +--- gnome-software-42.beta/src/gs-app-row.ui.3 2022-02-10 20:53:14.109477000 +0100 ++++ gnome-software-42.beta/src/gs-app-row.ui 2022-02-16 17:49:02.583817963 +0100 +@@ -26,7 +26,7 @@ + center + + +- True ++ False + 0.0 + 0.5 + end +@@ -80,7 +80,7 @@ + False + 0.0 + 0.5 +- True ++ False + word-char + end + 2 +@@ -119,7 +119,7 @@ + True + 24 + 24 +- True ++ False + word-char + end + 2 +@@ -187,7 +187,7 @@ + False + warning-text + start +- True ++ False + 0 + + diff --git a/gnome-software.spec b/gnome-software.spec index b30cd16..280f9df 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -22,6 +22,7 @@ Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarbal Patch01: 0001-crash-with-broken-theme.patch Patch02: 0002-packagekit-crash-on-app-install.patch +Patch03: 0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -103,7 +104,7 @@ and update software in the GNOME desktop. This package includes the rpm-ostree backend. %prep -%autosetup -p1 -n %{name}-%{tarball_version} +%autosetup -p1 -S gendiff -n %{name}-%{tarball_version} %build %meson \ @@ -200,6 +201,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %changelog * Wed Feb 16 2022 Milan Crha - 42.beta-2 - Resolves: #2054939 (Crash on a PackageKit app install) +- Add a temporary workaround for gtk_widget_measure error flood on GsAppRow * Fri Feb 11 2022 Milan Crha - 42.beta-1 - Update to 42.beta From bb56a71e3c1aebbf4697e318fd8e19002a1008db Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 16 Feb 2022 17:49:57 +0100 Subject: [PATCH 008/138] Add a temporary workaround for gtk_widget_measure error flood on GsAppRow --- ...pprow-gtk_widget_measure-error-flood.patch | 39 +++++++++++++++++++ gnome-software.spec | 4 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch diff --git a/0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch b/0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch new file mode 100644 index 0000000..0a24881 --- /dev/null +++ b/0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch @@ -0,0 +1,39 @@ +diff -up gnome-software-42.beta/src/gs-app-row.ui.3 gnome-software-42.beta/src/gs-app-row.ui +--- gnome-software-42.beta/src/gs-app-row.ui.3 2022-02-10 20:53:14.109477000 +0100 ++++ gnome-software-42.beta/src/gs-app-row.ui 2022-02-16 17:49:02.583817963 +0100 +@@ -26,7 +26,7 @@ + center + + +- True ++ False + 0.0 + 0.5 + end +@@ -80,7 +80,7 @@ + False + 0.0 + 0.5 +- True ++ False + word-char + end + 2 +@@ -119,7 +119,7 @@ + True + 24 + 24 +- True ++ False + word-char + end + 2 +@@ -187,7 +187,7 @@ + False + warning-text + start +- True ++ False + 0 + + diff --git a/gnome-software.spec b/gnome-software.spec index b30cd16..280f9df 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -22,6 +22,7 @@ Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarbal Patch01: 0001-crash-with-broken-theme.patch Patch02: 0002-packagekit-crash-on-app-install.patch +Patch03: 0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -103,7 +104,7 @@ and update software in the GNOME desktop. This package includes the rpm-ostree backend. %prep -%autosetup -p1 -n %{name}-%{tarball_version} +%autosetup -p1 -S gendiff -n %{name}-%{tarball_version} %build %meson \ @@ -200,6 +201,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %changelog * Wed Feb 16 2022 Milan Crha - 42.beta-2 - Resolves: #2054939 (Crash on a PackageKit app install) +- Add a temporary workaround for gtk_widget_measure error flood on GsAppRow * Fri Feb 11 2022 Milan Crha - 42.beta-1 - Update to 42.beta From 913366d7d63e62d9fbd302a9c820237b69ad3df2 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 21 Feb 2022 10:30:51 +0100 Subject: [PATCH 009/138] Resolves: #2056082 (Enable PackageKit autoremove option) --- gnome-software.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnome-software.spec b/gnome-software.spec index 280f9df..eb8cb8b 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -13,7 +13,7 @@ Name: gnome-software Version: 42~beta -Release: 2%{?dist} +Release: 3%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -113,6 +113,7 @@ This package includes the rpm-ostree backend. -Dmalcontent=true \ -Dgudev=true \ -Dpackagekit=true \ + -Dpackagekit_autoremove=true \ -Dexternal_appstream=false \ -Drpm_ostree=true \ -Dtests=false @@ -199,6 +200,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Mon Feb 21 2022 Milan Crha - 42.beta-3 +- Resolves: #2056082 (Enable PackageKit autoremove option) + * Wed Feb 16 2022 Milan Crha - 42.beta-2 - Resolves: #2054939 (Crash on a PackageKit app install) - Add a temporary workaround for gtk_widget_measure error flood on GsAppRow From f3f073c56f8e1a73d147ef540210328338cd92d5 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 7 Mar 2022 08:15:08 +0100 Subject: [PATCH 010/138] Update to 42.rc --- 0001-crash-with-broken-theme.patch | 24 ++++-------- 0002-packagekit-crash-on-app-install.patch | 28 ------------- ...pprow-gtk_widget_measure-error-flood.patch | 39 ------------------- gnome-software.spec | 11 +++--- sources | 2 +- 5 files changed, 14 insertions(+), 90 deletions(-) delete mode 100644 0002-packagekit-crash-on-app-install.patch delete mode 100644 0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch diff --git a/0001-crash-with-broken-theme.patch b/0001-crash-with-broken-theme.patch index fd37e80..ddbef4a 100644 --- a/0001-crash-with-broken-theme.patch +++ b/0001-crash-with-broken-theme.patch @@ -1,29 +1,22 @@ -From 3a644c151f27f439c36170f0958fd21cf1cc54d0 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Thu, 3 Jun 2021 08:33:53 +0200 Subject: [PATCH] gs-feature-tile: Do not abort when the theme is broken Just print a warning when the theme doesn't provide 'theme_fg_color' and fallback to black color. Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1228 ---- - src/gs-feature-tile.c | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) -diff --git a/src/gs-feature-tile.c b/src/gs-feature-tile.c -index 1c85083eb..158af1e56 100644 ---- a/src/gs-feature-tile.c -+++ b/src/gs-feature-tile.c -@@ -268,7 +268,6 @@ gs_feature_tile_refresh (GsAppTile *self) +diff -up gnome-software-42.rc/src/gs-feature-tile.c.1 gnome-software-42.rc/src/gs-feature-tile.c +--- gnome-software-42.rc/src/gs-feature-tile.c.1 2022-03-04 16:23:58.566735700 +0100 ++++ gnome-software-42.rc/src/gs-feature-tile.c 2022-03-07 08:06:29.046595524 +0100 +@@ -411,7 +411,6 @@ gs_feature_tile_refresh (GsAppTile *self if (key_colors != tile->key_colors_cache) { g_autoptr(GArray) colors = NULL; GdkRGBA fg_rgba; - gboolean fg_rgba_valid; GsHSBC fg_hsbc; - - /* Look up the foreground colour for the feature tile, -@@ -283,8 +282,17 @@ gs_feature_tile_refresh (GsAppTile *self) + const GsHSBC *chosen_hsbc; + GsHSBC chosen_hsbc_modified; +@@ -429,8 +428,17 @@ gs_feature_tile_refresh (GsAppTile *self * @min_abs_contrast contrast with the foreground, so * that the text is legible. */ @@ -43,6 +36,3 @@ index 1c85083eb..158af1e56 100644 gtk_rgb_to_hsv (fg_rgba.red, fg_rgba.green, fg_rgba.blue, &fg_hsbc.hue, &fg_hsbc.saturation, &fg_hsbc.brightness); --- -GitLab - diff --git a/0002-packagekit-crash-on-app-install.patch b/0002-packagekit-crash-on-app-install.patch deleted file mode 100644 index 04e85b3..0000000 --- a/0002-packagekit-crash-on-app-install.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 73d1c9fd58d2fdf2c2d84e70cce678390679baa9 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 16 Feb 2022 15:01:46 +0100 -Subject: [PATCH] PackageKit: Fix a crash on app install - -The array should be NULL-terminated, thus add the NULL at the end. - -Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1648 ---- - plugins/packagekit/gs-plugin-packagekit.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c -index 1ad913af5..56ddb1ccc 100644 ---- a/plugins/packagekit/gs-plugin-packagekit.c -+++ b/plugins/packagekit/gs-plugin-packagekit.c -@@ -612,6 +612,8 @@ gs_plugin_app_install (GsPlugin *plugin, - return FALSE; - } - -+ g_ptr_array_add (array_package_ids, NULL); -+ - gs_app_set_state (app, GS_APP_STATE_INSTALLING); - - for (i = 0; i < gs_app_list_length (addons); i++) { --- -GitLab - diff --git a/0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch b/0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch deleted file mode 100644 index 0a24881..0000000 --- a/0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -up gnome-software-42.beta/src/gs-app-row.ui.3 gnome-software-42.beta/src/gs-app-row.ui ---- gnome-software-42.beta/src/gs-app-row.ui.3 2022-02-10 20:53:14.109477000 +0100 -+++ gnome-software-42.beta/src/gs-app-row.ui 2022-02-16 17:49:02.583817963 +0100 -@@ -26,7 +26,7 @@ - center - - -- True -+ False - 0.0 - 0.5 - end -@@ -80,7 +80,7 @@ - False - 0.0 - 0.5 -- True -+ False - word-char - end - 2 -@@ -119,7 +119,7 @@ - True - 24 - 24 -- True -+ False - word-char - end - 2 -@@ -187,7 +187,7 @@ - False - warning-text - start -- True -+ False - 0 - - diff --git a/gnome-software.spec b/gnome-software.spec index eb8cb8b..913fede 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -12,8 +12,8 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 42~beta -Release: 3%{?dist} +Version: 42~rc +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -21,8 +21,6 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch -Patch02: 0002-packagekit-crash-on-app-install.patch -Patch03: 0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -178,7 +176,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_provenance.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_repos.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_rewrite-resource.so -%{_sysconfdir}/xdg/autostart/gnome-software-service.desktop +%{_sysconfdir}/xdg/autostart/org.gnome.Software.desktop %{_datadir}/app-info/xmls/org.gnome.Software.Featured.xml %{_datadir}/app-info/xmls/org.gnome.Software.Popular.xml %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service @@ -200,6 +198,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Mon Mar 07 2022 Milan Crha - 42.rc-1 +- Update to 42.rc + * Mon Feb 21 2022 Milan Crha - 42.beta-3 - Resolves: #2056082 (Enable PackageKit autoremove option) diff --git a/sources b/sources index 2f9377d..6afee80 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-42.beta.tar.xz) = 3ae22c9a37a134a6340191aabc7b02f6b53322820853aacd36e6d43893d7118d177defff44de93b627e488411798570b9c82c99b354966a899563e27d8c32a6a +SHA512 (gnome-software-42.rc.tar.xz) = cd9c465d73b8998c0ebc49d5e40fec22522e0f125cbce5ff59a7a13d779a3793ac57dfb606d9b918e0c198b6b6cd62657483dc8e83a77ed84966c5f44980f38b From 6471906ccd9f7475f7c882f2ebd66d11fbc9cdee Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 7 Mar 2022 08:15:08 +0100 Subject: [PATCH 011/138] Update to 42.rc --- 0001-crash-with-broken-theme.patch | 24 ++++-------- 0002-packagekit-crash-on-app-install.patch | 28 ------------- ...pprow-gtk_widget_measure-error-flood.patch | 39 ------------------- gnome-software.spec | 11 +++--- sources | 2 +- 5 files changed, 14 insertions(+), 90 deletions(-) delete mode 100644 0002-packagekit-crash-on-app-install.patch delete mode 100644 0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch diff --git a/0001-crash-with-broken-theme.patch b/0001-crash-with-broken-theme.patch index fd37e80..ddbef4a 100644 --- a/0001-crash-with-broken-theme.patch +++ b/0001-crash-with-broken-theme.patch @@ -1,29 +1,22 @@ -From 3a644c151f27f439c36170f0958fd21cf1cc54d0 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Thu, 3 Jun 2021 08:33:53 +0200 Subject: [PATCH] gs-feature-tile: Do not abort when the theme is broken Just print a warning when the theme doesn't provide 'theme_fg_color' and fallback to black color. Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1228 ---- - src/gs-feature-tile.c | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) -diff --git a/src/gs-feature-tile.c b/src/gs-feature-tile.c -index 1c85083eb..158af1e56 100644 ---- a/src/gs-feature-tile.c -+++ b/src/gs-feature-tile.c -@@ -268,7 +268,6 @@ gs_feature_tile_refresh (GsAppTile *self) +diff -up gnome-software-42.rc/src/gs-feature-tile.c.1 gnome-software-42.rc/src/gs-feature-tile.c +--- gnome-software-42.rc/src/gs-feature-tile.c.1 2022-03-04 16:23:58.566735700 +0100 ++++ gnome-software-42.rc/src/gs-feature-tile.c 2022-03-07 08:06:29.046595524 +0100 +@@ -411,7 +411,6 @@ gs_feature_tile_refresh (GsAppTile *self if (key_colors != tile->key_colors_cache) { g_autoptr(GArray) colors = NULL; GdkRGBA fg_rgba; - gboolean fg_rgba_valid; GsHSBC fg_hsbc; - - /* Look up the foreground colour for the feature tile, -@@ -283,8 +282,17 @@ gs_feature_tile_refresh (GsAppTile *self) + const GsHSBC *chosen_hsbc; + GsHSBC chosen_hsbc_modified; +@@ -429,8 +428,17 @@ gs_feature_tile_refresh (GsAppTile *self * @min_abs_contrast contrast with the foreground, so * that the text is legible. */ @@ -43,6 +36,3 @@ index 1c85083eb..158af1e56 100644 gtk_rgb_to_hsv (fg_rgba.red, fg_rgba.green, fg_rgba.blue, &fg_hsbc.hue, &fg_hsbc.saturation, &fg_hsbc.brightness); --- -GitLab - diff --git a/0002-packagekit-crash-on-app-install.patch b/0002-packagekit-crash-on-app-install.patch deleted file mode 100644 index 04e85b3..0000000 --- a/0002-packagekit-crash-on-app-install.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 73d1c9fd58d2fdf2c2d84e70cce678390679baa9 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 16 Feb 2022 15:01:46 +0100 -Subject: [PATCH] PackageKit: Fix a crash on app install - -The array should be NULL-terminated, thus add the NULL at the end. - -Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1648 ---- - plugins/packagekit/gs-plugin-packagekit.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c -index 1ad913af5..56ddb1ccc 100644 ---- a/plugins/packagekit/gs-plugin-packagekit.c -+++ b/plugins/packagekit/gs-plugin-packagekit.c -@@ -612,6 +612,8 @@ gs_plugin_app_install (GsPlugin *plugin, - return FALSE; - } - -+ g_ptr_array_add (array_package_ids, NULL); -+ - gs_app_set_state (app, GS_APP_STATE_INSTALLING); - - for (i = 0; i < gs_app_list_length (addons); i++) { --- -GitLab - diff --git a/0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch b/0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch deleted file mode 100644 index 0a24881..0000000 --- a/0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -up gnome-software-42.beta/src/gs-app-row.ui.3 gnome-software-42.beta/src/gs-app-row.ui ---- gnome-software-42.beta/src/gs-app-row.ui.3 2022-02-10 20:53:14.109477000 +0100 -+++ gnome-software-42.beta/src/gs-app-row.ui 2022-02-16 17:49:02.583817963 +0100 -@@ -26,7 +26,7 @@ - center - - -- True -+ False - 0.0 - 0.5 - end -@@ -80,7 +80,7 @@ - False - 0.0 - 0.5 -- True -+ False - word-char - end - 2 -@@ -119,7 +119,7 @@ - True - 24 - 24 -- True -+ False - word-char - end - 2 -@@ -187,7 +187,7 @@ - False - warning-text - start -- True -+ False - 0 - - diff --git a/gnome-software.spec b/gnome-software.spec index 280f9df..fa6a841 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -12,8 +12,8 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 42~beta -Release: 2%{?dist} +Version: 42~rc +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -21,8 +21,6 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch -Patch02: 0002-packagekit-crash-on-app-install.patch -Patch03: 0003-workaround-gsapprow-gtk_widget_measure-error-flood.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -177,7 +175,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_provenance.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_repos.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_rewrite-resource.so -%{_sysconfdir}/xdg/autostart/gnome-software-service.desktop +%{_sysconfdir}/xdg/autostart/org.gnome.Software.desktop %{_datadir}/app-info/xmls/org.gnome.Software.Featured.xml %{_datadir}/app-info/xmls/org.gnome.Software.Popular.xml %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service @@ -199,6 +197,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Mon Mar 07 2022 Milan Crha - 42.rc-1 +- Update to 42.rc + * Wed Feb 16 2022 Milan Crha - 42.beta-2 - Resolves: #2054939 (Crash on a PackageKit app install) - Add a temporary workaround for gtk_widget_measure error flood on GsAppRow diff --git a/sources b/sources index 2f9377d..6afee80 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-42.beta.tar.xz) = 3ae22c9a37a134a6340191aabc7b02f6b53322820853aacd36e6d43893d7118d177defff44de93b627e488411798570b9c82c99b354966a899563e27d8c32a6a +SHA512 (gnome-software-42.rc.tar.xz) = cd9c465d73b8998c0ebc49d5e40fec22522e0f125cbce5ff59a7a13d779a3793ac57dfb606d9b918e0c198b6b6cd62657483dc8e83a77ed84966c5f44980f38b From 154dca4c08a12081aa5dd30c7955e2adaf1dae18 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 10 Mar 2022 17:34:44 +0100 Subject: [PATCH 012/138] Add upstream patches for gs-download-utils (i#1677 and i#1679) --- 1282.patch | 182 ++++++++++++++++++++++++++++++++++++++++++++ 1285.patch | 45 +++++++++++ gnome-software.spec | 7 +- 3 files changed, 233 insertions(+), 1 deletion(-) create mode 100644 1282.patch create mode 100644 1285.patch diff --git a/1282.patch b/1282.patch new file mode 100644 index 0000000..f6cc6fd --- /dev/null +++ b/1282.patch @@ -0,0 +1,182 @@ +From edbeab87ce5aa48bd9fe49dd22acfcce2b8b0fc0 Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Thu, 10 Mar 2022 13:20:58 +0000 +Subject: [PATCH 1/3] =?UTF-8?q?gs-download-utils:=20Don=E2=80=99t=20use=20?= + =?UTF-8?q?ETag=20when=20writing=20local=20file?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The ETag we care about for the download is the ETag returned by the +server, not the ETag of the local file. Passing the server’s ETag to the +local file operations may result in the local file not being written to, +with a “The file was externally modified” error. + +Signed-off-by: Philip Withnall + +Fixes: #1677 +--- + lib/gs-download-utils.c | 20 +++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) + +diff --git a/lib/gs-download-utils.c b/lib/gs-download-utils.c +index f3a64479b..a6d930587 100644 +--- a/lib/gs-download-utils.c ++++ b/lib/gs-download-utils.c +@@ -134,6 +134,9 @@ static void download_progress (GTask *task); + * existing content of the output stream (if it’s a file, for example) will not + * be overwritten. + * ++ * Note that @last_etag must be the ETag value returned by the server last time ++ * the file was downloaded, not the local file ETag generated by GLib. ++ * + * If specified, @progress_callback will be called zero or more times until + * @callback is called, providing progress updates on the download. + * +@@ -644,9 +647,20 @@ gs_download_file_async (SoupSession *soup_session, + /* Query the old ETag if the file already exists. */ + data->last_etag = gs_utils_get_file_etag (output_file, cancellable); + +- /* Create the output file. */ ++ /* Create the output file. ++ * ++ * Note that `data->last_etag` is *not* passed in here, as the ETag from ++ * the server and the file modification ETag that GLib uses are ++ * different things. For g_file_replace_async(), GLib always uses an ++ * ETag it generates internally based on the file mtime (see ++ * _g_local_file_info_create_etag()), which will never match what the ++ * server returns in its ETag header. ++ * ++ * This is fine, as we are using the ETag to avoid an unnecessary HTTP ++ * download if possible. We don’t care about tracking changes to the ++ * file on disk. */ + g_file_replace_async (output_file, +- data->last_etag, ++ NULL, /* ETag */ + FALSE, /* make_backup */ + G_FILE_CREATE_PRIVATE | G_FILE_CREATE_REPLACE_DESTINATION, + io_priority, +@@ -699,7 +713,7 @@ download_file_cb (GObject *source_object, + return; + } + +- /* Update the ETag. */ ++ /* Update the stored HTTP ETag. */ + gs_utils_set_file_etag (data->output_file, new_etag, cancellable); + + g_task_return_boolean (task, TRUE); +-- +GitLab + + +From 040e2dca3904d965450158dcdaeedfca12965682 Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Thu, 10 Mar 2022 13:27:21 +0000 +Subject: [PATCH 2/3] gs-utils: Add some debug messages for getting/setting + ETags + +Signed-off-by: Philip Withnall + +Helps: #1677 +--- + lib/gs-utils.c | 28 +++++++++++++++++++++++----- + 1 file changed, 23 insertions(+), 5 deletions(-) + +diff --git a/lib/gs-utils.c b/lib/gs-utils.c +index 89349b1fe..6dc4d28a0 100644 +--- a/lib/gs-utils.c ++++ b/lib/gs-utils.c +@@ -1509,14 +1509,18 @@ gs_utils_get_file_etag (GFile *file, + GCancellable *cancellable) + { + g_autoptr(GFileInfo) info = NULL; ++ g_autoptr(GError) local_error = NULL; + + g_return_val_if_fail (G_IS_FILE (file), NULL); + g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL); + +- info = g_file_query_info (file, METADATA_ETAG_ATTRIBUTE, G_FILE_QUERY_INFO_NONE, cancellable, NULL); ++ info = g_file_query_info (file, METADATA_ETAG_ATTRIBUTE, G_FILE_QUERY_INFO_NONE, cancellable, &local_error); + +- if (info == NULL) ++ if (info == NULL) { ++ g_debug ("Error getting attribute ‘%s’ for file ‘%s’: %s", ++ METADATA_ETAG_ATTRIBUTE, g_file_peek_path (file), local_error->message); + return NULL; ++ } + + return g_strdup (g_file_info_get_attribute_string (info, METADATA_ETAG_ATTRIBUTE)); + } +@@ -1542,15 +1546,29 @@ gs_utils_set_file_etag (GFile *file, + const gchar *etag, + GCancellable *cancellable) + { ++ g_autoptr(GError) local_error = NULL; ++ + g_return_val_if_fail (G_IS_FILE (file), FALSE); + g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE); + + if (etag == NULL || *etag == '\0') { +- return g_file_set_attribute (file, METADATA_ETAG_ATTRIBUTE, G_FILE_ATTRIBUTE_TYPE_INVALID, +- NULL, G_FILE_QUERY_INFO_NONE, cancellable, NULL); ++ if (!g_file_set_attribute (file, METADATA_ETAG_ATTRIBUTE, G_FILE_ATTRIBUTE_TYPE_INVALID, ++ NULL, G_FILE_QUERY_INFO_NONE, cancellable, &local_error)) { ++ g_debug ("Error clearing attribute ‘%s’ on file ‘%s’: %s", ++ METADATA_ETAG_ATTRIBUTE, g_file_peek_path (file), local_error->message); ++ return FALSE; ++ } ++ ++ return TRUE; ++ } ++ ++ if (!g_file_set_attribute_string (file, METADATA_ETAG_ATTRIBUTE, etag, G_FILE_QUERY_INFO_NONE, cancellable, &local_error)) { ++ g_debug ("Error setting attribute ‘%s’ to ‘%s’ on file ‘%s’: %s", ++ METADATA_ETAG_ATTRIBUTE, etag, g_file_peek_path (file), local_error->message); ++ return FALSE; + } + +- return g_file_set_attribute_string (file, METADATA_ETAG_ATTRIBUTE, etag, G_FILE_QUERY_INFO_NONE, cancellable, NULL); ++ return TRUE; + } + + /** +-- +GitLab + + +From c46d656c51938adb994b4597c766259bf1813fe5 Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Thu, 10 Mar 2022 13:27:50 +0000 +Subject: [PATCH 3/3] gs-utils: Change ETag attribute namespace from metadata + to xattr +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The xattr namespace is likely to be supported on all modern Linux +distributions for local files, and doesn’t require IPC with +`gvfsd-metadata`. + +Signed-off-by: Philip Withnall + +Helps: #1677 +--- + lib/gs-utils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/gs-utils.c b/lib/gs-utils.c +index 6dc4d28a0..b8eefe36e 100644 +--- a/lib/gs-utils.c ++++ b/lib/gs-utils.c +@@ -1488,7 +1488,7 @@ gs_utils_get_file_size (const gchar *filename, + return size; + } + +-#define METADATA_ETAG_ATTRIBUTE "metadata::etag" ++#define METADATA_ETAG_ATTRIBUTE "xattr::gnome-software::etag" + + /** + * gs_utils_get_file_etag: +-- +GitLab + diff --git a/1285.patch b/1285.patch new file mode 100644 index 0000000..1caae0c --- /dev/null +++ b/1285.patch @@ -0,0 +1,45 @@ +From 92da7c98217856785dfea518890fa25acd3a055e Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Thu, 10 Mar 2022 14:25:05 +0000 +Subject: [PATCH] =?UTF-8?q?gs-download-utils:=20Ignore=20cancellation=20er?= + =?UTF-8?q?rors=20when=20there=E2=80=99s=20a=20cache=20hit?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In order to avoid overwriting an existing cache file when the server has +said it’s up to date, we cancel closing the output stream. + +Avoid propagating that cancellation error up to the caller; to them, the +operation should seem like a success rather than returning +`G_IO_ERROR_CANCELLED`. + +Signed-off-by: Philip Withnall + +Fixes: #1679 +--- + lib/gs-download-utils.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/lib/gs-download-utils.c b/lib/gs-download-utils.c +index f3a64479b..4ab15c098 100644 +--- a/lib/gs-download-utils.c ++++ b/lib/gs-download-utils.c +@@ -467,7 +467,13 @@ close_stream_cb (GObject *source_object, + * overwrite errors set earlier in the operation. */ + if (!g_output_stream_close_finish (G_OUTPUT_STREAM (source_object), + result, &local_error)) { +- if (data->error == NULL) ++ /* If we are aborting writing the output stream (perhaps ++ * because of a cache hit), don’t report the error at ++ * all. */ ++ if (data->discard_output_stream && ++ g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) ++ g_clear_error (&local_error); ++ else if (data->error == NULL) + data->error = g_steal_pointer (&local_error); + else if (!g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_debug ("Error closing output stream: %s", local_error->message); +-- +GitLab + diff --git a/gnome-software.spec b/gnome-software.spec index 913fede..41d6c9d 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -13,7 +13,7 @@ Name: gnome-software Version: 42~rc -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -21,6 +21,8 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch +Patch02: 1282.patch +Patch03: 1285.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -198,6 +200,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Thu Mar 10 2022 Milan Crha - 42.rc-2 +- Add upstream patches for gs-download-utils (i#1677 and i#1679) + * Mon Mar 07 2022 Milan Crha - 42.rc-1 - Update to 42.rc From b9100dc16794ddaf6b3131758a20312bcd5379c3 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 10 Mar 2022 17:34:44 +0100 Subject: [PATCH 013/138] Add upstream patches for gs-download-utils (i#1677 and i#1679) --- 1282.patch | 182 ++++++++++++++++++++++++++++++++++++++++++++ 1285.patch | 45 +++++++++++ gnome-software.spec | 7 +- 3 files changed, 233 insertions(+), 1 deletion(-) create mode 100644 1282.patch create mode 100644 1285.patch diff --git a/1282.patch b/1282.patch new file mode 100644 index 0000000..f6cc6fd --- /dev/null +++ b/1282.patch @@ -0,0 +1,182 @@ +From edbeab87ce5aa48bd9fe49dd22acfcce2b8b0fc0 Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Thu, 10 Mar 2022 13:20:58 +0000 +Subject: [PATCH 1/3] =?UTF-8?q?gs-download-utils:=20Don=E2=80=99t=20use=20?= + =?UTF-8?q?ETag=20when=20writing=20local=20file?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The ETag we care about for the download is the ETag returned by the +server, not the ETag of the local file. Passing the server’s ETag to the +local file operations may result in the local file not being written to, +with a “The file was externally modified” error. + +Signed-off-by: Philip Withnall + +Fixes: #1677 +--- + lib/gs-download-utils.c | 20 +++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) + +diff --git a/lib/gs-download-utils.c b/lib/gs-download-utils.c +index f3a64479b..a6d930587 100644 +--- a/lib/gs-download-utils.c ++++ b/lib/gs-download-utils.c +@@ -134,6 +134,9 @@ static void download_progress (GTask *task); + * existing content of the output stream (if it’s a file, for example) will not + * be overwritten. + * ++ * Note that @last_etag must be the ETag value returned by the server last time ++ * the file was downloaded, not the local file ETag generated by GLib. ++ * + * If specified, @progress_callback will be called zero or more times until + * @callback is called, providing progress updates on the download. + * +@@ -644,9 +647,20 @@ gs_download_file_async (SoupSession *soup_session, + /* Query the old ETag if the file already exists. */ + data->last_etag = gs_utils_get_file_etag (output_file, cancellable); + +- /* Create the output file. */ ++ /* Create the output file. ++ * ++ * Note that `data->last_etag` is *not* passed in here, as the ETag from ++ * the server and the file modification ETag that GLib uses are ++ * different things. For g_file_replace_async(), GLib always uses an ++ * ETag it generates internally based on the file mtime (see ++ * _g_local_file_info_create_etag()), which will never match what the ++ * server returns in its ETag header. ++ * ++ * This is fine, as we are using the ETag to avoid an unnecessary HTTP ++ * download if possible. We don’t care about tracking changes to the ++ * file on disk. */ + g_file_replace_async (output_file, +- data->last_etag, ++ NULL, /* ETag */ + FALSE, /* make_backup */ + G_FILE_CREATE_PRIVATE | G_FILE_CREATE_REPLACE_DESTINATION, + io_priority, +@@ -699,7 +713,7 @@ download_file_cb (GObject *source_object, + return; + } + +- /* Update the ETag. */ ++ /* Update the stored HTTP ETag. */ + gs_utils_set_file_etag (data->output_file, new_etag, cancellable); + + g_task_return_boolean (task, TRUE); +-- +GitLab + + +From 040e2dca3904d965450158dcdaeedfca12965682 Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Thu, 10 Mar 2022 13:27:21 +0000 +Subject: [PATCH 2/3] gs-utils: Add some debug messages for getting/setting + ETags + +Signed-off-by: Philip Withnall + +Helps: #1677 +--- + lib/gs-utils.c | 28 +++++++++++++++++++++++----- + 1 file changed, 23 insertions(+), 5 deletions(-) + +diff --git a/lib/gs-utils.c b/lib/gs-utils.c +index 89349b1fe..6dc4d28a0 100644 +--- a/lib/gs-utils.c ++++ b/lib/gs-utils.c +@@ -1509,14 +1509,18 @@ gs_utils_get_file_etag (GFile *file, + GCancellable *cancellable) + { + g_autoptr(GFileInfo) info = NULL; ++ g_autoptr(GError) local_error = NULL; + + g_return_val_if_fail (G_IS_FILE (file), NULL); + g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL); + +- info = g_file_query_info (file, METADATA_ETAG_ATTRIBUTE, G_FILE_QUERY_INFO_NONE, cancellable, NULL); ++ info = g_file_query_info (file, METADATA_ETAG_ATTRIBUTE, G_FILE_QUERY_INFO_NONE, cancellable, &local_error); + +- if (info == NULL) ++ if (info == NULL) { ++ g_debug ("Error getting attribute ‘%s’ for file ‘%s’: %s", ++ METADATA_ETAG_ATTRIBUTE, g_file_peek_path (file), local_error->message); + return NULL; ++ } + + return g_strdup (g_file_info_get_attribute_string (info, METADATA_ETAG_ATTRIBUTE)); + } +@@ -1542,15 +1546,29 @@ gs_utils_set_file_etag (GFile *file, + const gchar *etag, + GCancellable *cancellable) + { ++ g_autoptr(GError) local_error = NULL; ++ + g_return_val_if_fail (G_IS_FILE (file), FALSE); + g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE); + + if (etag == NULL || *etag == '\0') { +- return g_file_set_attribute (file, METADATA_ETAG_ATTRIBUTE, G_FILE_ATTRIBUTE_TYPE_INVALID, +- NULL, G_FILE_QUERY_INFO_NONE, cancellable, NULL); ++ if (!g_file_set_attribute (file, METADATA_ETAG_ATTRIBUTE, G_FILE_ATTRIBUTE_TYPE_INVALID, ++ NULL, G_FILE_QUERY_INFO_NONE, cancellable, &local_error)) { ++ g_debug ("Error clearing attribute ‘%s’ on file ‘%s’: %s", ++ METADATA_ETAG_ATTRIBUTE, g_file_peek_path (file), local_error->message); ++ return FALSE; ++ } ++ ++ return TRUE; ++ } ++ ++ if (!g_file_set_attribute_string (file, METADATA_ETAG_ATTRIBUTE, etag, G_FILE_QUERY_INFO_NONE, cancellable, &local_error)) { ++ g_debug ("Error setting attribute ‘%s’ to ‘%s’ on file ‘%s’: %s", ++ METADATA_ETAG_ATTRIBUTE, etag, g_file_peek_path (file), local_error->message); ++ return FALSE; + } + +- return g_file_set_attribute_string (file, METADATA_ETAG_ATTRIBUTE, etag, G_FILE_QUERY_INFO_NONE, cancellable, NULL); ++ return TRUE; + } + + /** +-- +GitLab + + +From c46d656c51938adb994b4597c766259bf1813fe5 Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Thu, 10 Mar 2022 13:27:50 +0000 +Subject: [PATCH 3/3] gs-utils: Change ETag attribute namespace from metadata + to xattr +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The xattr namespace is likely to be supported on all modern Linux +distributions for local files, and doesn’t require IPC with +`gvfsd-metadata`. + +Signed-off-by: Philip Withnall + +Helps: #1677 +--- + lib/gs-utils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/gs-utils.c b/lib/gs-utils.c +index 6dc4d28a0..b8eefe36e 100644 +--- a/lib/gs-utils.c ++++ b/lib/gs-utils.c +@@ -1488,7 +1488,7 @@ gs_utils_get_file_size (const gchar *filename, + return size; + } + +-#define METADATA_ETAG_ATTRIBUTE "metadata::etag" ++#define METADATA_ETAG_ATTRIBUTE "xattr::gnome-software::etag" + + /** + * gs_utils_get_file_etag: +-- +GitLab + diff --git a/1285.patch b/1285.patch new file mode 100644 index 0000000..1caae0c --- /dev/null +++ b/1285.patch @@ -0,0 +1,45 @@ +From 92da7c98217856785dfea518890fa25acd3a055e Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Thu, 10 Mar 2022 14:25:05 +0000 +Subject: [PATCH] =?UTF-8?q?gs-download-utils:=20Ignore=20cancellation=20er?= + =?UTF-8?q?rors=20when=20there=E2=80=99s=20a=20cache=20hit?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In order to avoid overwriting an existing cache file when the server has +said it’s up to date, we cancel closing the output stream. + +Avoid propagating that cancellation error up to the caller; to them, the +operation should seem like a success rather than returning +`G_IO_ERROR_CANCELLED`. + +Signed-off-by: Philip Withnall + +Fixes: #1679 +--- + lib/gs-download-utils.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/lib/gs-download-utils.c b/lib/gs-download-utils.c +index f3a64479b..4ab15c098 100644 +--- a/lib/gs-download-utils.c ++++ b/lib/gs-download-utils.c +@@ -467,7 +467,13 @@ close_stream_cb (GObject *source_object, + * overwrite errors set earlier in the operation. */ + if (!g_output_stream_close_finish (G_OUTPUT_STREAM (source_object), + result, &local_error)) { +- if (data->error == NULL) ++ /* If we are aborting writing the output stream (perhaps ++ * because of a cache hit), don’t report the error at ++ * all. */ ++ if (data->discard_output_stream && ++ g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) ++ g_clear_error (&local_error); ++ else if (data->error == NULL) + data->error = g_steal_pointer (&local_error); + else if (!g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_debug ("Error closing output stream: %s", local_error->message); +-- +GitLab + diff --git a/gnome-software.spec b/gnome-software.spec index fa6a841..d3ac2cb 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -13,7 +13,7 @@ Name: gnome-software Version: 42~rc -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -21,6 +21,8 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch +Patch02: 1282.patch +Patch03: 1285.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -197,6 +199,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Thu Mar 10 2022 Milan Crha - 42.rc-2 +- Add upstream patches for gs-download-utils (i#1677 and i#1679) + * Mon Mar 07 2022 Milan Crha - 42.rc-1 - Update to 42.rc From 0db1b574e2399a7f816e40c1a7d4de06d56e1613 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 18 Mar 2022 10:13:22 +0100 Subject: [PATCH 014/138] Update to 42.0 --- 1282.patch | 182 -------------------------------------------- 1285.patch | 45 ----------- gnome-software.spec | 9 ++- sources | 2 +- 4 files changed, 6 insertions(+), 232 deletions(-) delete mode 100644 1282.patch delete mode 100644 1285.patch diff --git a/1282.patch b/1282.patch deleted file mode 100644 index f6cc6fd..0000000 --- a/1282.patch +++ /dev/null @@ -1,182 +0,0 @@ -From edbeab87ce5aa48bd9fe49dd22acfcce2b8b0fc0 Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Thu, 10 Mar 2022 13:20:58 +0000 -Subject: [PATCH 1/3] =?UTF-8?q?gs-download-utils:=20Don=E2=80=99t=20use=20?= - =?UTF-8?q?ETag=20when=20writing=20local=20file?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The ETag we care about for the download is the ETag returned by the -server, not the ETag of the local file. Passing the server’s ETag to the -local file operations may result in the local file not being written to, -with a “The file was externally modified” error. - -Signed-off-by: Philip Withnall - -Fixes: #1677 ---- - lib/gs-download-utils.c | 20 +++++++++++++++++--- - 1 file changed, 17 insertions(+), 3 deletions(-) - -diff --git a/lib/gs-download-utils.c b/lib/gs-download-utils.c -index f3a64479b..a6d930587 100644 ---- a/lib/gs-download-utils.c -+++ b/lib/gs-download-utils.c -@@ -134,6 +134,9 @@ static void download_progress (GTask *task); - * existing content of the output stream (if it’s a file, for example) will not - * be overwritten. - * -+ * Note that @last_etag must be the ETag value returned by the server last time -+ * the file was downloaded, not the local file ETag generated by GLib. -+ * - * If specified, @progress_callback will be called zero or more times until - * @callback is called, providing progress updates on the download. - * -@@ -644,9 +647,20 @@ gs_download_file_async (SoupSession *soup_session, - /* Query the old ETag if the file already exists. */ - data->last_etag = gs_utils_get_file_etag (output_file, cancellable); - -- /* Create the output file. */ -+ /* Create the output file. -+ * -+ * Note that `data->last_etag` is *not* passed in here, as the ETag from -+ * the server and the file modification ETag that GLib uses are -+ * different things. For g_file_replace_async(), GLib always uses an -+ * ETag it generates internally based on the file mtime (see -+ * _g_local_file_info_create_etag()), which will never match what the -+ * server returns in its ETag header. -+ * -+ * This is fine, as we are using the ETag to avoid an unnecessary HTTP -+ * download if possible. We don’t care about tracking changes to the -+ * file on disk. */ - g_file_replace_async (output_file, -- data->last_etag, -+ NULL, /* ETag */ - FALSE, /* make_backup */ - G_FILE_CREATE_PRIVATE | G_FILE_CREATE_REPLACE_DESTINATION, - io_priority, -@@ -699,7 +713,7 @@ download_file_cb (GObject *source_object, - return; - } - -- /* Update the ETag. */ -+ /* Update the stored HTTP ETag. */ - gs_utils_set_file_etag (data->output_file, new_etag, cancellable); - - g_task_return_boolean (task, TRUE); --- -GitLab - - -From 040e2dca3904d965450158dcdaeedfca12965682 Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Thu, 10 Mar 2022 13:27:21 +0000 -Subject: [PATCH 2/3] gs-utils: Add some debug messages for getting/setting - ETags - -Signed-off-by: Philip Withnall - -Helps: #1677 ---- - lib/gs-utils.c | 28 +++++++++++++++++++++++----- - 1 file changed, 23 insertions(+), 5 deletions(-) - -diff --git a/lib/gs-utils.c b/lib/gs-utils.c -index 89349b1fe..6dc4d28a0 100644 ---- a/lib/gs-utils.c -+++ b/lib/gs-utils.c -@@ -1509,14 +1509,18 @@ gs_utils_get_file_etag (GFile *file, - GCancellable *cancellable) - { - g_autoptr(GFileInfo) info = NULL; -+ g_autoptr(GError) local_error = NULL; - - g_return_val_if_fail (G_IS_FILE (file), NULL); - g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL); - -- info = g_file_query_info (file, METADATA_ETAG_ATTRIBUTE, G_FILE_QUERY_INFO_NONE, cancellable, NULL); -+ info = g_file_query_info (file, METADATA_ETAG_ATTRIBUTE, G_FILE_QUERY_INFO_NONE, cancellable, &local_error); - -- if (info == NULL) -+ if (info == NULL) { -+ g_debug ("Error getting attribute ‘%s’ for file ‘%s’: %s", -+ METADATA_ETAG_ATTRIBUTE, g_file_peek_path (file), local_error->message); - return NULL; -+ } - - return g_strdup (g_file_info_get_attribute_string (info, METADATA_ETAG_ATTRIBUTE)); - } -@@ -1542,15 +1546,29 @@ gs_utils_set_file_etag (GFile *file, - const gchar *etag, - GCancellable *cancellable) - { -+ g_autoptr(GError) local_error = NULL; -+ - g_return_val_if_fail (G_IS_FILE (file), FALSE); - g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE); - - if (etag == NULL || *etag == '\0') { -- return g_file_set_attribute (file, METADATA_ETAG_ATTRIBUTE, G_FILE_ATTRIBUTE_TYPE_INVALID, -- NULL, G_FILE_QUERY_INFO_NONE, cancellable, NULL); -+ if (!g_file_set_attribute (file, METADATA_ETAG_ATTRIBUTE, G_FILE_ATTRIBUTE_TYPE_INVALID, -+ NULL, G_FILE_QUERY_INFO_NONE, cancellable, &local_error)) { -+ g_debug ("Error clearing attribute ‘%s’ on file ‘%s’: %s", -+ METADATA_ETAG_ATTRIBUTE, g_file_peek_path (file), local_error->message); -+ return FALSE; -+ } -+ -+ return TRUE; -+ } -+ -+ if (!g_file_set_attribute_string (file, METADATA_ETAG_ATTRIBUTE, etag, G_FILE_QUERY_INFO_NONE, cancellable, &local_error)) { -+ g_debug ("Error setting attribute ‘%s’ to ‘%s’ on file ‘%s’: %s", -+ METADATA_ETAG_ATTRIBUTE, etag, g_file_peek_path (file), local_error->message); -+ return FALSE; - } - -- return g_file_set_attribute_string (file, METADATA_ETAG_ATTRIBUTE, etag, G_FILE_QUERY_INFO_NONE, cancellable, NULL); -+ return TRUE; - } - - /** --- -GitLab - - -From c46d656c51938adb994b4597c766259bf1813fe5 Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Thu, 10 Mar 2022 13:27:50 +0000 -Subject: [PATCH 3/3] gs-utils: Change ETag attribute namespace from metadata - to xattr -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The xattr namespace is likely to be supported on all modern Linux -distributions for local files, and doesn’t require IPC with -`gvfsd-metadata`. - -Signed-off-by: Philip Withnall - -Helps: #1677 ---- - lib/gs-utils.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/gs-utils.c b/lib/gs-utils.c -index 6dc4d28a0..b8eefe36e 100644 ---- a/lib/gs-utils.c -+++ b/lib/gs-utils.c -@@ -1488,7 +1488,7 @@ gs_utils_get_file_size (const gchar *filename, - return size; - } - --#define METADATA_ETAG_ATTRIBUTE "metadata::etag" -+#define METADATA_ETAG_ATTRIBUTE "xattr::gnome-software::etag" - - /** - * gs_utils_get_file_etag: --- -GitLab - diff --git a/1285.patch b/1285.patch deleted file mode 100644 index 1caae0c..0000000 --- a/1285.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 92da7c98217856785dfea518890fa25acd3a055e Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Thu, 10 Mar 2022 14:25:05 +0000 -Subject: [PATCH] =?UTF-8?q?gs-download-utils:=20Ignore=20cancellation=20er?= - =?UTF-8?q?rors=20when=20there=E2=80=99s=20a=20cache=20hit?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -In order to avoid overwriting an existing cache file when the server has -said it’s up to date, we cancel closing the output stream. - -Avoid propagating that cancellation error up to the caller; to them, the -operation should seem like a success rather than returning -`G_IO_ERROR_CANCELLED`. - -Signed-off-by: Philip Withnall - -Fixes: #1679 ---- - lib/gs-download-utils.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/lib/gs-download-utils.c b/lib/gs-download-utils.c -index f3a64479b..4ab15c098 100644 ---- a/lib/gs-download-utils.c -+++ b/lib/gs-download-utils.c -@@ -467,7 +467,13 @@ close_stream_cb (GObject *source_object, - * overwrite errors set earlier in the operation. */ - if (!g_output_stream_close_finish (G_OUTPUT_STREAM (source_object), - result, &local_error)) { -- if (data->error == NULL) -+ /* If we are aborting writing the output stream (perhaps -+ * because of a cache hit), don’t report the error at -+ * all. */ -+ if (data->discard_output_stream && -+ g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) -+ g_clear_error (&local_error); -+ else if (data->error == NULL) - data->error = g_steal_pointer (&local_error); - else if (!g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) - g_debug ("Error closing output stream: %s", local_error->message); --- -GitLab - diff --git a/gnome-software.spec b/gnome-software.spec index 41d6c9d..bc27980 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -12,8 +12,8 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 42~rc -Release: 2%{?dist} +Version: 42.0 +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -21,8 +21,6 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch -Patch02: 1282.patch -Patch03: 1285.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -200,6 +198,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Fri Mar 18 2022 Milan Crha - 42.0-1 +- Update to 42.0 + * Thu Mar 10 2022 Milan Crha - 42.rc-2 - Add upstream patches for gs-download-utils (i#1677 and i#1679) diff --git a/sources b/sources index 6afee80..2a6fbea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-42.rc.tar.xz) = cd9c465d73b8998c0ebc49d5e40fec22522e0f125cbce5ff59a7a13d779a3793ac57dfb606d9b918e0c198b6b6cd62657483dc8e83a77ed84966c5f44980f38b +SHA512 (gnome-software-42.0.tar.xz) = f630232d164d1a7adcf9a91133769c6fe4ce62cdaeccd49b991330682eeccfddc8f83c7326802aaabdb4fc537243c0fd19741c702f4d23d75ebd71e9abb3da92 From 7db8bcfe383189a9c1c5443c0fb5b3f9c0253deb Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 18 Mar 2022 10:13:22 +0100 Subject: [PATCH 015/138] Update to 42.0 --- 1282.patch | 182 -------------------------------------------- 1285.patch | 45 ----------- gnome-software.spec | 9 ++- sources | 2 +- 4 files changed, 6 insertions(+), 232 deletions(-) delete mode 100644 1282.patch delete mode 100644 1285.patch diff --git a/1282.patch b/1282.patch deleted file mode 100644 index f6cc6fd..0000000 --- a/1282.patch +++ /dev/null @@ -1,182 +0,0 @@ -From edbeab87ce5aa48bd9fe49dd22acfcce2b8b0fc0 Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Thu, 10 Mar 2022 13:20:58 +0000 -Subject: [PATCH 1/3] =?UTF-8?q?gs-download-utils:=20Don=E2=80=99t=20use=20?= - =?UTF-8?q?ETag=20when=20writing=20local=20file?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The ETag we care about for the download is the ETag returned by the -server, not the ETag of the local file. Passing the server’s ETag to the -local file operations may result in the local file not being written to, -with a “The file was externally modified” error. - -Signed-off-by: Philip Withnall - -Fixes: #1677 ---- - lib/gs-download-utils.c | 20 +++++++++++++++++--- - 1 file changed, 17 insertions(+), 3 deletions(-) - -diff --git a/lib/gs-download-utils.c b/lib/gs-download-utils.c -index f3a64479b..a6d930587 100644 ---- a/lib/gs-download-utils.c -+++ b/lib/gs-download-utils.c -@@ -134,6 +134,9 @@ static void download_progress (GTask *task); - * existing content of the output stream (if it’s a file, for example) will not - * be overwritten. - * -+ * Note that @last_etag must be the ETag value returned by the server last time -+ * the file was downloaded, not the local file ETag generated by GLib. -+ * - * If specified, @progress_callback will be called zero or more times until - * @callback is called, providing progress updates on the download. - * -@@ -644,9 +647,20 @@ gs_download_file_async (SoupSession *soup_session, - /* Query the old ETag if the file already exists. */ - data->last_etag = gs_utils_get_file_etag (output_file, cancellable); - -- /* Create the output file. */ -+ /* Create the output file. -+ * -+ * Note that `data->last_etag` is *not* passed in here, as the ETag from -+ * the server and the file modification ETag that GLib uses are -+ * different things. For g_file_replace_async(), GLib always uses an -+ * ETag it generates internally based on the file mtime (see -+ * _g_local_file_info_create_etag()), which will never match what the -+ * server returns in its ETag header. -+ * -+ * This is fine, as we are using the ETag to avoid an unnecessary HTTP -+ * download if possible. We don’t care about tracking changes to the -+ * file on disk. */ - g_file_replace_async (output_file, -- data->last_etag, -+ NULL, /* ETag */ - FALSE, /* make_backup */ - G_FILE_CREATE_PRIVATE | G_FILE_CREATE_REPLACE_DESTINATION, - io_priority, -@@ -699,7 +713,7 @@ download_file_cb (GObject *source_object, - return; - } - -- /* Update the ETag. */ -+ /* Update the stored HTTP ETag. */ - gs_utils_set_file_etag (data->output_file, new_etag, cancellable); - - g_task_return_boolean (task, TRUE); --- -GitLab - - -From 040e2dca3904d965450158dcdaeedfca12965682 Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Thu, 10 Mar 2022 13:27:21 +0000 -Subject: [PATCH 2/3] gs-utils: Add some debug messages for getting/setting - ETags - -Signed-off-by: Philip Withnall - -Helps: #1677 ---- - lib/gs-utils.c | 28 +++++++++++++++++++++++----- - 1 file changed, 23 insertions(+), 5 deletions(-) - -diff --git a/lib/gs-utils.c b/lib/gs-utils.c -index 89349b1fe..6dc4d28a0 100644 ---- a/lib/gs-utils.c -+++ b/lib/gs-utils.c -@@ -1509,14 +1509,18 @@ gs_utils_get_file_etag (GFile *file, - GCancellable *cancellable) - { - g_autoptr(GFileInfo) info = NULL; -+ g_autoptr(GError) local_error = NULL; - - g_return_val_if_fail (G_IS_FILE (file), NULL); - g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL); - -- info = g_file_query_info (file, METADATA_ETAG_ATTRIBUTE, G_FILE_QUERY_INFO_NONE, cancellable, NULL); -+ info = g_file_query_info (file, METADATA_ETAG_ATTRIBUTE, G_FILE_QUERY_INFO_NONE, cancellable, &local_error); - -- if (info == NULL) -+ if (info == NULL) { -+ g_debug ("Error getting attribute ‘%s’ for file ‘%s’: %s", -+ METADATA_ETAG_ATTRIBUTE, g_file_peek_path (file), local_error->message); - return NULL; -+ } - - return g_strdup (g_file_info_get_attribute_string (info, METADATA_ETAG_ATTRIBUTE)); - } -@@ -1542,15 +1546,29 @@ gs_utils_set_file_etag (GFile *file, - const gchar *etag, - GCancellable *cancellable) - { -+ g_autoptr(GError) local_error = NULL; -+ - g_return_val_if_fail (G_IS_FILE (file), FALSE); - g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE); - - if (etag == NULL || *etag == '\0') { -- return g_file_set_attribute (file, METADATA_ETAG_ATTRIBUTE, G_FILE_ATTRIBUTE_TYPE_INVALID, -- NULL, G_FILE_QUERY_INFO_NONE, cancellable, NULL); -+ if (!g_file_set_attribute (file, METADATA_ETAG_ATTRIBUTE, G_FILE_ATTRIBUTE_TYPE_INVALID, -+ NULL, G_FILE_QUERY_INFO_NONE, cancellable, &local_error)) { -+ g_debug ("Error clearing attribute ‘%s’ on file ‘%s’: %s", -+ METADATA_ETAG_ATTRIBUTE, g_file_peek_path (file), local_error->message); -+ return FALSE; -+ } -+ -+ return TRUE; -+ } -+ -+ if (!g_file_set_attribute_string (file, METADATA_ETAG_ATTRIBUTE, etag, G_FILE_QUERY_INFO_NONE, cancellable, &local_error)) { -+ g_debug ("Error setting attribute ‘%s’ to ‘%s’ on file ‘%s’: %s", -+ METADATA_ETAG_ATTRIBUTE, etag, g_file_peek_path (file), local_error->message); -+ return FALSE; - } - -- return g_file_set_attribute_string (file, METADATA_ETAG_ATTRIBUTE, etag, G_FILE_QUERY_INFO_NONE, cancellable, NULL); -+ return TRUE; - } - - /** --- -GitLab - - -From c46d656c51938adb994b4597c766259bf1813fe5 Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Thu, 10 Mar 2022 13:27:50 +0000 -Subject: [PATCH 3/3] gs-utils: Change ETag attribute namespace from metadata - to xattr -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The xattr namespace is likely to be supported on all modern Linux -distributions for local files, and doesn’t require IPC with -`gvfsd-metadata`. - -Signed-off-by: Philip Withnall - -Helps: #1677 ---- - lib/gs-utils.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/gs-utils.c b/lib/gs-utils.c -index 6dc4d28a0..b8eefe36e 100644 ---- a/lib/gs-utils.c -+++ b/lib/gs-utils.c -@@ -1488,7 +1488,7 @@ gs_utils_get_file_size (const gchar *filename, - return size; - } - --#define METADATA_ETAG_ATTRIBUTE "metadata::etag" -+#define METADATA_ETAG_ATTRIBUTE "xattr::gnome-software::etag" - - /** - * gs_utils_get_file_etag: --- -GitLab - diff --git a/1285.patch b/1285.patch deleted file mode 100644 index 1caae0c..0000000 --- a/1285.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 92da7c98217856785dfea518890fa25acd3a055e Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Thu, 10 Mar 2022 14:25:05 +0000 -Subject: [PATCH] =?UTF-8?q?gs-download-utils:=20Ignore=20cancellation=20er?= - =?UTF-8?q?rors=20when=20there=E2=80=99s=20a=20cache=20hit?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -In order to avoid overwriting an existing cache file when the server has -said it’s up to date, we cancel closing the output stream. - -Avoid propagating that cancellation error up to the caller; to them, the -operation should seem like a success rather than returning -`G_IO_ERROR_CANCELLED`. - -Signed-off-by: Philip Withnall - -Fixes: #1679 ---- - lib/gs-download-utils.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/lib/gs-download-utils.c b/lib/gs-download-utils.c -index f3a64479b..4ab15c098 100644 ---- a/lib/gs-download-utils.c -+++ b/lib/gs-download-utils.c -@@ -467,7 +467,13 @@ close_stream_cb (GObject *source_object, - * overwrite errors set earlier in the operation. */ - if (!g_output_stream_close_finish (G_OUTPUT_STREAM (source_object), - result, &local_error)) { -- if (data->error == NULL) -+ /* If we are aborting writing the output stream (perhaps -+ * because of a cache hit), don’t report the error at -+ * all. */ -+ if (data->discard_output_stream && -+ g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) -+ g_clear_error (&local_error); -+ else if (data->error == NULL) - data->error = g_steal_pointer (&local_error); - else if (!g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) - g_debug ("Error closing output stream: %s", local_error->message); --- -GitLab - diff --git a/gnome-software.spec b/gnome-software.spec index d3ac2cb..a650146 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -12,8 +12,8 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 42~rc -Release: 2%{?dist} +Version: 42.0 +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -21,8 +21,6 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch -Patch02: 1282.patch -Patch03: 1285.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -199,6 +197,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Fri Mar 18 2022 Milan Crha - 42.0-1 +- Update to 42.0 + * Thu Mar 10 2022 Milan Crha - 42.rc-2 - Add upstream patches for gs-download-utils (i#1677 and i#1679) diff --git a/sources b/sources index 6afee80..2a6fbea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-42.rc.tar.xz) = cd9c465d73b8998c0ebc49d5e40fec22522e0f125cbce5ff59a7a13d779a3793ac57dfb606d9b918e0c198b6b6cd62657483dc8e83a77ed84966c5f44980f38b +SHA512 (gnome-software-42.0.tar.xz) = f630232d164d1a7adcf9a91133769c6fe4ce62cdaeccd49b991330682eeccfddc8f83c7326802aaabdb4fc537243c0fd19741c702f4d23d75ebd71e9abb3da92 From 3bea79c8292d26f0d87786ee085fc58778d7de17 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 11 Apr 2022 10:31:30 +0200 Subject: [PATCH 016/138] Resolves: #2072661 (Workaround overlapping labels caused by gtk4 bug) --- 0002-app-row-no-multiline.patch | 55 +++++++++++++++++++++++++++++++++ gnome-software.spec | 6 +++- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 0002-app-row-no-multiline.patch diff --git a/0002-app-row-no-multiline.patch b/0002-app-row-no-multiline.patch new file mode 100644 index 0000000..fd68c59 --- /dev/null +++ b/0002-app-row-no-multiline.patch @@ -0,0 +1,55 @@ +From 5ea824c584e5824637e9e323fd867b9d7d6ec750 Mon Sep 17 00:00:00 2001 +From: Joshua Lee +Date: Sun, 3 Apr 2022 05:14:20 +0100 +Subject: [PATCH] app-row: Ensure labels don't overlap + +Due to https://gitlab.gnome.org/GNOME/gtk/-/issues/4714, +multi-line labels result in app-row displaying overlapping text. +Workaround this issue by restraining offending labels to one +line in addition to disabling wrapping. +--- + src/gs-app-row.ui | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/gs-app-row.ui b/src/gs-app-row.ui +index 75fb2f598..d7a2fc93b 100644 +--- a/src/gs-app-row.ui ++++ b/src/gs-app-row.ui +@@ -34,7 +34,7 @@ + 0.0 + 0.5 + end +- 3 ++ 1 + word-char + +-- +GitLab + diff --git a/gnome-software.spec b/gnome-software.spec index a650146..cbfc978 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -13,7 +13,7 @@ Name: gnome-software Version: 42.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -21,6 +21,7 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch +Patch02: 0002-app-row-no-multiline.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -197,6 +198,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Mon Apr 11 2022 Milan Crha - 42.0-2 +- Resolves: #2072661 (Workaround overlapping labels caused by gtk4 bug) + * Fri Mar 18 2022 Milan Crha - 42.0-1 - Update to 42.0 From 0692f3051711ac88bae433170e70a39eef7ad5d6 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 11 Apr 2022 12:38:21 +0200 Subject: [PATCH 017/138] Resolves: #2073353 (RPM repos can't be disabled in GNOME Software after F35->F36 upgrade) --- 0003-provenance-quirks-on-repos.patch | 56 +++++++++++++++++++++++++++ gnome-software.spec | 2 + 2 files changed, 58 insertions(+) create mode 100644 0003-provenance-quirks-on-repos.patch diff --git a/0003-provenance-quirks-on-repos.patch b/0003-provenance-quirks-on-repos.patch new file mode 100644 index 0000000..1d4daa4 --- /dev/null +++ b/0003-provenance-quirks-on-repos.patch @@ -0,0 +1,56 @@ +From ff4bc92c4c3824710cc6259b6bc8ddb71782f918 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Mon, 11 Apr 2022 12:30:49 +0200 +Subject: [PATCH] gs-plugin-provenance: Handle repositories specifically + +Do not check origin of the repository GsApp instances, because +the compulsory and provenance quirks should not be inherited +from the source. They should be for the repository itself. + +Reported downstream at: +https://bugzilla.redhat.com/show_bug.cgi?id=2073353 +--- + plugins/core/gs-plugin-provenance.c | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/plugins/core/gs-plugin-provenance.c b/plugins/core/gs-plugin-provenance.c +index 2cb442aec..95e940bba 100644 +--- a/plugins/core/gs-plugin-provenance.c ++++ b/plugins/core/gs-plugin-provenance.c +@@ -188,23 +188,23 @@ refine_app (GsPlugin *plugin, + if (gs_app_has_quirk (app, GS_APP_QUIRK_PROVENANCE)) + return TRUE; + +- /* simple case */ +- origin = gs_app_get_origin (app); +- if (gs_plugin_provenance_find_repo_flags (repos, provenance_wildcards, compulsory_wildcards, origin, &quirks)) { +- gs_plugin_provenance_add_quirks (app, quirks); +- return TRUE; +- } +- + /* Software sources/repositories are represented as #GsApps too. Add the + * provenance quirk to the system-configured repositories (but not + * user-configured ones). */ +- if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY && +- gs_plugin_provenance_find_repo_flags (repos, provenance_wildcards, compulsory_wildcards, gs_app_get_id (app), &quirks)) { +- if (gs_app_get_scope (app) != AS_COMPONENT_SCOPE_USER) ++ if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY) { ++ if (gs_plugin_provenance_find_repo_flags (repos, provenance_wildcards, compulsory_wildcards, gs_app_get_id (app), &quirks) && ++ gs_app_get_scope (app) != AS_COMPONENT_SCOPE_USER) + gs_plugin_provenance_add_quirks (app, quirks); + return TRUE; + } + ++ /* simple case */ ++ origin = gs_app_get_origin (app); ++ if (gs_plugin_provenance_find_repo_flags (repos, provenance_wildcards, compulsory_wildcards, origin, &quirks)) { ++ gs_plugin_provenance_add_quirks (app, quirks); ++ return TRUE; ++ } ++ + /* this only works for packages */ + origin = gs_app_get_source_id_default (app); + if (origin == NULL) +-- +GitLab + diff --git a/gnome-software.spec b/gnome-software.spec index cbfc978..c6c8aec 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -22,6 +22,7 @@ Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarbal Patch01: 0001-crash-with-broken-theme.patch Patch02: 0002-app-row-no-multiline.patch +Patch03: 0003-provenance-quirks-on-repos.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -200,6 +201,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %changelog * Mon Apr 11 2022 Milan Crha - 42.0-2 - Resolves: #2072661 (Workaround overlapping labels caused by gtk4 bug) +- Resolves: #2073353 (RPM repos can't be disabled in GNOME Software after F35->F36 upgrade) * Fri Mar 18 2022 Milan Crha - 42.0-1 - Update to 42.0 From 5451b3e5f2a91c6731f376e14245f78804a4404a Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 19 Apr 2022 13:04:29 +0200 Subject: [PATCH 018/138] Resolves: #2074121 (Enabling "Fedora Flathub Selection" repo doesn't show included apps) --- 0004-flatpak-filtered-flathub-enable.patch | 155 +++++++++++++++++++++ gnome-software.spec | 6 +- 2 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 0004-flatpak-filtered-flathub-enable.patch diff --git a/0004-flatpak-filtered-flathub-enable.patch b/0004-flatpak-filtered-flathub-enable.patch new file mode 100644 index 0000000..a9e62eb --- /dev/null +++ b/0004-flatpak-filtered-flathub-enable.patch @@ -0,0 +1,155 @@ +diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c +index b67bc91e..dd528cc2 100644 +--- a/plugins/flatpak/gs-flatpak.c ++++ b/plugins/flatpak/gs-flatpak.c +@@ -451,22 +451,6 @@ static gboolean + gs_flatpak_claim_changed_idle_cb (gpointer user_data) + { + GsFlatpak *self = user_data; +- +- self->requires_full_rescan = TRUE; +- +- gs_plugin_cache_invalidate (self->plugin); +- gs_plugin_reload (self->plugin); +- +- return G_SOURCE_REMOVE; +-} +- +-static void +-gs_plugin_flatpak_changed_cb (GFileMonitor *monitor, +- GFile *child, +- GFile *other_file, +- GFileMonitorEvent event_type, +- GsFlatpak *self) +-{ + g_autoptr(GError) error = NULL; + g_autoptr(GMutexLocker) locker = NULL; + g_autoptr(GRWLockWriterLocker) writer_locker = NULL; +@@ -486,6 +470,21 @@ gs_plugin_flatpak_changed_cb (GFileMonitor *monitor, + xb_silo_invalidate (self->silo); + g_clear_pointer (&writer_locker, g_rw_lock_writer_locker_free); + ++ self->requires_full_rescan = TRUE; ++ ++ gs_plugin_cache_invalidate (self->plugin); ++ gs_plugin_reload (self->plugin); ++ ++ return G_SOURCE_REMOVE; ++} ++ ++static void ++gs_plugin_flatpak_changed_cb (GFileMonitor *monitor, ++ GFile *child, ++ GFile *other_file, ++ GFileMonitorEvent event_type, ++ GsFlatpak *self) ++{ + if (gs_flatpak_get_busy (self)) { + self->changed_while_busy = TRUE; + } else { +From 4658b2c0ab6b252a3fcde8027178f05954472e4e Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Tue, 12 Apr 2022 13:48:29 +0200 +Subject: flatpak: Cleanup broken_remotes hash when flatpak installation + changed + +When there's notified the flatpak installation changed, it's likely some +of the known broken remotes could have changed as well, thus do not wait +for a plugin refresh() call and cleanup the broken_remotes immediately. + +diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c +index dd528cc2..71d62803 100644 +--- a/plugins/flatpak/gs-flatpak.c ++++ b/plugins/flatpak/gs-flatpak.c +@@ -465,6 +465,11 @@ gs_flatpak_claim_changed_idle_cb (gpointer user_data) + g_hash_table_remove_all (self->remote_title); + g_clear_pointer (&locker, g_mutex_locker_free); + ++ /* give all the repos a second chance */ ++ locker = g_mutex_locker_new (&self->broken_remotes_mutex); ++ g_hash_table_remove_all (self->broken_remotes); ++ g_clear_pointer (&locker, g_mutex_locker_free); ++ + writer_locker = g_rw_lock_writer_locker_new (&self->silo_lock); + if (self->silo) + xb_silo_invalidate (self->silo); +diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c +index 71d62803..df81ea90 100644 +--- a/plugins/flatpak/gs-flatpak.c ++++ b/plugins/flatpak/gs-flatpak.c +@@ -447,11 +447,9 @@ gs_flatpak_create_source (GsFlatpak *self, FlatpakRemote *xremote) + return g_steal_pointer (&app); + } + +-static gboolean +-gs_flatpak_claim_changed_idle_cb (gpointer user_data) ++static void ++gs_flatpak_internal_data_changed (GsFlatpak *self) + { +- GsFlatpak *self = user_data; +- g_autoptr(GError) error = NULL; + g_autoptr(GMutexLocker) locker = NULL; + g_autoptr(GRWLockWriterLocker) writer_locker = NULL; + +@@ -476,7 +474,14 @@ gs_flatpak_claim_changed_idle_cb (gpointer user_data) + g_clear_pointer (&writer_locker, g_rw_lock_writer_locker_free); + + self->requires_full_rescan = TRUE; ++} + ++static gboolean ++gs_flatpak_claim_changed_idle_cb (gpointer user_data) ++{ ++ GsFlatpak *self = user_data; ++ ++ gs_flatpak_internal_data_changed (self); + gs_plugin_cache_invalidate (self->plugin); + gs_plugin_reload (self->plugin); + +@@ -1086,10 +1091,17 @@ gs_flatpak_rescan_app_data (GsFlatpak *self, + gboolean res = gs_flatpak_refresh (self, 0, interactive, cancellable, error); + if (res) + self->requires_full_rescan = FALSE; ++ else ++ gs_flatpak_internal_data_changed (self); + return res; + } + +- return gs_flatpak_rescan_appstream_store (self, interactive, cancellable, error); ++ if (!gs_flatpak_rescan_appstream_store (self, interactive, cancellable, error)) { ++ gs_flatpak_internal_data_changed (self); ++ return FALSE; ++ } ++ ++ return TRUE; + } + + gboolean +@@ -1956,8 +1968,16 @@ gs_flatpak_refresh (GsFlatpak *self, + g_hash_table_remove_all (self->broken_remotes); + g_mutex_unlock (&self->broken_remotes_mutex); + +- /* manually drop the cache */ +- if (!flatpak_installation_drop_caches (gs_flatpak_get_installation (self, interactive), ++ /* manually drop the cache in both installation instances; ++ * it's needed to have them both agree on the content. */ ++ if (!flatpak_installation_drop_caches (gs_flatpak_get_installation (self, FALSE), ++ cancellable, ++ error)) { ++ gs_flatpak_error_convert (error); ++ return FALSE; ++ } ++ ++ if (!flatpak_installation_drop_caches (gs_flatpak_get_installation (self, TRUE), + cancellable, + error)) { + gs_flatpak_error_convert (error); +@@ -3261,7 +3281,7 @@ gs_flatpak_refine_app_unlocked (GsFlatpak *self, + gs_app_get_unique_id (app), + error_local->message); + } else { +- g_prefix_error (&error_local, "failed to get permissions: "); ++ g_prefix_error (&error_local, "failed to read permissions from app '%s' metadata: ", gs_app_get_unique_id (app)); + g_propagate_error (error, g_steal_pointer (&error_local)); + return FALSE; + } diff --git a/gnome-software.spec b/gnome-software.spec index c6c8aec..3b2cf22 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -13,7 +13,7 @@ Name: gnome-software Version: 42.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -23,6 +23,7 @@ Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarbal Patch01: 0001-crash-with-broken-theme.patch Patch02: 0002-app-row-no-multiline.patch Patch03: 0003-provenance-quirks-on-repos.patch +Patch04: 0004-flatpak-filtered-flathub-enable.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -199,6 +200,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Tue Apr 19 2022 Milan Crha - 42.0-3 +- Resolves: #2074121 (Enabling "Fedora Flathub Selection" repo doesn't show included apps) + * Mon Apr 11 2022 Milan Crha - 42.0-2 - Resolves: #2072661 (Workaround overlapping labels caused by gtk4 bug) - Resolves: #2073353 (RPM repos can't be disabled in GNOME Software after F35->F36 upgrade) From ce4cfad61c0ebcb0cfd892ebf794a7b8a429d778 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 20 Apr 2022 17:23:49 +0200 Subject: [PATCH 019/138] Update patch for bug #2074121 --- 0004-flatpak-filtered-flathub-enable.patch | 51 ++++++++++++++++++++++ gnome-software.spec | 5 ++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/0004-flatpak-filtered-flathub-enable.patch b/0004-flatpak-filtered-flathub-enable.patch index a9e62eb..90d81c8 100644 --- a/0004-flatpak-filtered-flathub-enable.patch +++ b/0004-flatpak-filtered-flathub-enable.patch @@ -153,3 +153,54 @@ index 71d62803..df81ea90 100644 g_propagate_error (error, g_steal_pointer (&error_local)); return FALSE; } + +diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c +index df81ea90..09d28add 100644 +--- a/plugins/flatpak/gs-flatpak.c ++++ b/plugins/flatpak/gs-flatpak.c +@@ -1042,6 +1042,10 @@ gs_flatpak_rescan_appstream_store (GsFlatpak *self, + if (!gs_flatpak_add_apps_from_xremote (self, builder, xremote, interactive, cancellable, &error_local)) { + g_debug ("Failed to add apps from remote ‘%s’; skipping: %s", + flatpak_remote_get_name (xremote), error_local->message); ++ if (g_cancellable_set_error_if_cancelled (cancellable, error)) { ++ gs_flatpak_error_convert (error); ++ return FALSE; ++ } + } + } + +@@ -1069,7 +1073,7 @@ gs_flatpak_rescan_appstream_store (GsFlatpak *self, + self->silo = xb_builder_ensure (builder, file, + XB_BUILDER_COMPILE_FLAG_IGNORE_INVALID | + XB_BUILDER_COMPILE_FLAG_SINGLE_LANG, +- NULL, error); ++ cancellable, error); + + if (old_thread_default != NULL) + g_main_context_push_thread_default (old_thread_default); +@@ -1752,22 +1756,16 @@ gs_flatpak_app_install_source (GsFlatpak *self, + gs_flatpak_error_convert (error); + g_prefix_error (error, "cannot modify remote: "); + gs_app_set_state_recover (app); ++ gs_flatpak_internal_data_changed (self); + return FALSE; + } + +- /* invalidate cache */ +- g_rw_lock_reader_lock (&self->silo_lock); +- if (self->silo != NULL) +- xb_silo_invalidate (self->silo); +- g_rw_lock_reader_unlock (&self->silo_lock); ++ /* Mark the internal cache as obsolete. */ ++ gs_flatpak_internal_data_changed (self); + + /* success */ + gs_app_set_state (app, GS_APP_STATE_INSTALLED); + +- /* This can fail silently, it's only to update necessary caches, to provide +- * up-to-date information after the successful remote enable/install. */ +- gs_flatpak_refresh (self, 1, interactive, cancellable, NULL); +- + gs_plugin_repository_changed (self->plugin, app); + + return TRUE; diff --git a/gnome-software.spec b/gnome-software.spec index 3b2cf22..e5b3f7d 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -13,7 +13,7 @@ Name: gnome-software Version: 42.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -200,6 +200,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Wed Apr 20 2022 Milan Crha - 42.0-4 +- Update patch for bug #2074121 + * Tue Apr 19 2022 Milan Crha - 42.0-3 - Resolves: #2074121 (Enabling "Fedora Flathub Selection" repo doesn't show included apps) From 82d21baa53b72f37b9370b734b414157750bceab Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 27 Apr 2022 09:09:39 +0200 Subject: [PATCH 020/138] Update to 42.1 --- gnome-software.spec | 15 +++++++++------ sources | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/gnome-software.spec b/gnome-software.spec index bc27980..ee7eb05 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -9,10 +9,13 @@ %global fwupd_version 1.3.3 %global flatpak_version 1.5.1 +# this is not a library version +%define gs_plugin_version 18 + %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 42.0 +Version: 42.1 Release: 1%{?dist} Summary: A software center for GNOME @@ -74,9 +77,6 @@ Recommends: PackageKit%{?_isa} >= %{packagekit_version} Obsoletes: gnome-software-snap < 3.33.1 Obsoletes: gnome-software-editor < 3.35.1 -# this is not a library version -%define gs_plugin_version 17 - %description gnome-software is an application that makes it easy to add, remove and update software in the GNOME desktop. @@ -177,8 +177,8 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_repos.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_rewrite-resource.so %{_sysconfdir}/xdg/autostart/org.gnome.Software.desktop -%{_datadir}/app-info/xmls/org.gnome.Software.Featured.xml -%{_datadir}/app-info/xmls/org.gnome.Software.Popular.xml +%{_datadir}/swcatalog/xml/org.gnome.Software.Featured.xml +%{_datadir}/swcatalog/xml/org.gnome.Software.Popular.xml %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service %{_datadir}/dbus-1/services/org.gnome.Software.service %{_datadir}/gnome-shell/search-providers/org.gnome.Software-search-provider.ini @@ -198,6 +198,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Wed Apr 27 2022 Milan Crha - 42.1-1 +- Update to 42.1 + * Fri Mar 18 2022 Milan Crha - 42.0-1 - Update to 42.0 diff --git a/sources b/sources index 2a6fbea..326494a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-42.0.tar.xz) = f630232d164d1a7adcf9a91133769c6fe4ce62cdaeccd49b991330682eeccfddc8f83c7326802aaabdb4fc537243c0fd19741c702f4d23d75ebd71e9abb3da92 +SHA512 (gnome-software-42.1.tar.xz) = 292a17e94c7409198fdff4250a88cb240a126c3d77a9cfee1ea8608fdc482d75af6f8fc91c5c6c068b474edea6dcb197f88ec09081a8b270d5f3eda67db755ad From 03479cfce242d651c1a4b2297050e08fe4f42fea Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 27 Apr 2022 09:36:24 +0200 Subject: [PATCH 021/138] Update to 42.1 --- 0002-app-row-no-multiline.patch | 55 ------ 0003-provenance-quirks-on-repos.patch | 56 ------ 0004-flatpak-filtered-flathub-enable.patch | 206 --------------------- gnome-software.spec | 20 +- sources | 2 +- 5 files changed, 11 insertions(+), 328 deletions(-) delete mode 100644 0002-app-row-no-multiline.patch delete mode 100644 0003-provenance-quirks-on-repos.patch delete mode 100644 0004-flatpak-filtered-flathub-enable.patch diff --git a/0002-app-row-no-multiline.patch b/0002-app-row-no-multiline.patch deleted file mode 100644 index fd68c59..0000000 --- a/0002-app-row-no-multiline.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 5ea824c584e5824637e9e323fd867b9d7d6ec750 Mon Sep 17 00:00:00 2001 -From: Joshua Lee -Date: Sun, 3 Apr 2022 05:14:20 +0100 -Subject: [PATCH] app-row: Ensure labels don't overlap - -Due to https://gitlab.gnome.org/GNOME/gtk/-/issues/4714, -multi-line labels result in app-row displaying overlapping text. -Workaround this issue by restraining offending labels to one -line in addition to disabling wrapping. ---- - src/gs-app-row.ui | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/gs-app-row.ui b/src/gs-app-row.ui -index 75fb2f598..d7a2fc93b 100644 ---- a/src/gs-app-row.ui -+++ b/src/gs-app-row.ui -@@ -34,7 +34,7 @@ - 0.0 - 0.5 - end -- 3 -+ 1 - word-char - --- -GitLab - diff --git a/0003-provenance-quirks-on-repos.patch b/0003-provenance-quirks-on-repos.patch deleted file mode 100644 index 1d4daa4..0000000 --- a/0003-provenance-quirks-on-repos.patch +++ /dev/null @@ -1,56 +0,0 @@ -From ff4bc92c4c3824710cc6259b6bc8ddb71782f918 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Mon, 11 Apr 2022 12:30:49 +0200 -Subject: [PATCH] gs-plugin-provenance: Handle repositories specifically - -Do not check origin of the repository GsApp instances, because -the compulsory and provenance quirks should not be inherited -from the source. They should be for the repository itself. - -Reported downstream at: -https://bugzilla.redhat.com/show_bug.cgi?id=2073353 ---- - plugins/core/gs-plugin-provenance.c | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - -diff --git a/plugins/core/gs-plugin-provenance.c b/plugins/core/gs-plugin-provenance.c -index 2cb442aec..95e940bba 100644 ---- a/plugins/core/gs-plugin-provenance.c -+++ b/plugins/core/gs-plugin-provenance.c -@@ -188,23 +188,23 @@ refine_app (GsPlugin *plugin, - if (gs_app_has_quirk (app, GS_APP_QUIRK_PROVENANCE)) - return TRUE; - -- /* simple case */ -- origin = gs_app_get_origin (app); -- if (gs_plugin_provenance_find_repo_flags (repos, provenance_wildcards, compulsory_wildcards, origin, &quirks)) { -- gs_plugin_provenance_add_quirks (app, quirks); -- return TRUE; -- } -- - /* Software sources/repositories are represented as #GsApps too. Add the - * provenance quirk to the system-configured repositories (but not - * user-configured ones). */ -- if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY && -- gs_plugin_provenance_find_repo_flags (repos, provenance_wildcards, compulsory_wildcards, gs_app_get_id (app), &quirks)) { -- if (gs_app_get_scope (app) != AS_COMPONENT_SCOPE_USER) -+ if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY) { -+ if (gs_plugin_provenance_find_repo_flags (repos, provenance_wildcards, compulsory_wildcards, gs_app_get_id (app), &quirks) && -+ gs_app_get_scope (app) != AS_COMPONENT_SCOPE_USER) - gs_plugin_provenance_add_quirks (app, quirks); - return TRUE; - } - -+ /* simple case */ -+ origin = gs_app_get_origin (app); -+ if (gs_plugin_provenance_find_repo_flags (repos, provenance_wildcards, compulsory_wildcards, origin, &quirks)) { -+ gs_plugin_provenance_add_quirks (app, quirks); -+ return TRUE; -+ } -+ - /* this only works for packages */ - origin = gs_app_get_source_id_default (app); - if (origin == NULL) --- -GitLab - diff --git a/0004-flatpak-filtered-flathub-enable.patch b/0004-flatpak-filtered-flathub-enable.patch deleted file mode 100644 index 90d81c8..0000000 --- a/0004-flatpak-filtered-flathub-enable.patch +++ /dev/null @@ -1,206 +0,0 @@ -diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c -index b67bc91e..dd528cc2 100644 ---- a/plugins/flatpak/gs-flatpak.c -+++ b/plugins/flatpak/gs-flatpak.c -@@ -451,22 +451,6 @@ static gboolean - gs_flatpak_claim_changed_idle_cb (gpointer user_data) - { - GsFlatpak *self = user_data; -- -- self->requires_full_rescan = TRUE; -- -- gs_plugin_cache_invalidate (self->plugin); -- gs_plugin_reload (self->plugin); -- -- return G_SOURCE_REMOVE; --} -- --static void --gs_plugin_flatpak_changed_cb (GFileMonitor *monitor, -- GFile *child, -- GFile *other_file, -- GFileMonitorEvent event_type, -- GsFlatpak *self) --{ - g_autoptr(GError) error = NULL; - g_autoptr(GMutexLocker) locker = NULL; - g_autoptr(GRWLockWriterLocker) writer_locker = NULL; -@@ -486,6 +470,21 @@ gs_plugin_flatpak_changed_cb (GFileMonitor *monitor, - xb_silo_invalidate (self->silo); - g_clear_pointer (&writer_locker, g_rw_lock_writer_locker_free); - -+ self->requires_full_rescan = TRUE; -+ -+ gs_plugin_cache_invalidate (self->plugin); -+ gs_plugin_reload (self->plugin); -+ -+ return G_SOURCE_REMOVE; -+} -+ -+static void -+gs_plugin_flatpak_changed_cb (GFileMonitor *monitor, -+ GFile *child, -+ GFile *other_file, -+ GFileMonitorEvent event_type, -+ GsFlatpak *self) -+{ - if (gs_flatpak_get_busy (self)) { - self->changed_while_busy = TRUE; - } else { -From 4658b2c0ab6b252a3fcde8027178f05954472e4e Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Tue, 12 Apr 2022 13:48:29 +0200 -Subject: flatpak: Cleanup broken_remotes hash when flatpak installation - changed - -When there's notified the flatpak installation changed, it's likely some -of the known broken remotes could have changed as well, thus do not wait -for a plugin refresh() call and cleanup the broken_remotes immediately. - -diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c -index dd528cc2..71d62803 100644 ---- a/plugins/flatpak/gs-flatpak.c -+++ b/plugins/flatpak/gs-flatpak.c -@@ -465,6 +465,11 @@ gs_flatpak_claim_changed_idle_cb (gpointer user_data) - g_hash_table_remove_all (self->remote_title); - g_clear_pointer (&locker, g_mutex_locker_free); - -+ /* give all the repos a second chance */ -+ locker = g_mutex_locker_new (&self->broken_remotes_mutex); -+ g_hash_table_remove_all (self->broken_remotes); -+ g_clear_pointer (&locker, g_mutex_locker_free); -+ - writer_locker = g_rw_lock_writer_locker_new (&self->silo_lock); - if (self->silo) - xb_silo_invalidate (self->silo); -diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c -index 71d62803..df81ea90 100644 ---- a/plugins/flatpak/gs-flatpak.c -+++ b/plugins/flatpak/gs-flatpak.c -@@ -447,11 +447,9 @@ gs_flatpak_create_source (GsFlatpak *self, FlatpakRemote *xremote) - return g_steal_pointer (&app); - } - --static gboolean --gs_flatpak_claim_changed_idle_cb (gpointer user_data) -+static void -+gs_flatpak_internal_data_changed (GsFlatpak *self) - { -- GsFlatpak *self = user_data; -- g_autoptr(GError) error = NULL; - g_autoptr(GMutexLocker) locker = NULL; - g_autoptr(GRWLockWriterLocker) writer_locker = NULL; - -@@ -476,7 +474,14 @@ gs_flatpak_claim_changed_idle_cb (gpointer user_data) - g_clear_pointer (&writer_locker, g_rw_lock_writer_locker_free); - - self->requires_full_rescan = TRUE; -+} - -+static gboolean -+gs_flatpak_claim_changed_idle_cb (gpointer user_data) -+{ -+ GsFlatpak *self = user_data; -+ -+ gs_flatpak_internal_data_changed (self); - gs_plugin_cache_invalidate (self->plugin); - gs_plugin_reload (self->plugin); - -@@ -1086,10 +1091,17 @@ gs_flatpak_rescan_app_data (GsFlatpak *self, - gboolean res = gs_flatpak_refresh (self, 0, interactive, cancellable, error); - if (res) - self->requires_full_rescan = FALSE; -+ else -+ gs_flatpak_internal_data_changed (self); - return res; - } - -- return gs_flatpak_rescan_appstream_store (self, interactive, cancellable, error); -+ if (!gs_flatpak_rescan_appstream_store (self, interactive, cancellable, error)) { -+ gs_flatpak_internal_data_changed (self); -+ return FALSE; -+ } -+ -+ return TRUE; - } - - gboolean -@@ -1956,8 +1968,16 @@ gs_flatpak_refresh (GsFlatpak *self, - g_hash_table_remove_all (self->broken_remotes); - g_mutex_unlock (&self->broken_remotes_mutex); - -- /* manually drop the cache */ -- if (!flatpak_installation_drop_caches (gs_flatpak_get_installation (self, interactive), -+ /* manually drop the cache in both installation instances; -+ * it's needed to have them both agree on the content. */ -+ if (!flatpak_installation_drop_caches (gs_flatpak_get_installation (self, FALSE), -+ cancellable, -+ error)) { -+ gs_flatpak_error_convert (error); -+ return FALSE; -+ } -+ -+ if (!flatpak_installation_drop_caches (gs_flatpak_get_installation (self, TRUE), - cancellable, - error)) { - gs_flatpak_error_convert (error); -@@ -3261,7 +3281,7 @@ gs_flatpak_refine_app_unlocked (GsFlatpak *self, - gs_app_get_unique_id (app), - error_local->message); - } else { -- g_prefix_error (&error_local, "failed to get permissions: "); -+ g_prefix_error (&error_local, "failed to read permissions from app '%s' metadata: ", gs_app_get_unique_id (app)); - g_propagate_error (error, g_steal_pointer (&error_local)); - return FALSE; - } - -diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c -index df81ea90..09d28add 100644 ---- a/plugins/flatpak/gs-flatpak.c -+++ b/plugins/flatpak/gs-flatpak.c -@@ -1042,6 +1042,10 @@ gs_flatpak_rescan_appstream_store (GsFlatpak *self, - if (!gs_flatpak_add_apps_from_xremote (self, builder, xremote, interactive, cancellable, &error_local)) { - g_debug ("Failed to add apps from remote ‘%s’; skipping: %s", - flatpak_remote_get_name (xremote), error_local->message); -+ if (g_cancellable_set_error_if_cancelled (cancellable, error)) { -+ gs_flatpak_error_convert (error); -+ return FALSE; -+ } - } - } - -@@ -1069,7 +1073,7 @@ gs_flatpak_rescan_appstream_store (GsFlatpak *self, - self->silo = xb_builder_ensure (builder, file, - XB_BUILDER_COMPILE_FLAG_IGNORE_INVALID | - XB_BUILDER_COMPILE_FLAG_SINGLE_LANG, -- NULL, error); -+ cancellable, error); - - if (old_thread_default != NULL) - g_main_context_push_thread_default (old_thread_default); -@@ -1752,22 +1756,16 @@ gs_flatpak_app_install_source (GsFlatpak *self, - gs_flatpak_error_convert (error); - g_prefix_error (error, "cannot modify remote: "); - gs_app_set_state_recover (app); -+ gs_flatpak_internal_data_changed (self); - return FALSE; - } - -- /* invalidate cache */ -- g_rw_lock_reader_lock (&self->silo_lock); -- if (self->silo != NULL) -- xb_silo_invalidate (self->silo); -- g_rw_lock_reader_unlock (&self->silo_lock); -+ /* Mark the internal cache as obsolete. */ -+ gs_flatpak_internal_data_changed (self); - - /* success */ - gs_app_set_state (app, GS_APP_STATE_INSTALLED); - -- /* This can fail silently, it's only to update necessary caches, to provide -- * up-to-date information after the successful remote enable/install. */ -- gs_flatpak_refresh (self, 1, interactive, cancellable, NULL); -- - gs_plugin_repository_changed (self->plugin, app); - - return TRUE; diff --git a/gnome-software.spec b/gnome-software.spec index e5b3f7d..2b47261 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -9,11 +9,14 @@ %global fwupd_version 1.3.3 %global flatpak_version 1.5.1 +# this is not a library version +%define gs_plugin_version 18 + %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 42.0 -Release: 4%{?dist} +Version: 42.1 +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -21,9 +24,6 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch -Patch02: 0002-app-row-no-multiline.patch -Patch03: 0003-provenance-quirks-on-repos.patch -Patch04: 0004-flatpak-filtered-flathub-enable.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -77,9 +77,6 @@ Recommends: PackageKit%{?_isa} >= %{packagekit_version} Obsoletes: gnome-software-snap < 3.33.1 Obsoletes: gnome-software-editor < 3.35.1 -# this is not a library version -%define gs_plugin_version 17 - %description gnome-software is an application that makes it easy to add, remove and update software in the GNOME desktop. @@ -179,8 +176,8 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_repos.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_rewrite-resource.so %{_sysconfdir}/xdg/autostart/org.gnome.Software.desktop -%{_datadir}/app-info/xmls/org.gnome.Software.Featured.xml -%{_datadir}/app-info/xmls/org.gnome.Software.Popular.xml +%{_datadir}/swcatalog/xml/org.gnome.Software.Featured.xml +%{_datadir}/swcatalog/xml/org.gnome.Software.Popular.xml %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service %{_datadir}/dbus-1/services/org.gnome.Software.service %{_datadir}/gnome-shell/search-providers/org.gnome.Software-search-provider.ini @@ -200,6 +197,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Wed Apr 27 2022 Milan Crha - 42.1-1 +- Update to 42.1 + * Wed Apr 20 2022 Milan Crha - 42.0-4 - Update patch for bug #2074121 diff --git a/sources b/sources index 2a6fbea..326494a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-42.0.tar.xz) = f630232d164d1a7adcf9a91133769c6fe4ce62cdaeccd49b991330682eeccfddc8f83c7326802aaabdb4fc537243c0fd19741c702f4d23d75ebd71e9abb3da92 +SHA512 (gnome-software-42.1.tar.xz) = 292a17e94c7409198fdff4250a88cb240a126c3d77a9cfee1ea8608fdc482d75af6f8fc91c5c6c068b474edea6dcb197f88ec09081a8b270d5f3eda67db755ad From b0b459586b215a14dac347bd45e930e9a15eb07a Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 30 May 2022 17:51:05 +0200 Subject: [PATCH 022/138] Update to 42.2; Add patch to correct order of the setup of the GsShell --- 0002-shell-setup-order.patch | 134 +++++++++++++++++++++++++++++++++++ gnome-software.spec | 7 +- sources | 2 +- 3 files changed, 141 insertions(+), 2 deletions(-) create mode 100644 0002-shell-setup-order.patch diff --git a/0002-shell-setup-order.patch b/0002-shell-setup-order.patch new file mode 100644 index 0000000..c0ba76b --- /dev/null +++ b/0002-shell-setup-order.patch @@ -0,0 +1,134 @@ +diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c +index 38cc31bb5..c73adce6d 100644 +--- a/lib/gs-appstream.c ++++ b/lib/gs-appstream.c +@@ -1626,12 +1626,12 @@ gs_appstream_add_categories (XbSilo *silo, + for (guint k = 0; k < groups->len; k++) { + const gchar *group = g_ptr_array_index (groups, k); + guint cnt = gs_appstream_count_component_for_groups (silo, group); +- for (guint l = 0; l < cnt; l++) { +- gs_category_increment_size (parent); ++ if (cnt > 0) { ++ gs_category_increment_size (parent, cnt); + if (children->len > 1) { + /* Parent category has multiple groups, so increment + * each group's size too */ +- gs_category_increment_size (cat); ++ gs_category_increment_size (cat, cnt); + } + } + } +diff --git a/lib/gs-category.c b/lib/gs-category.c +index b311c4941..4baede3bc 100644 +--- a/lib/gs-category.c ++++ b/lib/gs-category.c +@@ -147,17 +147,19 @@ gs_category_set_size (GsCategory *category, guint size) + /** + * gs_category_increment_size: + * @category: a #GsCategory ++ * @value: how many to add + * +- * Adds one to the size count if an application is available ++ * Adds @value to the size count. + * + * Since: 3.22 + **/ + void +-gs_category_increment_size (GsCategory *category) ++gs_category_increment_size (GsCategory *category, ++ guint value) + { + g_return_if_fail (GS_IS_CATEGORY (category)); + +- category->size++; ++ category->size += value; + g_object_notify_by_pspec (G_OBJECT (category), obj_props[PROP_SIZE]); + } + +diff --git a/lib/gs-category.h b/lib/gs-category.h +index ecd2e1e23..1e82591aa 100644 +--- a/lib/gs-category.h ++++ b/lib/gs-category.h +@@ -39,6 +39,7 @@ GsCategory *gs_category_find_child (GsCategory *category, + GPtrArray *gs_category_get_children (GsCategory *category); + + guint gs_category_get_size (GsCategory *category); +-void gs_category_increment_size (GsCategory *category); ++void gs_category_increment_size (GsCategory *category, ++ guint value); + + G_END_DECLS +diff --git a/src/gs-shell.c b/src/gs-shell.c +index db449a9b0..796d7b05a 100644 +--- a/src/gs-shell.c ++++ b/src/gs-shell.c +@@ -107,6 +107,7 @@ struct _GsShell + GtkWidget *primary_menu; + GtkWidget *sub_page_header_title; + ++ gboolean active_after_setup; + gboolean is_narrow; + guint allocation_changed_cb_id; + +@@ -165,6 +166,12 @@ gs_shell_modal_dialog_present (GsShell *shell, GtkWindow *window) + void + gs_shell_activate (GsShell *shell) + { ++ /* Waiting for plugin loader to setup first */ ++ if (shell->plugin_loader == NULL) { ++ shell->active_after_setup = TRUE; ++ return; ++ } ++ + gtk_widget_show (GTK_WIDGET (shell)); + gtk_window_present (GTK_WINDOW (shell)); + } +@@ -2237,6 +2244,11 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can + if (g_settings_get_boolean (shell->settings, "first-run")) + g_settings_set_boolean (shell->settings, "first-run", FALSE); + } ++ ++ if (shell->active_after_setup) { ++ shell->active_after_setup = FALSE; ++ gs_shell_activate (shell); ++ } + } + + void +diff --git a/src/gs-application.c b/src/gs-application.c +index e3f5f55c7..bdadd5c34 100644 +--- a/src/gs-application.c ++++ b/src/gs-application.c +@@ -968,12 +968,9 @@ gs_application_startup (GApplication *application) + G_CALLBACK (gs_application_shell_loaded_cb), + app); + +- gs_shell_setup (app->shell, app->plugin_loader, app->cancellable); + app->main_window = GTK_WINDOW (app->shell); + gtk_application_add_window (GTK_APPLICATION (app), app->main_window); + +- app->update_monitor = gs_update_monitor_new (app, app->plugin_loader); +- + gs_application_update_software_sources_presence (application); + + /* Set up the plugins. */ +@@ -990,6 +987,7 @@ startup_cb (GObject *source_object, + GAsyncResult *result, + gpointer user_data) + { ++ GsApplication *app = GS_APPLICATION (user_data); + GsPluginLoader *plugin_loader = GS_PLUGIN_LOADER (source_object); + g_autoptr(GError) local_error = NULL; + +@@ -1002,6 +1000,11 @@ startup_cb (GObject *source_object, + + /* show the priority of each plugin */ + gs_plugin_loader_dump_state (plugin_loader); ++ ++ /* Setup the shell only after the plugin loader finished its setup, ++ thus all plugins are loaded and ready for the jobs. */ ++ gs_shell_setup (app->shell, app->plugin_loader, app->cancellable); ++ app->update_monitor = gs_update_monitor_new (app, app->plugin_loader); + } + + static void diff --git a/gnome-software.spec b/gnome-software.spec index ee7eb05..61f0509 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -15,7 +15,7 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 42.1 +Version: 42.2 Release: 1%{?dist} Summary: A software center for GNOME @@ -24,6 +24,7 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch +Patch02: 0002-shell-setup-order.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -198,6 +199,10 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Mon May 30 2022 Milan Crha - 42.2-1 +- Update to 42.2 +- Add patch to correct order of the setup of the GsShell + * Wed Apr 27 2022 Milan Crha - 42.1-1 - Update to 42.1 diff --git a/sources b/sources index 326494a..fc682d9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-42.1.tar.xz) = 292a17e94c7409198fdff4250a88cb240a126c3d77a9cfee1ea8608fdc482d75af6f8fc91c5c6c068b474edea6dcb197f88ec09081a8b270d5f3eda67db755ad +SHA512 (gnome-software-42.2.tar.xz) = 2b231afbedb241b8957fa902c37cd85734cdb8b2071cd32ac75ae2e9e064483fe1e9e8d49f2e6df478fdd01e9c6225a85887ba2af1792a9150b89cea75ef8bb4 From d155776a286c9938c8eb0f81cd5b854d4aef8ca4 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 30 May 2022 17:53:59 +0200 Subject: [PATCH 023/138] Update to 42.2; Add patch to correct order of the setup of the GsShell; Related: #2056082 (Enable PackageKit autoremove option) --- 0002-shell-setup-order.patch | 134 +++++++++++++++++++++++++++++++++++ gnome-software.spec | 9 ++- sources | 2 +- 3 files changed, 143 insertions(+), 2 deletions(-) create mode 100644 0002-shell-setup-order.patch diff --git a/0002-shell-setup-order.patch b/0002-shell-setup-order.patch new file mode 100644 index 0000000..c0ba76b --- /dev/null +++ b/0002-shell-setup-order.patch @@ -0,0 +1,134 @@ +diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c +index 38cc31bb5..c73adce6d 100644 +--- a/lib/gs-appstream.c ++++ b/lib/gs-appstream.c +@@ -1626,12 +1626,12 @@ gs_appstream_add_categories (XbSilo *silo, + for (guint k = 0; k < groups->len; k++) { + const gchar *group = g_ptr_array_index (groups, k); + guint cnt = gs_appstream_count_component_for_groups (silo, group); +- for (guint l = 0; l < cnt; l++) { +- gs_category_increment_size (parent); ++ if (cnt > 0) { ++ gs_category_increment_size (parent, cnt); + if (children->len > 1) { + /* Parent category has multiple groups, so increment + * each group's size too */ +- gs_category_increment_size (cat); ++ gs_category_increment_size (cat, cnt); + } + } + } +diff --git a/lib/gs-category.c b/lib/gs-category.c +index b311c4941..4baede3bc 100644 +--- a/lib/gs-category.c ++++ b/lib/gs-category.c +@@ -147,17 +147,19 @@ gs_category_set_size (GsCategory *category, guint size) + /** + * gs_category_increment_size: + * @category: a #GsCategory ++ * @value: how many to add + * +- * Adds one to the size count if an application is available ++ * Adds @value to the size count. + * + * Since: 3.22 + **/ + void +-gs_category_increment_size (GsCategory *category) ++gs_category_increment_size (GsCategory *category, ++ guint value) + { + g_return_if_fail (GS_IS_CATEGORY (category)); + +- category->size++; ++ category->size += value; + g_object_notify_by_pspec (G_OBJECT (category), obj_props[PROP_SIZE]); + } + +diff --git a/lib/gs-category.h b/lib/gs-category.h +index ecd2e1e23..1e82591aa 100644 +--- a/lib/gs-category.h ++++ b/lib/gs-category.h +@@ -39,6 +39,7 @@ GsCategory *gs_category_find_child (GsCategory *category, + GPtrArray *gs_category_get_children (GsCategory *category); + + guint gs_category_get_size (GsCategory *category); +-void gs_category_increment_size (GsCategory *category); ++void gs_category_increment_size (GsCategory *category, ++ guint value); + + G_END_DECLS +diff --git a/src/gs-shell.c b/src/gs-shell.c +index db449a9b0..796d7b05a 100644 +--- a/src/gs-shell.c ++++ b/src/gs-shell.c +@@ -107,6 +107,7 @@ struct _GsShell + GtkWidget *primary_menu; + GtkWidget *sub_page_header_title; + ++ gboolean active_after_setup; + gboolean is_narrow; + guint allocation_changed_cb_id; + +@@ -165,6 +166,12 @@ gs_shell_modal_dialog_present (GsShell *shell, GtkWindow *window) + void + gs_shell_activate (GsShell *shell) + { ++ /* Waiting for plugin loader to setup first */ ++ if (shell->plugin_loader == NULL) { ++ shell->active_after_setup = TRUE; ++ return; ++ } ++ + gtk_widget_show (GTK_WIDGET (shell)); + gtk_window_present (GTK_WINDOW (shell)); + } +@@ -2237,6 +2244,11 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can + if (g_settings_get_boolean (shell->settings, "first-run")) + g_settings_set_boolean (shell->settings, "first-run", FALSE); + } ++ ++ if (shell->active_after_setup) { ++ shell->active_after_setup = FALSE; ++ gs_shell_activate (shell); ++ } + } + + void +diff --git a/src/gs-application.c b/src/gs-application.c +index e3f5f55c7..bdadd5c34 100644 +--- a/src/gs-application.c ++++ b/src/gs-application.c +@@ -968,12 +968,9 @@ gs_application_startup (GApplication *application) + G_CALLBACK (gs_application_shell_loaded_cb), + app); + +- gs_shell_setup (app->shell, app->plugin_loader, app->cancellable); + app->main_window = GTK_WINDOW (app->shell); + gtk_application_add_window (GTK_APPLICATION (app), app->main_window); + +- app->update_monitor = gs_update_monitor_new (app, app->plugin_loader); +- + gs_application_update_software_sources_presence (application); + + /* Set up the plugins. */ +@@ -990,6 +987,7 @@ startup_cb (GObject *source_object, + GAsyncResult *result, + gpointer user_data) + { ++ GsApplication *app = GS_APPLICATION (user_data); + GsPluginLoader *plugin_loader = GS_PLUGIN_LOADER (source_object); + g_autoptr(GError) local_error = NULL; + +@@ -1002,6 +1000,11 @@ startup_cb (GObject *source_object, + + /* show the priority of each plugin */ + gs_plugin_loader_dump_state (plugin_loader); ++ ++ /* Setup the shell only after the plugin loader finished its setup, ++ thus all plugins are loaded and ready for the jobs. */ ++ gs_shell_setup (app->shell, app->plugin_loader, app->cancellable); ++ app->update_monitor = gs_update_monitor_new (app, app->plugin_loader); + } + + static void diff --git a/gnome-software.spec b/gnome-software.spec index 2b47261..6a48ea0 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -15,7 +15,7 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 42.1 +Version: 42.2 Release: 1%{?dist} Summary: A software center for GNOME @@ -24,6 +24,7 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch +Patch02: 0002-shell-setup-order.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -111,6 +112,7 @@ This package includes the rpm-ostree backend. -Dmalcontent=true \ -Dgudev=true \ -Dpackagekit=true \ + -Dpackagekit_autoremove=true \ -Dexternal_appstream=false \ -Drpm_ostree=true \ -Dtests=false @@ -197,6 +199,11 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Mon May 30 2022 Milan Crha - 42.2-1 +- Update to 42.2 +- Add patch to correct order of the setup of the GsShell +- Related: #2056082 (Enable PackageKit autoremove option) + * Wed Apr 27 2022 Milan Crha - 42.1-1 - Update to 42.1 diff --git a/sources b/sources index 326494a..fc682d9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-42.1.tar.xz) = 292a17e94c7409198fdff4250a88cb240a126c3d77a9cfee1ea8608fdc482d75af6f8fc91c5c6c068b474edea6dcb197f88ec09081a8b270d5f3eda67db755ad +SHA512 (gnome-software-42.2.tar.xz) = 2b231afbedb241b8957fa902c37cd85734cdb8b2071cd32ac75ae2e9e064483fe1e9e8d49f2e6df478fdd01e9c6225a85887ba2af1792a9150b89cea75ef8bb4 From 5575960754e99686dc508bdf62786708af80cbe6 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 13 Jun 2022 14:43:28 +0200 Subject: [PATCH 024/138] Add patch for crash under gs_flatpak_refine_app_unlocked() --- ...under-gs-flatpak-refine-app-unlocked.patch | 386 ++++++++++++++++++ gnome-software.spec | 6 +- 2 files changed, 391 insertions(+), 1 deletion(-) create mode 100644 0003-crash-under-gs-flatpak-refine-app-unlocked.patch diff --git a/0003-crash-under-gs-flatpak-refine-app-unlocked.patch b/0003-crash-under-gs-flatpak-refine-app-unlocked.patch new file mode 100644 index 0000000..701e7ef --- /dev/null +++ b/0003-crash-under-gs-flatpak-refine-app-unlocked.patch @@ -0,0 +1,386 @@ +diff -up gnome-software-42.2/lib/gs-appstream.c.3 gnome-software-42.2/lib/gs-appstream.c +--- gnome-software-42.2/lib/gs-appstream.c.3 2022-06-13 14:34:05.477145977 +0200 ++++ gnome-software-42.2/lib/gs-appstream.c 2022-06-13 14:36:26.640218337 +0200 +@@ -20,7 +20,13 @@ GsApp * + gs_appstream_create_app (GsPlugin *plugin, XbSilo *silo, XbNode *component, GError **error) + { + GsApp *app; +- g_autoptr(GsApp) app_new = gs_app_new (NULL); ++ g_autoptr(GsApp) app_new = NULL; ++ ++ g_return_val_if_fail (GS_IS_PLUGIN (plugin), NULL); ++ g_return_val_if_fail (XB_IS_SILO (silo), NULL); ++ g_return_val_if_fail (XB_IS_NODE (component), NULL); ++ ++ app_new = gs_app_new (NULL); + + /* refine enough to get the unique ID */ + if (!gs_appstream_refine_app (plugin, app_new, silo, component, +@@ -967,6 +973,11 @@ gs_appstream_refine_app (GsPlugin *plugi + g_autoptr(GPtrArray) launchables = NULL; + g_autoptr(XbNode) req = NULL; + ++ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); ++ g_return_val_if_fail (GS_IS_APP (app), FALSE); ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (XB_IS_NODE (component), FALSE); ++ + /* is compatible */ + req = xb_node_query_first (component, + "requires/id[@type='id']" +@@ -1411,6 +1422,11 @@ gs_appstream_search (GsPlugin *plugin, + { AS_SEARCH_TOKEN_MATCH_NONE, NULL } + }; + ++ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (values != NULL, FALSE); ++ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); ++ + /* add some weighted queries */ + for (guint i = 0; queries[i].xpath != NULL; i++) { + g_autoptr(GError) error_query = NULL; +@@ -1487,6 +1503,11 @@ gs_appstream_add_category_apps (GsPlugin + { + GPtrArray *desktop_groups; + ++ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (GS_IS_CATEGORY (category), FALSE); ++ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); ++ + desktop_groups = gs_category_get_desktop_groups (category); + if (desktop_groups->len == 0) { + g_warning ("no desktop_groups for %s", gs_category_get_id (category)); +@@ -1577,6 +1598,9 @@ gs_appstream_add_categories (XbSilo *sil + GCancellable *cancellable, + GError **error) + { ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (list != NULL, FALSE); ++ + for (guint j = 0; j < list->len; j++) { + GsCategory *parent = GS_CATEGORY (g_ptr_array_index (list, j)); + GPtrArray *children = gs_category_get_children (parent); +@@ -1611,6 +1635,9 @@ gs_appstream_add_popular (XbSilo *silo, + g_autoptr(GError) error_local = NULL; + g_autoptr(GPtrArray) array = NULL; + ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); ++ + /* find out how many packages are in each category */ + array = xb_silo_query (silo, + "components/component/kudos/" +@@ -1648,6 +1675,10 @@ gs_appstream_add_recent (GsPlugin *plugi + g_autoptr(GError) error_local = NULL; + g_autoptr(GPtrArray) array = NULL; + ++ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); ++ + /* use predicate conditions to the max */ + xpath = g_strdup_printf ("components/component/releases/" + "release[@timestamp>%" G_GUINT64_FORMAT "]/../..", +@@ -1686,6 +1717,10 @@ gs_appstream_add_alternates (XbSilo *sil + g_autoptr(GPtrArray) ids = NULL; + g_autoptr(GString) xpath = g_string_new (NULL); + ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (GS_IS_APP (app), FALSE); ++ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); ++ + /* probably a package we know nothing about */ + if (gs_app_get_id (app) == NULL) + return TRUE; +@@ -1743,6 +1778,9 @@ gs_appstream_add_featured (XbSilo *silo, + g_autoptr(GError) error_local = NULL; + g_autoptr(GPtrArray) array = NULL; + ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); ++ + /* find out how many packages are in each category */ + array = xb_silo_query (silo, + "components/component/custom/value[@key='GnomeSoftware::FeatureTile']/../..|" +@@ -1782,6 +1820,11 @@ gs_appstream_url_to_app (GsPlugin *plugi + g_autofree gchar *xpath = NULL; + g_autoptr(GPtrArray) components = NULL; + ++ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); ++ g_return_val_if_fail (url != NULL, FALSE); ++ + /* not us */ + scheme = gs_utils_get_url_scheme (url); + if (g_strcmp0 (scheme, "appstream") != 0) +@@ -1812,6 +1855,9 @@ gs_appstream_component_add_keyword (XbBu + g_autoptr(XbBuilderNode) keyword = NULL; + g_autoptr(XbBuilderNode) keywords = NULL; + ++ g_return_if_fail (XB_IS_BUILDER_NODE (component)); ++ g_return_if_fail (str != NULL); ++ + /* create if it does not already exist */ + keywords = xb_builder_node_get_child (component, "keywords", NULL); + if (keywords == NULL) +@@ -1831,6 +1877,9 @@ gs_appstream_component_add_provide (XbBu + g_autoptr(XbBuilderNode) provide = NULL; + g_autoptr(XbBuilderNode) provides = NULL; + ++ g_return_if_fail (XB_IS_BUILDER_NODE (component)); ++ g_return_if_fail (str != NULL); ++ + /* create if it does not already exist */ + provides = xb_builder_node_get_child (component, "provides", NULL); + if (provides == NULL) +@@ -1850,6 +1899,9 @@ gs_appstream_component_add_category (XbB + g_autoptr(XbBuilderNode) category = NULL; + g_autoptr(XbBuilderNode) categories = NULL; + ++ g_return_if_fail (XB_IS_BUILDER_NODE (component)); ++ g_return_if_fail (str != NULL); ++ + /* create if it does not already exist */ + categories = xb_builder_node_get_child (component, "categories", NULL); + if (categories == NULL) +@@ -1868,6 +1920,9 @@ gs_appstream_component_add_icon (XbBuild + { + g_autoptr(XbBuilderNode) icon = NULL; + ++ g_return_if_fail (XB_IS_BUILDER_NODE (component)); ++ g_return_if_fail (str != NULL); ++ + /* create str if it does not already exist */ + icon = xb_builder_node_get_child (component, "icon", NULL); + if (icon == NULL) { +@@ -1881,7 +1936,11 @@ gs_appstream_component_add_icon (XbBuild + void + gs_appstream_component_add_extra_info (XbBuilderNode *component) + { +- const gchar *kind = xb_builder_node_get_attr (component, "type"); ++ const gchar *kind; ++ ++ g_return_if_fail (XB_IS_BUILDER_NODE (component)); ++ ++ kind = xb_builder_node_get_attr (component, "type"); + + /* add the gnome-software-specific 'Addon' group and ensure they + * all have an icon set */ +@@ -1927,9 +1986,14 @@ gs_appstream_component_add_extra_info (X + void + gs_appstream_component_fix_url (XbBuilderNode *component, const gchar *baseurl) + { +- const gchar *text = xb_builder_node_get_text (component); ++ const gchar *text; + g_autofree gchar *url = NULL; + ++ g_return_if_fail (XB_IS_BUILDER_NODE (component)); ++ g_return_if_fail (baseurl != NULL); ++ ++ text = xb_builder_node_get_text (component); ++ + if (text == NULL) + return; + +diff -up gnome-software-42.2/plugins/flatpak/gs-flatpak.c.3 gnome-software-42.2/plugins/flatpak/gs-flatpak.c +--- gnome-software-42.2/plugins/flatpak/gs-flatpak.c.3 2022-05-30 13:43:00.000000000 +0200 ++++ gnome-software-42.2/plugins/flatpak/gs-flatpak.c 2022-06-13 14:34:05.480145978 +0200 +@@ -467,10 +467,18 @@ gs_flatpak_create_source (GsFlatpak *sel + } + + static void ++gs_flatpak_invalidate_silo (GsFlatpak *self) ++{ ++ g_rw_lock_writer_lock (&self->silo_lock); ++ if (self->silo != NULL) ++ xb_silo_invalidate (self->silo); ++ g_rw_lock_writer_unlock (&self->silo_lock); ++} ++ ++static void + gs_flatpak_internal_data_changed (GsFlatpak *self) + { + g_autoptr(GMutexLocker) locker = NULL; +- g_autoptr(GRWLockWriterLocker) writer_locker = NULL; + + /* drop the installed refs cache */ + locker = g_mutex_locker_new (&self->installed_refs_mutex); +@@ -487,10 +495,7 @@ gs_flatpak_internal_data_changed (GsFlat + g_hash_table_remove_all (self->broken_remotes); + g_clear_pointer (&locker, g_mutex_locker_free); + +- writer_locker = g_rw_lock_writer_locker_new (&self->silo_lock); +- if (self->silo) +- xb_silo_invalidate (self->silo); +- g_clear_pointer (&writer_locker, g_rw_lock_writer_locker_free); ++ gs_flatpak_invalidate_silo (self); + + self->requires_full_rescan = TRUE; + } +@@ -2009,10 +2014,7 @@ gs_flatpak_refresh (GsFlatpak *self, + g_mutex_unlock (&self->installed_refs_mutex); + + /* manually do this in case we created the first appstream file */ +- g_rw_lock_reader_lock (&self->silo_lock); +- if (self->silo != NULL) +- xb_silo_invalidate (self->silo); +- g_rw_lock_reader_unlock (&self->silo_lock); ++ gs_flatpak_invalidate_silo (self); + + /* update AppStream metadata */ + if (!gs_flatpak_refresh_appstream (self, cache_age_secs, interactive, cancellable, error)) +@@ -3197,6 +3199,20 @@ gs_flatpak_refine_app_unlocked (GsFlatpa + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); + ++ if (self->silo == NULL) { ++ g_clear_pointer (&locker, g_rw_lock_reader_locker_free); ++ if (!gs_flatpak_rescan_appstream_store (self, interactive, cancellable, error)) ++ return FALSE; ++ ++ locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } ++ } ++ + /* always do AppStream properties */ + if (!gs_flatpak_refine_appstream (self, app, self->silo, flags, interactive, cancellable, error)) + return FALSE; +@@ -3394,6 +3410,13 @@ gs_flatpak_refine_wildcard (GsFlatpak *s + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); + ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } ++ + /* find all apps when matching any prefixes */ + xpath = g_strdup_printf ("components/component/id[text()='%s']/..", id); + components = xb_silo_query (self->silo, xpath, 0, &error_local); +@@ -3487,10 +3510,7 @@ gs_flatpak_app_remove_source (GsFlatpak + } + + /* invalidate cache */ +- g_rw_lock_reader_lock (&self->silo_lock); +- if (self->silo != NULL) +- xb_silo_invalidate (self->silo); +- g_rw_lock_reader_unlock (&self->silo_lock); ++ gs_flatpak_invalidate_silo (self); + + gs_app_set_state (app, is_remove ? GS_APP_STATE_UNAVAILABLE : GS_APP_STATE_AVAILABLE); + +@@ -3953,6 +3973,13 @@ gs_flatpak_search (GsFlatpak *self, + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } ++ + if (!gs_appstream_search (self->plugin, self->silo, values, list_tmp, + cancellable, error)) + return FALSE; +@@ -4022,6 +4049,12 @@ gs_flatpak_add_category_apps (GsFlatpak + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } + return gs_appstream_add_category_apps (self->plugin, self->silo, + category, list, + cancellable, error); +@@ -4040,6 +4073,12 @@ gs_flatpak_add_categories (GsFlatpak *se + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } + return gs_appstream_add_categories (self->silo, + list, cancellable, error); + } +@@ -4058,6 +4097,12 @@ gs_flatpak_add_popular (GsFlatpak *self, + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } + if (!gs_appstream_add_popular (self->silo, list_tmp, + cancellable, error)) + return FALSE; +@@ -4081,6 +4126,12 @@ gs_flatpak_add_featured (GsFlatpak *self + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } + if (!gs_appstream_add_featured (self->silo, list_tmp, + cancellable, error)) + return FALSE; +@@ -4105,6 +4156,12 @@ gs_flatpak_add_alternates (GsFlatpak *se + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } + if (!gs_appstream_add_alternates (self->silo, app, list_tmp, + cancellable, error)) + return FALSE; +@@ -4129,6 +4186,12 @@ gs_flatpak_add_recent (GsFlatpak *self, + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } + if (!gs_appstream_add_recent (self->plugin, self->silo, list_tmp, age, + cancellable, error)) + return FALSE; +@@ -4154,6 +4217,12 @@ gs_flatpak_url_to_app (GsFlatpak *self, + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } + if (!gs_appstream_url_to_app (self->plugin, self->silo, list_tmp, url, cancellable, error)) + return FALSE; + diff --git a/gnome-software.spec b/gnome-software.spec index 61f0509..e2ed0ec 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -16,7 +16,7 @@ Name: gnome-software Version: 42.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -25,6 +25,7 @@ Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarbal Patch01: 0001-crash-with-broken-theme.patch Patch02: 0002-shell-setup-order.patch +Patch03: 0003-crash-under-gs-flatpak-refine-app-unlocked.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -199,6 +200,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Mon Jun 13 2022 Milan Crha - 42.2-2 +- Add patch for crash under gs_flatpak_refine_app_unlocked() + * Mon May 30 2022 Milan Crha - 42.2-1 - Update to 42.2 - Add patch to correct order of the setup of the GsShell From 12bf40ffd463ece4f34c72f15a03011381b692f0 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 13 Jun 2022 14:43:28 +0200 Subject: [PATCH 025/138] Add patch for crash under gs_flatpak_refine_app_unlocked() --- ...under-gs-flatpak-refine-app-unlocked.patch | 386 ++++++++++++++++++ gnome-software.spec | 6 +- 2 files changed, 391 insertions(+), 1 deletion(-) create mode 100644 0003-crash-under-gs-flatpak-refine-app-unlocked.patch diff --git a/0003-crash-under-gs-flatpak-refine-app-unlocked.patch b/0003-crash-under-gs-flatpak-refine-app-unlocked.patch new file mode 100644 index 0000000..701e7ef --- /dev/null +++ b/0003-crash-under-gs-flatpak-refine-app-unlocked.patch @@ -0,0 +1,386 @@ +diff -up gnome-software-42.2/lib/gs-appstream.c.3 gnome-software-42.2/lib/gs-appstream.c +--- gnome-software-42.2/lib/gs-appstream.c.3 2022-06-13 14:34:05.477145977 +0200 ++++ gnome-software-42.2/lib/gs-appstream.c 2022-06-13 14:36:26.640218337 +0200 +@@ -20,7 +20,13 @@ GsApp * + gs_appstream_create_app (GsPlugin *plugin, XbSilo *silo, XbNode *component, GError **error) + { + GsApp *app; +- g_autoptr(GsApp) app_new = gs_app_new (NULL); ++ g_autoptr(GsApp) app_new = NULL; ++ ++ g_return_val_if_fail (GS_IS_PLUGIN (plugin), NULL); ++ g_return_val_if_fail (XB_IS_SILO (silo), NULL); ++ g_return_val_if_fail (XB_IS_NODE (component), NULL); ++ ++ app_new = gs_app_new (NULL); + + /* refine enough to get the unique ID */ + if (!gs_appstream_refine_app (plugin, app_new, silo, component, +@@ -967,6 +973,11 @@ gs_appstream_refine_app (GsPlugin *plugi + g_autoptr(GPtrArray) launchables = NULL; + g_autoptr(XbNode) req = NULL; + ++ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); ++ g_return_val_if_fail (GS_IS_APP (app), FALSE); ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (XB_IS_NODE (component), FALSE); ++ + /* is compatible */ + req = xb_node_query_first (component, + "requires/id[@type='id']" +@@ -1411,6 +1422,11 @@ gs_appstream_search (GsPlugin *plugin, + { AS_SEARCH_TOKEN_MATCH_NONE, NULL } + }; + ++ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (values != NULL, FALSE); ++ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); ++ + /* add some weighted queries */ + for (guint i = 0; queries[i].xpath != NULL; i++) { + g_autoptr(GError) error_query = NULL; +@@ -1487,6 +1503,11 @@ gs_appstream_add_category_apps (GsPlugin + { + GPtrArray *desktop_groups; + ++ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (GS_IS_CATEGORY (category), FALSE); ++ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); ++ + desktop_groups = gs_category_get_desktop_groups (category); + if (desktop_groups->len == 0) { + g_warning ("no desktop_groups for %s", gs_category_get_id (category)); +@@ -1577,6 +1598,9 @@ gs_appstream_add_categories (XbSilo *sil + GCancellable *cancellable, + GError **error) + { ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (list != NULL, FALSE); ++ + for (guint j = 0; j < list->len; j++) { + GsCategory *parent = GS_CATEGORY (g_ptr_array_index (list, j)); + GPtrArray *children = gs_category_get_children (parent); +@@ -1611,6 +1635,9 @@ gs_appstream_add_popular (XbSilo *silo, + g_autoptr(GError) error_local = NULL; + g_autoptr(GPtrArray) array = NULL; + ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); ++ + /* find out how many packages are in each category */ + array = xb_silo_query (silo, + "components/component/kudos/" +@@ -1648,6 +1675,10 @@ gs_appstream_add_recent (GsPlugin *plugi + g_autoptr(GError) error_local = NULL; + g_autoptr(GPtrArray) array = NULL; + ++ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); ++ + /* use predicate conditions to the max */ + xpath = g_strdup_printf ("components/component/releases/" + "release[@timestamp>%" G_GUINT64_FORMAT "]/../..", +@@ -1686,6 +1717,10 @@ gs_appstream_add_alternates (XbSilo *sil + g_autoptr(GPtrArray) ids = NULL; + g_autoptr(GString) xpath = g_string_new (NULL); + ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (GS_IS_APP (app), FALSE); ++ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); ++ + /* probably a package we know nothing about */ + if (gs_app_get_id (app) == NULL) + return TRUE; +@@ -1743,6 +1778,9 @@ gs_appstream_add_featured (XbSilo *silo, + g_autoptr(GError) error_local = NULL; + g_autoptr(GPtrArray) array = NULL; + ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); ++ + /* find out how many packages are in each category */ + array = xb_silo_query (silo, + "components/component/custom/value[@key='GnomeSoftware::FeatureTile']/../..|" +@@ -1782,6 +1820,11 @@ gs_appstream_url_to_app (GsPlugin *plugi + g_autofree gchar *xpath = NULL; + g_autoptr(GPtrArray) components = NULL; + ++ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); ++ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); ++ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); ++ g_return_val_if_fail (url != NULL, FALSE); ++ + /* not us */ + scheme = gs_utils_get_url_scheme (url); + if (g_strcmp0 (scheme, "appstream") != 0) +@@ -1812,6 +1855,9 @@ gs_appstream_component_add_keyword (XbBu + g_autoptr(XbBuilderNode) keyword = NULL; + g_autoptr(XbBuilderNode) keywords = NULL; + ++ g_return_if_fail (XB_IS_BUILDER_NODE (component)); ++ g_return_if_fail (str != NULL); ++ + /* create if it does not already exist */ + keywords = xb_builder_node_get_child (component, "keywords", NULL); + if (keywords == NULL) +@@ -1831,6 +1877,9 @@ gs_appstream_component_add_provide (XbBu + g_autoptr(XbBuilderNode) provide = NULL; + g_autoptr(XbBuilderNode) provides = NULL; + ++ g_return_if_fail (XB_IS_BUILDER_NODE (component)); ++ g_return_if_fail (str != NULL); ++ + /* create if it does not already exist */ + provides = xb_builder_node_get_child (component, "provides", NULL); + if (provides == NULL) +@@ -1850,6 +1899,9 @@ gs_appstream_component_add_category (XbB + g_autoptr(XbBuilderNode) category = NULL; + g_autoptr(XbBuilderNode) categories = NULL; + ++ g_return_if_fail (XB_IS_BUILDER_NODE (component)); ++ g_return_if_fail (str != NULL); ++ + /* create if it does not already exist */ + categories = xb_builder_node_get_child (component, "categories", NULL); + if (categories == NULL) +@@ -1868,6 +1920,9 @@ gs_appstream_component_add_icon (XbBuild + { + g_autoptr(XbBuilderNode) icon = NULL; + ++ g_return_if_fail (XB_IS_BUILDER_NODE (component)); ++ g_return_if_fail (str != NULL); ++ + /* create str if it does not already exist */ + icon = xb_builder_node_get_child (component, "icon", NULL); + if (icon == NULL) { +@@ -1881,7 +1936,11 @@ gs_appstream_component_add_icon (XbBuild + void + gs_appstream_component_add_extra_info (XbBuilderNode *component) + { +- const gchar *kind = xb_builder_node_get_attr (component, "type"); ++ const gchar *kind; ++ ++ g_return_if_fail (XB_IS_BUILDER_NODE (component)); ++ ++ kind = xb_builder_node_get_attr (component, "type"); + + /* add the gnome-software-specific 'Addon' group and ensure they + * all have an icon set */ +@@ -1927,9 +1986,14 @@ gs_appstream_component_add_extra_info (X + void + gs_appstream_component_fix_url (XbBuilderNode *component, const gchar *baseurl) + { +- const gchar *text = xb_builder_node_get_text (component); ++ const gchar *text; + g_autofree gchar *url = NULL; + ++ g_return_if_fail (XB_IS_BUILDER_NODE (component)); ++ g_return_if_fail (baseurl != NULL); ++ ++ text = xb_builder_node_get_text (component); ++ + if (text == NULL) + return; + +diff -up gnome-software-42.2/plugins/flatpak/gs-flatpak.c.3 gnome-software-42.2/plugins/flatpak/gs-flatpak.c +--- gnome-software-42.2/plugins/flatpak/gs-flatpak.c.3 2022-05-30 13:43:00.000000000 +0200 ++++ gnome-software-42.2/plugins/flatpak/gs-flatpak.c 2022-06-13 14:34:05.480145978 +0200 +@@ -467,10 +467,18 @@ gs_flatpak_create_source (GsFlatpak *sel + } + + static void ++gs_flatpak_invalidate_silo (GsFlatpak *self) ++{ ++ g_rw_lock_writer_lock (&self->silo_lock); ++ if (self->silo != NULL) ++ xb_silo_invalidate (self->silo); ++ g_rw_lock_writer_unlock (&self->silo_lock); ++} ++ ++static void + gs_flatpak_internal_data_changed (GsFlatpak *self) + { + g_autoptr(GMutexLocker) locker = NULL; +- g_autoptr(GRWLockWriterLocker) writer_locker = NULL; + + /* drop the installed refs cache */ + locker = g_mutex_locker_new (&self->installed_refs_mutex); +@@ -487,10 +495,7 @@ gs_flatpak_internal_data_changed (GsFlat + g_hash_table_remove_all (self->broken_remotes); + g_clear_pointer (&locker, g_mutex_locker_free); + +- writer_locker = g_rw_lock_writer_locker_new (&self->silo_lock); +- if (self->silo) +- xb_silo_invalidate (self->silo); +- g_clear_pointer (&writer_locker, g_rw_lock_writer_locker_free); ++ gs_flatpak_invalidate_silo (self); + + self->requires_full_rescan = TRUE; + } +@@ -2009,10 +2014,7 @@ gs_flatpak_refresh (GsFlatpak *self, + g_mutex_unlock (&self->installed_refs_mutex); + + /* manually do this in case we created the first appstream file */ +- g_rw_lock_reader_lock (&self->silo_lock); +- if (self->silo != NULL) +- xb_silo_invalidate (self->silo); +- g_rw_lock_reader_unlock (&self->silo_lock); ++ gs_flatpak_invalidate_silo (self); + + /* update AppStream metadata */ + if (!gs_flatpak_refresh_appstream (self, cache_age_secs, interactive, cancellable, error)) +@@ -3197,6 +3199,20 @@ gs_flatpak_refine_app_unlocked (GsFlatpa + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); + ++ if (self->silo == NULL) { ++ g_clear_pointer (&locker, g_rw_lock_reader_locker_free); ++ if (!gs_flatpak_rescan_appstream_store (self, interactive, cancellable, error)) ++ return FALSE; ++ ++ locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } ++ } ++ + /* always do AppStream properties */ + if (!gs_flatpak_refine_appstream (self, app, self->silo, flags, interactive, cancellable, error)) + return FALSE; +@@ -3394,6 +3410,13 @@ gs_flatpak_refine_wildcard (GsFlatpak *s + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); + ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } ++ + /* find all apps when matching any prefixes */ + xpath = g_strdup_printf ("components/component/id[text()='%s']/..", id); + components = xb_silo_query (self->silo, xpath, 0, &error_local); +@@ -3487,10 +3510,7 @@ gs_flatpak_app_remove_source (GsFlatpak + } + + /* invalidate cache */ +- g_rw_lock_reader_lock (&self->silo_lock); +- if (self->silo != NULL) +- xb_silo_invalidate (self->silo); +- g_rw_lock_reader_unlock (&self->silo_lock); ++ gs_flatpak_invalidate_silo (self); + + gs_app_set_state (app, is_remove ? GS_APP_STATE_UNAVAILABLE : GS_APP_STATE_AVAILABLE); + +@@ -3953,6 +3973,13 @@ gs_flatpak_search (GsFlatpak *self, + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } ++ + if (!gs_appstream_search (self->plugin, self->silo, values, list_tmp, + cancellable, error)) + return FALSE; +@@ -4022,6 +4049,12 @@ gs_flatpak_add_category_apps (GsFlatpak + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } + return gs_appstream_add_category_apps (self->plugin, self->silo, + category, list, + cancellable, error); +@@ -4040,6 +4073,12 @@ gs_flatpak_add_categories (GsFlatpak *se + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } + return gs_appstream_add_categories (self->silo, + list, cancellable, error); + } +@@ -4058,6 +4097,12 @@ gs_flatpak_add_popular (GsFlatpak *self, + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } + if (!gs_appstream_add_popular (self->silo, list_tmp, + cancellable, error)) + return FALSE; +@@ -4081,6 +4126,12 @@ gs_flatpak_add_featured (GsFlatpak *self + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } + if (!gs_appstream_add_featured (self->silo, list_tmp, + cancellable, error)) + return FALSE; +@@ -4105,6 +4156,12 @@ gs_flatpak_add_alternates (GsFlatpak *se + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } + if (!gs_appstream_add_alternates (self->silo, app, list_tmp, + cancellable, error)) + return FALSE; +@@ -4129,6 +4186,12 @@ gs_flatpak_add_recent (GsFlatpak *self, + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } + if (!gs_appstream_add_recent (self->plugin, self->silo, list_tmp, age, + cancellable, error)) + return FALSE; +@@ -4154,6 +4217,12 @@ gs_flatpak_url_to_app (GsFlatpak *self, + return FALSE; + + locker = g_rw_lock_reader_locker_new (&self->silo_lock); ++ if (self->silo == NULL) { ++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "failed to setup XbSilo for '%s'", ++ gs_flatpak_get_id (self)); ++ return FALSE; ++ } + if (!gs_appstream_url_to_app (self->plugin, self->silo, list_tmp, url, cancellable, error)) + return FALSE; + diff --git a/gnome-software.spec b/gnome-software.spec index 6a48ea0..bf739c7 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -16,7 +16,7 @@ Name: gnome-software Version: 42.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -25,6 +25,7 @@ Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarbal Patch01: 0001-crash-with-broken-theme.patch Patch02: 0002-shell-setup-order.patch +Patch03: 0003-crash-under-gs-flatpak-refine-app-unlocked.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -199,6 +200,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Mon Jun 13 2022 Milan Crha - 42.2-2 +- Add patch for crash under gs_flatpak_refine_app_unlocked() + * Mon May 30 2022 Milan Crha - 42.2-1 - Update to 42.2 - Add patch to correct order of the setup of the GsShell From 1e2c0b7474885bf58b1e63ba6373ee9ad3f6e47f Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 16 Jun 2022 11:18:32 +0100 Subject: [PATCH 026/138] Filter private libraries from Provides --- gnome-software.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnome-software.spec b/gnome-software.spec index e2ed0ec..102f7d1 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -14,9 +14,11 @@ %global tarball_version %%(echo %{version} | tr '~' '.') +%global __provides_exclude_from ^%{_libdir}/%{name}/plugins-%{gs_plugin_version}/.*\\.so.*$ + Name: gnome-software Version: 42.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -200,6 +202,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Thu Jun 16 2022 David King - 42.2-3 +- Filter private libraries from Provides + * Mon Jun 13 2022 Milan Crha - 42.2-2 - Add patch for crash under gs_flatpak_refine_app_unlocked() From d2c0a6431e436b98dc9bbad79e0487e6e34b4c62 Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 16 Jun 2022 11:28:31 +0100 Subject: [PATCH 027/138] Use pkgconfig for BuildRequires https://fedoraproject.org/wiki/Packaging:PkgConfigBuildRequires --- gnome-software.spec | 61 +++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/gnome-software.spec b/gnome-software.spec index 102f7d1..45d45ed 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -1,13 +1,13 @@ %global appstream_version 0.14.0 -%global libadwaita_version 1.0.1 -%global libxmlb_version 0.1.7 +%global flatpak_version 1.5.1 +%global fwupd_version 1.3.3 %global glib2_version 2.61.1 %global gtk4_version 4.4.0 %global json_glib_version 1.2.0 +%global libadwaita_version 1.0.1 %global libsoup_version 2.52.0 +%global libxmlb_version 0.1.7 %global packagekit_version 1.1.1 -%global fwupd_version 1.3.3 -%global flatpak_version 1.5.1 # this is not a library version %define gs_plugin_version 18 @@ -29,36 +29,36 @@ Patch01: 0001-crash-with-broken-theme.patch Patch02: 0002-shell-setup-order.patch Patch03: 0003-crash-under-gs-flatpak-refine-app-unlocked.patch -BuildRequires: appstream-devel >= %{appstream_version} -BuildRequires: gcc -BuildRequires: gettext -BuildRequires: libxslt BuildRequires: docbook-style-xsl BuildRequires: desktop-file-utils -BuildRequires: fwupd-devel >= %{fwupd_version} -BuildRequires: glib2-devel >= %{glib2_version} -BuildRequires: gnome-online-accounts-devel -BuildRequires: gsettings-desktop-schemas-devel -BuildRequires: gspell-devel -BuildRequires: pkgconfig(gtk4) >= %{gtk4_version} +BuildRequires: gcc +BuildRequires: gettext BuildRequires: gtk-doc -BuildRequires: json-glib-devel >= %{json_glib_version} -BuildRequires: libdnf-devel -BuildRequires: pkgconfig(libadwaita-1) >= %{libadwaita_version} -BuildRequires: libsoup-devel -BuildRequires: libxmlb-devel >= %{libxmlb_version} -BuildRequires: malcontent-devel -BuildRequires: malcontent-ui-devel +BuildRequires: libxslt BuildRequires: meson -BuildRequires: PackageKit-glib-devel >= %{packagekit_version} -BuildRequires: polkit-devel -BuildRequires: flatpak-devel >= %{flatpak_version} -BuildRequires: ostree-devel -BuildRequires: rpm-devel -BuildRequires: rpm-ostree-devel -BuildRequires: libgudev1-devel -BuildRequires: sysprof-capture-devel -BuildRequires: valgrind-devel +BuildRequires: pkgconfig(appstream) >= %{appstream_version} +BuildRequires: pkgconfig(flatpak) >= %{flatpak_version} +BuildRequires: pkgconfig(fwupd) >= %{fwupd_version} +BuildRequires: pkgconfig(gdk-pixbuf-2.0) +BuildRequires: pkgconfig(gio-unix-2.0) >= %{glib2_version} +BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} +BuildRequires: pkgconfig(gmodule-2.0) >= %{glib2_version} +BuildRequires: pkgconfig(gsettings-desktop-schemas) +BuildRequires: pkgconfig(gtk4) >= %{gtk4_version} +BuildRequires: pkgconfig(gudev-1.0) +BuildRequires: pkgconfig(json-glib-1.0) >= %{json_glib_version} +BuildRequires: pkgconfig(libadwaita-1) >= %{libadwaita_version} +BuildRequires: pkgconfig(libdnf) +BuildRequires: pkgconfig(libsoup-2.4) +BuildRequires: pkgconfig(malcontent-0) +BuildRequires: pkgconfig(ostree-1) +BuildRequires: pkgconfig(packagekit-glib2) >= %{packagekit_version} +BuildRequires: pkgconfig(polkit-gobject-1) +BuildRequires: pkgconfig(rpm) +BuildRequires: pkgconfig(rpm-ostree-1) +BuildRequires: pkgconfig(sysprof-capture-4) +BuildRequires: pkgconfig(valgrind) +BuildRequires: pkgconfig(xmlb) >= %{libxmlb_version} Requires: appstream-data Requires: appstream%{?_isa} >= %{appstream_version} @@ -204,6 +204,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %changelog * Thu Jun 16 2022 David King - 42.2-3 - Filter private libraries from Provides +- Use pkgconfig for BuildRequires * Mon Jun 13 2022 Milan Crha - 42.2-2 - Add patch for crash under gs_flatpak_refine_app_unlocked() From 597c207c2d9b64f849c54605dd74e720ab277e50 Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 16 Jun 2022 11:44:26 +0100 Subject: [PATCH 028/138] Improve directory ownership --- gnome-software.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gnome-software.spec b/gnome-software.spec index 45d45ed..ceee634 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -153,7 +153,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_bindir}/gnome-software %{_datadir}/applications/gnome-software-local-file.desktop %{_datadir}/applications/org.gnome.Software.desktop -%{_mandir}/man1/gnome-software.1.gz +%{_mandir}/man1/gnome-software.1* %{_datadir}/icons/hicolor/*/apps/org.gnome.Software.svg %{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Software-symbolic.svg %{_datadir}/icons/hicolor/scalable/actions/app-remove-symbolic.svg @@ -181,6 +181,8 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_repos.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_rewrite-resource.so %{_sysconfdir}/xdg/autostart/org.gnome.Software.desktop +%dir %{_datadir}/swcatalog +%dir %{_datadir}/swcatalog/xml %{_datadir}/swcatalog/xml/org.gnome.Software.Featured.xml %{_datadir}/swcatalog/xml/org.gnome.Software.Popular.xml %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service @@ -199,12 +201,15 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %dir %{_includedir}/gnome-software %{_includedir}/gnome-software/*.h %{_libdir}/gnome-software/libgnomesoftware.so -%{_datadir}/gtk-doc/html/gnome-software +%dir %{_datadir}/gtk-doc +%dir %{_datadir}/gtk-doc/html +%{_datadir}/gtk-doc/html/gnome-software/ %changelog * Thu Jun 16 2022 David King - 42.2-3 - Filter private libraries from Provides - Use pkgconfig for BuildRequires +- Improve directory onwership * Mon Jun 13 2022 Milan Crha - 42.2-2 - Add patch for crash under gs_flatpak_refine_app_unlocked() From 5d7e2fdfe9b89c9071c4c6603fb4bcb3b6ac2f3b Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 17 Jun 2022 13:08:37 +0100 Subject: [PATCH 029/138] Add patch to make fwupd user requests work --- 0018-fwupd-Fix-the-user-action-dialogs.patch | 46 ++++++++++++++++++++ gnome-software.spec | 6 ++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 0018-fwupd-Fix-the-user-action-dialogs.patch diff --git a/0018-fwupd-Fix-the-user-action-dialogs.patch b/0018-fwupd-Fix-the-user-action-dialogs.patch new file mode 100644 index 0000000..e45e21e --- /dev/null +++ b/0018-fwupd-Fix-the-user-action-dialogs.patch @@ -0,0 +1,46 @@ +From 9aba963f2274e929658b632d6f6ce9c73ee83156 Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Tue, 14 Jun 2022 13:04:31 +0100 +Subject: [PATCH 18/18] fwupd: Fix the user action dialogs + +When gnome-software was ported from appstream-glib to libappstream we +missed that the locale arguments are now swapped -- i.e. the former +specified "locale, value" and the latter specified "value, locale". + +This fixes installing software on any devices that require some kind of +user-prompting to complete the update, e.g. buttons that need pressing +or cables that need replugging. +--- + plugins/fwupd/gs-fwupd-app.c | 2 +- + plugins/fwupd/gs-plugin-fwupd.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c +index 03103a3e9..7fcbdadab 100644 +--- a/plugins/fwupd/gs-fwupd-app.c ++++ b/plugins/fwupd/gs-fwupd-app.c +@@ -283,7 +283,7 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel) + as_screenshot_set_kind (ss, AS_SCREENSHOT_KIND_DEFAULT); + as_screenshot_add_image (ss, im); + if (fwupd_release_get_detach_caption (rel) != NULL) +- as_screenshot_set_caption (ss, NULL, fwupd_release_get_detach_caption (rel)); ++ as_screenshot_set_caption (ss, fwupd_release_get_detach_caption (rel), NULL); + gs_app_set_action_screenshot (app, ss); + } + } +diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c +index cac6a324a..3171eb96d 100644 +--- a/plugins/fwupd/gs-plugin-fwupd.c ++++ b/plugins/fwupd/gs-plugin-fwupd.c +@@ -945,7 +945,7 @@ gs_plugin_fwupd_install (GsPluginFwupd *self, + + /* caption is required */ + as_screenshot_set_kind (ss, AS_SCREENSHOT_KIND_DEFAULT); +- as_screenshot_set_caption (ss, NULL, fwupd_device_get_update_message (dev)); ++ as_screenshot_set_caption (ss, fwupd_device_get_update_message (dev), NULL); + gs_app_set_action_screenshot (app, ss); + + /* require the dialog */ +-- +2.36.1 + diff --git a/gnome-software.spec b/gnome-software.spec index ceee634..57180c7 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -18,7 +18,7 @@ Name: gnome-software Version: 42.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -28,6 +28,7 @@ Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarbal Patch01: 0001-crash-with-broken-theme.patch Patch02: 0002-shell-setup-order.patch Patch03: 0003-crash-under-gs-flatpak-refine-app-unlocked.patch +Patch04: 0018-fwupd-Fix-the-user-action-dialogs.patch BuildRequires: docbook-style-xsl BuildRequires: desktop-file-utils @@ -206,6 +207,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Fri Jun 17 2022 Richard Hughes - 42.2-4 +- Add patch to make fwupd user requests work + * Thu Jun 16 2022 David King - 42.2-3 - Filter private libraries from Provides - Use pkgconfig for BuildRequires From 743d8dfcf13390d96f0f94c499985e57a9e08b23 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 17 Jun 2022 13:08:37 +0100 Subject: [PATCH 030/138] Add patch to make fwupd user requests work --- 0018-fwupd-Fix-the-user-action-dialogs.patch | 46 ++++++++++++++++++++ gnome-software.spec | 6 ++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 0018-fwupd-Fix-the-user-action-dialogs.patch diff --git a/0018-fwupd-Fix-the-user-action-dialogs.patch b/0018-fwupd-Fix-the-user-action-dialogs.patch new file mode 100644 index 0000000..e45e21e --- /dev/null +++ b/0018-fwupd-Fix-the-user-action-dialogs.patch @@ -0,0 +1,46 @@ +From 9aba963f2274e929658b632d6f6ce9c73ee83156 Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Tue, 14 Jun 2022 13:04:31 +0100 +Subject: [PATCH 18/18] fwupd: Fix the user action dialogs + +When gnome-software was ported from appstream-glib to libappstream we +missed that the locale arguments are now swapped -- i.e. the former +specified "locale, value" and the latter specified "value, locale". + +This fixes installing software on any devices that require some kind of +user-prompting to complete the update, e.g. buttons that need pressing +or cables that need replugging. +--- + plugins/fwupd/gs-fwupd-app.c | 2 +- + plugins/fwupd/gs-plugin-fwupd.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c +index 03103a3e9..7fcbdadab 100644 +--- a/plugins/fwupd/gs-fwupd-app.c ++++ b/plugins/fwupd/gs-fwupd-app.c +@@ -283,7 +283,7 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel) + as_screenshot_set_kind (ss, AS_SCREENSHOT_KIND_DEFAULT); + as_screenshot_add_image (ss, im); + if (fwupd_release_get_detach_caption (rel) != NULL) +- as_screenshot_set_caption (ss, NULL, fwupd_release_get_detach_caption (rel)); ++ as_screenshot_set_caption (ss, fwupd_release_get_detach_caption (rel), NULL); + gs_app_set_action_screenshot (app, ss); + } + } +diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c +index cac6a324a..3171eb96d 100644 +--- a/plugins/fwupd/gs-plugin-fwupd.c ++++ b/plugins/fwupd/gs-plugin-fwupd.c +@@ -945,7 +945,7 @@ gs_plugin_fwupd_install (GsPluginFwupd *self, + + /* caption is required */ + as_screenshot_set_kind (ss, AS_SCREENSHOT_KIND_DEFAULT); +- as_screenshot_set_caption (ss, NULL, fwupd_device_get_update_message (dev)); ++ as_screenshot_set_caption (ss, fwupd_device_get_update_message (dev), NULL); + gs_app_set_action_screenshot (app, ss); + + /* require the dialog */ +-- +2.36.1 + diff --git a/gnome-software.spec b/gnome-software.spec index bf739c7..2714eaf 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -16,7 +16,7 @@ Name: gnome-software Version: 42.2 -Release: 2%{?dist} +Release: 4%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -26,6 +26,7 @@ Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarbal Patch01: 0001-crash-with-broken-theme.patch Patch02: 0002-shell-setup-order.patch Patch03: 0003-crash-under-gs-flatpak-refine-app-unlocked.patch +Patch04: 0018-fwupd-Fix-the-user-action-dialogs.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -200,6 +201,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Fri Jun 17 2022 Richard Hughes - 42.2-4 +- Add patch to make fwupd user requests work + * Mon Jun 13 2022 Milan Crha - 42.2-2 - Add patch for crash under gs_flatpak_refine_app_unlocked() From 67f34b01da5ae889ba168ee1dfee36ed433bf24a Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 1 Jul 2022 12:08:45 +0200 Subject: [PATCH 031/138] Update to 42.3 --- ...under-gs-flatpak-refine-app-unlocked.patch | 386 ------------------ 0018-fwupd-Fix-the-user-action-dialogs.patch | 46 --- gnome-software.spec | 9 +- sources | 2 +- 4 files changed, 6 insertions(+), 437 deletions(-) delete mode 100644 0003-crash-under-gs-flatpak-refine-app-unlocked.patch delete mode 100644 0018-fwupd-Fix-the-user-action-dialogs.patch diff --git a/0003-crash-under-gs-flatpak-refine-app-unlocked.patch b/0003-crash-under-gs-flatpak-refine-app-unlocked.patch deleted file mode 100644 index 701e7ef..0000000 --- a/0003-crash-under-gs-flatpak-refine-app-unlocked.patch +++ /dev/null @@ -1,386 +0,0 @@ -diff -up gnome-software-42.2/lib/gs-appstream.c.3 gnome-software-42.2/lib/gs-appstream.c ---- gnome-software-42.2/lib/gs-appstream.c.3 2022-06-13 14:34:05.477145977 +0200 -+++ gnome-software-42.2/lib/gs-appstream.c 2022-06-13 14:36:26.640218337 +0200 -@@ -20,7 +20,13 @@ GsApp * - gs_appstream_create_app (GsPlugin *plugin, XbSilo *silo, XbNode *component, GError **error) - { - GsApp *app; -- g_autoptr(GsApp) app_new = gs_app_new (NULL); -+ g_autoptr(GsApp) app_new = NULL; -+ -+ g_return_val_if_fail (GS_IS_PLUGIN (plugin), NULL); -+ g_return_val_if_fail (XB_IS_SILO (silo), NULL); -+ g_return_val_if_fail (XB_IS_NODE (component), NULL); -+ -+ app_new = gs_app_new (NULL); - - /* refine enough to get the unique ID */ - if (!gs_appstream_refine_app (plugin, app_new, silo, component, -@@ -967,6 +973,11 @@ gs_appstream_refine_app (GsPlugin *plugi - g_autoptr(GPtrArray) launchables = NULL; - g_autoptr(XbNode) req = NULL; - -+ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); -+ g_return_val_if_fail (GS_IS_APP (app), FALSE); -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (XB_IS_NODE (component), FALSE); -+ - /* is compatible */ - req = xb_node_query_first (component, - "requires/id[@type='id']" -@@ -1411,6 +1422,11 @@ gs_appstream_search (GsPlugin *plugin, - { AS_SEARCH_TOKEN_MATCH_NONE, NULL } - }; - -+ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (values != NULL, FALSE); -+ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); -+ - /* add some weighted queries */ - for (guint i = 0; queries[i].xpath != NULL; i++) { - g_autoptr(GError) error_query = NULL; -@@ -1487,6 +1503,11 @@ gs_appstream_add_category_apps (GsPlugin - { - GPtrArray *desktop_groups; - -+ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (GS_IS_CATEGORY (category), FALSE); -+ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); -+ - desktop_groups = gs_category_get_desktop_groups (category); - if (desktop_groups->len == 0) { - g_warning ("no desktop_groups for %s", gs_category_get_id (category)); -@@ -1577,6 +1598,9 @@ gs_appstream_add_categories (XbSilo *sil - GCancellable *cancellable, - GError **error) - { -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (list != NULL, FALSE); -+ - for (guint j = 0; j < list->len; j++) { - GsCategory *parent = GS_CATEGORY (g_ptr_array_index (list, j)); - GPtrArray *children = gs_category_get_children (parent); -@@ -1611,6 +1635,9 @@ gs_appstream_add_popular (XbSilo *silo, - g_autoptr(GError) error_local = NULL; - g_autoptr(GPtrArray) array = NULL; - -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); -+ - /* find out how many packages are in each category */ - array = xb_silo_query (silo, - "components/component/kudos/" -@@ -1648,6 +1675,10 @@ gs_appstream_add_recent (GsPlugin *plugi - g_autoptr(GError) error_local = NULL; - g_autoptr(GPtrArray) array = NULL; - -+ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); -+ - /* use predicate conditions to the max */ - xpath = g_strdup_printf ("components/component/releases/" - "release[@timestamp>%" G_GUINT64_FORMAT "]/../..", -@@ -1686,6 +1717,10 @@ gs_appstream_add_alternates (XbSilo *sil - g_autoptr(GPtrArray) ids = NULL; - g_autoptr(GString) xpath = g_string_new (NULL); - -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (GS_IS_APP (app), FALSE); -+ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); -+ - /* probably a package we know nothing about */ - if (gs_app_get_id (app) == NULL) - return TRUE; -@@ -1743,6 +1778,9 @@ gs_appstream_add_featured (XbSilo *silo, - g_autoptr(GError) error_local = NULL; - g_autoptr(GPtrArray) array = NULL; - -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); -+ - /* find out how many packages are in each category */ - array = xb_silo_query (silo, - "components/component/custom/value[@key='GnomeSoftware::FeatureTile']/../..|" -@@ -1782,6 +1820,11 @@ gs_appstream_url_to_app (GsPlugin *plugi - g_autofree gchar *xpath = NULL; - g_autoptr(GPtrArray) components = NULL; - -+ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); -+ g_return_val_if_fail (url != NULL, FALSE); -+ - /* not us */ - scheme = gs_utils_get_url_scheme (url); - if (g_strcmp0 (scheme, "appstream") != 0) -@@ -1812,6 +1855,9 @@ gs_appstream_component_add_keyword (XbBu - g_autoptr(XbBuilderNode) keyword = NULL; - g_autoptr(XbBuilderNode) keywords = NULL; - -+ g_return_if_fail (XB_IS_BUILDER_NODE (component)); -+ g_return_if_fail (str != NULL); -+ - /* create if it does not already exist */ - keywords = xb_builder_node_get_child (component, "keywords", NULL); - if (keywords == NULL) -@@ -1831,6 +1877,9 @@ gs_appstream_component_add_provide (XbBu - g_autoptr(XbBuilderNode) provide = NULL; - g_autoptr(XbBuilderNode) provides = NULL; - -+ g_return_if_fail (XB_IS_BUILDER_NODE (component)); -+ g_return_if_fail (str != NULL); -+ - /* create if it does not already exist */ - provides = xb_builder_node_get_child (component, "provides", NULL); - if (provides == NULL) -@@ -1850,6 +1899,9 @@ gs_appstream_component_add_category (XbB - g_autoptr(XbBuilderNode) category = NULL; - g_autoptr(XbBuilderNode) categories = NULL; - -+ g_return_if_fail (XB_IS_BUILDER_NODE (component)); -+ g_return_if_fail (str != NULL); -+ - /* create if it does not already exist */ - categories = xb_builder_node_get_child (component, "categories", NULL); - if (categories == NULL) -@@ -1868,6 +1920,9 @@ gs_appstream_component_add_icon (XbBuild - { - g_autoptr(XbBuilderNode) icon = NULL; - -+ g_return_if_fail (XB_IS_BUILDER_NODE (component)); -+ g_return_if_fail (str != NULL); -+ - /* create str if it does not already exist */ - icon = xb_builder_node_get_child (component, "icon", NULL); - if (icon == NULL) { -@@ -1881,7 +1936,11 @@ gs_appstream_component_add_icon (XbBuild - void - gs_appstream_component_add_extra_info (XbBuilderNode *component) - { -- const gchar *kind = xb_builder_node_get_attr (component, "type"); -+ const gchar *kind; -+ -+ g_return_if_fail (XB_IS_BUILDER_NODE (component)); -+ -+ kind = xb_builder_node_get_attr (component, "type"); - - /* add the gnome-software-specific 'Addon' group and ensure they - * all have an icon set */ -@@ -1927,9 +1986,14 @@ gs_appstream_component_add_extra_info (X - void - gs_appstream_component_fix_url (XbBuilderNode *component, const gchar *baseurl) - { -- const gchar *text = xb_builder_node_get_text (component); -+ const gchar *text; - g_autofree gchar *url = NULL; - -+ g_return_if_fail (XB_IS_BUILDER_NODE (component)); -+ g_return_if_fail (baseurl != NULL); -+ -+ text = xb_builder_node_get_text (component); -+ - if (text == NULL) - return; - -diff -up gnome-software-42.2/plugins/flatpak/gs-flatpak.c.3 gnome-software-42.2/plugins/flatpak/gs-flatpak.c ---- gnome-software-42.2/plugins/flatpak/gs-flatpak.c.3 2022-05-30 13:43:00.000000000 +0200 -+++ gnome-software-42.2/plugins/flatpak/gs-flatpak.c 2022-06-13 14:34:05.480145978 +0200 -@@ -467,10 +467,18 @@ gs_flatpak_create_source (GsFlatpak *sel - } - - static void -+gs_flatpak_invalidate_silo (GsFlatpak *self) -+{ -+ g_rw_lock_writer_lock (&self->silo_lock); -+ if (self->silo != NULL) -+ xb_silo_invalidate (self->silo); -+ g_rw_lock_writer_unlock (&self->silo_lock); -+} -+ -+static void - gs_flatpak_internal_data_changed (GsFlatpak *self) - { - g_autoptr(GMutexLocker) locker = NULL; -- g_autoptr(GRWLockWriterLocker) writer_locker = NULL; - - /* drop the installed refs cache */ - locker = g_mutex_locker_new (&self->installed_refs_mutex); -@@ -487,10 +495,7 @@ gs_flatpak_internal_data_changed (GsFlat - g_hash_table_remove_all (self->broken_remotes); - g_clear_pointer (&locker, g_mutex_locker_free); - -- writer_locker = g_rw_lock_writer_locker_new (&self->silo_lock); -- if (self->silo) -- xb_silo_invalidate (self->silo); -- g_clear_pointer (&writer_locker, g_rw_lock_writer_locker_free); -+ gs_flatpak_invalidate_silo (self); - - self->requires_full_rescan = TRUE; - } -@@ -2009,10 +2014,7 @@ gs_flatpak_refresh (GsFlatpak *self, - g_mutex_unlock (&self->installed_refs_mutex); - - /* manually do this in case we created the first appstream file */ -- g_rw_lock_reader_lock (&self->silo_lock); -- if (self->silo != NULL) -- xb_silo_invalidate (self->silo); -- g_rw_lock_reader_unlock (&self->silo_lock); -+ gs_flatpak_invalidate_silo (self); - - /* update AppStream metadata */ - if (!gs_flatpak_refresh_appstream (self, cache_age_secs, interactive, cancellable, error)) -@@ -3197,6 +3199,20 @@ gs_flatpak_refine_app_unlocked (GsFlatpa - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); - -+ if (self->silo == NULL) { -+ g_clear_pointer (&locker, g_rw_lock_reader_locker_free); -+ if (!gs_flatpak_rescan_appstream_store (self, interactive, cancellable, error)) -+ return FALSE; -+ -+ locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } -+ } -+ - /* always do AppStream properties */ - if (!gs_flatpak_refine_appstream (self, app, self->silo, flags, interactive, cancellable, error)) - return FALSE; -@@ -3394,6 +3410,13 @@ gs_flatpak_refine_wildcard (GsFlatpak *s - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); - -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } -+ - /* find all apps when matching any prefixes */ - xpath = g_strdup_printf ("components/component/id[text()='%s']/..", id); - components = xb_silo_query (self->silo, xpath, 0, &error_local); -@@ -3487,10 +3510,7 @@ gs_flatpak_app_remove_source (GsFlatpak - } - - /* invalidate cache */ -- g_rw_lock_reader_lock (&self->silo_lock); -- if (self->silo != NULL) -- xb_silo_invalidate (self->silo); -- g_rw_lock_reader_unlock (&self->silo_lock); -+ gs_flatpak_invalidate_silo (self); - - gs_app_set_state (app, is_remove ? GS_APP_STATE_UNAVAILABLE : GS_APP_STATE_AVAILABLE); - -@@ -3953,6 +3973,13 @@ gs_flatpak_search (GsFlatpak *self, - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } -+ - if (!gs_appstream_search (self->plugin, self->silo, values, list_tmp, - cancellable, error)) - return FALSE; -@@ -4022,6 +4049,12 @@ gs_flatpak_add_category_apps (GsFlatpak - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } - return gs_appstream_add_category_apps (self->plugin, self->silo, - category, list, - cancellable, error); -@@ -4040,6 +4073,12 @@ gs_flatpak_add_categories (GsFlatpak *se - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } - return gs_appstream_add_categories (self->silo, - list, cancellable, error); - } -@@ -4058,6 +4097,12 @@ gs_flatpak_add_popular (GsFlatpak *self, - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } - if (!gs_appstream_add_popular (self->silo, list_tmp, - cancellable, error)) - return FALSE; -@@ -4081,6 +4126,12 @@ gs_flatpak_add_featured (GsFlatpak *self - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } - if (!gs_appstream_add_featured (self->silo, list_tmp, - cancellable, error)) - return FALSE; -@@ -4105,6 +4156,12 @@ gs_flatpak_add_alternates (GsFlatpak *se - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } - if (!gs_appstream_add_alternates (self->silo, app, list_tmp, - cancellable, error)) - return FALSE; -@@ -4129,6 +4186,12 @@ gs_flatpak_add_recent (GsFlatpak *self, - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } - if (!gs_appstream_add_recent (self->plugin, self->silo, list_tmp, age, - cancellable, error)) - return FALSE; -@@ -4154,6 +4217,12 @@ gs_flatpak_url_to_app (GsFlatpak *self, - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } - if (!gs_appstream_url_to_app (self->plugin, self->silo, list_tmp, url, cancellable, error)) - return FALSE; - diff --git a/0018-fwupd-Fix-the-user-action-dialogs.patch b/0018-fwupd-Fix-the-user-action-dialogs.patch deleted file mode 100644 index e45e21e..0000000 --- a/0018-fwupd-Fix-the-user-action-dialogs.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 9aba963f2274e929658b632d6f6ce9c73ee83156 Mon Sep 17 00:00:00 2001 -From: Richard Hughes -Date: Tue, 14 Jun 2022 13:04:31 +0100 -Subject: [PATCH 18/18] fwupd: Fix the user action dialogs - -When gnome-software was ported from appstream-glib to libappstream we -missed that the locale arguments are now swapped -- i.e. the former -specified "locale, value" and the latter specified "value, locale". - -This fixes installing software on any devices that require some kind of -user-prompting to complete the update, e.g. buttons that need pressing -or cables that need replugging. ---- - plugins/fwupd/gs-fwupd-app.c | 2 +- - plugins/fwupd/gs-plugin-fwupd.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c -index 03103a3e9..7fcbdadab 100644 ---- a/plugins/fwupd/gs-fwupd-app.c -+++ b/plugins/fwupd/gs-fwupd-app.c -@@ -283,7 +283,7 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel) - as_screenshot_set_kind (ss, AS_SCREENSHOT_KIND_DEFAULT); - as_screenshot_add_image (ss, im); - if (fwupd_release_get_detach_caption (rel) != NULL) -- as_screenshot_set_caption (ss, NULL, fwupd_release_get_detach_caption (rel)); -+ as_screenshot_set_caption (ss, fwupd_release_get_detach_caption (rel), NULL); - gs_app_set_action_screenshot (app, ss); - } - } -diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c -index cac6a324a..3171eb96d 100644 ---- a/plugins/fwupd/gs-plugin-fwupd.c -+++ b/plugins/fwupd/gs-plugin-fwupd.c -@@ -945,7 +945,7 @@ gs_plugin_fwupd_install (GsPluginFwupd *self, - - /* caption is required */ - as_screenshot_set_kind (ss, AS_SCREENSHOT_KIND_DEFAULT); -- as_screenshot_set_caption (ss, NULL, fwupd_device_get_update_message (dev)); -+ as_screenshot_set_caption (ss, fwupd_device_get_update_message (dev), NULL); - gs_app_set_action_screenshot (app, ss); - - /* require the dialog */ --- -2.36.1 - diff --git a/gnome-software.spec b/gnome-software.spec index 2714eaf..8da324a 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -15,8 +15,8 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 42.2 -Release: 4%{?dist} +Version: 42.3 +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -25,8 +25,6 @@ Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarbal Patch01: 0001-crash-with-broken-theme.patch Patch02: 0002-shell-setup-order.patch -Patch03: 0003-crash-under-gs-flatpak-refine-app-unlocked.patch -Patch04: 0018-fwupd-Fix-the-user-action-dialogs.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -201,6 +199,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Fri Jul 01 2022 Milan Crha - 42.3-1 +- Update to 42.3 + * Fri Jun 17 2022 Richard Hughes - 42.2-4 - Add patch to make fwupd user requests work diff --git a/sources b/sources index fc682d9..cfb11ae 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-42.2.tar.xz) = 2b231afbedb241b8957fa902c37cd85734cdb8b2071cd32ac75ae2e9e064483fe1e9e8d49f2e6df478fdd01e9c6225a85887ba2af1792a9150b89cea75ef8bb4 +SHA512 (gnome-software-42.3.tar.xz) = 8adae64b3149145548fc80ba3491e92d47a711341020b8edb53333f07367b0e2d37864940af71a35d980f634e7a1df68e9fde3c56d17c8e482699358c8eba8b7 From 4afe518accfd1faa928103929e6dfcfe39ff38c6 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 1 Jul 2022 12:41:08 +0200 Subject: [PATCH 032/138] Update to 43.alpha --- 0002-shell-setup-order.patch | 113 +++-- ...under-gs-flatpak-refine-app-unlocked.patch | 386 ------------------ 0018-fwupd-Fix-the-user-action-dialogs.patch | 46 --- gnome-software.spec | 24 +- sources | 2 +- 5 files changed, 71 insertions(+), 500 deletions(-) delete mode 100644 0003-crash-under-gs-flatpak-refine-app-unlocked.patch delete mode 100644 0018-fwupd-Fix-the-user-action-dialogs.patch diff --git a/0002-shell-setup-order.patch b/0002-shell-setup-order.patch index c0ba76b..37da5c0 100644 --- a/0002-shell-setup-order.patch +++ b/0002-shell-setup-order.patch @@ -1,8 +1,7 @@ -diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c -index 38cc31bb5..c73adce6d 100644 ---- a/lib/gs-appstream.c -+++ b/lib/gs-appstream.c -@@ -1626,12 +1626,12 @@ gs_appstream_add_categories (XbSilo *silo, +diff -up gnome-software-43.alpha/lib/gs-appstream.c.2 gnome-software-43.alpha/lib/gs-appstream.c +--- gnome-software-43.alpha/lib/gs-appstream.c.2 2022-06-30 20:03:37.000000000 +0200 ++++ gnome-software-43.alpha/lib/gs-appstream.c 2022-07-01 12:01:07.781026426 +0200 +@@ -1648,12 +1648,12 @@ gs_appstream_add_categories (XbSilo *sil for (guint k = 0; k < groups->len; k++) { const gchar *group = g_ptr_array_index (groups, k); guint cnt = gs_appstream_count_component_for_groups (silo, group); @@ -18,11 +17,10 @@ index 38cc31bb5..c73adce6d 100644 } } } -diff --git a/lib/gs-category.c b/lib/gs-category.c -index b311c4941..4baede3bc 100644 ---- a/lib/gs-category.c -+++ b/lib/gs-category.c -@@ -147,17 +147,19 @@ gs_category_set_size (GsCategory *category, guint size) +diff -up gnome-software-43.alpha/lib/gs-category.c.2 gnome-software-43.alpha/lib/gs-category.c +--- gnome-software-43.alpha/lib/gs-category.c.2 2022-06-30 20:03:37.000000000 +0200 ++++ gnome-software-43.alpha/lib/gs-category.c 2022-07-01 12:01:07.781026426 +0200 +@@ -147,17 +147,19 @@ gs_category_set_size (GsCategory *catego /** * gs_category_increment_size: * @category: a #GsCategory @@ -45,11 +43,10 @@ index b311c4941..4baede3bc 100644 g_object_notify_by_pspec (G_OBJECT (category), obj_props[PROP_SIZE]); } -diff --git a/lib/gs-category.h b/lib/gs-category.h -index ecd2e1e23..1e82591aa 100644 ---- a/lib/gs-category.h -+++ b/lib/gs-category.h -@@ -39,6 +39,7 @@ GsCategory *gs_category_find_child (GsCategory *category, +diff -up gnome-software-43.alpha/lib/gs-category.h.2 gnome-software-43.alpha/lib/gs-category.h +--- gnome-software-43.alpha/lib/gs-category.h.2 2022-06-30 20:03:37.000000000 +0200 ++++ gnome-software-43.alpha/lib/gs-category.h 2022-07-01 12:01:07.781026426 +0200 +@@ -39,6 +39,7 @@ GsCategory *gs_category_find_child (GsC GPtrArray *gs_category_get_children (GsCategory *category); guint gs_category_get_size (GsCategory *category); @@ -58,11 +55,46 @@ index ecd2e1e23..1e82591aa 100644 + guint value); G_END_DECLS -diff --git a/src/gs-shell.c b/src/gs-shell.c -index db449a9b0..796d7b05a 100644 ---- a/src/gs-shell.c -+++ b/src/gs-shell.c -@@ -107,6 +107,7 @@ struct _GsShell +diff -up gnome-software-43.alpha/src/gs-application.c.2 gnome-software-43.alpha/src/gs-application.c +--- gnome-software-43.alpha/src/gs-application.c.2 2022-06-30 20:03:37.000000000 +0200 ++++ gnome-software-43.alpha/src/gs-application.c 2022-07-01 12:02:05.799267693 +0200 +@@ -1036,12 +1036,9 @@ gs_application_startup (GApplication *ap + G_CALLBACK (gs_application_shell_loaded_cb), + app); + +- gs_shell_setup (app->shell, app->plugin_loader, app->cancellable); + app->main_window = GTK_WINDOW (app->shell); + gtk_application_add_window (GTK_APPLICATION (app), app->main_window); + +- app->update_monitor = gs_update_monitor_new (app, app->plugin_loader); +- + gs_application_update_software_sources_presence (application); + + /* Remove possibly obsolete notifications */ +@@ -1067,6 +1064,7 @@ startup_cb (GObject *source_object, + GAsyncResult *result, + gpointer user_data) + { ++ GsApplication *app = GS_APPLICATION (user_data); + GsPluginLoader *plugin_loader = GS_PLUGIN_LOADER (source_object); + g_autoptr(GError) local_error = NULL; + +@@ -1079,6 +1077,11 @@ startup_cb (GObject *source_object, + + /* show the priority of each plugin */ + gs_plugin_loader_dump_state (plugin_loader); ++ ++ /* Setup the shell only after the plugin loader finished its setup, ++ thus all plugins are loaded and ready for the jobs. */ ++ gs_shell_setup (app->shell, app->plugin_loader, app->cancellable); ++ app->update_monitor = gs_update_monitor_new (app, app->plugin_loader); + } + + static void +diff -up gnome-software-43.alpha/src/gs-shell.c.2 gnome-software-43.alpha/src/gs-shell.c +--- gnome-software-43.alpha/src/gs-shell.c.2 2022-06-30 20:03:37.000000000 +0200 ++++ gnome-software-43.alpha/src/gs-shell.c 2022-07-01 12:01:07.782026430 +0200 +@@ -109,6 +109,7 @@ struct _GsShell GtkWidget *primary_menu; GtkWidget *sub_page_header_title; @@ -70,7 +102,7 @@ index db449a9b0..796d7b05a 100644 gboolean is_narrow; guint allocation_changed_cb_id; -@@ -165,6 +166,12 @@ gs_shell_modal_dialog_present (GsShell *shell, GtkWindow *window) +@@ -167,6 +168,12 @@ gs_shell_modal_dialog_present (GsShell * void gs_shell_activate (GsShell *shell) { @@ -83,7 +115,7 @@ index db449a9b0..796d7b05a 100644 gtk_widget_show (GTK_WIDGET (shell)); gtk_window_present (GTK_WINDOW (shell)); } -@@ -2237,6 +2244,11 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can +@@ -2265,6 +2272,11 @@ gs_shell_setup (GsShell *shell, GsPlugin if (g_settings_get_boolean (shell->settings, "first-run")) g_settings_set_boolean (shell->settings, "first-run", FALSE); } @@ -95,40 +127,3 @@ index db449a9b0..796d7b05a 100644 } void -diff --git a/src/gs-application.c b/src/gs-application.c -index e3f5f55c7..bdadd5c34 100644 ---- a/src/gs-application.c -+++ b/src/gs-application.c -@@ -968,12 +968,9 @@ gs_application_startup (GApplication *application) - G_CALLBACK (gs_application_shell_loaded_cb), - app); - -- gs_shell_setup (app->shell, app->plugin_loader, app->cancellable); - app->main_window = GTK_WINDOW (app->shell); - gtk_application_add_window (GTK_APPLICATION (app), app->main_window); - -- app->update_monitor = gs_update_monitor_new (app, app->plugin_loader); -- - gs_application_update_software_sources_presence (application); - - /* Set up the plugins. */ -@@ -990,6 +987,7 @@ startup_cb (GObject *source_object, - GAsyncResult *result, - gpointer user_data) - { -+ GsApplication *app = GS_APPLICATION (user_data); - GsPluginLoader *plugin_loader = GS_PLUGIN_LOADER (source_object); - g_autoptr(GError) local_error = NULL; - -@@ -1002,6 +1000,11 @@ startup_cb (GObject *source_object, - - /* show the priority of each plugin */ - gs_plugin_loader_dump_state (plugin_loader); -+ -+ /* Setup the shell only after the plugin loader finished its setup, -+ thus all plugins are loaded and ready for the jobs. */ -+ gs_shell_setup (app->shell, app->plugin_loader, app->cancellable); -+ app->update_monitor = gs_update_monitor_new (app, app->plugin_loader); - } - - static void diff --git a/0003-crash-under-gs-flatpak-refine-app-unlocked.patch b/0003-crash-under-gs-flatpak-refine-app-unlocked.patch deleted file mode 100644 index 701e7ef..0000000 --- a/0003-crash-under-gs-flatpak-refine-app-unlocked.patch +++ /dev/null @@ -1,386 +0,0 @@ -diff -up gnome-software-42.2/lib/gs-appstream.c.3 gnome-software-42.2/lib/gs-appstream.c ---- gnome-software-42.2/lib/gs-appstream.c.3 2022-06-13 14:34:05.477145977 +0200 -+++ gnome-software-42.2/lib/gs-appstream.c 2022-06-13 14:36:26.640218337 +0200 -@@ -20,7 +20,13 @@ GsApp * - gs_appstream_create_app (GsPlugin *plugin, XbSilo *silo, XbNode *component, GError **error) - { - GsApp *app; -- g_autoptr(GsApp) app_new = gs_app_new (NULL); -+ g_autoptr(GsApp) app_new = NULL; -+ -+ g_return_val_if_fail (GS_IS_PLUGIN (plugin), NULL); -+ g_return_val_if_fail (XB_IS_SILO (silo), NULL); -+ g_return_val_if_fail (XB_IS_NODE (component), NULL); -+ -+ app_new = gs_app_new (NULL); - - /* refine enough to get the unique ID */ - if (!gs_appstream_refine_app (plugin, app_new, silo, component, -@@ -967,6 +973,11 @@ gs_appstream_refine_app (GsPlugin *plugi - g_autoptr(GPtrArray) launchables = NULL; - g_autoptr(XbNode) req = NULL; - -+ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); -+ g_return_val_if_fail (GS_IS_APP (app), FALSE); -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (XB_IS_NODE (component), FALSE); -+ - /* is compatible */ - req = xb_node_query_first (component, - "requires/id[@type='id']" -@@ -1411,6 +1422,11 @@ gs_appstream_search (GsPlugin *plugin, - { AS_SEARCH_TOKEN_MATCH_NONE, NULL } - }; - -+ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (values != NULL, FALSE); -+ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); -+ - /* add some weighted queries */ - for (guint i = 0; queries[i].xpath != NULL; i++) { - g_autoptr(GError) error_query = NULL; -@@ -1487,6 +1503,11 @@ gs_appstream_add_category_apps (GsPlugin - { - GPtrArray *desktop_groups; - -+ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (GS_IS_CATEGORY (category), FALSE); -+ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); -+ - desktop_groups = gs_category_get_desktop_groups (category); - if (desktop_groups->len == 0) { - g_warning ("no desktop_groups for %s", gs_category_get_id (category)); -@@ -1577,6 +1598,9 @@ gs_appstream_add_categories (XbSilo *sil - GCancellable *cancellable, - GError **error) - { -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (list != NULL, FALSE); -+ - for (guint j = 0; j < list->len; j++) { - GsCategory *parent = GS_CATEGORY (g_ptr_array_index (list, j)); - GPtrArray *children = gs_category_get_children (parent); -@@ -1611,6 +1635,9 @@ gs_appstream_add_popular (XbSilo *silo, - g_autoptr(GError) error_local = NULL; - g_autoptr(GPtrArray) array = NULL; - -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); -+ - /* find out how many packages are in each category */ - array = xb_silo_query (silo, - "components/component/kudos/" -@@ -1648,6 +1675,10 @@ gs_appstream_add_recent (GsPlugin *plugi - g_autoptr(GError) error_local = NULL; - g_autoptr(GPtrArray) array = NULL; - -+ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); -+ - /* use predicate conditions to the max */ - xpath = g_strdup_printf ("components/component/releases/" - "release[@timestamp>%" G_GUINT64_FORMAT "]/../..", -@@ -1686,6 +1717,10 @@ gs_appstream_add_alternates (XbSilo *sil - g_autoptr(GPtrArray) ids = NULL; - g_autoptr(GString) xpath = g_string_new (NULL); - -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (GS_IS_APP (app), FALSE); -+ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); -+ - /* probably a package we know nothing about */ - if (gs_app_get_id (app) == NULL) - return TRUE; -@@ -1743,6 +1778,9 @@ gs_appstream_add_featured (XbSilo *silo, - g_autoptr(GError) error_local = NULL; - g_autoptr(GPtrArray) array = NULL; - -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); -+ - /* find out how many packages are in each category */ - array = xb_silo_query (silo, - "components/component/custom/value[@key='GnomeSoftware::FeatureTile']/../..|" -@@ -1782,6 +1820,11 @@ gs_appstream_url_to_app (GsPlugin *plugi - g_autofree gchar *xpath = NULL; - g_autoptr(GPtrArray) components = NULL; - -+ g_return_val_if_fail (GS_IS_PLUGIN (plugin), FALSE); -+ g_return_val_if_fail (XB_IS_SILO (silo), FALSE); -+ g_return_val_if_fail (GS_IS_APP_LIST (list), FALSE); -+ g_return_val_if_fail (url != NULL, FALSE); -+ - /* not us */ - scheme = gs_utils_get_url_scheme (url); - if (g_strcmp0 (scheme, "appstream") != 0) -@@ -1812,6 +1855,9 @@ gs_appstream_component_add_keyword (XbBu - g_autoptr(XbBuilderNode) keyword = NULL; - g_autoptr(XbBuilderNode) keywords = NULL; - -+ g_return_if_fail (XB_IS_BUILDER_NODE (component)); -+ g_return_if_fail (str != NULL); -+ - /* create if it does not already exist */ - keywords = xb_builder_node_get_child (component, "keywords", NULL); - if (keywords == NULL) -@@ -1831,6 +1877,9 @@ gs_appstream_component_add_provide (XbBu - g_autoptr(XbBuilderNode) provide = NULL; - g_autoptr(XbBuilderNode) provides = NULL; - -+ g_return_if_fail (XB_IS_BUILDER_NODE (component)); -+ g_return_if_fail (str != NULL); -+ - /* create if it does not already exist */ - provides = xb_builder_node_get_child (component, "provides", NULL); - if (provides == NULL) -@@ -1850,6 +1899,9 @@ gs_appstream_component_add_category (XbB - g_autoptr(XbBuilderNode) category = NULL; - g_autoptr(XbBuilderNode) categories = NULL; - -+ g_return_if_fail (XB_IS_BUILDER_NODE (component)); -+ g_return_if_fail (str != NULL); -+ - /* create if it does not already exist */ - categories = xb_builder_node_get_child (component, "categories", NULL); - if (categories == NULL) -@@ -1868,6 +1920,9 @@ gs_appstream_component_add_icon (XbBuild - { - g_autoptr(XbBuilderNode) icon = NULL; - -+ g_return_if_fail (XB_IS_BUILDER_NODE (component)); -+ g_return_if_fail (str != NULL); -+ - /* create str if it does not already exist */ - icon = xb_builder_node_get_child (component, "icon", NULL); - if (icon == NULL) { -@@ -1881,7 +1936,11 @@ gs_appstream_component_add_icon (XbBuild - void - gs_appstream_component_add_extra_info (XbBuilderNode *component) - { -- const gchar *kind = xb_builder_node_get_attr (component, "type"); -+ const gchar *kind; -+ -+ g_return_if_fail (XB_IS_BUILDER_NODE (component)); -+ -+ kind = xb_builder_node_get_attr (component, "type"); - - /* add the gnome-software-specific 'Addon' group and ensure they - * all have an icon set */ -@@ -1927,9 +1986,14 @@ gs_appstream_component_add_extra_info (X - void - gs_appstream_component_fix_url (XbBuilderNode *component, const gchar *baseurl) - { -- const gchar *text = xb_builder_node_get_text (component); -+ const gchar *text; - g_autofree gchar *url = NULL; - -+ g_return_if_fail (XB_IS_BUILDER_NODE (component)); -+ g_return_if_fail (baseurl != NULL); -+ -+ text = xb_builder_node_get_text (component); -+ - if (text == NULL) - return; - -diff -up gnome-software-42.2/plugins/flatpak/gs-flatpak.c.3 gnome-software-42.2/plugins/flatpak/gs-flatpak.c ---- gnome-software-42.2/plugins/flatpak/gs-flatpak.c.3 2022-05-30 13:43:00.000000000 +0200 -+++ gnome-software-42.2/plugins/flatpak/gs-flatpak.c 2022-06-13 14:34:05.480145978 +0200 -@@ -467,10 +467,18 @@ gs_flatpak_create_source (GsFlatpak *sel - } - - static void -+gs_flatpak_invalidate_silo (GsFlatpak *self) -+{ -+ g_rw_lock_writer_lock (&self->silo_lock); -+ if (self->silo != NULL) -+ xb_silo_invalidate (self->silo); -+ g_rw_lock_writer_unlock (&self->silo_lock); -+} -+ -+static void - gs_flatpak_internal_data_changed (GsFlatpak *self) - { - g_autoptr(GMutexLocker) locker = NULL; -- g_autoptr(GRWLockWriterLocker) writer_locker = NULL; - - /* drop the installed refs cache */ - locker = g_mutex_locker_new (&self->installed_refs_mutex); -@@ -487,10 +495,7 @@ gs_flatpak_internal_data_changed (GsFlat - g_hash_table_remove_all (self->broken_remotes); - g_clear_pointer (&locker, g_mutex_locker_free); - -- writer_locker = g_rw_lock_writer_locker_new (&self->silo_lock); -- if (self->silo) -- xb_silo_invalidate (self->silo); -- g_clear_pointer (&writer_locker, g_rw_lock_writer_locker_free); -+ gs_flatpak_invalidate_silo (self); - - self->requires_full_rescan = TRUE; - } -@@ -2009,10 +2014,7 @@ gs_flatpak_refresh (GsFlatpak *self, - g_mutex_unlock (&self->installed_refs_mutex); - - /* manually do this in case we created the first appstream file */ -- g_rw_lock_reader_lock (&self->silo_lock); -- if (self->silo != NULL) -- xb_silo_invalidate (self->silo); -- g_rw_lock_reader_unlock (&self->silo_lock); -+ gs_flatpak_invalidate_silo (self); - - /* update AppStream metadata */ - if (!gs_flatpak_refresh_appstream (self, cache_age_secs, interactive, cancellable, error)) -@@ -3197,6 +3199,20 @@ gs_flatpak_refine_app_unlocked (GsFlatpa - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); - -+ if (self->silo == NULL) { -+ g_clear_pointer (&locker, g_rw_lock_reader_locker_free); -+ if (!gs_flatpak_rescan_appstream_store (self, interactive, cancellable, error)) -+ return FALSE; -+ -+ locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } -+ } -+ - /* always do AppStream properties */ - if (!gs_flatpak_refine_appstream (self, app, self->silo, flags, interactive, cancellable, error)) - return FALSE; -@@ -3394,6 +3410,13 @@ gs_flatpak_refine_wildcard (GsFlatpak *s - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); - -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } -+ - /* find all apps when matching any prefixes */ - xpath = g_strdup_printf ("components/component/id[text()='%s']/..", id); - components = xb_silo_query (self->silo, xpath, 0, &error_local); -@@ -3487,10 +3510,7 @@ gs_flatpak_app_remove_source (GsFlatpak - } - - /* invalidate cache */ -- g_rw_lock_reader_lock (&self->silo_lock); -- if (self->silo != NULL) -- xb_silo_invalidate (self->silo); -- g_rw_lock_reader_unlock (&self->silo_lock); -+ gs_flatpak_invalidate_silo (self); - - gs_app_set_state (app, is_remove ? GS_APP_STATE_UNAVAILABLE : GS_APP_STATE_AVAILABLE); - -@@ -3953,6 +3973,13 @@ gs_flatpak_search (GsFlatpak *self, - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } -+ - if (!gs_appstream_search (self->plugin, self->silo, values, list_tmp, - cancellable, error)) - return FALSE; -@@ -4022,6 +4049,12 @@ gs_flatpak_add_category_apps (GsFlatpak - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } - return gs_appstream_add_category_apps (self->plugin, self->silo, - category, list, - cancellable, error); -@@ -4040,6 +4073,12 @@ gs_flatpak_add_categories (GsFlatpak *se - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } - return gs_appstream_add_categories (self->silo, - list, cancellable, error); - } -@@ -4058,6 +4097,12 @@ gs_flatpak_add_popular (GsFlatpak *self, - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } - if (!gs_appstream_add_popular (self->silo, list_tmp, - cancellable, error)) - return FALSE; -@@ -4081,6 +4126,12 @@ gs_flatpak_add_featured (GsFlatpak *self - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } - if (!gs_appstream_add_featured (self->silo, list_tmp, - cancellable, error)) - return FALSE; -@@ -4105,6 +4156,12 @@ gs_flatpak_add_alternates (GsFlatpak *se - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } - if (!gs_appstream_add_alternates (self->silo, app, list_tmp, - cancellable, error)) - return FALSE; -@@ -4129,6 +4186,12 @@ gs_flatpak_add_recent (GsFlatpak *self, - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } - if (!gs_appstream_add_recent (self->plugin, self->silo, list_tmp, age, - cancellable, error)) - return FALSE; -@@ -4154,6 +4217,12 @@ gs_flatpak_url_to_app (GsFlatpak *self, - return FALSE; - - locker = g_rw_lock_reader_locker_new (&self->silo_lock); -+ if (self->silo == NULL) { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "failed to setup XbSilo for '%s'", -+ gs_flatpak_get_id (self)); -+ return FALSE; -+ } - if (!gs_appstream_url_to_app (self->plugin, self->silo, list_tmp, url, cancellable, error)) - return FALSE; - diff --git a/0018-fwupd-Fix-the-user-action-dialogs.patch b/0018-fwupd-Fix-the-user-action-dialogs.patch deleted file mode 100644 index e45e21e..0000000 --- a/0018-fwupd-Fix-the-user-action-dialogs.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 9aba963f2274e929658b632d6f6ce9c73ee83156 Mon Sep 17 00:00:00 2001 -From: Richard Hughes -Date: Tue, 14 Jun 2022 13:04:31 +0100 -Subject: [PATCH 18/18] fwupd: Fix the user action dialogs - -When gnome-software was ported from appstream-glib to libappstream we -missed that the locale arguments are now swapped -- i.e. the former -specified "locale, value" and the latter specified "value, locale". - -This fixes installing software on any devices that require some kind of -user-prompting to complete the update, e.g. buttons that need pressing -or cables that need replugging. ---- - plugins/fwupd/gs-fwupd-app.c | 2 +- - plugins/fwupd/gs-plugin-fwupd.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c -index 03103a3e9..7fcbdadab 100644 ---- a/plugins/fwupd/gs-fwupd-app.c -+++ b/plugins/fwupd/gs-fwupd-app.c -@@ -283,7 +283,7 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel) - as_screenshot_set_kind (ss, AS_SCREENSHOT_KIND_DEFAULT); - as_screenshot_add_image (ss, im); - if (fwupd_release_get_detach_caption (rel) != NULL) -- as_screenshot_set_caption (ss, NULL, fwupd_release_get_detach_caption (rel)); -+ as_screenshot_set_caption (ss, fwupd_release_get_detach_caption (rel), NULL); - gs_app_set_action_screenshot (app, ss); - } - } -diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c -index cac6a324a..3171eb96d 100644 ---- a/plugins/fwupd/gs-plugin-fwupd.c -+++ b/plugins/fwupd/gs-plugin-fwupd.c -@@ -945,7 +945,7 @@ gs_plugin_fwupd_install (GsPluginFwupd *self, - - /* caption is required */ - as_screenshot_set_kind (ss, AS_SCREENSHOT_KIND_DEFAULT); -- as_screenshot_set_caption (ss, NULL, fwupd_device_get_update_message (dev)); -+ as_screenshot_set_caption (ss, fwupd_device_get_update_message (dev), NULL); - gs_app_set_action_screenshot (app, ss); - - /* require the dialog */ --- -2.36.1 - diff --git a/gnome-software.spec b/gnome-software.spec index 57180c7..b1a88f5 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -10,25 +10,23 @@ %global packagekit_version 1.1.1 # this is not a library version -%define gs_plugin_version 18 +%define gs_plugin_version 19 %global tarball_version %%(echo %{version} | tr '~' '.') %global __provides_exclude_from ^%{_libdir}/%{name}/plugins-%{gs_plugin_version}/.*\\.so.*$ Name: gnome-software -Version: 42.2 -Release: 4%{?dist} +Version: 43.alpha +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ URL: https://wiki.gnome.org/Apps/Software -Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarball_version}.tar.xz +Source0: https://download.gnome.org/sources/gnome-software/43/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch Patch02: 0002-shell-setup-order.patch -Patch03: 0003-crash-under-gs-flatpak-refine-app-unlocked.patch -Patch04: 0018-fwupd-Fix-the-user-action-dialogs.patch BuildRequires: docbook-style-xsl BuildRequires: desktop-file-utils @@ -63,6 +61,7 @@ BuildRequires: pkgconfig(xmlb) >= %{libxmlb_version} Requires: appstream-data Requires: appstream%{?_isa} >= %{appstream_version} +Requires: epiphany-runtime%{?_isa} Requires: flatpak%{?_isa} >= %{flatpak_version} Requires: flatpak-libs%{?_isa} >= %{flatpak_version} Requires: fwupd%{?_isa} >= %{fwupd_version} @@ -119,6 +118,9 @@ This package includes the rpm-ostree backend. -Dpackagekit_autoremove=true \ -Dexternal_appstream=false \ -Drpm_ostree=true \ + -Dwebapps=true \ + -Dhardcoded_foss_webapps=true \ + -Dhardcoded_proprietary_webapps=false \ -Dtests=false %meson_build @@ -159,13 +161,15 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Software-symbolic.svg %{_datadir}/icons/hicolor/scalable/actions/app-remove-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/software-installed-symbolic.svg -%{_datadir}/metainfo/org.gnome.Software.appdata.xml +%{_datadir}/metainfo/org.gnome.Software.metainfo.xml +%{_datadir}/metainfo/org.gnome.Software.Plugin.Epiphany.metainfo.xml %{_datadir}/metainfo/org.gnome.Software.Plugin.Flatpak.metainfo.xml %{_datadir}/metainfo/org.gnome.Software.Plugin.Fwupd.metainfo.xml %dir %{_libdir}/gnome-software/plugins-%{gs_plugin_version} %{_libdir}/gnome-software/libgnomesoftware.so.%{gs_plugin_version} %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_appstream.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_dummy.so +%{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_epiphany.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_fedora-langpacks.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_fedora-pkgdb-collections.so %{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_flatpak.so @@ -184,8 +188,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_sysconfdir}/xdg/autostart/org.gnome.Software.desktop %dir %{_datadir}/swcatalog %dir %{_datadir}/swcatalog/xml +%{_datadir}/swcatalog/xml/gnome-pwa-list-foss.xml +%{_datadir}/swcatalog/xml/org.gnome.Software.Curated.xml %{_datadir}/swcatalog/xml/org.gnome.Software.Featured.xml -%{_datadir}/swcatalog/xml/org.gnome.Software.Popular.xml %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service %{_datadir}/dbus-1/services/org.gnome.Software.service %{_datadir}/gnome-shell/search-providers/org.gnome.Software-search-provider.ini @@ -207,6 +212,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Fri Jul 01 2022 Milan Crha - 43.alpha-1 +- Update to 43.alpha + * Fri Jun 17 2022 Richard Hughes - 42.2-4 - Add patch to make fwupd user requests work diff --git a/sources b/sources index fc682d9..5bbe6b2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-42.2.tar.xz) = 2b231afbedb241b8957fa902c37cd85734cdb8b2071cd32ac75ae2e9e064483fe1e9e8d49f2e6df478fdd01e9c6225a85887ba2af1792a9150b89cea75ef8bb4 +SHA512 (gnome-software-43.alpha.tar.xz) = 796b77e763f0ad0c8103b39563ce792b9354126762594addba38a993628f273938a27ed09b9d3c469fb9d11d7a86502960faf9c88914347ec5263e0f626dbb1e From 9786c4ea7ff32ab52f758959778d7a2f791242c0 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 7 Jul 2022 09:39:41 -0700 Subject: [PATCH 033/138] Backport MR #1401 to fix issue #1816 and fedora-workstation #107 --- 1401.patch | 630 ++++++++++++++++++++++++++++++++++++++++++++ gnome-software.spec | 11 +- 2 files changed, 640 insertions(+), 1 deletion(-) create mode 100644 1401.patch diff --git a/1401.patch b/1401.patch new file mode 100644 index 0000000..dfe1925 --- /dev/null +++ b/1401.patch @@ -0,0 +1,630 @@ +From 892acd197630fb3f52ddfac5fc73196ba6759318 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 15 Jun 2022 17:47:11 +0200 +Subject: [PATCH 01/10] plugin-loader: Actively track count of running jobs + +This helps to avoid mistakes when hinting a job finished. +--- + lib/gs-plugin-loader.c | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c +index a7f86d5f2..e5c2a2c23 100644 +--- a/lib/gs-plugin-loader.c ++++ b/lib/gs-plugin-loader.c +@@ -56,6 +56,7 @@ struct _GsPluginLoader + GsAppList *pending_apps; /* (nullable) (owned) */ + + GThreadPool *queued_ops_pool; ++ gint active_jobs; + + GSettings *settings; + +@@ -3911,6 +3912,19 @@ cancellable_data_free (CancellableData *data) + + G_DEFINE_AUTOPTR_CLEANUP_FUNC (CancellableData, cancellable_data_free) + ++static void ++plugin_loader_task_freed_cb (gpointer user_data, ++ GObject *freed_object) ++{ ++ g_autoptr(GsPluginLoader) plugin_loader = user_data; ++ if (g_atomic_int_dec_and_test (&plugin_loader->active_jobs)) { ++ /* if the plugin used updates-changed during its job, actually schedule ++ * the signal emission now */ ++ if (plugin_loader->updates_changed_cnt > 0) ++ gs_plugin_loader_updates_changed (plugin_loader); ++ } ++} ++ + static gboolean job_process_setup_complete_cb (GCancellable *cancellable, + gpointer user_data); + static void job_process_cb (GTask *task); +@@ -3977,6 +3991,10 @@ gs_plugin_loader_job_process_async (GsPluginLoader *plugin_loader, + g_task_set_name (task, task_name); + g_task_set_task_data (task, g_object_ref (plugin_job), (GDestroyNotify) g_object_unref); + ++ g_atomic_int_inc (&plugin_loader->active_jobs); ++ g_object_weak_ref (G_OBJECT (task), ++ plugin_loader_task_freed_cb, g_object_ref (plugin_loader)); ++ + /* Wait until the plugin has finished setting up. + * + * Do this using a #GCancellable. While we’re not using the #GCancellable +-- +GitLab + + +From 89a3767bd0ad94d3f3d83f8c4ecbb2b79072f536 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 15 Jun 2022 17:51:13 +0200 +Subject: [PATCH 02/10] plugin-loader: Remove obsolete + gs_plugin_loader_hint_job_finished() + +The function is not needed, since the plugin loader tracks count +of active jobs automatically now. +--- + lib/gs-plugin-job-refresh-metadata.c | 5 ----- + lib/gs-plugin-loader.c | 28 ---------------------------- + lib/gs-plugin-loader.h | 2 -- + 3 files changed, 35 deletions(-) + +diff --git a/lib/gs-plugin-job-refresh-metadata.c b/lib/gs-plugin-job-refresh-metadata.c +index a57b194bc..8d0b95b5d 100644 +--- a/lib/gs-plugin-job-refresh-metadata.c ++++ b/lib/gs-plugin-job-refresh-metadata.c +@@ -387,7 +387,6 @@ finish_op (GTask *task, + GError *error) + { + GsPluginJobRefreshMetadata *self = g_task_get_source_object (task); +- GsPluginLoader *plugin_loader = g_task_get_task_data (task); + g_autoptr(GError) error_owned = g_steal_pointer (&error); + g_autofree gchar *job_debug = NULL; + +@@ -408,10 +407,6 @@ finish_op (GTask *task, + progress_cb (self); + g_source_destroy (self->progress_source); + +- /* If any plugin emitted updates-changed, actually schedule it to be +- * emitted now (even if the overall operation failed). */ +- gs_plugin_loader_hint_job_finished (plugin_loader); +- + /* Get the results of the parallel ops. */ + if (self->saved_error != NULL) { + g_task_return_error (task, g_steal_pointer (&self->saved_error)); +diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c +index e5c2a2c23..fc374256d 100644 +--- a/lib/gs-plugin-loader.c ++++ b/lib/gs-plugin-loader.c +@@ -3676,9 +3676,6 @@ gs_plugin_loader_process_thread_cb (GTask *task, + /* sort these again as the refine may have added useful metadata */ + gs_plugin_loader_job_sorted_truncation_again (helper->plugin_job, list); + +- /* Hint that the job has finished. */ +- gs_plugin_loader_hint_job_finished (plugin_loader); +- + #ifdef HAVE_SYSPROF + if (plugin_loader->sysprof_writer != NULL) { + g_autofree gchar *sysprof_name = g_strconcat ("process-thread:", gs_plugin_action_to_string (action), NULL); +@@ -3849,9 +3846,6 @@ run_job_cb (GObject *source_object, + } + #endif /* HAVE_SYSPROF */ + +- /* Hint that the job has finished. */ +- gs_plugin_loader_hint_job_finished (plugin_loader); +- + /* FIXME: This will eventually go away when + * gs_plugin_loader_job_process_finish() is removed. */ + job_class = GS_PLUGIN_JOB_GET_CLASS (plugin_job); +@@ -4459,25 +4453,3 @@ gs_plugin_loader_get_category_manager (GsPluginLoader *plugin_loader) + + return plugin_loader->category_manager; + } +- +-/** +- * gs_plugin_loader_hint_job_finished: +- * @plugin_loader: a #GsPluginLoader +- * +- * Hint to the @plugin_loader that the set of changes caused by the current +- * #GsPluginJob is likely to be finished. +- * +- * The @plugin_loader may emit queued-up signals as a result. +- * +- * Since: 42 +- */ +-void +-gs_plugin_loader_hint_job_finished (GsPluginLoader *plugin_loader) +-{ +- g_return_if_fail (GS_IS_PLUGIN_LOADER (plugin_loader)); +- +- /* if the plugin used updates-changed during its job, actually schedule +- * the signal emission now */ +- if (plugin_loader->updates_changed_cnt > 0) +- gs_plugin_loader_updates_changed (plugin_loader); +-} +diff --git a/lib/gs-plugin-loader.h b/lib/gs-plugin-loader.h +index 0d2035bfd..bb2c7d8e6 100644 +--- a/lib/gs-plugin-loader.h ++++ b/lib/gs-plugin-loader.h +@@ -126,6 +126,4 @@ gboolean gs_plugin_loader_app_is_compatible (GsPluginLoader *plugin_loader, + void gs_plugin_loader_run_adopt (GsPluginLoader *plugin_loader, + GsAppList *list); + +-void gs_plugin_loader_hint_job_finished (GsPluginLoader *plugin_loader); +- + G_END_DECLS +-- +GitLab + + +From 680726fa2fa5b7f39aa86da05f161604a132085f Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 15 Jun 2022 17:55:31 +0200 +Subject: [PATCH 03/10] plugin-loader: Schedule 'updates-changed' signal when + received with no job running + +This helps to avoid a race condition when a plugin calls +updates-changed at the end of the job, but the job is +finished before the callback gets called in the main thread. +--- + lib/gs-plugin-loader.c | 22 +++++++++++++++------- + 1 file changed, 15 insertions(+), 7 deletions(-) + +diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c +index fc374256d..d728bfc5c 100644 +--- a/lib/gs-plugin-loader.c ++++ b/lib/gs-plugin-loader.c +@@ -1774,12 +1774,6 @@ gs_plugin_loader_job_actions_changed_delay_cb (gpointer user_data) + return FALSE; + } + +-static void +-gs_plugin_loader_job_actions_changed_cb (GsPlugin *plugin, GsPluginLoader *plugin_loader) +-{ +- plugin_loader->updates_changed_cnt++; +-} +- + static void + gs_plugin_loader_updates_changed (GsPluginLoader *plugin_loader) + { +@@ -1791,6 +1785,20 @@ gs_plugin_loader_updates_changed (GsPluginLoader *plugin_loader) + g_object_ref (plugin_loader)); + } + ++static void ++gs_plugin_loader_job_updates_changed_cb (GsPlugin *plugin, ++ GsPluginLoader *plugin_loader) ++{ ++ plugin_loader->updates_changed_cnt++; ++ ++ /* Schedule emit of updates changed when no job is active. ++ This helps to avoid a race condition when a plugin calls ++ updates-changed at the end of the job, but the job is ++ finished before the callback gets called in the main thread. */ ++ if (!g_atomic_int_get (&plugin_loader->active_jobs)) ++ gs_plugin_loader_updates_changed (plugin_loader); ++} ++ + static gboolean + gs_plugin_loader_reload_delay_cb (gpointer user_data) + { +@@ -1849,7 +1857,7 @@ gs_plugin_loader_open_plugin (GsPluginLoader *plugin_loader, + return; + } + g_signal_connect (plugin, "updates-changed", +- G_CALLBACK (gs_plugin_loader_job_actions_changed_cb), ++ G_CALLBACK (gs_plugin_loader_job_updates_changed_cb), + plugin_loader); + g_signal_connect (plugin, "reload", + G_CALLBACK (gs_plugin_loader_reload_cb), +-- +GitLab + + +From 3c915f31197addf8becf9aa62a07dae35b440044 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 15 Jun 2022 17:58:32 +0200 +Subject: [PATCH 04/10] plugin-loader: Change how updates-checked is scheduled + for emission + +This way the GSource can be removed without leaking the plugin loader. +--- + lib/gs-plugin-loader.c | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c +index d728bfc5c..9f64a3559 100644 +--- a/lib/gs-plugin-loader.c ++++ b/lib/gs-plugin-loader.c +@@ -1760,7 +1760,7 @@ gs_plugin_loader_ask_untrusted_cb (GsPlugin *plugin, + } + + static gboolean +-gs_plugin_loader_job_actions_changed_delay_cb (gpointer user_data) ++gs_plugin_loader_job_updates_changed_delay_cb (gpointer user_data) + { + GsPluginLoader *plugin_loader = GS_PLUGIN_LOADER (user_data); + +@@ -1770,7 +1770,6 @@ gs_plugin_loader_job_actions_changed_delay_cb (gpointer user_data) + plugin_loader->updates_changed_id = 0; + plugin_loader->updates_changed_cnt = 0; + +- g_object_unref (plugin_loader); + return FALSE; + } + +@@ -1780,9 +1779,11 @@ gs_plugin_loader_updates_changed (GsPluginLoader *plugin_loader) + if (plugin_loader->updates_changed_id != 0) + return; + plugin_loader->updates_changed_id = +- g_timeout_add_seconds (GS_PLUGIN_LOADER_UPDATES_CHANGED_DELAY, +- gs_plugin_loader_job_actions_changed_delay_cb, +- g_object_ref (plugin_loader)); ++ g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, ++ GS_PLUGIN_LOADER_UPDATES_CHANGED_DELAY, ++ gs_plugin_loader_job_updates_changed_delay_cb, ++ g_object_ref (plugin_loader), ++ g_object_unref); + } + + static void +-- +GitLab + + +From 2930c01ee97a10577fa2860bd8df1124cfb7128d Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 15 Jun 2022 18:02:11 +0200 +Subject: [PATCH 05/10] plugin-loader: Add + gs_plugin_loader_emit_updates_changed() + +It will help to avoid delays with the GUI after changes in the updates. +--- + lib/gs-plugin-loader.c | 23 +++++++++++++++++++++++ + lib/gs-plugin-loader.h | 1 + + 2 files changed, 24 insertions(+) + +diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c +index 9f64a3559..c0e711477 100644 +--- a/lib/gs-plugin-loader.c ++++ b/lib/gs-plugin-loader.c +@@ -4462,3 +4462,26 @@ gs_plugin_loader_get_category_manager (GsPluginLoader *plugin_loader) + + return plugin_loader->category_manager; + } ++ ++/** ++ * gs_plugin_loader_emit_updates_changed: ++ * @self: a #GsPluginLoader ++ * ++ * Emits the #GsPluginLoader:updates-changed signal in the nearest ++ * idle in the main thread. ++ * ++ * Since: 43 ++ **/ ++void ++gs_plugin_loader_emit_updates_changed (GsPluginLoader *self) ++{ ++ g_return_if_fail (GS_IS_PLUGIN_LOADER (self)); ++ ++ if (self->updates_changed_id != 0) ++ g_source_remove (self->updates_changed_id); ++ ++ self->updates_changed_id = ++ g_idle_add_full (G_PRIORITY_HIGH_IDLE, ++ gs_plugin_loader_job_updates_changed_delay_cb, ++ g_object_ref (self), g_object_unref); ++} +diff --git a/lib/gs-plugin-loader.h b/lib/gs-plugin-loader.h +index bb2c7d8e6..91c5f643c 100644 +--- a/lib/gs-plugin-loader.h ++++ b/lib/gs-plugin-loader.h +@@ -125,5 +125,6 @@ gboolean gs_plugin_loader_app_is_compatible (GsPluginLoader *plugin_loader, + + void gs_plugin_loader_run_adopt (GsPluginLoader *plugin_loader, + GsAppList *list); ++void gs_plugin_loader_emit_updates_changed (GsPluginLoader *self); + + G_END_DECLS +-- +GitLab + + +From edfbbfb0be112b76becc1f38c920cfd45a95885c Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 15 Jun 2022 18:05:38 +0200 +Subject: [PATCH 06/10] gs-app: Add gs_app_is_downloaded() + +This avoid code duplication on two places. It also makes sure the places +agree on the way the app is/is-not downloaded is determined. +--- + lib/gs-app.c | 32 ++++++++++++++++++++++++++++++++ + lib/gs-app.h | 1 + + 2 files changed, 33 insertions(+) + +diff --git a/lib/gs-app.c b/lib/gs-app.c +index 29898765b..d7f8be279 100644 +--- a/lib/gs-app.c ++++ b/lib/gs-app.c +@@ -6656,3 +6656,35 @@ gs_app_set_has_translations (GsApp *app, + priv->has_translations = has_translations; + gs_app_queue_notify (app, obj_props[PROP_HAS_TRANSLATIONS]); + } ++ ++/** ++ * gs_app_is_downloaded: ++ * @app: a #GsApp ++ * ++ * Returns whether the @app is downloaded for updates or not, ++ * considering also its dependencies. ++ * ++ * Returns: %TRUE, when the @app is downloaded, %FALSE otherwise ++ * ++ * Since: 43 ++ **/ ++gboolean ++gs_app_is_downloaded (GsApp *app) ++{ ++ GsSizeType size_type; ++ guint64 size_bytes = 0; ++ ++ g_return_val_if_fail (GS_IS_APP (app), FALSE); ++ ++ if (!gs_app_has_quirk (app, GS_APP_QUIRK_IS_PROXY)) { ++ size_type = gs_app_get_size_download (app, &size_bytes); ++ if (size_type != GS_SIZE_TYPE_VALID || size_bytes != 0) ++ return FALSE; ++ } ++ ++ size_type = gs_app_get_size_download_dependencies (app, &size_bytes); ++ if (size_type != GS_SIZE_TYPE_VALID || size_bytes != 0) ++ return FALSE; ++ ++ return TRUE; ++} +diff --git a/lib/gs-app.h b/lib/gs-app.h +index d78503c3e..a053299f2 100644 +--- a/lib/gs-app.h ++++ b/lib/gs-app.h +@@ -516,5 +516,6 @@ void gs_app_set_relations (GsApp *app, + gboolean gs_app_get_has_translations (GsApp *app); + void gs_app_set_has_translations (GsApp *app, + gboolean has_translations); ++gboolean gs_app_is_downloaded (GsApp *app); + + G_END_DECLS +-- +GitLab + + +From c6903fd6b74ddbde5db045ea67fc826824153210 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 15 Jun 2022 18:15:04 +0200 +Subject: [PATCH 07/10] updates-section: Use gs_app_is_downloaded() + +--- + src/gs-updates-section.c | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +diff --git a/src/gs-updates-section.c b/src/gs-updates-section.c +index ca39e6fab..69e083984 100644 +--- a/src/gs-updates-section.c ++++ b/src/gs-updates-section.c +@@ -288,15 +288,7 @@ _all_offline_updates_downloaded (GsUpdatesSection *self) + /* use the download size to figure out what is downloaded and what not */ + for (guint i = 0; i < gs_app_list_length (self->list); i++) { + GsApp *app = gs_app_list_index (self->list, i); +- GsSizeType size_type; +- guint64 size_bytes; +- +- size_type = gs_app_get_size_download (app, &size_bytes); +- if (size_type != GS_SIZE_TYPE_VALID || size_bytes != 0) +- return FALSE; +- +- size_type = gs_app_get_size_download_dependencies (app, &size_bytes); +- if (size_type != GS_SIZE_TYPE_VALID || size_bytes != 0) ++ if (!gs_app_is_downloaded (app)) + return FALSE; + } + +-- +GitLab + + +From 972def24d2bc54b09fe57879efb4c30962858dc0 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 15 Jun 2022 18:15:25 +0200 +Subject: [PATCH 08/10] update-monitor: Use gs_app_is_downloaded() + +--- + src/gs-update-monitor.c | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c +index 324ff4d3e..a2dc9bb92 100644 +--- a/src/gs-update-monitor.c ++++ b/src/gs-update-monitor.c +@@ -125,22 +125,18 @@ check_updates_kind (GsAppList *apps, + + for (ii = 0; ii < len && (!has_important || all_downloaded || !any_downloaded); ii++) { + gboolean is_important; +- guint64 size_download_bytes; + + app = gs_app_list_index (apps, ii); + + is_important = gs_app_get_update_urgency (app) == AS_URGENCY_KIND_CRITICAL; + has_important = has_important || is_important; + +- /* took from gs-updates-section.c: _all_offline_updates_downloaded(); +- the app is considered downloaded, when its download size is 0 */ +- if (gs_app_get_size_download (app, &size_download_bytes) != GS_SIZE_TYPE_VALID || +- size_download_bytes != 0) { +- all_downloaded = FALSE; +- } else { ++ if (gs_app_is_downloaded (app)) { + any_downloaded = TRUE; + if (is_important) + any_important_downloaded = TRUE; ++ } else { ++ all_downloaded = FALSE; + } + } + +-- +GitLab + + +From 1aaa9617fc81651f17ed2f864bec35b958d67eed Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 15 Jun 2022 18:17:18 +0200 +Subject: [PATCH 09/10] update-monitor: Force reload of the Updates page before + showing notification + +Thus it reflects what the update-monitor notifies about. +--- + src/gs-update-monitor.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c +index a2dc9bb92..01e5869eb 100644 +--- a/src/gs-update-monitor.c ++++ b/src/gs-update-monitor.c +@@ -288,6 +288,10 @@ notify_about_pending_updates (GsUpdateMonitor *monitor, + return; + } + ++ /* To force reload of the Updates page, thus it reflects what ++ the update-monitor notifies about */ ++ gs_plugin_loader_emit_updates_changed (monitor->plugin_loader); ++ + monitor->last_notification_time_usec = g_get_real_time (); + + g_debug ("Notify about update: '%s'", title); +-- +GitLab + + +From 64585205437371c459d5de792d50af95e23ba346 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 15 Jun 2022 18:19:36 +0200 +Subject: [PATCH 10/10] update-monitor: Change when notifications are shown + +This handles the fact that offline updates can be installed either +all in once or none of them, which is reflected in the notification. +--- + src/gs-update-monitor.c | 34 ++++++++++++++-------------------- + 1 file changed, 14 insertions(+), 20 deletions(-) + +diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c +index 01e5869eb..292d2bc4b 100644 +--- a/src/gs-update-monitor.c ++++ b/src/gs-update-monitor.c +@@ -109,17 +109,15 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(WithAppData, with_app_data_free); + static void + check_updates_kind (GsAppList *apps, + gboolean *out_has_important, +- gboolean *out_any_important_downloaded, + gboolean *out_all_downloaded, + gboolean *out_any_downloaded) + { +- gboolean has_important, any_important_downloaded, all_downloaded, any_downloaded; ++ gboolean has_important, all_downloaded, any_downloaded; + guint ii, len; + GsApp *app; + + len = gs_app_list_length (apps); + has_important = FALSE; +- any_important_downloaded = FALSE; + all_downloaded = len > 0; + any_downloaded = FALSE; + +@@ -131,17 +129,13 @@ check_updates_kind (GsAppList *apps, + is_important = gs_app_get_update_urgency (app) == AS_URGENCY_KIND_CRITICAL; + has_important = has_important || is_important; + +- if (gs_app_is_downloaded (app)) { ++ if (gs_app_is_downloaded (app)) + any_downloaded = TRUE; +- if (is_important) +- any_important_downloaded = TRUE; +- } else { ++ else + all_downloaded = FALSE; +- } + } + + *out_has_important = has_important; +- *out_any_important_downloaded = any_important_downloaded; + *out_all_downloaded = all_downloaded; + *out_any_downloaded = any_downloaded; + } +@@ -193,14 +187,15 @@ should_download_updates (GsUpdateMonitor *monitor) + #endif + } + +-/* The days below are discussed at https://gitlab.gnome.org/GNOME/gnome-software/-/issues/947 */ ++/* The days below are discussed at https://gitlab.gnome.org/GNOME/gnome-software/-/issues/947 ++ and https://wiki.gnome.org/Design/Apps/Software/Updates#Tentative_Design */ + static gboolean + should_notify_about_pending_updates (GsUpdateMonitor *monitor, + GsAppList *apps, + const gchar **out_title, + const gchar **out_body) + { +- gboolean has_important = FALSE, any_important_downloaded = FALSE, all_downloaded = FALSE, any_downloaded = FALSE; ++ gboolean has_important = FALSE, all_downloaded = FALSE, any_downloaded = FALSE; + gboolean should_download, res = FALSE; + gint64 timestamp_days; + +@@ -210,7 +205,7 @@ should_notify_about_pending_updates (GsUpdateMonitor *monitor, + } + + should_download = should_download_updates (monitor); +- check_updates_kind (apps, &has_important, &any_important_downloaded, &all_downloaded, &any_downloaded); ++ check_updates_kind (apps, &has_important, &all_downloaded, &any_downloaded); + + if (!gs_app_list_length (apps)) { + /* Notify only when the download is disabled and it's the 4th day or it's more than 7 days */ +@@ -221,7 +216,7 @@ should_notify_about_pending_updates (GsUpdateMonitor *monitor, + } + } else if (has_important) { + if (timestamp_days >= 1) { +- if (any_important_downloaded) { ++ if (all_downloaded) { + *out_title = _("Critical Software Update Ready to Install"); + *out_body = _("An important software update is ready to be installed."); + res = TRUE; +@@ -231,24 +226,23 @@ should_notify_about_pending_updates (GsUpdateMonitor *monitor, + res = TRUE; + } + } +- /* When automatic updates are on and there are things ready to be installed, then rather claim +- * about things to be installed, than things to be downloaded. */ +- } else if (all_downloaded || (any_downloaded && should_download)) { ++ } else if (all_downloaded) { + if (timestamp_days >= 3) { + *out_title = _("Software Updates Ready to Install"); + *out_body = _("Software updates are waiting and ready to be installed."); + res = TRUE; + } +- /* To not hide downloaded updates for 14 days when new updates were discovered meanwhile */ +- } else if (timestamp_days >= (any_downloaded ? 3 : 14)) { ++ /* To not hide downloaded updates for 14 days when new updates were discovered meanwhile. ++ Never show "Available to Download" when it's supposed to download the updates. */ ++ } else if (!should_download && timestamp_days >= 14) { + *out_title = _("Software Updates Available to Download"); + *out_body = _("Please download waiting software updates."); + res = TRUE; + } + +- g_debug ("%s: last_test_days:%" G_GINT64_FORMAT " n-apps:%u should_download:%d has_important:%d any_important_downloaded:%d " ++ g_debug ("%s: last_test_days:%" G_GINT64_FORMAT " n-apps:%u should_download:%d has_important:%d " + "all_downloaded:%d any_downloaded:%d res:%d%s%s%s%s", G_STRFUNC, +- timestamp_days, gs_app_list_length (apps), should_download, has_important, any_important_downloaded, ++ timestamp_days, gs_app_list_length (apps), should_download, has_important, + all_downloaded, any_downloaded, res, + res ? " reason:" : "", + res ? *out_title : "", +-- +GitLab + diff --git a/gnome-software.spec b/gnome-software.spec index b1a88f5..da7f757 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -18,7 +18,7 @@ Name: gnome-software Version: 43.alpha -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -27,6 +27,12 @@ Source0: https://download.gnome.org/sources/gnome-software/43/%{name}-%{tarbal Patch01: 0001-crash-with-broken-theme.patch Patch02: 0002-shell-setup-order.patch +# Fix bug that makes update impossible when "System Updates" present +# Fix issues with notifications and app not matching +# https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1816 +# https://pagure.io/fedora-workstation/issue/107 +# https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/1401 +Patch03: 1401.patch BuildRequires: docbook-style-xsl BuildRequires: desktop-file-utils @@ -212,6 +218,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Thu Jul 07 2022 Adam Williamson - 43.alpha-2 +- Backport MR #1401 to fix issue #1816 and fedora-workstation #107 + * Fri Jul 01 2022 Milan Crha - 43.alpha-1 - Update to 43.alpha From 9ef98a7975c651ec6fc09f2bbc232caab39ccc79 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 07:03:42 +0000 Subject: [PATCH 034/138] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gnome-software.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnome-software.spec b/gnome-software.spec index da7f757..4ba8c34 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -18,7 +18,7 @@ Name: gnome-software Version: 43.alpha -Release: 2%{?dist} +Release: 3%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -218,6 +218,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 43.alpha-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Thu Jul 07 2022 Adam Williamson - 43.alpha-2 - Backport MR #1401 to fix issue #1816 and fedora-workstation #107 From b686add992d5f38adefce95cd5bdada6c7ea6558 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 5 Aug 2022 11:57:07 +0200 Subject: [PATCH 035/138] Update to 42.4 --- gnome-software.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gnome-software.spec b/gnome-software.spec index 8da324a..2c2a310 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -15,7 +15,7 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 42.3 +Version: 42.4 Release: 1%{?dist} Summary: A software center for GNOME @@ -199,6 +199,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Fri Aug 05 2022 Milan Crha - 42.4-1 +- Update to 42.4 + * Fri Jul 01 2022 Milan Crha - 42.3-1 - Update to 42.3 diff --git a/sources b/sources index cfb11ae..f10ad13 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-42.3.tar.xz) = 8adae64b3149145548fc80ba3491e92d47a711341020b8edb53333f07367b0e2d37864940af71a35d980f634e7a1df68e9fde3c56d17c8e482699358c8eba8b7 +SHA512 (gnome-software-42.4.tar.xz) = 00c70886c6e3302a59ae533034d8d75cfe05873ea40d0d05a03e15ae34101bb8a64722a7c6a6d43bb54b61033bc14af1542bb832a70ee7b1a2dab6dacb8ffd8f From c73577f732c4268c0c8489045ed86c4661169ab6 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 5 Aug 2022 13:54:15 +0200 Subject: [PATCH 036/138] Update to 43.beta --- 0002-shell-setup-order.patch | 129 ------- 1401.patch | 630 ----------------------------------- gnome-software.spec | 19 +- sources | 2 +- 4 files changed, 9 insertions(+), 771 deletions(-) delete mode 100644 0002-shell-setup-order.patch delete mode 100644 1401.patch diff --git a/0002-shell-setup-order.patch b/0002-shell-setup-order.patch deleted file mode 100644 index 37da5c0..0000000 --- a/0002-shell-setup-order.patch +++ /dev/null @@ -1,129 +0,0 @@ -diff -up gnome-software-43.alpha/lib/gs-appstream.c.2 gnome-software-43.alpha/lib/gs-appstream.c ---- gnome-software-43.alpha/lib/gs-appstream.c.2 2022-06-30 20:03:37.000000000 +0200 -+++ gnome-software-43.alpha/lib/gs-appstream.c 2022-07-01 12:01:07.781026426 +0200 -@@ -1648,12 +1648,12 @@ gs_appstream_add_categories (XbSilo *sil - for (guint k = 0; k < groups->len; k++) { - const gchar *group = g_ptr_array_index (groups, k); - guint cnt = gs_appstream_count_component_for_groups (silo, group); -- for (guint l = 0; l < cnt; l++) { -- gs_category_increment_size (parent); -+ if (cnt > 0) { -+ gs_category_increment_size (parent, cnt); - if (children->len > 1) { - /* Parent category has multiple groups, so increment - * each group's size too */ -- gs_category_increment_size (cat); -+ gs_category_increment_size (cat, cnt); - } - } - } -diff -up gnome-software-43.alpha/lib/gs-category.c.2 gnome-software-43.alpha/lib/gs-category.c ---- gnome-software-43.alpha/lib/gs-category.c.2 2022-06-30 20:03:37.000000000 +0200 -+++ gnome-software-43.alpha/lib/gs-category.c 2022-07-01 12:01:07.781026426 +0200 -@@ -147,17 +147,19 @@ gs_category_set_size (GsCategory *catego - /** - * gs_category_increment_size: - * @category: a #GsCategory -+ * @value: how many to add - * -- * Adds one to the size count if an application is available -+ * Adds @value to the size count. - * - * Since: 3.22 - **/ - void --gs_category_increment_size (GsCategory *category) -+gs_category_increment_size (GsCategory *category, -+ guint value) - { - g_return_if_fail (GS_IS_CATEGORY (category)); - -- category->size++; -+ category->size += value; - g_object_notify_by_pspec (G_OBJECT (category), obj_props[PROP_SIZE]); - } - -diff -up gnome-software-43.alpha/lib/gs-category.h.2 gnome-software-43.alpha/lib/gs-category.h ---- gnome-software-43.alpha/lib/gs-category.h.2 2022-06-30 20:03:37.000000000 +0200 -+++ gnome-software-43.alpha/lib/gs-category.h 2022-07-01 12:01:07.781026426 +0200 -@@ -39,6 +39,7 @@ GsCategory *gs_category_find_child (GsC - GPtrArray *gs_category_get_children (GsCategory *category); - - guint gs_category_get_size (GsCategory *category); --void gs_category_increment_size (GsCategory *category); -+void gs_category_increment_size (GsCategory *category, -+ guint value); - - G_END_DECLS -diff -up gnome-software-43.alpha/src/gs-application.c.2 gnome-software-43.alpha/src/gs-application.c ---- gnome-software-43.alpha/src/gs-application.c.2 2022-06-30 20:03:37.000000000 +0200 -+++ gnome-software-43.alpha/src/gs-application.c 2022-07-01 12:02:05.799267693 +0200 -@@ -1036,12 +1036,9 @@ gs_application_startup (GApplication *ap - G_CALLBACK (gs_application_shell_loaded_cb), - app); - -- gs_shell_setup (app->shell, app->plugin_loader, app->cancellable); - app->main_window = GTK_WINDOW (app->shell); - gtk_application_add_window (GTK_APPLICATION (app), app->main_window); - -- app->update_monitor = gs_update_monitor_new (app, app->plugin_loader); -- - gs_application_update_software_sources_presence (application); - - /* Remove possibly obsolete notifications */ -@@ -1067,6 +1064,7 @@ startup_cb (GObject *source_object, - GAsyncResult *result, - gpointer user_data) - { -+ GsApplication *app = GS_APPLICATION (user_data); - GsPluginLoader *plugin_loader = GS_PLUGIN_LOADER (source_object); - g_autoptr(GError) local_error = NULL; - -@@ -1079,6 +1077,11 @@ startup_cb (GObject *source_object, - - /* show the priority of each plugin */ - gs_plugin_loader_dump_state (plugin_loader); -+ -+ /* Setup the shell only after the plugin loader finished its setup, -+ thus all plugins are loaded and ready for the jobs. */ -+ gs_shell_setup (app->shell, app->plugin_loader, app->cancellable); -+ app->update_monitor = gs_update_monitor_new (app, app->plugin_loader); - } - - static void -diff -up gnome-software-43.alpha/src/gs-shell.c.2 gnome-software-43.alpha/src/gs-shell.c ---- gnome-software-43.alpha/src/gs-shell.c.2 2022-06-30 20:03:37.000000000 +0200 -+++ gnome-software-43.alpha/src/gs-shell.c 2022-07-01 12:01:07.782026430 +0200 -@@ -109,6 +109,7 @@ struct _GsShell - GtkWidget *primary_menu; - GtkWidget *sub_page_header_title; - -+ gboolean active_after_setup; - gboolean is_narrow; - guint allocation_changed_cb_id; - -@@ -167,6 +168,12 @@ gs_shell_modal_dialog_present (GsShell * - void - gs_shell_activate (GsShell *shell) - { -+ /* Waiting for plugin loader to setup first */ -+ if (shell->plugin_loader == NULL) { -+ shell->active_after_setup = TRUE; -+ return; -+ } -+ - gtk_widget_show (GTK_WIDGET (shell)); - gtk_window_present (GTK_WINDOW (shell)); - } -@@ -2265,6 +2272,11 @@ gs_shell_setup (GsShell *shell, GsPlugin - if (g_settings_get_boolean (shell->settings, "first-run")) - g_settings_set_boolean (shell->settings, "first-run", FALSE); - } -+ -+ if (shell->active_after_setup) { -+ shell->active_after_setup = FALSE; -+ gs_shell_activate (shell); -+ } - } - - void diff --git a/1401.patch b/1401.patch deleted file mode 100644 index dfe1925..0000000 --- a/1401.patch +++ /dev/null @@ -1,630 +0,0 @@ -From 892acd197630fb3f52ddfac5fc73196ba6759318 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 15 Jun 2022 17:47:11 +0200 -Subject: [PATCH 01/10] plugin-loader: Actively track count of running jobs - -This helps to avoid mistakes when hinting a job finished. ---- - lib/gs-plugin-loader.c | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c -index a7f86d5f2..e5c2a2c23 100644 ---- a/lib/gs-plugin-loader.c -+++ b/lib/gs-plugin-loader.c -@@ -56,6 +56,7 @@ struct _GsPluginLoader - GsAppList *pending_apps; /* (nullable) (owned) */ - - GThreadPool *queued_ops_pool; -+ gint active_jobs; - - GSettings *settings; - -@@ -3911,6 +3912,19 @@ cancellable_data_free (CancellableData *data) - - G_DEFINE_AUTOPTR_CLEANUP_FUNC (CancellableData, cancellable_data_free) - -+static void -+plugin_loader_task_freed_cb (gpointer user_data, -+ GObject *freed_object) -+{ -+ g_autoptr(GsPluginLoader) plugin_loader = user_data; -+ if (g_atomic_int_dec_and_test (&plugin_loader->active_jobs)) { -+ /* if the plugin used updates-changed during its job, actually schedule -+ * the signal emission now */ -+ if (plugin_loader->updates_changed_cnt > 0) -+ gs_plugin_loader_updates_changed (plugin_loader); -+ } -+} -+ - static gboolean job_process_setup_complete_cb (GCancellable *cancellable, - gpointer user_data); - static void job_process_cb (GTask *task); -@@ -3977,6 +3991,10 @@ gs_plugin_loader_job_process_async (GsPluginLoader *plugin_loader, - g_task_set_name (task, task_name); - g_task_set_task_data (task, g_object_ref (plugin_job), (GDestroyNotify) g_object_unref); - -+ g_atomic_int_inc (&plugin_loader->active_jobs); -+ g_object_weak_ref (G_OBJECT (task), -+ plugin_loader_task_freed_cb, g_object_ref (plugin_loader)); -+ - /* Wait until the plugin has finished setting up. - * - * Do this using a #GCancellable. While we’re not using the #GCancellable --- -GitLab - - -From 89a3767bd0ad94d3f3d83f8c4ecbb2b79072f536 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 15 Jun 2022 17:51:13 +0200 -Subject: [PATCH 02/10] plugin-loader: Remove obsolete - gs_plugin_loader_hint_job_finished() - -The function is not needed, since the plugin loader tracks count -of active jobs automatically now. ---- - lib/gs-plugin-job-refresh-metadata.c | 5 ----- - lib/gs-plugin-loader.c | 28 ---------------------------- - lib/gs-plugin-loader.h | 2 -- - 3 files changed, 35 deletions(-) - -diff --git a/lib/gs-plugin-job-refresh-metadata.c b/lib/gs-plugin-job-refresh-metadata.c -index a57b194bc..8d0b95b5d 100644 ---- a/lib/gs-plugin-job-refresh-metadata.c -+++ b/lib/gs-plugin-job-refresh-metadata.c -@@ -387,7 +387,6 @@ finish_op (GTask *task, - GError *error) - { - GsPluginJobRefreshMetadata *self = g_task_get_source_object (task); -- GsPluginLoader *plugin_loader = g_task_get_task_data (task); - g_autoptr(GError) error_owned = g_steal_pointer (&error); - g_autofree gchar *job_debug = NULL; - -@@ -408,10 +407,6 @@ finish_op (GTask *task, - progress_cb (self); - g_source_destroy (self->progress_source); - -- /* If any plugin emitted updates-changed, actually schedule it to be -- * emitted now (even if the overall operation failed). */ -- gs_plugin_loader_hint_job_finished (plugin_loader); -- - /* Get the results of the parallel ops. */ - if (self->saved_error != NULL) { - g_task_return_error (task, g_steal_pointer (&self->saved_error)); -diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c -index e5c2a2c23..fc374256d 100644 ---- a/lib/gs-plugin-loader.c -+++ b/lib/gs-plugin-loader.c -@@ -3676,9 +3676,6 @@ gs_plugin_loader_process_thread_cb (GTask *task, - /* sort these again as the refine may have added useful metadata */ - gs_plugin_loader_job_sorted_truncation_again (helper->plugin_job, list); - -- /* Hint that the job has finished. */ -- gs_plugin_loader_hint_job_finished (plugin_loader); -- - #ifdef HAVE_SYSPROF - if (plugin_loader->sysprof_writer != NULL) { - g_autofree gchar *sysprof_name = g_strconcat ("process-thread:", gs_plugin_action_to_string (action), NULL); -@@ -3849,9 +3846,6 @@ run_job_cb (GObject *source_object, - } - #endif /* HAVE_SYSPROF */ - -- /* Hint that the job has finished. */ -- gs_plugin_loader_hint_job_finished (plugin_loader); -- - /* FIXME: This will eventually go away when - * gs_plugin_loader_job_process_finish() is removed. */ - job_class = GS_PLUGIN_JOB_GET_CLASS (plugin_job); -@@ -4459,25 +4453,3 @@ gs_plugin_loader_get_category_manager (GsPluginLoader *plugin_loader) - - return plugin_loader->category_manager; - } -- --/** -- * gs_plugin_loader_hint_job_finished: -- * @plugin_loader: a #GsPluginLoader -- * -- * Hint to the @plugin_loader that the set of changes caused by the current -- * #GsPluginJob is likely to be finished. -- * -- * The @plugin_loader may emit queued-up signals as a result. -- * -- * Since: 42 -- */ --void --gs_plugin_loader_hint_job_finished (GsPluginLoader *plugin_loader) --{ -- g_return_if_fail (GS_IS_PLUGIN_LOADER (plugin_loader)); -- -- /* if the plugin used updates-changed during its job, actually schedule -- * the signal emission now */ -- if (plugin_loader->updates_changed_cnt > 0) -- gs_plugin_loader_updates_changed (plugin_loader); --} -diff --git a/lib/gs-plugin-loader.h b/lib/gs-plugin-loader.h -index 0d2035bfd..bb2c7d8e6 100644 ---- a/lib/gs-plugin-loader.h -+++ b/lib/gs-plugin-loader.h -@@ -126,6 +126,4 @@ gboolean gs_plugin_loader_app_is_compatible (GsPluginLoader *plugin_loader, - void gs_plugin_loader_run_adopt (GsPluginLoader *plugin_loader, - GsAppList *list); - --void gs_plugin_loader_hint_job_finished (GsPluginLoader *plugin_loader); -- - G_END_DECLS --- -GitLab - - -From 680726fa2fa5b7f39aa86da05f161604a132085f Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 15 Jun 2022 17:55:31 +0200 -Subject: [PATCH 03/10] plugin-loader: Schedule 'updates-changed' signal when - received with no job running - -This helps to avoid a race condition when a plugin calls -updates-changed at the end of the job, but the job is -finished before the callback gets called in the main thread. ---- - lib/gs-plugin-loader.c | 22 +++++++++++++++------- - 1 file changed, 15 insertions(+), 7 deletions(-) - -diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c -index fc374256d..d728bfc5c 100644 ---- a/lib/gs-plugin-loader.c -+++ b/lib/gs-plugin-loader.c -@@ -1774,12 +1774,6 @@ gs_plugin_loader_job_actions_changed_delay_cb (gpointer user_data) - return FALSE; - } - --static void --gs_plugin_loader_job_actions_changed_cb (GsPlugin *plugin, GsPluginLoader *plugin_loader) --{ -- plugin_loader->updates_changed_cnt++; --} -- - static void - gs_plugin_loader_updates_changed (GsPluginLoader *plugin_loader) - { -@@ -1791,6 +1785,20 @@ gs_plugin_loader_updates_changed (GsPluginLoader *plugin_loader) - g_object_ref (plugin_loader)); - } - -+static void -+gs_plugin_loader_job_updates_changed_cb (GsPlugin *plugin, -+ GsPluginLoader *plugin_loader) -+{ -+ plugin_loader->updates_changed_cnt++; -+ -+ /* Schedule emit of updates changed when no job is active. -+ This helps to avoid a race condition when a plugin calls -+ updates-changed at the end of the job, but the job is -+ finished before the callback gets called in the main thread. */ -+ if (!g_atomic_int_get (&plugin_loader->active_jobs)) -+ gs_plugin_loader_updates_changed (plugin_loader); -+} -+ - static gboolean - gs_plugin_loader_reload_delay_cb (gpointer user_data) - { -@@ -1849,7 +1857,7 @@ gs_plugin_loader_open_plugin (GsPluginLoader *plugin_loader, - return; - } - g_signal_connect (plugin, "updates-changed", -- G_CALLBACK (gs_plugin_loader_job_actions_changed_cb), -+ G_CALLBACK (gs_plugin_loader_job_updates_changed_cb), - plugin_loader); - g_signal_connect (plugin, "reload", - G_CALLBACK (gs_plugin_loader_reload_cb), --- -GitLab - - -From 3c915f31197addf8becf9aa62a07dae35b440044 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 15 Jun 2022 17:58:32 +0200 -Subject: [PATCH 04/10] plugin-loader: Change how updates-checked is scheduled - for emission - -This way the GSource can be removed without leaking the plugin loader. ---- - lib/gs-plugin-loader.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c -index d728bfc5c..9f64a3559 100644 ---- a/lib/gs-plugin-loader.c -+++ b/lib/gs-plugin-loader.c -@@ -1760,7 +1760,7 @@ gs_plugin_loader_ask_untrusted_cb (GsPlugin *plugin, - } - - static gboolean --gs_plugin_loader_job_actions_changed_delay_cb (gpointer user_data) -+gs_plugin_loader_job_updates_changed_delay_cb (gpointer user_data) - { - GsPluginLoader *plugin_loader = GS_PLUGIN_LOADER (user_data); - -@@ -1770,7 +1770,6 @@ gs_plugin_loader_job_actions_changed_delay_cb (gpointer user_data) - plugin_loader->updates_changed_id = 0; - plugin_loader->updates_changed_cnt = 0; - -- g_object_unref (plugin_loader); - return FALSE; - } - -@@ -1780,9 +1779,11 @@ gs_plugin_loader_updates_changed (GsPluginLoader *plugin_loader) - if (plugin_loader->updates_changed_id != 0) - return; - plugin_loader->updates_changed_id = -- g_timeout_add_seconds (GS_PLUGIN_LOADER_UPDATES_CHANGED_DELAY, -- gs_plugin_loader_job_actions_changed_delay_cb, -- g_object_ref (plugin_loader)); -+ g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, -+ GS_PLUGIN_LOADER_UPDATES_CHANGED_DELAY, -+ gs_plugin_loader_job_updates_changed_delay_cb, -+ g_object_ref (plugin_loader), -+ g_object_unref); - } - - static void --- -GitLab - - -From 2930c01ee97a10577fa2860bd8df1124cfb7128d Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 15 Jun 2022 18:02:11 +0200 -Subject: [PATCH 05/10] plugin-loader: Add - gs_plugin_loader_emit_updates_changed() - -It will help to avoid delays with the GUI after changes in the updates. ---- - lib/gs-plugin-loader.c | 23 +++++++++++++++++++++++ - lib/gs-plugin-loader.h | 1 + - 2 files changed, 24 insertions(+) - -diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c -index 9f64a3559..c0e711477 100644 ---- a/lib/gs-plugin-loader.c -+++ b/lib/gs-plugin-loader.c -@@ -4462,3 +4462,26 @@ gs_plugin_loader_get_category_manager (GsPluginLoader *plugin_loader) - - return plugin_loader->category_manager; - } -+ -+/** -+ * gs_plugin_loader_emit_updates_changed: -+ * @self: a #GsPluginLoader -+ * -+ * Emits the #GsPluginLoader:updates-changed signal in the nearest -+ * idle in the main thread. -+ * -+ * Since: 43 -+ **/ -+void -+gs_plugin_loader_emit_updates_changed (GsPluginLoader *self) -+{ -+ g_return_if_fail (GS_IS_PLUGIN_LOADER (self)); -+ -+ if (self->updates_changed_id != 0) -+ g_source_remove (self->updates_changed_id); -+ -+ self->updates_changed_id = -+ g_idle_add_full (G_PRIORITY_HIGH_IDLE, -+ gs_plugin_loader_job_updates_changed_delay_cb, -+ g_object_ref (self), g_object_unref); -+} -diff --git a/lib/gs-plugin-loader.h b/lib/gs-plugin-loader.h -index bb2c7d8e6..91c5f643c 100644 ---- a/lib/gs-plugin-loader.h -+++ b/lib/gs-plugin-loader.h -@@ -125,5 +125,6 @@ gboolean gs_plugin_loader_app_is_compatible (GsPluginLoader *plugin_loader, - - void gs_plugin_loader_run_adopt (GsPluginLoader *plugin_loader, - GsAppList *list); -+void gs_plugin_loader_emit_updates_changed (GsPluginLoader *self); - - G_END_DECLS --- -GitLab - - -From edfbbfb0be112b76becc1f38c920cfd45a95885c Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 15 Jun 2022 18:05:38 +0200 -Subject: [PATCH 06/10] gs-app: Add gs_app_is_downloaded() - -This avoid code duplication on two places. It also makes sure the places -agree on the way the app is/is-not downloaded is determined. ---- - lib/gs-app.c | 32 ++++++++++++++++++++++++++++++++ - lib/gs-app.h | 1 + - 2 files changed, 33 insertions(+) - -diff --git a/lib/gs-app.c b/lib/gs-app.c -index 29898765b..d7f8be279 100644 ---- a/lib/gs-app.c -+++ b/lib/gs-app.c -@@ -6656,3 +6656,35 @@ gs_app_set_has_translations (GsApp *app, - priv->has_translations = has_translations; - gs_app_queue_notify (app, obj_props[PROP_HAS_TRANSLATIONS]); - } -+ -+/** -+ * gs_app_is_downloaded: -+ * @app: a #GsApp -+ * -+ * Returns whether the @app is downloaded for updates or not, -+ * considering also its dependencies. -+ * -+ * Returns: %TRUE, when the @app is downloaded, %FALSE otherwise -+ * -+ * Since: 43 -+ **/ -+gboolean -+gs_app_is_downloaded (GsApp *app) -+{ -+ GsSizeType size_type; -+ guint64 size_bytes = 0; -+ -+ g_return_val_if_fail (GS_IS_APP (app), FALSE); -+ -+ if (!gs_app_has_quirk (app, GS_APP_QUIRK_IS_PROXY)) { -+ size_type = gs_app_get_size_download (app, &size_bytes); -+ if (size_type != GS_SIZE_TYPE_VALID || size_bytes != 0) -+ return FALSE; -+ } -+ -+ size_type = gs_app_get_size_download_dependencies (app, &size_bytes); -+ if (size_type != GS_SIZE_TYPE_VALID || size_bytes != 0) -+ return FALSE; -+ -+ return TRUE; -+} -diff --git a/lib/gs-app.h b/lib/gs-app.h -index d78503c3e..a053299f2 100644 ---- a/lib/gs-app.h -+++ b/lib/gs-app.h -@@ -516,5 +516,6 @@ void gs_app_set_relations (GsApp *app, - gboolean gs_app_get_has_translations (GsApp *app); - void gs_app_set_has_translations (GsApp *app, - gboolean has_translations); -+gboolean gs_app_is_downloaded (GsApp *app); - - G_END_DECLS --- -GitLab - - -From c6903fd6b74ddbde5db045ea67fc826824153210 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 15 Jun 2022 18:15:04 +0200 -Subject: [PATCH 07/10] updates-section: Use gs_app_is_downloaded() - ---- - src/gs-updates-section.c | 10 +--------- - 1 file changed, 1 insertion(+), 9 deletions(-) - -diff --git a/src/gs-updates-section.c b/src/gs-updates-section.c -index ca39e6fab..69e083984 100644 ---- a/src/gs-updates-section.c -+++ b/src/gs-updates-section.c -@@ -288,15 +288,7 @@ _all_offline_updates_downloaded (GsUpdatesSection *self) - /* use the download size to figure out what is downloaded and what not */ - for (guint i = 0; i < gs_app_list_length (self->list); i++) { - GsApp *app = gs_app_list_index (self->list, i); -- GsSizeType size_type; -- guint64 size_bytes; -- -- size_type = gs_app_get_size_download (app, &size_bytes); -- if (size_type != GS_SIZE_TYPE_VALID || size_bytes != 0) -- return FALSE; -- -- size_type = gs_app_get_size_download_dependencies (app, &size_bytes); -- if (size_type != GS_SIZE_TYPE_VALID || size_bytes != 0) -+ if (!gs_app_is_downloaded (app)) - return FALSE; - } - --- -GitLab - - -From 972def24d2bc54b09fe57879efb4c30962858dc0 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 15 Jun 2022 18:15:25 +0200 -Subject: [PATCH 08/10] update-monitor: Use gs_app_is_downloaded() - ---- - src/gs-update-monitor.c | 10 +++------- - 1 file changed, 3 insertions(+), 7 deletions(-) - -diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c -index 324ff4d3e..a2dc9bb92 100644 ---- a/src/gs-update-monitor.c -+++ b/src/gs-update-monitor.c -@@ -125,22 +125,18 @@ check_updates_kind (GsAppList *apps, - - for (ii = 0; ii < len && (!has_important || all_downloaded || !any_downloaded); ii++) { - gboolean is_important; -- guint64 size_download_bytes; - - app = gs_app_list_index (apps, ii); - - is_important = gs_app_get_update_urgency (app) == AS_URGENCY_KIND_CRITICAL; - has_important = has_important || is_important; - -- /* took from gs-updates-section.c: _all_offline_updates_downloaded(); -- the app is considered downloaded, when its download size is 0 */ -- if (gs_app_get_size_download (app, &size_download_bytes) != GS_SIZE_TYPE_VALID || -- size_download_bytes != 0) { -- all_downloaded = FALSE; -- } else { -+ if (gs_app_is_downloaded (app)) { - any_downloaded = TRUE; - if (is_important) - any_important_downloaded = TRUE; -+ } else { -+ all_downloaded = FALSE; - } - } - --- -GitLab - - -From 1aaa9617fc81651f17ed2f864bec35b958d67eed Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 15 Jun 2022 18:17:18 +0200 -Subject: [PATCH 09/10] update-monitor: Force reload of the Updates page before - showing notification - -Thus it reflects what the update-monitor notifies about. ---- - src/gs-update-monitor.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c -index a2dc9bb92..01e5869eb 100644 ---- a/src/gs-update-monitor.c -+++ b/src/gs-update-monitor.c -@@ -288,6 +288,10 @@ notify_about_pending_updates (GsUpdateMonitor *monitor, - return; - } - -+ /* To force reload of the Updates page, thus it reflects what -+ the update-monitor notifies about */ -+ gs_plugin_loader_emit_updates_changed (monitor->plugin_loader); -+ - monitor->last_notification_time_usec = g_get_real_time (); - - g_debug ("Notify about update: '%s'", title); --- -GitLab - - -From 64585205437371c459d5de792d50af95e23ba346 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 15 Jun 2022 18:19:36 +0200 -Subject: [PATCH 10/10] update-monitor: Change when notifications are shown - -This handles the fact that offline updates can be installed either -all in once or none of them, which is reflected in the notification. ---- - src/gs-update-monitor.c | 34 ++++++++++++++-------------------- - 1 file changed, 14 insertions(+), 20 deletions(-) - -diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c -index 01e5869eb..292d2bc4b 100644 ---- a/src/gs-update-monitor.c -+++ b/src/gs-update-monitor.c -@@ -109,17 +109,15 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(WithAppData, with_app_data_free); - static void - check_updates_kind (GsAppList *apps, - gboolean *out_has_important, -- gboolean *out_any_important_downloaded, - gboolean *out_all_downloaded, - gboolean *out_any_downloaded) - { -- gboolean has_important, any_important_downloaded, all_downloaded, any_downloaded; -+ gboolean has_important, all_downloaded, any_downloaded; - guint ii, len; - GsApp *app; - - len = gs_app_list_length (apps); - has_important = FALSE; -- any_important_downloaded = FALSE; - all_downloaded = len > 0; - any_downloaded = FALSE; - -@@ -131,17 +129,13 @@ check_updates_kind (GsAppList *apps, - is_important = gs_app_get_update_urgency (app) == AS_URGENCY_KIND_CRITICAL; - has_important = has_important || is_important; - -- if (gs_app_is_downloaded (app)) { -+ if (gs_app_is_downloaded (app)) - any_downloaded = TRUE; -- if (is_important) -- any_important_downloaded = TRUE; -- } else { -+ else - all_downloaded = FALSE; -- } - } - - *out_has_important = has_important; -- *out_any_important_downloaded = any_important_downloaded; - *out_all_downloaded = all_downloaded; - *out_any_downloaded = any_downloaded; - } -@@ -193,14 +187,15 @@ should_download_updates (GsUpdateMonitor *monitor) - #endif - } - --/* The days below are discussed at https://gitlab.gnome.org/GNOME/gnome-software/-/issues/947 */ -+/* The days below are discussed at https://gitlab.gnome.org/GNOME/gnome-software/-/issues/947 -+ and https://wiki.gnome.org/Design/Apps/Software/Updates#Tentative_Design */ - static gboolean - should_notify_about_pending_updates (GsUpdateMonitor *monitor, - GsAppList *apps, - const gchar **out_title, - const gchar **out_body) - { -- gboolean has_important = FALSE, any_important_downloaded = FALSE, all_downloaded = FALSE, any_downloaded = FALSE; -+ gboolean has_important = FALSE, all_downloaded = FALSE, any_downloaded = FALSE; - gboolean should_download, res = FALSE; - gint64 timestamp_days; - -@@ -210,7 +205,7 @@ should_notify_about_pending_updates (GsUpdateMonitor *monitor, - } - - should_download = should_download_updates (monitor); -- check_updates_kind (apps, &has_important, &any_important_downloaded, &all_downloaded, &any_downloaded); -+ check_updates_kind (apps, &has_important, &all_downloaded, &any_downloaded); - - if (!gs_app_list_length (apps)) { - /* Notify only when the download is disabled and it's the 4th day or it's more than 7 days */ -@@ -221,7 +216,7 @@ should_notify_about_pending_updates (GsUpdateMonitor *monitor, - } - } else if (has_important) { - if (timestamp_days >= 1) { -- if (any_important_downloaded) { -+ if (all_downloaded) { - *out_title = _("Critical Software Update Ready to Install"); - *out_body = _("An important software update is ready to be installed."); - res = TRUE; -@@ -231,24 +226,23 @@ should_notify_about_pending_updates (GsUpdateMonitor *monitor, - res = TRUE; - } - } -- /* When automatic updates are on and there are things ready to be installed, then rather claim -- * about things to be installed, than things to be downloaded. */ -- } else if (all_downloaded || (any_downloaded && should_download)) { -+ } else if (all_downloaded) { - if (timestamp_days >= 3) { - *out_title = _("Software Updates Ready to Install"); - *out_body = _("Software updates are waiting and ready to be installed."); - res = TRUE; - } -- /* To not hide downloaded updates for 14 days when new updates were discovered meanwhile */ -- } else if (timestamp_days >= (any_downloaded ? 3 : 14)) { -+ /* To not hide downloaded updates for 14 days when new updates were discovered meanwhile. -+ Never show "Available to Download" when it's supposed to download the updates. */ -+ } else if (!should_download && timestamp_days >= 14) { - *out_title = _("Software Updates Available to Download"); - *out_body = _("Please download waiting software updates."); - res = TRUE; - } - -- g_debug ("%s: last_test_days:%" G_GINT64_FORMAT " n-apps:%u should_download:%d has_important:%d any_important_downloaded:%d " -+ g_debug ("%s: last_test_days:%" G_GINT64_FORMAT " n-apps:%u should_download:%d has_important:%d " - "all_downloaded:%d any_downloaded:%d res:%d%s%s%s%s", G_STRFUNC, -- timestamp_days, gs_app_list_length (apps), should_download, has_important, any_important_downloaded, -+ timestamp_days, gs_app_list_length (apps), should_download, has_important, - all_downloaded, any_downloaded, res, - res ? " reason:" : "", - res ? *out_title : "", --- -GitLab - diff --git a/gnome-software.spec b/gnome-software.spec index 4ba8c34..59d9ebe 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -17,8 +17,8 @@ %global __provides_exclude_from ^%{_libdir}/%{name}/plugins-%{gs_plugin_version}/.*\\.so.*$ Name: gnome-software -Version: 43.alpha -Release: 3%{?dist} +Version: 43.beta +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -26,13 +26,6 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/43/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch -Patch02: 0002-shell-setup-order.patch -# Fix bug that makes update impossible when "System Updates" present -# Fix issues with notifications and app not matching -# https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1816 -# https://pagure.io/fedora-workstation/issue/107 -# https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/1401 -Patch03: 1401.patch BuildRequires: docbook-style-xsl BuildRequires: desktop-file-utils @@ -136,6 +129,9 @@ This package includes the rpm-ostree backend. # remove unneeded dpkg plugin rm %{buildroot}%{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_dpkg.so +# not meant to be installed by the distros +rm %{buildroot}%{_datadir}/swcatalog/xml/org.gnome.Software.Curated.xml + # make the software center load faster desktop-file-edit %{buildroot}%{_datadir}/applications/org.gnome.Software.desktop \ --set-key=X-AppInstall-Package --set-value=%{name} @@ -166,7 +162,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/apps/org.gnome.Software.svg %{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Software-symbolic.svg %{_datadir}/icons/hicolor/scalable/actions/app-remove-symbolic.svg -%{_datadir}/icons/hicolor/scalable/status/software-installed-symbolic.svg %{_datadir}/metainfo/org.gnome.Software.metainfo.xml %{_datadir}/metainfo/org.gnome.Software.Plugin.Epiphany.metainfo.xml %{_datadir}/metainfo/org.gnome.Software.Plugin.Flatpak.metainfo.xml @@ -195,7 +190,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %dir %{_datadir}/swcatalog %dir %{_datadir}/swcatalog/xml %{_datadir}/swcatalog/xml/gnome-pwa-list-foss.xml -%{_datadir}/swcatalog/xml/org.gnome.Software.Curated.xml %{_datadir}/swcatalog/xml/org.gnome.Software.Featured.xml %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service %{_datadir}/dbus-1/services/org.gnome.Software.service @@ -218,6 +212,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Fri Aug 05 2022 Milan Crha - 43.beta-1 +- Update to 43.beta + * Thu Jul 21 2022 Fedora Release Engineering - 43.alpha-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index 5bbe6b2..27a6c41 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-43.alpha.tar.xz) = 796b77e763f0ad0c8103b39563ce792b9354126762594addba38a993628f273938a27ed09b9d3c469fb9d11d7a86502960faf9c88914347ec5263e0f626dbb1e +SHA512 (gnome-software-43.beta.tar.xz) = 9dd2d1f3bebf4715dfbe4db636ca068ac53ae4d463d20f02421eb2990edc75e3b29b78436b8539027056042b6dda2ff55e9d6add1c5c9f8693899ce7a80065de From a0175cb9f497b5145d5d0b95ebb9830f637358e1 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 15 Aug 2022 13:37:14 +0200 Subject: [PATCH 037/138] Add patch for install-queue (RH bug #2118265) --- 0002-install-queue.patch | 112 +++++++++++++++++++++++++++++++++++++++ gnome-software.spec | 6 ++- 2 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 0002-install-queue.patch diff --git a/0002-install-queue.patch b/0002-install-queue.patch new file mode 100644 index 0000000..698d1d0 --- /dev/null +++ b/0002-install-queue.patch @@ -0,0 +1,112 @@ +From d9e28b8cb59c805f2df8954637f2056467ff1be3 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 10 Aug 2022 13:41:46 +0200 +Subject: [PATCH 1/2] packagekit: Allow install of apps in the "queued for + install" state + +Treat the "queued for install" state the same as if "available/updatable" +state is set. Without that trying to install anything using PackageKit +plugin leads to an "Unsupported" error. +--- + plugins/packagekit/gs-plugin-packagekit.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c +index 58d627276..85f941648 100644 +--- a/plugins/packagekit/gs-plugin-packagekit.c ++++ b/plugins/packagekit/gs-plugin-packagekit.c +@@ -519,6 +519,7 @@ gs_plugin_app_install (GsPlugin *plugin, + switch (gs_app_get_state (app)) { + case GS_APP_STATE_AVAILABLE: + case GS_APP_STATE_UPDATABLE: ++ case GS_APP_STATE_QUEUED_FOR_INSTALL: + source_ids = gs_app_get_source_ids (app); + if (source_ids->len == 0) { + g_set_error_literal (error, +-- +GitLab + + +From 71ce53a21373670f32b936194d46ab073df77a63 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 10 Aug 2022 14:24:51 +0200 +Subject: [PATCH 2/2] gs-plugin-loader: Add not removed from the install-queue + file + +The plugin loader has two places, which maintain the pending queue, +but they do not agree on the update of the install-queue file. Let +the functions be re-used, to avoid the problem. +--- + lib/gs-plugin-loader.c | 27 +++++++++++++++++---------- + 1 file changed, 17 insertions(+), 10 deletions(-) + +diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c +index 073008d55..e3f48666a 100644 +--- a/lib/gs-plugin-loader.c ++++ b/lib/gs-plugin-loader.c +@@ -88,6 +88,7 @@ struct _GsPluginLoader + + static void gs_plugin_loader_monitor_network (GsPluginLoader *plugin_loader); + static void add_app_to_install_queue (GsPluginLoader *plugin_loader, GsApp *app); ++static gboolean remove_app_from_install_queue (GsPluginLoader *plugin_loader, GsApp *app); + static void gs_plugin_loader_process_in_thread_pool_cb (gpointer data, gpointer user_data); + static void gs_plugin_loader_status_changed_cb (GsPlugin *plugin, + GsApp *app, +@@ -1078,17 +1079,22 @@ gs_plugin_loader_pending_apps_add (GsPluginLoader *plugin_loader, + GsPluginLoaderHelper *helper) + { + GsAppList *list = gs_plugin_job_get_list (helper->plugin_job); +- g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&plugin_loader->pending_apps_mutex); +- +- if (plugin_loader->pending_apps == NULL) +- plugin_loader->pending_apps = gs_app_list_new (); + + g_assert (gs_app_list_length (list) > 0); + for (guint i = 0; i < gs_app_list_length (list); i++) { + GsApp *app = gs_app_list_index (list, i); +- gs_app_list_add (plugin_loader->pending_apps, app); +- /* make sure the progress is properly initialized */ +- gs_app_set_progress (app, GS_APP_PROGRESS_UNKNOWN); ++ switch (gs_plugin_job_get_action (helper->plugin_job)) { ++ case GS_PLUGIN_ACTION_INSTALL: ++ add_app_to_install_queue (plugin_loader, app); ++ /* make sure the progress is properly initialized */ ++ gs_app_set_progress (app, GS_APP_PROGRESS_UNKNOWN); ++ break; ++ case GS_PLUGIN_ACTION_REMOVE: ++ remove_app_from_install_queue (plugin_loader, app); ++ break; ++ default: ++ break; ++ } + } + g_idle_add (emit_pending_apps_idle, g_object_ref (plugin_loader)); + } +@@ -1098,13 +1104,11 @@ gs_plugin_loader_pending_apps_remove (GsPluginLoader *plugin_loader, + GsPluginLoaderHelper *helper) + { + GsAppList *list = gs_plugin_job_get_list (helper->plugin_job); +- g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&plugin_loader->pending_apps_mutex); + + g_assert (gs_app_list_length (list) > 0); + for (guint i = 0; i < gs_app_list_length (list); i++) { + GsApp *app = gs_app_list_index (list, i); +- if (plugin_loader->pending_apps != NULL) +- gs_app_list_remove (plugin_loader->pending_apps, app); ++ remove_app_from_install_queue (plugin_loader, app); + + /* check the app is not still in an action helper */ + switch (gs_app_get_state (app)) { +@@ -1272,6 +1276,9 @@ remove_app_from_install_queue (GsPluginLoader *plugin_loader, GsApp *app) + g_mutex_unlock (&plugin_loader->pending_apps_mutex); + + if (ret) { ++ if (gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL) ++ gs_app_set_state (app, GS_APP_STATE_UNKNOWN); ++ + id = g_idle_add (emit_pending_apps_idle, g_object_ref (plugin_loader)); + g_source_set_name_by_id (id, "[gnome-software] emit_pending_apps_idle"); + save_install_queue (plugin_loader); +-- +GitLab + diff --git a/gnome-software.spec b/gnome-software.spec index 59d9ebe..e141c89 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -18,7 +18,7 @@ Name: gnome-software Version: 43.beta -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -26,6 +26,7 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/43/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch +Patch02: 0002-install-queue.patch BuildRequires: docbook-style-xsl BuildRequires: desktop-file-utils @@ -212,6 +213,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Mon Aug 15 2022 Milan Crha - 43.beta-2 +- Add patch for install-queue + * Fri Aug 05 2022 Milan Crha - 43.beta-1 - Update to 43.beta From 6a61ae4b2d97cf5a3905bd6da6efc88538a9087d Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 17 Aug 2022 15:52:58 +0200 Subject: [PATCH 038/138] Resolves: #2119089 (No enough apps to show for the "Editor's Choice" section) --- gnome-software.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnome-software.spec b/gnome-software.spec index e141c89..cd0dec2 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -18,7 +18,7 @@ Name: gnome-software Version: 43.beta -Release: 2%{?dist} +Release: 3%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -130,9 +130,6 @@ This package includes the rpm-ostree backend. # remove unneeded dpkg plugin rm %{buildroot}%{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_dpkg.so -# not meant to be installed by the distros -rm %{buildroot}%{_datadir}/swcatalog/xml/org.gnome.Software.Curated.xml - # make the software center load faster desktop-file-edit %{buildroot}%{_datadir}/applications/org.gnome.Software.desktop \ --set-key=X-AppInstall-Package --set-value=%{name} @@ -191,6 +188,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %dir %{_datadir}/swcatalog %dir %{_datadir}/swcatalog/xml %{_datadir}/swcatalog/xml/gnome-pwa-list-foss.xml +%{_datadir}/swcatalog/xml/org.gnome.Software.Curated.xml %{_datadir}/swcatalog/xml/org.gnome.Software.Featured.xml %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service %{_datadir}/dbus-1/services/org.gnome.Software.service @@ -213,6 +211,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Wed Aug 17 2022 Milan Crha - 43.beta-3 +- Resolves: #2119089 (No enough apps to show for the "Editor's Choice" section) + * Mon Aug 15 2022 Milan Crha - 43.beta-2 - Add patch for install-queue From f744223b09eef29afe8c6084e973bc4c99d43110 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 18 Aug 2022 07:37:04 +0200 Subject: [PATCH 039/138] Add rpminspect.yaml (settings for the RUNPATH test) --- rpminspect.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 rpminspect.yaml diff --git a/rpminspect.yaml b/rpminspect.yaml new file mode 100644 index 0000000..ef70fcd --- /dev/null +++ b/rpminspect.yaml @@ -0,0 +1,7 @@ +--- +runpath: + allowed_paths: + - /usr/lib/gnome-software + - /usr/lib/rpm-ostree + - /usr/lib64/gnome-software + - /usr/lib64/rpm-ostree From 17177232497d1c236a81f7d699853b5e2cb4f3b2 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 2 Sep 2022 10:51:15 +0200 Subject: [PATCH 040/138] Update to 43.rc --- 0002-install-queue.patch | 112 --------------------------------------- gnome-software.spec | 13 +++-- sources | 2 +- 3 files changed, 9 insertions(+), 118 deletions(-) delete mode 100644 0002-install-queue.patch diff --git a/0002-install-queue.patch b/0002-install-queue.patch deleted file mode 100644 index 698d1d0..0000000 --- a/0002-install-queue.patch +++ /dev/null @@ -1,112 +0,0 @@ -From d9e28b8cb59c805f2df8954637f2056467ff1be3 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 10 Aug 2022 13:41:46 +0200 -Subject: [PATCH 1/2] packagekit: Allow install of apps in the "queued for - install" state - -Treat the "queued for install" state the same as if "available/updatable" -state is set. Without that trying to install anything using PackageKit -plugin leads to an "Unsupported" error. ---- - plugins/packagekit/gs-plugin-packagekit.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c -index 58d627276..85f941648 100644 ---- a/plugins/packagekit/gs-plugin-packagekit.c -+++ b/plugins/packagekit/gs-plugin-packagekit.c -@@ -519,6 +519,7 @@ gs_plugin_app_install (GsPlugin *plugin, - switch (gs_app_get_state (app)) { - case GS_APP_STATE_AVAILABLE: - case GS_APP_STATE_UPDATABLE: -+ case GS_APP_STATE_QUEUED_FOR_INSTALL: - source_ids = gs_app_get_source_ids (app); - if (source_ids->len == 0) { - g_set_error_literal (error, --- -GitLab - - -From 71ce53a21373670f32b936194d46ab073df77a63 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 10 Aug 2022 14:24:51 +0200 -Subject: [PATCH 2/2] gs-plugin-loader: Add not removed from the install-queue - file - -The plugin loader has two places, which maintain the pending queue, -but they do not agree on the update of the install-queue file. Let -the functions be re-used, to avoid the problem. ---- - lib/gs-plugin-loader.c | 27 +++++++++++++++++---------- - 1 file changed, 17 insertions(+), 10 deletions(-) - -diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c -index 073008d55..e3f48666a 100644 ---- a/lib/gs-plugin-loader.c -+++ b/lib/gs-plugin-loader.c -@@ -88,6 +88,7 @@ struct _GsPluginLoader - - static void gs_plugin_loader_monitor_network (GsPluginLoader *plugin_loader); - static void add_app_to_install_queue (GsPluginLoader *plugin_loader, GsApp *app); -+static gboolean remove_app_from_install_queue (GsPluginLoader *plugin_loader, GsApp *app); - static void gs_plugin_loader_process_in_thread_pool_cb (gpointer data, gpointer user_data); - static void gs_plugin_loader_status_changed_cb (GsPlugin *plugin, - GsApp *app, -@@ -1078,17 +1079,22 @@ gs_plugin_loader_pending_apps_add (GsPluginLoader *plugin_loader, - GsPluginLoaderHelper *helper) - { - GsAppList *list = gs_plugin_job_get_list (helper->plugin_job); -- g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&plugin_loader->pending_apps_mutex); -- -- if (plugin_loader->pending_apps == NULL) -- plugin_loader->pending_apps = gs_app_list_new (); - - g_assert (gs_app_list_length (list) > 0); - for (guint i = 0; i < gs_app_list_length (list); i++) { - GsApp *app = gs_app_list_index (list, i); -- gs_app_list_add (plugin_loader->pending_apps, app); -- /* make sure the progress is properly initialized */ -- gs_app_set_progress (app, GS_APP_PROGRESS_UNKNOWN); -+ switch (gs_plugin_job_get_action (helper->plugin_job)) { -+ case GS_PLUGIN_ACTION_INSTALL: -+ add_app_to_install_queue (plugin_loader, app); -+ /* make sure the progress is properly initialized */ -+ gs_app_set_progress (app, GS_APP_PROGRESS_UNKNOWN); -+ break; -+ case GS_PLUGIN_ACTION_REMOVE: -+ remove_app_from_install_queue (plugin_loader, app); -+ break; -+ default: -+ break; -+ } - } - g_idle_add (emit_pending_apps_idle, g_object_ref (plugin_loader)); - } -@@ -1098,13 +1104,11 @@ gs_plugin_loader_pending_apps_remove (GsPluginLoader *plugin_loader, - GsPluginLoaderHelper *helper) - { - GsAppList *list = gs_plugin_job_get_list (helper->plugin_job); -- g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&plugin_loader->pending_apps_mutex); - - g_assert (gs_app_list_length (list) > 0); - for (guint i = 0; i < gs_app_list_length (list); i++) { - GsApp *app = gs_app_list_index (list, i); -- if (plugin_loader->pending_apps != NULL) -- gs_app_list_remove (plugin_loader->pending_apps, app); -+ remove_app_from_install_queue (plugin_loader, app); - - /* check the app is not still in an action helper */ - switch (gs_app_get_state (app)) { -@@ -1272,6 +1276,9 @@ remove_app_from_install_queue (GsPluginLoader *plugin_loader, GsApp *app) - g_mutex_unlock (&plugin_loader->pending_apps_mutex); - - if (ret) { -+ if (gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL) -+ gs_app_set_state (app, GS_APP_STATE_UNKNOWN); -+ - id = g_idle_add (emit_pending_apps_idle, g_object_ref (plugin_loader)); - g_source_set_name_by_id (id, "[gnome-software] emit_pending_apps_idle"); - save_install_queue (plugin_loader); --- -GitLab - diff --git a/gnome-software.spec b/gnome-software.spec index cd0dec2..9545378 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -17,8 +17,8 @@ %global __provides_exclude_from ^%{_libdir}/%{name}/plugins-%{gs_plugin_version}/.*\\.so.*$ Name: gnome-software -Version: 43.beta -Release: 3%{?dist} +Version: 43.rc +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -26,7 +26,6 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/43/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch -Patch02: 0002-install-queue.patch BuildRequires: docbook-style-xsl BuildRequires: desktop-file-utils @@ -56,7 +55,6 @@ BuildRequires: pkgconfig(polkit-gobject-1) BuildRequires: pkgconfig(rpm) BuildRequires: pkgconfig(rpm-ostree-1) BuildRequires: pkgconfig(sysprof-capture-4) -BuildRequires: pkgconfig(valgrind) BuildRequires: pkgconfig(xmlb) >= %{libxmlb_version} Requires: appstream-data @@ -154,7 +152,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %doc AUTHORS README.md %license COPYING %{_bindir}/gnome-software -%{_datadir}/applications/gnome-software-local-file.desktop +%{_datadir}/applications/gnome-software-local-file-flatpak.desktop +%{_datadir}/applications/gnome-software-local-file-fwupd.desktop +%{_datadir}/applications/gnome-software-local-file-packagekit.desktop %{_datadir}/applications/org.gnome.Software.desktop %{_mandir}/man1/gnome-software.1* %{_datadir}/icons/hicolor/*/apps/org.gnome.Software.svg @@ -211,6 +211,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Fri Sep 02 2022 Milan Crha - 43.rc-1 +- Update to 43.rc + * Wed Aug 17 2022 Milan Crha - 43.beta-3 - Resolves: #2119089 (No enough apps to show for the "Editor's Choice" section) diff --git a/sources b/sources index 27a6c41..edd91e5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-43.beta.tar.xz) = 9dd2d1f3bebf4715dfbe4db636ca068ac53ae4d463d20f02421eb2990edc75e3b29b78436b8539027056042b6dda2ff55e9d6add1c5c9f8693899ce7a80065de +SHA512 (gnome-software-43.rc.tar.xz) = b843e30ad842500cbab19ce32566162961ce50d7ef2e4a9f7cdf969acb2ce074de6928dfa8c3813a1e89fb91868d7fc17daa6e9c36db7c45255e6e8b80552340 From 5457a5ba01c1ba3c9355095540ca7eabbae62d85 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 12 Sep 2022 09:04:52 +0200 Subject: [PATCH 041/138] Resolves: #2125569 (Correct property name in GsRemovalDialog .ui file) --- 0008-gs-removal-dialog-crrect-property-name.patch | 13 +++++++++++++ gnome-software.spec | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 0008-gs-removal-dialog-crrect-property-name.patch diff --git a/0008-gs-removal-dialog-crrect-property-name.patch b/0008-gs-removal-dialog-crrect-property-name.patch new file mode 100644 index 0000000..f800b2c --- /dev/null +++ b/0008-gs-removal-dialog-crrect-property-name.patch @@ -0,0 +1,13 @@ +diff --git a/src/gs-removal-dialog.ui b/src/gs-removal-dialog.ui +index 298900eb2..0cff1321a 100644 +--- a/src/gs-removal-dialog.ui ++++ b/src/gs-removal-dialog.ui +@@ -1,7 +1,7 @@ + + +