aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang E. Sanyer <WolfgangESanyer@gmail.com>2021-01-03 21:03:40 -0500
committerWolfgang E. Sanyer <WolfgangESanyer@gmail.com>2021-01-03 21:14:53 -0500
commit1d9279bbe078badae5c434759b070022ae23147c (patch)
treeb15d31362ff1697fa69f57edcdefe029233cb6f2 /app-backup
parentdev-python/b2sdk: new package, dep of b2 (diff)
downloadguru-1d9279bbe078badae5c434759b070022ae23147c.tar.gz
guru-1d9279bbe078badae5c434759b070022ae23147c.tar.bz2
guru-1d9279bbe078badae5c434759b070022ae23147c.zip
app-backup/b2: new package, backblaze's cli client
Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer@gmail.com>
Diffstat (limited to 'app-backup')
-rw-r--r--app-backup/b2/Manifest1
-rw-r--r--app-backup/b2/b2-2.1.0.ebuild40
-rw-r--r--app-backup/b2/files/b2-2.1.0-nameclash.patch12
-rw-r--r--app-backup/b2/files/b2-2.1.0-skip-integration-test.patch12
-rw-r--r--app-backup/b2/metadata.xml18
5 files changed, 83 insertions, 0 deletions
diff --git a/app-backup/b2/Manifest b/app-backup/b2/Manifest
new file mode 100644
index 000000000..6cbf20eb0
--- /dev/null
+++ b/app-backup/b2/Manifest
@@ -0,0 +1 @@
+DIST b2-2.1.0.tar.gz 41812 BLAKE2B 0450b0e0e501a061a0934ac303414322331de3d55da54506b08515136b3084464b0bcf35ca90b6f5298456af3978055f4edf67004aa5351c9bac4e4ecc99a078 SHA512 13bc95226ac98122de401159e3e6149fc783162b33c8c6033538f9e7bcaa782d3f67334b83bd876ca15b73924b5b7af9d9cc62556c10adaf9a0de8c06f9014b6
diff --git a/app-backup/b2/b2-2.1.0.ebuild b/app-backup/b2/b2-2.1.0.ebuild
new file mode 100644
index 000000000..78feaef03
--- /dev/null
+++ b/app-backup/b2/b2-2.1.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..8} )
+
+DISTUTILS_SINGLE_IMPL=1
+DISTUTILS_USE_SETUPTOOLS=rdepend
+
+inherit distutils-r1
+
+DESCRIPTION="The command-line tool for BackBlaze's B2 product."
+HOMEPAGE="https://github.com/Backblaze/B2_Command_Line_Tool"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+PATCHES=(
+ "${FILESDIR}/${P}-nameclash.patch"
+ "${FILESDIR}/${P}-skip-integration-test.patch"
+)
+
+RDEPEND="
+ $(python_gen_cond_dep '
+ >=dev-python/arrow-0.8.0[${PYTHON_USEDEP}]
+ >=dev-python/b2sdk-1.2.0[${PYTHON_USEDEP}]
+ <dev-python/b2sdk-1.3.0[${PYTHON_USEDEP}]
+ >=dev-python/phx-class-registry-3.0.5[${PYTHON_USEDEP}]
+ ')
+"
+
+distutils_enable_tests pytest
+
+pkg_postinst(){
+ elog "The b2 executable has been renamed to backblaze2 in order to"
+ elog "avoid a name clash with b2 from boost-build"
+}
diff --git a/app-backup/b2/files/b2-2.1.0-nameclash.patch b/app-backup/b2/files/b2-2.1.0-nameclash.patch
new file mode 100644
index 000000000..340176f66
--- /dev/null
+++ b/app-backup/b2/files/b2-2.1.0-nameclash.patch
@@ -0,0 +1,12 @@
+diff --git a/setup.py b/setup.py
+index fee3261..f90056b 100644
+--- a/setup.py
++++ b/setup.py
+@@ -140,6 +140,6 @@ setup(
+ # "scripts" keyword. Entry points provide cross-platform support and allow
+ # pip to create the appropriate form of executable for the target platform.
+ entry_points={
+- 'console_scripts': ['b2=b2.console_tool:main',],
++ 'console_scripts': ['backblaze2=b2.console_tool:main',],
+ },
+ )
diff --git a/app-backup/b2/files/b2-2.1.0-skip-integration-test.patch b/app-backup/b2/files/b2-2.1.0-skip-integration-test.patch
new file mode 100644
index 000000000..40506bc9b
--- /dev/null
+++ b/app-backup/b2/files/b2-2.1.0-skip-integration-test.patch
@@ -0,0 +1,12 @@
+diff --git a/test/integration/test_b2_command_line.py b/test/integration/test_b2_command_line.py
+index 02b36ab..bd790ec 100644
+--- a/test/integration/test_b2_command_line.py
++++ b/test/integration/test_b2_command_line.py
+@@ -870,6 +870,7 @@ def main():
+
+
+ # TODO: rewrite to multiple tests
++@pytest.mark.skip(reason="Cannot do this in portage")
+ def test_integration():
+ application_key_id = os.environ.get('B2_TEST_APPLICATION_KEY_ID')
+ if application_key_id is None:
diff --git a/app-backup/b2/metadata.xml b/app-backup/b2/metadata.xml
new file mode 100644
index 000000000..6e00138aa
--- /dev/null
+++ b/app-backup/b2/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ezzieyguywuf@gmail.com</email>
+ <name>Wolfgang E. Sanyer</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ The command-line tool that gives easy access to all of the capabilities
+ of B2 Cloud Storage.
+
+ This program provides command-line access to the B2 service.
+ </longdescription>
+</pkgmetadata>