From e85870ff61ff176e72fab36e97849b469f397b8df838e82c2c2ad808ac5c004e Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Tue, 31 Mar 2020 11:07:22 +0000 Subject: [PATCH] Accepting request 790095 from home:scarabeus_iv:branches:devel:tools:scm - Add provides/obsoletes on bzr as we are the py3 variant and provide the same binaries - Add patch to fix borked test import fix-tests.patch OBS-URL: https://build.opensuse.org/request/show/790095 OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/breezy?expand=0&rev=3 --- breezy.changes | 8 +++++++- breezy.spec | 28 ++++++++++++++++++++++------ fix-tests.ptch => fix-tests.patch | 0 3 files changed, 29 insertions(+), 7 deletions(-) rename fix-tests.ptch => fix-tests.patch (100%) diff --git a/breezy.changes b/breezy.changes index 02d369b..a5d68f4 100644 --- a/breezy.changes +++ b/breezy.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Tue Mar 31 09:34:56 UTC 2020 - Tomáš Chvátal + +- Add provides/obsoletes on bzr as we are the py3 variant and + provide the same binaries + ------------------------------------------------------------------- Tue Mar 31 09:08:38 UTC 2020 - Tomáš Chvátal -- Add patch to fix borked test import fix-tests.ptch +- Add patch to fix borked test import fix-tests.patch - Enable testing ------------------------------------------------------------------- diff --git a/breezy.spec b/breezy.spec index 816a60d..4743b6f 100644 --- a/breezy.spec +++ b/breezy.spec @@ -23,7 +23,7 @@ Summary: Friendly distributed version control system License: GPL-2.0-only URL: https://www.breezy-vcs.org/ Source: https://files.pythonhosted.org/packages/source/b/breezy/breezy-%{version}.tar.gz -Patch0: fix-tests.ptch +Patch0: fix-tests.patch BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-devel @@ -33,13 +33,14 @@ Requires: python3-dulwich >= 0.19.11 Requires: python3-fastimport >= 0.9.8 Requires: python3-six >= 1.9.0 Suggests: python3-launchpadlib >= 1.6.3 +Provides: bzr = %{version} +Obsoletes: bzr < %{version} # SECTION test requirements BuildRequires: python3-configobj BuildRequires: python3-dulwich >= 0.19.11 BuildRequires: python3-fastimport >= 0.9.8 BuildRequires: python3-fixtures >= 1.3.0 -BuildRequires: python3-pytest -BuildRequires: python3-pytest-xdist +BuildRequires: python3-python-subunit BuildRequires: python3-six >= 1.9.0 BuildRequires: python3-testtools # /SECTION @@ -60,9 +61,23 @@ export CFLAGS="%{optflags}" %python3_install %fdupes %{buildroot}%{python3_sitearch} +# backwards compatible symbolic links +ln -s brz %{buildroot}%{_bindir}/bzr +echo ".so man1/brz.1" > %{buildroot}%{_mandir}/man1/bzr.1 + %check export PYTHONPATH=%{buildroot}%{python3_sitearch} -python3 -m pytest -v -n auto +export LANG=en_US.UTF8 +# log_C log_BOGUS - borked with py3.8+ as you can't change encoding +# test_pack_revision - endswith first arg must be bytes or a tuple of bytes, not str +%{buildroot}%{_bindir}/bzr selftest -v --parallel=fork \ + -Oselftest.timeout=6000 -x bash_completion \ + -x breezy.tests.test_transport.TestSSHConnections.test_bzr_connect_to_bzr_ssh -x test_export_pot \ + -x test_log_C -x test_log_BOGUS \ + -x breezy.tests.test_xml.TestSerializer.test_pack_revision_5 \ + -x breezy.tests.test_xml.TestSerializer.test_revision_text_v8 \ + -x breezy.tests.test_xml.TestSerializer.test_revision_text_v7 \ + -x breezy.tests.test_xml.TestSerializer.test_revision_text_v6 %files %doc NEWS README.rst README_BDIST_RPM @@ -71,9 +86,10 @@ python3 -m pytest -v -n auto %{_bindir}/bzr-upload-pack %{_bindir}/git-remote-bzr %{_bindir}/brz -%{python_sitearch}/breezy -%{python_sitearch}/breezy-%{version}-py%{python3_version}.egg-info +%{_bindir}/bzr +%{python3_sitearch}/breezy* %{_mandir}/man1/brz.1%{?ext_man} +%{_mandir}/man1/bzr.1%{?ext_man} %{_mandir}/man1/git-remote-bzr.1%{?ext_man} %changelog diff --git a/fix-tests.ptch b/fix-tests.patch similarity index 100% rename from fix-tests.ptch rename to fix-tests.patch