summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2021-09-08 01:49:25 +0200
committerSebastian Pipping <sping@gentoo.org>2021-09-08 01:49:25 +0200
commitad0cfc47a51fc05af2ebe14ddfb3b062a1610893 (patch)
treea358f35e72e5ff468bcbcf629b9df81372233da3
parentdev-ruby/rr: keyword 3.0.7 for ~riscv (diff)
downloadgentoo-ad0cfc47a51fc05af2ebe14ddfb3b062a1610893.tar.gz
gentoo-ad0cfc47a51fc05af2ebe14ddfb3b062a1610893.tar.bz2
gentoo-ad0cfc47a51fc05af2ebe14ddfb3b062a1610893.zip
www-servers/servefile: 0.5.2
Signed-off-by: Sebastian Pipping <sping@gentoo.org> Package-Manager: Portage-3.0.22, Repoman-3.0.3
-rw-r--r--www-servers/servefile/Manifest1
-rw-r--r--www-servers/servefile/files/servefile-0.5.2-ipv6-absent-tests.patch25
-rw-r--r--www-servers/servefile/servefile-0.5.2.ebuild40
3 files changed, 66 insertions, 0 deletions
diff --git a/www-servers/servefile/Manifest b/www-servers/servefile/Manifest
index 6edfa093dd5..403480079cd 100644
--- a/www-servers/servefile/Manifest
+++ b/www-servers/servefile/Manifest
@@ -1 +1,2 @@
DIST servefile-0.5.1.tar.gz 19390 BLAKE2B 4443471870650f03564d6f574b633630fac4e1f9f6e6a9807b1baa4d3aaa6284f803fa9dc0c7c07f53cc343f89687db5f6b5a4ebf09e9fd327369e2b3aecddc5 SHA512 2502f3072522a8f460d3711dccbaa3fa57e34915313aaad475e5831962adc92c0728c2598f9f78ee99e60731cdc2d3026488ce8050369ab0c967246cd9372f44
+DIST servefile-0.5.2.tar.gz 20622 BLAKE2B 3d4f02803ec5228dd463313197718b0aced1f5ceaa3438c1e8a8605cdf5d6a87e38a8bb702dc24a15cb974076f185dfbc0af95b60f394612835d3286474cdcc4 SHA512 1abeef3ff1a9f21be079329616d78811412eb2f371e11e383dc23b586f8c7edc593539b6fa641e5d91bb6c1ab81a1f39f83e45bf7c55e904c9b683166ff79622
diff --git a/www-servers/servefile/files/servefile-0.5.2-ipv6-absent-tests.patch b/www-servers/servefile/files/servefile-0.5.2-ipv6-absent-tests.patch
new file mode 100644
index 00000000000..6231fc8b7d9
--- /dev/null
+++ b/www-servers/servefile/files/servefile-0.5.2-ipv6-absent-tests.patch
@@ -0,0 +1,25 @@
+From 3d34ff40f1a24873793c33b8f16a9940050fa93f Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Sun, 24 May 2020 15:51:15 +0200
+Subject: [PATCH] Fix test test_ipv4_only for global USE=-ipv6
+
+---
+ tests/test_servefile.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test_servefile.py b/tests/test_servefile.py
+index 8132f6b..3f127f4 100644
+--- a/tests/test_servefile.py
++++ b/tests/test_servefile.py
+@@ -137,7 +137,7 @@ def test_ipv4_only(run_servefile, datadir):
+ check_download(data, fname='testfile', host='127.0.0.1')
+
+ sock = socket.socket(socket.AF_INET6)
+- with pytest.raises(connrefused_exc):
++ with pytest.raises((connrefused_exc, OSError)):
+ sock.connect(("::1", SERVEFILE_DEFAULT_PORT))
+
+
+--
+2.26.2
+
diff --git a/www-servers/servefile/servefile-0.5.2.ebuild b/www-servers/servefile/servefile-0.5.2.ebuild
new file mode 100644
index 00000000000..e086cb75329
--- /dev/null
+++ b/www-servers/servefile/servefile-0.5.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{7..10} )
+
+inherit distutils-r1
+
+DESCRIPTION="Serve a single file via HTTP"
+HOMEPAGE="https://github.com/sebageek/servefile"
+SRC_URI="https://github.com/sebageek/servefile/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssl test"
+
+RDEPEND="
+ ssl? ( dev-python/pyopenssl[${PYTHON_USEDEP}] )
+ sys-apps/grep
+ sys-apps/iproute2
+ sys-apps/net-tools
+ sys-apps/sed"
+DEPEND="test? (
+ ${RDEPEND}
+ dev-python/requests[${PYTHON_USEDEP}]
+ )"
+
+S="${WORKDIR}"/${P}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.5.2-ipv6-absent-tests.patch
+)
+
+distutils_enable_tests pytest
+
+src_install() {
+ distutils-r1_src_install
+ doman ${PN}.1
+}