gnu: nyx: Show header stats.
This is a follow-up to commit 18ab54d4a2
and fixes a regression introduced by Nyx 2.0.4 + Python 3.
* gnu/packages/tor.scm (nyx)[source]: Add patch.
* gnu/packages/patches/nyx-show-header-stats-with-python3.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
This commit is contained in:
parent
4e7950fdce
commit
8edebd3207
|
@ -960,6 +960,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/nvi-assume-preserve-path.patch \
|
%D%/packages/patches/nvi-assume-preserve-path.patch \
|
||||||
%D%/packages/patches/nvi-dbpagesize-binpower.patch \
|
%D%/packages/patches/nvi-dbpagesize-binpower.patch \
|
||||||
%D%/packages/patches/nvi-db4.patch \
|
%D%/packages/patches/nvi-db4.patch \
|
||||||
|
%D%/packages/patches/nyx-show-header-stats-with-python3.patch \
|
||||||
%D%/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch \
|
%D%/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch \
|
||||||
%D%/packages/patches/ocaml-bitstring-fix-configure.patch \
|
%D%/packages/patches/ocaml-bitstring-fix-configure.patch \
|
||||||
%D%/packages/patches/ocaml-CVE-2015-8869.patch \
|
%D%/packages/patches/ocaml-CVE-2015-8869.patch \
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
From: Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
|
Date: Fri, 22 Jun 2018 02:56:39 +0200
|
||||||
|
Subject: nyx: Show header stats.
|
||||||
|
|
||||||
|
The following patch was taken verbatim from the upstream repository and
|
||||||
|
will be included in the next release.
|
||||||
|
---
|
||||||
|
commit 3494111cc81ad4985e81d0c1ea5e451d8f7a2bcc
|
||||||
|
Author: Damian Johnson <atagar@torproject.org>
|
||||||
|
Date: Mon Feb 5 20:07:40 2018 -0800
|
||||||
|
|
||||||
|
Header stats missing with python3
|
||||||
|
|
||||||
|
Ick! took me a while to find this. Python3 changed division from providing ints
|
||||||
|
to floats. This in turn caused our header panel to call addstr with float x/y
|
||||||
|
coordinates, which made that funciton fail silently. End result is that when
|
||||||
|
the header panel showed two columns of stats the right column was missing.
|
||||||
|
|
||||||
|
Caught thanks to Stijn.
|
||||||
|
|
||||||
|
diff --git a/nyx/panel/header.py b/nyx/panel/header.py
|
||||||
|
index 09e3838..fb6f2f7 100644
|
||||||
|
--- a/nyx/panel/header.py
|
||||||
|
+++ b/nyx/panel/header.py
|
||||||
|
@@ -155,7 +155,7 @@ class HeaderPanel(nyx.panel.DaemonPanel):
|
||||||
|
# space available for content
|
||||||
|
|
||||||
|
interface = nyx_interface()
|
||||||
|
- left_width = max(subwindow.width / 2, 77) if is_wide else subwindow.width
|
||||||
|
+ left_width = max(subwindow.width // 2, 77) if is_wide else subwindow.width
|
||||||
|
right_width = subwindow.width - left_width
|
||||||
|
|
||||||
|
_draw_platform_section(subwindow, 0, 0, left_width, vals)
|
||||||
|
diff --git a/web/changelog/index.html b/web/changelog/index.html
|
||||||
|
index 333fa84..196d82b 100644
|
||||||
|
--- a/web/changelog/index.html
|
||||||
|
+++ b/web/changelog/index.html
|
||||||
|
@@ -74,6 +74,12 @@
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
+ <li><span class="component">Header</span>
|
||||||
|
+ <ul>
|
||||||
|
+ <li>Right column of stats missing when using python 3.x</li>
|
||||||
|
+ </ul>
|
||||||
|
+ </li>
|
||||||
|
+
|
||||||
|
<li><span class="component">Connections</span>
|
||||||
|
<ul>
|
||||||
|
<li>Geoip information unavailable for inbound connections</li>
|
||||||
|
diff --git a/web/changelog/legacy.html b/web/changelog/legacy.html
|
||||||
|
index a380806..02d405f 100644
|
||||||
|
--- a/web/changelog/legacy.html
|
||||||
|
+++ b/web/changelog/legacy.html
|
||||||
|
@@ -137,13 +137,13 @@
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
- <li><span class="component">Startup</span>
|
||||||
|
+ <li><span class="component">Graph</span>
|
||||||
|
<ul>
|
||||||
|
<li>Crash when pausing if we showed accounting stats</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
- <li><span class="component">Startup</span>
|
||||||
|
+ <li><span class="component">Logging</span>
|
||||||
|
<ul>
|
||||||
|
<li>Skip reading from malformed tor log files</li>
|
||||||
|
<li>Unable to log GUARD events</li>
|
|
@ -263,6 +263,8 @@ from you.")
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (pypi-uri name version))
|
(uri (pypi-uri name version))
|
||||||
|
(patches
|
||||||
|
(search-patches "nyx-show-header-stats-with-python3.patch"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0pm7vfcqr02pzqz4b2f6sw5prxxmgqwr1912am42xmy2i53n7nrq"))))
|
"0pm7vfcqr02pzqz4b2f6sw5prxxmgqwr1912am42xmy2i53n7nrq"))))
|
||||||
|
|
Loading…
Reference in New Issue