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