diff --git a/5bdb25ebb80a598e088c6c9ccf211a9dc9a22baa.patch b/5bdb25ebb80a598e088c6c9ccf211a9dc9a22baa.patch deleted file mode 100644 index b9a152d..0000000 --- a/5bdb25ebb80a598e088c6c9ccf211a9dc9a22baa.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 5bdb25ebb80a598e088c6c9ccf211a9dc9a22baa Mon Sep 17 00:00:00 2001 -From: Davide Cavalca -Date: Wed, 30 Dec 2020 10:43:18 -0800 -Subject: [PATCH] tests: properly mock yum process name - ---- - tests/test_yum.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tests/test_yum.py b/tests/test_yum.py -index 68340bd..de1ba2a 100644 ---- a/tests/test_yum.py -+++ b/tests/test_yum.py -@@ -16,12 +16,12 @@ - from dcrpm import pidutil, yum - from tests.mock_process import make_mock_process - -- - class TestYum(testslide.TestCase): - def setUp(self): - # type: () -> None - super(TestYum, self).setUp() - self.yum = yum.Yum() # type: yum.Yum -+ self.yum.yum = "fakeyum" - - # check_stuck - def test_check_stuck_filenotfound(self): -@@ -91,7 +91,7 @@ def test_check_stuck_kill_yumpid(self): - ( - self.mock_callable(pidutil, "process") - .for_call(12345) -- .to_return_value(make_mock_process(pid=12345, open_files=[], name="yum")) -+ .to_return_value(make_mock_process(pid=12345, open_files=[], name="fakeyum")) - .and_assert_called_once() - ) - self.assertTrue(self.yum.check_stuck()) diff --git a/efcc4337821b3e498d832d2b6bf4241716acc0b3.patch b/efcc4337821b3e498d832d2b6bf4241716acc0b3.patch new file mode 100644 index 0000000..df4e005 --- /dev/null +++ b/efcc4337821b3e498d832d2b6bf4241716acc0b3.patch @@ -0,0 +1,32 @@ +From efcc4337821b3e498d832d2b6bf4241716acc0b3 Mon Sep 17 00:00:00 2001 +From: Davide Cavalca +Date: Wed, 30 Dec 2020 10:43:18 -0800 +Subject: [PATCH] tests: properly mock yum process name + +--- + tests/test_yum.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/tests/test_yum.py b/tests/test_yum.py +index 68340bd..b0cdf1b 100644 +--- a/tests/test_yum.py ++++ b/tests/test_yum.py +@@ -22,6 +22,7 @@ def setUp(self): + # type: () -> None + super(TestYum, self).setUp() + self.yum = yum.Yum() # type: yum.Yum ++ self.yum.yum = "fakeyum" + + # check_stuck + def test_check_stuck_filenotfound(self): +@@ -91,7 +92,9 @@ def test_check_stuck_kill_yumpid(self): + ( + self.mock_callable(pidutil, "process") + .for_call(12345) +- .to_return_value(make_mock_process(pid=12345, open_files=[], name="yum")) ++ .to_return_value( ++ make_mock_process(pid=12345, open_files=[], name="fakeyum") ++ ) + .and_assert_called_once() + ) + self.assertTrue(self.yum.check_stuck()) diff --git a/python-dcrpm.spec b/python-dcrpm.spec index 031e4df..233566c 100644 --- a/python-dcrpm.spec +++ b/python-dcrpm.spec @@ -10,7 +10,7 @@ Name: python-%{pypi_name} Version: 0.6.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool to detect and correct common issues around RPM database corruption License: GPLv2 @@ -21,7 +21,7 @@ Patch0: %{url}/commit/efc0166793db58e08b57ba3839638f7571355b93.patch # tests: properly mock bdb in db_stat test Patch1: %{url}/commit/f7f89146e37c009a164e0e81de9b6b23d4874ffc.patch # tests: properly mock yum process name -Patch2: %{url}/commit/5bdb25ebb80a598e088c6c9ccf211a9dc9a22baa.patch +Patch2: %{url}/commit/efcc4337821b3e498d832d2b6bf4241716acc0b3.patch BuildArch: noarch BuildRequires: python3-devel @@ -45,14 +45,16 @@ corruption. %package -n %{pypi_name} Summary: %{summary} -%{?python_provide:%python_provide python3-%{pypi_name}} +%if 0%{?fedora} < 33 || 0%{?rhel} < 9 +%py_provides python3-%{pypi_name} +%endif Requires: python3dist(psutil) Requires: python3dist(setuptools) Requires: lsof Recommends: libdb-utils %description -n %{pypi_name} -dcrpm is a tool to detect and correct common issues around RPM database +dcrpm is a tool to detect and correct common issues around RPM database corruption. %prep @@ -82,5 +84,8 @@ rm -rf %{pypi_name}.egg-info %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Sun Jan 3 2021 Davide Cavalca - 0.6.2-2 +- Update patches + * Wed Dec 30 2020 Davide Cavalca - 0.6.2-1 - Initial package.