public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Arthur Zamarin" <arthurzam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/breezy/
Date: Sat, 25 Sep 2021 07:01:18 +0000 (UTC)	[thread overview]
Message-ID: <1632553236.0b57ebe2ee33ede5c82d04965840436d3876c647.arthurzam@gentoo> (raw)

commit:     0b57ebe2ee33ede5c82d04965840436d3876c647
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 25 06:57:22 2021 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 25 07:00:36 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b57ebe2

dev-vcs/breezy: initial packaging (v3.2.1)

Some notes for this package:
- has huge test suite, around ~30,000. Sadly some of them need
  disabling (0.8%)
- takes ~24 minutes per python target
- installs aliases for old bzr bin names
- anyone can help and improve the ebuild

Closes: https://bugs.gentoo.org/705018
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-vcs/breezy/Manifest            |  1 +
 dev-vcs/breezy/breezy-3.2.1.ebuild | 86 ++++++++++++++++++++++++++++++++++++++
 dev-vcs/breezy/metadata.xml        | 13 ++++++
 3 files changed, 100 insertions(+)

diff --git a/dev-vcs/breezy/Manifest b/dev-vcs/breezy/Manifest
new file mode 100644
index 00000000000..a2600d08a8e
--- /dev/null
+++ b/dev-vcs/breezy/Manifest
@@ -0,0 +1 @@
+DIST breezy-3.2.1.tar.gz 9445046 BLAKE2B 67de39c93351d2f78b1b64764a6ad11f26bd31c9bb2d73ef65f8722764d7db8c574f0e116f77dca1b93a53a360f984fb2861f94e0e7f41ce97ad0f703332e25e SHA512 bfbbff1301f7cc13a2d59b1add80c196f3b45b69994194dcae96c0be151f807c965854047c86e43f54dd8c7aa24d56b25afdd00f0063e83b362a8c46d5858226

