diff --git a/.gitignore b/.gitignore index b1c87a5..375f1be 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/procps-ng-3.3.9.tar.xz +SOURCES/procps-ng-3.3.10.tar.xz diff --git a/.procps-ng.metadata b/.procps-ng.metadata index 3062e13..ea35251 100644 --- a/.procps-ng.metadata +++ b/.procps-ng.metadata @@ -1 +1 @@ -088c77631745fc75ee41fc29c254a4069be4869a SOURCES/procps-ng-3.3.9.tar.xz +484db198d6a18a42b4011d5ecb2cb784a81b0e4f SOURCES/procps-ng-3.3.10.tar.xz diff --git a/SOURCES/ksh-skip-trailing-zeros.patch b/SOURCES/ksh-skip-trailing-zeros.patch deleted file mode 100644 index 16dd067..0000000 --- a/SOURCES/ksh-skip-trailing-zeros.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur procps-ng-3.3.9.orig/proc/readproc.c procps-ng-3.3.9/proc/readproc.c ---- procps-ng-3.3.9.orig/proc/readproc.c 2013-11-25 10:57:32.000000000 +0100 -+++ procps-ng-3.3.9/proc/readproc.c 2014-01-24 16:20:02.222000000 +0100 -@@ -686,6 +686,7 @@ - close(fd); - if(n){ - int i=n; -+ while(i && dst[i-1]=='\0') --i; // skip trailing zeros - while(i--) - if(dst[i]=='\n' || dst[i]=='\0') dst[i]=sep; - if(dst[n-1]==' ') dst[n-1]='\0'; diff --git a/SOURCES/subtract-shmem-from-cached.patch b/SOURCES/subtract-shmem-from-cached.patch deleted file mode 100644 index 579d4b5..0000000 --- a/SOURCES/subtract-shmem-from-cached.patch +++ /dev/null @@ -1,155 +0,0 @@ -From 3569c0351fae7797e8d62feae7229d2d6d2aa0a1 Mon Sep 17 00:00:00 2001 -From: Jakob Unterwurzacher -Date: Tue, 18 Feb 2014 22:12:21 +0100 -Subject: [PATCH] library: properly handle memory used by tmpfs - -tmpfs has become much more widely used since distributions use it for -/tmp (Fedora 18+). In /proc/meminfo, memory used by tmpfs is accounted -into "Cached" (aka "NR_FILE_PAGES", - http://lxr.free-electrons.com/source/mm/shmem.c#L301 ). - -The tools just pass it on, so what top, free and vmstat report as -"cached" is the sum of page cache and tmpfs. - -free has the extremely useful "-/+ buffers/cache" output. However, now -that tmpfs is accounted into "cached", those numbers are way off once -you have big files in /tmp. - -Fortunately, kernel 2.6.32 introduces "Shmem", which makes tmpfs memory -usage accessible from userspace ( -https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4b02108ac1b3354a22b0d83c684797692efdc395 ). - -This patch substracts Shmem from Cached to get the actual page cache -memory. This makes both issues mentioned above disappear. For older -kernels, Shmem is not available (hence zero) and this patch is no-op. - -Additionally: -* Update the man pages of free and vmstat to explain what is happening -* Finally drop "MemShared" from the /proc/meminfo parser, it has been - dead for 10+ years and is only causing confusion ( removed in kernel - 2.5.54, see - https://git.kernel.org/cgit/linux/kernel/git/tglx/history.git/commit/?id=fe04e9451e5a159247cf9f03c615a4273ac0c571 ) ---- - free.1 | 29 ++++++++++++++++++++++++----- - proc/sysinfo.c | 8 ++++---- - proc/sysinfo.h | 3 +-- - vmstat.8 | 3 ++- - 4 files changed, 31 insertions(+), 12 deletions(-) - -diff --git a/free.1 b/free.1 -index 1e8e7ef..21cce28 100644 ---- a/free.1 -+++ b/free.1 -@@ -11,11 +11,30 @@ free \- Display amount of free and used memory in the system - .SH DESCRIPTION - .B free - displays the total amount of free and used physical and swap memory in the --system, as well as the buffers used by the kernel. --The shared memory column represents either the MemShared value (2.4 series --kernels) or the Shmem value (2.6 series kernels and later) taken from the --/proc/meminfo file. The value is zero if none of the entries is exported --by the kernel. -+system, as well as the buffers and caches used by the kernel. The -+information is gathered by parsing /proc/meminfo. The displayed -+columns are: -+.TP -+\fBtotal\fR -+Total installed memory (MemTotal and SwapTotal in /proc/meminfo) -+.TP -+\fBused\fR -+Used memory (calculated as total - free) -+.TP -+\fBfree\fR -+Unused memory (MemFree and SwapFree in /proc/meminfo) -+.TP -+\fBshared\fR -+Memory used (mostly) by tmpfs (Shmem in /proc/meminfo, available on -+kernels 2.6.32, displayed as zero if not available) -+.TP -+\fBbuffers\fR -+Memory used by kernel buffers (Buffers in /proc/meminfo) -+.TP -+\fBcached\fR -+Memory used by the page cache (calculated as Cached - Shmem in -+/proc/meminfo - the Cached value is actually the sum of page cache and -+tmpfs memory) - .SH OPTIONS - .TP - \fB\-b\fR, \fB\-\-bytes\fR -diff --git a/proc/sysinfo.c b/proc/sysinfo.c -index 1680cc4..e07ca86 100644 ---- a/proc/sysinfo.c -+++ b/proc/sysinfo.c -@@ -531,7 +531,6 @@ static int compare_mem_table_structs(const void *a, const void *b){ - * - * MemTotal: 61768 kB old - * MemFree: 1436 kB old -- * MemShared: 0 kB old (now always zero; not calculated) - * Buffers: 1312 kB old - * Cached: 20932 kB old - * Active: 12464 kB new -@@ -560,7 +559,7 @@ static int compare_mem_table_structs(const void *a, const void *b){ - * Hugepagesize: 4096 kB 2.5.??+ - */ - --/* obsolete since 2.6.x, but reused for shmem in 2.6.32+ */ -+/* Shmem in 2.6.32+ */ - unsigned long kb_main_shared; - /* old but still kicking -- the important stuff */ - unsigned long kb_main_buffers; -@@ -631,14 +630,13 @@ void meminfo(void){ - {"LowTotal", &kb_low_total}, - {"Mapped", &kb_mapped}, // kB version of vmstat nr_mapped - {"MemFree", &kb_main_free}, // important -- {"MemShared", &kb_main_shared}, // obsolete since kernel 2.6! (sharing the variable with Shmem replacement) - {"MemTotal", &kb_main_total}, // important - {"NFS_Unstable", &kb_nfs_unstable}, - {"PageTables", &kb_pagetables}, // kB version of vmstat nr_page_table_pages - {"ReverseMaps", &nr_reversemaps}, // same as vmstat nr_page_table_pages - {"SReclaimable", &kb_swap_reclaimable}, // "swap reclaimable" (dentry and inode structures) - {"SUnreclaim", &kb_swap_unreclaimable}, -- {"Shmem", &kb_main_shared}, // kernel 2.6 and later (sharing the output variable with obsolete MemShared) -+ {"Shmem", &kb_main_shared}, // kernel 2.6.32 and later - {"Slab", &kb_slab}, // kB version of vmstat nr_slab - {"SwapCached", &kb_swap_cached}, - {"SwapFree", &kb_swap_free}, // important -@@ -684,6 +682,8 @@ nextline: - } - kb_swap_used = kb_swap_total - kb_swap_free; - kb_main_used = kb_main_total - kb_main_free; -+ /* "Cached" includes "Shmem" - we want only the page cache here */ -+ kb_main_cached -= kb_main_shared; - } - - /*****************************************************************/ -diff --git a/proc/sysinfo.h b/proc/sysinfo.h -index 1eb3472..2291631 100644 ---- a/proc/sysinfo.h -+++ b/proc/sysinfo.h -@@ -20,8 +20,7 @@ extern int uptime (double *uptime_secs, double *idle_secs); - extern unsigned long getbtime(void); - extern void loadavg(double *av1, double *av5, double *av15); - -- --/* obsolete */ -+/* Shmem in 2.6.32+ */ - extern unsigned long kb_main_shared; - /* old but still kicking -- the important stuff */ - extern unsigned long kb_main_buffers; -diff --git a/vmstat.8 b/vmstat.8 -index 420d9f3..2782a42 100644 ---- a/vmstat.8 -+++ b/vmstat.8 -@@ -102,7 +102,8 @@ b: The number of processes in uninterruptible sleep. - swpd: the amount of virtual memory used. - free: the amount of idle memory. - buff: the amount of memory used as buffers. --cache: the amount of memory used as cache. -+cache: the amount of memory used as cache (excluding tmpfs memory for -+kernels 2.6.32+) - inact: the amount of inactive memory. (\-a option) - active: the amount of active memory. (\-a option) - .fi --- -1.8.4.2 - diff --git a/SOURCES/vmstat-format-security.patch b/SOURCES/vmstat-format-security.patch deleted file mode 100644 index 68bcef7..0000000 --- a/SOURCES/vmstat-format-security.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -Naur procps-ng-3.3.9.orig/vmstat.c procps-ng-3.3.9/vmstat.c ---- procps-ng-3.3.9.orig/vmstat.c 2014-02-05 12:55:02.000000000 +0100 -+++ procps-ng-3.3.9/vmstat.c 2014-02-05 16:58:35.786000000 +0100 -@@ -204,10 +204,10 @@ - "%2s %2s %12s %12s %12s %12s %4s %4s %5s %5s %4s %4s %3s %3s %3s %3s %3s"; - - -- printf(w_option ? wide_header : header); -+ printf("%s", w_option ? wide_header : header); - - if (t_option) { -- printf(timestamp_header); -+ printf("%s", timestamp_header); - } - - printf("\n"); -@@ -528,10 +528,10 @@ - const char wide_format[] = - "%5s %9s %9s %11s %11s %9s %9s %11s %11s %7s %7s"; - -- printf(w_option ? wide_header : header); -+ printf("%s", w_option ? wide_header : header); - - if (t_option) { -- printf(timestamp_header); -+ printf("%s", timestamp_header); - } - - printf("\n"); diff --git a/SOURCES/vmstat-timestamps.patch b/SOURCES/vmstat-timestamps.patch deleted file mode 100644 index de894d2..0000000 --- a/SOURCES/vmstat-timestamps.patch +++ /dev/null @@ -1,386 +0,0 @@ -From 4fcd56bf582ee2ef5b205625ca3d1bfed90364e9 Mon Sep 17 00:00:00 2001 -From: Jaromir Capik -Date: Tue, 4 Feb 2014 19:10:42 +0100 -Subject: [PATCH] vmstat: Support for timestamps with '-t' & fix for '-wd' - -From now the vmstat can append a timestamp to each line in the -VMSTAT and DISKSTAT mode. You can achieve that with the '-t' -switch. -The '-w' switch now works in the DISKSTAT mode too. ---- - vmstat.8 | 3 + - vmstat.c | 197 ++++++++++++++++++++++++++++++++++++++++++++++++++++----------- - 2 files changed, 167 insertions(+), 33 deletions(-) - -diff --git a/vmstat.8 b/vmstat.8 -index ef6cbe9..420d9f3 100644 ---- a/vmstat.8 -+++ b/vmstat.8 -@@ -74,6 +74,9 @@ or 1048576 - bytes. Note this does not change the swap (si/so) or block (bi/bo) - fields. - .TP -+\fB\-t\fR, \fB\-\-timestamp\fR -+Append timestamp to each line -+.TP - \fB\-w\fR, \fB\-\-wide\fR - Wide output mode (useful for systems with higher amount of memory, - where the default output mode suffers from unwanted column breakage). -diff --git a/vmstat.c b/vmstat.c -index c01351d..a84d2d2 100644 ---- a/vmstat.c -+++ b/vmstat.c -@@ -43,6 +43,7 @@ - #include - #include - #include -+#include - - #include "c.h" - #include "fileutils.h" -@@ -75,6 +76,9 @@ static int a_option; - /* "-w" means "wide output" */ - static int w_option; - -+/* "-t" means "show timestamp" */ -+static int t_option; -+ - static unsigned sleep_time = 1; - static int infinite_updates = 0; - static unsigned long num_updates; -@@ -100,6 +104,7 @@ static void __attribute__ ((__noreturn__)) - fputs(_(" -p, --partition partition specific statistics\n"), out); - fputs(_(" -S, --unit define display unit\n"), out); - fputs(_(" -w, --wide wide output\n"), out); -+ fputs(_(" -t, --timestamp show timestamp\n"), out); - fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); -@@ -180,21 +185,33 @@ static int format_1000(unsigned long long val64, char *restrict dst) - - static void new_header(void) - { -+ struct tm *tm_ptr; -+ time_t the_time; -+ char timebuf[32]; -+ - /* Translation Hint: Translating folloging header & fields - * that follow (marked with max x chars) might not work, - * unless manual page is translated as well. */ -- -- const char header[] = -- "procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----\n"; -- const char wide_header[] = -- "procs -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu--------\n"; -+ const char *header = -+ _("procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----"); -+ const char *wide_header = -+ _("procs -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu--------"); -+ const char *timestamp_header = _(" -----timestamp-----"); - - const char format[] = -- "%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s\n"; -+ "%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s"; - const char wide_format[] = -- "%2s %2s %12s %12s %12s %12s %4s %4s %5s %5s %4s %4s %3s %3s %3s %3s %3s\n"; -+ "%2s %2s %12s %12s %12s %12s %4s %4s %5s %5s %4s %4s %3s %3s %3s %3s %3s"; -+ -+ -+ printf(w_option ? wide_header : header); -+ -+ if (t_option) { -+ printf(timestamp_header); -+ } -+ -+ printf("\n"); - -- printf(w_option ? _(wide_header) : _(header)); - printf( - w_option ? wide_format : format, - /* Translation Hint: max 2 chars */ -@@ -235,6 +252,19 @@ static void new_header(void) - _("wa"), - /* Translation Hint: max 2 chars */ - _("st")); -+ -+ if (t_option) { -+ (void) time( &the_time ); -+ tm_ptr = localtime( &the_time ); -+ if (strftime(timebuf, sizeof(timebuf), "%Z", tm_ptr)) { -+ timebuf[strlen(timestamp_header) - 1] = '\0'; -+ } else { -+ timebuf[0] = '\0'; -+ } -+ printf(" %*s", (int)(strlen(timestamp_header) - 1), timebuf); -+ } -+ -+ printf("\n"); - } - - static unsigned long unitConvert(unsigned long size) -@@ -247,9 +277,9 @@ static unsigned long unitConvert(unsigned long size) - static void new_format(void) - { - const char format[] = -- "%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u\n"; -+ "%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u"; - const char wide_format[] = -- "%2u %2u %12lu %12lu %12lu %12lu %4u %4u %5u %5u %4u %4u %3u %3u %3u %3u %3u\n"; -+ "%2u %2u %12lu %12lu %12lu %12lu %4u %4u %5u %5u %4u %4u %3u %3u %3u %3u %3u"; - - unsigned int tog = 0; /* toggle switch for cleaner code */ - unsigned int i; -@@ -263,6 +293,9 @@ static void new_format(void) - unsigned int sleep_half; - unsigned long kb_per_page = sysconf(_SC_PAGESIZE) / 1024ul; - int debt = 0; /* handle idle ticks running backwards */ -+ struct tm *tm_ptr; -+ time_t the_time; -+ char timebuf[32]; - - sleep_half = (sleep_time / 2); - new_header(); -@@ -272,6 +305,12 @@ static void new_format(void) - cpu_zzz, pgpgin, pgpgout, pswpin, pswpout, intr, ctxt, &running, - &blocked, &dummy_1, &dummy_2); - -+ if (t_option) { -+ (void) time( &the_time ); -+ tm_ptr = localtime( &the_time ); -+ strftime(timebuf, sizeof(timebuf), "%Y-%m-%d %H:%M:%S", tm_ptr); -+ } -+ - duse = *cpu_use + *cpu_nic; - dsys = *cpu_sys + *cpu_xxx + *cpu_yyy; - didl = *cpu_idl; -@@ -298,6 +337,12 @@ static void new_format(void) - (unsigned)( (100*dstl + divo2) / Div ) - ); - -+ if (t_option) { -+ printf(" %s", timebuf); -+ } -+ -+ printf("\n"); -+ - /* main loop */ - for (i = 1; infinite_updates || i < num_updates; i++) { - sleep(sleep_time); -@@ -313,6 +358,12 @@ static void new_format(void) - pgpgout + tog, pswpin + tog, pswpout + tog, intr + tog, - ctxt + tog, &running, &blocked, &dummy_1, &dummy_2); - -+ if (t_option) { -+ (void) time( &the_time ); -+ tm_ptr = localtime( &the_time ); -+ strftime(timebuf, sizeof(timebuf), "%Y-%m-%d %H:%M:%S", tm_ptr); -+ } -+ - duse = - cpu_use[tog] - cpu_use[!tog] + cpu_nic[tog] - cpu_nic[!tog]; - dsys = -@@ -364,6 +415,12 @@ static void new_format(void) - /* st */ - (unsigned)( (100*dstl+divo2)/Div ) - ); -+ -+ if (t_option) { -+ printf(" %s", timebuf); -+ } -+ -+ printf("\n"); - } - } - -@@ -453,11 +510,33 @@ static int diskpartition_format(const char *partition_name) - - static void diskheader(void) - { -+ struct tm *tm_ptr; -+ time_t the_time; -+ char timebuf[32]; -+ - /* Translation Hint: Translating folloging header & fields - * that follow (marked with max x chars) might not work, - * unless manual page is translated as well. */ -- printf(_("disk- ------------reads------------ ------------writes----------- -----IO------\n")); -- printf("%5s %6s %6s %7s %7s %6s %6s %7s %7s %6s %6s\n", -+ const char *header = -+ _("disk- ------------reads------------ ------------writes----------- -----IO------"); -+ const char *wide_header = -+ _("disk- -------------------reads------------------- -------------------writes------------------ ------IO-------"); -+ const char *timestamp_header = _(" -----timestamp-----"); -+ -+ const char format[] = -+ "%5s %6s %6s %7s %7s %6s %6s %7s %7s %6s %6s"; -+ const char wide_format[] = -+ "%5s %9s %9s %11s %11s %9s %9s %11s %11s %7s %7s"; -+ -+ printf(w_option ? wide_header : header); -+ -+ if (t_option) { -+ printf(timestamp_header); -+ } -+ -+ printf("\n"); -+ -+ printf(w_option ? wide_format : format, - " ", - /* Translation Hint: max 6 chars */ - _("total"), -@@ -479,25 +558,53 @@ static void diskheader(void) - _("cur"), - /* Translation Hint: max 6 chars */ - _("sec")); -+ -+ if (t_option) { -+ (void) time( &the_time ); -+ tm_ptr = localtime( &the_time ); -+ if (strftime(timebuf, sizeof(timebuf), "%Z", tm_ptr)) { -+ timebuf[strlen(timestamp_header) - 1] = '\0'; -+ } else { -+ timebuf[0] = '\0'; -+ } -+ printf(" %*s", (int)(strlen(timestamp_header) - 1), timebuf); -+ } -+ -+ printf("\n"); - } - - static void diskformat(void) - { -+ const char format[] = -+ "%-5s %6u %6u %7llu %7u %6u %6u %7llu %7u %6u %6u"; -+ const char wide_format[] = -+ "%-5s %9u %9u %11llu %11u %9u %9u %11llu %11u %7u %7u"; -+ - FILE *fDiskstat; - struct disk_stat *disks; - struct partition_stat *partitions; - unsigned long ndisks, i, j, k; -- const char format[] = "%-5s %6u %6u %7llu %7u %6u %6u %7llu %7u %6u %6u\n"; -+ struct tm *tm_ptr; -+ time_t the_time; -+ char timebuf[32]; -+ - - if ((fDiskstat = fopen("/proc/diskstats", "rb"))) { - fclose(fDiskstat); - ndisks = getdiskstat(&disks, &partitions); -+ -+ if (t_option) { -+ (void) time( &the_time ); -+ tm_ptr = localtime( &the_time ); -+ strftime(timebuf, sizeof(timebuf), "%Y-%m-%d %H:%M:%S", tm_ptr); -+ } -+ - if (!moreheaders) - diskheader(); - for (k = 0; k < ndisks; k++) { - if (moreheaders && ((k % height) == 0)) - diskheader(); -- printf(format, -+ printf(w_option ? wide_format : format, - disks[k].disk_name, - disks[k].reads, - disks[k].merged_reads, -@@ -510,31 +617,51 @@ static void diskformat(void) - disks[k].inprogress_IO ? disks[k].inprogress_IO / 1000 : 0, - disks[k].milli_spent_IO ? disks[k]. - milli_spent_IO / 1000 : 0); -+ -+ if (t_option) { -+ printf(" %s", timebuf); -+ } -+ -+ printf("\n"); - fflush(stdout); - } - free(disks); - free(partitions); -+ - for (j = 1; infinite_updates || j < num_updates; j++) { - sleep(sleep_time); - ndisks = getdiskstat(&disks, &partitions); -- for (i = 0; i < ndisks; i++, k++) { -- if (moreheaders && ((k % height) == 0)) -- diskheader(); -- printf(format, -- disks[i].disk_name, -- disks[i].reads, -- disks[i].merged_reads, -- disks[i].reads_sectors, -- disks[i].milli_reading, -- disks[i].writes, -- disks[i].merged_writes, -- disks[i].written_sectors, -- disks[i].milli_writing, -- disks[i].inprogress_IO ? disks[i].inprogress_IO / 1000 : 0, -- disks[i].milli_spent_IO ? disks[i]. -- milli_spent_IO / 1000 : 0); -- fflush(stdout); -- } -+ -+ if (t_option) { -+ (void) time( &the_time ); -+ tm_ptr = localtime( &the_time ); -+ strftime(timebuf, sizeof(timebuf), "%Y-%m-%d %H:%M:%S", tm_ptr); -+ } -+ -+ for (i = 0; i < ndisks; i++, k++) { -+ if (moreheaders && ((k % height) == 0)) -+ diskheader(); -+ printf(w_option ? wide_format : format, -+ disks[i].disk_name, -+ disks[i].reads, -+ disks[i].merged_reads, -+ disks[i].reads_sectors, -+ disks[i].milli_reading, -+ disks[i].writes, -+ disks[i].merged_writes, -+ disks[i].written_sectors, -+ disks[i].milli_writing, -+ disks[i].inprogress_IO ? disks[i].inprogress_IO / 1000 : 0, -+ disks[i].milli_spent_IO ? disks[i]. -+ milli_spent_IO / 1000 : 0); -+ -+ if (t_option) { -+ printf(" %s", timebuf); -+ } -+ -+ printf("\n"); -+ fflush(stdout); -+ } - free(disks); - free(partitions); - } -@@ -740,6 +867,7 @@ int main(int argc, char *argv[]) - {"partition", required_argument, NULL, 'p'}, - {"unit", required_argument, NULL, 'S'}, - {"wide", no_argument, NULL, 'w'}, -+ {"timestamp", no_argument, NULL, 't'}, - {"help", no_argument, NULL, 'h'}, - {"version", no_argument, NULL, 'V'}, - {NULL, 0, NULL, 0} -@@ -754,7 +882,7 @@ int main(int argc, char *argv[]) - atexit(close_stdout); - - while ((c = -- getopt_long(argc, argv, "afmnsdDp:S:whV", longopts, -+ getopt_long(argc, argv, "afmnsdDp:S:wthV", longopts, - NULL)) != EOF) - switch (c) { - case 'V': -@@ -820,6 +948,9 @@ int main(int argc, char *argv[]) - case 'w': - w_option = 1; - break; -+ case 't': -+ t_option = 1; -+ break; - default: - /* no other aguments defined yet. */ - usage(stderr); --- -1.8.4.2 - diff --git a/SOURCES/vmstat-wide-not-wide-enough.patch b/SOURCES/vmstat-wide-not-wide-enough.patch deleted file mode 100644 index 4156cb7..0000000 --- a/SOURCES/vmstat-wide-not-wide-enough.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/vmstat.c b/vmstat.c -index 67515c1..c01351d 100644 ---- a/vmstat.c -+++ b/vmstat.c -@@ -187,12 +187,12 @@ static void new_header(void) - const char header[] = - "procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----\n"; - const char wide_header[] = -- "procs ---------------memory-------------- ---swap-- -----io---- -system-- ------cpu-----\n"; -+ "procs -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu--------\n"; - - const char format[] = - "%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s\n"; - const char wide_format[] = -- "%2s %2s %8s %8s %8s %8s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s\n"; -+ "%2s %2s %12s %12s %12s %12s %4s %4s %5s %5s %4s %4s %3s %3s %3s %3s %3s\n"; - - printf(w_option ? _(wide_header) : _(header)); - printf( -@@ -249,7 +249,7 @@ static void new_format(void) - const char format[] = - "%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u\n"; - const char wide_format[] = -- "%2u %2u %8lu %8lu %8lu %8lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u\n"; -+ "%2u %2u %12lu %12lu %12lu %12lu %4u %4u %5u %5u %4u %4u %3u %3u %3u %3u %3u\n"; - - unsigned int tog = 0; /* toggle switch for cleaner code */ - unsigned int i; diff --git a/SOURCES/watch-fd-leak.patch b/SOURCES/watch-fd-leak.patch deleted file mode 100644 index ae59852..0000000 --- a/SOURCES/watch-fd-leak.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 835b6294d18a6ad79ff56aaeb0038bc6d006384b Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Tue, 4 Feb 2014 09:46:58 -0800 -Subject: [PATCH] watch: Don't leak extra fds to the child - -Once the write side of the pipe has been duped to stdout for the child, -the original pipefd is no longer needed, so it can be closed to avoid -leaking to the child. - -The leak can easily be seen with "watch ls -l /proc/self/fd", but I -found this due to "watch lvs" diagnosing itself: - - File descriptor 4 (pipe:[3163616]) leaked on lvs invocation. - -Signed-off-by: Josh Stone ---- - watch.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/watch.c b/watch.c -index 032dfb7..f0a3ec3 100644 ---- a/watch.c -+++ b/watch.c -@@ -387,6 +387,7 @@ static int run_command(char *restrict command, char **restrict command_argv) - if (dup2(pipefd[1], 1) < 0) { /* replace stdout with write side of pipe */ - xerr(3, _("dup2 failed")); - } -+ close(pipefd[1]); /* once duped, the write fd isn't needed */ - dup2(1, 2); /* stderr should default to stdout */ - - if (flags & WATCH_EXEC) { /* pass command to exec instead of system */ --- -1.8.4.2 - diff --git a/SPECS/procps-ng.spec b/SPECS/procps-ng.spec index 4aef377..b59e4b5 100644 --- a/SPECS/procps-ng.spec +++ b/SPECS/procps-ng.spec @@ -3,26 +3,17 @@ Summary: System and process monitoring utilities Name: procps-ng -Version: 3.3.9 -Release: 6%{?dist} +Version: 3.3.10 +Release: 3%{?dist} License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ Group: Applications/System URL: https://sourceforge.net/projects/procps-ng/ Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.xz -Patch0: vmstat-wide-not-wide-enough.patch -Patch1: ksh-skip-trailing-zeros.patch -Patch2: vmstat-timestamps.patch -Patch3: watch-fd-leak.patch -Patch4: vmstat-format-security.patch -Patch5: subtract-shmem-from-cached.patch - Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig -Requires: systemd-libs - BuildRequires: ncurses-devel BuildRequires: libtool BuildRequires: autoconf @@ -72,16 +63,18 @@ Obsoletes: procps-devel < 3.2.9-1 %description devel System and process monitoring utilities development headers +%package i18n +Summary: Internationalization pack for procps-ng +Group: Applications/System +Requires: %{name} = %{version}-%{release} + +%description i18n +Internationalization pack for procps-ng + + %prep %setup -q -n %{name}-%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 - %build # The following stuff is needed for git archives only @@ -97,9 +90,10 @@ autoreconf --verbose --force --install --mandir=%{_mandir} \ --includedir=%{_includedir} \ --sysconfdir=%{_sysconfdir} \ + --localedir=%{_datadir}/locale \ --docdir=/unwanted \ --disable-static \ - --disable-w-from \ + --enable-w-from \ --disable-kill \ --disable-rpath \ --enable-watch8bit \ @@ -107,7 +101,8 @@ autoreconf --verbose --force --install --enable-sigwinch \ --enable-libselinux \ --with-systemd \ - --disable-pidof + --disable-pidof \ + --disable-modern-top make CFLAGS="%{optflags}" @@ -121,7 +116,12 @@ make check %install make DESTDIR=%{buildroot} install -mkdir -p %{buildroot}%{_sysconfdir}/sysctl.d +# --localedir doesn't work correctly +mv %{buildroot}/share/locale %{buildroot}%{_datadir} +rmdir %{buildroot}/share + +# translated man pages +#find man-po/ -type d -maxdepth 1 -mindepth 1 | while read dirname; do cp -a $dirname %{buildroot}/usr/share/man/ ; done %post -p /sbin/ldconfig @@ -133,10 +133,12 @@ mkdir -p %{buildroot}%{_sysconfdir}/sysctl.d %{_libdir}/libprocps.so.* %{_bindir}/* %{_sbindir}/* -%{_sysconfdir}/sysctl.d %{_mandir}/man1/* %{_mandir}/man8/* %{_mandir}/man5/* +#%%{_mandir}/*/man1/* +#%%{_mandir}/*/man8/* +#%%{_mandir}/*/man5/* %exclude %{_libdir}/libprocps.la %exclude %{_sysconfdir}/sysctl.conf @@ -147,8 +149,36 @@ mkdir -p %{buildroot}%{_sysconfdir}/sysctl.d %{_libdir}/libprocps.so %{_libdir}/pkgconfig/libprocps.pc %{_includedir}/proc +%{_mandir}/man3/* + +%files i18n +%{_datadir}/locale/* %changelog +* Mon Oct 06 2014 Jaromir Capik - 3.3.10-3 +- Disabling translated man pages due to conflicts with man-pages-* +- Removing /etc/sysctl.d (quietly stolen by systemd) +- Related: rhbz#1119263 rhbz#1119260 rhbz#1060715 rhbz#1113206 +- Related: rhbz#1112734 rhbz#1078310 rhbz#1116309 rhbz#1070736 + +* Tue Sep 23 2014 Jaromir Capik - 3.3.10-2 +- Replacing RC tarball with final 3.3.10 release +- Related: rhbz#1119263 rhbz#1119260 rhbz#1060715 rhbz#1113206 +- Related: rhbz#1112734 rhbz#1078310 rhbz#1116309 rhbz#1070736 + +* Tue Sep 09 2014 Jaromir Capik - 3.3.10-1 +- Upgrading to 3.3.10 +- top.1: physical memory - has used / is using (#1119263) +- Include man pages for openproc, readproc and readproctab (#1119260) +- ps -p cycles over all PIDs instead of just one (#1060715) +- Remove explicit dependency on systemd-libs package (#1113206) +- Allow longer usernames to display in ps output (#1112734) +- w doesn't display FROM by default (#1078310) +- Return value of pgrep is incorrect (#1116309) +- Should shared memory be accounted in cached in free output? (#1070736) +- Resolves: rhbz#1119263 rhbz#1119260 rhbz#1060715 rhbz#1113206 +- Resolves: rhbz#1112734 rhbz#1078310 rhbz#1116309 rhbz#1070736 + * Thu Feb 27 2014 Jaromir Capik - 3.3.9-6 - Subtracting Shmem from Cached (#1070736) - Resolves: rhbz#1070736