summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/procps
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>2013-01-07 14:01:45 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-07 13:50:39 +0000
commit9f79f44d32bc796d0515d33af4e07e76e4c28837 (patch)
treee5fe809d7c5c3e811d2f029b19108aeb4ce3065b /meta/recipes-extended/procps
parent41a15a9af9c8fe8f4ca9a54808f209ec2379ac2c (diff)
downloadpoky-9f79f44d32bc796d0515d33af4e07e76e4c28837.tar.gz
procps: initialized environment correctly (backported from classic)
Without this patch, various procps tool can create "Unknown HZ value" messages because internal initialization happens in a wrong, random order. It has been applied to classic already. (From OE-Core rev: a746cf196792d1c0646f5e97e87055e0974d753e) Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/procps')
-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.bb3
2 files changed, 56 insertions, 1 deletions
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
new file mode 100644
index 0000000000..203ccb3347
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch
@@ -0,0 +1,54 @@
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.bb b/meta/recipes-extended/procps/procps_3.2.8.bb
index 3f20beaf30..7533859518 100644
--- a/meta/recipes-extended/procps/procps_3.2.8.bb
+++ b/meta/recipes-extended/procps/procps_3.2.8.bb
@@ -1,6 +1,6 @@
1require procps.inc 1require procps.inc
2 2
3PR = "r10" 3PR = "r11"
4 4
5SRC_URI += "file://procmodule.patch \ 5SRC_URI += "file://procmodule.patch \
6 file://psmodule.patch \ 6 file://psmodule.patch \
@@ -8,6 +8,7 @@ SRC_URI += "file://procmodule.patch \
8 file://sysctl.conf \ 8 file://sysctl.conf \
9 file://procps-3.2.8+gmake-3.82.patch \ 9 file://procps-3.2.8+gmake-3.82.patch \
10 file://gnu-kbsd-version.patch \ 10 file://gnu-kbsd-version.patch \
11 file://60_linux_version_init.patch \
11 " 12 "
12 13
13SRC_URI[md5sum] = "9532714b6846013ca9898984ba4cd7e0" 14SRC_URI[md5sum] = "9532714b6846013ca9898984ba4cd7e0"