diff --git a/dev-vcs/breezy/breezy-3.2.1.ebuild b/dev-vcs/breezy/breezy-3.2.1.ebuild
new file mode 100644
index 00000000000..67f34e53335
--- /dev/null
+++ b/dev-vcs/breezy/breezy-3.2.1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit distutils-r1 optfeature
+
+DESCRIPTION="Distributed Version Control System with a Friendly UI"
+HOMEPAGE="https://www.breezy-vcs.org/ https://github.com/breezy-team/breezy"
+SRC_URI="https://launchpad.net/brz/$(ver_cut 1-2)/${PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# Most tests don't need tests, but deselecting those that need is too hard
+RESTRICT="test"
+PROPERTIES="test_network"
+
+RDEPEND="
+	dev-python/configobj[${PYTHON_USEDEP}]
+	dev-python/dulwich[${PYTHON_USEDEP}]
+	dev-python/fastimport[${PYTHON_USEDEP}]
+	dev-python/patiencediff[${PYTHON_USEDEP}]
+	!dev-vcs/bzr
+"
+BDEPEND="
+	sys-devel/gettext
+	dev-python/cython[${PYTHON_USEDEP}]
+	test? (
+		app-crypt/gpgme[python,${PYTHON_USEDEP}]
+		dev-python/paramiko[${PYTHON_USEDEP}]
+		dev-python/pycryptodome[${PYTHON_USEDEP}]
+		dev-python/testtools[${PYTHON_USEDEP}]
+		$(python_gen_cond_dep '
+			dev-python/subunit[${PYTHON_USEDEP}]
+		' python3_{8,9})
+	)
+"
+
+distutils_enable_tests --install unittest
+
+src_prepare() {
+	distutils-r1_src_prepare
+	# Fix man instal location
+	sed -e '/DATA_FILES/s/man\//share\/&/' -i setup.py || die
+
+	# Fix call to unittest's stuff
+	grep -r breezy -le 'loadTestsFromModuleNames' | xargs sed -i -e 's/loadTestsFromModuleNames/loadTestsFromNames/' || die
+
+	# Very horrible, looks like too much, but only ~250 tests out of ~30,000.
+	# Before every bump, check the need for every disable, using direct test
+	# for only a specific file.
+	# Don't disable tests by removing files, as this results in bad imports.
+	sed -e 's/test_bzr_connect_to_bzr_ssh/_&/' -i breezy/tests/test_transport.py || die
+	sed -e 's/test_is_compatible_and_registered/_&/' \
+		-e 's/test_make_repository/_&/' -i breezy/plugins/weave_fmt/test_repository.py || die
+	sed -e 's/test_server_exception_with_hook/_&/' -i breezy/tests/blackbox/test_serve.py || die
+	sed -e 's/test_dump_/_&/' -i breezy/bzr/tests/blackbox/test_dump_btree.py || die
+	sed -e 's/test_/_&/' -i breezy/plugins/fastimport/tests/test_head_tracking.py || die
+
+	sed -e '/test_vfs_ratchet/d' -i breezy/bzr/tests/__init__.py || die
+	sed -e '/test_blackbox/d' -i breezy/git/tests/__init__.py || die
+	sed -e '/test_upload/d' -i breezy/plugins/upload/tests/__init__.py || die
+	sed -e '/test_bzrdir/d' -i breezy/plugins/weave_fmt/__init__.py || die
+	sed -e '/test_big_file/d' -i breezy/tests/blackbox/__init__.py || die
+	sed -e '/breezy.tests.test_gpg/d' \
+		-e '/breezy.tests.test_plugins/d' \
+		-e '/breezy.tests.test_source/d' \
+		-i breezy/tests/__init__.py || die
+}
+
+src_install() {
+	distutils-r1_src_install
+
+	# Symlink original bzr's bin names to new names
+	dosym brz /usr/bin/bzr
+	dosym git-remote-brz /usr/bin/git-remote-bzr
+}
+
+pkg_postinst() {
+	optfeature "access branches over sftp" "dev-python/pycryptodome dev-python/paramiko"
+	optfeature "PGP sign and verify commits" "app-crypt/gpgme[python]"
+}

diff --git a/dev-vcs/breezy/metadata.xml b/dev-vcs/breezy/metadata.xml
new file mode 100644
index 00000000000..abd73e6a6b9
--- /dev/null
+++ b/dev-vcs/breezy/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>arthurzam@gentoo.org</email>
+		<name>Arthur Zamarin</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">breezy-team/breezy</remote-id>
+		<remote-id type="launchpad">brz</remote-id>
+		<remote-id type="pypi">breezy</remote-id>
+	</upstream>
+</pkgmetadata>


             reply	other threads:[~2021-09-25  7:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-25  7:01 Arthur Zamarin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-09-25 16:52 [gentoo-commits] repo/gentoo:master commit in: dev-vcs/breezy/ Arthur Zamarin
2023-04-29  9:38 Arthur Zamarin
2023-07-07 18:36 Arthur Zamarin
2023-07-10 20:21 Arthur Zamarin
2023-07-15  3:10 Sam James
2023-07-21 11:25 Arthur Zamarin
2023-08-17  2:55 Sam James
2023-09-09  6:10 Arthur Zamarin
2023-09-09  6:10 Arthur Zamarin
2023-09-09  6:10 Arthur Zamarin
2023-12-05  7:53 Arthur Zamarin
2024-02-08 17:53 Arthur Zamarin
2024-04-04  4:57 Arthur Zamarin
2024-04-04  4:57 Arthur Zamarin
2024-07-16 16:29 Ulrich Müller
2025-02-07  9:47 Arthur Zamarin
2025-02-07 11:23 Arthur Zamarin
2025-02-07 11:23 Arthur Zamarin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1632553236.0b57ebe2ee33ede5c82d04965840436d3876c647.arthurzam@gentoo \
    --to=arthurzam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox