From 2bb9f8f82f39982cebda09f70b9d261c62323aae Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Feb 22 2023 13:48:04 +0000 Subject: Version 3 ... (rhbz#2154976) --- diff --git a/.gitignore b/.gitignore index 00e2d6b..73d1212 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /systemd-coredump-python-2.tar.gz +/systemd-coredump-python-3.tar.gz diff --git a/0001-In-demo-mode-do-not-install-handler-manually.patch b/0001-In-demo-mode-do-not-install-handler-manually.patch deleted file mode 100644 index 2cb87c0..0000000 --- a/0001-In-demo-mode-do-not-install-handler-manually.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 415d9328ebf18b94e622bae9c799c1c0ceef1751 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 14 Mar 2017 22:35:29 -0400 -Subject: [PATCH] In demo mode, do not install handler manually - -Two reasons: -1. this way we can check that the handler is correctly installed -2. even if the handler is correctly installed, we'd install it a - second time (since __main__ module is completely separate from - the module import through .pth), and log the exception twice. ---- - systemd_coredump_exception_handler.py | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/systemd_coredump_exception_handler.py b/systemd_coredump_exception_handler.py -index d8d514900c..6fa200f8c5 100644 ---- a/systemd_coredump_exception_handler.py -+++ b/systemd_coredump_exception_handler.py -@@ -155,8 +155,6 @@ def install(nocheck=False): - pass - - if __name__ == '__main__': -- install(True) -- - # throw a nested test exception to show the effect - def f(): - a = 3 --- -2.9.3 - diff --git a/sources b/sources index fed283a..07797af 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (systemd-coredump-python-2.tar.gz) = a3d6a0d8ded13fd8d5d38ac25528a1b52ec33df98b5538ce095c3575c5261fed20af98d0ef6fcf20b8ce4acb1413ce73b99e549023868864a3f245d069eb0525 +SHA512 (systemd-coredump-python-3.tar.gz) = 97309d7e1c589a1ef87728656dea7707b25429ec9d02566ae1f2d26fa76048d8c61823ec5a2775c2c3e4c73ee125718864d582da5f4748f17bce87442bfd0d99 diff --git a/systemd-coredump-python.spec b/systemd-coredump-python.spec index cc271ee..ef16a50 100644 --- a/systemd-coredump-python.spec +++ b/systemd-coredump-python.spec @@ -1,20 +1,19 @@ Name: systemd-coredump-python -Version: 2 +Version: 3 Release: %autorelease Summary: systemd-coredump helper to log Python exceptions License: GPLv2+ URL: https://github.com/systemd/systemd-coredump-python Source0: https://github.com/systemd/systemd-coredump-python/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch1: 0001-In-demo-mode-do-not-install-handler-manually.patch BuildRequires: python3-devel +BuildRequires: python3dist(setuptools) BuildArch: noarch -%global _description \ -Python module which hooks into the sys.excepthook to log backtraces \ -in the journal. +%global _description %{expand: +Python module which hooks into sys.excepthook to log backtraces in the journal.} %description %_description @@ -22,16 +21,11 @@ in the journal. Summary: %{summary} Conflicts: systemd < 233 -%{?python_provide:%python_provide python3-systemd-coredump} - %description -n python3-systemd-coredump %_description %prep %autosetup -p1 -# I messed that up, it'll be fixed in next release, pinky promise -sed -i "s/'1'/'2'/" setup.py - %build %py3_build