@@ -25,152 +25,78 @@ Distribution: Azure Linux
2525# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2626# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727
28- %global githubname intel-cmt-cat
29- %global githubver 4.1.0
30-
31- %if %{defined githubsubver }
32- %global githubfull %{githubname }-%{githubver }.%{githubsubver }
33- %else
34- %global githubfull %{githubname }-%{githubver }
35- %endif
36-
37- # disable producing debuginfo for this package
38- %global debug_package %{nil }
39-
40-
41- Summary: Provides command line interface to CMT, MBM, CAT, CDP and MBA technologies
42- Name: %{githubname }
43- Release: 2%{?dist }
44- Version: %{githubver }
45- License: BSD
46- ExclusiveArch: x86_64 i686 i586
47- %if %{defined githubsubver }
48- Source: https://github.com/01org/%{githubname }/archive/v%{githubver }.%{githubsubver }.tar.gz#/%{name}-%{version}.tar.gz
49- %else
50- Source: https://github.com/01org/%{githubname }/archive/v%{githubver }.tar.gz#/%{name}-%{version}.tar.gz
51- %endif
52- URL: https://github.com/01org/%{githubname }
53- BuildRequires: gcc, make
28+ %global libpqos_ver 6.0.0
29+ %global desc %{expand: \
30+ This package provides basic support for Intel Resource Director Technology
31+ including, Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring
32+ (MBM), Cache Allocation Technology (CAT), Code and Data Prioritization
33+ (CDP) and Memory Bandwidth Allocation (MBA).}
34+
35+ Name: intel-cmt-cat
36+ Version: 24.05
37+ Release: 1%{?dist }
38+ Summary: Intel cache monitoring and allocation technology config tool
39+
40+ License: BSD-3-Clause
41+ URL: https://github.com/intel/intel-cmt-cat
42+ Source: %{url }/archive/v%{version }/%{name }-%{version }.tar.gz
43+
44+ Patch0: 0001-alter-install-paths.patch
45+ Patch1: 0002-remove-build-and-install-of-examples.patch
46+ Patch2: 0003-allow-debian-flags-to-be-added.patch
47+
48+ ExclusiveArch: x86_64
49+
50+ BuildRequires: gcc
51+ BuildRequires: make
5452
5553%description
56- This software package provides basic support for
57- Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM),
58- Cache Allocation Technology (CAT), Memory Bandwidth Allocation (MBA),
59- and Code Data Prioratization (CDP).
60-
61- CMT, MBM and CAT are configured using Model Specific Registers (MSRs)
62- to measure last level cache occupancy, set up the class of service masks and
63- manage the association of the cores/logical threads to a class of service.
64- The software executes in user space, and access to the MSRs is
65- obtained through a standard Linux* interface. The virtual file system
66- provides an interface to read and write the MSR registers but
67- it requires root privileges.
68-
69- %package -n intel-cmt-cat-devel
70- Summary: Library and sample code to use CMT, MBM, CAT, CDP and MBA technologies
71- License: BSD
72- Requires: intel-cmt-cat == %{version }
73- ExclusiveArch: x86_64 i686 i586
74-
75- %description -n intel-cmt-cat-devel
76- This software package provides basic support for
77- Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM),
78- Cache Allocation Technology (CAT), Memory Bandwidth Allocation (MBA),
79- and Code Data Prioratization (CDP).
80- The package includes library, header file and sample code.
81-
82- For additional information please refer to:
83- https://github.com/01org/%{githubname }
54+ %{desc }
8455
85- %prep
86- %autosetup -n %{githubfull }
56+ %package devel
57+ Summary: Development files for %{name }
58+ Requires: %{name }%{?_isa } = %{version }-%{release }
8759
88- %ldconfig_scriptlets
60+ %description devel %{desc }
61+
62+ Development files.
63+
64+ %prep
65+ %autosetup -p1 -n %{name }-%{version }
8966
9067%build
91- make %{? _smp_mflags }
68+ % make_build
9269
9370%install
94- # Not doing make install as it strips the symbols.
95- # Using files from the build directory.
96- install -d %{buildroot }/%{_bindir }
97- install -s %{_builddir }/%{githubfull }/pqos/pqos %{buildroot }/%{_bindir }
98- install %{_builddir }/%{githubfull }/pqos/pqos-os %{buildroot }/%{_bindir }
99- install %{_builddir }/%{githubfull }/pqos/pqos-msr %{buildroot }/%{_bindir }
100- sed -i " 1s/.*/\#!\/usr\/bin\/bash/" %{buildroot }/%{_bindir }/pqos-*
101-
102- install -d %{buildroot }/%{_mandir }/man8
103- install -m 0644 %{_builddir }/%{githubfull }/pqos/pqos.8 %{buildroot }/%{_mandir }/man8
104- ln -sf %{_mandir }/man8/pqos.8 %{buildroot }/%{_mandir }/man8/pqos-os.8
105- ln -sf %{_mandir }/man8/pqos.8 %{buildroot }/%{_mandir }/man8/pqos-msr.8
106-
107- install -d %{buildroot }/%{_bindir }
108- install -s %{_builddir }/%{githubfull }/rdtset/rdtset %{buildroot }/%{_bindir }
109-
110- install -d %{buildroot }/%{_mandir }/man8
111- install -m 0644 %{_builddir }/%{githubfull }/rdtset/rdtset.8 %{buildroot }/%{_mandir }/man8
112-
113- install -d %{buildroot }/%{_licensedir }/%{name }-%{version }
114- install -m 0644 %{_builddir }/%{githubfull }/LICENSE %{buildroot }/%{_licensedir }/%{name }-%{version }
115-
116- # Install the library
117- install -d %{buildroot }/%{_libdir }
118- install -s %{_builddir }/%{githubfull }/lib/libpqos.so.* %{buildroot }/%{_libdir }
119- cp -a %{_builddir }/%{githubfull }/lib/libpqos.so %{buildroot }/%{_libdir }
120- cp -a %{_builddir }/%{githubfull }/lib/libpqos.so.4 %{buildroot }/%{_libdir }
121-
122- # Install the header file
123- install -d %{buildroot }/%{_includedir }
124- install -m 0644 %{_builddir }/%{githubfull }/lib/pqos.h %{buildroot }/%{_includedir }
125-
126- # Install license and sample code
127- install -d %{buildroot }/%{_usrsrc }/%{githubfull }
128- install -m 0644 %{_builddir }/%{githubfull }/LICENSE %{buildroot }/%{_usrsrc }/%{githubfull }
129-
130- install -d %{buildroot }/%{_usrsrc }/%{githubfull }/c
131-
132- install -d %{buildroot }/%{_usrsrc }/%{githubfull }/c/CAT_MBA
133- install -m 0644 %{_builddir }/%{githubfull }/examples/c/CAT_MBA/Makefile %{buildroot }/%{_usrsrc }/%{githubfull }/c/CAT_MBA
134- install -m 0644 %{_builddir }/%{githubfull }/examples/c/CAT_MBA/reset_app.c %{buildroot }/%{_usrsrc }/%{githubfull }/c/CAT_MBA
135- install -m 0644 %{_builddir }/%{githubfull }/examples/c/CAT_MBA/allocation_app_l2cat.c %{buildroot }/%{_usrsrc }/%{githubfull }/c/CAT_MBA
136- install -m 0644 %{_builddir }/%{githubfull }/examples/c/CAT_MBA/allocation_app_l3cat.c %{buildroot }/%{_usrsrc }/%{githubfull }/c/CAT_MBA
137- install -m 0644 %{_builddir }/%{githubfull }/examples/c/CAT_MBA/allocation_app_mba.c %{buildroot }/%{_usrsrc }/%{githubfull }/c/CAT_MBA
138- install -m 0644 %{_builddir }/%{githubfull }/examples/c/CAT_MBA/association_app.c %{buildroot }/%{_usrsrc }/%{githubfull }/c/CAT_MBA
139-
140- install -d %{buildroot }/%{_usrsrc }/%{githubfull }/c/CMT_MBM
141- install -m 0644 %{_builddir }/%{githubfull }/examples/c/CMT_MBM/Makefile %{buildroot }/%{_usrsrc }/%{githubfull }/c/CMT_MBM
142- install -m 0644 %{_builddir }/%{githubfull }/examples/c/CMT_MBM/monitor_app.c %{buildroot }/%{_usrsrc }/%{githubfull }/c/CMT_MBM
71+ %make_install
72+
73+ %ldconfig_scriptlets
14374
14475%files
145- %{_bindir }/pqos
146- %{_bindir }/pqos-os
147- %{_bindir }/pqos-msr
148- %{_mandir }/man8/pqos.8.gz
149- %{_mandir }/man8/pqos-os.8.gz
150- %{_mandir }/man8/pqos-msr.8.gz
151- %{_bindir }/rdtset
152- %{_mandir }/man8/rdtset.8.gz
153- %{_libdir }/libpqos.so.*
154-
155- %{! ?_licensedir:%global license %%doc }
156- %license %{_licensedir }/%{name }-%{version }/LICENSE
157- %doc ChangeLog README
158-
159- %files -n intel-cmt-cat-devel
160- %{_libdir }/libpqos.so
161- %{_libdir }/libpqos.so.4
76+ %license LICENSE
77+ %doc ChangeLog README.md
78+ %{_bindir }/membw
79+ %{_sbindir }/pqos
80+ %{_sbindir }/pqos-msr
81+ %{_sbindir }/pqos-os
82+ %{_sbindir }/rdtset
83+ %{_lib64dir }/libpqos.so.6
84+ %{_lib64dir }/libpqos.so.%{libpqos_ver }
85+ %{_mandir }/man8/membw.8*
86+ %{_mandir }/man8/pqos.8*
87+ %{_mandir }/man8/pqos-msr.8*
88+ %{_mandir }/man8/pqos-os.8*
89+ %{_mandir }/man8/rdtset.8*
90+
91+ %files -n %{name }-devel
16292%{_includedir }/pqos.h
163- %{_usrsrc }/%{githubfull }/c/CAT_MBA/Makefile
164- %{_usrsrc }/%{githubfull }/c/CAT_MBA/reset_app.c
165- %{_usrsrc }/%{githubfull }/c/CAT_MBA/association_app.c
166- %{_usrsrc }/%{githubfull }/c/CAT_MBA/allocation_app_l2cat.c
167- %{_usrsrc }/%{githubfull }/c/CAT_MBA/allocation_app_l3cat.c
168- %{_usrsrc }/%{githubfull }/c/CAT_MBA/allocation_app_mba.c
169- %{_usrsrc }/%{githubfull }/c/CMT_MBM/Makefile
170- %{_usrsrc }/%{githubfull }/c/CMT_MBM/monitor_app.c
171- %doc %{_usrsrc }/%{githubfull }/LICENSE
93+ %{_lib64dir }/libpqos.so
17294
17395%changelog
96+ * Mon Nov 11 2024 Sumit Jena <v-sumitjena@microsoft.com> - 24.05-1
97+ - Update to version 24.05
98+ - License verified.
99+
174100* Fri Oct 15 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 4.1.0-2
175101- Initial CBL-Mariner import from Fedora 33 (license: MIT).
176102
0 commit comments