Accepting request 418010 from Base:System
- Avoid fillup and insserv on modern systems (bsc#992845) - Use test suite but avoid the w command due dummy utmp * This requires dejagnu for the runtest command * This requires screen to be able to provide a tty - Add patch procps-ng-3.3.12-strtod.patch to fix missed extern declaration of strtod_nol_or_err() - Update to procps-ng-3.3.12 * libprocps API 6:0:0 * build: formerly optional --enable-oomem unconditional * free: man document rewritten for shared Debian #755233 * free: interpret intervals in non-locale way Debian #692113 * kill: report error if cannot kill process Debian #733172 * library: refine calculation of 'cached' memory * library: find tty quicker Debian #770215 * library: eliminate threads display inconsistencies Redhat #1284091 * pidof: check cmd if space found in argv0 * pmap: fixed detail parsing on long mapping lines * pmap: fix occasional incorrect memory usage values Redhat #1262864 * ps: sort by cgroup Debian #692279 * ps: display control group name with -o cgname * ps: fallback to attr/current for context Debian #786956 * ps: enabled broken 'thcount' option Redhat #1174313 * tests: conditionally add prctl Debian #816237 * top: displays the 3 new linux-4.5 RES memory fields * top: man page memory fields corrected + new narrative * top: added display of CGNAME (control group name) * top: is now more responsive to cpus brought online * top: namespace cols use suppressible zero OBS-URL: https://build.opensuse.org/request/show/418010 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/procps?expand=0&rev=99
This commit is contained in:
parent
08144b0263
commit
10926e120e
@ -1,6 +1,12 @@
|
||||
---
|
||||
proc/libprocps.sym | 1 +
|
||||
proc/sysinfo.c | 13 +++++++++++--
|
||||
proc/sysinfo.h | 2 ++
|
||||
3 files changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
--- proc/libprocps.sym
|
||||
+++ proc/libprocps.sym 2014-05-16 10:01:38.000000000 +0000
|
||||
@@ -59,6 +59,7 @@ global:
|
||||
+++ proc/libprocps.sym 2016-07-11 13:11:10.857365085 +0000
|
||||
@@ -54,6 +54,7 @@ global:
|
||||
signal_name_to_number;
|
||||
signal_number_to_name;
|
||||
smp_num_cpus;
|
||||
@ -9,7 +15,7 @@
|
||||
strtosig;
|
||||
tty_to_dev;
|
||||
--- proc/sysinfo.c
|
||||
+++ proc/sysinfo.c 2015-01-27 15:17:46.241518734 +0000
|
||||
+++ proc/sysinfo.c 2016-07-11 13:11:10.857365085 +0000
|
||||
@@ -37,7 +37,8 @@
|
||||
#include <netinet/in.h> /* htons */
|
||||
#endif
|
||||
@ -20,7 +26,7 @@
|
||||
long page_bytes; /* this architecture's page size */
|
||||
|
||||
#define BAD_OPEN_MESSAGE \
|
||||
@@ -1069,7 +1070,11 @@ out:
|
||||
@@ -1076,7 +1077,11 @@ out:
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -33,7 +39,7 @@
|
||||
// ought to count CPUs in /proc/stat instead of relying
|
||||
// on glibc, which foolishly tries to parse /proc/cpuinfo
|
||||
// note: that may have been the case but now /proc/stat
|
||||
@@ -1084,4 +1089,8 @@ void cpuinfo (void) {
|
||||
@@ -1091,4 +1096,8 @@ void cpuinfo (void) {
|
||||
smp_num_cpus = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
if (smp_num_cpus<1) /* SPARC glibc is buggy */
|
||||
smp_num_cpus=1;
|
||||
@ -43,7 +49,7 @@
|
||||
+
|
||||
+void cpuinfo (void) { (void)__smp_num_cpus(); }
|
||||
--- proc/sysinfo.h
|
||||
+++ proc/sysinfo.h 2015-01-27 15:18:35.169518781 +0000
|
||||
+++ proc/sysinfo.h 2016-07-11 13:11:10.857365085 +0000
|
||||
@@ -8,6 +8,8 @@ EXTERN_C_BEGIN
|
||||
|
||||
extern unsigned long long Hertz; /* clock tick frequency */
|
||||
|
@ -10,7 +10,7 @@ and this causes a problem later on (bsc#908516)
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- free.c
|
||||
+++ free.c 2015-09-18 12:38:22.565518967 +0000
|
||||
+++ free.c 2016-07-11 13:22:25.480344200 +0000
|
||||
@@ -205,6 +205,7 @@ int main(int argc, char **argv)
|
||||
int c, flags = 0, unit_set = 0;
|
||||
char *endptr;
|
||||
@ -32,15 +32,13 @@ and this causes a problem later on (bsc#908516)
|
||||
|
||||
while ((c = getopt_long(argc, argv, "bkmghltCc:ws:V", longopts, NULL)) != -1)
|
||||
switch (c) {
|
||||
@@ -325,6 +328,7 @@ int main(int argc, char **argv)
|
||||
@@ -325,11 +328,13 @@ int main(int argc, char **argv)
|
||||
break;
|
||||
case 's':
|
||||
flags |= FREE_REPEAT;
|
||||
+ errsv = errno;
|
||||
errno = 0;
|
||||
args.repeat_interval = (1000000 * strtof(optarg, &endptr));
|
||||
if (errno || optarg == endptr || (endptr && *endptr))
|
||||
@@ -332,6 +336,7 @@ int main(int argc, char **argv)
|
||||
args.repeat_interval = (1000000 * strtod_nol_or_err(optarg, "seconds argument failed"));
|
||||
if (args.repeat_interval < 1)
|
||||
xerrx(EXIT_FAILURE,
|
||||
_("seconds argument `%s' is not positive number"), optarg);
|
||||
|
@ -4,8 +4,8 @@
|
||||
2 files changed, 19 insertions(+), 3 deletions(-)
|
||||
|
||||
--- free.c
|
||||
+++ free.c 2015-01-27 15:07:37.000000000 +0000
|
||||
@@ -389,15 +389,28 @@ int main(int argc, char **argv)
|
||||
+++ free.c 2016-07-11 13:05:52.351515040 +0000
|
||||
@@ -387,15 +387,28 @@ int main(int argc, char **argv)
|
||||
* to print the high info, even if it is zero.
|
||||
*/
|
||||
if (flags & FREE_LOHI) {
|
||||
@ -37,16 +37,16 @@
|
||||
printf("\n");
|
||||
}
|
||||
--- proc/sysinfo.c
|
||||
+++ proc/sysinfo.c 2015-09-18 12:28:40.046018780 +0000
|
||||
+++ proc/sysinfo.c 2016-07-11 13:08:00.145047300 +0000
|
||||
@@ -709,7 +709,10 @@ nextline:
|
||||
kb_main_cached = kb_page_cache + kb_slab;
|
||||
kb_main_cached = kb_page_cache + kb_slab_reclaimable;
|
||||
if ((ev=getenv("PS_FULL_CACHE")))
|
||||
kb_main_cached += kb_slab_reclaimable + kb_swap_cached + kb_nfs_unstable;
|
||||
kb_main_cached += kb_swap_cached + kb_nfs_unstable;
|
||||
- kb_swap_used = kb_swap_total - kb_swap_free;
|
||||
+ if (kb_swap_total > kb_swap_free)
|
||||
+ kb_swap_used = kb_swap_total - kb_swap_free;
|
||||
+ kb_swap_used = kb_swap_total - kb_swap_free;
|
||||
+ else
|
||||
+ kb_swap_used = 0;
|
||||
+ kb_swap_used = 0;
|
||||
|
||||
/* if kb_main_available is greater than kb_main_total or our calculation of
|
||||
mem_used overflows, that's symptomatic of running within a lxc container
|
||||
|
@ -1,6 +1,10 @@
|
||||
---
|
||||
top/top.c | 17 +++++++++++++++--
|
||||
1 file changed, 15 insertions(+), 2 deletions(-)
|
||||
|
||||
--- top/top.c
|
||||
+++ top/top.c 2015-01-27 15:25:34.329519296 +0000
|
||||
@@ -2302,8 +2302,15 @@ static void zap_fieldstab (void) {
|
||||
+++ top/top.c 2016-07-11 13:14:56.681005709 +0000
|
||||
@@ -2295,8 +2295,15 @@ static void zap_fieldstab (void) {
|
||||
Fieldstab[EU_CPU].width = 5;
|
||||
if (Rc.mode_irixps && smp_num_cpus > 1 && !Thread_mode) {
|
||||
Cpu_pmax = 100.0 * smp_num_cpus;
|
||||
@ -17,7 +21,7 @@
|
||||
} else {
|
||||
if (Cpu_pmax > 999.9) Cpu_pmax = 999.9;
|
||||
}
|
||||
@@ -2313,12 +2320,18 @@ static void zap_fieldstab (void) {
|
||||
@@ -2306,12 +2313,18 @@ static void zap_fieldstab (void) {
|
||||
Fieldstab[EU_CPU].width = 4;
|
||||
if (Rc.mode_irixps && smp_num_cpus > 1 && !Thread_mode) {
|
||||
Cpu_pmax = 100.0 * smp_num_cpus;
|
||||
|
@ -6,15 +6,14 @@
|
||||
4 files changed, 22 insertions(+), 2 deletions(-)
|
||||
|
||||
--- free.1
|
||||
+++ free.1 2015-01-27 14:38:35.000000000 +0000
|
||||
@@ -101,6 +101,13 @@ Switch to the wide mode. The wide mode p
|
||||
+++ free.1 2016-07-11 12:50:09.681730441 +0000
|
||||
@@ -100,6 +100,12 @@ Switch to the wide mode. The wide mode p
|
||||
than 80 characters. In this mode \fBbuffers\fR and \fBcache\fR
|
||||
are reported in two separate columns.
|
||||
.TP
|
||||
+\fB\-C\fR, \fB\-\-full\-cache\fR
|
||||
+Add to the plain \fBCached\fR in-memory cache for files also more cache lines as
|
||||
+the \fBNFS_Unstable\fR pages sent to the server, but not yet committed to stable storage,
|
||||
+the \fBSReclaimable\fR as part of \fISlab\fR, that might be reclaimed, such as caches,
|
||||
+the \fBNFS_Unstable\fR pages sent to the server, but not yet committed to stable storage
|
||||
+and the \fBSwapCached\fR memory that once was swapped out but is swapped back.
|
||||
+Can be also enabled by the environment variable \fBPS_FULL_CACHE\fR.
|
||||
+.TP
|
||||
@ -22,7 +21,7 @@
|
||||
Display the result
|
||||
.I count
|
||||
--- free.c
|
||||
+++ free.c 2015-09-18 12:18:41.257517943 +0000
|
||||
+++ free.c 2016-07-11 12:50:09.681730441 +0000
|
||||
@@ -90,6 +90,7 @@ static void __attribute__ ((__noreturn__
|
||||
fputs(_(" -t, --total show total for RAM + swap\n"), out);
|
||||
fputs(_(" -s N, --seconds N repeat printing every N seconds\n"), out);
|
||||
@ -48,7 +47,7 @@
|
||||
switch (c) {
|
||||
case 'b':
|
||||
check_unit_set(&unit_set);
|
||||
@@ -343,6 +345,9 @@ int main(int argc, char **argv)
|
||||
@@ -341,6 +343,9 @@ int main(int argc, char **argv)
|
||||
case 'w':
|
||||
flags |= FREE_WIDE;
|
||||
break;
|
||||
@ -59,7 +58,7 @@
|
||||
usage(stdout);
|
||||
case 'V':
|
||||
--- proc/sysinfo.c
|
||||
+++ proc/sysinfo.c 2015-09-18 12:20:41.721518774 +0000
|
||||
+++ proc/sysinfo.c 2016-07-11 12:57:46.980885685 +0000
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright (C) 1992-1998 by Michael K. Johnson, johnsonm@redhat.com
|
||||
* Copyright 1998-2003 Albert Cahalan
|
||||
@ -79,14 +78,14 @@
|
||||
@@ -705,6 +707,8 @@ nextline:
|
||||
kb_inactive = kb_inact_dirty + kb_inact_clean + kb_inact_laundry;
|
||||
}
|
||||
kb_main_cached = kb_page_cache + kb_slab;
|
||||
kb_main_cached = kb_page_cache + kb_slab_reclaimable;
|
||||
+ if ((ev=getenv("PS_FULL_CACHE")))
|
||||
+ kb_main_cached += kb_slab_reclaimable + kb_swap_cached + kb_nfs_unstable;
|
||||
+ kb_main_cached += kb_swap_cached + kb_nfs_unstable;
|
||||
kb_swap_used = kb_swap_total - kb_swap_free;
|
||||
|
||||
/* if kb_main_available is greater than kb_main_total or our calculation of
|
||||
--- vmstat.c
|
||||
+++ vmstat.c 2015-01-27 14:51:24.000000000 +0000
|
||||
+++ vmstat.c 2016-07-11 12:50:09.685730365 +0000
|
||||
@@ -103,6 +103,7 @@ static void __attribute__ ((__noreturn__
|
||||
fputs(_(" -p, --partition <dev> partition specific statistics\n"), out);
|
||||
fputs(_(" -S, --unit <char> define display unit\n"), out);
|
||||
|
@ -1,6 +1,7 @@
|
||||
---
|
||||
pmap.c | 50 +++++++++++++++++++++++++++++++++++++-------------
|
||||
1 file changed, 37 insertions(+), 13 deletions(-)
|
||||
pmap.c | 50 +++++++++++++++++++++++++++++++------------
|
||||
testsuite/pmap.test/pmap.exp | 17 ++++++--------
|
||||
2 files changed, 45 insertions(+), 22 deletions(-)
|
||||
|
||||
--- pmap.c
|
||||
+++ pmap.c 2016-05-30 11:36:45.447592219 +0000
|
||||
@ -163,3 +164,56 @@
|
||||
break;
|
||||
case 'q':
|
||||
q_option = 1;
|
||||
--- testsuite/pmap.test/pmap.exp
|
||||
+++ testsuite/pmap.test/pmap.exp 2016-07-12 15:12:26.592609617 +0000
|
||||
@@ -8,16 +8,16 @@ set pmap_procname "${mypid}:\\s+\\S+\[^\
|
||||
set pmap_initname "1:\\s+\\S+\[^\\r\]+\\s+"
|
||||
set pmap_std_header $pmap_procname
|
||||
set pmap_device_header "${pmap_procname}Address\\s+Kbytes\\s+Mode\\s+Offset\\s+Device\\s+Mapping\\s+"
|
||||
-set pmap_ext_header "${pmap_procname}Address\\s+Kbytes\\s+RSS\\s+Dirty\\s+Mode\\s+Mapping\\s+"
|
||||
+set pmap_ext_header "${pmap_procname}Address\\s+Kbytes\\s+RSS\\s+PSS\\s+Dirty\\s+Swap\\s+Mode\\s+Mapping\\s+"
|
||||
set pmap_generic_header "${pmap_procname}\\s+\(?:\[A-Z\]\[a-z\]+ +\)+"
|
||||
|
||||
-set pmap_std_items "\(\[0-9a-f\]+\\s+\\d+K \[rwx-\]{5}\\s+\\S+\[^\\r\]+\\s*\)+"
|
||||
-set pmap_device_items "\(\[0-9a-f\]+\\s+\\d+ \[rwx-\]{5}\\s+\[0-9a-f\]+\\s+\[0-9a-f\]{3}:\[0-9a-f\]{5}\\s+\\S+\[^\\r\]+\\s*\)+"
|
||||
-set pmap_ext_items "\(\[0-9a-f\]+\\s+\\d+\\s+\\d+\\s+\\d+ \[rwx-\]{5}\\s+\\S+\[^\\r\]+\\s*\)+"
|
||||
+set pmap_std_items "\(\[0-9a-f\]+\\s+\\d+K \[rwxp-\]{5}\\s+\\S+\[^\\r\]+\\s*\)+"
|
||||
+set pmap_device_items "\(\[0-9a-f\]+\\s+\\d+ \[rwxp-\]{5}\\s+\[0-9a-f\]+\\s+\[0-9a-f\]{3}:\[0-9a-f\]{5}\\s+\\S+\[^\\r\]+\\s*\)+"
|
||||
+set pmap_ext_items "\(\[0-9a-f\]+\\s+\\d+\\s+\\d+\\s+\\d+\\s+\\d+ \[rwxp-\]{5}\\s+\\S+\[^\\r\]+\\s*\)+"
|
||||
|
||||
set pmap_std_footer "total\\s+\\d+K\\s*\$"
|
||||
set pmap_device_footer "mapped:\\s+\\d+K\\s+writeable\/private:\\s+\\d+K\\s+shared:\\s+\\d+K\\s*\$"
|
||||
-set pmap_ext_footer "\[ -\]+\\s+total kB\\s+\\d+(\\s+\[\\d-\]+){2,3}\\s*\$"
|
||||
+set pmap_ext_footer "total kB\\s+\\d+(\\s+\[\\d-\]+){4,5}\\s*\$"
|
||||
|
||||
set test "pmap with no arguments"
|
||||
spawn $pmap
|
||||
@@ -26,17 +26,16 @@ expect_pass "$test" "Usage:\\s+\(lt-\)?p
|
||||
|
||||
set test "pmap standard output"
|
||||
spawn $pmap $mypid
|
||||
-expect_table $test $pmap_std_header $pmap_std_items $pmap_std_footer
|
||||
+expect_table $test $pmap_ext_header $pmap_ext_items $pmap_ext_footer
|
||||
|
||||
set test "pmap standard output with quiet"
|
||||
spawn $pmap -q $mypid
|
||||
-expect_table $test $pmap_procname $pmap_std_items "\$"
|
||||
+expect_table $test $pmap_procname $pmap_ext_items "\$"
|
||||
|
||||
set test "pmap device output"
|
||||
spawn $pmap -d $mypid
|
||||
expect_table $test $pmap_device_header $pmap_device_items $pmap_device_footer
|
||||
|
||||
-
|
||||
set test "pmap device output quiet (dq)"
|
||||
spawn $pmap -dq $mypid
|
||||
expect_table $test $pmap_procname $pmap_device_items "\$"
|
||||
@@ -47,7 +46,7 @@ expect_table $test $pmap_procname $pmap_
|
||||
|
||||
set test "pmap extended output"
|
||||
spawn $pmap -x $mypid
|
||||
-expect_table $test $pmap_ext_header $pmap_ext_items $pmap_ext_footer
|
||||
+expect_table $test $pmap_std_header $pmap_std_items $pmap_std_footer
|
||||
|
||||
# -X and -XX have no real format as its dependent on smaps
|
||||
set test "pmap extra extended output"
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e9493169a2d2adc0bc045538707310c8e877b385e4e296143b62607d2bb044ed
|
||||
size 815920
|
97
procps-ng-3.3.12-strtod.patch
Normal file
97
procps-ng-3.3.12-strtod.patch
Normal file
@ -0,0 +1,97 @@
|
||||
---
|
||||
include/strutils.h | 2 +-
|
||||
lib/strutils.c | 22 ++++++++++++----------
|
||||
lib/test_strtod_nol.c | 7 ++++---
|
||||
3 files changed, 17 insertions(+), 14 deletions(-)
|
||||
|
||||
--- include/strutils.h
|
||||
+++ include/strutils.h 2016-07-12 16:28:56.748950404 +0000
|
||||
@@ -7,6 +7,6 @@
|
||||
|
||||
extern long strtol_or_err(const char *str, const char *errmesg);
|
||||
extern double strtod_or_err(const char *str, const char *errmesg);
|
||||
-double strtod_nol_or_err(char *str, const char *errmesg);
|
||||
+extern double strtod_nol_or_err(char *str, const char *errmesg);
|
||||
|
||||
#endif
|
||||
--- lib/strutils.c
|
||||
+++ lib/strutils.c 2016-07-13 06:49:41.641951219 +0000
|
||||
@@ -20,6 +20,8 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
+#include <float.h>
|
||||
+#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
@@ -71,9 +73,9 @@ double strtod_or_err(const char *str, co
|
||||
*/
|
||||
double strtod_nol_or_err(char *str, const char *errmesg)
|
||||
{
|
||||
- double num;
|
||||
+ long double num;
|
||||
const char *cp, *radix;
|
||||
- double mult;
|
||||
+ long double mult;
|
||||
int negative = 0;
|
||||
|
||||
if (str != NULL && *str != '\0') {
|
||||
@@ -95,29 +97,29 @@ double strtod_nol_or_err(char *str, cons
|
||||
mult=0.1;
|
||||
while(isdigit(*radix)) {
|
||||
radix++;
|
||||
- mult *= 10;
|
||||
+ mult *= 10.0;
|
||||
}
|
||||
while(isdigit(*cp)) {
|
||||
- num += (*cp - '0') * mult;
|
||||
- mult /= 10;
|
||||
+ num += (long double)(*cp - '0') * mult;
|
||||
+ mult /= 10.0;
|
||||
cp++;
|
||||
}
|
||||
/* got the integers */
|
||||
if (*cp == '\0')
|
||||
- return (negative?-num:num);
|
||||
+ return (double)(negative?-num:num);
|
||||
if (*cp != '.' && *cp != ',')
|
||||
error(EXIT_FAILURE, EINVAL, "%s: '%s'", errmesg, str);
|
||||
|
||||
cp++;
|
||||
mult = 0.1;
|
||||
while(isdigit(*cp)) {
|
||||
- num += (*cp - '0') * mult;
|
||||
- mult /= 10;
|
||||
+ num += (long double)(*cp - '0') * mult;
|
||||
+ mult /= 10.0;
|
||||
cp++;
|
||||
}
|
||||
if (*cp == '\0')
|
||||
- return (negative?-num:num);
|
||||
+ return (double)(negative?-num:num);
|
||||
}
|
||||
error(EXIT_FAILURE, errno, "%s: '%s'", errmesg, str);
|
||||
- return 0;
|
||||
+ return (double)0;
|
||||
}
|
||||
--- lib/test_strtod_nol.c
|
||||
+++ lib/test_strtod_nol.c 2016-07-13 07:01:43.887513423 +0000
|
||||
@@ -1,4 +1,5 @@
|
||||
-
|
||||
+#include <float.h>
|
||||
+#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "strutils.h"
|
||||
@@ -33,8 +34,8 @@ int main(int argc, char *argv[])
|
||||
double val;
|
||||
|
||||
for(i=0; tests[i].string != NULL; i++) {
|
||||
- if(strtod_nol_or_err(tests[i].string, "Cannot parse number") !=
|
||||
- tests[i].result) {
|
||||
+ val = strtod_nol_or_err(tests[i].string, "Cannot parse number");
|
||||
+ if(fabs(tests[i].result - val) > DBL_EPSILON) {
|
||||
fprintf(stderr, "FAIL: strtod_nol_or_err(\"%s\") != %f\n",
|
||||
tests[i].string, tests[i].result);
|
||||
return EXIT_FAILURE;
|
3
procps-ng-3.3.12.tar.xz
Normal file
3
procps-ng-3.3.12.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6ed65ab86318f37904e8f9014415a098bec5bc53653e5d9ab404f95ca5e1a7d4
|
||||
size 845484
|
@ -1,5 +1,11 @@
|
||||
---
|
||||
ps/common.h | 1 +
|
||||
ps/global.c | 5 ++++-
|
||||
ps/output.c | 19 ++++++++++---------
|
||||
3 files changed, 15 insertions(+), 10 deletions(-)
|
||||
|
||||
--- ps/common.h
|
||||
+++ ps/common.h 2012-06-01 15:30:43.880009972 +0000
|
||||
+++ ps/common.h 2016-07-11 13:02:13.815735709 +0000
|
||||
@@ -302,6 +302,7 @@ extern int running_only;
|
||||
extern int screen_cols;
|
||||
extern int screen_rows;
|
||||
@ -9,8 +15,8 @@
|
||||
extern unsigned simple_select;
|
||||
extern sort_node *sort_list;
|
||||
--- ps/global.c
|
||||
+++ ps/global.c 2012-06-01 15:32:10.488010283 +0000
|
||||
@@ -79,6 +79,7 @@ int prefer_bsd_defaults = -1
|
||||
+++ ps/global.c 2016-07-11 13:02:13.815735709 +0000
|
||||
@@ -78,6 +78,7 @@ int prefer_bsd_defaults = -1
|
||||
int screen_cols = -1;
|
||||
int screen_rows = -1;
|
||||
time_t seconds_since_boot = -1;
|
||||
@ -18,7 +24,7 @@
|
||||
selection_node *selection_list = (selection_node *)0xdeadbeef;
|
||||
unsigned simple_select = 0xffffffff;
|
||||
sort_node *sort_list = (sort_node *)0xdeadbeef; /* ready-to-use sort list */
|
||||
@@ -369,6 +370,7 @@ static const char *set_personality(void)
|
||||
@@ -361,6 +362,7 @@ static const char *set_personality(void)
|
||||
/************ Call this to reinitialize everything ***************/
|
||||
void reset_global(void){
|
||||
static proc_t p;
|
||||
@ -26,7 +32,7 @@
|
||||
reset_selection_list();
|
||||
look_up_our_self(&p);
|
||||
set_screen_size();
|
||||
@@ -392,7 +394,8 @@ void reset_global(void){
|
||||
@@ -383,7 +385,8 @@ void reset_global(void){
|
||||
negate_selection = 0;
|
||||
page_size = getpagesize();
|
||||
running_only = 0;
|
||||
@ -37,8 +43,8 @@
|
||||
simple_select = 0;
|
||||
sort_list = NULL;
|
||||
--- ps/output.c
|
||||
+++ ps/output.c 2013-05-29 11:17:11.345438367 +0000
|
||||
@@ -128,6 +128,7 @@ static int sr_ ## NAME (const proc_t* P,
|
||||
+++ ps/output.c 2016-07-11 13:02:13.815735709 +0000
|
||||
@@ -132,6 +132,7 @@ static int sr_ ## NAME (const proc_t* P,
|
||||
#define cook_time(P) (P->utime + P->stime) / Hertz
|
||||
|
||||
#define cook_etime(P) (((unsigned long long)seconds_since_boot >= (P->start_time / Hertz)) ? ((unsigned long long)seconds_since_boot - (P->start_time / Hertz)) : 0)
|
||||
@ -46,7 +52,7 @@
|
||||
|
||||
#define CMP_COOKED_TIME(NAME) \
|
||||
static int sr_ ## NAME (const proc_t* P, const proc_t* Q) { \
|
||||
@@ -477,11 +478,11 @@ static int pr_etimes(char *restrict cons
|
||||
@@ -505,11 +506,11 @@ static int pr_etimes(char *restrict cons
|
||||
static int pr_c(char *restrict const outbuf, const proc_t *restrict const pp){
|
||||
unsigned long long total_time; /* jiffies used by this process */
|
||||
unsigned pcpu = 0; /* scaled %cpu, 99 means 99% */
|
||||
@ -61,7 +67,7 @@
|
||||
if (pcpu > 99U) pcpu = 99U;
|
||||
return snprintf(outbuf, COLWID, "%2u", pcpu);
|
||||
}
|
||||
@@ -489,11 +490,11 @@ static int pr_c(char *restrict const out
|
||||
@@ -517,11 +518,11 @@ static int pr_c(char *restrict const out
|
||||
static int pr_pcpu(char *restrict const outbuf, const proc_t *restrict const pp){
|
||||
unsigned long long total_time; /* jiffies used by this process */
|
||||
unsigned pcpu = 0; /* scaled %cpu, 999 means 99.9% */
|
||||
@ -76,7 +82,7 @@
|
||||
if (pcpu > 999U)
|
||||
return snprintf(outbuf, COLWID, "%u", pcpu/10U);
|
||||
return snprintf(outbuf, COLWID, "%u.%u", pcpu/10U, pcpu%10U);
|
||||
@@ -502,11 +503,11 @@ static int pr_pcpu(char *restrict const
|
||||
@@ -530,11 +531,11 @@ static int pr_pcpu(char *restrict const
|
||||
static int pr_cp(char *restrict const outbuf, const proc_t *restrict const pp){
|
||||
unsigned long long total_time; /* jiffies used by this process */
|
||||
unsigned pcpu = 0; /* scaled %cpu, 999 means 99.9% */
|
||||
|
@ -6,9 +6,13 @@ for batch mode. If you run top in nohup just to collect data over time and
|
||||
disconnect top finishes which is not what one would expect.
|
||||
Index: procps-3.2.8/top.c
|
||||
|
||||
---
|
||||
top/top.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
--- top/top.c
|
||||
+++ top/top.c 2013-05-29 13:44:08.245439364 +0200
|
||||
@@ -3268,7 +3268,13 @@ static void before (char *me) {
|
||||
+++ top/top.c 2016-07-11 13:12:07.436272792 +0000
|
||||
@@ -3328,7 +3328,13 @@ static void before (char *me) {
|
||||
sa.sa_flags = 0;
|
||||
for (i = SIGRTMAX; i; i--) {
|
||||
switch (i) {
|
||||
|
@ -1,6 +1,10 @@
|
||||
---
|
||||
top/top.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- top/top.c
|
||||
+++ top/top.c 2013-05-29 11:57:32.849439427 +0000
|
||||
@@ -1496,9 +1496,9 @@ static inline const char *make_str (cons
|
||||
+++ top/top.c 2016-07-11 13:13:56.178173598 +0000
|
||||
@@ -1536,9 +1536,9 @@ static inline const char *make_str (cons
|
||||
static const char *scale_mem (int target, unsigned long num, int width, int justr) {
|
||||
#ifndef NOBOOST_MEMS
|
||||
// SK_Kb SK_Mb SK_Gb SK_Tb SK_Pb SK_Eb
|
||||
@ -12,7 +16,7 @@
|
||||
#endif
|
||||
static char buf[SMLBUFSIZ];
|
||||
float scaled_num;
|
||||
@@ -1510,7 +1510,7 @@ static const char *scale_mem (int target
|
||||
@@ -1550,7 +1550,7 @@ static const char *scale_mem (int target
|
||||
goto end_justifies;
|
||||
|
||||
scaled_num = num;
|
||||
|
@ -1,6 +1,10 @@
|
||||
---
|
||||
proc/readproc.c | 49 +++++++++++++++++++++++++------------------------
|
||||
1 file changed, 25 insertions(+), 24 deletions(-)
|
||||
|
||||
--- proc/readproc.c
|
||||
+++ proc/readproc.c 2013-05-29 10:55:48.129939330 +0000
|
||||
@@ -544,7 +544,7 @@ static int file2str(const char *director
|
||||
+++ proc/readproc.c 2016-07-11 12:49:24.778601134 +0000
|
||||
@@ -643,7 +643,7 @@ static int file2str(const char *director
|
||||
if (ub->buf) ub->buf[0] = '\0';
|
||||
else ub->buf = xcalloc((ub->siz = buffGRW));
|
||||
sprintf(path, "%s/%s", directory, what);
|
||||
@ -9,7 +13,7 @@
|
||||
while (0 < (num = read(fd, ub->buf + tot_read, ub->siz - tot_read))) {
|
||||
tot_read += num;
|
||||
if (tot_read < ub->siz) break;
|
||||
@@ -559,41 +559,42 @@ static int file2str(const char *director
|
||||
@@ -658,41 +658,42 @@ static int file2str(const char *director
|
||||
|
||||
static char** file2strvec(const char* directory, const char* what) {
|
||||
char buf[2048]; /* read buf bytes at a time */
|
||||
@ -74,7 +78,7 @@
|
||||
endbuf = rbuf + tot; /* count space for pointers */
|
||||
align = (sizeof(char*)-1) - ((tot + sizeof(char*)-1) & (sizeof(char*)-1));
|
||||
for (c = 0, p = rbuf; p < endbuf; p++) {
|
||||
@@ -626,7 +627,7 @@ static int read_unvectored(char *restric
|
||||
@@ -725,7 +726,7 @@ static int read_unvectored(char *restric
|
||||
unsigned n = 0;
|
||||
|
||||
snprintf(path, sizeof(path), "%s/%s", whom, what);
|
||||
|
@ -4,18 +4,18 @@
|
||||
2 files changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
--- Makefile.am
|
||||
+++ Makefile.am 2015-09-18 12:33:07.753518470 +0000
|
||||
@@ -103,7 +103,7 @@ top_top_SOURCES = \
|
||||
top/top_nls.h \
|
||||
top/top_nls.c \
|
||||
lib/fileutils.c
|
||||
+++ Makefile.am 2016-07-11 13:16:34.327120958 +0000
|
||||
@@ -112,7 +112,7 @@ if CYGWIN
|
||||
top_top_SOURCES += lib/strverscmp.c
|
||||
endif
|
||||
|
||||
-top_top_LDADD = $(LDADD) @NCURSES_LIBS@ $(DL_LIB)
|
||||
+top_top_LDADD = $(LDADD) @TOP_NCURSES_LIBS@ $(DL_LIB)
|
||||
endif
|
||||
|
||||
if BUILD_SKILL
|
||||
--- configure.ac
|
||||
+++ configure.ac 2013-05-29 13:25:28.000000000 +0000
|
||||
+++ configure.ac 2016-07-11 13:15:42.864114271 +0000
|
||||
@@ -141,9 +141,17 @@ else
|
||||
else
|
||||
WATCH_NCURSES_LIBS="$NCURSES_LIBS"
|
||||
|
@ -1,6 +1,10 @@
|
||||
---
|
||||
vmstat.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- vmstat.c
|
||||
+++ vmstat.c 2013-08-02 12:57:52.677680360 +0000
|
||||
@@ -224,8 +224,8 @@ static void new_header(void)
|
||||
+++ vmstat.c 2016-07-11 13:18:04.993371059 +0000
|
||||
@@ -270,8 +270,8 @@ static void new_header(void)
|
||||
|
||||
static unsigned long unitConvert(unsigned long size)
|
||||
{
|
||||
|
@ -3,8 +3,8 @@
|
||||
1 file changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
--- w.c
|
||||
+++ w.c 2015-06-02 06:35:25.221520280 +0000
|
||||
@@ -365,7 +365,7 @@ static const proc_t *getproc(const utmp_
|
||||
+++ w.c 2016-07-11 12:47:59.444256012 +0000
|
||||
@@ -375,7 +375,7 @@ static const proc_t *getproc(const utmp_
|
||||
}
|
||||
|
||||
static void showinfo(utmp_t * u, int formtype, int maxcmd, int from,
|
||||
@ -13,7 +13,7 @@
|
||||
{
|
||||
unsigned long long jcpu;
|
||||
int ut_pid_found;
|
||||
@@ -395,7 +395,13 @@ static void showinfo(utmp_t * u, int for
|
||||
@@ -405,7 +405,13 @@ static void showinfo(utmp_t * u, int for
|
||||
strncpy(uname, u->ut_user, UT_NAMESIZE);
|
||||
|
||||
if (formtype) {
|
||||
@ -28,7 +28,7 @@
|
||||
if (from)
|
||||
print_from(u, ip_addresses, fromlen);
|
||||
print_logintime(u->ut_time, stdout);
|
||||
@@ -445,6 +451,7 @@ static void __attribute__ ((__noreturn__
|
||||
@@ -455,6 +461,7 @@ static void __attribute__ ((__noreturn__
|
||||
fputs(_(" -h, --no-header do not print header\n"),out);
|
||||
fputs(_(" -u, --no-current ignore current process username\n"),out);
|
||||
fputs(_(" -s, --short short format\n"),out);
|
||||
@ -36,7 +36,7 @@
|
||||
fputs(_(" -f, --from show remote hostname field\n"),out);
|
||||
fputs(_(" -o, --old-style old style output\n"),out);
|
||||
fputs(_(" -i, --ip-addr display IP address instead of hostname (if possible)\n"), out);
|
||||
@@ -481,6 +488,7 @@ int main(int argc, char **argv)
|
||||
@@ -491,6 +498,7 @@ int main(int argc, char **argv)
|
||||
{"no-header", no_argument, NULL, 'h'},
|
||||
{"no-current", no_argument, NULL, 'u'},
|
||||
{"short", no_argument, NULL, 's'},
|
||||
@ -44,7 +44,7 @@
|
||||
{"from", no_argument, NULL, 'f'},
|
||||
{"old-style", no_argument, NULL, 'o'},
|
||||
{"ip-addr", no_argument, NULL, 'i'},
|
||||
@@ -502,7 +510,7 @@ int main(int argc, char **argv)
|
||||
@@ -512,7 +520,7 @@ int main(int argc, char **argv)
|
||||
#endif
|
||||
|
||||
while ((ch =
|
||||
@ -53,7 +53,7 @@
|
||||
switch (ch) {
|
||||
case 'h':
|
||||
header = 0;
|
||||
@@ -513,6 +521,10 @@ int main(int argc, char **argv)
|
||||
@@ -523,6 +531,10 @@ int main(int argc, char **argv)
|
||||
case 's':
|
||||
longform = 0;
|
||||
break;
|
||||
|
@ -1,6 +1,10 @@
|
||||
---
|
||||
proc/libprocps.sym | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- proc/libprocps.sym
|
||||
+++ proc/libprocps.sym 2014-05-15 13:16:40.950235845 +0000
|
||||
@@ -14,6 +14,7 @@ global:
|
||||
+++ proc/libprocps.sym 2016-07-11 12:45:32.463107052 +0000
|
||||
@@ -13,6 +13,7 @@ global:
|
||||
get_ns_id;
|
||||
get_ns_name;
|
||||
get_pid_digits;
|
||||
|
@ -1,6 +1,10 @@
|
||||
---
|
||||
ps/global.c | 13 ++++++++++---
|
||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
--- ps/global.c
|
||||
+++ ps/global.c 2012-06-01 16:04:18.460510318 +0000
|
||||
@@ -148,8 +148,11 @@ static void set_screen_size(void){
|
||||
+++ ps/global.c 2016-07-11 13:04:59.600533764 +0000
|
||||
@@ -147,8 +147,11 @@ static void set_screen_size(void){
|
||||
screen_cols = ws.ws_col; // hmmm, NetBSD subtracts 1
|
||||
screen_rows = ws.ws_row;
|
||||
|
||||
@ -14,7 +18,7 @@
|
||||
|
||||
columns = getenv("COLUMNS");
|
||||
if(columns && *columns){
|
||||
@@ -298,6 +301,7 @@ static const char *set_personality(void)
|
||||
@@ -290,6 +293,7 @@ static const char *set_personality(void)
|
||||
return NULL;
|
||||
|
||||
case_aix:
|
||||
@ -22,7 +26,7 @@
|
||||
bsd_j_format = "FB_j";
|
||||
bsd_l_format = "FB_l";
|
||||
/* bsd_s_format not used */
|
||||
@@ -325,6 +329,7 @@ static const char *set_personality(void)
|
||||
@@ -317,6 +321,7 @@ static const char *set_personality(void)
|
||||
|
||||
case_sunos4:
|
||||
personality = PER_NO_DEFAULT_g;
|
||||
@ -30,22 +34,22 @@
|
||||
prefer_bsd_defaults = 1;
|
||||
bsd_j_format = "FB_j";
|
||||
bsd_l_format = "FB_l";
|
||||
@@ -349,12 +354,14 @@ static const char *set_personality(void)
|
||||
@@ -342,12 +347,14 @@ static const char *set_personality(void)
|
||||
case_hp:
|
||||
case_hpux:
|
||||
personality = PER_BROKEN_o | PER_HPUX_x;
|
||||
personality = PER_HPUX_x;
|
||||
+ personality |= PER_UNIX_COLS;
|
||||
return NULL;
|
||||
|
||||
case_svr4:
|
||||
case_sysv:
|
||||
case_sco:
|
||||
personality = PER_BROKEN_o | PER_SVR4_x;
|
||||
personality = PER_SVR4_x;
|
||||
+ personality |= PER_UNIX_COLS;
|
||||
return NULL;
|
||||
|
||||
case_posix:
|
||||
@@ -373,8 +380,8 @@ void reset_global(void){
|
||||
@@ -365,8 +372,8 @@ void reset_global(void){
|
||||
double uptime_secs;
|
||||
reset_selection_list();
|
||||
look_up_our_self(&p);
|
||||
|
@ -1,6 +1,10 @@
|
||||
---
|
||||
pwdx.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- pwdx.c
|
||||
+++ pwdx.c 2012-06-06 11:59:43.166745435 +0000
|
||||
@@ -107,6 +107,7 @@ int main(int argc, char *argv[])
|
||||
+++ pwdx.c 2016-07-11 13:17:16.154313659 +0000
|
||||
@@ -109,6 +109,7 @@ int main(int argc, char *argv[])
|
||||
buflen = 10 + strlen(argv[i]) + 1;
|
||||
buf = xmalloc(buflen);
|
||||
|
||||
|
@ -1,6 +1,11 @@
|
||||
---
|
||||
sysctl.8 | 2 ++
|
||||
sysctl.c | 12 ++++++++++++
|
||||
2 files changed, 14 insertions(+)
|
||||
|
||||
--- sysctl.8
|
||||
+++ sysctl.8 2012-06-04 10:27:39.048010081 +0000
|
||||
@@ -79,6 +79,8 @@ Print value without new line.
|
||||
+++ sysctl.8 2016-07-11 13:12:48.427481461 +0000
|
||||
@@ -80,6 +80,8 @@ Print value without new line.
|
||||
\fB\-\-system\fR
|
||||
Load settings from all system configuration files.
|
||||
.br
|
||||
@ -10,7 +15,7 @@
|
||||
.br
|
||||
/etc/sysctl.d/*.conf
|
||||
--- sysctl.c
|
||||
+++ sysctl.c 2012-06-04 10:29:12.944010410 +0000
|
||||
+++ sysctl.c 2016-07-11 13:12:48.427481461 +0000
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
@ -19,7 +24,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "c.h"
|
||||
@@ -569,6 +570,7 @@ static int sortpairs(const void *A, cons
|
||||
@@ -584,6 +585,7 @@ static int sortpairs(const void *A, cons
|
||||
static int PreloadSystem(void)
|
||||
{
|
||||
unsigned di, i;
|
||||
@ -27,7 +32,7 @@
|
||||
const char *dirs[] = {
|
||||
"/run/sysctl.d",
|
||||
"/etc/sysctl.d",
|
||||
@@ -631,6 +633,16 @@ static int PreloadSystem(void)
|
||||
@@ -648,6 +650,16 @@ static int PreloadSystem(void)
|
||||
}
|
||||
qsort(cfgs, ncfgs, sizeof(struct cfg *), sortpairs);
|
||||
|
||||
|
@ -1,3 +1,50 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 9 16:08:03 UTC 2016 - werner@suse.de
|
||||
|
||||
- Avoid fillup and insserv on modern systems (bsc#992845)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 12 16:01:19 UTC 2016 - werner@suse.de
|
||||
|
||||
- Use test suite but avoid the w command due dummy utmp
|
||||
* This requires dejagnu for the runtest command
|
||||
* This requires screen to be able to provide a tty
|
||||
- Add patch procps-ng-3.3.12-strtod.patch to fix missed extern
|
||||
declaration of strtod_nol_or_err()
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 11 13:28:02 UTC 2016 - werner@suse.de
|
||||
|
||||
- Update to procps-ng-3.3.12
|
||||
* libprocps API 6:0:0
|
||||
* build: formerly optional --enable-oomem unconditional
|
||||
* free: man document rewritten for shared Debian #755233
|
||||
* free: interpret intervals in non-locale way Debian #692113
|
||||
* kill: report error if cannot kill process Debian #733172
|
||||
* library: refine calculation of 'cached' memory
|
||||
* library: find tty quicker Debian #770215
|
||||
* library: eliminate threads display inconsistencies Redhat #1284091
|
||||
* pidof: check cmd if space found in argv0
|
||||
* pmap: fixed detail parsing on long mapping lines
|
||||
* pmap: fix occasional incorrect memory usage values Redhat #1262864
|
||||
* ps: sort by cgroup Debian #692279
|
||||
* ps: display control group name with -o cgname
|
||||
* ps: fallback to attr/current for context Debian #786956
|
||||
* ps: enabled broken 'thcount' option Redhat #1174313
|
||||
* tests: conditionally add prctl Debian #816237
|
||||
* top: displays the 3 new linux-4.5 RES memory fields
|
||||
* top: man page memory fields corrected + new narrative
|
||||
* top: added display of CGNAME (control group name)
|
||||
* top: is now more responsive to cpus brought online
|
||||
* top: namespace cols use suppressible zero
|
||||
* top: zero suppress ('0') includes out-of-memory & nice
|
||||
* top: better 'i' toggle management when scrolled
|
||||
* top: the '=' key now includes active locate requests
|
||||
* vmstat: devices exceeding 15 chars now displayed Redhat #586078
|
||||
* watch: hostname added to header
|
||||
* watch: better handling ANSI including esc[m Debian #830313
|
||||
* watch: use locale-independent float Debian #692113
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 30 11:44:59 UTC 2016 - werner@suse.de
|
||||
|
||||
|
109
procps.spec
109
procps.spec
@ -18,13 +18,14 @@
|
||||
|
||||
%bcond_with bin2usr
|
||||
%bcond_with pidof
|
||||
%define somajor 5
|
||||
%define somajor 6
|
||||
%define libname libprocps%{somajor}
|
||||
|
||||
Name: procps
|
||||
#Also: http://gitorious.org/procps/
|
||||
Url: http://sf.net/projects/procps-ng/
|
||||
BuildRequires: automake
|
||||
BuildRequires: dejagnu
|
||||
%ifarch ia64 x86_64 ppc64 ppc %sparc
|
||||
BuildRequires: libnuma-devel
|
||||
%endif
|
||||
@ -35,22 +36,26 @@ BuildRequires: pkg-config
|
||||
%if 0%{?suse_version} > 1310
|
||||
BuildRequires: pkgconfig(libsystemd-login)
|
||||
%else
|
||||
%if 0%{?suse_version} > 1230
|
||||
%if 0%{?suse_version} >= 1230
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
%endif
|
||||
%endif
|
||||
BuildRequires: screen
|
||||
BuildRequires: xz
|
||||
Version: 3.3.11
|
||||
Version: 3.3.12
|
||||
Release: 0
|
||||
Provides: ps = %version-%release
|
||||
Obsoletes: ps < %version-%release
|
||||
%if 0%{?suse_version} < 1230
|
||||
Requires(post): %fillup_prereq
|
||||
Requires(post): %insserv_prereq
|
||||
Requires(postun): %insserv_prereq
|
||||
%endif
|
||||
Summary: The ps utilities for /proc
|
||||
License: GPL-2.0+ and LGPL-2.1+
|
||||
Group: System/Monitoring
|
||||
Source: http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-3.3.11.tar.xz
|
||||
#Alternate: https://gitlab.com/procps-ng/procps/repository/archive.tar.bz2?ref=v3.3.12
|
||||
Source: http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-3.3.12.tar.xz
|
||||
Source2: boot.sysctl
|
||||
Source3: systat.xinetd
|
||||
Patch0: procps-ng-3.3.9-watch.patch
|
||||
@ -73,6 +78,8 @@ Patch20: procps-ng-3.3.8-tinfo.dif
|
||||
Patch21: procps-v3.3.3-pwdx.patch
|
||||
# PATCH-FIX-OPENSUSE -- trifle rest of the old terabyte patch
|
||||
Patch28: procps-ng-3.3.8-vmstat-terabyte.dif
|
||||
# PATCH-FIX-SUSE -- Avoid error due missed declaration
|
||||
Patch30: procps-ng-3.3.12-strtod.patch
|
||||
# PATCH-FIX-SUSE -- Ignore scan_unevictable_pages in sysctl
|
||||
Patch31: procps-ng-3.3.8-ignore-scan_unevictable_pages.patch
|
||||
# PATCH-FIX-SUSE -- Avoid errno set by setlocale()
|
||||
@ -125,12 +132,12 @@ the process information pseudo-file system,
|
||||
%patch1
|
||||
%patch3 -b .trcate
|
||||
%patch5
|
||||
%patch7
|
||||
%patch7 -b .rof
|
||||
%patch8 -b .cache
|
||||
%patch10
|
||||
%patch10 -b .acc
|
||||
%patch11
|
||||
%patch12
|
||||
%patch13
|
||||
%patch13 -b .column
|
||||
%patch14
|
||||
%patch15
|
||||
%patch16
|
||||
@ -140,11 +147,15 @@ the process information pseudo-file system,
|
||||
%patch20
|
||||
%patch21
|
||||
%patch28
|
||||
%patch30
|
||||
%patch31 -p1
|
||||
%patch32
|
||||
%patch33
|
||||
|
||||
%build
|
||||
#
|
||||
#
|
||||
#
|
||||
test -s .tarball-version || echo %{version} > .tarball-version
|
||||
#./autogen.sh
|
||||
autoreconf
|
||||
@ -181,6 +192,7 @@ export LFS_CFLAGS="$(getconf LFS_CFLAGS)"
|
||||
--disable-modern-top
|
||||
make %{?_smp_mflags}
|
||||
|
||||
LD_LIBRARY_PATH=$PWD/proc/.libs \
|
||||
./pmap $$ || {
|
||||
uname -a
|
||||
echo /proc/$$/maps
|
||||
@ -210,6 +222,23 @@ rm -f %{buildroot}%{_libdir}/*.la
|
||||
rm -rf %{buildroot}%{_datadir}/doc/procps-ng
|
||||
|
||||
%if %{with bin2usr}
|
||||
#
|
||||
# Identical binaries
|
||||
#
|
||||
if cmp -s %{buildroot}/%{_bindir}/pgrep %{buildroot}/%{_bindir}/pkill
|
||||
then
|
||||
rm -vf %{buildroot}/%{_bindir}/pkill
|
||||
pushd %{buildroot}/%{_bindir}
|
||||
ln pgrep pkill
|
||||
popd
|
||||
fi
|
||||
if cmp -s %{buildroot}/%{_bindir}/snice %{buildroot}/%{_bindir}/skill
|
||||
then
|
||||
rm -vf %{buildroot}/%{_bindir}/skill
|
||||
pushd %{buildroot}/%{_bindir}
|
||||
ln snice skill
|
||||
popd
|
||||
fi
|
||||
ln -s %{_bindir}/ps %{buildroot}/bin/
|
||||
ln -s %{_bindir}/pgrep %{buildroot}/bin/
|
||||
ln -s %{_bindir}/pkill %{buildroot}/bin/
|
||||
@ -219,26 +248,84 @@ mv %{buildroot}%{_bindir}/ps %{buildroot}/bin/
|
||||
mv %{buildroot}%{_bindir}/pgrep %{buildroot}/bin/
|
||||
mv %{buildroot}%{_bindir}/pkill %{buildroot}/bin/
|
||||
mv %{buildroot}%{_sbindir}/sysctl %{buildroot}/sbin/
|
||||
#
|
||||
# Identical binaries
|
||||
#
|
||||
if cmp -s %{buildroot}/bin/pgrep %{buildroot}/bin/pkill
|
||||
then
|
||||
rm -vf %{buildroot}/bin/pkill
|
||||
pushd %{buildroot}/bin
|
||||
ln pgrep pkill
|
||||
popd
|
||||
fi
|
||||
if cmp -s %{buildroot}/%{_bindir}/snice %{buildroot}/%{_bindir}/skill
|
||||
then
|
||||
rm -vf %{buildroot}/%{_bindir}/skill
|
||||
pushd %{buildroot}/%{_bindir}
|
||||
ln snice skill
|
||||
popd
|
||||
fi
|
||||
ln -s /bin/ps %{buildroot}%{_bindir}/ps
|
||||
ln -s /bin/pgrep %{buildroot}%{_bindir}/pgrep
|
||||
ln -s /bin/pkill %{buildroot}%{_bindir}/pkill
|
||||
ln -s /sbin/sysctl %{buildroot}%{_sbindir}/sysctl
|
||||
%endif
|
||||
|
||||
%post
|
||||
%if 0%{?suse_version} < 1230
|
||||
%post
|
||||
%{fillup_and_insserv -ny boot.sysctl boot.sysctl}
|
||||
%endif
|
||||
#
|
||||
|
||||
%postun
|
||||
%insserv_cleanup
|
||||
%endif
|
||||
|
||||
%post -n %{libname} -p /sbin/ldconfig
|
||||
|
||||
%postun -n %{libname} -p /sbin/ldconfig
|
||||
|
||||
%check
|
||||
make check
|
||||
#
|
||||
# Skip w test as there is no valid utmp
|
||||
#
|
||||
rm -rvf testsuite/w.test
|
||||
#
|
||||
# Provide a tty for testing
|
||||
#
|
||||
LANG=POSIX
|
||||
LC_ALL=$LANG
|
||||
unset LC_CTYPE
|
||||
SCREENDIR=$(mktemp -d ${PWD}/screen.XXXXXX) || exit 1
|
||||
SCREENRC=${SCREENDIR}/bash
|
||||
export SCREENRC SCREENDIR
|
||||
exec 0< /dev/null
|
||||
SCREENLOG=${SCREENDIR}/log
|
||||
cat > $SCREENRC<<-EOF
|
||||
deflogin off
|
||||
logfile $SCREENLOG
|
||||
logfile flush 1
|
||||
logtstamp off
|
||||
log on
|
||||
setsid on
|
||||
scrollback 0
|
||||
silence on
|
||||
utf8 on
|
||||
EOF
|
||||
TMPDIR=$(mktemp -d /tmp/bash.XXXXXXXXXX) || exit 1
|
||||
> $SCREENLOG
|
||||
tail -q -s 0.5 -f $SCREENLOG & pid=$!
|
||||
env HOME=$PWD TERM=$TERM TMPDIR=$TMPDIR SCREENRC=$SCREENRC SCREENDIR=$SCREENDIR \
|
||||
screen -L -D -m make check
|
||||
kill -TERM $pid
|
||||
error=no
|
||||
for log in test-suite.log testsuite/*.log
|
||||
do
|
||||
if grep -E '^(XFAIL|FAIL|ERROR):' $log
|
||||
then
|
||||
cat $log
|
||||
error=yes
|
||||
fi
|
||||
done
|
||||
test $error = no || exit 1
|
||||
|
||||
%files
|
||||
%defattr (-,root,root,755)
|
||||
|
Loading…
Reference in New Issue
Block a user