summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2014-12-05 23:38:51 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-11 11:34:57 +0000
commit40304fc6b913051ee4a32c68d2fe5f2d04272fd2 (patch)
treea0e6a3879a5c74416166e8de070fd808ad9b77e3 /meta/recipes-extended
parent6bcd295f71928ef35bb58b716eef8b3995431688 (diff)
downloadpoky-40304fc6b913051ee4a32c68d2fe5f2d04272fd2.tar.gz
procps: Upgrade to 3.3.10
This is now the procps-ng version cleaned up patches added to fix up usrbin_execprefix in OE-Core Add CPPFLAGS to allow seperate build directory works [YOCTO #6952] (From OE-Core rev: 8a9b9a323f4363e27138077e3e3dce8139a36708) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/0001-Fix-musl-build-failure.patch29
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch54
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch26
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch44
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/install.patch39
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch15
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/procmodule.patch38
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch111
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch19
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch82
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/psmodule.patch23
-rw-r--r--meta/recipes-extended/procps/procps.inc31
-rw-r--r--meta/recipes-extended/procps/procps/fix-configure.patch19
-rw-r--r--meta/recipes-extended/procps/procps/sysctl.conf (renamed from meta/recipes-extended/procps/procps-3.2.8/sysctl.conf)0
-rw-r--r--meta/recipes-extended/procps/procps_3.2.8.bb37
-rw-r--r--meta/recipes-extended/procps/procps_3.3.10.bb62
16 files changed, 81 insertions, 548 deletions
diff --git a/meta/recipes-extended/procps/procps-3.2.8/0001-Fix-musl-build-failure.patch b/meta/recipes-extended/procps/procps-3.2.8/0001-Fix-musl-build-failure.patch
deleted file mode 100644
index 71dc3f07e4..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/0001-Fix-musl-build-failure.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 6f2fd55ef7621fd7ab7897aee2c2651b6faf9e6a Mon Sep 17 00:00:00 2001
2From: Paul Barker <paul@paulbarker.me.uk>
3Date: Wed, 20 Aug 2014 11:56:11 +0200
4Subject: [PATCH] Fix musl build failure
5
6Include <limits.h> for PATH_MAX.
7
8Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
9
10Upstream-status: Pending
11---
12 proc/readproc.c | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/proc/readproc.c b/proc/readproc.c
16index 4fad11d..c5b1869 100644
17--- a/proc/readproc.c
18+++ b/proc/readproc.c
19@@ -26,6 +26,7 @@
20 #include <sys/dir.h>
21 #include <sys/types.h>
22 #include <sys/stat.h>
23+#include <limits.h>
24
25 // sometimes it's easier to do this manually, w/o gcc helping
26 #ifdef PROF
27--
281.9.1
29
diff --git a/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch b/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch
deleted file mode 100644
index 203ccb3347..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1## 60_linux_init.dpatch by <david.sugar@canonical.com>
2##
3## All lines beginning with `## DP:' are a description of the patch.
4## DP: Fix Linux version detection which relied on elf loader side-effect.
5## DP: This patch also depends on 40_gnu-kbsd-version, which modified
6## DP: init_Linux_version().
7
8@DPATCH@
9
10Upstream-Status: inappropriate [upstream unmaintained]
11---
12 proc/sysinfo.c | 1 +
13 proc/version.c | 5 +++--
14 proc/version.h | 1 +
15 3 files changed, 5 insertions(+), 2 deletions(-)
16
17Index: procps-3.2.8/proc/sysinfo.c
18===================================================================
19--- procps-3.2.8.orig/proc/sysinfo.c
20+++ procps-3.2.8/proc/sysinfo.c
21@@ -212,6 +212,7 @@ static int check_for_privs(void){
22 static void init_libproc(void) __attribute__((constructor));
23 static void init_libproc(void){
24 have_privs = check_for_privs();
25+ init_Linux_version(); // make sure we have version before continuing...
26 // ought to count CPUs in /proc/stat instead of relying
27 // on glibc, which foolishly tries to parse /proc/cpuinfo
28 //
29Index: procps-3.2.8/proc/version.c
30===================================================================
31--- procps-3.2.8.orig/proc/version.c
32+++ procps-3.2.8/proc/version.c
33@@ -33,8 +33,7 @@ void display_version(void) {
34
35 int linux_version_code;
36
37-static void init_Linux_version(void) __attribute__((constructor));
38-static void init_Linux_version(void) {
39+void init_Linux_version(void) {
40 int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 2 */
41 FILE *fp;
42 char buf[256];
43Index: procps-3.2.8/proc/version.h
44===================================================================
45--- procps-3.2.8.orig/proc/version.h
46+++ procps-3.2.8/proc/version.h
47@@ -14,6 +14,7 @@
48
49 EXTERN_C_BEGIN
50
51+extern void init_Linux_version(void); /* initialize linux version */
52 extern void display_version(void); /* display suite version */
53 extern const char procps_version[]; /* global buf for suite version */
54
diff --git a/meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch b/meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch
deleted file mode 100644
index 1523c3dfb2..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1Do not try to detect 64bit/32bit system
2we already feed that information via compiler
3defaults
4
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6Upstream-Status: Inappropriate [OE specific]
7Index: procps-3.2.8/Makefile
8===================================================================
9--- procps-3.2.8.orig/Makefile 2014-05-03 01:00:01.707387583 -0700
10+++ procps-3.2.8/Makefile 2014-05-03 08:53:08.087175369 -0700
11@@ -118,15 +118,6 @@
12 # until you go looking for a 64-bit curses library.
13 check_gcc = $(shell if $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) dummy.c $(ALL_LDFLAGS) $(1) -o /dev/null $(CURSES) > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
14
15-# Be 64-bit if at all possible. In a cross-compiling situation, one may
16-# do "make m64=-m32 lib64=lib" to produce 32-bit executables. DO NOT
17-# attempt to use a 32-bit executable on a 64-bit kernel. Packagers MUST
18-# produce separate executables for ppc and ppc64, s390 and s390x,
19-# i386 and x86-64, mips and mips64, sparc and sparc64, and so on.
20-# Failure to do so will cause data corruption.
21-m64 := $(call check_gcc,-m64,$(call check_gcc,-mabi=64,))
22-ALL_CFLAGS += $(m64)
23-
24 ALL_CFLAGS += $(call check_gcc,-Wdeclaration-after-statement,)
25 ALL_CFLAGS += $(call check_gcc,-Wpadded,)
26 ALL_CFLAGS += $(call check_gcc,-Wstrict-aliasing,)
diff --git a/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch b/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch
deleted file mode 100644
index 2582857e25..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1Upstream-Status: Inappropriate [not author, no upstream]
2
3Imported from Debian.
4Source: http://anonscm.debian.org/gitweb/?p=collab-maint/procps.git;a=blob;f=debian/patches/gnu-kbsd-version.patch;h=fe5489fc772a3355ff8c0dcf9b953bf0c05aa9f8;hb=b460cfd726b019f8d918b380f78af4c19c5f3e50
5Bugtracker: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632749
6
7Stops procps utilities from printing a warning when used with
8kernels having only two digit versions, e.g. 3.0.
9
10Author: <csmall@debian.org>
11Description: Rework version parsing so its ok with other OSes
12--- a/proc/version.c
13+++ b/proc/version.c
14@@ -35,15 +35,23 @@
15
16 static void init_Linux_version(void) __attribute__((constructor));
17 static void init_Linux_version(void) {
18- static struct utsname uts;
19- int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */
20+ int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 2 */
21+ FILE *fp;
22+ char buf[256];
23
24- if (uname(&uts) == -1) /* failure implies impending death */
25- exit(1);
26- if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3)
27+ if ( (fp=fopen("/proc/version","r")) == NULL) /* failure implies impending death */
28+ exit(1);
29+ if (fgets(buf, 256, fp) == NULL) {
30+ fprintf(stderr, "Cannot read kernel version from /proc/version\n");
31+ fclose(fp);
32+ exit(1);
33+ }
34+ fclose(fp);
35+ if (sscanf(buf, "Linux version %d.%d.%d", &x, &y, &z) < 2)
36 fprintf(stderr, /* *very* unlikely to happen by accident */
37 "Non-standard uts for running kernel:\n"
38- "release %s=%d.%d.%d gives version code %d\n",
39- uts.release, x, y, z, LINUX_VERSION(x,y,z));
40+ "release %s=%d.%d.%d gives version code %d\n",
41+ buf,
42+ x, y, z, LINUX_VERSION(x,y,z));
43 linux_version_code = LINUX_VERSION(x, y, z);
44 }
diff --git a/meta/recipes-extended/procps/procps-3.2.8/install.patch b/meta/recipes-extended/procps/procps-3.2.8/install.patch
deleted file mode 100644
index 2a59a5ff68..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/install.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1Upstream-Status: Inappropriate [configuration]
2
3diff -ruN procps-3.2.8-orig//Makefile procps-3.2.8/Makefile
4--- procps-3.2.8-orig//Makefile 2011-08-23 22:06:46.471163999 +0800
5+++ procps-3.2.8/Makefile 2011-08-23 22:15:01.091163999 +0800
6@@ -29,9 +29,6 @@
7 ln_sf := ln -sf
8 install := install -D --owner 0 --group 0
9
10-# Lame x86-64 /lib64 and /usr/lib64 abomination:
11-lib64 := lib$(shell [ -d /lib64 ] && echo 64)
12-
13 usr/bin := $(DESTDIR)/usr/bin/
14 bin := $(DESTDIR)/bin/
15 sbin := $(DESTDIR)/sbin/
16@@ -39,8 +36,8 @@
17 man1 := $(DESTDIR)/usr/share/man/man1/
18 man5 := $(DESTDIR)/usr/share/man/man5/
19 man8 := $(DESTDIR)/usr/share/man/man8/
20-lib := $(DESTDIR)/$(lib64)/
21-usr/lib := $(DESTDIR)/usr/$(lib64)/
22+lib := $(DESTDIR)/$(base_libdir)/
23+usr/lib := $(DESTDIR)/$(libdir)/
24 usr/include := $(DESTDIR)/usr/include/
25
26 #SKIP := $(bin)kill $(man1)kill.1
27@@ -222,10 +219,10 @@
28 ###### install
29
30 $(BINFILES) : all
31- $(install) --mode a=rx $(notdir $@) $@
32+ $(install) -m 555 $(notdir $@) $@
33
34 $(MANFILES) : all
35- $(install) --mode a=r $(notdir $@) $@
36+ $(install) -m 444 $(notdir $@) $@
37
38 install: $(filter-out $(SKIP) $(addprefix $(DESTDIR),$(SKIP)),$(INSTALL))
39 cd $(usr/bin) && $(ln_f) skill snice
diff --git a/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch b/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch
deleted file mode 100644
index 2ca972482d..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1Upstream-Status: Pending
2
3diff --git a/pwdx.c b/pwdx.c
4index cb96a52..29ebce2 100644
5--- a/pwdx.c
6+++ b/pwdx.c
7@@ -13,7 +13,7 @@
8 #include <stdlib.h>
9 #include <sys/types.h>
10 #include <regex.h>
11-#include <limits.h>
12+#include <linux/limits.h>
13 #include <unistd.h>
14 #include <errno.h>
15
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch b/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch
deleted file mode 100644
index 2a65c3509f..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1Upstream-Status: Pending
2
3*** procps-3.2.5/proc/module.mk.orig Sun Jul 24 11:53:49 2005
4--- procps-3.2.5/proc/module.mk Sun Jul 24 11:54:32 2005
5***************
6*** 96,102 ****
7 #################### install rules ###########################
8
9 $(lib)$(SOFILE) : proc/$(SONAME)
10! $(install) --mode a=rx $< $@
11
12 ifneq ($(SOLINK),$(SOFILE))
13 .PHONY: $(lib)$(SOLINK)
14--- 96,102 ----
15 #################### install rules ###########################
16
17 $(lib)$(SOFILE) : proc/$(SONAME)
18! $(install) -m 555 $< $@
19
20 ifneq ($(SOLINK),$(SOFILE))
21 .PHONY: $(lib)$(SOLINK)
22***************
23*** 115,121 ****
24 $(ldconfig)
25
26 $(usr/lib)$(ANAME) : proc/$(ANAME)
27! $(install) --mode a=r $< $@
28
29 # Junk anyway... supposed to go in /usr/include/$(NAME)
30 #INSTALL += $(addprefix $(include),$(HDRFILES))
31--- 115,121 ----
32 $(ldconfig)
33
34 $(usr/lib)$(ANAME) : proc/$(ANAME)
35! $(install) -m 444 $< $@
36
37 # Junk anyway... supposed to go in /usr/include/$(NAME)
38 #INSTALL += $(addprefix $(include),$(HDRFILES))
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch
deleted file mode 100644
index 0306c8d639..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch
+++ /dev/null
@@ -1,111 +0,0 @@
1Upstream-Status: Pending
2
3fix that top will quit after cpu offline
4
5top utiliy fails to read /proc/stat after cpu offline, because Cpu_tot
6is still the original cpu numbers when calling cpus_refresh, in which
7it is trying to read and sscanf Cpu_tot times /proc/stat.
8
9The patch is from procps-3.2.8-2.fc12.src.rpm
10
11Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
12
13---
14--- procps-3.2.7/top.c.remcpu 2006-07-10 10:41:11.000000000 +0200
15+++ procps-3.2.7/top.c 2006-07-10 10:41:35.000000000 +0200
16@@ -912,6 +912,7 @@
17 static CPU_t *cpus_refresh (CPU_t *cpus)
18 {
19 static FILE *fp = NULL;
20+ static int cpu_max;
21 int i;
22 int num;
23 // enough for a /proc/stat CPU line (not the intr line)
24@@ -926,24 +927,29 @@
25 can hold tics representing the /proc/stat cpu summary (the first
26 line read) -- that slot supports our View_CPUSUM toggle */
27 cpus = alloc_c((1 + Cpu_tot) * sizeof(CPU_t));
28+ cpu_max = Cpu_tot;
29 }
30+ else if (cpu_max > Cpu_tot)
31+ /* move saved CUPs summary to cpu_max possition */
32+ memcpy(&cpus[cpu_max], &cpus[Cpu_tot], sizeof(CPU_t));
33+
34 rewind(fp);
35 fflush(fp);
36
37 // first value the last slot with the cpu summary line
38 if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
39- cpus[Cpu_tot].x = 0; // FIXME: can't tell by kernel version number
40- cpus[Cpu_tot].y = 0; // FIXME: can't tell by kernel version number
41- cpus[Cpu_tot].z = 0; // FIXME: can't tell by kernel version number
42+ cpus[cpu_max].x = 0; // FIXME: can't tell by kernel version number
43+ cpus[cpu_max].y = 0; // FIXME: can't tell by kernel version number
44+ cpus[cpu_max].z = 0; // FIXME: can't tell by kernel version number
45 num = sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu",
46- &cpus[Cpu_tot].u,
47- &cpus[Cpu_tot].n,
48- &cpus[Cpu_tot].s,
49- &cpus[Cpu_tot].i,
50- &cpus[Cpu_tot].w,
51- &cpus[Cpu_tot].x,
52- &cpus[Cpu_tot].y,
53- &cpus[Cpu_tot].z
54+ &cpus[cpu_max].u,
55+ &cpus[cpu_max].n,
56+ &cpus[cpu_max].s,
57+ &cpus[cpu_max].i,
58+ &cpus[cpu_max].w,
59+ &cpus[cpu_max].x,
60+ &cpus[cpu_max].y,
61+ &cpus[cpu_max].z
62 );
63 if (num < 4)
64 std_err("failed /proc/stat read");
65@@ -955,7 +961,7 @@
66 }
67
68 // now value each separate cpu's tics
69- for (i = 0; 1 < Cpu_tot && i < Cpu_tot; i++) {
70+ for (i = 0; ; i++) {
71 if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
72 cpus[i].x = 0; // FIXME: can't tell by kernel version number
73 cpus[i].y = 0; // FIXME: can't tell by kernel version number
74@@ -964,9 +970,35 @@
75 &cpus[i].id,
76 &cpus[i].u, &cpus[i].n, &cpus[i].s, &cpus[i].i, &cpus[i].w, &cpus[i].x, &cpus[i].y, &cpus[i].z
77 );
78- if (num < 4)
79- std_err("failed /proc/stat read");
80+ if (num < 4) {
81+ Cpu_tot = i;
82+ break;
83+ }
84+ if (i == cpu_max - 1) {
85+ // Bump cpu_max and extend cpus
86+ cpu_max++;
87+ cpus = realloc(cpus, (1 + cpu_max) * sizeof(CPU_t));
88+ if (!cpus) std_err("realloc failed");
89+ memcpy(&cpus[cpu_max], &cpus[cpu_max-1], sizeof(CPU_t));
90+ }
91+ }
92+
93+ if (cpu_max > Cpu_tot)
94+ memcpy(&cpus[Cpu_tot], &cpus[cpu_max], sizeof(CPU_t));
95+
96+ // and just in case we're 2.2.xx compiled without SMP support...
97+ if (Cpu_tot == 1) {
98+ cpus[0].id = cpus[1].id = 0;
99+ cpus[0].u = cpus[1].u;
100+ cpus[0].n = cpus[1].n;
101+ cpus[0].s = cpus[1].s;
102+ cpus[0].i = cpus[1].i;
103+ cpus[0].w = cpus[1].w;
104+ cpus[0].x = cpus[1].x;
105+ cpus[0].y = cpus[1].y;
106+ cpus[0].z = cpus[1].z;
107 }
108+
109 return cpus;
110 }
111
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch
deleted file mode 100644
index c8cee26eac..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1Upstream-Status: Backport
2
3Fix for stricter Makefile parser in Make 3.82 take from Gentoo bugzilla:
4http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-process/procps/files/procps-3.2.8%2Bgmake-3.82.patch?revision=1.1
5
6Index: procps-3.2.8/Makefile
7===================================================================
8--- procps-3.2.8.orig/Makefile
9+++ procps-3.2.8/Makefile
10@@ -174,7 +174,8 @@ INSTALL := $(BINFILES) $(MANFILES)
11 # want this rule first, use := on ALL, and ALL not filled in yet
12 all: do_all
13
14--include */module.mk
15+-include proc/module.mk
16+-include ps/module.mk
17
18 do_all: $(ALL)
19
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch
deleted file mode 100644
index 1a294142f5..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch
+++ /dev/null
@@ -1,82 +0,0 @@
1From e529ce0b53f6b73d8b760cd37b23e0397720cede Mon Sep 17 00:00:00 2001
2From: Daniel Novotny <dnovotny@fedoraproject.org>
3Date: Mon, 16 Feb 2009 12:22:20 +0000
4Subject: add cgroup support
5
6Rebased for 3.2.8: Andrei Gherzan <andrei.gherzan@windriver.com>
7
8Upstream-Status: Pending
9
10The patch was imported from the meta-ivi repository
11(git://git.yoctoproject.org/meta-ivi) as of commit id
1274b9624fe94b2b90810717a13d481b0db9d2d95a
13
14Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
15
16Index: procps-3.2.8/ps/output.c
17===================================================================
18--- procps-3.2.8.orig/ps/output.c 2012-11-15 17:44:05.501337741 +0200
19+++ procps-3.2.8/ps/output.c 2012-11-15 17:48:31.585328231 +0200
20@@ -1099,6 +1099,39 @@
21 return snprintf(outbuf, COLWID, "*");
22 }
23
24+static int pr_cgroup(char *restrict const outbuf, const proc_t *restrict const pp){
25+ char filename[48];
26+ FILE *fd;
27+ int counter = 0;
28+ int c;
29+ int is_cgroup = 0;
30+
31+ outbuf[0]='\0';
32+ snprintf(filename, sizeof filename, "/proc/%d/cgroup", pp->tgid);
33+ fd = fopen(filename, "r");
34+ if (likely(fd == NULL)) goto fail;
35+ while (( (c = fgetc(fd)) != EOF) && (counter<665)) {
36+ if (is_cgroup == 0) {
37+ if (c == ':') {
38+ is_cgroup = 1;
39+ if (counter>0)
40+ outbuf[counter++]=';';
41+ }
42+ }else
43+ if ((c == '\n') || (c == '\0'))
44+ is_cgroup = 0;
45+ else
46+ outbuf[counter++]=c;
47+ }
48+ outbuf[counter]='\0';
49+ close(fd);
50+ if (counter>0)
51+ return counter;
52+fail:
53+ outbuf[0] = '-';
54+ outbuf[1] = '\0';
55+ return 1;
56+}
57
58 /****************** FLASK & seLinux security stuff **********************/
59 // move the bulk of this to libproc sometime
60@@ -1293,6 +1326,7 @@
61 {"bsdtime", "TIME", pr_bsdtime, sr_nop, 6, 0, LNX, ET|RIGHT},
62 {"c", "C", pr_c, sr_pcpu, 2, 0, SUN, ET|RIGHT},
63 {"caught", "CAUGHT", pr_sigcatch, sr_nop, 9, 0, BSD, TO|SIGNAL}, /*sigcatch*/
64+{"cgroup", "CGROUP", pr_cgroup, sr_nop, 35, 0, LNX, PO|LEFT}, /* cgroups*/
65 {"class", "CLS", pr_class, sr_sched, 3, 0, XXX, TO|LEFT},
66 {"cls", "CLS", pr_class, sr_sched, 3, 0, HPU, TO|RIGHT}, /*says HPUX or RT*/
67 {"cmaj_flt", "-", pr_nop, sr_cmaj_flt, 1, 0, LNX, AN|RIGHT},
68Index: procps-3.2.8/ps/ps.1
69===================================================================
70--- procps-3.2.8.orig/ps/ps.1 2012-11-15 17:44:50.845336117 +0200
71+++ procps-3.2.8/ps/ps.1 2012-11-15 17:49:09.621326859 +0200
72@@ -904,6 +904,10 @@
73 displayed. (alias\ \fBsig_catch\fR,\ \fBsigcatch\fR).
74 T}
75
76+cgroup CGROUP T{
77+display control groups to which the process belonges.
78+t}
79+
80 class CLS T{
81 scheduling class of the process. (alias\ \fBpolicy\fR,\ \fBcls\fR).
82 Field's possible values are:
diff --git a/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch b/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch
deleted file mode 100644
index 0775eaba26..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1Upstream-Status: Pending
2
3*** procps-3.2.5/ps/module.mk.orig Sun Jul 24 11:54:40 2005
4--- procps-3.2.5/ps/module.mk Sun Jul 24 11:55:02 2005
5***************
6*** 33,40 ****
7
8
9 $(bin)ps: ps/ps
10! $(install) --mode a=rx $< $@
11
12 $(man1)ps.1 : ps/ps.1
13! $(install) --mode a=r $< $@
14 -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz
15--- 33,40 ----
16
17
18 $(bin)ps: ps/ps
19! $(install) -m 555 $< $@
20
21 $(man1)ps.1 : ps/ps.1
22! $(install) -m 444 $< $@
23 -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz
diff --git a/meta/recipes-extended/procps/procps.inc b/meta/recipes-extended/procps/procps.inc
deleted file mode 100644
index da91da232d..0000000000
--- a/meta/recipes-extended/procps/procps.inc
+++ /dev/null
@@ -1,31 +0,0 @@
1SUMMARY = "System and process monitoring utilities"
2DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
3the /proc filesystem. The package \ includes the programs ps, top, vmstat, w, kill, and skill."
4HOMEPAGE = "http://procps.sf.net"
5SECTION = "base"
6LICENSE = "GPLv2+ & LGPLv2+"
7LIC_FILES_CHKSUM="file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
8 file://COPYING.LIB;md5=6e29c688d912da12b66b73e32b03d812 \
9 file://ps/COPYING;md5=6e29c688d912da12b66b73e32b03d812 \
10 file://proc/COPYING;md5=6e29c688d912da12b66b73e32b03d812"
11DEPENDS = "ncurses"
12
13SRC_URI = "http://procps.sourceforge.net/procps-${PV}.tar.gz \
14 file://install.patch"
15
16inherit autotools-brokensep update-alternatives
17
18do_install_append() {
19 mv ${D}${bindir}/watch ${D}${bindir}/watch.${BPN}
20}
21
22FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
23FILES_SOLIBSDEV = ""
24
25ALTERNATIVE_${PN} = "top uptime free pkill pmap kill sysctl ps pgrep pwdx watch"
26ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
27ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl"
28ALTERNATIVE_LINK_NAME[ps] = "${base_bindir}/ps"
29ALTERNATIVE_LINK_NAME[watch] = "${base_bindir}/watch"
30ALTERNATIVE_TARGET[watch] = "${bindir}/watch.${BPN}"
31ALTERNATIVE_PRIORITY = "110"
diff --git a/meta/recipes-extended/procps/procps/fix-configure.patch b/meta/recipes-extended/procps/procps/fix-configure.patch
new file mode 100644
index 0000000000..934ae80954
--- /dev/null
+++ b/meta/recipes-extended/procps/procps/fix-configure.patch
@@ -0,0 +1,19 @@
1
2exec_prefix is /usr default in OE-Core
3
4Upstream-Status: Inappropriate [embedded specific]
5
6Signed-off-by: Saul Wold <sgw@linux.intel.com>
7Index: procps-ng-3.3.10/configure.ac
8===================================================================
9--- procps-ng-3.3.10.orig/configure.ac
10+++ procps-ng-3.3.10/configure.ac
11@@ -70,7 +70,7 @@ AC_FUNC_MMAP
12 AC_FUNC_REALLOC
13 AC_FUNC_STRTOD
14
15-usrbin_execdir='${exec_prefix}/usr/bin'
16+usrbin_execdir='${exec_prefix}/bin'
17 AC_SUBST([usrbin_execdir])
18
19 AM_GNU_GETTEXT_VERSION([0.14.1])
diff --git a/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf b/meta/recipes-extended/procps/procps/sysctl.conf
index 34e7488bf7..34e7488bf7 100644
--- a/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf
+++ b/meta/recipes-extended/procps/procps/sysctl.conf
diff --git a/meta/recipes-extended/procps/procps_3.2.8.bb b/meta/recipes-extended/procps/procps_3.2.8.bb
deleted file mode 100644
index fcfde194f1..0000000000
--- a/meta/recipes-extended/procps/procps_3.2.8.bb
+++ /dev/null
@@ -1,37 +0,0 @@
1require procps.inc
2
3PR = "r12"
4
5SRC_URI += "file://procmodule.patch \
6 file://psmodule.patch \
7 file://linux-limits.patch \
8 file://sysctl.conf \
9 file://procps-3.2.8+gmake-3.82.patch \
10 file://gnu-kbsd-version.patch \
11 file://60_linux_version_init.patch \
12 file://procps-3.2.7-top-remcpu.patch \
13 file://procps-3.2.8-ps-cgroup.patch \
14 file://detect_bitness.patch \
15 file://0001-Fix-musl-build-failure.patch \
16 "
17
18SRC_URI[md5sum] = "9532714b6846013ca9898984ba4cd7e0"
19SRC_URI[sha256sum] = "11ed68d8a4433b91cd833deb714a3aa849c02aea738c42e6b4557982419c1535"
20
21EXTRA_OEMAKE = 'CFLAGS="${CFLAGS} -I${STAGING_INCDIR}" \
22 CPPFLAGS=-I${STAGING_INCDIR} \
23 LDFLAGS="${LDFLAGS}" \
24 CURSES=-lncurses \
25 install="install -D" \
26 ldconfig=echo'
27
28do_install_append () {
29 install -d ${D}${sysconfdir}
30 install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
31 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
32 install -d ${D}${sysconfdir}/sysctl.d
33 ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf
34 fi
35}
36
37CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
diff --git a/meta/recipes-extended/procps/procps_3.3.10.bb b/meta/recipes-extended/procps/procps_3.3.10.bb
new file mode 100644
index 0000000000..d8b04dc204
--- /dev/null
+++ b/meta/recipes-extended/procps/procps_3.3.10.bb
@@ -0,0 +1,62 @@
1SUMMARY = "System and process monitoring utilities"
2DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
3the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill."
4HOMEPAGE = "https://gitorious.org/procps"
5SECTION = "base"
6LICENSE = "GPLv2+ & LGPLv2+"
7LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
8 file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \
9 "
10
11DEPENDS = "ncurses"
12
13inherit autotools gettext pkgconfig update-alternatives
14
15SRC_URI = "http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${PV}.tar.xz \
16 file://fix-configure.patch \
17 file://sysctl.conf \
18 "
19
20SRC_URI[md5sum] = "1fb7f3f6bf92ce6c5c9ed9949ae858fe"
21SRC_URI[sha256sum] = "a02e6f98974dfceab79884df902ca3df30b0e9bad6d76aee0fb5dce17f267f04"
22
23S = "${WORKDIR}/procps-ng-${PV}"
24
25EXTRA_OECONF = "--enable-skill"
26
27CPPFLAGS += "-I${S}"
28
29do_install_append () {
30 install -d ${D}${base_bindir}
31 [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done
32 install -d ${D}${base_sbindir}
33 [ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done
34 # Remove now empty dir
35 rmdir ${D}/${sbindir}
36
37 install -d ${D}${sysconfdir}
38 install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
39 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
40 install -d ${D}${sysconfdir}/sysctl.d
41 ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf
42 fi
43}
44
45CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
46
47bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime"
48base_bindir_progs += "kill pidof ps watch"
49base_sbindir_progs += "sysctl"
50
51ALTERNATIVE_PRIORITY = "100"
52
53ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}"
54
55python __anonymous() {
56 for prog in d.getVar('base_bindir_progs', True).split():
57 d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
58
59 for prog in d.getVar('base_sbindir_progs', True).split():
60 d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog))
61}
62