[kernel] r15932 - in dists/sid/linux-2.6/debian: . bin templates

Ben Hutchings benh at alioth.debian.org
Sun Jul 4 17:08:19 UTC 2010


Author: benh
Date: Sun Jul  4 17:08:13 2010
New Revision: 15932

Log:
Add linux-tools-<version> package containing the perf tool (Closes: #548715)

Added:
   dists/sid/linux-2.6/debian/bin/perf
   dists/sid/linux-2.6/debian/perf.1
Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/rules
   dists/sid/linux-2.6/debian/rules.real
   dists/sid/linux-2.6/debian/templates/control.main.in
   dists/sid/linux-2.6/debian/templates/control.source.in

Added: dists/sid/linux-2.6/debian/bin/perf
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/bin/perf	Sun Jul  4 17:08:13 2010	(r15932)
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# Execute the right version of perf for the current kernel.
+version="$(uname -r)"
+version="${version%%-*}"
+shopt -s execfail
+exec "perf_$version" "$@"
+
+# Not found? Tell the user which package to install.
+echo >&2 "E: linux-tools-$version is not installed."
+exit 1

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	Sun Jul  4 09:34:14 2010	(r15931)
+++ dists/sid/linux-2.6/debian/changelog	Sun Jul  4 17:08:13 2010	(r15932)
@@ -56,6 +56,8 @@
       not called wlan0 (Closes: #582972)
     - Correct device ID table (Closes: #584945, #587985)
   * Add r8192u_usb driver
+  * Add linux-tools-<version> package containing the perf tool
+    (Closes: #548715)
 
   [ Aurelien Jarno ]
   * [sh4] fix sh_tmu clocksource following recent nohz changes.

Added: dists/sid/linux-2.6/debian/perf.1
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/perf.1	Sun Jul  4 17:08:13 2010	(r15932)
@@ -0,0 +1,19 @@
+.TH PERF 1 "4 July 2010"
+.SH NAME
+perf \- performance analysis tools for Linux
+.SH SYNOPSIS
+.HP
+\fBperf\fR [\fB\-\-version\fR] [\fB\-\-help\fR] \fICOMMAND\fR [\fIARGS\fR]
+.SH DESCRIPTION
+.LP
+Performance counters for Linux are are a new kernel\-based subsystem
+that provide a framework for all things performance analysis.  It
+covers hardware level (CPU/PMU, Performance Monitoring Unit) features
+and software features (software counters, tracepoints) as well.
+.LP
+Each version of the perf tools may depend on new kernel features, so
+you must install a different version for each kernel version.  The
+\fBperf\fR command will automatically run the correct version for the
+running kernel version.
+.SH SEE ALSO
+perf_\fIversion\fR(1)

Modified: dists/sid/linux-2.6/debian/rules
==============================================================================
--- dists/sid/linux-2.6/debian/rules	Sun Jul  4 09:34:14 2010	(r15931)
+++ dists/sid/linux-2.6/debian/rules	Sun Jul  4 17:08:13 2010	(r15932)
@@ -56,7 +56,7 @@
 
 clean: debian/control
 	dh_testdir
-	rm -rf $(BUILD_DIR) $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc debian/linux-headers-* debian/linux-image-*
+	rm -rf $(BUILD_DIR) $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc debian/linux-headers-* debian/linux-image-* debian/linux-tools-*
 	dh_clean
 
 binary-indep: $(STAMPS_DIR)/source-base

Modified: dists/sid/linux-2.6/debian/rules.real
==============================================================================
--- dists/sid/linux-2.6/debian/rules.real	Sun Jul  4 09:34:14 2010	(r15931)
+++ dists/sid/linux-2.6/debian/rules.real	Sun Jul  4 17:08:13 2010	(r15932)
@@ -32,12 +32,14 @@
 MAKE_CLEAN = $(setup_env) $(MAKE)
 MAKE_SELF := $(MAKE) -f debian/rules.real $(MAKEOVERRIDES)
 MAKEOVERRIDES =
+MAKE_PERF_VARS = prefix=/usr NO_PERL=1 MBITS=
 
 #
 # Targets
 #
 binary-arch-arch: install-headers_$(ARCH)
 binary-arch-arch: install-libc-dev_$(ARCH)
+binary-arch-arch: install-tools_$(ARCH)
 binary-arch-featureset: install-headers_$(ARCH)_$(FEATURESET)
 binary-arch-flavour: install-image_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_$(TYPE)
 ifeq ($(DEBUG),True)
@@ -133,6 +135,14 @@
 	python debian/bin/buildcheck.py $(DIR) $(ARCH) $(FEATURESET) $(FLAVOUR)
 	@$(stamp)
 
+$(STAMPS_DIR)/build-tools_$(ARCH): SOURCE_DIR=$(BUILD_DIR)/source
+$(STAMPS_DIR)/build-tools_$(ARCH): DIR=$(BUILD_DIR)/build-tools_$(ARCH)
+$(STAMPS_DIR)/build-tools_$(ARCH): $(STAMPS_DIR)/source
+	rm -rf $(DIR)
+	cp -al $(SOURCE_DIR) $(DIR)
+	+$(MAKE_CLEAN) -C '$(DIR)/tools/perf' $(JOBS_ARG) $(MAKE_PERF_VARS) all man
+	@$(stamp)
+
 $(STAMPS_DIR)/build-doc: SOURCE_DIR=$(BUILD_DIR)/source
 $(STAMPS_DIR)/build-doc: DIR=$(BUILD_DIR)/build-doc
 $(STAMPS_DIR)/build-doc: $(STAMPS_DIR)/source
@@ -468,6 +478,27 @@
 endif
 	+$(MAKE_SELF) install-base BUILDDEB_ARGS="-Zbzip2"
 
+install-tools_$(ARCH): PACKAGE_NAME = linux-tools-$(UPSTREAMVERSION)
+install-tools_$(ARCH): PACKAGE_DIR = debian/$(PACKAGE_NAME)
+install-tools_$(ARCH): DIR = $(BUILD_DIR)/build-tools_$(ARCH)
+install-tools_$(ARCH): DH_OPTIONS = -p$(PACKAGE_NAME)
+install-tools_$(ARCH): $(STAMPS_DIR)/build-tools_$(ARCH)
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs usr/bin
+	+$(MAKE_CLEAN) -C '$(DIR)/tools/perf' $(MAKE_PERF_VARS) \
+		DESTDIR='$(CURDIR)/$(PACKAGE_DIR)' install install-man
+	# Rename command and manual pages to include version
+	mv $(PACKAGE_DIR)/usr/bin/perf $(PACKAGE_DIR)/usr/bin/perf_$(UPSTREAMVERSION)
+	for manpage in $(PACKAGE_DIR)/usr/share/man/*/*; do \
+		mv "$$manpage" "$$(echo "$$manpage" | sed 's,/perf,&_$(UPSTREAMVERSION),')" || exit; \
+	done
+	# Fix up cross-references
+	sed -i '/^\.SH "SEE ALSO"/,/^\.SH/ { s/perf-/perf_$(UPSTREAMVERSION)-/g }' \
+		$(PACKAGE_DIR)/usr/share/man/*/*
+	+$(MAKE_SELF) install-base
+
 install-patch: PACKAGE = linux-patch-debian-$(VERSION)
 install-patch: pbase := /usr/src/kernel-patches/all/$(UPSTREAMVERSION)
 install-patch: pfull := debian/$(PACKAGE)$(pbase)
@@ -510,7 +541,8 @@
 	dh_testdir
 	dh_testroot
 	dh_prep
-	dh_install -X.svn
+	dh_install debian/bin/perf /usr/bin
+	dh_installman debian/perf.1
 	dh_installdebconf
 	+$(MAKE_SELF) install-base
 

Modified: dists/sid/linux-2.6/debian/templates/control.main.in
==============================================================================
--- dists/sid/linux-2.6/debian/templates/control.main.in	Sun Jul  4 09:34:14 2010	(r15931)
+++ dists/sid/linux-2.6/debian/templates/control.main.in	Sun Jul  4 17:08:13 2010	(r15932)
@@ -1,3 +1,15 @@
+Package: linux-tools- at version@
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: linux-base (>= 2.6.32-16)
+Suggests: linux-doc- at version@
+Description: Performance analysis tools for Linux @upstreamversion@
+ This package contains the 'perf' performance analysis tools for Linux
+ kernel version @upstreamversion at .
+ .
+ The linux-base package contains a 'perf' command which will invoke the
+ appropriate version for the running kernel.
+
 Package: linux-source- at version@
 Architecture: all
 Section: kernel

Modified: dists/sid/linux-2.6/debian/templates/control.source.in
==============================================================================
--- dists/sid/linux-2.6/debian/templates/control.source.in	Sun Jul  4 09:34:14 2010	(r15931)
+++ dists/sid/linux-2.6/debian/templates/control.source.in	Sun Jul  4 17:08:13 2010	(r15932)
@@ -3,7 +3,7 @@
 Maintainer: Debian Kernel Team <debian-kernel at lists.debian.org>
 Uploaders: Bastian Blank <waldi at debian.org>, Frederik Schüler <fs at debian.org>, maximilian attems <maks at debian.org>, Ben Hutchings <ben at decadent.org.uk>
 Standards-Version: 3.8.4
-Build-Depends: debhelper (>> 7), cpio, module-init-tools, python, lzma [armel]
-Build-Depends-Indep: bzip2, python-support, xmlto
+Build-Depends: debhelper (>> 7), cpio, module-init-tools, python, lzma [armel], libelf-dev, asciidoc, xmlto
+Build-Depends-Indep: bzip2, python-support
 Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/sid/linux-2.6/
 Vcs-Browser: http://svn.debian.org/wsvn/kernel/dists/sid/linux-2.6/?op=log



More information about the Kernel-svn-changes mailing list