diff --git a/0001-top-add-the-major-version-to-dlopen-of-libnuma-sonam.patch b/0001-top-add-the-major-version-to-dlopen-of-libnuma-sonam.patch new file mode 100644 index 0000000..56c1fe8 --- /dev/null +++ b/0001-top-add-the-major-version-to-dlopen-of-libnuma-sonam.patch @@ -0,0 +1,42 @@ +From a6dfe2648a39d5fed8de0361aecf0e035ad80222 Mon Sep 17 00:00:00 2001 +From: Jim Warner +Date: Thu, 6 Jun 2013 00:00:00 -0500 +Subject: [PATCH] top: add the major version to dlopen of libnuma soname + +When the plug-in approach to NUMA support was added, I +carelessly employed the compile-time linker convention +for naming the library. Technically this then required +the 'devel' package for NUMA support to be present for +the unqualified soname symlink to be available. Either +that or one must have manually created such a symlink. + +This commit adds the missing major version to dlopen() +of libnuma.so.1 so simply having a more likely package +such as 'numactl' will enable both '2' & '3' commands. + +References(s): +http://www.freelists.org/post/procps/top-NUMA-node-CPU-utilization-support,25 +. initial dlopen support +commit edba932a7e9b950dd91bc486e107788e977a5186 + +Signed-off-by: Jim Warner +--- + top/top.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/top/top.c b/top/top.c +index c1853ee..1d38c0f 100644 +--- a/top/top.c ++++ b/top/top.c +@@ -3246,7 +3246,7 @@ static void before (char *me) { + #if defined(PRETEND_NUMA) || defined(PRETEND8CPUS) + Numa_node_tot = Numa_max_node() + 1; + #else +- Libnuma_handle = dlopen("libnuma.so", RTLD_LAZY); ++ Libnuma_handle = dlopen("libnuma.so.1", RTLD_LAZY); + if (Libnuma_handle) { + Numa_max_node = dlsym(Libnuma_handle, "numa_max_node"); + Numa_node_of_cpu = dlsym(Libnuma_handle, "numa_node_of_cpu"); +-- +1.8.1.2 + diff --git a/procps.changes b/procps.changes index a016eee..e7e9e9b 100644 --- a/procps.changes +++ b/procps.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 21 11:45:19 UTC 2013 - werner@suse.de + +- Add upstream patch to use pecific libnuma.so.1 shared libray for + top instead of the devel version libnuma.so + ------------------------------------------------------------------- Wed May 29 13:55:41 UTC 2013 - werner@suse.de diff --git a/procps.spec b/procps.spec index a553b48..fc01a1f 100644 --- a/procps.spec +++ b/procps.spec @@ -71,6 +71,8 @@ Patch18: procps-ng-3.3.8-petabytes.patch Patch19: procps-v3.3.4-large_pcpu.patch Patch20: procps-ng-3.3.8-tinfo.dif Patch21: procps-v3.3.3-pwdx.patch +# PATCH-FIX-UPSTREAM -- Add the major version to dlopen of libnuma +Patch22: 0001-top-add-the-major-version-to-dlopen-of-libnuma-sonam.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -136,6 +138,7 @@ the process information pseudo-file system, %patch19 %patch20 %patch21 +%patch22 -p1 %build test -s .tarball-version || echo %{version} > .tarball-version