Skip to contentSkip to conversation

ftop: new package

PATCH New Gustavo Zacarias 2 participants 2 messages Jun 29, 2014 – Jun 30, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ftop: new package

---
 package/Config.in                     |  1 +
 package/ftop/Config.in                | 12 ++++++++++++
 package/ftop/ftop-0001-overflow.patch | 17 +++++++++++++++++
 package/ftop/ftop.mk                  | 13 +++++++++++++
 4 files changed, 43 insertions(+)
 create mode 100644 package/ftop/Config.in
 create mode 100644 package/ftop/ftop-0001-overflow.patch
 create mode 100644 package/ftop/ftop.mk
package/Config.in +1 -0
index 4a8832f..1282c8a 100644
@@ -1122,6 +1122,7 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 endif
 	source "package/cpuload/Config.in"
 	source "package/dsp-tools/Config.in"
+	source "package/ftop/Config.in"
 	source "package/htop/Config.in"
 	source "package/iprutils/Config.in"
 	source "package/keyutils/Config.in"
package/ftop/Config.in new file +12 -0
new file mode 100644
index 0000000..878574f
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_FTOP
+	bool "ftop"
+	depends on BR2_LARGEFILE
+	select BR2_PACKAGE_NCURSES
+	help
+	  Ftop is to files what top is to processes.
+	  The progress of all open files and file systems can be monitored.
+
+	  https://code.google.com/p/ftop/
+
+comment "ftop needs a toolchain w/ largefile"
+        depends on !BR2_LARGEFILE
package/ftop/ftop-0001-overflow.patch new file +17 -0
new file mode 100644
index 0000000..a3a27c3
@@ -0,0 +1,17 @@
+Set tmp_buf and rate_buf to something ridiculously high to fix a buffer
+overflow when COLUMNS is large. - JeR
+
+(Taken from gentoo portage)
+Signed-off-by: Gustavo Zacarias <[email protected]>
+
+--- a/src/ftop.c	2009-02-16 07:00:00.000000000 +0100
++++ b/src/ftop.c	2013-09-06 14:42:41.788852952 +0200
+@@ -736,7 +736,7 @@
+ {
+     size_t i, j, bytes, bar_total;
+     char more_procs_ch, more_files_ch, expanded_ch;
+-    char tmp_buf[80], rate_buf[80];
++    char tmp_buf[2048], rate_buf[2048];
+     char *tmp_str;
+     snapshot *s, *s_prev;
+     file_info *tmp_file;
package/ftop/ftop.mk new file +13 -0
new file mode 100644
index 0000000..2220317
@@ -0,0 +1,13 @@
+################################################################################
+#
+# ftop
+#
+################################################################################
+
+FTOP_VERSION = 1.0
+FTOP_SITE = http://ftop.googlecode.com/files/
+FTOP_DEPENDENCIES = ncurses
+FTOP_LICENSE = GPLv3+
+FTOP_LICENSE_FILES = COPYING
+
+$(eval $(autotools-package))
Signature · 1 line
1.8.5.5