Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #52899 > unrolled thread
| Started by | malattia@gmail.com |
|---|---|
| First post | 2016-02-19 08:30 +0100 |
| Last post | 2016-03-01 15:50 +0100 |
| Articles | 7 — 3 participants |
Back to article view | Back to linux.debian.kernel
[PATCH 1/1] Build tools from power/cpupower malattia@gmail.com - 2016-02-19 08:30 +0100
Re: [PATCH 1/1] Build tools from power/cpupower Ben Hutchings <ben@decadent.org.uk> - 2016-02-19 15:40 +0100
Re: [PATCH 1/1] Build tools from power/cpupower Mattia Dongili <malattia@gmail.com> - 2016-02-19 16:30 +0100
Re: [PATCH 1/1] Build tools from power/cpupower Ben Hutchings <ben@decadent.org.uk> - 2016-02-19 16:40 +0100
Re: [PATCH 1/1] Build tools from power/cpupower Mattia Dongili <malattia@gmail.com> - 2016-02-19 17:00 +0100
Re: [PATCH 1/1] Build tools from power/cpupower Mattia Dongili <malattia@gmail.com> - 2016-02-22 07:50 +0100
Re: [PATCH 1/1] Build tools from power/cpupower Mattia Dongili <malattia@gmail.com> - 2016-03-01 15:50 +0100
| From | malattia@gmail.com |
|---|---|
| Date | 2016-02-19 08:30 +0100 |
| Subject | [PATCH 1/1] Build tools from power/cpupower |
| Message-ID | <r3NFM-1zJ-15@gated-at.bofh.it> |
From: Mattia Dongili <malattia@linux.it>
They'll eventually replace cpufrequtils and libcpufreq{0,-dev} so the
structure of the packages is the same.
---
debian/build/tools/Makefile | 1 +
debian/build/tools/power/cpupower/Makefile | 27 ++++++++++++++++++
debian/changelog | 2 ++
debian/libcpupower-dev.install | 2 ++
debian/libcpupower0.install | 1 +
debian/libcpupower0.symbols | 44 ++++++++++++++++++++++++++++++
debian/linux-cpupower.install | 3 ++
debian/rules.real | 23 +++++++++++++++-
debian/templates/control.main.in | 29 ++++++++++++++++++++
debian/templates/control.source.in | 2 +-
10 files changed, 132 insertions(+), 2 deletions(-)
create mode 100644 debian/build/tools/power/cpupower/Makefile
create mode 100644 debian/libcpupower-dev.install
create mode 100644 debian/libcpupower0.install
create mode 100644 debian/libcpupower0.symbols
create mode 100644 debian/linux-cpupower.install
diff --git a/debian/build/tools/Makefile b/debian/build/tools/Makefile
index a3cdd87..1ea9cf3 100644
--- a/debian/build/tools/Makefile
+++ b/debian/build/tools/Makefile
@@ -2,6 +2,7 @@ SUBDIRS = \
hv \
lib/lockdep \
perf \
+ power/cpupower \
usb/usbip
include ../Makefile.inc
diff --git a/debian/build/tools/power/cpupower/Makefile b/debian/build/tools/power/cpupower/Makefile
new file mode 100644
index 0000000..b757d29
--- /dev/null
+++ b/debian/build/tools/power/cpupower/Makefile
@@ -0,0 +1,27 @@
+OUTDIR = tools/power/cpupower
+prefix = /usr/sbin
+
+include ../../../Makefile.inc
+
+DEBUG = false
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ DEBUG=true
+endif
+
+ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ # this actually also disables removes -O2 in favour of -O1
+ # but it's as close as we can get to honouring nostrip.
+ DEBUG=true
+endif
+
+all:
+ mkdir out
+ $(MAKE) -C $(top_srcdir)/tools/power/cpupower -f Makefile O=$(CURDIR)/out DEBUG=$(DEBUG)
+
+install:
+ $(MAKE) -C $(top_srcdir)/tools/power/cpupower -f Makefile O=$(CURDIR)/out install mandir=/usr/share/man DESTDIR=$(DESTDIR)
+
+clean:
+ mkdir -p out
+ $(MAKE) -C $(top_srcdir)/tools/power/cpupower -f Makefile O=$(CURDIR)/out clean
+ rm -rf out
diff --git a/debian/changelog b/debian/changelog
index 6132e47..65f559f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ linux-tools (4.5~rc4-1~exp1) UNRELEASED; urgency=medium
[ Ben Hutchings ]
* lockdep: Add missing macros
+ [ Mattia Dongili ]
+ * Build linux-cpupower.
-- Ben Hutchings <ben@decadent.org.uk> Thu, 18 Feb 2016 03:19:14 +0000
diff --git a/debian/libcpupower-dev.install b/debian/libcpupower-dev.install
new file mode 100644
index 0000000..b341905
--- /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 0000000..d0dbfd1
--- /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 0000000..a356760
--- /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 0000000..e79f8d1
--- /dev/null
+++ b/debian/linux-cpupower.install
@@ -0,0 +1,3 @@
+usr/bin
+usr/sbin
+usr/share/
diff --git a/debian/rules.real b/debian/rules.real
index 1eb2cf8..7167422 100644
--- a/debian/rules.real
+++ b/debian/rules.real
@@ -3,7 +3,7 @@ export KBUILD_BUILD_TIMESTAMP := $(shell dpkg-parsechangelog | sed -ne 's,^Date:
include debian/rules.defs
-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
@@ -43,6 +43,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)
diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in
index 6106752..d90d775 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}
+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 761bf9b..109be7b 100644
--- a/debian/templates/control.source.in
+++ b/debian/templates/control.source.in
@@ -7,7 +7,7 @@ Standards-Version: 3.9.6
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-systemd
Vcs-Git: https://anonscm.debian.org/git/kernel/linux-tools.git
Vcs-Browser: https://anonscm.debian.org/cgit/kernel/linux-tools.git
--
2.7.0
[toc] | [next] | [standalone]
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2016-02-19 15:40 +0100 |
| Message-ID | <r3UnU-6pv-19@gated-at.bofh.it> |
| In reply to | #52899 |
[Multipart message — attachments visible in raw view] — view raw
On Thu, 2016-02-18 at 23:29 -0800, malattia@gmail.com wrote:
> From: Mattia Dongili <malattia@linux.it>
>
> They'll eventually replace cpufrequtils and libcpufreq{0,-dev} so the
> structure of the packages is the same.
[...]
This is not passing the proper build flags:
W: libcpupower0: hardening-no-relro usr/lib/libcpupower.so.0.0.0
W: linux-cpupower: hardening-no-relro usr/bin/cpupower
W: linux-cpupower: hardening-no-relro usr/sbin/cpufreq-bench
W: linux-cpupower-dbgsym: debug-file-with-no-debug-symbols usr/lib/debug/.build-id/40/fd11393c987a84eaf7a98448d72ec8d8f87414.debug
W: libcpupower0-dbgsym: debug-file-with-no-debug-symbols usr/lib/debug/.build-id/ed/bc6af9a235be2cc306d10b33632fa4dd071a3b.debug
There are some other lintian warnings that should be easy to fix:
W: linux-cpupower: script-with-language-extension usr/bin/cpufreq-bench_plot.sh
W: linux-cpupower: manpage-has-bad-whatis-entry usr/share/man/man1/cpupower-frequency-info.1.gz
W: linux-cpupower: manpage-has-bad-whatis-entry usr/share/man/man1/cpupower-frequency-set.1.gz
W: linux-cpupower: manpage-has-bad-whatis-entry usr/share/man/man1/cpupower-idle-info.1.gz
W: linux-cpupower: manpage-has-bad-whatis-entry ... use --no-tag-display-limit to see all (or pipe to a file/program)
Ben.
[toc] | [prev] | [next] | [standalone]
| From | Mattia Dongili <malattia@gmail.com> |
|---|---|
| Date | 2016-02-19 16:30 +0100 |
| Message-ID | <r3Vai-71t-19@gated-at.bofh.it> |
| In reply to | #52900 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Feb 19, 2016 at 02:30:26PM +0000, Ben Hutchings wrote:
> On Thu, 2016-02-18 at 23:29 -0800, malattia@gmail.com wrote:
> > From: Mattia Dongili <malattia@linux.it>
> >
> > They'll eventually replace cpufrequtils and libcpufreq{0,-dev} so the
> > structure of the packages is the same.
> [...]
>
> This is not passing the proper build flags:
>
> W: libcpupower0: hardening-no-relro usr/lib/libcpupower.so.0.0.0
> W: linux-cpupower: hardening-no-relro usr/bin/cpupower
> W: linux-cpupower: hardening-no-relro usr/sbin/cpufreq-bench
> W: linux-cpupower-dbgsym: debug-file-with-no-debug-symbols usr/lib/debug/.build-id/40/fd11393c987a84eaf7a98448d72ec8d8f87414.debug
> W: libcpupower0-dbgsym: debug-file-with-no-debug-symbols usr/lib/debug/.build-id/ed/bc6af9a235be2cc306d10b33632fa4dd071a3b.debug
I didn't pay too much attention these warnings because linux-perf has
similar ones. I should have mentioned that.
E: linux-perf-4.5: binary-from-other-architecture usr/lib/perf_4.5-core/perf-read-vdsox32
W: linux-perf-4.5-dbgsym: debug-file-with-no-debug-symbols usr/lib/debug/.build-id/c5/55a9d59fa355fd0dddb74d5e6322020c51be07.debug
W: linux-perf-4.5-dbgsym: debug-file-with-no-debug-symbols usr/lib/debug/.build-id/db/dc04fd210c88261daff32f95aadd09e70a7113.debug
W: linux-perf-4.5: executable-not-elf-or-script usr/share/perf-core/strace/groups/file
W: linux-perf-4.5: hardening-no-relro usr/lib/perf_4.5-core/perf-read-vdso32
W: linux-perf-4.5: hardening-no-relro usr/lib/perf_4.5-core/perf-read-vdsox32
W: linux-perf-4.5: manpage-has-errors-from-man usr/share/man/man1/perf_4.5-report.1.gz 683: warning [p 4, 4.7i]: can't break line
debug-file-with-no-debug-symbols warnings are new to 4.5 both for perf
and cpupower, I didn' see them a few days ago when playing around with
4.4.
I'll see if I can fix all of them.
> There are some other lintian warnings that should be easy to fix:
>
> W: linux-cpupower: script-with-language-extension usr/bin/cpufreq-bench_plot.sh
> W: linux-cpupower: manpage-has-bad-whatis-entry usr/share/man/man1/cpupower-frequency-info.1.gz
> W: linux-cpupower: manpage-has-bad-whatis-entry usr/share/man/man1/cpupower-frequency-set.1.gz
> W: linux-cpupower: manpage-has-bad-whatis-entry usr/share/man/man1/cpupower-idle-info.1.gz
> W: linux-cpupower: manpage-has-bad-whatis-entry ... use --no-tag-display-limit to see all (or pipe to a file/program)
I'll get these fixed too. Stay tuned.
--
mattia
:wq!
[toc] | [prev] | [next] | [standalone]
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2016-02-19 16:40 +0100 |
| Message-ID | <r3VjY-77R-9@gated-at.bofh.it> |
| In reply to | #52901 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, 2016-02-19 at 07:27 -0800, Mattia Dongili wrote:
> On Fri, Feb 19, 2016 at 02:30:26PM +0000, Ben Hutchings wrote:
> > On Thu, 2016-02-18 at 23:29 -0800, malattia@gmail.com wrote:
> > > From: Mattia Dongili <malattia@linux.it>
> > >
> > > They'll eventually replace cpufrequtils and libcpufreq{0,-dev} so the
> > > structure of the packages is the same.
> > [...]
> >
> > This is not passing the proper build flags:
> >
> > W: libcpupower0: hardening-no-relro usr/lib/libcpupower.so.0.0.0
> > W: linux-cpupower: hardening-no-relro usr/bin/cpupower
> > W: linux-cpupower: hardening-no-relro usr/sbin/cpufreq-bench
> > W: linux-cpupower-dbgsym: debug-file-with-no-debug-symbols usr/lib/debug/.build-id/40/fd11393c987a84eaf7a98448d72ec8d8f87414.debug
> > W: libcpupower0-dbgsym: debug-file-with-no-debug-symbols usr/lib/debug/.build-id/ed/bc6af9a235be2cc306d10b33632fa4dd071a3b.debug
>
> I didn't pay too much attention these warnings because linux-perf has
> similar ones. I should have mentioned that.
>
> E: linux-perf-4.5: binary-from-other-architecture usr/lib/perf_4.5-core/perf-read-vdsox32
This is expected but should probably be overridden.
> W: linux-perf-4.5-dbgsym: debug-file-with-no-debug-symbols usr/lib/debug/.build-id/c5/55a9d59fa355fd0dddb74d5e6322020c51be07.debug
> W: linux-perf-4.5-dbgsym: debug-file-with-no-debug-symbols usr/lib/debug/.build-id/db/dc04fd210c88261daff32f95aadd09e70a7113.debug
> W: linux-perf-4.5: executable-not-elf-or-script usr/share/perf-core/strace/groups/file
> W: linux-perf-4.5: hardening-no-relro usr/lib/perf_4.5-core/perf-read-vdso32
> W: linux-perf-4.5: hardening-no-relro usr/lib/perf_4.5-core/perf-read-vdsox32
[...]
Those two may be difficult to fix, since they aren't built with the
same flags as other executables.
Is there any reason not to add cpupower on the sid branch rather than
master (which means it will stay in experimental for the next ~2
months)?
Ben.
--
Ben Hutchings
Tomorrow will be cancelled due to lack of interest.
[toc] | [prev] | [next] | [standalone]
| From | Mattia Dongili <malattia@gmail.com> |
|---|---|
| Date | 2016-02-19 17:00 +0100 |
| Message-ID | <r3VDk-7j5-9@gated-at.bofh.it> |
| In reply to | #52902 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Feb 19, 2016 at 03:37:50PM +0000, Ben Hutchings wrote:
> On Fri, 2016-02-19 at 07:27 -0800, Mattia Dongili wrote:
> > On Fri, Feb 19, 2016 at 02:30:26PM +0000, Ben Hutchings wrote:
> > > On Thu, 2016-02-18 at 23:29 -0800, malattia@gmail.com wrote:
> > > > From: Mattia Dongili <malattia@linux.it>
> > > >
> > > > They'll eventually replace cpufrequtils and libcpufreq{0,-dev} so the
> > > > structure of the packages is the same.
> > > [...]
> > >
> > > This is not passing the proper build flags:
> > >
> > > W: libcpupower0: hardening-no-relro usr/lib/libcpupower.so.0.0.0
> > > W: linux-cpupower: hardening-no-relro usr/bin/cpupower
> > > W: linux-cpupower: hardening-no-relro usr/sbin/cpufreq-bench
> > > W: linux-cpupower-dbgsym: debug-file-with-no-debug-symbols usr/lib/debug/.build-id/40/fd11393c987a84eaf7a98448d72ec8d8f87414.debug
> > > W: libcpupower0-dbgsym: debug-file-with-no-debug-symbols usr/lib/debug/.build-id/ed/bc6af9a235be2cc306d10b33632fa4dd071a3b.debug
> >
> > I didn't pay too much attention these warnings because linux-perf has
> > similar ones. I should have mentioned that.
> >
> > E: linux-perf-4.5: binary-from-other-architecture usr/lib/perf_4.5-core/perf-read-vdsox32
>
> This is expected but should probably be overridden.
Ok. Override it is.
> > W: linux-perf-4.5-dbgsym: debug-file-with-no-debug-symbols usr/lib/debug/.build-id/c5/55a9d59fa355fd0dddb74d5e6322020c51be07.debug
> > W: linux-perf-4.5-dbgsym: debug-file-with-no-debug-symbols usr/lib/debug/.build-id/db/dc04fd210c88261daff32f95aadd09e70a7113.debug
> > W: linux-perf-4.5: executable-not-elf-or-script usr/share/perf-core/strace/groups/file
> > W: linux-perf-4.5: hardening-no-relro usr/lib/perf_4.5-core/perf-read-vdso32
> > W: linux-perf-4.5: hardening-no-relro usr/lib/perf_4.5-core/perf-read-vdsox32
> [...]
>
> Those two may be difficult to fix, since they aren't built with the
> same flags as other executables.
Ok, I haven't really looked at how linux-perf is built yet. Thanks for
the note.
> Is there any reason not to add cpupower on the sid branch rather than
> master (which means it will stay in experimental for the next ~2
> months)?
The sid branch is fine, I'll rebase on that for the next revision.
--
mattia
:wq!
[toc] | [prev] | [next] | [standalone]
| From | Mattia Dongili <malattia@gmail.com> |
|---|---|
| Date | 2016-02-22 07:50 +0100 |
| Message-ID | <r4StH-1HJ-5@gated-at.bofh.it> |
| In reply to | #52904 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Feb 19, 2016 at 07:56:18AM -0800, Mattia Dongili wrote:
> On Fri, Feb 19, 2016 at 03:37:50PM +0000, Ben Hutchings wrote:
...
> > Is there any reason not to add cpupower on the sid branch rather than
> > master (which means it will stay in experimental for the next ~2
> > months)?
>
> The sid branch is fine, I'll rebase on that for the next revision.
Below is another round, on top of the sid branch and lintian-clean.
I decided to not ship cpufreq-bench and the plotting script, aside
from the gnuplot dependency, I don't see them as particularly useful for
general use.
I didn't touch anything outside power/cpupower.
--
mattia
:wq!
- - 8< - - 8< - -
They'll eventually replace cpufrequtils and libcpufreq{0,-dev} so the
structure of the packages is the same.
---
debian/build/tools/Makefile | 1 +
debian/build/tools/power/cpupower/Makefile | 20 +++++++
debian/changelog | 8 +++
debian/libcpupower-dev.install | 2 +
debian/libcpupower0.install | 1 +
debian/libcpupower0.symbols | 44 +++++++++++++++
debian/linux-cpupower.install | 2 +
...power-cpupower-fix-incorrect-if-statement.patch | 21 ++++++++
.../patches/power-cpupower-fix-manpages-NAME.patch | 63 ++++++++++++++++++++++
debian/patches/series | 2 +
debian/rules.real | 23 +++++++-
debian/templates/control.main.in | 29 ++++++++++
debian/templates/control.source.in | 2 +-
13 files changed, 216 insertions(+), 2 deletions(-)
create mode 100644 debian/build/tools/power/cpupower/Makefile
create mode 100644 debian/libcpupower-dev.install
create mode 100644 debian/libcpupower0.install
create mode 100644 debian/libcpupower0.symbols
create mode 100644 debian/linux-cpupower.install
create mode 100644 debian/patches/power-cpupower-fix-incorrect-if-statement.patch
create mode 100644 debian/patches/power-cpupower-fix-manpages-NAME.patch
diff --git a/debian/build/tools/Makefile b/debian/build/tools/Makefile
index a3cdd87..1ea9cf3 100644
--- a/debian/build/tools/Makefile
+++ b/debian/build/tools/Makefile
@@ -2,6 +2,7 @@ SUBDIRS = \
hv \
lib/lockdep \
perf \
+ power/cpupower \
usb/usbip
include ../Makefile.inc
diff --git a/debian/build/tools/power/cpupower/Makefile b/debian/build/tools/power/cpupower/Makefile
new file mode 100644
index 0000000..66e2c75
--- /dev/null
+++ b/debian/build/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/changelog b/debian/changelog
index 3a35e50..9060b55 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+linux-tools (4.4-5~exp1.1) experimental; urgency=medium
+
+ * Non-maintainer upload.
+ * Build linux-cpupower.
+
+ -- Mattia Dongili <malattia@debian.org> Sun, 21 Feb 2016 19:36:29 -0800
+
linux-tools (4.4-4) unstable; urgency=medium
* hyperv-daemons: Only build the progarams on x86 (fixes FTBFS)
@@ -12,6 +19,7 @@ linux-tools (4.4-3) unstable; urgency=medium
linux-tools (4.4-2) unstable; urgency=medium
+ [ Ben Hutchings ]
* linux-perf: Include version number in strace groups installation directory
(Closes: #813080)
* [alpha,sh4] Attempt to fix build failures
diff --git a/debian/libcpupower-dev.install b/debian/libcpupower-dev.install
new file mode 100644
index 0000000..b341905
--- /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 0000000..d0dbfd1
--- /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 0000000..a356760
--- /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 0000000..21cca7c
--- /dev/null
+++ b/debian/linux-cpupower.install
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/
diff --git a/debian/patches/power-cpupower-fix-incorrect-if-statement.patch b/debian/patches/power-cpupower-fix-incorrect-if-statement.patch
new file mode 100644
index 0000000..f9ea861
--- /dev/null
+++ b/debian/patches/power-cpupower-fix-incorrect-if-statement.patch
@@ -0,0 +1,21 @@
+commit 2fecc6ec4961703ea2c8936f3e37154399a56a68
+Author: Mattia Dongili <malattia@linux.it>
+Date: Sun Feb 14 11:55:43 2016 -0800
+
+ warning: comparison of constant ‘-1’ with boolean expression is always false
+
+ Signed-off-by: Mattia Dongili <malattia@linux.it>
+
+diff --git a/tools/power/cpupower/utils/helpers/topology.c b/tools/power/cpupower/utils/helpers/topology.c
+index 9cbb7fd..771ec60 100644
+--- a/tools/power/cpupower/utils/helpers/topology.c
++++ b/tools/power/cpupower/utils/helpers/topology.c
+@@ -106,7 +106,7 @@ int get_cpu_topology(struct cpupower_topology *cpu_top)
+ cpu_top->pkgs++;
+ }
+ }
+- if (!cpu_top->core_info[0].pkg == -1)
++ if (cpu_top->core_info[0].pkg != -1)
+ cpu_top->pkgs++;
+
+ /* Intel's cores count is not consecutively numbered, there may
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 0000000..491e0bc
--- /dev/null
+++ b/debian/patches/power-cpupower-fix-manpages-NAME.patch
@@ -0,0 +1,63 @@
+commit 33104a54437ff182a3541d6c0089e5b8d89c25cd
+Author: Mattia Dongili <malattia@linux.it>
+Date: Fri Feb 19 07:46:32 2016 -0800
+
+ Fix cpupower manpages "NAME" section
+
+ The token before "-" should be the program name, no spaces allowed.
+ See man(7) and lexgrog(1).
+
+ Signed-off-by: Mattia Dongili <malattia@linux.it>
+
+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 1f4f8c5..de1d8ad 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -23,3 +23,5 @@ perf-remove-wrong-semicolon-in-while-loop.patch
revert-perf-tools-x86-build-perf-on-older-user-space.patch
perf-tools-fix-bpf-feature-check.patch
tools-build-use-fixdep-with-output-path-prefix.patch
+power-cpupower-fix-incorrect-if-statement.patch
+power-cpupower-fix-manpages-NAME.patch
diff --git a/debian/rules.real b/debian/rules.real
index ca34334..891c39b 100644
--- a/debian/rules.real
+++ b/debian/rules.real
@@ -3,7 +3,7 @@ export KBUILD_BUILD_TIMESTAMP := $(shell dpkg-parsechangelog | sed -ne 's,^Date:
include debian/rules.defs
-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
@@ -43,6 +43,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)
diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in
index 9da6d26..a64794b 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}
+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 761bf9b..109be7b 100644
--- a/debian/templates/control.source.in
+++ b/debian/templates/control.source.in
@@ -7,7 +7,7 @@ Standards-Version: 3.9.6
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-systemd
Vcs-Git: https://anonscm.debian.org/git/kernel/linux-tools.git
Vcs-Browser: https://anonscm.debian.org/cgit/kernel/linux-tools.git
--
2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Mattia Dongili <malattia@gmail.com> |
|---|---|
| Date | 2016-03-01 15:50 +0100 |
| Message-ID | <r7TMC-1XE-29@gated-at.bofh.it> |
| In reply to | #52982 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, Feb 21, 2016 at 10:42:57PM -0800, Mattia Dongili wrote: ... > diff --git a/debian/changelog b/debian/changelog > index 3a35e50..9060b55 100644 > --- a/debian/changelog > +++ b/debian/changelog > @@ -1,3 +1,10 @@ > +linux-tools (4.4-5~exp1.1) experimental; urgency=medium > + > + * Non-maintainer upload. > + * Build linux-cpupower. > + > + -- Mattia Dongili <malattia@debian.org> Sun, 21 Feb 2016 19:36:29 -0800 > + > linux-tools (4.4-4) unstable; urgency=medium > > * hyperv-daemons: Only build the progarams on x86 (fixes FTBFS) > @@ -12,6 +19,7 @@ linux-tools (4.4-3) unstable; urgency=medium > > linux-tools (4.4-2) unstable; urgency=medium > > + [ Ben Hutchings ] err... this bit is bogus and a left over of a previous iteration. I'll resend the patch without it. -- mattia :wq!
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.kernel
csiph-web