aboutsummaryrefslogtreecommitdiffstats
path: root/community/gns3-server
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2018-04-30 22:02:07 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2018-04-30 22:03:30 +0000
commit05748c9fad7f8dd229bc4f95e865605a6f63bb32 (patch)
tree43e0ac21c88e4996080f54c73f42f1219f7f545a /community/gns3-server
parent3637cad9b798191474dd582fe00ca8ad317e237e (diff)
downloadaports-05748c9fad7f8dd229bc4f95e865605a6f63bb32.tar.bz2
aports-05748c9fad7f8dd229bc4f95e865605a6f63bb32.tar.xz
community/gns3-server: fixed dependency
* Got rid of patches that were supposed to workaround hardcoded python's packages versions * Introduced two new dependency to make GNS3 work again.
Diffstat (limited to 'community/gns3-server')
-rw-r--r--community/gns3-server/APKBUILD12
-rw-r--r--community/gns3-server/aiohttp-support.patch61
-rw-r--r--community/gns3-server/dropped-requirements.patch18
-rw-r--r--community/gns3-server/fix-requirements.patch17
-rw-r--r--community/gns3-server/gns3-server-aiohttp.patch28
5 files changed, 5 insertions, 131 deletions
diff --git a/community/gns3-server/APKBUILD b/community/gns3-server/APKBUILD
index aaa8616e65..29fe9b8db1 100644
--- a/community/gns3-server/APKBUILD
+++ b/community/gns3-server/APKBUILD
@@ -2,18 +2,17 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gns3-server
pkgver=2.1.5
-pkgrel=0
+pkgrel=1
pkgdesc="GNS3 network simulator. Server package."
url="https://github.com/GNS3/gns3-server"
arch="all"
license="GPL-3.0"
-depends="busybox dynamips python3 py3-psutil py3-jinja2 py3-aiohttp
- py3-aiohttp-cors py3-pytest py3-netifaces py3-ws4py py3-zipstream
+depends="busybox dynamips python3 py3-psutil py3-jinja2 py3-aiohttp-gns3
+ py3-aiohttp-cors-gns3 py3-pytest py3-netifaces py3-ws4py py3-zipstream
py3-raven py3-jsonschema py3-yarl py3-multidict py3-prompt_toolkit"
makedepends="busybox-static py-setuptools python3-dev linux-headers py3-pytest"
subpackages="$pkgname-doc"
-source="$pkgname-$pkgver.tar.gz::https://github.com/GNS3/$pkgname/archive/v$pkgver.tar.gz
- fix-requirements.patch"
+source="$pkgname-$pkgver.tar.gz::https://github.com/GNS3/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$pkgname-$pkgver
build() {
@@ -50,5 +49,4 @@ EOF
}
-sha512sums="e23a4fdf1fa4281b8b087bb74868f44fe406e082108464cf3f090f38f907ab6c74112e68bb718ad6ca30b1318c54d0eb52fb8736703e53e01826c1b4db57461c gns3-server-2.1.5.tar.gz
-07fae4f5c61f7021ef2fba550a9c8beb799131bd59b6b3261f6c1608913cce426aecd5ab99af7475cfc44580c37f16209c1ec2709ab17beb7daf7bc6bf6a4d56 fix-requirements.patch"
+sha512sums="e23a4fdf1fa4281b8b087bb74868f44fe406e082108464cf3f090f38f907ab6c74112e68bb718ad6ca30b1318c54d0eb52fb8736703e53e01826c1b4db57461c gns3-server-2.1.5.tar.gz"
diff --git a/community/gns3-server/aiohttp-support.patch b/community/gns3-server/aiohttp-support.patch
deleted file mode 100644
index 83bb6ee733..0000000000
--- a/community/gns3-server/aiohttp-support.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From a7412d1c879920c3b2c2871763aafbe6836d1ed7 Mon Sep 17 00:00:00 2001
-From: ziajka <dominik@gns3.net>
-Date: Thu, 26 Oct 2017 16:29:01 +0200
-Subject: [PATCH] aiohttp 2.3.1 dependency
-
----
- gns3server/controller/compute.py | 8 +++++++-
- gns3server/web/web_server.py | 11 ++++++++---
- requirements.txt | 2 +-
- 3 files changed, 16 insertions(+), 5 deletions(-)
-
-diff --git a/gns3server/controller/compute.py b/gns3server/controller/compute.py
-index 05154fd3..8a3d35e8 100644
---- a/gns3server/controller/compute.py
-+++ b/gns3server/controller/compute.py
-@@ -506,10 +506,16 @@ def _run_http_query(self, method, path, data=None, timeout=20, raw=False):
- else:
- data = json.dumps(data).encode("utf-8")
- try:
-+ log.debug("Attempting request to compute: {method} {url} {headers}".format(
-+ method=method,
-+ url=url,
-+ headers=headers
-+ ))
- response = yield from self._session().request(method, url, headers=headers, data=data, auth=self._auth, chunked=chunked, timeout=timeout)
- except asyncio.TimeoutError as e:
- raise ComputeError("Timeout error when connecting to {}".format(url))
-- except (aiohttp.ClientError, aiohttp.ServerDisconnectedError, ValueError, KeyError) as e:
-+ except (aiohttp.ClientError, aiohttp.ServerDisconnectedError, ValueError, KeyError, socket.gaierror) as e:
-+ # aiohttp 2.3.1 raises socket.gaierror when cannot find host
- raise ComputeError(str(e))
- body = yield from response.read()
- if body and not raw:
-diff --git a/gns3server/web/web_server.py b/gns3server/web/web_server.py
-index 40179367..9ce9c2e0 100644
---- a/gns3server/web/web_server.py
-+++ b/gns3server/web/web_server.py
-@@ -43,8 +43,8 @@
- import logging
- log = logging.getLogger(__name__)
-
--if not aiohttp.__version__.startswith("2.2"):
-- raise RuntimeError("aiohttp 2.2 is required to run the GNS3 server")
-+if not (aiohttp.__version__.startswith("2.2") or aiohttp.__version__.startswith("2.3")):
-+ raise RuntimeError("aiohttp 2.2.x or 2.3.x is required to run the GNS3 server")
-
-
- class WebServer:
-@@ -102,7 +102,12 @@ def shutdown_server(self):
- if self._app:
- yield from self._app.shutdown()
- if self._handler:
-- yield from self._handler.finish_connections(2) # Parameter is timeout
-+ try:
-+ # aiohttp < 2.3
-+ yield from self._handler.finish_connections(2) # Parameter is timeout
-+ except AttributeError:
-+ # aiohttp >= 2.3
-+ yield from self._handler.shutdown(2) # Parameter is timeout
- if self._app:
- yield from self._app.cleanup()
diff --git a/community/gns3-server/dropped-requirements.patch b/community/gns3-server/dropped-requirements.patch
deleted file mode 100644
index 8891df1897..0000000000
--- a/community/gns3-server/dropped-requirements.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/requirements.txt b/requirements.txt
-index b81fe02..5e5d043 100644
---- a/requirements.txt
-+++ b/requirements.txt
-@@ -1,11 +1,11 @@
- jsonschema>=2.4.0
- aiohttp>=2.2.0,<2.4.0 # pyup: ignore
- aiohttp-cors>=0.5.3,<0.6.0 # pyup: ignore
--yarl>=0.11,<0.12 # pyup: ignore
-+yarl>=0.15 # pyup: ignore
- Jinja2>=2.7.3
- raven>=5.23.0
- psutil>=3.0.0
- zipstream>=1.1.4
- typing>=3.5.3.0 # Otherwise yarl fails with python 3.4
--multidict<3.2.0 # Otherwise fails when upgraded to v3.2.0
-+multidict>3.4.0 # Otherwise fails when upgraded to v3.2.0
- prompt-toolkit
diff --git a/community/gns3-server/fix-requirements.patch b/community/gns3-server/fix-requirements.patch
deleted file mode 100644
index 772493afa3..0000000000
--- a/community/gns3-server/fix-requirements.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/requirements.txt b/requirements.txt
-index 184af37..0eec220 100644
---- a/requirements.txt
-+++ b/requirements.txt
-@@ -1,10 +1,9 @@
- jsonschema>=2.4.0
--aiohttp>=2.2.0,<2.4.0 # pyup: ignore
--aiohttp-cors>=0.5.3,<0.6.0 # pyup: ignore
-+aiohttp>=2.2.0
-+aiohttp-cors>=0.5.3
- yarl>=0.11
- Jinja2>=2.7.3
- raven>=5.23.0
- psutil>=3.0.0
- zipstream>=1.1.4
--typing>=3.5.3.0 # Otherwise yarl fails with python 3.4
- prompt-toolkit
diff --git a/community/gns3-server/gns3-server-aiohttp.patch b/community/gns3-server/gns3-server-aiohttp.patch
deleted file mode 100644
index 5a4fb37039..0000000000
--- a/community/gns3-server/gns3-server-aiohttp.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/gns3server/web/web_server.py b/gns3server/web/web_server.py
-index 8352134..53a8252 100644
---- a/gns3server/web/web_server.py
-+++ b/gns3server/web/web_server.py
-@@ -42,8 +42,8 @@ import gns3server.handlers
- import logging
- log = logging.getLogger(__name__)
-
--if not aiohttp.__version__.startswith("2.2"):
-- raise RuntimeError("aiohttp 2.2 is required to run the GNS3 server")
-+if not aiohttp.__version__.startswith("2.3"):
-+ raise RuntimeError("aiohttp 2.3 is required to run the GNS3 server")
-
-
- class WebServer:
-diff --git a/gns3server/web/web_server.py b/gns3server/web/web_server.py
-index 8352134..e999c11 100644
---- a/gns3server/web/web_server.py
-+++ b/gns3server/web/web_server.py
-@@ -101,7 +101,7 @@ class WebServer:
- if self._app:
- yield from self._app.shutdown()
- if self._handler:
-- yield from self._handler.finish_connections(2) # Parameter is timeout
-+ yield from self._handler.shutdown(2.0) # Parameter is timeout
- if self._app:
- yield from self._app.cleanup()
-