[ftop/el6/master] Initial import (#679913)

sebelk sebelk at fedoraproject.org
Tue Mar 1 14:21:45 UTC 2011


commit 6640c5d9a87786c82d6b70163034e98b4879e5df
Author: Sergio Belkin <sebelk at fedoraproject.org>
Date:   Tue Mar 1 11:21:34 2011 -0300

    Initial import (#679913)

 .gitignore                     |    1 +
 ftop-fix_buffer_overflow.patch |   11 +++++++
 ftop-fix_printf_format.patch   |   20 ++++++++++++
 ftop.spec                      |   63 ++++++++++++++++++++++++++++++++++++++++
 sources                        |    1 +
 5 files changed, 96 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..892e12d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/ftop-1.0.tar.bz2
diff --git a/ftop-fix_buffer_overflow.patch b/ftop-fix_buffer_overflow.patch
new file mode 100644
index 0000000..f10fa6a
--- /dev/null
+++ b/ftop-fix_buffer_overflow.patch
@@ -0,0 +1,11 @@
+--- src/ftop.c.orig	2010-06-15 21:42:15.000000000 +0200
++++ src/ftop.c	2010-06-15 21:45:38.000000000 +0200
+@@ -935,7 +935,7 @@
+     {
+         if (bar_used > 0)
+         {
+-            snprintf(rate_buf, bar_used + 1, "%s", tmp_buf);
++            snprintf(rate_buf, bar_used >= sizeof(rate_buf) ? sizeof(rate_buf) : bar_used + 1, "%s", tmp_buf);
+             p_attron(p, A_REVERSE);
+             p_printf(p, "%s", rate_buf);
+             if (bar_used > bytes)
diff --git a/ftop-fix_printf_format.patch b/ftop-fix_printf_format.patch
new file mode 100644
index 0000000..afb0430
--- /dev/null
+++ b/ftop-fix_printf_format.patch
@@ -0,0 +1,20 @@
+--- src/ftop.c.orig	2010-06-15 23:14:50.000000000 +0200
++++ src/ftop.c	2010-06-15 23:15:52.000000000 +0200
+@@ -222,7 +222,7 @@
+     p_eol(p, part);
+ 
+     cols = snprintf(tmp_buf, sizeof(tmp_buf),
+-                    "Processes:  %u total, %u unreadable",
++                    "Processes:  %zu total, %zu unreadable",
+                     s->num_processes + s->num_unreadable_processes,
+                     s->num_unreadable_processes);
+ 
+@@ -244,7 +244,7 @@
+     p_eol(p, part);
+ 
+     snprintf(tmp_buf, sizeof(tmp_buf),
+-             "Open Files: %u regular, %u dir, %u chr, %u blk, %u pipe, %u sock, %u misc",
++             "Open Files: %zu regular, %zu dir, %zu chr, %zu blk, %zu pipe, %zu sock, %zu misc",
+              s->num_reg, s->num_dir, s->num_chr, s->num_blk, s->num_pipe,
+              s->num_sock, s->num_misc);
+ 
diff --git a/ftop.spec b/ftop.spec
new file mode 100644
index 0000000..0c69b1f
--- /dev/null
+++ b/ftop.spec
@@ -0,0 +1,63 @@
+Name: ftop
+Version: 1.0 
+Release: 3%{?dist}
+Summary: Utility that shows shows progress of open files and file systems
+
+Group: Applications/System
+License: GPLv3+
+URL: http://code.google.com/p/ftop/
+#SHA1 Checksum of Source0 tarball d3ef1b74825f50c7c442d299b29d23c2478f199b
+Source0: http://ftop.googlecode.com/files/%{name}-%{version}.tar.bz2
+#Patch from the upstream project site:
+#http://code.google.com/p/ftop/issues/list
+Patch0: ftop-fix_buffer_overflow.patch
+Patch1: ftop-fix_printf_format.patch
+BuildRequires: ncurses-devel
+
+
+%description
+Ftop is to files what top is to processes. The progress of all open files 
+file systems can be monitored. 
+The selection of which files to display is possible through 
+a wide assortment of options. As with top, the items are displayed in 
+order from most to least active. 
+
+%prep
+%setup -q
+
+touch -r configure.ac configure.ac.stamp
+%patch0 -p0 -b .fix_buffer_overflow
+%patch1 -p0 -b .fix_printf_format
+touch -r configure.ac.stamp configure.ac
+
+%build
+
+%configure
+make %{?_smp_mflags}
+
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+
+
+
+%files
+
+%defattr(-,root,root,-)
+%{_bindir}/*
+%doc COPYING AUTHORS ChangeLog NEWS README
+%{_mandir}/man1/*
+
+
+
+%changelog
+* Sat Feb 26 2011 Sergio Belkin <sebelk at gmail.com> 1.0-3
+- Fixed License tag
+- Fixed changelog
+
+* Thu Feb 24 2011 Sergio Belkin <sebelk at gmail.com> 1.0-2
+- Upstream patches applied
+- Fixed date changelog
+
+* Tue Feb 22 2011 Sergio Belkin <sebelk at gmail.com> 1.0-1
+- First public ftop RPM for fedora
diff --git a/sources b/sources
index e69de29..cf7e8d8 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+57c68b6e7431f4219d9eddaebcb395da  ftop-1.0.tar.bz2


More information about the scm-commits mailing list