summaryrefslogtreecommitdiff
path: root/sys-process/procps/files
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-process/procps/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-process/procps/files')
-rw-r--r--sys-process/procps/files/procps-3.3.10-pmap-unreadable.patch60
-rw-r--r--sys-process/procps/files/procps-3.3.10-tests-no-tty.patch122
-rw-r--r--sys-process/procps/files/procps-3.3.8-kill-neg-pid.patch46
-rw-r--r--sys-process/procps/files/procps-3.3.9-sysctl-load-config-files.patch14
4 files changed, 242 insertions, 0 deletions
diff --git a/sys-process/procps/files/procps-3.3.10-pmap-unreadable.patch b/sys-process/procps/files/procps-3.3.10-pmap-unreadable.patch
new file mode 100644
index 00000000000..697674861bf
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.10-pmap-unreadable.patch
@@ -0,0 +1,60 @@
+https://bugs.gentoo.org/404389
+
+From 92071e963e6ff50f0e221dde286f3229267b2ff9 Mon Sep 17 00:00:00 2001
+From: Craig Small <csmall@enc.com.au>
+Date: Sat, 24 Jan 2015 18:53:29 +1100
+Subject: [PATCH] pmap: print process even if smaps unreadable
+
+pmap would previously print the process name if
+/proc/PID/smaps could be opened, even if subsequent
+reads failed. This actually occurs with other users
+PIDs.
+
+Kernel 3.18rc1 introduced a change where the file could
+not been opened, meaning pmap -X 1 previously showed
+the process name and nothing else but NOW shows nothing
+make check failed because of this.
+
+This change prints the process name even before trying to open
+the file, returning it to previous behaviour.
+Thanks to Vincent Bernat for some analysis.
+
+References:
+ https://bugs.debian.org/775624
+ https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=29a40ace841cba9b661711f042d1821cdc4ad47c
+
+Signed-off-by: Craig Small <csmall@enc.com.au>
+---
+ NEWS | 1 +
+ pmap.c | 8 ++++----
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/pmap.c b/pmap.c
+index c83617c..17e0e30 100644
+--- a/pmap.c
++++ b/pmap.c
+@@ -533,6 +533,10 @@ static int one_proc(proc_t * p)
+ */
+ int maxcmd = 0xfffff;
+
++ escape_command(cmdbuf, p, sizeof cmdbuf, &maxcmd,
++ ESC_ARGS | ESC_BRACKETS);
++ printf("%u: %s\n", p->tgid, cmdbuf);
++
+ if (x_option || X_option || c_option) {
+ sprintf(buf, "/proc/%u/smaps", p->tgid);
+ if ((fp = fopen(buf, "r")) == NULL)
+@@ -543,10 +547,6 @@ static int one_proc(proc_t * p)
+ return 1;
+ }
+
+- escape_command(cmdbuf, p, sizeof cmdbuf, &maxcmd,
+- ESC_ARGS | ESC_BRACKETS);
+- printf("%u: %s\n", p->tgid, cmdbuf);
+-
+ if (X_option || c_option) {
+ print_extended_maps(fp);
+ return 0;
+--
+2.4.0
+
diff --git a/sys-process/procps/files/procps-3.3.10-tests-no-tty.patch b/sys-process/procps/files/procps-3.3.10-tests-no-tty.patch
new file mode 100644
index 00000000000..7a774e5f2ef
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.10-tests-no-tty.patch
@@ -0,0 +1,122 @@
+https://bugs.gentoo.org/461302
+
+From 4050148a4533e8a79cef0d7dcd0c058d78c48a31 Mon Sep 17 00:00:00 2001
+From: Craig Small <csmall@enc.com.au>
+Date: Sat, 9 May 2015 17:48:12 +1000
+Subject: [PATCH] Fix some sched and tty tests
+
+The ps sched test has been disabled. There are too many
+odd build farms this fails in strange ways.
+
+Other odd build farms have no tty and so some tests check
+for no tty and skip if not found.
+---
+ testsuite/config/unix.exp | 9 +++++++++
+ testsuite/pgrep.test/pgrep.exp | 11 +++++++----
+ testsuite/pkill.test/pkill.exp | 3 +--
+ testsuite/ps.test/ps_output.exp | 2 --
+ testsuite/ps.test/ps_sched_batch.exp | 16 +++++++++-------
+ 5 files changed, 26 insertions(+), 15 deletions(-)
+
+diff --git a/testsuite/config/unix.exp b/testsuite/config/unix.exp
+index 522efb1..1318e9a 100644
+--- a/testsuite/config/unix.exp
++++ b/testsuite/config/unix.exp
+@@ -146,3 +146,12 @@ proc kill_testproc { } {
+ kill_process $testproc2_pid
+ file delete $testproc_path
+ }
++
++proc get_tty {} {
++ if { [catch { set raw_tty [ exec tty ] } msg]} {
++ warning "No TTY found"
++ return ""
++ }
++ regexp "/dev/(.+)" $raw_tty > tty
++ return $tty
++}
+diff --git a/testsuite/pgrep.test/pgrep.exp b/testsuite/pgrep.test/pgrep.exp
+index 152b6ec..1c6cec6 100644
+--- a/testsuite/pgrep.test/pgrep.exp
++++ b/testsuite/pgrep.test/pgrep.exp
+@@ -9,8 +9,7 @@ set not_uid [ expr { $uid + 1 } ]
+ set gid [ exec id -g ]
+ set not_gid [ expr { $gid + 1 } ]
+ set ps "${topdir}ps/pscommand"
+-set raw_tty [ exec tty ]
+-regexp "/dev/(.+)" $raw_tty > tty
++set tty [ get_tty ]
+
+ set test "pgprep with no arguments"
+ spawn $pgrep
+@@ -80,8 +79,12 @@ spawn $pgrep -s 1 $testproc_comm
+ expect_blank "$test"
+
+ set test "pgrep matches on tty"
+-spawn $pgrep -t $tty $testproc_comm
+-expect_pass "$test" "^$testproc1_pid\\s+$testproc2_pid\\s*$"
++if { $tty == "" } {
++ untested "$test"
++} else {
++ spawn $pgrep -t $tty $testproc_comm
++ expect_pass "$test" "^$testproc1_pid\\s+$testproc2_pid\\s*$"
++}
+
+ set test "pgrep doesn't match with bogus tty"
+ spawn $pgrep -t glass $testproc_comm
+diff --git a/testsuite/pkill.test/pkill.exp b/testsuite/pkill.test/pkill.exp
+index 5eece7d..c583cbe 100644
+--- a/testsuite/pkill.test/pkill.exp
++++ b/testsuite/pkill.test/pkill.exp
+@@ -9,8 +9,7 @@ set not_uid [ expr { $uid + 1 } ]
+ set gid [ exec id -g ]
+ set not_gid [ expr { $gid + 1 } ]
+ set ps "${topdir}ps/pscommand"
+-set raw_tty [ exec tty ]
+-regexp "/dev/(.+)" $raw_tty > tty
++set tty [ get_tty ]
+
+ set test "pkill with no arguments"
+ spawn $pkill
+diff --git a/testsuite/ps.test/ps_output.exp b/testsuite/ps.test/ps_output.exp
+index 3a6f3d8..1b2c097 100644
+--- a/testsuite/ps.test/ps_output.exp
++++ b/testsuite/ps.test/ps_output.exp
+@@ -9,8 +9,6 @@ set uid [ exec id -u ]
+ set not_uid [ expr { $uid + 1 } ]
+ set gid [ exec id -g ]
+ set not_gid [ expr { $gid + 1 } ]
+-set raw_tty [ exec tty ]
+-regexp "/dev/(.+)" $raw_tty > tty
+
+ # All the fields
+ # Cannot do args,cmd,comm
+diff --git a/testsuite/ps.test/ps_sched_batch.exp b/testsuite/ps.test/ps_sched_batch.exp
+index e0c31ff..c58b9a2 100644
+--- a/testsuite/ps.test/ps_sched_batch.exp
++++ b/testsuite/ps.test/ps_sched_batch.exp
+@@ -1,12 +1,14 @@
+ #
+ # check the ps SCHED_BATCH scheduler policy output
+ #
+-set ps "${topdir}ps/pscommand"
+-set schedbatch "${topdir}testsuite/test-schedbatch"
+-
+-spawn $schedbatch 18
+-
++# This is too flaky on certain build systems to be
++# reliable - CS
++#set ps "${topdir}ps/pscommand"
++#set schedbatch "${topdir}testsuite/test-schedbatch"
++#
++#spawn $schedbatch 18
++#
+ set test "ps SCHED_BATCH scheduler"
+-spawn $ps --no-header -o comm,cls,nice -a
+-expect_pass "$test" "\\s+test-schedbatch\\s+B\\s+18"
++#spawn $ps --no-header -o comm,cls,nice -a
++#expect_pass "$test" "\\s+test-schedbatch\\s+B\\s+18"
+ untested "$test"
+--
+2.4.0
+
diff --git a/sys-process/procps/files/procps-3.3.8-kill-neg-pid.patch b/sys-process/procps/files/procps-3.3.8-kill-neg-pid.patch
new file mode 100644
index 00000000000..00397480ca3
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.8-kill-neg-pid.patch
@@ -0,0 +1,46 @@
+From 396cbc4cf36166217d877e2ff7e0a290758b0bc2 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Thu, 27 Jun 2013 18:37:17 -0400
+Subject: [PATCH] kill: fix -PID handling
+
+Commit 19b6f48990b02aeca211b480625b95b2033c1017 tried to fix -PID
+handling, but the new logic ends up skipping over the arg. This is
+because getopt increments optind after it processed the -PID (even
+though it was an unknown option). We need to decrement it by one
+so the loop at the end of the code will process it for us.
+
+I also fixed some whitespace errors in that same commit.
+
+URL: http://code.google.com/p/chromium/issues/detail?id=255209
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ skill.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/skill.c b/skill.c
+index fb57305..074c5d7 100644
+--- a/skill.c
++++ b/skill.c
+@@ -390,7 +390,7 @@ static void __attribute__ ((__noreturn__))
+ else
+ sigopt++;
+
+- opterr=0; /* suppress errors on -123 */
++ opterr = 0; /* suppress errors on -123 */
+ while (loop == 1 && (i = getopt_long(argc, argv, "l::Ls:hV", longopts, NULL)) != -1)
+ switch (i) {
+ case 'l':
+@@ -423,7 +423,9 @@ static void __attribute__ ((__noreturn__))
+ xwarnx(_("invalid argument %c"), optopt);
+ kill_usage(stderr);
+ }
+- loop=0;
++ /* We need to back off by one since getopt() ate the -PID */
++ --optind;
++ loop = 0;
+ break;
+ default:
+ kill_usage(stderr);
+--
+1.8.2.1
+
diff --git a/sys-process/procps/files/procps-3.3.9-sysctl-load-config-files.patch b/sys-process/procps/files/procps-3.3.9-sysctl-load-config-files.patch
new file mode 100644
index 00000000000..c6b0a4a3625
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.9-sysctl-load-config-files.patch
@@ -0,0 +1,14 @@
+http://bugs.gentoo.org/520314
+http://gitorious.org/procps/procps/commit/7f6efed9bb85d1e212e06985ea3e06720f6ca949
+
+--- sysctl.c
++++ sysctl.c
+@@ -640,7 +640,7 @@
+ }
+
+
+- if (stat(DEFAULT_PRELOAD, &ts) < 0 && S_ISREG(ts.st_mode)) {
++ if (stat(DEFAULT_PRELOAD, &ts) == 0 && S_ISREG(ts.st_mode)) {
+ if (!Quiet)
+ printf(_("* Applying %s ...\n"), DEFAULT_PRELOAD);
+ rc |= Preload(DEFAULT_PRELOAD);