Compare commits

..

3 Commits
rawhide ... f12

Author SHA1 Message Date
Fedora Release Engineering 29a5d52f87 dist-git conversion 2010-07-29 04:38:10 +00:00
Bill Nottingham fc81703910 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:25:29 +00:00
Jesse Keating 3a6023662a Initialize branch F-12 for numactl 2009-09-29 05:41:44 +00:00
9 changed files with 184 additions and 191 deletions

6
.gitignore vendored
View File

@ -1,3 +1,3 @@
/numactl-[2-9]*
/.build-[2-9]*.log
/x86_64/
numactl-2.0.2.tar.gz
numactl-2.0.3-rc3.tar.gz
numactl-2.0.3.tar.gz

View File

@ -0,0 +1,12 @@
diff -up numactl-2.0.2/clearcache.c.orig numactl-2.0.2/clearcache.c
--- numactl-2.0.2/clearcache.c.orig 2008-09-29 16:08:38.000000000 -0400
+++ numactl-2.0.2/clearcache.c 2008-09-29 16:08:49.000000000 -0400
@@ -57,7 +57,7 @@ void clearcache(unsigned char *mem, unsi
#if defined(__i386__) || defined(__x86_64__)
unsigned i, cl, eax, feat;
/* get clflush unit and feature */
- asm("cpuid" : "=a" (eax), "=b" (cl), "=d" (feat) : "0" (1) : "cx");
+ asm("cpuid" : "=a" (eax), "=r" (cl), "=d" (feat) : "0" (1) : "cx");
if (!(feat & (1 << 19)))
fallback_clearcache();
cl = ((cl >> 8) & 0xff) * 8;

View File

@ -0,0 +1,13 @@
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

@ -0,0 +1,35 @@
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 09:59:24.000000000 -0400
+++ numactl-2.0.3/libnuma.c 2009-08-10 10:00:40.000000000 -0400
@@ -95,6 +95,19 @@ numa_init(void)
memset(&numa_no_nodes, 0, sizeof(numa_no_nodes));
}
+void
+numa_fini(void)
+{
+ if (numa_all_cpus_ptr)
+ numa_bitmask_free(numa_all_cpus_ptr);
+ if (numa_all_nodes_ptr)
+ numa_bitmask_free(numa_all_nodes_ptr);
+ if (numa_no_nodes_ptr)
+ numa_bitmask_free(numa_no_nodes_ptr);
+ if (nodes_allowed_list)
+ free(nodes_allowed_list);
+}
+
/*
* The following bitmask declarations, bitmask_*() routines, and associated
* _setbit() and _getbit() routines are:
diff -up numactl-2.0.3/Makefile.orig numactl-2.0.3/Makefile
--- numactl-2.0.3/Makefile.orig 2009-06-10 08:30:03.000000000 -0400
+++ numactl-2.0.3/Makefile 2009-08-10 10:00:00.000000000 -0400
@@ -81,7 +81,7 @@ stream_main.o: stream_main.c
libnuma.so.1: versions.ldscript
libnuma.so.1: libnuma.o syscall.o distance.o
- ${CC} ${LDFLAGS} -shared -Wl,-soname=libnuma.so.1 -Wl,--version-script,versions.ldscript -Wl,-init,numa_init -o libnuma.so.1 $(filter-out versions.ldscript,$^)
+ ${CC} ${LDFLAGS} -shared -Wl,-soname=libnuma.so.1 -Wl,--version-script,versions.ldscript -Wl,-init,numa_init -Wl,-fini,numa_fini -o libnuma.so.1 $(filter-out versions.ldscript,$^)
libnuma.so: libnuma.so.1
ln -sf libnuma.so.1 libnuma.so

View File

@ -0,0 +1,12 @@
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

@ -0,0 +1,38 @@
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

@ -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;
}

View File

@ -1,55 +1,62 @@
Name: numactl
Summary: Library for tuning for Non Uniform Memory Access machines
Version: 2.0.16
Release: 2%{dist}
# libnuma is LGPLv2 and GPLv2
# numactl binaries are GPLv2 only
License: GPLv2
URL: https://github.com/numactl/numactl
Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz
Version: 2.0.3
Release: 7%{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
BuildRequires: make
BuildRequires: libtool automake autoconf
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 %{arm}
ExcludeArch: s390 s390x
%description
Simple NUMA policy support. It consists of a numactl program to run
other programs with a specific NUMA policy.
%package libs
Summary: libnuma libraries
# There is a tiny bit of GPLv2 code in libnuma.c
License: LGPLv2 and GPLv2
%description libs
numactl-libs provides libnuma, a library to do allocations with
NUMA policy in applications.
other programs with a specific NUMA policy and a libnuma to do
allocations with NUMA policy in applications.
%package devel
Summary: Development package for building Applications that use numa
Requires: %{name}-libs = %{version}-%{release}
License: LGPLv2 and GPLv2
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
Provides development headers for numa library calls
%prep
%autosetup
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%configure --prefix=/usr --libdir=%{_libdir}
%make_build
make CFLAGS="$RPM_OPT_FLAGS -I."
%install
rm -rf $RPM_BUILD_ROOT
%make_install
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_libdir}
mkdir -p $RPM_BUILD_ROOT%{_includedir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
%ldconfig_scriptlets
%ldconfig_scriptlets libs
make prefix=$RPM_BUILD_ROOT/usr libdir=$RPM_BUILD_ROOT/%{_libdir} install
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc README.md
%defattr(-,root,root,-)
%{_libdir}/libnuma.so.1
%{_bindir}/numactl
%{_bindir}/numademo
%{_bindir}/numastat
@ -57,172 +64,17 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/migspeed
%{_bindir}/migratepages
%{_mandir}/man8/*.8*
%exclude %{_mandir}/man2/*.2*
%files libs
%{_libdir}/libnuma.so.1.0.0
%{_libdir}/libnuma.so.1
%files devel
%defattr(-,root,root,-)
%{_libdir}/libnuma.so
%exclude %{_libdir}/libnuma.a
%{_libdir}/pkgconfig/numa.pc
%{_libdir}/libnuma.a
%{_includedir}/numa.h
%{_includedir}/numaif.h
%{_includedir}/numacompat1.h
%{_mandir}/man3/*.3*
%changelog
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Oct 08 2022 Filipe Brandenburger <filbranden@gmail.com> - 2.0.16-1
- Upgrade to 2.0.16
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.14-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.14-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.14-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Nov 11 2020 Florian Weimer <fweimer@redhat.com> - 2.0.14-2
- Trigger rebuild to avoid DT_INIT/DT_FINI with zero values
* Thu Sep 17 2020 Filipe Brandenburger <filbranden@gmail.com> - 2.0.14-1
- Upgrade to 2.0.14
- Re-enabled LTO, now that upstream has been fixed to support it.
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.12-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 01 2020 Jeff Law <law@redhat.com> - 2.0.12-5
- Disable LTO
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.12-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Jul 25 2018 Filipe Brandenburger <filbranden@gmail.com> - 2.0.12-1
- Rebased to version 2.0.12
* Wed Jul 25 2018 Filipe Brandenburger <filbranden@gmail.com>
- Fix check-rpaths warning about including /usr/lib64 in RPATH of the binaries.
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.11-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sat Mar 24 2018 Richard W.M. Jones <rjones@redhat.com> - 2.0.11-9%{dist}
- Fix major/minor macros on glibc 2.27.
- Update config.{guess,sub} with versions which understand riscv64.
- Remove obsolete Buildroot tag.
* Sat Feb 24 2018 Florian Weimer <fweimer@redhat.com> - 2.0.11-8%{dist}
- Use LDFLAGS from redhat-rpm-config
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.0.11-7
- Escape macros in %%changelog
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.11-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.11-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.11-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Mon Feb 06 2017 Petr Holasek <holasekp@gmail.com> - 2.0.11-3
- s390x arch enabled (bz1419064)
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Dec 14 2015 Petr Holasek <pholasek@redhat.com> - 2.0.11-1
- Rebased to version 2.0.11 (bz1290941)
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Oct 13 2014 Petr Holasek <pholasek@redhat.com> 2.0.10-2
- Fixing package conflict with man-pages (bz1151552)
* Wed Oct 08 2014 Petr Holasek <pholasek@redhat.com> 2.0.10-1
- Rebased to version 2.0.10 (bz1150511)
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Thu Jul 31 2014 Petr Holasek <pholasek@redhat.com> 2.0.9-3
- fixed segfault on non-NUMA systems (bz1080421)
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed Oct 09 2013 Petr Holasek <pholasek@redhat.com> 2.0.9-1
- rebased to version 2.0.9
* Fri Aug 02 2013 Karsten Hopp <karsten@redhat.com> 2.0.8-4
- rebuild in F20 to fix some dependency issues on PPC
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Tue Jan 22 2013 Petr Holasek <pholasek@redhat.com> - 2.0.8-3
- deleted empty numastat file
* Thu Nov 1 2012 Tom Callaway <spot@fedoraproject.org> - 2.0.8-2
- fix license issues
* 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
* Sat May 19 2012 Petr Holasek <pholasek@redhat.com> - 2.0.7-6
- numademo segfault fix (bz823125, bz823127)
* Sun Apr 15 2012 Petr Holasek <pholasek@redhat.com> - 2.0.7-5
- Library splitted out of numactl package to numactl-libs
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Jan 02 2012 Anton Arapov <anton@redhat.com> - 2.0.7-3
- Include missing manpages
* Sat Jun 18 2011 Peter Robinson <pbrobinson@gmail.com> - 2.0.7-2
- Exclude ARM platforms
* Fri Apr 15 2011 Anton Arapov <anton@redhat.com> - 2.0.7-1
- Update to latest upstream stable version (bz 696703)
* Tue Mar 22 2011 Anton Arapov <anton@redhat.com> - 2.0.6-2
- Better manpages (bz 673613)
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Tue Jan 04 2011 Neil Horman <nhorman@redhat.com> - 2.0.6-1
- Update to latest upstream stable version (bz 666379)
* 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)
* Mon Aug 10 2009 Neil Horman <nhorman@redhat.com> - 2.0.3-7
- Add destructor to libnuma.so to free allocated memory (bz 516227)
@ -279,7 +131,7 @@ rm -rf $RPM_BUILD_ROOT
* Fri Jan 12 2007 Neil Horman <nhorman@redhat.com> - 0.9.8-2
- Properly fixed bz 221982
- Updated revision string to include %%{dist}
- Updated revision string to include %{dist}
* Thu Jan 11 2007 Neil Horman <nhorman@redhat.com> - 0.9.8-1.38
- Fixed -devel to depend on base package so libnuma.so resolves

View File

@ -1 +1 @@
SHA512 (numactl-2.0.16.tar.gz) = 6e17724567c363a08994fe7f5569b6ec62bd1ae608244945fddcb2d6a212b08140340f0d862595ba4016fcba95193e851cb286798f685d314b4c72687af6d879
8e4fb249e5f719c25d7f433964fb9220 numactl-2.0.3.tar.gz