diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2012-05-28 20:14:47 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2012-05-28 20:14:47 +0000 |
commit | edec45419def1b81bd663a2859684ef55ba56269 (patch) | |
tree | caa3c2d5f4e55b38e7740a39d80a21507679c586 /core/procps | |
parent | 483f7de4ab6a706517279a24d2efc969f4a1996d (diff) |
Mon May 28 20:14:39 UTC 2012
Diffstat (limited to 'core/procps')
21 files changed, 0 insertions, 948 deletions
diff --git a/core/procps/PKGBUILD b/core/procps/PKGBUILD deleted file mode 100644 index a43dedf7a..000000000 --- a/core/procps/PKGBUILD +++ /dev/null @@ -1,87 +0,0 @@ -# $Id: PKGBUILD 156669 2012-04-22 20:29:46Z eric $ -# Maintainer: Eric BĂ©langer <eric@archlinux.org> - -pkgname=procps -pkgver=3.2.8 -pkgrel=5 -pkgdesc="Utilities for monitoring your system and processes on your system" -arch=('i686' 'x86_64') -url="http://procps.sourceforge.net/" -license=('GPL' 'LGPL') -groups=('base') -depends=('ncurses') -backup=('etc/sysctl.conf') -source=(http://procps.sourceforge.net/procps-${pkgver}.tar.gz sysctl.conf - groff-top-manpage.patch - procps-3.2.7-top-manpage.patch - procps-3.2.7-free-hlmem.patch - procps-3.2.7-ps-man-fmt.patch - procps-3.2.7-longcmd.patch - procps-3.2.7-psman.patch - procps-3.2.7-slabtop-once.patch - procps-3.2.7-top-clrscr.patch - procps-3.2.7-top-cpu0.patch - procps-3.2.7-top-env-cpuloop.patch - procps-3.2.7-top-remcpu.patch - procps-3.2.7-top-sorthigh.patch - procps-3.2.7-watch-unicode.patch - procps-3.2.7-w-best.patch - procps-3.2.8-gmake-3.82.patch - procps-3.2.8-setlocale.patch - procps-3.2.8-threads.patch - procps-3.2.8-linux-ver-init.patch - procps-3.2.8-kernel3-uts.patch) -sha1sums=('a0c86790569dec26b5d9037e8868ca907acc9829' - '9b9a314010d042b5aa487893c06f361531525e6a' - 'bdd627f602ed2e38994d49309de0edbd90b41aff' - '16737700b22eec8f4e8d16bce099f4b1662501e2' - 'da1b9e61f8df4a8e23a7032b245dd99e32e2c01c' - 'ba9ad9f0bde3e84484b5a0238e53534438e924be' - '1a656d8094be41e019b2a9598b07c8a3d47f9de3' - '9944224ed2f5bd7d7fb505127bd71d6f01d88373' - '954026785a9e6c90d796e93563fcea2a693691e8' - '8582cd15346fa939f3fd01081620de0ffc617335' - '80e31310da53baf095e905d94485324932e433df' - '15fe886a2b4bed5885e6d457954e1145d1dcd2a2' - 'bce21809ee0cb917ddf5b0c0bf2a91ea50feb0c6' - '1be00d71e8e16ff2d656e5dd1f9988f2f3c0d5a0' - '52068a433535ec3d5d974141be3d6d3b6a41725a' - '3a8f1ba912112d7520becb28746e97b11d9b0c86' - '3a4908ed8dbc936e39cb9094af8098ef9e656581' - '09b1f6a3f9691b9f1432549a7a74a90ee5cfbdde' - '926b92913201f21c45d48436c0902cffc059ce27' - '171d5352940200c209e0c2d43c17f01c02173a66' - 'e2b2917e5462bd0aa3cb1b62942dbe8e8e81c16b') - -build() { - cd "${srcdir}/${pkgname}-${pkgver}" - patch -p1 < ../groff-top-manpage.patch - patch -p1 < ../procps-3.2.7-top-manpage.patch - patch -p1 < ../procps-3.2.7-free-hlmem.patch - patch -p1 < ../procps-3.2.7-ps-man-fmt.patch - patch -p1 < ../procps-3.2.7-psman.patch - patch -p1 < ../procps-3.2.7-longcmd.patch - patch -p1 < ../procps-3.2.7-slabtop-once.patch - patch -p1 < ../procps-3.2.7-top-clrscr.patch - patch -p1 < ../procps-3.2.7-top-cpu0.patch - patch -p1 < ../procps-3.2.7-top-env-cpuloop.patch - patch -p1 < ../procps-3.2.7-top-remcpu.patch - patch -p1 < ../procps-3.2.7-top-sorthigh.patch - patch -p1 < ../procps-3.2.7-watch-unicode.patch - patch -p1 < ../procps-3.2.7-w-best.patch - patch -p1 < ../procps-3.2.8-gmake-3.82.patch - patch -p1 < ../procps-3.2.8-setlocale.patch - patch -p1 < ../procps-3.2.8-threads.patch - patch -p0 < ../procps-3.2.8-linux-ver-init.patch - patch -p1 < ../procps-3.2.8-kernel3-uts.patch - sed -i "s:\$(lib64):lib:" Makefile - make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" -} - -package() { - cd "${srcdir}/${pkgname}-${pkgver}" - make DESTDIR="${pkgdir}" lib="${pkgdir}/usr/lib/" ldconfig=/bin/true install - install -D -m644 "${srcdir}/sysctl.conf" "${pkgdir}/etc/sysctl.conf" - install -d "${pkgdir}/usr/include/proc" - install -m644 proc/*.h "${pkgdir}/usr/include/proc" -} diff --git a/core/procps/groff-top-manpage.patch b/core/procps/groff-top-manpage.patch deleted file mode 100644 index 625053c72..000000000 --- a/core/procps/groff-top-manpage.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -Naur procps-3.2.8-orig//top.1 procps-3.2.8/top.1 ---- procps-3.2.8-orig//top.1 2010-11-19 00:43:13.000000000 -0500 -+++ procps-3.2.8/top.1 2010-11-19 00:44:06.000000000 -0500 -@@ -42,7 +42,7 @@ - .ds EM \ \fB\-\-\ \fR - \# - these two are for chuckles, makes great grammar - .ds Me top --.ds ME \fBtop\fR -+.ds MM \fBtop\fR - \# - other misc strings for consistent usage/emphasis - .ds F \fIOff\fR - .ds O \fIOn\fR -@@ -85,7 +85,7 @@ - .\" ---------------------------------------------------------------------- - .SH SYNOPSIS - .\" ---------------------------------------------------------------------- --\*(ME \-\fBhv\fR | \-\fBbcHisS\fR \-\fBd\fI delay\fR \-\fBn\fI -+\*(MM \-\fBhv\fR | \-\fBbcHisS\fR \-\fBd\fI delay\fR \-\fBn\fI - iterations\fR \-\fBp\fI pid\fR [,\fI pid\fR ...] - - The traditional switches '-' and whitespace are optional. -@@ -94,7 +94,7 @@ - .\" ---------------------------------------------------------------------- - .SH DESCRIPTION - .\" ---------------------------------------------------------------------- --The \*(ME program provides a dynamic real-time view of a running system. -+The \*(MM program provides a dynamic real-time view of a running system. - It can display\fB system\fR summary information as well as a list of\fB - tasks\fR currently being managed by the Linux kernel. - The types of system summary information shown and the types, order and -@@ -104,7 +104,7 @@ - The program provides a limited interactive interface for process - manipulation as well as a much more extensive interface for personal - configuration \*(EM encompassing every aspect of its operation. --And while \*(ME is referred to throughout this document, you are free -+And while \*(MM is referred to throughout this document, you are free - to name the program anything you wish. - That new name, possibly an alias, will then be reflected on \*(Me's display - and used when reading and writing a \*(CF. diff --git a/core/procps/procps-3.2.7-free-hlmem.patch b/core/procps/procps-3.2.7-free-hlmem.patch deleted file mode 100644 index c5ef9cc4c..000000000 --- a/core/procps/procps-3.2.7-free-hlmem.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up procps-3.2.7/free.1.hlmem procps-3.2.7/free.1 ---- procps-3.2.7/free.1.hlmem 2009-02-24 10:54:35.000000000 +0100 -+++ procps-3.2.7/free.1 2009-02-24 11:00:26.000000000 +0100 -@@ -7,7 +7,7 @@ free \- Display amount of free and used - .SH SYNOPSIS - .BR "free " [ "\-b" " | " "\-k" " | " "\-m" "] [" "\-o" "] [" "\-s" - .I delay --.RB "] [" "\-t" "] [" "\-V" ] -+.RB "] [" "\-t" "] [" "\-l" "] [" "\-V" "] - .SH DESCRIPTION - \fBfree\fP displays the total amount of free and used physical and swap - memory in the system, as well as the buffers used by the kernel. -@@ -28,7 +28,9 @@ may actually specify any floating point - .BR usleep (3) - is used for microsecond resolution delay times. - .PP --The \fB\-V\fP displays version information. -+The \fB-l\fP switch shows detailed low and high memory statistics. -+.PP -+The \fB\-V\fP switch displays version information. - .SH FILES - .ta - .IR /proc/meminfo "\-\- memory information" diff --git a/core/procps/procps-3.2.7-longcmd.patch b/core/procps/procps-3.2.7-longcmd.patch deleted file mode 100644 index 7c4fdca36..000000000 --- a/core/procps/procps-3.2.7-longcmd.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- procps-3.2.7/proc/readproc.c.kzak 2006-06-16 10:18:13.000000000 +0200 -+++ procps-3.2.7/proc/readproc.c 2006-09-27 11:25:13.000000000 +0200 -@@ -432,14 +432,17 @@ - if(fd==-1) return NULL; - - /* read whole file into a memory buffer, allocating as we go */ -- while ((n = read(fd, buf, sizeof buf - 1)) > 0) { -+ while ((n = read(fd, buf, sizeof buf - 1)) >= 0) { - if (n < (int)(sizeof buf - 1)) - end_of_file = 1; -- if (n == 0 && rbuf == 0) -+ if (n == 0 && rbuf == 0) { -+ close(fd); - return NULL; /* process died between our open and read */ -+ } - if (n < 0) { - if (rbuf) - free(rbuf); -+ close(fd); - return NULL; /* read error */ - } - if (end_of_file && buf[n-1]) /* last read char not null */ diff --git a/core/procps/procps-3.2.7-ps-man-fmt.patch b/core/procps/procps-3.2.7-ps-man-fmt.patch deleted file mode 100644 index f3a80dca7..000000000 --- a/core/procps/procps-3.2.7-ps-man-fmt.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up procps-3.2.7/ps/ps.1.ps-man-fmt procps-3.2.7/ps/ps.1 ---- procps-3.2.7/ps/ps.1.ps-man-fmt 2008-09-01 11:43:18.000000000 +0200 -+++ procps-3.2.7/ps/ps.1 2008-09-01 11:43:41.000000000 +0200 -@@ -30,7 +30,7 @@ - .\" the space needed for the 1st two columns. - .\" Making it messy: inches, ens, points, scaled points... - .\" --.nr ColSize ((\n(.lu-\n(.iu/\n(.Hu-20u)n) -+.nr ColSize ((\n[.l] - \n[.i]) / 1n - 20) - .\" - .\" This is for command options - .nr OptSize (16u) diff --git a/core/procps/procps-3.2.7-psman.patch b/core/procps/procps-3.2.7-psman.patch deleted file mode 100644 index 7ba6cff34..000000000 --- a/core/procps/procps-3.2.7-psman.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- procps-3.2.7/ps/ps.1.psman 2007-06-20 08:30:47.000000000 +0200 -+++ procps-3.2.7/ps/ps.1 2007-06-20 08:50:10.000000000 +0200 -@@ -21,8 +21,8 @@ - .\" See /usr/share/groff/current/tmac/an-old.tmac for what these do. - .\" Setting them to zero provides extra space, but only do that for - .\" plain text output. PostScript and such will remain indented. --.if n .nr IN 0n --.if n .nr an-prevailing-indent 0n -+.\" .if n .nr IN 0n -+.\" .if n .nr an-prevailing-indent 0n - .\" - .\" - .\" ColSize is used for the format spec table. -@@ -838,6 +838,8 @@ - .\" lB1 lB1 lBw(5.5i) - .\" lB1 l1 l. - .\" -+.RE -+ - .TS - expand; - lB1 lB1 lBw(\n[ColSize]n) diff --git a/core/procps/procps-3.2.7-slabtop-once.patch b/core/procps/procps-3.2.7-slabtop-once.patch deleted file mode 100644 index d3319cfe7..000000000 --- a/core/procps/procps-3.2.7-slabtop-once.patch +++ /dev/null @@ -1,113 +0,0 @@ -diff -up procps-3.2.7/slabtop.c.once procps-3.2.7/slabtop.c ---- procps-3.2.7/slabtop.c.once 2008-12-11 13:24:52.000000000 +0100 -+++ procps-3.2.7/slabtop.c 2008-12-11 13:33:12.000000000 +0100 -@@ -268,9 +268,24 @@ static void parse_input(char c) - } - } - -+/*printw or printf depending on the context*/ -+static void printwf(int once, const char *s,...) -+{ -+va_list va; -+ -+va_start(va,s); -+if(once) -+ vprintf(s,va); -+else -+ vwprintw(stdscr, s, va); -+va_end(va); -+} -+ -+ - int main(int argc, char *argv[]) - { - int o; -+ int once = 0; - unsigned short old_rows; - struct slab_info *slab_list = NULL; - -@@ -307,6 +322,7 @@ int main(int argc, char *argv[]) - break; - case 'o': - delay = 0; -+ once = 1; - break; - case 'V': - display_version(); -@@ -322,12 +338,18 @@ int main(int argc, char *argv[]) - if (tcgetattr(0, &saved_tty) == -1) - perror("tcgetattr"); - -- initscr(); -- term_size(0); -- old_rows = rows; -- resizeterm(rows, cols); -- signal(SIGWINCH, term_size); -- signal(SIGINT, sigint_handler); -+ if(!once) { -+ initscr(); -+ term_size(0); -+ old_rows = rows; -+ resizeterm(rows, cols); -+ signal(SIGWINCH, term_size); -+ signal(SIGINT, sigint_handler); -+ } else { -+ old_rows = rows; -+ rows = 80; -+ cols = 24; -+ } - - do { - struct slab_info *curr; -@@ -341,12 +363,12 @@ int main(int argc, char *argv[]) - break; - - if (old_rows != rows) { -- resizeterm(rows, cols); -+ if(!once) resizeterm(rows, cols); - old_rows = rows; - } - - move(0,0); -- printw( " Active / Total Objects (%% used) : %d / %d (%.1f%%)\n" -+ printwf(once, " Active / Total Objects (%% used) : %d / %d (%.1f%%)\n" - " Active / Total Slabs (%% used) : %d / %d (%.1f%%)\n" - " Active / Total Caches (%% used) : %d / %d (%.1f%%)\n" - " Active / Total Size (%% used) : %.2fK / %.2fK (%.1f%%)\n" -@@ -360,15 +382,15 @@ int main(int argc, char *argv[]) - - slab_list = slabsort(slab_list); - -- attron(A_REVERSE); -- printw( "%6s %6s %4s %8s %6s %8s %10s %-23s\n", -+ if(!once) attron(A_REVERSE); -+ printwf(once, "%6s %6s %4s %8s %6s %8s %10s %-23s\n", - "OBJS", "ACTIVE", "USE", "OBJ SIZE", "SLABS", - "OBJ/SLAB", "CACHE SIZE", "NAME"); -- attroff(A_REVERSE); -+ if(!once) attroff(A_REVERSE); - - curr = slab_list; - for (i = 0; i < rows - 8 && curr->next; i++) { -- printw("%6u %6u %3u%% %7.2fK %6u %8u %9uK %-23s\n", -+ printwf(once, "%6u %6u %3u%% %7.2fK %6u %8u %9uK %-23s\n", - curr->nr_objs, curr->nr_active_objs, curr->use, - curr->obj_size / 1024.0, curr->nr_slabs, - curr->objs_per_slab, (unsigned)(curr->cache_size / 1024), -@@ -376,7 +398,7 @@ int main(int argc, char *argv[]) - curr = curr->next; - } - -- refresh(); -+ if(!once) refresh(); - put_slabinfo(slab_list); - - FD_ZERO(&readfds); -@@ -392,6 +414,6 @@ int main(int argc, char *argv[]) - - tcsetattr(0, TCSAFLUSH, &saved_tty); - free_slabinfo(slab_list); -- endwin(); -+ if(!once) endwin(); - return 0; - } diff --git a/core/procps/procps-3.2.7-top-clrscr.patch b/core/procps/procps-3.2.7-top-clrscr.patch deleted file mode 100644 index 8a0256846..000000000 --- a/core/procps/procps-3.2.7-top-clrscr.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up procps-3.2.7/top.c.clrscr procps-3.2.7/top.c ---- procps-3.2.7/top.c.clrscr 2008-04-08 08:49:48.000000000 +0200 -+++ procps-3.2.7/top.c 2008-04-08 08:50:07.000000000 +0200 -@@ -2109,6 +2109,7 @@ static void fields_sort (void) - *p = x + 'A'; - Curwin->rc.sortindx = x; - putp(Cap_curs_norm); -+ putp(Cap_clr_scr); - } - - -@@ -2134,6 +2135,7 @@ static void fields_toggle (void) - *p = i + 'A'; - } - putp(Cap_curs_norm); -+ putp(Cap_clr_scr); - } - - /*###### Windows/Field Groups support #################################*/ diff --git a/core/procps/procps-3.2.7-top-cpu0.patch b/core/procps/procps-3.2.7-top-cpu0.patch deleted file mode 100644 index eb81121c5..000000000 --- a/core/procps/procps-3.2.7-top-cpu0.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- procps-3.2.7/top.c.orig 2007-09-07 21:28:41.000000000 +0100 -+++ procps-3.2.7/top.c 2007-09-07 21:29:15.000000000 +0100 -@@ -959,8 +959,15 @@ - - // and just in case we're 2.2.xx compiled without SMP support... - if (Cpu_tot == 1) { -- cpus[1].id = 0; -- memcpy(cpus, &cpus[1], sizeof(CPU_t)); -+ cpus[0].id = cpus[1].id = 0; -+ cpus[0].u = cpus[1].u; -+ cpus[0].n = cpus[1].n; -+ cpus[0].s = cpus[1].s; -+ cpus[0].i = cpus[1].i; -+ cpus[0].w = cpus[1].w; -+ cpus[0].x = cpus[1].x; -+ cpus[0].y = cpus[1].y; -+ cpus[0].z = cpus[1].z; - } - - // now value each separate cpu's tics diff --git a/core/procps/procps-3.2.7-top-env-cpuloop.patch b/core/procps/procps-3.2.7-top-env-cpuloop.patch deleted file mode 100644 index 0034dcafb..000000000 --- a/core/procps/procps-3.2.7-top-env-cpuloop.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff -up procps-3.2.7/top.c.p15 procps-3.2.7/top.c ---- procps-3.2.7/top.c.p15 2008-09-01 11:37:51.000000000 +0200 -+++ procps-3.2.7/top.c 2008-09-01 11:37:51.000000000 +0200 -@@ -121,6 +121,7 @@ static int No_ksyms = -1, // set t - Batch = 0, // batch mode, collect no input, dumb output - Loops = -1, // number of iterations, -1 loops forever - Secure_mode = 0; // set if some functionality restricted -+static int CPU_loop = 0; // wait for reliable CPU data - - /* Some cap's stuff to reduce runtime calls -- - to accomodate 'Batch' mode, they begin life as empty strings */ -@@ -1679,6 +1680,9 @@ static void before (char *me) - Fieldstab[P_PPD].fmts = pid_fmt; - Fieldstab[P_PPD].head = " PPID" + 10 - pid_digits; - } -+ -+ if (( getenv("CPULOOP")) && ( atoi(getenv("CPULOOP")) == 1 )) -+ CPU_loop = 1; - } - - -@@ -2978,6 +2981,7 @@ static proc_t **summary_show (void) - { - static proc_t **p_table = NULL; - static CPU_t *smpcpu = NULL; -+ static int first = 0; - - // whoa first time, gotta' prime the pump... - if (!p_table) { -@@ -3025,6 +3029,28 @@ static proc_t **summary_show (void) - - smpcpu = cpus_refresh(smpcpu); - -+ if (first==0 && CPU_loop) -+ { -+ int i; -+ CPU_t *cpu; -+ for (i = 0; i < Cpu_tot; i++) { -+ cpu = &smpcpu[i]; -+ cpu->u_sav = cpu->u; -+ cpu->s_sav = cpu->s; -+ cpu->n_sav = cpu->n; -+ cpu->i_sav = cpu->i; -+ cpu->w_sav = cpu->w; -+ cpu->x_sav = cpu->x; -+ cpu->y_sav = cpu->y; -+ cpu->z_sav = cpu->z; -+ } -+ tv.tv_sec = Rc.delay_time; -+ tv.tv_usec = (Rc.delay_time - (int)Rc.delay_time) * 1000000; -+ select(0, NULL, NULL, NULL, &tv); -+ -+ smpcpu = cpus_refresh(smpcpu); -+ } -+ - if (CHKw(Curwin, View_CPUSUM)) { - // display just the 1st /proc/stat line - summaryhlp(&smpcpu[Cpu_tot], "Cpu(s):"); -@@ -3050,6 +3076,8 @@ static proc_t **summary_show (void) - } - - SETw(Curwin, NEWFRAM_cwo); -+ -+ first = 1; - return p_table; - } - -diff -up procps-3.2.7/top.1.p15 procps-3.2.7/top.1 ---- procps-3.2.7/top.1.p15 2008-09-01 11:37:51.000000000 +0200 -+++ procps-3.2.7/top.1 2008-09-01 11:37:51.000000000 +0200 -@@ -1183,6 +1183,13 @@ Then ponder this: - Send bug reports to: - Albert D\. Cahalan, <albert@users.sf.net> - -+The top command calculates Cpu(s) by looking at the change in CPU time values -+between samples. When you first run it, it has no previous sample to compare -+to, so these initial values are the percentages since boot. It means you need -+at least two loops or you have to ignore summary output from the first loop. -+This is problem for example for batch mode. There is a possible workaround if -+you define the CPULOOP=1 environment variable. The top command will be run one -+extra hidden loop for CPU data before standard output. - - .\" ---------------------------------------------------------------------- - .SH 8. HISTORY Former top diff --git a/core/procps/procps-3.2.7-top-manpage.patch b/core/procps/procps-3.2.7-top-manpage.patch deleted file mode 100644 index 4ce077946..000000000 --- a/core/procps/procps-3.2.7-top-manpage.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -up procps-3.2.7/top.1.cpudesc procps-3.2.7/top.1 ---- procps-3.2.7/top.1.cpudesc 2008-01-18 08:04:19.000000000 +0100 -+++ procps-3.2.7/top.1 2008-01-18 08:15:49.000000000 +0100 -@@ -121,6 +121,7 @@ - 2. FIELDS / Columns - a. DESCRIPTIONS of Fields - b. SELECTING and ORDERING Columns -+ c. SUMMARY Area Fields - 3. INTERACTIVE Commands - a. GLOBAL Commands - b. SUMMARY Area Commands -@@ -540,6 +540,20 @@ You\fI move\fR a field to the\fB left\fR - upper case\fR letter and to the\fB right\fR with the\fB lower case\fR - letter. - -+.\" ...................................................................... -+.SS 2c. SUMMARY Area Fields -+.\" ---------------------------------------------------------------------- -+The summary area fields describing CPU statistics are abbreviated. They provide -+information about times spent in: -+ \fR us = user mode -+ \fR sy = system mode -+ \fR ni = low priority user mode (nice) -+ \fR id = idle task -+ \fR wa = I/O waiting -+ \fR hi = servicing IRQs -+ \fR si = servicing soft IRQs -+ \fR st = steal (time given to other DomU instances) -+ - - .\" ---------------------------------------------------------------------- - .SH 3. INTERACTIVE Commands diff --git a/core/procps/procps-3.2.7-top-remcpu.patch b/core/procps/procps-3.2.7-top-remcpu.patch deleted file mode 100644 index 88d14ef0a..000000000 --- a/core/procps/procps-3.2.7-top-remcpu.patch +++ /dev/null @@ -1,98 +0,0 @@ ---- procps-3.2.7/top.c.remcpu 2006-07-10 10:41:11.000000000 +0200 -+++ procps-3.2.7/top.c 2006-07-10 10:41:35.000000000 +0200 -@@ -912,6 +912,7 @@ - static CPU_t *cpus_refresh (CPU_t *cpus) - { - static FILE *fp = NULL; -+ static int cpu_max; - int i; - int num; - // enough for a /proc/stat CPU line (not the intr line) -@@ -926,24 +927,29 @@ - can hold tics representing the /proc/stat cpu summary (the first - line read) -- that slot supports our View_CPUSUM toggle */ - cpus = alloc_c((1 + Cpu_tot) * sizeof(CPU_t)); -+ cpu_max = Cpu_tot; - } -+ else if (cpu_max > Cpu_tot) -+ /* move saved CUPs summary to cpu_max possition */ -+ memcpy(&cpus[cpu_max], &cpus[Cpu_tot], sizeof(CPU_t)); -+ - rewind(fp); - fflush(fp); - - // first value the last slot with the cpu summary line - if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read"); -- cpus[Cpu_tot].x = 0; // FIXME: can't tell by kernel version number -- cpus[Cpu_tot].y = 0; // FIXME: can't tell by kernel version number -- cpus[Cpu_tot].z = 0; // FIXME: can't tell by kernel version number -+ cpus[cpu_max].x = 0; // FIXME: can't tell by kernel version number -+ cpus[cpu_max].y = 0; // FIXME: can't tell by kernel version number -+ cpus[cpu_max].z = 0; // FIXME: can't tell by kernel version number - num = sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu", -- &cpus[Cpu_tot].u, -- &cpus[Cpu_tot].n, -- &cpus[Cpu_tot].s, -- &cpus[Cpu_tot].i, -- &cpus[Cpu_tot].w, -- &cpus[Cpu_tot].x, -- &cpus[Cpu_tot].y, -- &cpus[Cpu_tot].z -+ &cpus[cpu_max].u, -+ &cpus[cpu_max].n, -+ &cpus[cpu_max].s, -+ &cpus[cpu_max].i, -+ &cpus[cpu_max].w, -+ &cpus[cpu_max].x, -+ &cpus[cpu_max].y, -+ &cpus[cpu_max].z - ); - if (num < 4) - std_err("failed /proc/stat read"); -@@ -955,7 +961,7 @@ - } - - // now value each separate cpu's tics -- for (i = 0; 1 < Cpu_tot && i < Cpu_tot; i++) { -+ for (i = 0; ; i++) { - if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read"); - cpus[i].x = 0; // FIXME: can't tell by kernel version number - cpus[i].y = 0; // FIXME: can't tell by kernel version number -@@ -964,9 +970,35 @@ - &cpus[i].id, - &cpus[i].u, &cpus[i].n, &cpus[i].s, &cpus[i].i, &cpus[i].w, &cpus[i].x, &cpus[i].y, &cpus[i].z - ); -- if (num < 4) -- std_err("failed /proc/stat read"); -+ if (num < 4) { -+ Cpu_tot = i; -+ break; -+ } -+ if (i == cpu_max - 1) { -+ // Bump cpu_max and extend cpus -+ cpu_max++; -+ cpus = realloc(cpus, (1 + cpu_max) * sizeof(CPU_t)); -+ if (!cpus) std_err("realloc failed"); -+ memcpy(&cpus[cpu_max], &cpus[cpu_max-1], sizeof(CPU_t)); -+ } -+ } -+ -+ if (cpu_max > Cpu_tot) -+ memcpy(&cpus[Cpu_tot], &cpus[cpu_max], sizeof(CPU_t)); -+ -+ // and just in case we're 2.2.xx compiled without SMP support... -+ if (Cpu_tot == 1) { -+ cpus[0].id = cpus[1].id = 0; -+ cpus[0].u = cpus[1].u; -+ cpus[0].n = cpus[1].n; -+ cpus[0].s = cpus[1].s; -+ cpus[0].i = cpus[1].i; -+ cpus[0].w = cpus[1].w; -+ cpus[0].x = cpus[1].x; -+ cpus[0].y = cpus[1].y; -+ cpus[0].z = cpus[1].z; - } -+ - return cpus; - } - diff --git a/core/procps/procps-3.2.7-top-sorthigh.patch b/core/procps/procps-3.2.7-top-sorthigh.patch deleted file mode 100644 index e17df1e22..000000000 --- a/core/procps/procps-3.2.7-top-sorthigh.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- procps-3.2.7/top.c.sorthigh 2007-02-05 09:06:34.000000000 +0100 -+++ procps-3.2.7/top.c 2007-02-05 09:09:35.000000000 +0100 -@@ -3121,6 +3121,7 @@ - unsigned w = Fieldstab[i].width; - - int advance = (x==0) && !Rc.mode_altscr; -+ f += advance; - - switch (i) { - case P_CMD: -@@ -3179,7 +3180,7 @@ - break; - case P_PRI: - if (unlikely(-99 > p->priority) || unlikely(999 < p->priority)) { -- f = " RT"; -+ f = advance ? " RT" : " RT"; - MKCOL(""); - } else - MKCOL((int)p->priority); -@@ -3227,7 +3228,7 @@ - break; - case P_WCH: - if (No_ksyms) { -- f = " %08lx "; -+ f = advance ? "%08lx " : " %08lx "; - MKCOL((long)p->wchan); - } else { - MKCOL(lookup_wchan(p->wchan, p->XXXID)); -@@ -3236,7 +3237,7 @@ - - } /* end: switch 'procflag' */ - -- rp = scat(rp, cbuf+advance); -+ rp = scat(rp, cbuf); - } /* end: for 'maxpflgs' */ - - PUFF( diff --git a/core/procps/procps-3.2.7-w-best.patch b/core/procps/procps-3.2.7-w-best.patch deleted file mode 100644 index 86b3e9328..000000000 --- a/core/procps/procps-3.2.7-w-best.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- procps-3.2.7/w.c.kzak 2007-04-02 23:58:30.000000000 +0200 -+++ procps-3.2.7/w.c 2007-04-03 00:09:15.000000000 +0200 -@@ -149,11 +149,11 @@ - const proc_t *restrict const tmp = *pptr; - if(unlikely(tmp->tgid == u->ut_pid)) { - *found_utpid = 1; -- best = tmp; -+ if (!best) -+ best = tmp; - } - if(tmp->tty != line) continue; - (*jcpu) += tmp->utime + tmp->stime; -- secondbest = tmp; - /* same time-logic here as for "best" below */ - if(! (secondbest && tmp->start_time <= secondbest->start_time) ){ - secondbest = tmp; diff --git a/core/procps/procps-3.2.7-watch-unicode.patch b/core/procps/procps-3.2.7-watch-unicode.patch deleted file mode 100644 index 1b3d97488..000000000 --- a/core/procps/procps-3.2.7-watch-unicode.patch +++ /dev/null @@ -1,139 +0,0 @@ -diff -u procps-3.2.7/Makefile procps/Makefile ---- procps-3.2.7/Makefile 2007-01-16 17:24:49.000000000 +0100 -+++ procps/Makefile 2007-01-16 17:29:27.000000000 +0100 -@@ -67,7 +67,7 @@ - # plus the top-level Makefile to make it work stand-alone. - _TARFILES := Makefile - --CURSES := -lncurses -+CURSES := -lncursesw - - # This seems about right for the dynamic library stuff. - # Something like this is probably needed to make the SE Linux -diff -u procps-3.2.7/watch.c procps/watch.c ---- procps-3.2.7/watch.c 2007-01-16 17:24:49.000000000 +0100 -+++ procps/watch.c 2007-01-16 18:06:57.000000000 +0100 -@@ -28,6 +28,8 @@ - #include <termios.h> - #include <locale.h> - #include "proc/procps.h" -+#include <wchar.h> -+#include <wctype.h> - - #ifdef FORCE_8BIT - #undef isprint -@@ -137,6 +139,27 @@ - } - } - -+static wint_t -+readwc(FILE *stream, mbstate_t *mbs) -+{ -+ for (;;) { -+ int chr; -+ char c; -+ wchar_t wc; -+ size_t len; -+ -+ chr = getc(stream); -+ if (chr == EOF) -+ return WEOF; -+ c = chr; -+ len = mbrtowc(&wc, &c, 1, mbs); -+ if (len == (size_t)-1) -+ memset(mbs, 0, sizeof(*mbs)); -+ else if (len != (size_t)-2) -+ return wc; -+ } -+} -+ - int - main(int argc, char *argv[]) - { -@@ -243,6 +266,7 @@ - FILE *p; - int x, y; - int oldeolseen = 1; -+ mbstate_t mbs; - - if (screen_size_changed) { - get_terminal_size(); -@@ -276,49 +300,63 @@ - do_exit(2); - } - -+ memset(&mbs, 0, sizeof(mbs)); - for (y = show_title; y < height; y++) { - int eolseen = 0, tabpending = 0; - for (x = 0; x < width; x++) { -- int c = ' '; -- int attr = 0; -+ wint_t c = L' '; -+ int attr = 0, c_width; -+ cchar_t cc; -+ wchar_t wstr[2]; - - if (!eolseen) { - /* if there is a tab pending, just spit spaces until the - next stop instead of reading characters */ - if (!tabpending) - do -- c = getc(p); -- while (c != EOF && !isprint(c) -- && c != '\n' -- && c != '\t'); -- if (c == '\n') -+ c = readwc(p, &mbs); -+ while (c != WEOF && !iswprint(c) -+ && c != L'\n' -+ && c != L'\t'); -+ if (c == L'\n') - if (!oldeolseen && x == 0) { - x = -1; - continue; - } else - eolseen = 1; -- else if (c == '\t') -+ else if (c == L'\t') - tabpending = 1; -- if (c == EOF || c == '\n' || c == '\t') -- c = ' '; -+ if (c == WEOF || c == L'\n' || c == L'\t') -+ c = L' '; - if (tabpending && (((x + 1) % 8) == 0)) - tabpending = 0; - } -+ wstr[0] = c; -+ wstr[1] = 0; -+ setcchar (&cc, wstr, 0, 0, NULL); - move(y, x); - if (option_differences) { -- chtype oldch = inch(); -- char oldc = oldch & A_CHARTEXT; -+ cchar_t oldc; -+ wchar_t oldwstr[2]; -+ attr_t attrs; -+ short colors; -+ -+ in_wch(&oldc); -+ getcchar(&oldc, oldwstr, &attrs, &colors, NULL); - attr = !first_screen -- && ((char)c != oldc -+ && (wstr[0] != oldwstr[0] - || - (option_differences_cumulative -- && (oldch & A_ATTRIBUTES))); -+ && attrs)); - } - if (attr) - standout(); -- addch(c); -+ add_wch(&cc); - if (attr) - standend(); -+ c_width = wcwidth(c); -+ if (c_width > 1) -+ x += c_width - 1; - } - oldeolseen = eolseen; - } diff --git a/core/procps/procps-3.2.8-gmake-3.82.patch b/core/procps/procps-3.2.8-gmake-3.82.patch deleted file mode 100644 index 87ab13ea4..000000000 --- a/core/procps/procps-3.2.8-gmake-3.82.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: procps-3.2.8/Makefile -=================================================================== ---- procps-3.2.8.orig/Makefile -+++ procps-3.2.8/Makefile -@@ -174,7 +174,8 @@ INSTALL := $(BINFILES) $(MANFILES) - # want this rule first, use := on ALL, and ALL not filled in yet - all: do_all - ---include */module.mk -+-include proc/module.mk -+-include ps/module.mk - - do_all: $(ALL) - diff --git a/core/procps/procps-3.2.8-kernel3-uts.patch b/core/procps/procps-3.2.8-kernel3-uts.patch deleted file mode 100644 index a72ae59e3..000000000 --- a/core/procps/procps-3.2.8-kernel3-uts.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -Naur procps-3.2.8-20110302git.orig/proc/version.c procps-3.2.8-20110302git/proc/version.c ---- procps-3.2.8-20110302git.orig/proc/version.c 2011-06-10 17:00:33.000000000 +0200 -+++ procps-3.2.8-20110302git/proc/version.c 2011-06-10 17:20:17.000000000 +0200 -@@ -38,10 +38,15 @@ - void init_Linux_version(void) { - static struct utsname uts; - int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */ -+ int version_string_depth; - - if (uname(&uts) == -1) /* failure implies impending death */ - exit(1); -- if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3) -+ -+ version_string_depth = sscanf(uts.release, "%d.%d.%d", &x, &y, &z); -+ -+ if ((version_string_depth < 2) || /* Non-standard for all known kernels */ -+ ((version_string_depth < 3) && (x < 3))) /* Non-standard for 2.x.x kernels */ - fprintf(stderr, /* *very* unlikely to happen by accident */ - "Non-standard uts for running kernel:\n" - "release %s=%d.%d.%d gives version code %d\n", diff --git a/core/procps/procps-3.2.8-linux-ver-init.patch b/core/procps/procps-3.2.8-linux-ver-init.patch deleted file mode 100644 index 6d4039c91..000000000 --- a/core/procps/procps-3.2.8-linux-ver-init.patch +++ /dev/null @@ -1,23 +0,0 @@ -https://bugs.gentoo.org/303120 - -make sure the linux version constructor runs before the libproc constructor -since the latter uses variables setup by the former - -fix by Chris Coleman - -Index: proc/version.c -=================================================================== -RCS file: /cvsroot/procps/procps/proc/version.c,v -retrieving revision 1.7 -diff -u -p -r1.7 version.c ---- proc/version.c 9 Feb 2003 07:27:16 -0000 1.7 -+++ proc/version.c 14 Nov 2010 00:22:44 -0000 -@@ -33,7 +33,7 @@ void display_version(void) { - - int linux_version_code; - --static void init_Linux_version(void) __attribute__((constructor)); -+static void init_Linux_version(void) __attribute__((constructor(100))); - static void init_Linux_version(void) { - static struct utsname uts; - int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */ diff --git a/core/procps/procps-3.2.8-setlocale.patch b/core/procps/procps-3.2.8-setlocale.patch deleted file mode 100644 index c197fd38a..000000000 --- a/core/procps/procps-3.2.8-setlocale.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff -Nur procps-3.2.8-orig/proc/sysinfo.c procps-3.2.8/proc/sysinfo.c ---- procps-3.2.8-orig/proc/sysinfo.c 2008-03-24 05:33:43.000000000 +0100 -+++ procps-3.2.8/proc/sysinfo.c 2009-12-18 22:50:52.000000000 +0100 -@@ -74,17 +74,19 @@ - /***********************************************************************/ - int uptime(double *restrict uptime_secs, double *restrict idle_secs) { - double up=0, idle=0; -- char *restrict savelocale; -+ char *savelocale; - - FILE_TO_BUF(UPTIME_FILE,uptime_fd); -- savelocale = setlocale(LC_NUMERIC, NULL); -+ savelocale = strdup(setlocale(LC_NUMERIC, NULL)); - setlocale(LC_NUMERIC,"C"); - if (sscanf(buf, "%lf %lf", &up, &idle) < 2) { - setlocale(LC_NUMERIC,savelocale); -+ free(savelocale); - fputs("bad data in " UPTIME_FILE "\n", stderr); - return 0; - } - setlocale(LC_NUMERIC,savelocale); -+ free(savelocale); - SET_IF_DESIRED(uptime_secs, up); - SET_IF_DESIRED(idle_secs, idle); - return up; /* assume never be zero seconds in practice */ -@@ -128,9 +130,9 @@ - double up_1, up_2, seconds; - unsigned long long jiffies; - unsigned h; -- char *restrict savelocale; -+ char *savelocale; - -- savelocale = setlocale(LC_NUMERIC, NULL); -+ savelocale = strdup(setlocale(LC_NUMERIC, NULL)); - setlocale(LC_NUMERIC, "C"); - do{ - FILE_TO_BUF(UPTIME_FILE,uptime_fd); sscanf(buf, "%lf", &up_1); -@@ -141,6 +143,7 @@ - /* uptime(&up_2, NULL); */ - } while((long long)( (up_2-up_1)*1000.0/up_1 )); /* want under 0.1% error */ - setlocale(LC_NUMERIC, savelocale); -+ free(savelocale); - jiffies = user_j + nice_j + sys_j + other_j; - seconds = (up_1 + up_2) / 2; - h = (unsigned)( (double)jiffies/seconds/smp_num_cpus ); -@@ -303,16 +306,18 @@ - /***********************************************************************/ - void loadavg(double *restrict av1, double *restrict av5, double *restrict av15) { - double avg_1=0, avg_5=0, avg_15=0; -- char *restrict savelocale; -+ char *savelocale; - - FILE_TO_BUF(LOADAVG_FILE,loadavg_fd); -- savelocale = setlocale(LC_NUMERIC, NULL); -+ savelocale = strdup(setlocale(LC_NUMERIC, NULL)); - setlocale(LC_NUMERIC, "C"); - if (sscanf(buf, "%lf %lf %lf", &avg_1, &avg_5, &avg_15) < 3) { - fputs("bad data in " LOADAVG_FILE "\n", stderr); -+ free(savelocale); - exit(1); - } - setlocale(LC_NUMERIC, savelocale); -+ free(savelocale); - SET_IF_DESIRED(av1, avg_1); - SET_IF_DESIRED(av5, avg_5); - SET_IF_DESIRED(av15, avg_15); diff --git a/core/procps/procps-3.2.8-threads.patch b/core/procps/procps-3.2.8-threads.patch deleted file mode 100644 index 2491aa4c0..000000000 --- a/core/procps/procps-3.2.8-threads.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -up procps-3.2.8/top.c.threads procps-3.2.8/top.c ---- procps-3.2.8/top.c.threads 2009-10-01 07:14:43.000000000 -0400 -+++ procps-3.2.8/top.c 2009-10-05 14:05:00.000000000 -0400 -@@ -1138,6 +1138,7 @@ static proc_t **procs_refresh (proc_t ** - #define ENTsz sizeof(proc_t) - static unsigned savmax = 0; // first time, Bypass: (i) - proc_t *ptsk = (proc_t *)-1; // first time, Force: (ii) -+ proc_t *saved_ptsk; - unsigned curmax = 0; // every time (jeeze) - PROCTAB* PT; - static int show_threads_was_enabled = 0; // optimization -@@ -1172,6 +1173,10 @@ static proc_t **procs_refresh (proc_t ** - while (curmax < savmax) { - proc_t *ttsk; - if (unlikely(!(ptsk = readproc(PT, NULL)))) break; -+ if(!show_threads_was_enabled) -+ saved_ptsk = ptsk; -+ else -+ saved_ptsk = NULL; - show_threads_was_enabled = 1; - while (curmax < savmax) { - unsigned idx; -@@ -1189,7 +1194,7 @@ static proc_t **procs_refresh (proc_t ** - prochlp(ttsk); - ++curmax; - } -- free(ptsk); // readproc() proc_t not used -+ if(!saved_ptsk) free(ptsk); // readproc() proc_t not used - } - } - -@@ -1208,7 +1213,8 @@ static proc_t **procs_refresh (proc_t ** - else { // show each thread in a process separately - while (ptsk) { - proc_t *ttsk; -- if (likely(ptsk = readproc(PT, NULL))) { -+ if (likely(ptsk = readproc(PT, NULL)) || -+ unlikely(saved_ptsk && (ptsk = saved_ptsk)) ) { - show_threads_was_enabled = 1; - while (1) { - table = alloc_r(table, (curmax + 1) * PTRsz); -@@ -1216,6 +1222,7 @@ static proc_t **procs_refresh (proc_t ** - prochlp(ttsk); - table[curmax++] = ttsk; - } -+ saved_ptsk = NULL; - free(ptsk); // readproc() proc_t not used - } - } diff --git a/core/procps/sysctl.conf b/core/procps/sysctl.conf deleted file mode 100644 index e3ebc7bad..000000000 --- a/core/procps/sysctl.conf +++ /dev/null @@ -1,13 +0,0 @@ -# -# Kernel sysctl configuration -# - -# Disable packet forwarding -net.ipv4.ip_forward=0 - -# Disable the magic-sysrq key (console security issues) -kernel.sysrq = 0 - -# Enable TCP SYN Cookie Protection -net.ipv4.tcp_syncookies = 1 - |