Blame SPECS/intel-cmt-cat.spec

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