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