Resolves: bz865620
Signed-off-by: Petr Holasek <pholasek@redhat.com>
This commit is contained in:
parent
03ed0da483
commit
216f17b101
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ numactl-2.0.3.tar.gz
|
||||
/numactl-2.0.5.tar.gz
|
||||
/numactl-2.0.6.tar.gz
|
||||
/numactl-2.0.7.tar.gz
|
||||
/numactl-2.0.8.tar.gz
|
||||
|
@ -1,40 +0,0 @@
|
||||
diff -up numactl-2.0.6/libnuma.c.orig numactl-2.0.6/libnuma.c
|
||||
--- numactl-2.0.6/libnuma.c.orig 2010-12-29 08:23:11.000000000 -0500
|
||||
+++ numactl-2.0.6/libnuma.c 2011-01-04 16:10:58.514024338 -0500
|
||||
@@ -1263,9 +1263,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);
|
||||
@@ -1341,13 +1342,15 @@ 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));
|
||||
- numa_warn(W_nosysfs2,
|
||||
- "(cannot open or correctly parse %s)", fn);
|
||||
- numa_bitmask_setall(mask);
|
||||
- err = -1;
|
||||
+ if (f) {
|
||||
+ numa_warn(W_nosysfs2,
|
||||
+ "/sys not mounted or invalid. Assuming one node: %s",
|
||||
+ strerror(errno));
|
||||
+ numa_warn(W_nosysfs2,
|
||||
+ "(cannot open or correctly parse %s)", fn);
|
||||
+ numa_bitmask_setall(mask);
|
||||
+ err = -1;
|
||||
+ }
|
||||
}
|
||||
if (f)
|
||||
fclose(f);
|
@ -1,14 +0,0 @@
|
||||
diff -up numactl-2.0.7/Makefile.manpages numactl-2.0.7/Makefile
|
||||
--- numactl-2.0.7/Makefile.manpages 2012-01-02 13:14:07.130829736 +0100
|
||||
+++ numactl-2.0.7/Makefile 2012-01-02 13:15:38.030922245 +0100
|
||||
@@ -137,7 +137,10 @@ install: numactl migratepages migspeed n
|
||||
install -m 0755 numademo ${prefix}/bin
|
||||
install -m 0755 memhog ${prefix}/bin
|
||||
mkdir -p ${prefix}/share/man/man2 ${prefix}/share/man/man8 ${prefix}/share/man/man3
|
||||
+ install -m 0644 migspeed.8 ${prefix}/share/man/man8
|
||||
+ install -m 0644 migratepages.8 ${prefix}/share/man/man8
|
||||
install -m 0644 numactl.8 ${prefix}/share/man/man8
|
||||
+ install -m 0644 numastat.8 ${prefix}/share/man/man8
|
||||
install -m 0644 numa.3 ${prefix}/share/man/man3
|
||||
( cd ${prefix}/share/man/man3 ; for i in $$(./manlinks) ; do ln -sf numa.3 $$i.3 ; done )
|
||||
mkdir -p ${libdir}
|
@ -1,15 +0,0 @@
|
||||
diff -up numactl-2.0.7/numademo.c.orig numactl-2.0.7/numademo.c
|
||||
--- numactl-2.0.7/numademo.c.orig 2012-02-15 11:47:10.617212257 +0100
|
||||
+++ numactl-2.0.7/numademo.c 2012-02-15 11:47:38.570214219 +0100
|
||||
@@ -156,6 +156,11 @@ void memtest(char *name, unsigned char *
|
||||
int i;
|
||||
char title[128], result[128];
|
||||
|
||||
+ if (!mem) {
|
||||
+ fprintf(stderr,"Failed to allocate %lu bytes of memory. Test \"%s\" exits.\n", msize, name);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
#ifdef HAVE_STREAM_LIB
|
||||
if (thistest == STREAM) {
|
||||
do_stream(name, mem);
|
@ -1,18 +0,0 @@
|
||||
diff -up numactl-2.0.7/numademo.c.orig numactl-2.0.7/numademo.c
|
||||
--- numactl-2.0.7/numademo.c.orig 2012-02-15 12:35:33.450409388 +0100
|
||||
+++ numactl-2.0.7/numademo.c 2012-02-15 12:37:20.094416633 +0100
|
||||
@@ -522,7 +522,13 @@ int main(int ac, char **av)
|
||||
#ifdef HAVE_STREAM_LIB
|
||||
test(STREAM);
|
||||
#endif
|
||||
- test(PTRCHASE);
|
||||
+ if (msize >= sizeof(union node)) {
|
||||
+ test(PTRCHASE);
|
||||
+ } else {
|
||||
+ fprintf(stderr, "You must set msize at least %lu bytes for ptrchase test.\n",
|
||||
+ sizeof(union node));
|
||||
+ exit(1);
|
||||
+ }
|
||||
} else {
|
||||
int k;
|
||||
for (k = 2; k < ac; k++) {
|
28
numactl.spec
28
numactl.spec
@ -1,18 +1,13 @@
|
||||
Name: numactl
|
||||
Summary: Library for tuning for Non Uniform Memory Access machines
|
||||
Version: 2.0.7
|
||||
Release: 7%{dist}
|
||||
Version: 2.0.8
|
||||
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
|
||||
|
||||
Patch1: numactl-2.0.3-rc3-no-nodes-warning.patch
|
||||
Patch2: numactl-2.0.7-manpages.patch
|
||||
Patch3: numactl-2.0.7-numademo-alloc.patch
|
||||
Patch4: numactl-2.0.7-numademo-msize-check.patch
|
||||
|
||||
ExcludeArch: s390 s390x %{arm}
|
||||
|
||||
%description
|
||||
@ -35,24 +30,8 @@ Requires: %{name}-libs = %{version}-%{release}
|
||||
%description devel
|
||||
Provides development headers for numa library calls
|
||||
|
||||
%package compat
|
||||
Summary: Library for tuning for Non Uniform Memory Access machines
|
||||
Obsoletes: numactl < 2.0.7-5
|
||||
|
||||
Requires: numactl = 2.0.7-5
|
||||
Requires: numactl-libs = 2.0.7-5
|
||||
|
||||
%description compat
|
||||
This package only exists to help transition numactl users to the new
|
||||
package split. It will be removed after one distribution release cycle, please
|
||||
do not reference it or depend on it in any way.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
make CFLAGS="$RPM_OPT_FLAGS -I."
|
||||
@ -99,6 +78,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man3/*.3*
|
||||
|
||||
%changelog
|
||||
* Fri Oct 26 2012 Petr Holasek <pholasek@redhat.com> - 2.0.8-1
|
||||
- Rebased to version 2.0.8
|
||||
|
||||
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.7-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user