]> git.pld-linux.org Git - packages/kernel-tools.git/blob - kernel-tools.spec
- added bpf-upstream patch with upstream bpf/hashmap.h changes and rewritten hashmap...
[packages/kernel-tools.git] / kernel-tools.spec
1 # TODO:
2 # - redefine: PACKAGE_BUGREPORT=cpufreq@vger.kernel.org
3 # - add -n python-perf?
4 # - add bcond to disable building docs (perf docs)
5 # - install of perf links perf binary again
6 # - build runqslower (needs vmlinux with BPF section)
7 #
8 # Conditional build:
9 %bcond_without  verbose         # verbose build (V=1)
10 %bcond_without  cpupower        # cpupower tools
11 %bcond_without  perf            # perf tools
12 %bcond_without  gtk             # GTK+ 2.x perf support
13 %bcond_without  libunwind       # libunwind perf support
14 %bcond_without  multilib        # multilib perf support
15 %bcond_with     runqslower      # runqslower bpf tool
16 %bcond_without  usbip           # usbip utils
17
18 %ifnarch %{x8664}
19 %undefine       with_multilib
20 %endif
21
22 %define         basever         5.7
23 %define         postver         .0
24 Summary:        Assortment of tools for the Linux kernel
25 Summary(pl.UTF-8):      Zestaw narzędzi dla jądra Linuksa
26 Name:           kernel-tools
27 Version:        %{basever}%{postver}
28 Release:        2
29 License:        GPL v2
30 Group:          Applications/System
31 Source0:        https://www.kernel.org/pub/linux/kernel/v5.x/linux-%{basever}.tar.xz
32 # Source0-md5:  f63ed18935914e1ee3e04c2a0ce1ba3b
33 Source1:        cpupower.service
34 Source2:        cpupower.config
35 %if "%{postver}" != ".0"
36 Patch0:         https://www.kernel.org/pub/linux/kernel/v5.x/patch-%{version}.xz
37 # Patch0-md5:   7055ff82e7e6a557c04831a191ed14b3
38 %endif
39 Patch1:         x32.patch
40 Patch2:         regex.patch
41 Patch3:         %{name}-perf-update.patch
42 Patch4:         %{name}-perf-gtk2.patch
43 Patch5:         %{name}-bpf-hashmap-upstream.patch
44 Patch6:         %{name}-bpf-hashmap.patch
45 Patch7:         %{name}-usbip-nocommon.patch
46 URL:            https://www.kernel.org/
47 BuildRequires:  bison
48 BuildRequires:  docutils
49 BuildRequires:  flex
50 BuildRequires:  gettext-tools
51 BuildRequires:  linux-libc-headers >= 7:4.12
52 BuildRequires:  ncurses-devel
53 BuildRequires:  ncurses-ext-devel
54 BuildRequires:  pciutils-devel
55 BuildRequires:  pkgconfig
56 BuildRequires:  python3
57 BuildRequires:  python3-modules
58 BuildRequires:  rpmbuild(macros) >= 1.673
59 BuildRequires:  tar >= 1:1.22
60 BuildRequires:  xz
61 %if %{with perf}
62 BuildRequires:  asciidoc
63 BuildRequires:  audit-libs-devel
64 BuildRequires:  babeltrace-devel
65 BuildRequires:  binutils-devel >= 4:2.29
66 BuildRequires:  docbook-dtd45-xml
67 BuildRequires:  docbook-style-xsl
68 BuildRequires:  elfutils-devel >= 0.158
69 %if %{with multilib}
70 BuildRequires:  gcc-multilib-32
71 BuildRequires:  gcc-multilib-x32
72 %endif
73 # for `btftool btf dump file ... format c` - requires vmlinux with BPF section
74 %{?with_runqslower:BuildRequires:       kernel-vmlinux >= 5.?}
75 %{?with_libunwind:BuildRequires:        libunwind-devel >= 0.99}
76 BuildRequires:  numactl-devel
77 BuildRequires:  openssl-devel
78 BuildRequires:  perl-devel >= 5.1
79 BuildRequires:  python-devel
80 BuildRequires:  rpm-pythonprov
81 BuildRequires:  slang-devel
82 BuildRequires:  xmlto
83 BuildRequires:  xz-devel
84 BuildRequires:  zlib-devel
85 BuildRequires:  zstd-devel
86 # openscd? (CORESIGHT=1 for %{arm}?)
87 %if %{with gtk}
88 BuildRequires:  gtk+2-devel >= 2.0
89 %endif
90 %endif
91 %if %{with usbip}
92 BuildRequires:  autoconf >= 2.59
93 BuildRequires:  automake >= 1:1.9
94 BuildRequires:  gcc >= 6:4.0
95 BuildRequires:  libtool >= 2:2
96 BuildRequires:  libwrap-devel
97 BuildRequires:  udev-devel
98 %endif
99 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
100
101 # otherwise /usr/lib/rpm/bin/debugedit: canonicalization unexpectedly shrank by one character
102 %define         _enable_debug_packages  0
103
104 %define         makeopts        CC="%{__cc}" %{?with_verbose:V=1}
105
106 %description
107 This package contains the software from tools/ subdirectory from Linux
108 kernel source and the supporting documentation.
109
110 %description -l pl.UTF-8
111 Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
112 Linuksa oraz związaną z nim dokumentację.
113
114 %package cpupower
115 Summary:        cpupower - Shows and sets processor power related values
116 Summary(pl.UTF-8):      cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
117 Group:          Applications/System
118 Requires(post,preun,postun):    systemd-units >= 38
119 Requires:       %{name}-cpupower-libs = %{version}-%{release}
120 Requires:       systemd-units >= 0.38
121 Provides:       cpupowerutils = 1:009-0.6.p1
122 Obsoletes:      cpupowerutils < 1:009-0.6.p1
123 Obsoletes:      cpuspeed < 1:1.5-16
124
125 %description cpupower
126 cpupower is a collection of tools to examine and tune power saving
127 related features of your processor.
128
129 %description cpupower -l pl.UTF-8
130 cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
131 związanych z oszczędzaniem energii.
132
133 %package cpupower-libs
134 Summary:        cpupower library
135 Summary(pl.UTF-8):      Biblioteka cpupower
136 Group:          Libraries
137
138 %description cpupower-libs
139 cpupower library.
140
141 %description cpupower-libs -l pl.UTF-8
142 Biblioteka cpupower.
143
144 %package cpupower-libs-devel
145 Summary:        Development files for the cpupower library
146 Summary(pl.UTF-8):      Pliki programistyczne biblioteki cpupower
147 Group:          Development/Libraries
148 Requires:       %{name}-cpupower-libs = %{version}-%{release}
149 Provides:       cpupowerutils-devel = 1:009-0.6.p1
150 Obsoletes:      cpupowerutils-devel < 1:009-0.6.p1
151 Conflicts:      cpufrequtils-devel
152
153 %description cpupower-libs-devel
154 Development files for the cpupower library.
155
156 %description cpupower-libs-devel -l pl.UTF-8
157 Pliki programistyczne biblioteki cpupower.
158
159 %package -n bash-completion-cpupower
160 Summary:        Bash completion for cpupower tools
161 Summary(pl.UTF-8):      Bashowe uzupełnianie parametrów dla poleceń cpupower
162 Group:          Applications/Shells
163 Requires:       %{name}-cpupower = %{version}-%{release}
164 Requires:       bash-completion
165 %if "%{_rpmversion}" >= "5"
166 BuildArch:      noarch
167 %endif
168
169 %description -n bash-completion-cpupower
170 Bash completion for cpupower tools.
171
172 %description -n bash-completion-cpupower -l pl.UTF-8
173 Bashowe uzupełnianie parametrów dla poleceń cpupower.
174
175 %package hv
176 Summary:        Hyper-V virtualization tools
177 Summary(pl.UTF-8):      Narzędzia do wirtualizacji Hyper-V
178 Group:          Applications/System
179
180 %description hv
181 Hyper-V virtualization tools.
182
183 %description hv -l pl.UTF-8
184 Narzędzia do wirtualizacji Hyper-V.
185
186 %package perf
187 Summary:        perf profiler tool
188 Summary(pl.UTF-8):      Narzędzie profilujące perf
189 Group:          Applications/System
190 Suggests:       binutils
191 Obsoletes:      perf-core
192 Obsoletes:      perf-slang
193
194 %description perf
195 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
196 away CPU hardware differences in Linux performance measurements and
197 presents a simple commandline interface. Perf is based on the
198 perf_events interface exported by recent versions of the Linux kernel.
199
200 This package contains core files, scripts and text interface (TUI).
201
202 %description perf -l pl.UTF-8
203 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
204 odseparowujące od różnic sprzętowych między pomiarami wydajności w
205 zależności od procesora oraz udostępniające prosty interfejs linii
206 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
207 przez nowe wersje jądra Linuksa.
208
209 Ten pakiet zawiera podstawowe pliki, skrypty oraz interfejs tekstowy
210 (TUI).
211
212 %package perf-vdso32
213 Summary:        perf profiler tool - VDSO 32-bit ABI reader
214 Summary(pl.UTF-8):      Narzędzie profilujące perf - odczyt VDSO dla ABI 32-bitowego
215 Group:          Applications/System
216 Requires:       %{name}-perf = %{version}-%{release}
217
218 %description perf-vdso32
219 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
220 away CPU hardware differences in Linux performance measurements and
221 presents a simple commandline interface. Perf is based on the
222 perf_events interface exported by recent versions of the Linux kernel.
223
224 This package contains perf-read-vdso32 tool for reading the 32-bit
225 compatibility VDSO in 64-bit mode.
226
227 %description perf-vdso32 -l pl.UTF-8
228 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
229 odseparowujące od różnic sprzętowych między pomiarami wydajności w
230 zależności od procesora oraz udostępniające prosty interfejs linii
231 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
232 przez nowe wersje jądra Linuksa.
233
234 Ten pakiet zawiera narzędzie perf-read-vdso32 do odczytu VDSO dla
235 binariów 32-bitowych w trybie 64-bitowym.
236
237 %package perf-vdsox32
238 Summary:        perf profiler tool - VDSO x32 ABI reader
239 Summary(pl.UTF-8):      Narzędzie profilujące perf - odczyt VDSO dla ABI x32
240 Group:          Applications/System
241 Requires:       %{name}-perf = %{version}-%{release}
242
243 %description perf-vdsox32
244 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
245 away CPU hardware differences in Linux performance measurements and
246 presents a simple commandline interface. Perf is based on the
247 perf_events interface exported by recent versions of the Linux kernel.
248
249 This package contains perf-read-vdso32 tool for reading the x32 mode
250 32-bit compatibility VDSO in 64-bit mode.
251
252 %description perf-vdsox32 -l pl.UTF-8
253 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
254 odseparowujące od różnic sprzętowych między pomiarami wydajności w
255 zależności od procesora oraz udostępniające prosty interfejs linii
256 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
257 przez nowe wersje jądra Linuksa.
258
259 Ten pakiet zawiera narzędzie perf-read-vdso32 do odczytu VDSO dla
260 binariów ABI x32 w trybie 64-bitowym.
261
262 %package perf-gtk
263 Summary:        perf profiler tool (GTK+ 2 GUI)
264 Summary(pl.UTF-8):      Narzędzie profilujące perf (interfejs graficzny GTK+ 2)
265 Group:          X11/Applications
266 Requires:       %{name}-perf = %{version}-%{release}
267
268 %description perf-gtk
269 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
270 away CPU hardware differences in Linux performance measurements and
271 presents a simple commandline interface. Perf is based on the
272 perf_events interface exported by recent versions of the Linux kernel.
273
274 This package contains GTK+ 2 based GUI.
275
276 %description perf-gtk -l pl.UTF-8
277 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
278 odseparowujące od różnic sprzętowych między pomiarami wydajności w
279 zależności od procesora oraz udostępniające prosty interfejs linii
280 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
281 przez nowe wersje jądra Linuksa.
282
283 Ten pakiet zawiera graficzny interfejs oparty na GTK+ 2.
284
285 %package -n bash-completion-perf
286 Summary:        Bash completion for perf command
287 Summary(pl.UTF-8):      Bashowe uzupełnianie parametrów dla polecenia perf
288 Group:          Applications/Shells
289 Requires:       %{name}-perf = %{version}-%{release}
290 Requires:       bash-completion
291 %if "%{_rpmversion}" >= "5"
292 BuildArch:      noarch
293 %endif
294
295 %description -n bash-completion-perf
296 Bash completion for perf command.
297
298 %description -n bash-completion-perf -l pl.UTF-8
299 Bashowe uzupełnianie parametrów dla polecenia perf.
300
301 %package -n bash-completion-kernel-tools
302 Summary:        Bash completion for kernel-tools commands
303 Summary(pl.UTF-8):      Bashowe uzupełnianie parametrów dla poleceń kernel-tools
304 Group:          Applications/Shells
305 Requires:       %{name} = %{version}-%{release}
306 Requires:       bash-completion >= 2.0
307 %if "%{_rpmversion}" >= "5"
308 BuildArch:      noarch
309 %endif
310
311 %description -n bash-completion-kernel-tools
312 Bash completion for kernel-tools commands (currently bpftool).
313
314 %description -n bash-completion-kernel-tools -l pl.UTF-8
315 Bashowe uzupełnianie parametrów dla poleceń kernel-tools (obecnie
316 bpftool).
317
318 %package -n usbip
319 Summary:        USB device sharing system over IP network
320 Summary(pl.UTF-8):      System współdzielenia urządzeń USB po sieci IP
321 Group:          Networking/Utilities
322 Requires:       usbip-libs = %{version}-%{release}
323 # /lib/hwdata/usb.ids (note: only uncompressed file supported)
324 Requires:       hwdata >= 0.243-2
325
326 %description -n usbip
327 The USB/IP Project aims to develop a general USB device sharing system
328 over IP network. To share USB devices between computers with their
329 full functionality, USB/IP encapsulates "USB requests" into IP packets
330 and transmits them between computers. Original USB device drivers and
331 applications can be also used for remote USB devices without any
332 modification of them. A computer can use remote USB devices as if they
333 were directly attached; for example, we can:
334  - USB storage devices: fdisk, mkfs, mount/umount, file operations,
335    play a DVD movie and record a DVD-R media.
336  - USB keyboards and USB mice: use with Linux console and X Window
337    System.
338  - USB webcams and USB speakers: view webcam, capture image data and
339    play some music.
340  - USB printers, USB scanners, USB serial converters and USB Ethernet
341    interfaces: ok, use fine.
342
343 %description -n usbip -l pl.UTF-8
344 Projekt USB/IP ma na celu stworzenie ogólnego systemu współdzielenia
345 urządzeń USB po sieci IP. W celu współdzielenia urządzeń USB między
346 komputerami z zachowaniem pełnej funkcjonalności, USB/IP obudowuje
347 żądania SUB w pakiety IP i przesyła je między komputerami. Oryginalne
348 sterowniki urządzeń USB oraz aplikacje mogą być używane bez żadnych
349 modyfikacji. Komputer może wykorzystywać zdaln urządzenia USB tak,
350 jakby były podłączone bezpośrednio. Przykładowe możliwości:
351  - urządzenia USB do przechowywania danych: można używać programów
352    fdisk, mkfs, mount/umount, operacji na plikach, odtwarzać filmy
353    DVD oraz nagrywać nośniki DVD-R
354  - klawiatury i myszy USB: można ich używać na linuksowej konsoli oraz
355    w systemie X Window
356  - kamery i głośniki USB: można oglądać obraz z kamery, robić zdjęcia
357    i odtwarzać muzykę
358  - drukarki, skanery, konwertery portów szeregowych oraz interfejsy
359    sieciowe USB: można ich normalnie używać
360
361 %package -n usbip-libs
362 Summary:        USB/IP library
363 Summary(pl.UTF-8):      Biblioteka USB/IP
364 Group:          Libraries
365
366 %description -n usbip-libs
367 USB over IP library.
368
369 %description -n usbip-libs -l pl.UTF-8
370 Biblioteka USB po IP.
371
372 %package -n usbip-devel
373 Summary:        Header files for usbip library
374 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki usbip
375 Group:          Development/Libraries
376 Requires:       usbip-libs = %{version}-%{release}
377
378 %description -n usbip-devel
379 This package contains the header files needed to develop programs
380 which make use of USB/IP.
381
382 %description -n usbip-devel -l pl.UTF-8
383 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
384 wykorzystujących USB/IP.
385
386 %package -n usbip-static
387 Summary:        Static usbip library
388 Summary(pl.UTF-8):      Statyczna biblioteka usbip
389 Group:          Development/Libraries
390 Requires:       usbip-devel = %{version}-%{release}
391
392 %description -n usbip-static
393 Static usbip library.
394
395 %description -n usbip-static -l pl.UTF-8
396 Statyczna biblioteka usbip.
397
398 %prep
399 %setup -qc
400 cd linux-%{basever}
401
402 %if "%{postver}" != ".0"
403 %patch0 -p1
404 %endif
405
406 %patch1 -p1
407 %patch2 -p1
408 %patch3 -p1
409 %patch4 -p1
410 %patch5 -p1
411 %patch6 -p1
412 %patch7 -p1
413
414 %{__sed} -i -e '/^CFLAGS = /s/ -g / $(OPTFLAGS) /' tools/hv/Makefile
415 %{__sed} -i -e '/^CFLAGS+=/s/ -O1 / $(OPTFLAGS) /' tools/thermal/tmon/Makefile
416 %{__sed} -i -e 's#libexec/perf-core#share/perf-core#g' tools/perf/Makefile.config
417
418 # don't rebuild on make install
419 %{__sed} -i -e '/^\$(LIBBPF): FORCE/ s/FORCE$//' tools/bpf/bpftool/Makefile
420
421 %if %{without runqslower}
422 %{__sed} -i -e '/^all: / s/ runqslower//' \
423         -e '/^install: / s/ runqslower_install//' \
424         tools/bpf/Makefile
425 %endif
426
427 %build
428 Wstringop=""
429 Waddressof=""
430 %if "%{cc_version}" >= "8"
431 Wstringop="-Wno-error=stringop-truncation"
432 %endif
433 %if "%{cc_version}" >= "9"
434 Waddressof="-Wno-error=address-of-packed-member"
435 %endif
436 cd linux-%{basever}
437
438 # Simple Disk Sleep Monitor
439 %{__make} -C tools/laptop/dslm \
440         %{makeopts} \
441         EXTRA_CFLAGS="%{rpmcflags}"
442
443 # tools common (used eg. by tools/vm)
444 %{__make} -C tools/lib/api \
445         %{makeopts} \
446         EXTRA_CFLAGS="%{rpmcflags} $Wstringop"
447
448 # lsgpio
449 CFLAGS="%{rpmcflags}" \
450 %{__make} -C tools/gpio -j1 \
451         %{makeopts}
452
453 # HyperV is Windows based, x86 specific
454 %ifarch %{ix86} %{x8664} x32
455 %{__make} -C tools/hv \
456         CC="%{__cc}" \
457         OPTFLAGS="%{rpmcflags}"
458 %endif
459
460 CFLAGS="%{rpmcflags}" \
461 %{__make} -C tools/iio -j1 \
462         CC="%{__cc}" \
463         %{?with_verbose:V=1}
464
465 %{__make} -C tools/laptop/freefall \
466         CC="%{__cc}" \
467         CFLAGS="%{rpmcflags}"
468
469 # make bpftool first, top-level bpf CFLAGS cause includes conflict
470 CFLAGS="%{rpmcflags}" \
471 %{__make} -C tools/bpf/bpftool \
472         CC="%{__cc}" \
473         %{?with_verbose:V=1}
474
475 CFLAGS="%{rpmcflags}" \
476 %{__make} -C tools/bpf \
477         CC="%{__cc}" \
478         EXTRA_CFLAGS="%{rpmcflags}" \
479         %{?with_runqslower:VMLINUX_BTF=$(rpm -ql kernel-vmlinux | head -n 1)} \
480         %{?with_verbose:V=1}
481
482 # perf
483 %if %{with perf}
484 %{__make} -j1 -C tools/perf all man \
485 %ifarch %{x8664}
486         IS_X86_64=1 \
487         %{!?with_multilib:NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1} \
488 %endif
489         %{!?with_gtk:NO_GTK2=1} \
490         %{!?with_libunwind:NO_LIBUNWIND=1} \
491         %{makeopts} \
492         CFLAGS_OPTIMIZE="%{rpmcflags}" \
493         WERROR=0 \
494         prefix=%{_prefix} \
495         perfexecdir=%{_datadir}/perf-core \
496         lib=%{_lib} \
497         template_dir=%{_datadir}/perf-core/templates
498 %endif
499
500 # cpupower
501 %if %{with cpupower}
502 %{__make} -C tools/power/cpupower \
503         %{makeopts} \
504         CPUFREQ_BENCH=false \
505         OPTIMIZATION="%{rpmcflags}" \
506         STRIPCMD=true
507
508 %ifarch %{ix86} x32
509 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
510         CC="%{__cc}" \
511         CFLAGS="%{rpmcflags}"
512 %endif
513
514 %ifarch %{x8664} x32
515 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
516         CC="%{__cc}" \
517         CFLAGS="%{rpmcflags}"
518 %endif
519 %endif
520
521 %ifarch %{ix86} %{x8664} x32
522 CFLAGS="%{rpmcflags}" \
523 %{__make} -C tools/power/x86/x86_energy_perf_policy \
524         CC="%{__cc}"
525
526 CFLAGS="%{rpmcflags}" \
527 %{__make} -C tools/power/x86/turbostat \
528         CC="%{__cc}"
529 %endif
530
531 %{__make} -C tools/thermal/tmon \
532         CC="%{__cc}" \
533         OPTFLAGS="%{rpmcflags}"
534
535 # usbip-utils
536 %if %{with usbip}
537 cd tools/usb/usbip
538 %{__libtoolize}
539 %{__aclocal}
540 %{__autoconf}
541 %{__autoheader}
542 %{__automake}
543 %configure \
544         CFLAGS="%{rpmcflags} $Wstringop $Waddressof" \
545         --disable-silent-rules \
546         --with-usbids-dir=/lib/hwdata
547 %{__make}
548 cd ../../..
549 %endif
550
551 # page-types, slabinfo
552 %{__make} -C tools/vm page-types slabinfo \
553         CC="%{__cc}" \
554         CFLAGS="%{rpmcflags} -Wall -Wextra -I../lib"
555
556 # gen_init_cpio
557 %{__make} -C usr gen_init_cpio \
558         %{makeopts} \
559         CFLAGS="%{rpmcflags}"
560
561 %install
562 rm -rf $RPM_BUILD_ROOT
563
564 cd linux-%{basever}
565
566 %if %{with cpupower}
567 %{__make} -C tools/power/cpupower install \
568         DESTDIR=$RPM_BUILD_ROOT \
569         libdir=%{_libdir} \
570         mandir=%{_mandir} \
571         CPUFREQ_BENCH=false
572
573 %find_lang cpupower
574 %{__mv} cpupower.lang ..
575
576 install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
577 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
578 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
579
580 %ifarch %{ix86} x32
581 install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
582 %endif
583 %ifarch %{x8664} x32
584 install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
585 %endif
586 %endif
587
588 %if %{with perf}
589 %{__make} -C tools/perf install install-man \
590 %ifarch %{x8664}
591         IS_X86_64=1 \
592         %{!?with_multilib:NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1} \
593 %endif
594         %{!?with_gtk:NO_GTK2=1} \
595         %{!?with_libunwind:NO_LIBUNWIND=1} \
596         CC="%{__cc}" \
597         CFLAGS_OPTIMIZE="%{rpmcflags}" \
598         WERROR=0 \
599         %{?with_verbose:V=1} \
600         prefix=%{_prefix} \
601         perfexecdir=%{_datadir}/perf-core \
602         template_dir=%{_datadir}/perf-core/templates \
603         bash_compdir=%{bash_compdir} \
604         lib=%{_lib} \
605         DESTDIR=$RPM_BUILD_ROOT
606
607 %py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
608 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
609
610 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/perf-core/tests
611 %endif
612
613 %if %{with usbip}
614 %{__make} -C tools/usb/usbip install \
615         DESTDIR=$RPM_BUILD_ROOT
616
617 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libusbip.la
618 %endif
619
620 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8}
621
622 install -p tools/laptop/dslm/dslm $RPM_BUILD_ROOT%{_sbindir}
623
624 install -p tools/gpio/lsgpio $RPM_BUILD_ROOT%{_bindir}
625
626 %ifarch %{ix86} %{x8664} x32
627 install -p tools/hv/hv_{fcopy,kvp,vss}_daemon $RPM_BUILD_ROOT%{_sbindir}
628 # TODO: PLD-specific hv_get_dhcp_info,hv_get_dns_info,hv_set_ifconfig
629 %{__sed} -e '1s,/usr/bin/env python,%{__python},' tools/hv/lsvmbus >$RPM_BUILD_ROOT%{_bindir}/lsvmbus
630 chmod 755 $RPM_BUILD_ROOT%{_bindir}/lsvmbus
631 %endif
632
633 install -p tools/iio/{iio_event_monitor,iio_generic_buffer,lsiio} $RPM_BUILD_ROOT%{_bindir}
634
635 install -p tools/laptop/freefall/freefall $RPM_BUILD_ROOT%{_sbindir}
636
637 %{__make} -C tools/bpf install \
638         prefix=$RPM_BUILD_ROOT%{_prefix} \
639         bash_compdir=$RPM_BUILD_ROOT%{bash_compdir} \
640         %{?with_verbose:V=1}
641 %{__make} -C tools/bpf/bpftool doc-install \
642         prefix=$RPM_BUILD_ROOT%{_prefix} \
643         mandir=$RPM_BUILD_ROOT%{_mandir} \
644         %{?with_verbose:V=1}
645
646 install -p tools/thermal/tmon/tmon $RPM_BUILD_ROOT%{_bindir}
647 cp -p tools/thermal/tmon/tmon.8 $RPM_BUILD_ROOT%{_mandir}/man8
648
649 install -p tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
650 install -p tools/vm/page-types $RPM_BUILD_ROOT%{_sbindir}
651
652 %ifarch %{ix86} %{x8664} x32
653 install -d $RPM_BUILD_ROOT%{_mandir}/man8
654 %{__make} -C tools/power/x86/x86_energy_perf_policy install \
655         DESTDIR=$RPM_BUILD_ROOT
656
657 %{__make} -C tools/power/x86/turbostat install \
658         DESTDIR=$RPM_BUILD_ROOT
659 %endif
660
661 # gen_init_cpio
662 install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
663
664 # packaged in man-pages (5.02)
665 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man7/bpf-helpers.7*
666
667 %clean
668 rm -rf $RPM_BUILD_ROOT
669
670 %post   cpupower-libs -p /sbin/ldconfig
671 %postun cpupower-libs -p /sbin/ldconfig
672
673 %post cpupower
674 %systemd_post cpupower.service
675
676 %preun cpupower
677 %systemd_preun cpupower.service
678
679 %postun cpupower
680 %systemd_reload
681
682 %post   -n usbip-libs -p /sbin/ldconfig
683 %postun -n usbip-libs -p /sbin/ldconfig
684
685 %files
686 %defattr(644,root,root,755)
687 %attr(755,root,root) %{_bindir}/bpf_asm
688 %attr(755,root,root) %{_bindir}/bpf_dbg
689 %attr(755,root,root) %{_bindir}/bpf_jit_disasm
690 %attr(755,root,root) %{_bindir}/gen_init_cpio
691 %attr(755,root,root) %{_bindir}/iio_event_monitor
692 %attr(755,root,root) %{_bindir}/iio_generic_buffer
693 %attr(755,root,root) %{_bindir}/lsgpio
694 %attr(755,root,root) %{_bindir}/lsiio
695 %attr(755,root,root) %{_bindir}/slabinfo
696 %attr(755,root,root) %{_bindir}/tmon
697 %attr(755,root,root) %{_sbindir}/bpftool
698 %attr(755,root,root) %{_sbindir}/dslm
699 %attr(755,root,root) %{_sbindir}/freefall
700 %attr(755,root,root) %{_sbindir}/page-types
701 %{_mandir}/man8/bpftool*.8*
702 %{_mandir}/man8/tmon.8*
703 %ifarch %{ix86} %{x8664} x32
704 %attr(755,root,root) %{_bindir}/centrino-decode
705 %attr(755,root,root) %{_bindir}/powernow-k8-decode
706 %endif
707 %ifarch %{ix86} %{x8664} x32
708 %attr(755,root,root) %{_bindir}/turbostat
709 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
710 %{_mandir}/man8/turbostat.8*
711 %{_mandir}/man8/x86_energy_perf_policy.8*
712 %endif
713
714 %files cpupower -f cpupower.lang
715 %defattr(644,root,root,755)
716 %attr(755,root,root) %{_bindir}/cpupower
717 %{_mandir}/man1/cpupower*.1*
718 %{systemdunitdir}/cpupower.service
719 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
720
721 %files cpupower-libs
722 %defattr(644,root,root,755)
723 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
724 %attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
725
726 %files cpupower-libs-devel
727 %defattr(644,root,root,755)
728 %attr(755,root,root) %{_libdir}/libcpupower.so
729 %{_includedir}/cpufreq.h
730 %{_includedir}/cpuidle.h
731
732 %files -n bash-completion-cpupower
733 %defattr(644,root,root,755)
734 %{bash_compdir}/cpupower
735
736 %ifarch %{ix86} %{x8664} x32
737 %files hv
738 %defattr(644,root,root,755)
739 # TODO: PLDify these scripts and move to bindir
740 %doc linux-%{basever}/tools/hv/hv_{get_dhcp_info,get_dns_info,set_ifconfig}.sh
741 %attr(755,root,root) %{_bindir}/lsvmbus
742 %attr(755,root,root) %{_sbindir}/hv_fcopy_daemon
743 %attr(755,root,root) %{_sbindir}/hv_kvp_daemon
744 %attr(755,root,root) %{_sbindir}/hv_vss_daemon
745 %endif
746
747 %if %{with perf}
748 %files perf
749 %defattr(644,root,root,755)
750 %attr(755,root,root) %{_bindir}/perf
751 %attr(755,root,root) %{_bindir}/trace
752 %{_mandir}/man1/perf*.1*
753 %{_docdir}/perf-tip
754 %dir %{_datadir}/perf-core
755 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
756 %attr(755,root,root) %{_datadir}/perf-core/perf-with-kcore
757 %{_datadir}/perf-core/strace
758
759 %dir %{_datadir}/perf-core/scripts
760
761 %dir %{_datadir}/perf-core/scripts/perl
762 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
763 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
764 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
765 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
766 %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
767 %dir %{_datadir}/perf-core/scripts/perl/bin
768 %attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
769 %{_datadir}/perf-core/scripts/perl/*.pl
770
771 %dir %{_datadir}/perf-core/scripts/python
772 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
773 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
774 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
775 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
776 %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
777 %dir %{_datadir}/perf-core/scripts/python/bin
778 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
779 %{_datadir}/perf-core/scripts/python/*.py*
780
781 %dir %{_libdir}/traceevent
782 %dir %{_libdir}/traceevent/plugins
783 %attr(755,root,root) %{_libdir}/traceevent/plugins/plugin_*.so
784
785 %dir %{_prefix}/lib/perf
786 %{_prefix}/lib/perf/examples
787 %{_prefix}/lib/perf/include
788
789 %if %{with multilib}
790 %files perf-vdso32
791 %defattr(644,root,root,755)
792 %attr(755,root,root) %{_bindir}/perf-read-vdso32
793
794 %files perf-vdsox32
795 %defattr(644,root,root,755)
796 %attr(755,root,root) %{_bindir}/perf-read-vdsox32
797 %endif
798
799 %if %{with gtk}
800 %files perf-gtk
801 %defattr(644,root,root,755)
802 %attr(755,root,root) %{_libdir}/libperf-gtk.so
803 %endif
804
805 %files -n bash-completion-perf
806 %defattr(644,root,root,755)
807 /etc/bash_completion.d/perf
808 %endif
809
810 %files -n bash-completion-kernel-tools
811 %defattr(644,root,root,755)
812 %{bash_compdir}/bpftool
813
814 %if %{with usbip}
815 %files -n usbip
816 %defattr(644,root,root,755)
817 %doc linux-%{basever}/tools/usb/usbip/{AUTHORS,README}
818 %attr(755,root,root) %{_sbindir}/usbip
819 %attr(755,root,root) %{_sbindir}/usbipd
820 %{_mandir}/man8/usbip.8*
821 %{_mandir}/man8/usbipd.8*
822
823 %files -n usbip-libs
824 %defattr(644,root,root,755)
825 %attr(755,root,root) %{_libdir}/libusbip.so.*.*.*
826 %attr(755,root,root) %ghost %{_libdir}/libusbip.so.0
827
828 %files -n usbip-devel
829 %defattr(644,root,root,755)
830 %attr(755,root,root) %{_libdir}/libusbip.so
831 %{_includedir}/usbip
832
833 %files -n usbip-static
834 %defattr(644,root,root,755)
835 %{_libdir}/libusbip.a
836 %endif
This page took 0.123773 seconds and 3 git commands to generate.