diff --git a/03_spurious_test_failure.patch b/03_spurious_test_failure.patch new file mode 100644 index 0000000..540c2c9 --- /dev/null +++ b/03_spurious_test_failure.patch @@ -0,0 +1,22 @@ +Description: Fix some spurious test failures +Author: Jelmer Vernooij +Status: Not forwarded upstream (workaround) + +Index: unstable/breezy/tests/test_test_server.py +=================================================================== +--- unstable.orig/breezy/tests/test_test_server.py ++++ unstable/breezy/tests/test_test_server.py +@@ -67,7 +67,12 @@ class TCPClient: + return self.sock.sendall(s) + + def read(self, bufsize=4096): +- return self.sock.recv(bufsize) ++ try: ++ return self.sock.recv(bufsize) ++ except socket.error as e: ++ if e.errno == errno.ECONNRESET: ++ return b"" ++ raise + + + class TCPConnectionHandler(socketserver.BaseRequestHandler): diff --git a/08_disable_sphinx_epytext.patch b/08_disable_sphinx_epytext.patch new file mode 100644 index 0000000..4831a12 --- /dev/null +++ b/08_disable_sphinx_epytext.patch @@ -0,0 +1,15 @@ +=== modified file 'breezy/doc_generate/conf.py' +--- + breezy/doc_generate/conf.py | 1 - + 1 file changed, 1 deletion(-) + +--- a/breezy/doc_generate/conf.py ++++ b/breezy/doc_generate/conf.py +@@ -24,7 +24,6 @@ extensions = [ + "sphinx.ext.ifconfig", + "sphinx.ext.autodoc", + "sphinx.ext.intersphinx", +- "sphinx_epytext", + # 'sphinxcontrib.napoleon', # TODO: for Google docstrings + ] + diff --git a/16_generate_ids.patch b/16_generate_ids.patch new file mode 100644 index 0000000..e9f076d --- /dev/null +++ b/16_generate_ids.patch @@ -0,0 +1,26 @@ +--- + breezy/generate_ids.py | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +--- /dev/null ++++ b/breezy/generate_ids.py +@@ -0,0 +1,19 @@ ++# Copyright (C) 2007-2011 Canonical Ltd ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ ++from __future__ import absolute_import ++ ++from .bzr.generate_ids import * diff --git a/_service b/_service index 3ce0fba..56e9aab 100644 --- a/_service +++ b/_service @@ -2,4 +2,9 @@ breezy-*.tar.gz + + breezy-*.tar.gz + lib-rio/Cargo.toml + lib-rio + diff --git a/breezy.changes b/breezy.changes index 2e971c3..5b03c0f 100644 --- a/breezy.changes +++ b/breezy.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Jan 21 23:29:39 UTC 2025 - Matej Cepl + +- Fix vendoring in _service && revendor +- Fix packaging bugs (make rpmlint more happy and switch to wheel + workflow) +- Add Debian patches: + - 03_spurious_test_failure.patch + - 08_disable_sphinx_epytext.patch + - 16_generate_ids.patch +- Add bash completion + ------------------------------------------------------------------- Thu Nov 7 22:57:37 UTC 2024 - Matej Cepl diff --git a/breezy.spec b/breezy.spec index d1e3c40..3ff325a 100644 --- a/breezy.spec +++ b/breezy.spec @@ -1,7 +1,7 @@ # # spec file for package breezy # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,10 +23,20 @@ Version: 3.3.9 Release: 0 Summary: Distributed version control system with multi-format support License: GPL-2.0-or-later +# Upstream website https://launchpad.net/brz URL: https://www.breezy-vcs.org/ Source0: https://files.pythonhosted.org/packages/source/b/breezy/breezy-%{version}.tar.gz -Source98: vendor-lib-rio.tar.xz +Source98: vendor-lib-rio.tar.zst Source99: vendor.tar.zst +# PATCH-FIX-UPSTREAM 03_spurious_test_failure.patch mcepl@suse.com +# fix some spurious test failures +Patch1: 03_spurious_test_failure.patch +# PATCH-FIX-UPSTREAM 08_disable_sphinx_epytext.patch mcepl@suse.com +# don't depend on sphinx_epytext +Patch2: 08_disable_sphinx_epytext.patch +# PATCH-FIX-UPSTREAM 16_generate_ids.patch mcepl@suse.com +Patch3: 16_generate_ids.patch + BuildRequires: cargo >= 1.41.0 BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -70,6 +80,18 @@ Breezy is a version control system implemented in Python with multi-format support. Breezy has built-in support for the Git and Bazaar file formats and network protocols. +%package bash-completion +Summary: Bash completion for breezy +Requires: %{name} = %{version} +Requires: bash-completion +Supplements: (breezy and bash-completion) +BuildArch: noarch + +%description bash-completion +Bash shell completions for breezy + +%lang_package + %prep %autosetup -p1 -a 98 -a 99 -n breezy-%{version} @@ -83,43 +105,37 @@ sed -i '1{\@^#!i[[:blank:]]*%{_bindir}/env python@d}' \ %build export RUSTFLAGS=%{rustflags} export CFLAGS="%{optflags} -fno-strict-aliasing" -%python3_build +%python3_pyproject_wheel +# generates brz.1 +python3 tools/generate_docs.py man +# generates brz.bash_completion +python3 tools/generate_docs.py bash_completion %install export RUSTFLAGS=%{rustflags} -%python3_install +%python3_pyproject_install + +# shell completions +install -Dm0644 brz.bash_completion \ + %{buildroot}%{_datadir}/bash-completion/completions/brz + %fdupes %{buildroot}%{python3_sitearch} +# install manpage +install -D -m 0644 brz.1 %{buildroot}%{_mandir}/man1/brz.1 +install -m 0644 breezy/git/git-remote-bzr.1 %{buildroot}%{_mandir}/man1/git-remote-bzr.1 + # backwards compatible symbolic links ln -s brz %{buildroot}%{_bindir}/bzr echo ".so man1/brz.1" > %{buildroot}%{_mandir}/man1/bzr.1 +%find_lang %{name} + %check export PYTHONPATH=%{buildroot}%{python3_sitearch} export LANG=en_US.UTF8 -# log_C log_BOGUS - borked with py3.8+ as you can't change encoding -# test_ancient_{ctime,mtime} - broken on aarch64 %%arm ppc ppc64le -# test_distant_{ctime,mtime} - broken on %%arm -# test_plugins lp#1927523 -# test_simple_local_git - pulls in forbidden modules with 3.10+ %{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 \ -%ifnarch %{ix86} x86_64 ppc64 - -x breezy.tests.test__dirstate_helpers.TestPackStat.test_ancient_ctime \ - -x breezy.tests.test__dirstate_helpers.TestPackStat.test_ancient_mtime \ -%endif -%ifarch %{arm} - -x breezy.tests.test__dirstate_helpers.TestPackStat.test_distant_ctime \ - -x breezy.tests.test__dirstate_helpers.TestPackStat.test_distant_mtime \ -%endif - -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 \ - -x breezy.tests.test_plugins.TestPlugins \ - -x breezy.tests.test_plugins.TestLoadingPlugins.test_plugin_with_error \ - -x breezy.tests.test_import_tariff.TestImportTariffs.test_simple_local_git + -Oselftest.timeout=6000 %files %doc NEWS README.rst @@ -133,8 +149,10 @@ export LANG=en_US.UTF8 %{_mandir}/man1/brz.1%{?ext_man} %{_mandir}/man1/bzr.1%{?ext_man} %{_mandir}/man1/git-remote-bzr.1%{?ext_man} -%dir %{_datadir}/locale/{ckb,fo,ku,my,sco} -%dir %{_datadir}/locale/{ckb,fo,ku,my,sco}/LC_MESSAGES -%{_datadir}/locale/*/*/breezy.mo + +%files bash-completion +%{_datadir}/bash-completion/completions/brz + +%files lang -f %{name}.lang %changelog diff --git a/vendor-lib-rio.tar.xz b/vendor-lib-rio.tar.xz deleted file mode 100644 index 1e9c268..0000000 --- a/vendor-lib-rio.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:06fc8a2c0da94c377a45b03de881edc20302235b3061e6c11c644f759e0ea6b5 -size 4219756 diff --git a/vendor-lib-rio.tar.zst b/vendor-lib-rio.tar.zst new file mode 100644 index 0000000..d06f85b --- /dev/null +++ b/vendor-lib-rio.tar.zst @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d108fb3a4a333f66cded314b87762c0ff8fd3fff5d82f46c25b1a7baccaa0d6f +size 2322096 diff --git a/vendor.tar.zst b/vendor.tar.zst index 1c3f0f1..d06f85b 100644 --- a/vendor.tar.zst +++ b/vendor.tar.zst @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c4925395134e538b21094e9414c016cc55273597788f502fcc42bdc5bbf49acd -size 2310060 +oid sha256:d108fb3a4a333f66cded314b87762c0ff8fd3fff5d82f46c25b1a7baccaa0d6f +size 2322096