Blame SPECS/intel-cmt-cat.spec

16223e
# Copyright (c) 2016-2020, Intel Corporation
16223e
#
16223e
# Redistribution and use in source and binary forms, with or without
16223e
# modification, are permitted provided that the following conditions are met:
16223e
#
16223e
#     * Redistributions of source code must retain the above copyright notice,
16223e
#       this list of conditions and the following disclaimer.
16223e
#     * Redistributions in binary form must reproduce the above copyright
16223e
#       notice, this list of conditions and the following disclaimer in the
16223e
#       documentation and/or other materials provided with the distribution.
16223e
#     * Neither the name of Intel Corporation nor the names of its contributors
16223e
#       may be used to endorse or promote products derived from this software
16223e
#       without specific prior written permission.
16223e
#
16223e
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16223e
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16223e
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16223e
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
16223e
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16223e
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
16223e
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
16223e
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
16223e
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
16223e
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16223e
16223e
%global githubname   intel-cmt-cat
16223e
%global githubver    4.1.0
16223e
16223e
%if %{defined githubsubver}
16223e
%global githubfull   %{githubname}-%{githubver}.%{githubsubver}
16223e
%else
16223e
%global githubfull   %{githubname}-%{githubver}
16223e
%endif
16223e
16223e
# disable producing debuginfo for this package
16223e
%global debug_package %{nil}
16223e
16223e
16223e
Summary:            Provides command line interface to CMT, MBM, CAT, CDP and MBA technologies
16223e
Name:               %{githubname}
16223e
Release:            3%{?dist}
16223e
Version:            %{githubver}
16223e
License:            BSD
16223e
ExclusiveArch:      x86_64 i686 i586
16223e
%if %{defined githubsubver}
16223e
Source:             https://github.com/01org/%{githubname}/archive/v%{githubver}.%{githubsubver}.tar.gz
16223e
%else
16223e
Source:             https://github.com/01org/%{githubname}/archive/v%{githubver}.tar.gz
16223e
%endif
16223e
URL:                https://github.com/01org/%{githubname}
16223e
BuildRequires:      gcc, make
16223e
16223e
%description
16223e
This software package provides basic support for
16223e
Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM),
16223e
Cache Allocation Technology (CAT), Memory Bandwidth Allocation (MBA),
16223e
and Code Data Prioratization (CDP).
16223e
16223e
CMT, MBM and CAT are configured using Model Specific Registers (MSRs)
16223e
to measure last level cache occupancy, set up the class of service masks and
16223e
manage the association of the cores/logical threads to a class of service.
16223e
The software executes in user space, and access to the MSRs is
16223e
obtained through a standard Linux* interface. The virtual file system
16223e
provides an interface to read and write the MSR registers but
16223e
it requires root privileges.
16223e
16223e
%package -n intel-cmt-cat-devel
16223e
Summary:            Library and sample code to use CMT, MBM, CAT, CDP and MBA technologies
16223e
License:            BSD
16223e
Requires:           intel-cmt-cat == %{version}
16223e
ExclusiveArch:      x86_64 i686 i586
16223e
16223e
%description -n intel-cmt-cat-devel
16223e
This software package provides basic support for
16223e
Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM),
16223e
Cache Allocation Technology (CAT), Memory Bandwidth Allocation (MBA),
16223e
and Code Data Prioratization (CDP).
16223e
The package includes library, header file and sample code.
16223e
16223e
For additional information please refer to:
16223e
https://github.com/01org/%{githubname}
16223e
16223e
%prep
16223e
%autosetup -n %{githubfull}
16223e
16223e
%ldconfig_scriptlets
16223e
16223e
%build
16223e
make %{?_smp_mflags}
16223e
16223e
%install
16223e
# Not doing make install as it strips the symbols.
16223e
# Using files from the build directory.
16223e
install -d %{buildroot}/%{_bindir}
16223e
install -s %{_builddir}/%{githubfull}/pqos/pqos %{buildroot}/%{_bindir}
16223e
install %{_builddir}/%{githubfull}/pqos/pqos-os %{buildroot}/%{_bindir}
16223e
install %{_builddir}/%{githubfull}/pqos/pqos-msr %{buildroot}/%{_bindir}
16223e
sed -i "1s/.*/\#!\/usr\/bin\/bash/" %{buildroot}/%{_bindir}/pqos-*
16223e
16223e
install -d %{buildroot}/%{_mandir}/man8
16223e
install -m 0644 %{_builddir}/%{githubfull}/pqos/pqos.8  %{buildroot}/%{_mandir}/man8
16223e
ln -sf %{_mandir}/man8/pqos.8 %{buildroot}/%{_mandir}/man8/pqos-os.8
16223e
ln -sf %{_mandir}/man8/pqos.8 %{buildroot}/%{_mandir}/man8/pqos-msr.8
16223e
16223e
install -d %{buildroot}/%{_bindir}
16223e
install -s %{_builddir}/%{githubfull}/rdtset/rdtset %{buildroot}/%{_bindir}
16223e
16223e
install -d %{buildroot}/%{_mandir}/man8
16223e
install -m 0644 %{_builddir}/%{githubfull}/rdtset/rdtset.8  %{buildroot}/%{_mandir}/man8
16223e
16223e
install -d %{buildroot}/%{_licensedir}/%{name}-%{version}
16223e
install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_licensedir}/%{name}-%{version}
16223e
16223e
# Install the library
16223e
install -d %{buildroot}/%{_libdir}
16223e
install -s %{_builddir}/%{githubfull}/lib/libpqos.so.* %{buildroot}/%{_libdir}
16223e
cp -a %{_builddir}/%{githubfull}/lib/libpqos.so %{buildroot}/%{_libdir}
16223e
cp -a %{_builddir}/%{githubfull}/lib/libpqos.so.4 %{buildroot}/%{_libdir}
16223e
16223e
# Install the header file
16223e
install -d %{buildroot}/%{_includedir}
16223e
install -m 0644 %{_builddir}/%{githubfull}/lib/pqos.h %{buildroot}/%{_includedir}
16223e
16223e
# Install license and sample code
16223e
install -d %{buildroot}/%{_usrsrc}/%{githubfull}
16223e
install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_usrsrc}/%{githubfull}
16223e
16223e
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c
16223e
16223e
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
16223e
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/Makefile          %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
16223e
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/reset_app.c       %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
16223e
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_l2cat.c  %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
16223e
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_l3cat.c  %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
16223e
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_mba.c  %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
16223e
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/association_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
16223e
16223e
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
16223e
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/Makefile      %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
16223e
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/monitor_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
16223e
16223e
%files
16223e
%{_bindir}/pqos
16223e
%{_bindir}/pqos-os
16223e
%{_bindir}/pqos-msr
16223e
%{_mandir}/man8/pqos.8.gz
16223e
%{_mandir}/man8/pqos-os.8.gz
16223e
%{_mandir}/man8/pqos-msr.8.gz
16223e
%{_bindir}/rdtset
16223e
%{_mandir}/man8/rdtset.8.gz
16223e
%{_libdir}/libpqos.so.*
16223e
16223e
%{!?_licensedir:%global license %%doc}
16223e
%license %{_licensedir}/%{name}-%{version}/LICENSE
16223e
%doc ChangeLog README
16223e
16223e
%files -n intel-cmt-cat-devel
16223e
%{_libdir}/libpqos.so
16223e
%{_libdir}/libpqos.so.4
16223e
%{_includedir}/pqos.h
16223e
%{_usrsrc}/%{githubfull}/c/CAT_MBA/Makefile
16223e
%{_usrsrc}/%{githubfull}/c/CAT_MBA/reset_app.c
16223e
%{_usrsrc}/%{githubfull}/c/CAT_MBA/association_app.c
16223e
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_l2cat.c
16223e
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_l3cat.c
16223e
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_mba.c
16223e
%{_usrsrc}/%{githubfull}/c/CMT_MBM/Makefile
16223e
%{_usrsrc}/%{githubfull}/c/CMT_MBM/monitor_app.c
16223e
%doc %{_usrsrc}/%{githubfull}/LICENSE
16223e
16223e
%changelog
16223e
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 4.1.0-3
16223e
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
16223e
  Related: rhbz#1991688
16223e
16223e
* Wed Jun 09 2021 Martin Cermak <mcermak@redhat.com> - 4.1.0-2
16223e
- CI gating related NVR bump and rebuild
16223e
16223e
* Sun May 02 2021 Jiri Olsa <jolsa@kernel.org> - 4.1.0-1
16223e
- RHEL9 release 4.1.0, copied from fedora