better ncurses patch, avoids autoreconf + patch to fix %u for size_t warnings
OBS-URL: https://build.opensuse.org/package/show/server:monitoring/ftop?expand=0&rev=2
This commit is contained in:
parent
660518242c
commit
07cef419a2
20
ftop-fix_printf_format.patch
Normal file
20
ftop-fix_printf_format.patch
Normal file
@ -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);
|
||||||
|
|
@ -9,3 +9,31 @@
|
|||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
|
--- configure.orig 2010-06-15 23:09:48.000000000 +0200
|
||||||
|
+++ configure 2010-06-15 23:10:39.000000000 +0200
|
||||||
|
@@ -3415,13 +3415,13 @@
|
||||||
|
# Checks for libraries.
|
||||||
|
|
||||||
|
|
||||||
|
-{ echo "$as_me:$LINENO: checking for initscr in -lcurses" >&5
|
||||||
|
-echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6; }
|
||||||
|
+{ echo "$as_me:$LINENO: checking for initscr in -lncurses" >&5
|
||||||
|
+echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6; }
|
||||||
|
if test "${ac_cv_lib_curses_initscr+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
ac_check_lib_save_LIBS=$LIBS
|
||||||
|
-LIBS="-lcurses $LIBS"
|
||||||
|
+LIBS="-lncurses $LIBS"
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
@@ -3481,7 +3481,7 @@
|
||||||
|
#define HAVE_LIBCURSES 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
- LIBS="-lcurses $LIBS"
|
||||||
|
+ LIBS="-lncurses $LIBS"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
13
ftop.changes
13
ftop.changes
@ -1,5 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jun 15 21:17:32 UTC 2010 - pascal.bleser@opensuse.org
|
||||||
|
|
||||||
|
- rework the autoconf/ncurses patch to avoid calling autoreconf,
|
||||||
|
which is breaking on SLE
|
||||||
|
|
||||||
|
- add a patch ("ftop-fix_printf_format.patch") to fix the improper
|
||||||
|
use of %u for formatting size_t variables in printf (must use %zu
|
||||||
|
instead): http://code.google.com/p/ftop/issues/detail?id=2
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jun 15 19:26:30 UTC 2010 - pascal.bleser@opensuse.org
|
Tue Jun 15 19:26:30 UTC 2010 - pascal.bleser@opensuse.org
|
||||||
|
|
||||||
- initial package (1.0)
|
- initial package (1.0)
|
||||||
|
|
||||||
|
- buffer overflow patch sent upstream:
|
||||||
|
http://code.google.com/p/ftop/issues/detail?id=1
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ Summary: Open File Monitoring
|
|||||||
Source: http://ftop.googlecode.com/files/ftop-%{version}.tar.bz2
|
Source: http://ftop.googlecode.com/files/ftop-%{version}.tar.bz2
|
||||||
Patch1: ftop-ncurses.patch
|
Patch1: ftop-ncurses.patch
|
||||||
Patch2: ftop-fix_buffer_overflow.patch
|
Patch2: ftop-fix_buffer_overflow.patch
|
||||||
|
Patch3: ftop-fix_printf_format.patch
|
||||||
URL: http://code.google.com/p/ftop/
|
URL: http://code.google.com/p/ftop/
|
||||||
Group: System/Monitoring
|
Group: System/Monitoring
|
||||||
License: GNU General Public License version 3 (GPL v3)
|
License: GNU General Public License version 3 (GPL v3)
|
||||||
@ -27,10 +28,9 @@ items are displayed in order from most to least active.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch1
|
%patch1
|
||||||
%patch2
|
%patch2
|
||||||
|
%patch3
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fiv
|
|
||||||
|
|
||||||
export CFLAGS="%{optflags} -Wall -DHAVE_LIBCURSES=1"
|
export CFLAGS="%{optflags} -Wall -DHAVE_LIBCURSES=1"
|
||||||
export CPPFLAGS="$CFLAGS"
|
export CPPFLAGS="$CFLAGS"
|
||||||
%configure
|
%configure
|
||||||
|
Loading…
Reference in New Issue
Block a user