From 07b4a363cf5f3c0110b217b0ae27a01476b81e4c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jul 14 2020 01:26:46 +0000 Subject: import intel-cmt-cat-2.0.0-3.el8 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..71d37df --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/v2.0.0.tar.gz diff --git a/.intel-cmt-cat.metadata b/.intel-cmt-cat.metadata new file mode 100644 index 0000000..c320ba0 --- /dev/null +++ b/.intel-cmt-cat.metadata @@ -0,0 +1 @@ +ace5783bf51f746ad3e2b79a31a5cb99c5689ab6 SOURCES/v2.0.0.tar.gz diff --git a/SOURCES/0001-make-Adding-LDFLAGS-to-the-libpqos-build-command.patch b/SOURCES/0001-make-Adding-LDFLAGS-to-the-libpqos-build-command.patch new file mode 100644 index 0000000..a9f019c --- /dev/null +++ b/SOURCES/0001-make-Adding-LDFLAGS-to-the-libpqos-build-command.patch @@ -0,0 +1,28 @@ +From 072dc9ab42bff067bd9dc0f256c3abd7b1cc7341 Mon Sep 17 00:00:00 2001 +From: Jiri Olsa +Date: Thu, 4 Oct 2018 14:27:47 +0200 +Subject: [PATCH 1/2] make: Adding LDFLAGS to the libpqos build command + +So it's taken into account. + +Signed-off-by: Jiri Olsa +--- + lib/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/Makefile b/lib/Makefile +index fe07dfb81da6..a2dba5939931 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -104,7 +104,7 @@ all: $(LIBNAME) + + $(LIBNAME): $(OBJS) + ifeq ($(SHARED),y) +- $(CC) -shared -Wl,-soname,$(LIB).so.$(SO_VERSION) -o $(LIBNAME) $^ -lc ++ $(CC) $(LDFLAGS) -shared -Wl,-soname,$(LIB).so.$(SO_VERSION) -o $(LIBNAME) $^ -lc + ln -f -s $(LIBNAME) $(LIB).so.$(SO_VERSION) + ln -f -s $(LIB).so.$(SO_VERSION) $(LIB).so + else +-- +2.17.1 + diff --git a/SOURCES/0002-make-Add-support-to-add-flags-to-LDFLAGS-via-EXTRA_L.patch b/SOURCES/0002-make-Add-support-to-add-flags-to-LDFLAGS-via-EXTRA_L.patch new file mode 100644 index 0000000..f3be9a7 --- /dev/null +++ b/SOURCES/0002-make-Add-support-to-add-flags-to-LDFLAGS-via-EXTRA_L.patch @@ -0,0 +1,62 @@ +From 0f1020bc83b3d047a6226326d79798e1c7f4e0ee Mon Sep 17 00:00:00 2001 +From: Jiri Olsa +Date: Thu, 4 Oct 2018 14:25:16 +0200 +Subject: [PATCH 2/2] make: Add support to add flags to LDFLAGS via + EXTRA_LDFLAGS + +We need to pass extra flags to LDFLAGS, so adding +the EXTRA_LDFLAGS to allow that. It mirrors the +EXTRA_CFLAGS variable usage. + +Signed-off-by: Jiri Olsa +--- + lib/Makefile | 3 +++ + pqos/Makefile | 3 +++ + rdtset/Makefile | 3 +++ + 3 files changed, 9 insertions(+) + +diff --git a/lib/Makefile b/lib/Makefile +index a2dba5939931..8dfa308cc45e 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -48,6 +48,9 @@ CFLAGS = -pthread -I./ -D_GNU_SOURCE \ + ifneq ($(EXTRA_CFLAGS),) + CFLAGS += $(EXTRA_CFLAGS) + endif ++ifneq ($(EXTRA_LDFLAGS),) ++LDFLAGS += $(EXTRA_LDFLAGS) ++endif + + DOXY_DIRS = doc_api doc_lib + +diff --git a/pqos/Makefile b/pqos/Makefile +index dc5cc1a1744e..0f1a26f5a0f7 100644 +--- a/pqos/Makefile ++++ b/pqos/Makefile +@@ -47,6 +47,9 @@ CFLAGS = -I$(LIBDIR) \ + ifneq ($(EXTRA_CFLAGS),) + CFLAGS += $(EXTRA_CFLAGS) + endif ++ifneq ($(EXTRA_LDFLAGS),) ++LDFLAGS += $(EXTRA_LDFLAGS) ++endif + + # ICC and GCC options + ifeq ($(CC),icc) +diff --git a/rdtset/Makefile b/rdtset/Makefile +index d1f283093c4f..2e9939af8b20 100644 +--- a/rdtset/Makefile ++++ b/rdtset/Makefile +@@ -48,6 +48,9 @@ CFLAGS = -I$(LIBDIR) \ + ifneq ($(EXTRA_CFLAGS),) + CFLAGS += $(EXTRA_CFLAGS) + endif ++ifneq ($(EXTRA_LDFLAGS),) ++LDFLAGS += $(EXTRA_LDFLAGS) ++endif + + # ICC and GCC options + ifeq ($(CC),icc) +-- +2.17.1 + diff --git a/SPECS/intel-cmt-cat.spec b/SPECS/intel-cmt-cat.spec new file mode 100644 index 0000000..daef847 --- /dev/null +++ b/SPECS/intel-cmt-cat.spec @@ -0,0 +1,228 @@ +# Copyright (c) 2016-2018, Intel Corporation +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Intel Corporation nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +%global githubname intel-cmt-cat +%global githubver 2.0.0 + +%if %{defined githubsubver} +%global githubfull %{githubname}-%{githubver}.%{githubsubver} +%else +%global githubfull %{githubname}-%{githubver} +%endif + +# disable producing debuginfo for this package +%global debug_package %{nil} + + +Summary: Provides command line interface to CMT, MBM, CAT, CDP and MBA technologies +Name: %{githubname} +Release: 3%{?dist} +Version: %{githubver} +License: BSD +Group: Development/Tools +ExclusiveArch: x86_64 i686 i586 +%if %{defined githubsubver} +Source: https://github.com/01org/%{githubname}/archive/v%{githubver}.%{githubsubver}.tar.gz +%else +Source: https://github.com/01org/%{githubname}/archive/v%{githubver}.tar.gz +%endif +URL: https://github.com/01org/%{githubname} +BuildRequires: gcc, make +Patch1: 0001-make-Adding-LDFLAGS-to-the-libpqos-build-command.patch +Patch2: 0002-make-Add-support-to-add-flags-to-LDFLAGS-via-EXTRA_L.patch + + +%description +This software package provides basic support for +Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM), +Cache Allocation Technology (CAT), Memory Bandwidth Allocation (MBA), +and Code Data Prioratization (CDP). + +CMT, MBM and CAT are configured using Model Specific Registers (MSRs) +to measure last level cache occupancy, set up the class of service masks and +manage the association of the cores/logical threads to a class of service. +The software executes in user space, and access to the MSRs is +obtained through a standard Linux* interface. The virtual file system +provides an interface to read and write the MSR registers but +it requires root privileges. + +%package -n intel-cmt-cat-devel +Summary: Library and sample code to use CMT, MBM, CAT, CDP and MBA technologies +License: BSD +Requires: intel-cmt-cat == %{version} +Group: Development/Tools +ExclusiveArch: x86_64 i686 i586 + +%description -n intel-cmt-cat-devel +This software package provides basic support for +Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM), +Cache Allocation Technology (CAT), Memory Bandwidth Allocation (MBA), +and Code Data Prioratization (CDP). +The package includes library, header file and sample code. + +For additional information please refer to: +https://github.com/01org/%{githubname} + +%prep +%autosetup -n %{githubfull} -p1 + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%build +make %{?_smp_mflags} EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" + +%install +# Not doing make install as it strips the symbols. +# Using files from the build directory. +install -d %{buildroot}/%{_bindir} +install -s %{_builddir}/%{githubfull}/pqos/pqos %{buildroot}/%{_bindir} +install %{_builddir}/%{githubfull}/pqos/pqos-os %{buildroot}/%{_bindir} +install %{_builddir}/%{githubfull}/pqos/pqos-msr %{buildroot}/%{_bindir} +sed -i "1s/.*/\#!\/usr\/bin\/bash/" %{buildroot}/%{_bindir}/pqos-* + +install -d %{buildroot}/%{_mandir}/man8 +install -m 0644 %{_builddir}/%{githubfull}/pqos/pqos.8 %{buildroot}/%{_mandir}/man8 +ln -sf %{_mandir}/man8/pqos.8 %{buildroot}/%{_mandir}/man8/pqos-os.8 +ln -sf %{_mandir}/man8/pqos.8 %{buildroot}/%{_mandir}/man8/pqos-msr.8 + +install -d %{buildroot}/%{_bindir} +install -s %{_builddir}/%{githubfull}/rdtset/rdtset %{buildroot}/%{_bindir} + +install -d %{buildroot}/%{_mandir}/man8 +install -m 0644 %{_builddir}/%{githubfull}/rdtset/rdtset.8 %{buildroot}/%{_mandir}/man8 + +install -d %{buildroot}/%{_licensedir}/%{name}-%{version} +install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_licensedir}/%{name}-%{version} + +# Install the library +install -d %{buildroot}/%{_libdir} +install -s %{_builddir}/%{githubfull}/lib/libpqos.so.* %{buildroot}/%{_libdir} +cp -a %{_builddir}/%{githubfull}/lib/libpqos.so %{buildroot}/%{_libdir} +cp -a %{_builddir}/%{githubfull}/lib/libpqos.so.2 %{buildroot}/%{_libdir} + +# Install the header file +install -d %{buildroot}/%{_includedir} +install -m 0644 %{_builddir}/%{githubfull}/lib/pqos.h %{buildroot}/%{_includedir} + +# Install license and sample code +install -d %{buildroot}/%{_usrsrc}/%{githubfull} +install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_usrsrc}/%{githubfull} + +install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c + +install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT +install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT/Makefile %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT +install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT/reset_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT +install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT/allocation_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT +install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT/association_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT + +install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM +install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/Makefile %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM +install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/monitor_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM + +%files +%{_bindir}/pqos +%{_bindir}/pqos-os +%{_bindir}/pqos-msr +%{_mandir}/man8/pqos.8.gz +%{_mandir}/man8/pqos-os.8.gz +%{_mandir}/man8/pqos-msr.8.gz +%{_bindir}/rdtset +%{_mandir}/man8/rdtset.8.gz +%{_libdir}/libpqos.so.* + +%{!?_licensedir:%global license %%doc} +%license %{_licensedir}/%{name}-%{version}/LICENSE +%doc ChangeLog README + +%files -n intel-cmt-cat-devel +%{_libdir}/libpqos.so +%{_libdir}/libpqos.so.2 +%{_includedir}/pqos.h +%{_usrsrc}/%{githubfull}/c/CAT/Makefile +%{_usrsrc}/%{githubfull}/c/CAT/reset_app.c +%{_usrsrc}/%{githubfull}/c/CAT/association_app.c +%{_usrsrc}/%{githubfull}/c/CAT/allocation_app.c +%{_usrsrc}/%{githubfull}/c/CMT_MBM/Makefile +%{_usrsrc}/%{githubfull}/c/CMT_MBM/monitor_app.c +%doc %{_usrsrc}/%{githubfull}/LICENSE + +%changelog +* Thu Jun 11 2020 Martin Cermak - 2.0.0-3 +- NVR bump and rebuild because of CI gating. + Related: #1682388 + +* Mon Oct 08 2018 Jiri Olsa - 2.0.0-2 +- New release 2.0.0-2 +- passing distro CFLAGS/LDFLAGS + +* Thu Jun 28 2018 Marcel cornu , Michal Aleksinski - 2.0.0-1 +- New release 2.0.0 + +* Thu Mar 08 2018 Marcel cornu , Michal Aleksinski - 1.2.0-3 +- Updated spec file with BuildRequires tag + +* Wed Feb 07 2018 Fedora Release Engineering - 1.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Nov 29 2017 Marcel Cornu , Wojciech Andralojc 1.2.0-1 +- New release 1.2.0 + +* Thu Aug 3 2017 Aaron Hetherington , Marcel Cornu 1.1.0-1 +- New release 1.1.0 + +* Wed Aug 02 2017 Fedora Release Engineering - 1.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jun 21 2017 Aaron Hetherington , Marcel Cornu 1.0.1-1 +- Spec file bug fixes + +* Wed Jun 07 2017 Aaron Hetherington , Marcel Cornu 1.0.1-1 +- new release +- bug fixes + +* Fri May 19 2017 Aaron Hetherington , Michal Aleksinski 1.0.0-1 +- new release + +* Tue Feb 14 2017 Aaron Hetherington 0.1.5-1 +- new release + +* Mon Oct 17 2016 Aaron Hetherington 0.1.5 +- new release + +* Tue Apr 19 2016 Tomasz Kantecki 0.1.4-3 +- global typo fix +- small edits in the description + +* Mon Apr 18 2016 Tomasz Kantecki 0.1.4-2 +- LICENSE file added to the package + +* Thu Apr 7 2016 Tomasz Kantecki 0.1.4-1 +- initial version of the package