diff --git a/.gitignore b/.gitignore index c61b88a..20a8fc2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/v0.1.5-1.tar.gz +SOURCES/v3.0.1.tar.gz diff --git a/.intel-cmt-cat.metadata b/.intel-cmt-cat.metadata index b279004..02a2225 100644 --- a/.intel-cmt-cat.metadata +++ b/.intel-cmt-cat.metadata @@ -1 +1 @@ -602d87401fa1fffa2ed9f28802a2e9513115c248 SOURCES/v0.1.5-1.tar.gz +2c5873758179e54c2715126fddd99c3d29575577 SOURCES/v3.0.1.tar.gz diff --git a/SPECS/intel-cmt-cat.spec b/SPECS/intel-cmt-cat.spec index 607fe12..261d3a4 100644 --- a/SPECS/intel-cmt-cat.spec +++ b/SPECS/intel-cmt-cat.spec @@ -1,8 +1,8 @@ -# Copyright (c) 2016, Intel Corporation -# +# Copyright (c) 2016-2019, 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 @@ -11,7 +11,7 @@ # * 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 @@ -23,48 +23,38 @@ # 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 ver014 0.1.4 -%global ver015 0.1.5 -%global ver0151 0.1.5 -%global githubname intel-cmt-cat -%global githubver %{ver0151} +%global githubname intel-cmt-cat +%global githubver 3.0.1 -%if "%{githubver}" == "%{ver0151}" -%global githubfull %{githubname}-%{githubver}-1 +%if %{defined githubsubver} +%global githubfull %{githubname}-%{githubver}.%{githubsubver} %else -%global githubfull %{githubname}-%{githubver} +%global githubfull %{githubname}-%{githubver} %endif -%global pkgname intel-cmt-cat -%if 0%{!?_licensedir} -%global _licensedir %{_docdir} -%endif - -Summary: Provides command line interface to CMT, MBM, CAT and CDP technologies -Name: %{pkgname} -Version: %{githubver} +# disable producing debuginfo for this package +%global debug_package %{nil} -%if "%{githubver}" == "%{ver015}" -Release: 2%{?dist} -%endif -%if "%{githubver}" == "%{ver014}" -Release: 3%{?dist} -%endif +Summary: Provides command line interface to CMT, MBM, CAT, CDP and MBA technologies +Name: %{githubname} +Release: 1%{?dist} +Version: %{githubver} License: BSD -Group: Development/Tools ExclusiveArch: x86_64 i686 i586 -%if "%{githubver}" == "%{ver0151}" -Source0: https://github.com/01org/%{githubname}/archive/v%{githubver}-1.tar.gz +%if %{defined githubsubver} +Source: https://github.com/01org/%{githubname}/archive/v%{githubver}.%{githubsubver}.tar.gz %else -Source0: https://github.com/01org/%{githubname}/archive/v%{githubver}.tar.gz +Source: https://github.com/01org/%{githubname}/archive/v%{githubver}.tar.gz %endif URL: https://github.com/01org/%{githubname} +BuildRequires: gcc, make %description This software package provides basic support for Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM), -Cache Allocation Technology (CAT) and Code Data Prioratization (CDP). +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 @@ -74,13 +64,28 @@ 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. -%prep +%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} +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} -%if "%{githubver}" == "%{ver015}" %post -p /sbin/ldconfig -%endif + +%postun -p /sbin/ldconfig %build make %{?_smp_mflags} @@ -88,15 +93,19 @@ make %{?_smp_mflags} %install # Not doing make install as it strips the symbols. # Using files from the build directory. -%if "%{githubver}" == "%{ver015}" || "%{githubver}" == "%{ver0151}" install -d %{buildroot}/%{_bindir} -install %{_builddir}/%{githubfull}/pqos/pqos %{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 %{_builddir}/%{githubfull}/rdtset/rdtset %{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 @@ -104,44 +113,74 @@ install -m 0644 %{_builddir}/%{githubfull}/rdtset/rdtset.8 %{buildroot}/%{_mand install -d %{buildroot}/%{_licensedir}/%{name}-%{version} install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_licensedir}/%{name}-%{version} +# Install the library install -d %{buildroot}/%{_libdir} -%if "%{githubver}" == "%{ver0151}" -install %{_builddir}/%{githubfull}/lib/libpqos-0.1.6.so %{buildroot}/%{_libdir} -%else -install %{_builddir}/%{githubfull}/lib/libpqos-0.1.5.so %{buildroot}/%{_libdir} -%endif -%endif +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.3 %{buildroot}/%{_libdir} -%if "%{githubver}" == "%{ver014}" -install -d %{buildroot}/%{_bindir} -install %{_builddir}/%{githubfull}/pqos %{buildroot}/%{_bindir} +# Install the header file +install -d %{buildroot}/%{_includedir} +install -m 0644 %{_builddir}/%{githubfull}/lib/pqos.h %{buildroot}/%{_includedir} -install -d %{buildroot}/%{_mandir}/man8 -install -m 0644 %{_builddir}/%{githubfull}/pqos.8 %{buildroot}/%{_mandir}/man8 +# Install license and sample code +install -d %{buildroot}/%{_usrsrc}/%{githubfull} +install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_usrsrc}/%{githubfull} -install -d %{buildroot}/%{_licensedir}/%{name}-%{version} -install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_licensedir}/%{name}-%{version} -%endif +install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c + +install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA +install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/Makefile %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA +install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/reset_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA +install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_l2cat.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA +install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_l3cat.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA +install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_mba.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA +install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/association_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA + +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 - -%if "%{githubver}" == "%{ver015}" || "%{githubver}" == "%{ver0151}" +%{_mandir}/man8/pqos-os.8.gz +%{_mandir}/man8/pqos-msr.8.gz %{_bindir}/rdtset %{_mandir}/man8/rdtset.8.gz -%if "%{githubver}" == "%{ver0151}" -%{_libdir}/libpqos-0.1.6.so -%else -%{_libdir}/libpqos-0.1.5.so -%endif -%endif +%{_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.3 +%{_includedir}/pqos.h +%{_usrsrc}/%{githubfull}/c/CAT_MBA/Makefile +%{_usrsrc}/%{githubfull}/c/CAT_MBA/reset_app.c +%{_usrsrc}/%{githubfull}/c/CAT_MBA/association_app.c +%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_l2cat.c +%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_l3cat.c +%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_mba.c +%{_usrsrc}/%{githubfull}/c/CMT_MBM/Makefile +%{_usrsrc}/%{githubfull}/c/CMT_MBM/monitor_app.c +%doc %{_usrsrc}/%{githubfull}/LICENSE + %changelog +* Tue May 21 2019 Jiri Olsa 3.1.0-1 +- new version 3.1.0 +- change spec to follow fedora +- Resolves: rhbz#1643196 + +* Thu Nov 15 2018 Jiri Olsa 2.1.0-1 +- new version 2.1.0 +- change spec to follow fedora +- Resolves: rhbz#1643196 + * Mon May 08 2017 Jiri Olsa 0.1.5-2 - new version 0.1.5-1 - change spec to follow fedora