From d28da8bb24530af49382dd4855ce176814e13451 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jul 14 2020 01:23:41 +0000 Subject: import gnome-software-3.36.1-4.el8 --- diff --git a/SOURCES/0001-Improve-the-heuristic-for-detecting-old-style-AppStr.patch b/SOURCES/0001-Improve-the-heuristic-for-detecting-old-style-AppStr.patch new file mode 100644 index 0000000..37ad96d --- /dev/null +++ b/SOURCES/0001-Improve-the-heuristic-for-detecting-old-style-AppStr.patch @@ -0,0 +1,69 @@ +From bc31889bf90e14776e4404cd58e9b0244efc4f2e Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Tue, 9 Jun 2020 21:42:41 +0200 +Subject: [PATCH] Improve the heuristic for detecting old-style AppStream + override files + +The heuristic was trying to detect old-style AppStream override files +that have the following structure: + + + org.kde.amarok.desktop + + AudioVideo + Featured + + + +When it found one, it gave it the wildcard quirk to avoid leaking the +result to the installed apps list. + +This however incorrectly tripped on old appdata files that didn't +specify name and relied on filling the missing name/summary/icon from +the desktop file. + +Fix this by tightening the heuristic and also look for + that none of the override files should have. + +This fixes RHEL firefox package to correctly show up when clicking on +'Show Details' in GNOME Shell. +--- + plugins/core/gs-appstream.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c +index a387f2e0..da9ba970 100644 +--- a/plugins/core/gs-appstream.c ++++ b/plugins/core/gs-appstream.c +@@ -746,6 +746,13 @@ gs_appstream_refine_app (GsPlugin *plugin, + gs_app_remove_quirk (app, GS_APP_QUIRK_HIDE_EVERYWHERE); + } + ++ /* try to detect old-style AppStream 'override' ++ * files without the merge attribute */ ++ if (xb_node_query_text (component, "name", NULL) == NULL && ++ xb_node_query_text (component, "metadata_license", NULL) == NULL) { ++ gs_app_add_quirk (app, GS_APP_QUIRK_IS_WILDCARD); ++ } ++ + /* set id */ + tmp = xb_node_query_text (component, "id", NULL); + if (tmp != NULL && gs_app_get_id (app) == NULL) +@@ -770,13 +777,8 @@ gs_appstream_refine_app (GsPlugin *plugin, + + /* set name */ + tmp = xb_node_query_text (component, "name", NULL); +- if (tmp != NULL) { ++ if (tmp != NULL) + gs_app_set_name (app, GS_APP_QUALITY_HIGHEST, tmp); +- } else { +- /* this is a heuristic, but works even with old-style AppStream +- * files without the merge attribute */ +- gs_app_add_quirk (app, GS_APP_QUIRK_IS_WILDCARD); +- } + + /* set summary */ + tmp = xb_node_query_text (component, "summary", NULL); +-- +2.26.2 + diff --git a/SPECS/gnome-software.spec b/SPECS/gnome-software.spec index f465426..d6742f6 100644 --- a/SPECS/gnome-software.spec +++ b/SPECS/gnome-software.spec @@ -14,7 +14,7 @@ Name: gnome-software Version: 3.36.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -30,6 +30,8 @@ Patch1: 0002-Add-webflow-auth-support-to-flatpak-plugin.patch Patch2: add-back-shell-extensions-support.patch # Fix hardcoded desktop and appdata names to match what's in RHEL 8.3 Patch3: 0001-Fix-hardcoded-desktop-and-appdata-names-to-match-wha.patch +# Fix 'Show Details' to correctly work for rpm-installed firefox +Patch4: 0001-Improve-the-heuristic-for-detecting-old-style-AppStr.patch BuildRequires: gcc BuildRequires: gettext @@ -48,16 +50,18 @@ BuildRequires: gtk3-devel >= %{gtk3_version} BuildRequires: gtk-doc BuildRequires: json-glib-devel >= %{json_glib_version} BuildRequires: libappstream-glib-devel >= %{appstream_glib_version} -BuildRequires: libdnf-devel BuildRequires: libsoup-devel BuildRequires: libxmlb-devel >= %{libxmlb_version} BuildRequires: meson BuildRequires: PackageKit-glib-devel >= %{packagekit_version} BuildRequires: polkit-devel BuildRequires: flatpak-devel >= %{flatpak_version} +%if 0%{?fedora} +BuildRequires: libdnf-devel BuildRequires: ostree-devel BuildRequires: rpm-devel BuildRequires: rpm-ostree-devel +%endif BuildRequires: libgudev1-devel %ifarch %{valgrind_arches} BuildRequires: valgrind-devel @@ -117,10 +121,8 @@ the source tree. Most users do not need this subpackage installed. -Dpackagekit=true \ -Dexternal_appstream=false \ -Dmalcontent=false \ - -Drpm_ostree=true \ - -Dtests=false \ - -Dubuntuone=false \ - -Dubuntu_reviews=false + -Drpm_ostree=false \ + -Dtests=false %meson_build %install @@ -198,7 +200,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_provenance.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_repos.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_rewrite-resource.so -%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_rpm-ostree.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_shell-extensions.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_systemd-updates.so %{_sysconfdir}/xdg/autostart/gnome-software-service.desktop @@ -218,6 +219,10 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Thu Jun 11 2020 Kalev Lember - 3.36.1-4 +- Fix 'Show Details' to correctly work for rpm-installed firefox +- Resolves: #1845714 + * Wed Jun 03 2020 Kalev Lember - 3.36.1-3 - Upload correct 3.36.1 tarball - Fix hardcoded desktop and appdata names to match what's in RHEL 8.3