Your message dated Sat, 27 Aug 2011 18:02:33 +0000
with message-id <[email protected]>
and subject line Bug#635977: fixed in nethogs 0.8.0-1
has caused the Debian Bug report #635977,
regarding nethogs does not adapt to terminal size, always assumes terminal with 
80 columns
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
635977: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=635977
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: nethogs
Version: 0.7.0-3
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu oneiric ubuntu-patch

In Ubuntu, the attached patch was applied to achieve the following:

  * Apply patch from Shock to support dynamic terminal sizes (instead
    of a hard-coded 80). This patch has already been applied upstream.
    (LP: #627626)


Thanks for considering the patch.


-- System Information:
Debian Release: wheezy/sid
  APT prefers oneiric-updates
  APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500, 
'oneiric-proposed'), (500, 'oneiric')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-7-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- nethogs-0.7.0.orig/debian/patches/04_support_more_than_80_columns.diff
+++ nethogs-0.7.0/debian/patches/04_support_more_than_80_columns.diff
@@ -0,0 +1,148 @@
+Description: Fix assumption of hard-coded 80 columns in terminal
+Forwarded: https://bugs.launchpad.net/ubuntu/+source/nethogs/+bug/627626/comments/2
+Applied-Upstream: https://bugs.launchpad.net/ubuntu/+source/nethogs/+bug/627626/comments/2
+Author: Shock
+Reviewed-By: Daniel T Chen <[email protected]>
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nethogs/+bug/627626
+Last-Update: 2011-07-29
+
+diff -Nur -x '*.orig' -x '*~' nethogs-0.7.0//cui.cpp nethogs-0.7.0.new//cui.cpp
+--- nethogs-0.7.0//cui.cpp	2009-03-12 17:28:14.000000000 -0400
++++ nethogs-0.7.0.new//cui.cpp	2011-07-29 18:13:52.000000000 -0400
+@@ -46,7 +46,7 @@
+ 		assert (m_pid >= 0);
+ 	}
+ 
+-	void show (int row);
++	void show (int row, unsigned int proglen);
+ 
+ 	double sent_value;
+ 	double recv_value;
+@@ -74,7 +74,7 @@
+ }
+ 
+ 
+-void Line::show (int row)
++void Line::show (int row, unsigned int proglen)
+ {
+ 	assert (m_pid >= 0);
+ 	assert (m_pid <= 100000);
+@@ -89,10 +89,10 @@
+ 	char * username = uid2username(m_uid);
+ 	mvprintw (3+row, 6, "%s", username);
+ 	free (username);
+-	if (strlen (m_name) > PROGNAME_WIDTH) {
++	if (strlen (m_name) > proglen) {
+ 		// truncate oversized names
+ 		char * tmp = strdup(m_name);
+-		char * start = tmp + strlen (m_name) - PROGNAME_WIDTH;
++		char * start = tmp + strlen (m_name) - proglen;
+ 		start[0] = '.';
+ 		start[1] = '.';
+ 		mvprintw (3+row, 6 + 9, "%s", start);
+@@ -100,24 +100,24 @@
+ 	} else {
+ 		mvprintw (3+row, 6 + 9, "%s", m_name);
+ 	}
+-	mvprintw (3+row, 6 + 9 + PROGNAME_WIDTH + 2, "%s", devicename);
+-	mvprintw (3+row, 6 + 9 + PROGNAME_WIDTH + 2 + 6, "%10.3f", sent_value);
+-	mvprintw (3+row, 6 + 9 + PROGNAME_WIDTH + 2 + 6 + 9 + 3, "%10.3f", recv_value);
++	mvprintw (3+row, 6 + 9 + proglen + 2, "%s", devicename);
++	mvprintw (3+row, 6 + 9 + proglen + 2 + 6, "%10.3f", sent_value);
++	mvprintw (3+row, 6 + 9 + proglen + 2 + 6 + 9 + 3, "%10.3f", recv_value);
+ 	if (viewMode == VIEWMODE_KBPS)
+ 	{
+-		mvprintw (3+row, 6 + 9 + PROGNAME_WIDTH + 2 + 6 + 9 + 3 + 11, "KB/sec");
++		mvprintw (3+row, 6 + 9 + proglen + 2 + 6 + 9 + 3 + 11, "KB/sec");
+ 	}
+ 	else if (viewMode == VIEWMODE_TOTAL_MB)
+ 	{
+-		mvprintw (3+row, 6 + 9 + PROGNAME_WIDTH + 2 + 6 + 9 + 3 + 11, "MB    ");
++		mvprintw (3+row, 6 + 9 + proglen + 2 + 6 + 9 + 3 + 11, "MB    ");
+ 	}
+ 	else if (viewMode == VIEWMODE_TOTAL_KB)
+ 	{
+-		mvprintw (3+row, 6 + 9 + PROGNAME_WIDTH + 2 + 6 + 9 + 3 + 11, "KB    ");
++		mvprintw (3+row, 6 + 9 + proglen + 2 + 6 + 9 + 3 + 11, "KB    ");
+ 	}
+ 	else if (viewMode == VIEWMODE_TOTAL_B)
+ 	{
+-		mvprintw (3+row, 6 + 9 + PROGNAME_WIDTH + 2 + 6 + 9 + 3 + 11, "B     ");
++		mvprintw (3+row, 6 + 9 + proglen + 2 + 6 + 9 + 3 + 11, "B     ");
+ 	}
+ }
+ 
+@@ -302,6 +302,21 @@
+ // Display all processes and relevant network traffic using show function
+ void do_refresh()
+ {
++	int row; // number of terminal rows
++	int col; // number of terminal columns
++	unsigned int proglen; // max length of the "PROGRAM" column
++
++	getmaxyx(stdscr, row, col);	 /* find the boundaries of the screeen */
++	if (col < 60) {
++		clear();
++		mvprintw(0,0, "The terminal is too narrow! Please make it wider.\nI'll wait...");
++		return;
++	}
++
++	if (col > PROGNAME_WIDTH) col = PROGNAME_WIDTH;
++
++	proglen = col - 53;
++
+ 	refreshconninode();
+ 	if (DEBUG || tracemode)
+ 	{
+@@ -312,7 +327,7 @@
+ 		clear();
+ 		mvprintw (0, 0, "%s", caption->c_str());
+ 		attron(A_REVERSE);
+-		mvprintw (2, 0, "  PID USER     PROGRAM                      DEV        SENT      RECEIVED       ");
++		mvprintw (2, 0, "  PID USER     %-*.*s  DEV        SENT      RECEIVED       ", proglen, proglen, "PROGRAM");
+ 		attroff(A_REVERSE);
+ 	}
+ 	ProcList * curproc = processes;
+@@ -424,7 +439,7 @@
+ 	/* print them */
+ 	for (i=0; i<nproc; i++)
+ 	{
+-		lines[i]->show(i);
++		lines[i]->show(i, proglen);
+ 		recv_global += lines[i]->recv_value;
+ 		sent_global += lines[i]->sent_value;
+ 		delete lines[i];
+@@ -442,16 +457,16 @@
+ 
+ 	if ((!tracemode) && (!DEBUG)){
+ 		attron(A_REVERSE);
+-		mvprintw (3+1+i, 0, "  TOTAL                                           %10.3f  %10.3f ", sent_global, recv_global);
++		mvprintw (3+1+i, 0, "  TOTAL        %-*.*s        %10.3f  %10.3f ", proglen, proglen, " ", sent_global, recv_global);
+ 		if (viewMode == VIEWMODE_KBPS)
+ 		{
+-			mvprintw (3+1+i, 73, "KB/sec ");
++			mvprintw (3+1+i, col - 7, "KB/sec ");
+ 		} else if (viewMode == VIEWMODE_TOTAL_B) {
+-			mvprintw (3+1+i, 73, "B      ");
++			mvprintw (3+1+i, col - 7, "B      ");
+ 		} else if (viewMode == VIEWMODE_TOTAL_KB) {
+-			mvprintw (3+1+i, 73, "KB     ");
++			mvprintw (3+1+i, col - 7, "KB     ");
+ 		} else if (viewMode == VIEWMODE_TOTAL_MB) {
+-			mvprintw (3+1+i, 73, "MB     ");
++			mvprintw (3+1+i, col - 7, "MB     ");
+ 		}
+ 		attroff(A_REVERSE);
+ 		mvprintw (4+1+i, 0, "");
+diff -Nur -x '*.orig' -x '*~' nethogs-0.7.0//nethogs.h nethogs-0.7.0.new//nethogs.h
+--- nethogs-0.7.0//nethogs.h	2009-03-12 17:28:14.000000000 -0400
++++ nethogs-0.7.0.new//nethogs.h	2011-07-29 18:13:52.000000000 -0400
+@@ -39,7 +39,7 @@
+ // -> 2*45+1=91. we make it 92, for the null.
+ #define HASHKEYSIZE 92
+ 
+-#define PROGNAME_WIDTH 27
++#define PROGNAME_WIDTH 512
+ 
+ void forceExit(const char *msg, ...);
+ 

--- End Message ---
--- Begin Message ---
Source: nethogs
Source-Version: 0.8.0-1

We believe that the bug you reported is fixed in the latest version of
nethogs, which is due to be installed in the Debian FTP archive:

nethogs_0.8.0-1.debian.tar.gz
  to main/n/nethogs/nethogs_0.8.0-1.debian.tar.gz
nethogs_0.8.0-1.dsc
  to main/n/nethogs/nethogs_0.8.0-1.dsc
nethogs_0.8.0-1_amd64.deb
  to main/n/nethogs/nethogs_0.8.0-1_amd64.deb
nethogs_0.8.0.orig.tar.gz
  to main/n/nethogs/nethogs_0.8.0.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bart Martens <[email protected]> (supplier of updated nethogs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 27 Aug 2011 17:05:26 +0000
Source: nethogs
Binary: nethogs
Architecture: source amd64
Version: 0.8.0-1
Distribution: unstable
Urgency: low
Maintainer: Bart Martens <[email protected]>
Changed-By: Bart Martens <[email protected]>
Description: 
 nethogs    - Net top tool grouping bandwidth per process
Closes: 635977
Changes: 
 nethogs (0.8.0-1) unstable; urgency=low
 .
   * Switch to dpkg-source 3.0 (quilt) format.
   * New upstream release.  Closes: #635977.
   * debian/patches/01_gcc44.diff: Removed.
   * debian/patches/03_sbin.diff: Removed.
   * debian/patches/04_makefile.diff: Moved existing change to this patch.
   * debian/README.Debian-source: Removed.
Checksums-Sha1: 
 14a6b99ee3fd10b09965331bb5840eae7087751d 1682 nethogs_0.8.0-1.dsc
 5c06a99efd2ac1d3e155ac63334f8d69589122ab 38036 nethogs_0.8.0.orig.tar.gz
 7041d76416c976b8e80c91b51d84d81c1e0c7fb5 2889 nethogs_0.8.0-1.debian.tar.gz
 6caefbe991f83b61f1e7ff797730d74e5b940035 29388 nethogs_0.8.0-1_amd64.deb
Checksums-Sha256: 
 19168e2eddb3fcc7e82f823a8971cf77e00452fb0684f872f0f83ef497ada92d 1682 
nethogs_0.8.0-1.dsc
 b09cb3c2690a522f8b1314221095d5abb1958d50b56de6d36b11a8e6f28961d0 38036 
nethogs_0.8.0.orig.tar.gz
 e2190e637fbaa47d179a4d56944076702a2ba00a2c5f020d21d67c98d4cc47fc 2889 
nethogs_0.8.0-1.debian.tar.gz
 2586b2393c683f9c8a72b06d4f25b9b9274c79422952e8f896631c7386fa8d85 29388 
nethogs_0.8.0-1_amd64.deb
Files: 
 c77b0187b5f2aaf6e2deba65d484a180 1682 net optional nethogs_0.8.0-1.dsc
 d6fb12b46e80a50c9b9f91dd48e2b234 38036 net optional nethogs_0.8.0.orig.tar.gz
 6f3053b6064443f1cc021026dba48f7d 2889 net optional 
nethogs_0.8.0-1.debian.tar.gz
 1d92d2f8173a39719141844a3a72c4a9 29388 net optional nethogs_0.8.0-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCAAGBQJOWS7CAAoJEDNV9NY7WCHMOnYQALqtHOK9DJXPfzorXklpfSFz
XNy7hxZY4CH3eLakhEKahFOiUMcS+e+2hwHst87Vjn/sCgbGhNCvgTjQjFiJZMBb
HccgStNpdppUtyOyH3zP+OiDOwtIWDFrq5poHtfNFgFmzChtL+P9/EfgG/K771K8
4XHWXnWe73f6lcVYly6+5SR7yQNOzFEjG4iJaaTrsEP/H72Ac7erEY/xoLauJNcX
1UNDdi95Sqvj5DKb8KRAppns1L3N5Kvz4MpMl7vyx+nLoI8T+kDro9zKNTnjBUcm
WyLjEjMqyIlTLiaNCZUWcGNdGKEikvHULKpiqtxhN/qCkHukMBAOujpFP2vlcC/Z
+5VHnr13FywnvOlcIZIRn5mFIuIElZOL05Ezbcy95onqRYTfDm/MwPtM9jXE/Drv
U+/pRyJ/ENuBmwwcWAiGAoeEsZprcWDdkINLFR1WbJK4AUhqbJgxR1tb14/JV58E
AxKj1QeNG40jndLfY6Jw4n4EZXfl/KLICvbcbpq6RYVCmCwKtLA3nxmThgGNrQwc
TFyaqE/dugdgYK0vAdsvO5XLohCPpcZ5jyTH1OVURSzhKNtt7K8DzcbyuMk9w01R
7dxZro3A6jIAGP0WX3El6yJlNlV79HPq2ho6WqOSKTzmv0Q1IV0WJSi0l6/vTRpX
aIfGCa2jElTqgdFY2ef1
=EGe3
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to