diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index d299ef252..33f4241fd 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -51,6 +51,13 @@ class gencontrol(Gencontrol): main = self.templates["control.main"] packages.extend(self.process_packages(main, self.vars)) + def substitute_file(template, target): + with codecs.open(target, 'w', 'utf-8') as f: + f.write(self.substitute(self.templates[template], self.vars)) + substitute_file('lintian-overrides.perf', + 'debian/linux-perf-%s.lintian-overrides' % + self.vars['version']) + def process_changelog(self): changelog = Changelog(version = VersionLinux) self.version = version = changelog[0].version diff --git a/debian/changelog b/debian/changelog index be3315833..b6602c184 100644 --- a/debian/changelog +++ b/debian/changelog @@ -43,6 +43,29 @@ linux-tools (4.5~rc5-1~exp1) experimental; urgency=medium -- Ben Hutchings Sun, 21 Feb 2016 16:45:52 +0000 +linux-tools (4.4.6-1) unstable; urgency=medium + + * New upstream stable update: + - tools lib traceevent: Fix output of %llu for 64 bit values read on + 32 bit machines + - perf tools: tracepoint_error() can receive e=NULL, robustify it + - perf kvm record/report: 'unprocessable sample' error while + recording/reporting guest data + - tools: hv: vss: fix the write()'s argument: error -> vss_msg + - uapi: update install list after nvme.h rename + - perf stat: Do not clean event's private stats + + [ Mattia Dongili ] + * Build linux-cpupower. + + [ Ben Hutchings ] + * debian/control: Update policy version to 3.9.7; no changes required + * linux-perf: Override lintian errors for perf-read-vdso{,x}32 in + 64-bit packages + * debian/copyright: Move GPL-2 boilerplate to its own paragraph + + -- Ben Hutchings Sun, 20 Mar 2016 16:23:48 +0000 + linux-tools (4.4-4) unstable; urgency=medium * hyperv-daemons: Only build the progarams on x86 (fixes FTBFS) diff --git a/debian/copyright b/debian/copyright index 7ba027e84..6016868e6 100644 --- a/debian/copyright +++ b/debian/copyright @@ -11,21 +11,6 @@ Comment: Files: * Copyright: 1991-2012 Linus Torvalds and many others License: GPL-2 - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - . - On Debian systems, the complete text of the GNU General Public License version - 2 can be found in `/usr/share/common-licenses/GPL-2'. Files: debian/* Copyright: 2006-2012 Debian kernel team @@ -49,3 +34,20 @@ License: LGPL-2.1 . On Debian systems, the complete text of the GNU Lesser General Public License version 2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'. + +License: GPL-2 + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + . + On Debian systems, the complete text of the GNU General Public License version + 2 can be found in `/usr/share/common-licenses/GPL-2'. diff --git a/debian/libcpupower-dev.install b/debian/libcpupower-dev.install new file mode 100644 index 000000000..b34190552 --- /dev/null +++ b/debian/libcpupower-dev.install @@ -0,0 +1,2 @@ +usr/include/* +usr/lib/lib*.so diff --git a/debian/libcpupower0.install b/debian/libcpupower0.install new file mode 100644 index 000000000..d0dbfd18a --- /dev/null +++ b/debian/libcpupower0.install @@ -0,0 +1 @@ +usr/lib/lib*.so.* diff --git a/debian/libcpupower0.symbols b/debian/libcpupower0.symbols new file mode 100644 index 000000000..a356760d1 --- /dev/null +++ b/debian/libcpupower0.symbols @@ -0,0 +1,44 @@ +libcpupower.so.0 libcpupower0 #MINVER# + cpufreq_cpu_exists@Base 4.4 + cpufreq_get_affected_cpus@Base 4.4 + cpufreq_get_available_frequencies@Base 4.4 + cpufreq_get_available_governors@Base 4.4 + cpufreq_get_driver@Base 4.4 + cpufreq_get_freq_hardware@Base 4.4 + cpufreq_get_freq_kernel@Base 4.4 + cpufreq_get_hardware_limits@Base 4.4 + cpufreq_get_policy@Base 4.4 + cpufreq_get_related_cpus@Base 4.4 + cpufreq_get_stats@Base 4.4 + cpufreq_get_transition_latency@Base 4.4 + cpufreq_get_transitions@Base 4.4 + cpufreq_modify_policy_governor@Base 4.4 + cpufreq_modify_policy_max@Base 4.4 + cpufreq_modify_policy_min@Base 4.4 + cpufreq_put_affected_cpus@Base 4.4 + cpufreq_put_available_frequencies@Base 4.4 + cpufreq_put_available_governors@Base 4.4 + cpufreq_put_driver@Base 4.4 + cpufreq_put_policy@Base 4.4 + cpufreq_put_related_cpus@Base 4.4 + cpufreq_put_stats@Base 4.4 + cpufreq_set_frequency@Base 4.4 + cpufreq_set_policy@Base 4.4 + sysfs_cpu_exists@Base 4.4 + sysfs_get_available_frequencies@Base 4.4 + sysfs_get_freq_affected_cpus@Base 4.4 + sysfs_get_freq_available_governors@Base 4.4 + sysfs_get_freq_driver@Base 4.4 + sysfs_get_freq_hardware@Base 4.4 + sysfs_get_freq_hardware_limits@Base 4.4 + sysfs_get_freq_kernel@Base 4.4 + sysfs_get_freq_policy@Base 4.4 + sysfs_get_freq_related_cpus@Base 4.4 + sysfs_get_freq_stats@Base 4.4 + sysfs_get_freq_transition_latency@Base 4.4 + sysfs_get_freq_transitions@Base 4.4 + sysfs_modify_freq_policy_governor@Base 4.4 + sysfs_modify_freq_policy_max@Base 4.4 + sysfs_modify_freq_policy_min@Base 4.4 + sysfs_set_freq_policy@Base 4.4 + sysfs_set_frequency@Base 4.4 diff --git a/debian/linux-cpupower.install b/debian/linux-cpupower.install new file mode 100644 index 000000000..21cca7cd9 --- /dev/null +++ b/debian/linux-cpupower.install @@ -0,0 +1,2 @@ +usr/bin +usr/share/ diff --git a/debian/patches/power-cpupower-fix-manpages-NAME.patch b/debian/patches/power-cpupower-fix-manpages-NAME.patch new file mode 100644 index 000000000..ee9534a8b --- /dev/null +++ b/debian/patches/power-cpupower-fix-manpages-NAME.patch @@ -0,0 +1,62 @@ +From: Mattia Dongili +Date: Fri, 19 Feb 2016 07:46:32 -0800 +Subject: Fix cpupower manpages "NAME" section +Forwarded: http://article.gmane.org/gmane.linux.power-management.general/73191 + +The token before "-" should be the program name, no spaces allowed. +See man(7) and lexgrog(1). + +Signed-off-by: Mattia Dongili +--- +diff --git a/tools/power/cpupower/man/cpupower-frequency-info.1 b/tools/power/cpupower/man/cpupower-frequency-info.1 +index 9c85a38..6aa8d23 100644 +--- a/tools/power/cpupower/man/cpupower-frequency-info.1 ++++ b/tools/power/cpupower/man/cpupower-frequency-info.1 +@@ -1,7 +1,7 @@ + .TH "CPUPOWER\-FREQUENCY\-INFO" "1" "0.1" "" "cpupower Manual" + .SH "NAME" + .LP +-cpupower frequency\-info \- Utility to retrieve cpufreq kernel information ++cpupower\-frequency\-info \- Utility to retrieve cpufreq kernel information + .SH "SYNTAX" + .LP + cpupower [ \-c cpulist ] frequency\-info [\fIoptions\fP] +diff --git a/tools/power/cpupower/man/cpupower-frequency-set.1 b/tools/power/cpupower/man/cpupower-frequency-set.1 +index 3eacc8d..b505702 100644 +--- a/tools/power/cpupower/man/cpupower-frequency-set.1 ++++ b/tools/power/cpupower/man/cpupower-frequency-set.1 +@@ -1,7 +1,7 @@ + .TH "CPUPOWER\-FREQUENCY\-SET" "1" "0.1" "" "cpupower Manual" + .SH "NAME" + .LP +-cpupower frequency\-set \- A small tool which allows to modify cpufreq settings. ++cpupower\-frequency\-set \- A small tool which allows to modify cpufreq settings. + .SH "SYNTAX" + .LP + cpupower [ \-c cpu ] frequency\-set [\fIoptions\fP] +diff --git a/tools/power/cpupower/man/cpupower-idle-info.1 b/tools/power/cpupower/man/cpupower-idle-info.1 +index 7b3646a..80a1311 100644 +--- a/tools/power/cpupower/man/cpupower-idle-info.1 ++++ b/tools/power/cpupower/man/cpupower-idle-info.1 +@@ -1,7 +1,7 @@ + .TH "CPUPOWER-IDLE-INFO" "1" "0.1" "" "cpupower Manual" + .SH "NAME" + .LP +-cpupower idle\-info \- Utility to retrieve cpu idle kernel information ++cpupower\-idle\-info \- Utility to retrieve cpu idle kernel information + .SH "SYNTAX" + .LP + cpupower [ \-c cpulist ] idle\-info [\fIoptions\fP] +diff --git a/tools/power/cpupower/man/cpupower-idle-set.1 b/tools/power/cpupower/man/cpupower-idle-set.1 +index 580c4e3..21916cf 100644 +--- a/tools/power/cpupower/man/cpupower-idle-set.1 ++++ b/tools/power/cpupower/man/cpupower-idle-set.1 +@@ -1,7 +1,7 @@ + .TH "CPUPOWER-IDLE-SET" "1" "0.1" "" "cpupower Manual" + .SH "NAME" + .LP +-cpupower idle\-set \- Utility to set cpu idle state specific kernel options ++cpupower\-idle\-set \- Utility to set cpu idle state specific kernel options + .SH "SYNTAX" + .LP + cpupower [ \-c cpulist ] idle\-info [\fIoptions\fP] diff --git a/debian/patches/series b/debian/patches/series index 59c555c35..57f129f18 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -19,3 +19,4 @@ perf-tools-fix-unused-variables-x86_-32-64-_regoffse.patch revert-perf-tools-x86-build-perf-on-older-user-space.patch lockdep-add-missing-macros.patch tools-build-remove-bpf-run-time-check-at-build-time.patch +power-cpupower-fix-manpages-NAME.patch diff --git a/debian/rules.d/tools/Makefile b/debian/rules.d/tools/Makefile index e99cdca33..371c9f54e 100644 --- a/debian/rules.d/tools/Makefile +++ b/debian/rules.d/tools/Makefile @@ -2,6 +2,7 @@ SUBDIRS = \ hv \ lib/lockdep \ perf \ + power/cpupower \ usb/usbip include $(top_rulesdir)/Makefile.inc diff --git a/debian/rules.d/tools/power/cpupower/Makefile b/debian/rules.d/tools/power/cpupower/Makefile new file mode 100644 index 000000000..66e2c75aa --- /dev/null +++ b/debian/rules.d/tools/power/cpupower/Makefile @@ -0,0 +1,20 @@ +OUTDIR = tools/power/cpupower +prefix = /usr/sbin + +include ../../../Makefile.inc + +ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + DEBUG = true +endif + +all: + mkdir out + $(shell dpkg-buildflags --export=cmdline) $(MAKE) -C $(top_srcdir)/tools/power/cpupower -f Makefile O=$(CURDIR)/out DEBUG=$(DEBUG) CPUFREQ_BENCH=false V=true + +install: + $(MAKE) -C $(top_srcdir)/tools/power/cpupower -f Makefile O=$(CURDIR)/out install mandir=/usr/share/man DESTDIR=$(DESTDIR) CPUFREQ_BENCH=false + +clean: + mkdir -p out + $(MAKE) -C $(top_srcdir)/tools/power/cpupower -f Makefile O=$(CURDIR)/out clean + rm -rf out diff --git a/debian/rules.real b/debian/rules.real index 08391bae9..6338c7091 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -7,7 +7,7 @@ define submake +mkdir -p $(BUILD_DIR)/$(1) && $(MAKE) -C $(BUILD_DIR)/$(1) -f $(CURDIR)/debian/rules.d/$(1)/Makefile top_srcdir=$(CURDIR) top_rulesdir=$(CURDIR)/debian/rules.d OUTDIR=$(1) endef -binary-arch: install-kbuild install-usbip install-liblockdep +binary-arch: install-kbuild install-usbip install-liblockdep install-cpupower ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) binary-arch: install-perf endif @@ -47,6 +47,27 @@ install-kbuild: $(STAMPS_DIR)/build dh_md5sums dh_builddeb + +install-cpupower: DH_OPTIONS = -plinux-cpupower -plibcpupower0 -plibcpupower-dev +install-cpupower: DIR = $(CURDIR)/debian/cpupower-tmp +install-cpupower: $(STAMPS_DIR)/build + dh_testdir + dh_testroot + dh_prep + $(MAKE) -C $(BUILD_DIR)/tools/power/cpupower install top_srcdir=$(CURDIR) DESTDIR=$(DIR) + dh_install --sourcedir=$(DIR) + dh_installchangelogs + dh_installdocs + dh_strip + dh_compress + dh_fixperms + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + install-perf: PACKAGE_NAME = linux-perf-$(VERSION) install-perf: DH_OPTIONS = -p$(PACKAGE_NAME) install-perf: DIR = $(CURDIR)/debian/$(PACKAGE_NAME) @@ -59,6 +80,7 @@ install-perf: $(STAMPS_DIR)/build dh_python2 /usr/share/perf_$(VERSION)-core/scripts/python/Perf-Trace-Util/lib/ dh_installchangelogs dh_installdocs + dh_lintian dh_strip dh_compress dh_fixperms diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 9da6d26ef..3b9372292 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -5,6 +5,35 @@ Multi-Arch: foreign Description: Kbuild infrastructure for Linux @version@ This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. +Package: linux-cpupower +Section: admin +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: CPU frequency and voltage scaling tools for Linux + This package contains the 'power/cpupower' tools for Linux. + . + This set of userspace tools allow inspection and control of cpufreq and + cpuidle tunables for hardware that support these features. + The "cpupower" command replaces "cpufreq-info" and "cpufreq-set" in + cpufrequtils. + +Package: libcpupower0 +Section: libs +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: CPU frequency and voltage scaling tools for Linux (libraries) + This package contains the shared library. + +Package: libcpupower-dev +Section: libdevel +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Provides: libcpufreq-dev +Conflicts: libcpufreq-dev +Replaces: libcpufreq-dev +Description: CPU frequency and voltage scaling tools for Linux (development files) + This package contains the 'power/cpupower' headers and library shared objects. + Package: linux-perf-@version@ Section: devel Architecture: alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 791ec51ca..d53e8b26b 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -3,11 +3,11 @@ Section: kernel Priority: optional Maintainer: Debian Kernel Team Uploaders: Bastian Blank , Ben Hutchings , Jonathan Nieder -Standards-Version: 3.9.6 +Standards-Version: 3.9.7 Build-Depends: debhelper (>> 7), python3, asciidoc, bison, flex, gcc-multilib [amd64 ppc64 s390x sparc64], libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, - autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev, + autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev, libpci-dev, dh-python, dh-systemd Vcs-Git: https://anonscm.debian.org/git/kernel/linux-tools.git Vcs-Browser: https://anonscm.debian.org/cgit/kernel/linux-tools.git diff --git a/debian/templates/lintian-overrides.perf.in b/debian/templates/lintian-overrides.perf.in new file mode 100644 index 000000000..858faa782 --- /dev/null +++ b/debian/templates/lintian-overrides.perf.in @@ -0,0 +1,3 @@ +# These executables are needed to handle processes running in compat mode +linux-perf-@version@: binary-from-other-architecture usr/lib/perf_@version@-core/perf-read-vdso32 +linux-perf-@version@: binary-from-other-architecture usr/lib/perf_@version@-core/perf-read-vdsox32