commit 660518242c98cbf45a508f6da0d3c46913b267405f3526c6a303baab4f4545d7 Author: Pascal Bleser Date: Tue Jun 15 19:55:05 2010 +0000 1.0 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/ftop?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/ftop-1.0.tar.bz2 b/ftop-1.0.tar.bz2 new file mode 100644 index 0000000..b1df430 --- /dev/null +++ b/ftop-1.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a705f4f291384344cd32c3dd5f5f6a7cd7cea7624c83cb7e923966dbcd47f82 +size 143122 diff --git a/ftop-fix_buffer_overflow.patch b/ftop-fix_buffer_overflow.patch new file mode 100644 index 0000000..80c24a9 --- /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-ncurses.patch b/ftop-ncurses.patch new file mode 100644 index 0000000..2a32491 --- /dev/null +++ b/ftop-ncurses.patch @@ -0,0 +1,11 @@ +--- configure.ac.orig 2010-06-15 21:31:28.000000000 +0200 ++++ configure.ac 2010-06-15 21:31:38.000000000 +0200 +@@ -14,7 +14,7 @@ + AC_PROG_MAKE_SET + + # Checks for libraries. +-AC_CHECK_LIB([curses], [initscr]) ++AC_CHECK_LIB([ncurses], [initscr]) + + # Checks for header files. + AC_HEADER_STDC diff --git a/ftop.changes b/ftop.changes new file mode 100644 index 0000000..2e9db9a --- /dev/null +++ b/ftop.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Tue Jun 15 19:26:30 UTC 2010 - pascal.bleser@opensuse.org + +- initial package (1.0) + diff --git a/ftop.spec b/ftop.spec new file mode 100644 index 0000000..f2c8829 --- /dev/null +++ b/ftop.spec @@ -0,0 +1,52 @@ +# norootforbuild + +Name: ftop +Version: 1.0 +Release: 0 +Summary: Open File Monitoring +Source: http://ftop.googlecode.com/files/ftop-%{version}.tar.bz2 +Patch1: ftop-ncurses.patch +Patch2: ftop-fix_buffer_overflow.patch +URL: http://code.google.com/p/ftop/ +Group: System/Monitoring +License: GNU General Public License version 3 (GPL v3) +BuildRoot: %{_tmppath}/build-%{name}-%{version} +BuildRequires: ncurses-devel +BuildRequires: gcc make glibc-devel +BuildRequires: autoconf automake libtool pkgconfig + +%description +Ftop is to files what top is to processes. The progress of all open files and +file systems can be monitored. If run as a regular user, the set of open files +will be limited to those in that user's processes (which is generally all that +is of interest to the user). In any case, 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 +%patch1 +%patch2 + +%build +autoreconf -fiv + +export CFLAGS="%{optflags} -Wall -DHAVE_LIBCURSES=1" +export CPPFLAGS="$CFLAGS" +%configure +%__make %{?jobs:-j%{jobs}} + +%install +%makeinstall + +%clean +%__rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%doc AUTHORS ChangeLog COPYING NEWS README +%{_bindir}/ftop +%doc %{_mandir}/man1/ftop.1%{ext_man} + +%changelog +# vim: set sw=4 ts=4 et nu: