Update numactl to the latest upstream stable source (version 2.0.5)

This commit is contained in:
Neil Horman 2010-10-18 15:40:39 -04:00
parent 6411e9f7ce
commit 031e79c42e
6 changed files with 7 additions and 72 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
numactl-2.0.2.tar.gz
numactl-2.0.3-rc3.tar.gz
numactl-2.0.3.tar.gz
/numactl-2.0.5.tar.gz

View File

@ -1,13 +0,0 @@
diff -up numactl-2.0.2/libnuma.c.orig numactl-2.0.2/libnuma.c
--- numactl-2.0.2/libnuma.c.orig 2009-02-09 15:26:41.000000000 -0500
+++ numactl-2.0.2/libnuma.c 2009-02-09 15:26:45.000000000 -0500
@@ -306,9 +306,6 @@ set_configured_nodes(void)
d = opendir("/sys/devices/system/node");
if (!d) {
- numa_warn(W_nosysfs,
- "/sys not mounted or no numa system. Assuming one node: %s",
- strerror(errno));
maxconfigurednode = 0;
} else {
while ((de = readdir(d)) != NULL) {

View File

@ -1,12 +0,0 @@
diff -up numactl-2.0.3/libnuma.c.orig numactl-2.0.3/libnuma.c
--- numactl-2.0.3/libnuma.c.orig 2009-08-10 07:02:12.000000000 -0400
+++ numactl-2.0.3/libnuma.c 2009-08-10 07:02:39.000000000 -0400
@@ -464,7 +464,7 @@ set_thread_constraints(void)
nodes_allowed_list = malloc(strlen(buffer)-18);
strncpy(nodes_allowed_list, buffer + 19,
strlen(buffer) - 19);
- nodes_allowed_list[strlen(nodes_allowed_list)-1] = '\0';
+ nodes_allowed_list[strlen(buffer)-19] = '\0';
}
}
fclose(f);

View File

@ -1,38 +0,0 @@
diff -up numactl-2.0.3-rc3/distance.c.orig numactl-2.0.3-rc3/distance.c
--- numactl-2.0.3-rc3/distance.c.orig 2009-05-08 10:10:06.000000000 -0400
+++ numactl-2.0.3-rc3/distance.c 2009-05-08 10:13:01.000000000 -0400
@@ -50,6 +50,7 @@ static int read_distance_table(void)
int numnodes = 0;
int *table = NULL;
int err = -1;
+ int found_nodes = 0;
for (nd = 0;; nd++) {
char fn[100];
@@ -57,7 +58,7 @@ static int read_distance_table(void)
sprintf(fn, "/sys/devices/system/node/node%d/distance", nd);
dfh = fopen(fn, "r");
if (!dfh) {
- if (errno == ENOENT && nd > 0)
+ if (errno == ENOENT)
err = 0;
if (!err && nd<numa_num_configured_nodes())
continue;
@@ -79,14 +80,15 @@ static int read_distance_table(void)
}
parse_numbers(line, table + nd * numnodes, numnodes);
+ found_nodes++;
}
free(line);
- if (err) {
+ if (!found_nodes) {
numa_warn(W_distance,
"Cannot parse distance information in sysfs: %s",
strerror(errno));
free(table);
- return err;
+ return -1;
}
/* Update the global table pointer. Race window here with
other threads, but in the worst case we leak one distance

View File

@ -1,17 +1,14 @@
Name: numactl
Summary: Library for tuning for Non Uniform Memory Access machines
Version: 2.0.3
Release: 8%{dist}
Version: 2.0.5
Release: 1%{dist}
License: LGPLv2/GPLv2
Group: System Environment/Base
URL: ftp://oss.sgi.com/www/projects/libnuma/download
Source0: ftp://oss.sgi.com/www/projects/libnuma/download/numactl-%{version}.tar.gz
Buildroot: %{_tmppath}/%{name}-buildroot
Patch0: numactl-2.0.3-rc3-distance_parsing.patch
Patch1: numactl-2.0.3-rc3-no-nodes-warning.patch
Patch2: numactl-2.0.3-nodes_allowed_list_obo.patch
Patch3: numactl-2.0.3-dso-destructor.patch
ExcludeArch: s390 s390x
@ -30,10 +27,7 @@ Provides development headers for numa library calls
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
make CFLAGS="$RPM_OPT_FLAGS -I."
@ -75,6 +69,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/*.3*
%changelog
* Mon Oct 18 2010 Neil Horman <nhorman@redhat.com> - 2.0.5-1
- Update to latest stable upstream source
* Mon Feb 15 2010 Neil Horman <nhorman@redhat.com> - 2.0.3-8
- Remove static libs from numactl (bz 556088)

View File

@ -1 +1 @@
8e4fb249e5f719c25d7f433964fb9220 numactl-2.0.3.tar.gz
7cafe683095d4677326bcc5e4b3cc541 numactl-2.0.5.tar.gz