diff --git a/numactl-2.0.3-rc3-no-nodes-warning.patch b/numactl-2.0.3-rc3-no-nodes-warning.patch new file mode 100644 index 0000000..93970ab --- /dev/null +++ b/numactl-2.0.3-rc3-no-nodes-warning.patch @@ -0,0 +1,31 @@ +diff -up numactl-2.0.3-rc3/libnuma.c.orig numactl-2.0.3-rc3/libnuma.c +--- numactl-2.0.3-rc3/libnuma.c.orig 2009-06-17 13:13:28.000000000 -0400 ++++ numactl-2.0.3-rc3/libnuma.c 2009-06-17 13:14:10.000000000 -0400 +@@ -1209,9 +1209,10 @@ numa_node_to_cpus_v1(int node, unsigned + sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node); + f = fopen(fn, "r"); + if (!f || getdelim(&line, &len, '\n', f) < 1) { +- numa_warn(W_nosysfs2, +- "/sys not mounted or invalid. Assuming one node: %s", +- strerror(errno)); ++ if (f) ++ numa_warn(W_nosysfs2, ++ "/sys not mounted or invalid. Assuming one node: %s", ++ strerror(errno)); + bitmask.maskp = (unsigned long *)mask; + bitmask.size = buflen_needed * 8; + numa_bitmask_setall(&bitmask); +@@ -1287,9 +1288,10 @@ numa_node_to_cpus_v2(int node, struct bi + sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node); + f = fopen(fn, "r"); + if (!f || getdelim(&line, &len, '\n', f) < 1) { +- numa_warn(W_nosysfs2, +- "/sys not mounted or invalid. Assuming one node: %s", +- strerror(errno)); ++ if (f) ++ numa_warn(W_nosysfs2, ++ "/sys not mounted or invalid. Assuming one node: %s", ++ strerror(errno)); + numa_bitmask_setall(mask); + err = -1; + } diff --git a/numactl.spec b/numactl.spec index 0ee82b2..64c2638 100644 --- a/numactl.spec +++ b/numactl.spec @@ -1,7 +1,7 @@ Name: numactl Summary: Library for tuning for Non Uniform Memory Access machines Version: 2.0.3 -Release: 1%{dist} +Release: 2%{dist} License: LGPLv2/GPLv2 Group: System Environment/Base URL: ftp://oss.sgi.com/www/projects/libnuma/download @@ -9,6 +9,7 @@ Source0: ftp://oss.sgi.com/www/projects/libnuma/download/numactl-%{version}-rc3. Buildroot: %{_tmppath}/%{name}-buildroot Patch0: numactl-2.0.3-rc3-distance_parsing.patch +Patch1: numactl-2.0.3-rc3-no-nodes-warning.patch ExcludeArch: s390 s390x @@ -28,6 +29,7 @@ Provides development headers for numa library calls %prep %setup -q -n %{name}-%{version}-rc3 %patch0 -p1 +%patch1 -p1 %build make CFLAGS="$RPM_OPT_FLAGS -I." @@ -69,6 +71,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/*.3* %changelog +* Wed Jun 17 2009 Neil Horman +- Fix silly libnuma warnings again (bz 499633) + * Fri May 08 2009 Neil Horman - Update to 2.0.3-rc3 (bz 499633)