From 600c78864dad12bfc624213301fdb4ec6ae7b3cf7bca799aa86bf0a07a7d6c21 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 27 Jun 2023 05:46:16 +0000 Subject: [PATCH 1/2] - Add patch deal-with-missing-socket.patch - Pin SQLAlchemy < 2, this requires 1.4 - Stop using greedy globs in %files - Light spring cleaning of the spec file. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Logbook?expand=0&rev=21 --- deal-with-missing-socket.patch | 14 ++++++++++++++ python-Logbook.changes | 8 ++++++++ python-Logbook.spec | 15 ++++++--------- 3 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 deal-with-missing-socket.patch diff --git a/deal-with-missing-socket.patch b/deal-with-missing-socket.patch new file mode 100644 index 0000000..29de111 --- /dev/null +++ b/deal-with-missing-socket.patch @@ -0,0 +1,14 @@ +Index: Logbook-1.5.3/logbook/queues.py +=================================================================== +--- Logbook-1.5.3.orig/logbook/queues.py ++++ Logbook-1.5.3/logbook/queues.py +@@ -229,7 +229,8 @@ class ZeroMQHandler(Handler): + self.export_record(record)).encode("utf-8")) + + def close(self, linger=-1): +- self.socket.close(linger) ++ if hasattr(self, 'socket'): ++ self.socket.close(linger) + + def __del__(self): + # When the Handler is deleted we must close our socket in a diff --git a/python-Logbook.changes b/python-Logbook.changes index cf84273..6e79c2a 100644 --- a/python-Logbook.changes +++ b/python-Logbook.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jun 27 05:38:54 UTC 2023 - Steve Kowalik + +- Add patch deal-with-missing-socket.patch +- Pin SQLAlchemy < 2, this requires 1.4 +- Stop using greedy globs in %files +- Light spring cleaning of the spec file. + ------------------------------------------------------------------- Fri May 7 18:20:13 UTC 2021 - Ben Greiner diff --git a/python-Logbook.spec b/python-Logbook.spec index d8c5cb6..36c3819 100644 --- a/python-Logbook.spec +++ b/python-Logbook.spec @@ -1,7 +1,7 @@ # # spec file for package python-Logbook # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,8 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%bcond_without python2 Name: python-Logbook Version: 1.5.3 Release: 0 @@ -27,10 +25,11 @@ URL: https://github.com/getlogbook/logbook Source: https://files.pythonhosted.org/packages/source/L/Logbook/Logbook-%{version}.tar.gz # PATCH-FIX-UPSTREAM logbook-pr316-sqlalchemy-count.patch -- gh#getlogbook/logbook#316 Patch1: https://github.com/getlogbook/logbook/pull/316.patch#/logbook-pr316-sqlalchemy-count.patch +Patch2: deal-with-missing-socket.patch BuildRequires: %{python_module Brotli} BuildRequires: %{python_module Cython} BuildRequires: %{python_module Jinja2} -BuildRequires: %{python_module SQLAlchemy} +BuildRequires: %{python_module SQLAlchemy < 2} BuildRequires: %{python_module devel} BuildRequires: %{python_module execnet >= 1.0.9} BuildRequires: %{python_module gevent} @@ -46,14 +45,11 @@ BuildRequires: python-rpm-macros BuildRequires: redis BuildRequires: util-linux Recommends: python-Jinja2 -Recommends: python-SQLAlchemy +Recommends: python-SQLAlchemy < 2 Recommends: python-execnet >= 1.0.9 Recommends: python-gevent Recommends: python-pyzmq Recommends: python-redis -%if %{with python2} -BuildRequires: python-mock -%endif %python_subpackages %description @@ -84,6 +80,7 @@ kill %%1 %files %{python_files} %license LICENSE %doc CHANGES -%{python_sitearch}/* +%{python_sitearch}/logbook +%{python_sitearch}/Logbook-%{version}-*-info %changelog From 32c4449cb40b9ca7e2a7a0d46e74e6a57f7a606182caa97df0e3c9eeacb76821 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 28 Jun 2023 03:28:37 +0000 Subject: [PATCH 2/2] - Refresh patch from GitHub, the short shas gained one character. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Logbook?expand=0&rev=22 --- logbook-pr316-sqlalchemy-count.patch | 2 +- python-Logbook.changes | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/logbook-pr316-sqlalchemy-count.patch b/logbook-pr316-sqlalchemy-count.patch index 40aafd5..30e5df5 100644 --- a/logbook-pr316-sqlalchemy-count.patch +++ b/logbook-pr316-sqlalchemy-count.patch @@ -8,7 +8,7 @@ Subject: [PATCH] replace removed SQLAlchemy Table.count() method 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/logbook/ticketing.py b/logbook/ticketing.py -index 7321fa3..4f94ab8 100644 +index 7321fa32..4f94ab8e 100644 --- a/logbook/ticketing.py +++ b/logbook/ticketing.py @@ -243,7 +243,10 @@ def record_ticket(self, record, data, hash, app_id): diff --git a/python-Logbook.changes b/python-Logbook.changes index 6e79c2a..2c2c8c6 100644 --- a/python-Logbook.changes +++ b/python-Logbook.changes @@ -1,10 +1,11 @@ ------------------------------------------------------------------- -Tue Jun 27 05:38:54 UTC 2023 - Steve Kowalik +Wed Jun 28 03:27:42 UTC 2023 - Steve Kowalik - Add patch deal-with-missing-socket.patch - Pin SQLAlchemy < 2, this requires 1.4 - Stop using greedy globs in %files - Light spring cleaning of the spec file. +- Refresh patch from GitHub, the short shas gained one character. ------------------------------------------------------------------- Fri May 7 18:20:13 UTC 2021 - Ben Greiner