rpms/kernel/devel kernel.spec,1.2065,1.2066 perf,1.6,NONE

roland roland at fedoraproject.org
Wed Jul 7 22:50:36 UTC 2010


Author: roland

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv18862

Modified Files:
	kernel.spec 
Removed Files:
	perf 
Log Message:
Revamp perf packaging.


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.2065
retrieving revision 1.2066
diff -u -p -r1.2065 -r1.2066
--- kernel.spec	7 Jul 2010 09:58:38 -0000	1.2065
+++ kernel.spec	7 Jul 2010 22:50:34 -0000	1.2066
@@ -110,8 +110,6 @@ Summary: The Linux kernel
 # kernel-firmware
 %define with_firmware  %{?_with_firmware:     1} %{?!_with_firmware:     0}
 # tools/perf
-%define with_perftool  %{?_without_perftool:  0} %{?!_without_perftool:  1}
-# perf noarch subpkg
 %define with_perf      %{?_without_perf:      0} %{?!_without_perf:      1}
 # kernel-debuginfo
 %define with_debuginfo %{?_without_debuginfo: 0} %{?!_without_debuginfo: 1}
@@ -131,6 +129,7 @@ Summary: The Linux kernel
 %define rawhide_skip_docs 1
 %if 0%{?rawhide_skip_docs}
 %define with_doc 0
+%define doc_build_fail true
 %endif
 
 # Additional options for user-friendly one-off kernel building:
@@ -246,7 +245,7 @@ Summary: The Linux kernel
 %endif
 %define with_smp 0
 %define with_pae 0
-%define with_perftool 0
+%define with_perf 0
 %endif
 
 %define all_x86 i386 i686
@@ -271,13 +270,13 @@ Summary: The Linux kernel
 # only package docs noarch
 %ifnarch noarch
 %define with_doc 0
-%define with_perf 0
 %endif
 
 # don't build noarch kernels or headers (duh)
 %ifarch noarch
 %define with_up 0
 %define with_headers 0
+%define with_perf 0
 %define all_arch_configs kernel-%{version}-*.config
 %define with_firmware  %{?_with_firmware:     1} %{?!_with_firmware:     0}
 %endif
@@ -334,7 +333,7 @@ Summary: The Linux kernel
 %define make_target image
 %define kernel_image arch/sparc/boot/image
 %define image_install_path boot
-%define with_perftool 0
+%define with_perf 0
 %endif
 
 %ifarch ppc
@@ -396,7 +395,7 @@ Summary: The Linux kernel
 %define with_smp 0
 %define with_pae 0
 %define with_debuginfo 0
-%define with_perftool 0
+%define with_perf 0
 %define _enable_debug_packages 0
 %endif
 
@@ -454,9 +453,6 @@ Requires(pre): %{initrd_prereq}\
 Requires(pre): kernel-firmware >= %{rpmversion}-%{pkg_release}\
 %else\
 Requires(pre): linux-firmware\
-%if %{with_perftool}\
-Requires(pre): elfutils-libs\
-%endif\
 %endif\
 Requires(post): /sbin/new-kernel-pkg\
 Requires(preun): /sbin/new-kernel-pkg\
@@ -500,7 +496,7 @@ BuildRequires: xmlto, asciidoc
 %if %{with_sparse}
 BuildRequires: sparse >= 0.4.1
 %endif
-%if %{with_perftool}
+%if %{with_perf}
 BuildRequires: elfutils-devel zlib-devel binutils-devel
 %endif
 BuildConflicts: rhbuildsys(DiskFree) < 500Mb
@@ -548,8 +544,6 @@ Source90: config-sparc64-generic
 
 Source100: config-arm
 
-Source200: perf
-
 # Here should be only the patches up to the upstream canonical Linus tree.
 
 # For a stable release kernel
@@ -761,13 +755,15 @@ Group: Development/Debug
 This package is required by %{name}-debuginfo subpackages.
 It provides the kernel source files common to all builds.
 
+%if %{with_perf}
 %package -n perf
 Summary: Performance monitoring for the Linux kernel
 Group: Development/System
 License: GPLv2
 %description -n perf
-This package provides the supporting documentation for the perf tool
-shipped in each kernel image subpackage.
+This package provides the perf tool and the supporting documentation.
+%endif
+
 
 #
 # This macro creates a kernel-<subpackage>-debuginfo package.
