diff --git a/bodhi-tests-rawhide.patch b/bodhi-tests-rawhide.patch new file mode 100644 index 0000000..40de03f --- /dev/null +++ b/bodhi-tests-rawhide.patch @@ -0,0 +1,42 @@ +commit 464d0e57656fbd5642df70857d46331738de05e6 +Author: Aurélien Bompard +Date: Thu Jul 25 17:34:25 2019 +0200 + + Fix a couple tests on F31+ + + Signed-off-by: Aurélien Bompard + +diff --git a/bodhi/tests/client/test___init__.py b/bodhi/tests/client/test___init__.py +index a06780a3..a287b835 100644 +--- a/bodhi/tests/client/test___init__.py ++++ b/bodhi/tests/client/test___init__.py +@@ -993,7 +993,13 @@ class TestQuery(unittest.TestCase): + ) + ] + self.assertEqual(send_request.mock_calls, calls) +- mock_open.assert_called_with(fedora.client.openidbaseclient.b_SESSION_FILE, 'rb') ++ # Before F31 the file was opened in binary mode, and then it changed. ++ # Only check the path. ++ self.assertEqual(mock_open.call_count, 1) ++ self.assertEqual( ++ mock_open.call_args[0][0], ++ fedora.client.openidbaseclient.b_SESSION_FILE ++ ) + + @mock.patch('bodhi.client.bindings.BodhiClient.csrf', + mock.MagicMock(return_value='a_csrf_token')) +@@ -1128,7 +1134,13 @@ class TestQueryBuildrootOverrides(unittest.TestCase): + ) + ] + self.assertEqual(send_request.mock_calls, calls) +- mock_open.assert_called_with(fedora.client.openidbaseclient.b_SESSION_FILE, 'rb') ++ # Before F31 the file was opened in binary mode, and then it changed. ++ # Only check the path. ++ self.assertEqual(mock_open.call_count, 1) ++ self.assertEqual( ++ mock_open.call_args[0][0], ++ fedora.client.openidbaseclient.b_SESSION_FILE ++ ) + + @mock.patch('bodhi.client.bindings.BodhiClient.csrf', + mock.MagicMock(return_value='a_csrf_token')) diff --git a/bodhi.spec b/bodhi.spec index 983a69f..acf6ba5 100644 --- a/bodhi.spec +++ b/bodhi.spec @@ -4,7 +4,7 @@ Name: bodhi Version: 4.1.0 -Release: 2%{?dist} +Release: 3%{?dist} BuildArch: noarch License: GPLv2+ @@ -12,6 +12,9 @@ Summary: A modular framework that facilitates publishing software updates URL: https://github.com/fedora-infra/bodhi Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +# https://github.com/fedora-infra/bodhi/pull/3423 +Patch0: bodhi-tests-rawhide.patch + BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: %{py3_dist alembic} @@ -308,6 +311,9 @@ install -pm0644 docs/_build/man/*.1 %{buildroot}%{_mandir}/man1/ %changelog +* Thu Jul 25 2019 Aurelien Bompard - 4.1.0-3 +- Fix build on Rawhide + * Wed Jul 24 2019 Fedora Release Engineering - 4.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild