Blame SPECS/intel-cmt-cat.spec

3f3304
# Copyright (c) 2016-2020, Intel Corporation
07b4a3
#
07b4a3
# Redistribution and use in source and binary forms, with or without
07b4a3
# modification, are permitted provided that the following conditions are met:
07b4a3
#
07b4a3
#     * Redistributions of source code must retain the above copyright notice,
07b4a3
#       this list of conditions and the following disclaimer.
07b4a3
#     * Redistributions in binary form must reproduce the above copyright
07b4a3
#       notice, this list of conditions and the following disclaimer in the
07b4a3
#       documentation and/or other materials provided with the distribution.
07b4a3
#     * Neither the name of Intel Corporation nor the names of its contributors
07b4a3
#       may be used to endorse or promote products derived from this software
07b4a3
#       without specific prior written permission.
07b4a3
#
07b4a3
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
07b4a3
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
07b4a3
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
07b4a3
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
07b4a3
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
07b4a3
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
07b4a3
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
07b4a3
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
07b4a3
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
07b4a3
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
07b4a3
07b4a3
%global githubname   intel-cmt-cat
3f3304
%global githubver    4.0.0
07b4a3
07b4a3
%if %{defined githubsubver}
07b4a3
%global githubfull   %{githubname}-%{githubver}.%{githubsubver}
07b4a3
%else
07b4a3
%global githubfull   %{githubname}-%{githubver}
07b4a3
%endif
07b4a3
07b4a3
# disable producing debuginfo for this package
07b4a3
%global debug_package %{nil}
07b4a3
07b4a3
07b4a3
Summary:            Provides command line interface to CMT, MBM, CAT, CDP and MBA technologies
07b4a3
Name:               %{githubname}
3f3304
Release:            0%{?dist}
07b4a3
Version:            %{githubver}
07b4a3
License:            BSD
07b4a3
ExclusiveArch:      x86_64 i686 i586
07b4a3
%if %{defined githubsubver}
07b4a3
Source:             https://github.com/01org/%{githubname}/archive/v%{githubver}.%{githubsubver}.tar.gz
07b4a3
%else
07b4a3
Source:             https://github.com/01org/%{githubname}/archive/v%{githubver}.tar.gz
07b4a3
%endif
07b4a3
URL:                https://github.com/01org/%{githubname}
07b4a3
BuildRequires:      gcc, make
07b4a3
07b4a3
%description
07b4a3
This software package provides basic support for
07b4a3
Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM),
07b4a3
Cache Allocation Technology (CAT), Memory Bandwidth Allocation (MBA),
07b4a3
and Code Data Prioratization (CDP).
07b4a3
07b4a3
CMT, MBM and CAT are configured using Model Specific Registers (MSRs)
07b4a3
to measure last level cache occupancy, set up the class of service masks and
07b4a3
manage the association of the cores/logical threads to a class of service.
07b4a3
The software executes in user space, and access to the MSRs is
07b4a3
obtained through a standard Linux* interface. The virtual file system
07b4a3
provides an interface to read and write the MSR registers but
07b4a3
it requires root privileges.
07b4a3
07b4a3
%package -n intel-cmt-cat-devel
07b4a3
Summary:            Library and sample code to use CMT, MBM, CAT, CDP and MBA technologies
07b4a3
License:            BSD
07b4a3
Requires:           intel-cmt-cat == %{version}
07b4a3
ExclusiveArch:      x86_64 i686 i586
07b4a3
07b4a3
%description -n intel-cmt-cat-devel
07b4a3
This software package provides basic support for
07b4a3
Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM),
07b4a3
Cache Allocation Technology (CAT), Memory Bandwidth Allocation (MBA),
07b4a3
and Code Data Prioratization (CDP).
07b4a3
The package includes library, header file and sample code.
07b4a3
07b4a3
For additional information please refer to:
07b4a3
https://github.com/01org/%{githubname}
07b4a3
07b4a3
%prep
3f3304
%autosetup -n %{githubfull}
07b4a3
3f3304
%ldconfig_scriptlets
07b4a3
07b4a3
%build
3f3304
make %{?_smp_mflags}
07b4a3
07b4a3
%install
07b4a3
# Not doing make install as it strips the symbols.
07b4a3
# Using files from the build directory.
07b4a3
install -d %{buildroot}/%{_bindir}
07b4a3
install -s %{_builddir}/%{githubfull}/pqos/pqos %{buildroot}/%{_bindir}
07b4a3
install %{_builddir}/%{githubfull}/pqos/pqos-os %{buildroot}/%{_bindir}
07b4a3
install %{_builddir}/%{githubfull}/pqos/pqos-msr %{buildroot}/%{_bindir}
07b4a3
sed -i "1s/.*/\#!\/usr\/bin\/bash/" %{buildroot}/%{_bindir}/pqos-*
07b4a3
07b4a3
install -d %{buildroot}/%{_mandir}/man8
07b4a3
install -m 0644 %{_builddir}/%{githubfull}/pqos/pqos.8  %{buildroot}/%{_mandir}/man8
07b4a3
ln -sf %{_mandir}/man8/pqos.8 %{buildroot}/%{_mandir}/man8/pqos-os.8
07b4a3
ln -sf %{_mandir}/man8/pqos.8 %{buildroot}/%{_mandir}/man8/pqos-msr.8
07b4a3
07b4a3
install -d %{buildroot}/%{_bindir}
07b4a3
install -s %{_builddir}/%{githubfull}/rdtset/rdtset %{buildroot}/%{_bindir}
07b4a3
07b4a3
install -d %{buildroot}/%{_mandir}/man8
07b4a3
install -m 0644 %{_builddir}/%{githubfull}/rdtset/rdtset.8  %{buildroot}/%{_mandir}/man8
07b4a3
07b4a3
install -d %{buildroot}/%{_licensedir}/%{name}-%{version}
07b4a3
install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_licensedir}/%{name}-%{version}
07b4a3
07b4a3
# Install the library
07b4a3
install -d %{buildroot}/%{_libdir}
07b4a3
install -s %{_builddir}/%{githubfull}/lib/libpqos.so.* %{buildroot}/%{_libdir}
07b4a3
cp -a %{_builddir}/%{githubfull}/lib/libpqos.so %{buildroot}/%{_libdir}
3f3304
cp -a %{_builddir}/%{githubfull}/lib/libpqos.so.4 %{buildroot}/%{_libdir}
07b4a3
07b4a3
# Install the header file
07b4a3
install -d %{buildroot}/%{_includedir}
07b4a3
install -m 0644 %{_builddir}/%{githubfull}/lib/pqos.h %{buildroot}/%{_includedir}
07b4a3
07b4a3
# Install license and sample code
07b4a3
install -d %{buildroot}/%{_usrsrc}/%{githubfull}
07b4a3
install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_usrsrc}/%{githubfull}
07b4a3
07b4a3
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c
07b4a3
3f3304
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
3f3304
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/Makefile          %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
3f3304
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/reset_app.c       %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
3f3304
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_l2cat.c  %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
3f3304
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_l3cat.c  %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
3f3304
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_mba.c  %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
3f3304
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/association_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
07b4a3
07b4a3
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
07b4a3
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/Makefile      %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
07b4a3
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/monitor_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
07b4a3
07b4a3
%files
07b4a3
%{_bindir}/pqos
07b4a3
%{_bindir}/pqos-os
07b4a3
%{_bindir}/pqos-msr
07b4a3
%{_mandir}/man8/pqos.8.gz
07b4a3
%{_mandir}/man8/pqos-os.8.gz
07b4a3
%{_mandir}/man8/pqos-msr.8.gz
07b4a3
%{_bindir}/rdtset
07b4a3
%{_mandir}/man8/rdtset.8.gz
07b4a3
%{_libdir}/libpqos.so.*
07b4a3
07b4a3
%{!?_licensedir:%global license %%doc}
07b4a3
%license %{_licensedir}/%{name}-%{version}/LICENSE
07b4a3
%doc ChangeLog README
07b4a3
07b4a3
%files -n intel-cmt-cat-devel
07b4a3
%{_libdir}/libpqos.so
3f3304
%{_libdir}/libpqos.so.4
07b4a3
%{_includedir}/pqos.h
3f3304
%{_usrsrc}/%{githubfull}/c/CAT_MBA/Makefile
3f3304
%{_usrsrc}/%{githubfull}/c/CAT_MBA/reset_app.c
3f3304
%{_usrsrc}/%{githubfull}/c/CAT_MBA/association_app.c
3f3304
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_l2cat.c
3f3304
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_l3cat.c
3f3304
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_mba.c
07b4a3
%{_usrsrc}/%{githubfull}/c/CMT_MBM/Makefile
07b4a3
%{_usrsrc}/%{githubfull}/c/CMT_MBM/monitor_app.c
07b4a3
%doc %{_usrsrc}/%{githubfull}/LICENSE
07b4a3
07b4a3
%changelog
3f3304
* Mon Oct 12 2020 Jiri Olsa <jolsa@redhat.com> - 4.0.0-0
3f3304
- New release 4.0.0
3f3304
07b4a3
* Thu Jun 11 2020 Martin Cermak <mcermak@redhat.com> - 2.0.0-3
07b4a3
- NVR bump and rebuild because of CI gating.
07b4a3
  Related: #1682388
07b4a3
07b4a3
* Mon Oct 08 2018 Jiri Olsa <jolsa@redhat.com>  - 2.0.0-2
07b4a3
- New release 2.0.0-2
07b4a3
- passing distro CFLAGS/LDFLAGS
07b4a3
07b4a3
* Thu Jun 28 2018 Marcel cornu <marcel.d.cornu@intel.com>, Michal Aleksinski <michalx.aleksinski@intel.com> - 2.0.0-1
07b4a3
- New release 2.0.0
07b4a3
07b4a3
* Thu Mar 08 2018 Marcel cornu <marcel.d.cornu@intel.com>, Michal Aleksinski <michalx.aleksinski@intel.com> - 1.2.0-3
07b4a3
- Updated spec file with BuildRequires tag
07b4a3
07b4a3
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
07b4a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
07b4a3
07b4a3
* Wed Nov 29 2017 Marcel Cornu <marcel.d.cornu@intel.com>, Wojciech Andralojc <wojciechx.andralojc@intel.com> 1.2.0-1
07b4a3
- New release 1.2.0
07b4a3
07b4a3
* Thu Aug 3 2017 Aaron Hetherington <aaron.hetherington@intel.com>, Marcel Cornu <marcel.d.cornu@intel.com> 1.1.0-1
07b4a3
- New release 1.1.0
07b4a3
07b4a3
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
07b4a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
07b4a3
07b4a3
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
07b4a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
07b4a3
07b4a3
* Wed Jun 21 2017 Aaron Hetherington <aaron.hetherington@intel.com>, Marcel Cornu <marcel.d.cornu@intel.com> 1.0.1-1
07b4a3
- Spec file bug fixes
07b4a3
07b4a3
* Wed Jun 07 2017 Aaron Hetherington <aaron.hetherington@intel.com>, Marcel Cornu <marcel.d.cornu@intel.com> 1.0.1-1
07b4a3
- new release
07b4a3
- bug fixes
07b4a3
07b4a3
* Fri May 19 2017 Aaron Hetherington <aaron.hetherington@intel.com>, Michal Aleksinski <michalx.aleksinski@intel.com> 1.0.0-1
07b4a3
- new release
07b4a3
07b4a3
* Tue Feb 14 2017 Aaron Hetherington <aaron.hetherington@intel.com> 0.1.5-1
07b4a3
- new release
07b4a3
07b4a3
* Mon Oct 17 2016 Aaron Hetherington <aaron.hetherington@intel.com> 0.1.5
07b4a3
- new release
07b4a3
07b4a3
* Tue Apr 19 2016 Tomasz Kantecki <tomasz.kantecki@intel.com> 0.1.4-3
07b4a3
- global typo fix
07b4a3
- small edits in the description
07b4a3
07b4a3
* Mon Apr 18 2016 Tomasz Kantecki <tomasz.kantecki@intel.com> 0.1.4-2
07b4a3
- LICENSE file added to the package
07b4a3
07b4a3
* Thu Apr 7 2016 Tomasz Kantecki <tomasz.kantecki@intel.com> 0.1.4-1
07b4a3
- initial version of the package