summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Bauman <bman@gentoo.org>2020-05-24 18:28:36 -0400
committerAaron Bauman <bman@gentoo.org>2020-05-24 18:28:36 -0400
commit34cfb652844698c47cf249073f8025f7f63c650d (patch)
treec695093431ed194a283449cd2dd3e5a326a088ea /net-misc
parentsys-block/blktrace: avoid 'gcc' call in 'make install' (diff)
downloadgentoo-34cfb652844698c47cf249073f8025f7f63c650d.tar.gz
gentoo-34cfb652844698c47cf249073f8025f7f63c650d.tar.bz2
gentoo-34cfb652844698c47cf249073f8025f7f63c650d.zip
net-misc/gns3-gui: bump to version 2.2.8
* Fix all the crazy dep changes * Add upstream patch to remove dev-python/raven dep * Takeover maintainership * Only support py3.7 and py3.8 to minimize conditionals Bug: https://bugs.gentoo.org/688016 Bug: https://bugs.gentoo.org/712964 Bug: https://bugs.gentoo.org/714840 Bug: https://bugs.gentoo.org/718444 Signed-off-by: Aaron Bauman <bman@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/gns3-gui/Manifest1
-rw-r--r--net-misc/gns3-gui/files/gns3-gui-rmraven.patch182
-rw-r--r--net-misc/gns3-gui/gns3-gui-2.2.8.ebuild57
-rw-r--r--net-misc/gns3-gui/metadata.xml10
4 files changed, 244 insertions, 6 deletions
diff --git a/net-misc/gns3-gui/Manifest b/net-misc/gns3-gui/Manifest
index 9ed2a75cc613..be61aeab7c4e 100644
--- a/net-misc/gns3-gui/Manifest
+++ b/net-misc/gns3-gui/Manifest
@@ -1 +1,2 @@
DIST gns3-gui-2.1.21.tar.gz 4845512 BLAKE2B 93af250719a0aafe8645926552c61d43152e5a5620d42b4d73cd58d597b3280d11935043771f15cf04e5d116f6740d929e04c27b1af6732d65b7c6e36313ed3c SHA512 b9b03c59064214323fe7375256075c56368747c8cd273bea41791b101ea7d6b877443e81dd57f13faf4b4bdc6de558e98648770de4734b1edd1c82911f2fcb9b
+DIST gns3-gui-2.2.8.tar.gz 5237129 BLAKE2B ce72219a1d0201f596c20b0988ab81f280889d3eb4717898da5d1a3c52a248e8f1d020d83b900309e623fadb758e67a91baaac9d61d75e72b96f4144ac5101fb SHA512 28b9f6f16506f206f64831160d95687525b6709d9d0d84623763e46c3c9b2e138e3f12844619bbad00491677818a7e28da4f4ea9358d063c3427db16e62775ca
diff --git a/net-misc/gns3-gui/files/gns3-gui-rmraven.patch b/net-misc/gns3-gui/files/gns3-gui-rmraven.patch
new file mode 100644
index 000000000000..9a8be4e62495
--- /dev/null
+++ b/net-misc/gns3-gui/files/gns3-gui-rmraven.patch
@@ -0,0 +1,182 @@
+From 2ea1946c0f83672f5289edcce207a8d2de03cc43 Mon Sep 17 00:00:00 2001
+From: grossmj <grossmj@gns3.net>
+Date: Tue, 19 May 2020 15:48:53 +0930
+Subject: [PATCH] Replace Raven by Sentry SDK. Fixes
+ https://github.com/GNS3/gns3-server/issues/1758
+
+---
+ gns3/crash_report.py | 111 +++++++++++++++++++++++++------------------
+ requirements.txt | 2 +-
+ 2 files changed, 66 insertions(+), 47 deletions(-)
+
+diff --git a/gns3/crash_report.py b/gns3/crash_report.py
+index a6a555fd5..dfbb9fc46 100644
+--- a/gns3/crash_report.py
++++ b/gns3/crash_report.py
+@@ -23,12 +23,11 @@
+ import distro
+
+ try:
+- import raven
+- from raven.transport.http import HTTPTransport
+- RAVEN_AVAILABLE = True
++ import sentry_sdk
++ SENTRY_SDK_AVAILABLE = True
+ except ImportError:
+- # raven is not installed with deb package in order to simplify packaging
+- RAVEN_AVAILABLE = False
++ # Sentry SDK is not installed with deb package in order to simplify packaging
++ SENTRY_SDK_AVAILABLE = False
+
+ from .utils.get_resource import get_resource
+ from .version import __version__, __version_info__
+@@ -69,49 +68,50 @@ def __init__(self):
+ sentry_uncaught = logging.getLogger('sentry.errors.uncaught')
+ sentry_uncaught.disabled = True
+
+- def captureException(self, exception, value, tb):
+- from .local_server import LocalServer
+- from .local_config import LocalConfig
+- from .controller import Controller
+- from .compute_manager import ComputeManager
+-
+- local_server = LocalServer.instance().localServerSettings()
+- if local_server["report_errors"]:
+- if not RAVEN_AVAILABLE:
+- return
+-
+- if os.path.exists(LocalConfig.instance().runAsRootPath()):
+- log.warning("User has run application as root. Crash reports are disabled.")
+- sys.exit(1)
+- return
++ if SENTRY_SDK_AVAILABLE:
++ cacert = None
++ if hasattr(sys, "frozen"):
++ cacert_resource = get_resource("cacert.pem")
++ if cacert_resource is not None and os.path.isfile(cacert_resource):
++ cacert = cacert_resource
++ else:
++ log.error("The SSL certificate bundle file '{}' could not be found".format(cacert_resource))
+
+- if os.path.exists(".git"):
+- log.warning("A .git directory exist crash report is turn off for developers. Instant exit")
+- sys.exit(1)
+- return
++ sentry_sdk.init(dsn=CrashReport.DSN,
++ release=__version__,
++ ca_certs=cacert)
+
+- if hasattr(exception, "fingerprint"):
+- client = raven.Client(CrashReport.DSN, release=__version__, fingerprint=['{{ default }}', exception.fingerprint], transport=HTTPTransport)
+- else:
+- client = raven.Client(CrashReport.DSN, release=__version__, transport=HTTPTransport)
+- context = {
++ tags = {
+ "os:name": platform.system(),
+ "os:release": platform.release(),
+ "os:win_32": " ".join(platform.win32_ver()),
+ "os:mac": "{} {}".format(platform.mac_ver()[0], platform.mac_ver()[2]),
+ "os:linux": " ".join(distro.linux_distribution()),
++
++ }
++
++ self._add_qt_information(tags)
++
++ with sentry_sdk.configure_scope() as scope:
++ for key, value in tags.items():
++ scope.set_tag(key, value)
++
++ extra_context = {
+ "python:version": "{}.{}.{}".format(sys.version_info[0],
+ sys.version_info[1],
+ sys.version_info[2]),
+ "python:bit": struct.calcsize("P") * 8,
+ "python:encoding": sys.getdefaultencoding(),
+- "python:frozen": "{}".format(hasattr(sys, "frozen")),
++ "python:frozen": "{}".format(hasattr(sys, "frozen"))
+ }
+
+ # extra controller and compute information
+- extra_context = {"controller:version": Controller.instance().version(),
+- "controller:host": Controller.instance().host(),
+- "controller:connected": Controller.instance().connected()}
++ from .controller import Controller
++ from .compute_manager import ComputeManager
++ extra_context["controller:version"] = Controller.instance().version()
++ extra_context["controller:host"] = Controller.instance().host()
++ extra_context["controller:connected"] = Controller.instance().connected()
++
+ for index, compute in enumerate(ComputeManager.instance().computes()):
+ extra_context["compute{}:id".format(index)] = compute.id()
+ extra_context["compute{}:name".format(index)] = compute.name(),
+@@ -120,27 +120,46 @@ def captureException(self, exception, value, tb):
+ extra_context["compute{}:platform".format(index)] = compute.capabilities().get("platform")
+ extra_context["compute{}:version".format(index)] = compute.capabilities().get("version")
+
+- context = self._add_qt_information(context)
+- client.tags_context(context)
+- client.extra_context(extra_context)
++ with sentry_sdk.configure_scope() as scope:
++ for key, value in extra_context.items():
++ scope.set_extra(key, value)
++
++ def captureException(self, exception, value, tb):
++ from .local_server import LocalServer
++ from .local_config import LocalConfig
++
++ local_server = LocalServer.instance().localServerSettings()
++ if local_server["report_errors"]:
++ if not SENTRY_SDK_AVAILABLE:
++ return
++
++ if os.path.exists(LocalConfig.instance().runAsRootPath()):
++ log.warning("User is running application as root. Crash reports disabled.")
++ sys.exit(1)
++ return
++
++ if os.path.exists(".git"):
++ log.warning("A .git directory exists, crash reporting is turned off for developers.")
++ sys.exit(1)
++ return
++
+ try:
+- report = client.captureException((exception, value, tb))
++ sentry_sdk.capture_exception((exception, value, tb))
++ log.info("Crash report sent with event ID: {}".format(sentry_sdk.last_event_id()))
+ except Exception as e:
+ log.error("Can't send crash report to Sentry: {}".format(e))
+- return
+- log.debug("Crash report sent with event ID: {}".format(client.get_ident(report)))
+
+- def _add_qt_information(self, context):
++ def _add_qt_information(self, tags):
++
+ try:
+ from .qt import QtCore
+ from .qt import sip
+ except ImportError:
+- return context
+- context["psutil:version"] = psutil.__version__
+- context["pyqt:version"] = QtCore.PYQT_VERSION_STR
+- context["qt:version"] = QtCore.QT_VERSION_STR
+- context["sip:version"] = sip.SIP_VERSION_STR
+- return context
++ return tags
++ tags["pyqt:version"] = QtCore.PYQT_VERSION_STR
++ tags["qt:version"] = QtCore.QT_VERSION_STR
++ tags["sip:version"] = sip.SIP_VERSION_STR
++ return tags
+
+ @classmethod
+ def instance(cls):
+diff --git a/requirements.txt b/requirements.txt
+index 99e803f1b..abd6cc7c9 100644
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -1,5 +1,5 @@
+ jsonschema==3.2.0; python_version >= '3.8' # pyup: ignore
+ jsonschema==2.6.0; python_version < '3.8' # pyup: ignore
+-raven>=5.23.0
++sentry-sdk>=0.14.4
+ psutil==5.6.6
+ distro>=1.3.0
diff --git a/net-misc/gns3-gui/gns3-gui-2.2.8.ebuild b/net-misc/gns3-gui/gns3-gui-2.2.8.ebuild
new file mode 100644
index 000000000000..5494cff0bb34
--- /dev/null
+++ b/net-misc/gns3-gui/gns3-gui-2.2.8.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8} )
+
+inherit distutils-r1 desktop xdg
+
+DESCRIPTION="Graphical Network Simulator"
+HOMEPAGE="https://www.gns3.net/"
+SRC_URI="https://github.com/GNS3/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+#net-misc/gns3-server version should always match gns3-gui version
+RDEPEND="
+ >=dev-python/distro-1.3.0[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '>=dev-python/jsonschema-3.2.0:=[${PYTHON_USEDEP}]' 'python3_8')
+ $(python_gen_cond_dep '<=dev-python/jsonschema-2.6.0:=[${PYTHON_USEDEP}]' 'python3_7')
+ >=dev-python/psutil-5.6.0[${PYTHON_USEDEP}]
+ >=dev-python/sentry-sdk-0.14.4[${PYTHON_USEDEP}]
+ ~net-misc/gns3-server-${PV}[${PYTHON_USEDEP}]
+ dev-python/PyQt5[gui,network,svg,websockets,widgets,${PYTHON_USEDEP}]
+"
+
+DISTUTILS_USE_SETUPTOOLS=bdepend
+
+PATCHES=( "${FILESDIR}/gns3-gui-rmraven.patch" )
+
+src_prepare() {
+ default
+ # newer psutils is fine
+ sed -i -e '/psutil==5.6.6/d' requirements.txt || die "fixing requirements failed"
+ eapply_user
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ doicon "resources/images/gns3.ico"
+ make_desktop_entry "gns3" "GNS3" "gns3.ico" "Utility"
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+ xdg_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+ xdg_icon_cache_update
+}
diff --git a/net-misc/gns3-gui/metadata.xml b/net-misc/gns3-gui/metadata.xml
index 019d76c33613..09439c8762b5 100644
--- a/net-misc/gns3-gui/metadata.xml
+++ b/net-misc/gns3-gui/metadata.xml
@@ -2,14 +2,12 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>onigino@protonmail.com</email>
- <name>Gino McCarty</name>
- </maintainer>
- <maintainer type="project">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
+ <email>bman@gentoo.org</email>
+ <name>Aaron Bauman</name>
</maintainer>
<upstream>
<remote-id type="sourceforge">gns-3</remote-id>
+ <remote-id type="github">GNS3/gns3-server</remote-id>
+ <bugs-to>https://github.com/GNS3/gns3-server/issues</bugs-to>
</upstream>
</pkgmetadata>