diff --git a/0001-problems-Handle-errors-when-fetching-titles.patch b/0001-problems-Handle-errors-when-fetching-titles.patch deleted file mode 100644 index add166f..0000000 --- a/0001-problems-Handle-errors-when-fetching-titles.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 756addbc8e36fd7ce654ac4f0ea38ee34ae794e2 Mon Sep 17 00:00:00 2001 -From: Ernestas Kulik -Date: Mon, 18 May 2020 08:09:54 +0200 -Subject: [PATCH] problems: Handle errors when fetching titles - -Fallout from 837cb787caa4667a928673353e4ea8205ef9419a. - -If any of the URIs in reported_to are inaccessible, the resulting HTTP -error will become an exception, which is totally unnecessary, because -the user will most likely have no idea what to do. Handling the -exception gracefully will just keep the dummy title. - -This commit also narrows down the handled exceptions to GLib.Error, -since BeautifulSoup will eat whatever we feed it and not complain and -any other error should probably get some attention. - -https://bugzilla.redhat.com/show_bug.cgi?id=1836614 ---- - src/gnome_abrt/problems.py | 20 ++++++++++++-------- - 1 file changed, 12 insertions(+), 8 deletions(-) - -diff --git a/src/gnome_abrt/problems.py b/src/gnome_abrt/problems.py -index 4e50b79..2854aa8 100644 ---- a/src/gnome_abrt/problems.py -+++ b/src/gnome_abrt/problems.py -@@ -18,7 +18,8 @@ - import datetime - import logging - import re --from urllib import request -+import sys -+import urllib - - from bs4 import BeautifulSoup - -@@ -114,22 +115,25 @@ class Problem: - self._url_done = True - - def on_update_title(source_object, res, user_data): -- _, title = res.propagate_value() -- if title: -- self._title = title -- self._problem.source.notify(ProblemSource.CHANGED_PROBLEM, -- self._problem) -+ try: -+ _, title = res.propagate_value() -+ if title: -+ self._title = title -+ self._problem.source.notify(ProblemSource.CHANGED_PROBLEM, -+ self._problem) -+ except GLib.Error as error: -+ print(error.message, file=sys.stderr) - - task = Gio.Task.new(None, None, on_update_title, None) - - def update_title(task, source_object, task_data, cancellable): - try: -- html = request.urlopen(self._data).read().decode("UTF-8") -+ html = urllib.request.urlopen(self._data).read().decode("UTF-8") - soup = BeautifulSoup(html, "html.parser") - value = GObject.Value(str, soup.title.string) - - task.return_value(value) -- except Exception as ex: -+ except urllib.error.HTTPError as ex: - error = GLib.Error("Fetching title for problem report failed: %s" % (ex)) - task.return_error(error) - --- -2.26.2 - diff --git a/Fix-Python-module-installation.patch b/Fix-Python-module-installation.patch new file mode 100644 index 0000000..3ad3f0a --- /dev/null +++ b/Fix-Python-module-installation.patch @@ -0,0 +1,48 @@ +From 874c746852c1922fbcc3c6bcb107cbfc30a14cc6 Mon Sep 17 00:00:00 2001 +From: Ernestas Kulik +Date: Mon, 20 Jul 2020 06:37:55 +0200 +Subject: [PATCH] Fix Python module installation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Currently, all sources are installed as “pure”, which does not apply to +the wrapper module. Moreover, Meson previously defaulted to “false” for +the “pure” kwarg, which was subsequently fixed. Both of these issues +make the RPM package unbuildable, which can be fixed by making all +sources unpure (they all share the same module name, so it’s either this +or renaming the wrapper module to avoid import conflicts). + +https://github.com/mesonbuild/meson/commit/efb86088bcf89 +--- + src/gnome_abrt/meson.build | 1 + + src/gnome_abrt/wrappers/meson.build | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/gnome_abrt/meson.build b/src/gnome_abrt/meson.build +index 88489b5..f1844b9 100644 +--- a/src/gnome_abrt/meson.build ++++ b/src/gnome_abrt/meson.build +@@ -42,6 +42,7 @@ foreach file: gnome_abrt_sources + endforeach + + python_installation.install_sources(gnome_abrt_generated_sources + gnome_abrt_sources, ++ pure: false, + subdir: 'gnome_abrt', + ) + +diff --git a/src/gnome_abrt/wrappers/meson.build b/src/gnome_abrt/wrappers/meson.build +index 412b0e2..a185bf1 100644 +--- a/src/gnome_abrt/wrappers/meson.build ++++ b/src/gnome_abrt/wrappers/meson.build +@@ -11,6 +11,7 @@ foreach file: gnome_abrt_wrappers_sources + endforeach + + python_installation.install_sources(gnome_abrt_wrappers_sources, ++ pure: false, + subdir: 'gnome_abrt/wrappers', + ) + +-- +2.26.2 + diff --git a/gnome-abrt.spec b/gnome-abrt.spec index 7cbf190..94d8671 100644 --- a/gnome-abrt.spec +++ b/gnome-abrt.spec @@ -11,7 +11,7 @@ Name: gnome-abrt Version: 1.3.5 -Release: 2%{?snapshot:.git%{shortcommit}}%{?dist} +Release: 3%{?snapshot:.git%{shortcommit}}%{?dist} Summary: A utility for viewing problems that have occurred with the system License: GPLv2+ @@ -22,6 +22,8 @@ Source0: %{url}/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz %endif +Patch0: Fix-Python-module-installation.patch + BuildRequires: git-core BuildRequires: meson BuildRequires: gettext @@ -88,6 +90,9 @@ provides them with convenient way for managing these problems. %{_datadir}/icons/hicolor/*/apps/* %changelog +* Mon Jul 20 2020 - Ernestas Kulik - 1.3.5-3 +- Add patch to fix https://bugzilla.redhat.com/show_bug.cgi?id=1854949 + * Tue May 26 2020 Miro Hrončok - 1.3.5-2 - Rebuilt for Python 3.9