commit
72c8a70690
@ -0,0 +1 @@
|
|||||||
|
SOURCES/libcpuid-0.6.5.tar.gz
|
@ -0,0 +1 @@
|
|||||||
|
a143c75d6b106d166bd687b61708b84df474e8ac SOURCES/libcpuid-0.6.5.tar.gz
|
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/libcpuid/cpuid_main.c b/libcpuid/cpuid_main.c
|
||||||
|
index 791e18d..111f43f 100644
|
||||||
|
--- a/libcpuid/cpuid_main.c
|
||||||
|
+++ b/libcpuid/cpuid_main.c
|
||||||
|
@@ -1748,7 +1748,7 @@ hypervisor_vendor_t cpuid_get_hypervisor(struct cpu_raw_data_t* raw, struct cpu_
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!data) {
|
||||||
|
- if ((r = cpu_identify(raw, data)) < 0)
|
||||||
|
+ if ((r = cpu_identify(raw, &mydata)) < 0)
|
||||||
|
return HYPERVISOR_UNKNOWN;
|
||||||
|
data = &mydata;
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
diff --git a/libcpuid/rdmsr.c b/libcpuid/rdmsr.c
|
||||||
|
index 7269652..0bb29c3 100644
|
||||||
|
--- a/libcpuid/rdmsr.c
|
||||||
|
+++ b/libcpuid/rdmsr.c
|
||||||
|
@@ -96,6 +96,7 @@ struct msr_driver_t* cpu_msr_driver_open_core(unsigned core_num)
|
||||||
|
handle = (struct msr_driver_t*) malloc(sizeof(struct msr_driver_t));
|
||||||
|
if (!handle) {
|
||||||
|
cpuid_set_error(ERR_NO_MEM);
|
||||||
|
+ close(fd);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
handle->fd = fd;
|
||||||
|
@@ -1069,8 +1070,10 @@ int msr_serialize_raw_data(struct msr_driver_t* handle, const char* filename)
|
||||||
|
|
||||||
|
/* Get cached decoded CPUID information */
|
||||||
|
id = get_cached_cpuid();
|
||||||
|
- if (id->vendor == VENDOR_UNKNOWN)
|
||||||
|
+ if (id->vendor == VENDOR_UNKNOWN) {
|
||||||
|
+ fclose(f);
|
||||||
|
return cpuid_get_error();
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/* Get CPU stock speed */
|
||||||
|
if (cpu_clock == 0)
|
||||||
|
@@ -1082,7 +1085,7 @@ int msr_serialize_raw_data(struct msr_driver_t* handle, const char* filename)
|
||||||
|
case VENDOR_HYGON:
|
||||||
|
case VENDOR_AMD: msr = amd_msr; break;
|
||||||
|
case VENDOR_INTEL: msr = intel_msr; break;
|
||||||
|
- default: return cpuid_set_error(ERR_CPU_UNKN);
|
||||||
|
+ default: fclose(f); return cpuid_set_error(ERR_CPU_UNKN);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print raw MSR values */
|
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/libcpuid/recog_intel.c b/libcpuid/recog_intel.c
|
||||||
|
index e385a7c..a091843 100644
|
||||||
|
--- a/libcpuid/recog_intel.c
|
||||||
|
+++ b/libcpuid/recog_intel.c
|
||||||
|
@@ -721,7 +721,7 @@ static int decode_intel_extended_topology(struct cpu_raw_data_t* raw, struct cpu
|
||||||
|
{
|
||||||
|
int i, level_type, num_smt = -1, num_core = -1;
|
||||||
|
|
||||||
|
- for (i = 0; (raw->intel_fn11[i][EAX] != 0x0) && (raw->intel_fn11[i][EBX] != 0x0) && (i < MAX_INTELFN11_LEVEL); i++) {
|
||||||
|
+ for (i = 0; (i < MAX_INTELFN11_LEVEL) && (raw->intel_fn11[i][EAX] != 0x0) && (raw->intel_fn11[i][EBX] != 0x0); i++) {
|
||||||
|
level_type = EXTRACTS_BITS(raw->intel_fn11[i][ECX], 15, 8);
|
||||||
|
switch (level_type) {
|
||||||
|
case 0x01:
|
@ -0,0 +1,162 @@
|
|||||||
|
Name: libcpuid
|
||||||
|
Version: 0.6.5
|
||||||
|
Release: 4%{?dist}
|
||||||
|
Summary: Provides CPU identification for x86
|
||||||
|
License: BSD-2-Clause
|
||||||
|
URL: https://github.com/anrieff/libcpuid
|
||||||
|
Source0: https://github.com/anrieff/libcpuid/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
ExcludeArch: aarch64 %arm ppc64le ppc64 s390x
|
||||||
|
|
||||||
|
# https://github.com/anrieff/libcpuid/pull/199
|
||||||
|
Patch0: %{name}-fix-handle-leaks-in-rdmsr-c.patch
|
||||||
|
Patch1: %{name}-fix-cpuid_get_hypervisor.patch
|
||||||
|
Patch2: %{name}-prevent-intel_fn11-array-overruns.patch
|
||||||
|
|
||||||
|
BuildRequires: automake
|
||||||
|
BuildRequires: autoconf
|
||||||
|
BuildRequires: doxygen
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: git
|
||||||
|
BuildRequires: libtool
|
||||||
|
BuildRequires: make
|
||||||
|
|
||||||
|
%description
|
||||||
|
Libcpuid provides CPU identification for the x86 (and x86_64).
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for %{name}
|
||||||
|
Requires: %{name}%{_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
The %{name}-devel package contains libraries and header files for
|
||||||
|
developing applications that use %{name}.
|
||||||
|
For details about the programming API, please see the docs
|
||||||
|
on the project's site (http://libcpuid.sourceforge.net/)
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n %{name}-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
autoreconf -vfi
|
||||||
|
%configure --disable-static
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
# WARNING: empty dependency_libs variable. remove the pointless .la
|
||||||
|
rm %{buildroot}%{_libdir}/*.la
|
||||||
|
|
||||||
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc Readme.md
|
||||||
|
%license COPYING
|
||||||
|
%{_libdir}/%{name}.so.*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_bindir}/cpuid_tool
|
||||||
|
%{_includedir}/%{name}
|
||||||
|
%{_libdir}/%{name}.so
|
||||||
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
|
%{_mandir}/man3/*.3.*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 0.6.5-4
|
||||||
|
- Rebuilt for MSVSphere 10
|
||||||
|
|
||||||
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.6.5-4
|
||||||
|
- Bump release for June 2024 mass rebuild
|
||||||
|
|
||||||
|
* Thu May 23 2024 Pavol Žáčik <pzacik@redhat.com> - 0.6.5-3
|
||||||
|
- Patch bugs found by static analysis tools
|
||||||
|
- Add %%{name}-fix-handle-leaks-in-rdmsr-c.patch
|
||||||
|
- Add %%{name}-fix-cpuid_get_hypervisor.patch
|
||||||
|
- Add %%{name}-prevent-intel_fn11-array-overruns.patch
|
||||||
|
|
||||||
|
* Thu May 09 2024 Pavol Žáčik <pzacik@redhat.com> - 0.6.5-2
|
||||||
|
- Specify license using an SPDX identifier
|
||||||
|
|
||||||
|
* Tue Apr 30 2024 Martin Gansser <martinkg@fedoraproject.org> - 0.6.5-1
|
||||||
|
- Update to 0.6.5
|
||||||
|
|
||||||
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.4-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.4-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Oct 09 2023 Martin Gansser <martinkg@fedoraproject.org> - 0.6.4-1
|
||||||
|
- Update to 0.6.4
|
||||||
|
|
||||||
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.3-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed May 03 2023 Martin Gansser <martinkg@fedoraproject.org> - 0.6.3-1
|
||||||
|
- Update to 0.6.3
|
||||||
|
|
||||||
|
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Nov 12 2022 Martin Gansser <martinkg@fedoraproject.org> - 0.6.2-1
|
||||||
|
- Update to 0.6.2
|
||||||
|
|
||||||
|
* Sat Oct 22 2022 Martin Gansser <martinkg@fedoraproject.org> - 0.6.0-1
|
||||||
|
- Update to 0.6.0
|
||||||
|
|
||||||
|
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Sep 02 2021 Martin Gansser <martinkg@fedoraproject.org> - 0.5.1-1
|
||||||
|
- Update to 0.5.1
|
||||||
|
|
||||||
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Dec 22 2020 Martin Gansser <martinkg@fedoraproject.org> - 0.5.0-1
|
||||||
|
- Update to 0.5.0
|
||||||
|
|
||||||
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jan 17 2020 Martin Gansser <martinkg@fedoraproject.org> - 0.4.1-1
|
||||||
|
- Update to 0.4.1
|
||||||
|
|
||||||
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-8.20171023git2f10315
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-7.20171023git2f10315
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-6.20171023git2f10315
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-5.20171023git2f10315
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Oct 23 2017 Martin Gansser <martinkg@fedoraproject.org> - 0.4.0-4.20171023git2f10315
|
||||||
|
- Update to 0.4.0-4.20171023git2f10315
|
||||||
|
- Dropped %%{name}-not-use-4m-macro.patch
|
||||||
|
- Add ExcludeArch: aarch64 %%arm ppc64le ppc64 s390x
|
||||||
|
|
||||||
|
* Mon Oct 23 2017 Martin Gansser <martinkg@fedoraproject.org> - 0.4.0-3.20170504git57298c6
|
||||||
|
- Add BR doxygen
|
||||||
|
- disable build of static lib
|
||||||
|
- don't remove %%exclude %%{_libdir}/%%{name}.so
|
||||||
|
- Add %%{name}-not-use-4m-macro.patch
|
||||||
|
|
||||||
|
* Mon Oct 23 2017 Martin Gansser <martinkg@fedoraproject.org> - 0.4.0-2.20170504git57298c6
|
||||||
|
- Add BR gcc-c++
|
||||||
|
- replace libtoolize and autoreconf --install with autoreconf -vfi
|
||||||
|
- remove %%exclude %%{_libdir}/%%{name}.so.* not needed
|
||||||
|
|
||||||
|
* Sun Oct 22 2017 Martin Gansser <martinkg@fedoraproject.org> - 0.4.0-1.20170504git57298c6
|
||||||
|
- Initial build.
|
Loading…
Reference in new issue