@@ -1374,14 +1370,6 @@ BuildKernel() {
     make -s ARCH=$Arch V=1 %{?_smp_mflags} $MakeTarget %{?sparse_mflags}
     make -s ARCH=$Arch V=1 %{?_smp_mflags} modules %{?sparse_mflags} || exit 1
 
-%if %{with_perftool}
-    pushd tools/perf
-    make -s V=1 NO_DEMANGLE=1 %{?_smp_mflags} perf
-    mkdir -p $RPM_BUILD_ROOT/usr/libexec/
-    install -m 755 perf $RPM_BUILD_ROOT/usr/libexec/perf.$KernelVer
-    popd
-%endif
-
     # Start installing the results
 %if %{with_debuginfo}
     mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/boot
@@ -1538,6 +1526,7 @@ BuildKernel() {
 # prepare directories
 rm -rf $RPM_BUILD_ROOT
 mkdir -p $RPM_BUILD_ROOT/boot
+mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
 
 cd linux-%{kversion}.%{_target_cpu}
 
@@ -1561,6 +1550,13 @@ BuildKernel %make_target %kernel_image
 BuildKernel %make_target %kernel_image smp
 %endif
 
+%global perf_make \
+  make %{?_smp_mflags} -C tools/perf -s V=1 NO_DEMANGLE=1 prefix=%{_prefix}
+%if %{with_perf}
+%{perf_make} all
+%{perf_make} man || %{doc_build_fail}
+%endif
+
 %if %{with_doc}
 # Make the HTML and man pages.
 make %{?_smp_mflags} htmldocs mandocs || %{doc_build_fail}
@@ -1570,12 +1566,6 @@ chmod -R a=rX Documentation
 find Documentation -type d | xargs chmod u+w
 %endif
 
-%if %{with_perf}
-pushd tools/perf
-make %{?_smp_mflags} man || %{doc_build_fail}
-popd
-%endif
-
 ###
 ### Special hacks for debuginfo subpackages.
 ###
@@ -1620,27 +1610,12 @@ xargs -0 --no-run-if-empty %{__install} 
 ls $man9dir | grep -q '' || > $man9dir/BROKEN
 %endif # with_doc
 
-# perf docs
 %if %{with_perf}
-mandir=$RPM_BUILD_ROOT%{_datadir}/man
-man1dir=$mandir/man1
-pushd tools/perf/Documentation
-make install-man mandir=$mandir
-popd
-
-pushd $man1dir
-for d in *.1; do
- gzip $d;
-done
-popd
-%endif # with_perf
+# perf tool binary and supporting scripts/binaries
+%{perf_make} DESTDIR=$RPM_BUILD_ROOT install
 
-# perf shell wrapper
-%if %{with_perf}
-mkdir -p $RPM_BUILD_ROOT/usr/sbin/
-cp $RPM_SOURCE_DIR/perf $RPM_BUILD_ROOT/usr/sbin/perf
-chmod 0755 $RPM_BUILD_ROOT/usr/sbin/perf
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/perf
+# perf man pages (note: implicit rpm magic compresses them later)
+%{perf_make} DESTDIR=$RPM_BUILD_ROOT install-man || %{doc_build_fail}
 %endif
 
 %if %{with_headers}
@@ -1801,9 +1776,10 @@ fi
 %if %{with_perf}
 %files -n perf
 %defattr(-,root,root)
-%{_datadir}/doc/perf
-/usr/sbin/perf
-%{_datadir}/man/man1/*
+%{_bindir}/perf
+%dir %{_libexecdir}/perf-core
+%{_libexecdir}/perf-core/*
+%{_mandir}/man[1-8]/*
 %endif
 
 # This is %{image_install_path} on an arch where that includes ELF files,
@@ -1821,9 +1797,6 @@ fi
 %defattr(-,root,root)\
 /%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?2:.%{2}}\
 /boot/System.map-%{KVERREL}%{?2:.%{2}}\
-%if %{with_perftool}\
-/usr/libexec/perf.%{KVERREL}%{?2:.%{2}}\
-%endif\
 #/boot/symvers-%{KVERREL}%{?2:.%{2}}.gz\
 /boot/config-%{KVERREL}%{?2:.%{2}}\
 %dir /lib/modules/%{KVERREL}%{?2:.%{2}}\
@@ -1883,6 +1856,9 @@ fi
 #                 ||     ||
 
 %changelog
+* Wed Jul  7 2010 Roland McGrath <roland at redhat.com> 2.6.35-0.29.rc4.git0.fc14
+- Revamp perf packaging.
+
 * Wed Jul 07 2010 Chuck Ebbert <cebbert at redhat.com>
 - pci-acpi-disable-aspm-if-no-osc.patch, pci-aspm-dont-enable-too-early.patch
   PCI layer fixes for problems with hardware that doesn't support ASPM.
@@ -1964,7 +1940,7 @@ fi
 
 * Mon Jun 21 2010 Kyle McMartin <kyle at redhat.com> 2.6.34-45
 - drm-revert-drm-fbdev-rework-output-polling-to-be-back-in-core.patch
-  Revert eb1f8e4f, bisected by Nicolas Kaiser. Thanks! (rhbz#599190) 
+  Revert eb1f8e4f, bisected by Nicolas Kaiser. Thanks! (rhbz#599190)
   (If this works, will try to root-cause.)
 - rebase previous patch on top of above reversion
 
@@ -2015,7 +1991,7 @@ fi
 * Sun Jun 13 2010 Kyle McMartin <kyle at redhat.com> 2.6.34-33
 - Update drm-next to include fixes since 2.6.35-rc1.
 
-* Fri Jun 11 2010 Justin M. Forbes <jforbes at redhat.com> 
+* Fri Jun 11 2010 Justin M. Forbes <jforbes at redhat.com>
 - Disable xsave for so that kernel will boot on ancient EC2 hosts.
 
 * Wed Jun 09 2010 John W. Linville <linville at redhat.com>


--- perf DELETED ---



More information about the scm-commits mailing list