Merge linux-tools source package into linux (Closes: #550379, #573483, #816500)

* Drop redundant gitignore.patch from linux-tools
* Rename linux-tools' debian/templates/control.main.in to
  debian/templates/control.tools.in
* Combine changelogs, putting all entries for each upstream release
  cycle in chronological order
* Combine rules and gencontrol.py code
This commit is contained in:
Ben Hutchings 2016-03-20 22:25:02 +00:00
commit a5f7516c0c
78 changed files with 3256 additions and 4 deletions

8
debian/.gitignore vendored
View File

@ -6,14 +6,22 @@
*.pyc
*.substvars
*-di
/*-tmp/
/build/
/config.defines.dump
/control
/control.md5sum
/files
/hyperv-daemons/
/libcpupower*/
/liblockdep*/
/libusbip-dev/
/linux-*
/lockdep/
/po/
/rules.gen
/stamps/
/tests/control
/tmp/
/usbip/
/xen-linux-system-*

View File

@ -46,7 +46,7 @@ class Gencontrol(Base):
'headers-all': config.SchemaItemBoolean(),
'installer': config.SchemaItemBoolean(),
'libc-dev': config.SchemaItemBoolean(),
'tools': config.SchemaItemBoolean(),
}
}
@ -118,6 +118,8 @@ class Gencontrol(Base):
makeflags['ALL_TRIPLETS'] = ' '.join(triplet_enabled)
if not self.config.merge('packages').get('docs', True):
makeflags['DO_DOCS'] = False
if not self.config.merge('packages').get('tools', True):
makeflags['DO_TOOLS'] = False
super(Gencontrol, self).do_main_makefile(makefile, makeflags, extra)
# linux-source-$UPSTREAMVERSION will contain all kconfig files
@ -127,6 +129,12 @@ class Gencontrol(Base):
packages.extend(self.process_packages(self.templates["control.main"], self.vars))
if self.config.merge('packages').get('docs', True):
packages.extend(self.process_packages(self.templates["control.docs"], self.vars))
if self.config.merge('packages').get('tools', True):
packages.extend(self.process_packages(self.templates["control.tools"], self.vars))
self._substitute_file('lintian-overrides.perf', self.vars,
'debian/linux-perf-%s.lintian-overrides' %
self.vars['version'])
arch_makeflags = (
('kernel-arch', 'KERNEL_ARCH', False),
@ -170,6 +178,9 @@ class Gencontrol(Base):
self.merge_packages(packages, packages_headers_arch, arch)
cmds_build_arch = ["$(MAKE) -f debian/rules.real build-arch-arch %s" % makeflags]
makefile.add('build-arch_%s_real' % arch, cmds=cmds_build_arch)
cmds_binary_arch = ["$(MAKE) -f debian/rules.real binary-arch-arch %s" % makeflags]
makefile.add('binary-arch_%s_real' % arch, cmds=cmds_binary_arch)

869
debian/changelog vendored

File diff suppressed because it is too large Load Diff

25
debian/copyright vendored
View File

@ -1,6 +1,12 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Linux kernel
Source: http://ftp.kernel.org/pub/linux/kernel/
Comment:
The 'perf' tool is dynamically linked with the Python interpreter,
which is itself dynamically linked with OpenSSL, which is not
GPL-compatible. However, since perf itself does not link with or use
OpenSSL, we believe that this indirect linking does not require
additional permissions beyond the GPL.
Files: *
Copyright: 1991-2012 Linus Torvalds and many others
@ -11,6 +17,25 @@ Copyright: 1996-2006 Manoj Srivastava
2005-2012 Debian kernel team
License: GPL-2
Files: debian/rules.d/tools/hv/check-hyperv.c
Copyright: 2011 Lennart Poettering
License: LGPL-2.1
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
.
This program 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
Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public License
along with this program; If not, see <http://www.gnu.org/licenses/>.
.
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'.
Files: drivers/crypto/vmx/*.pl
Copyright: 2006,2014 Andy Polyakov <appro@openssl.org>
License: CRYPTOGAMS

14
debian/hyperv-daemons.README.Debian vendored Normal file
View File

@ -0,0 +1,14 @@
hyperv-daemon for Debian
------------------------
If you want to change screen resolution on Linux guest,
plese update kernel parameter.
1. edit /etc/default/grub file
- add 'video=hyperv_fb:"horizontal"x"vertical"' to
'GRUB_CMDLINE_LINUX_DEFAULT=' or 'GRUB_CMDLINE_LINUX=' line
(e.g. GRUB_CMDLINE_LINUX=video=hyperv_fb:1280x1024)
2. then, exec update-grub
3. reboot Linux guest
-- Hideki Yamane <henrich@debian.org> Thu, 28 May 2015 10:23:52 +0900

110
debian/hyperv-daemons.hv-fcopy-daemon.init vendored Executable file
View File

@ -0,0 +1,110 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: hyperv-daemons.hv-fcopy-daemon
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Hyper-V file copy service (FCOPY) daemon
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Hyper-V file copy service (FCOPY) daemon"
NAME=hv_fcopy_daemon
DAEMON=/usr/sbin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/hyperv-daemons.hv-fcopy-daemon
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Exit if we are not running under Hyper-V or the kernel device does not exist
/lib/hyperv-daemons/check-hyperv || exit 0
[ -e "/dev/vmbus/hv_fcopy" ] || exit 0
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --background --make-pidfile -- -n \
|| return 2
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
[ "$?" = 2 ] && return 2
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
RETVAL=$?
[ "$RETVAL" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac
:

View File

@ -0,0 +1,10 @@
[Unit]
Description=Hyper-V file copy service (FCOPY) daemon
ConditionVirtualization=microsoft
ConditionPathExists=/dev/vmbus/hv_fcopy
[Service]
ExecStart=/usr/sbin/hv_fcopy_daemon -n
[Install]
WantedBy=multi-user.target

109
debian/hyperv-daemons.hv-kvp-daemon.init vendored Executable file
View File

@ -0,0 +1,109 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: hyperv-daemons.hv-kvp-daemon
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Hyper-V key-value pair (KVP) daemon
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Hyper-V key-value pair (KVP) daemon"
NAME=hv_kvp_daemon
DAEMON=/usr/sbin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/hyperv-daemons.hv-kvp-daemon
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Exit if we are not running under Hyper-V
/lib/hyperv-daemons/check-hyperv || exit 0
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --background --make-pidfile -- -n \
|| return 2
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
[ "$?" = 2 ] && return 2
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
RETVAL=$?
[ "$RETVAL" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac
:

View File

@ -0,0 +1,9 @@
[Unit]
Description=Hyper-V key-value pair (KVP) daemon
ConditionVirtualization=microsoft
[Service]
ExecStart=/usr/sbin/hv_kvp_daemon -n
[Install]
WantedBy=multi-user.target

109
debian/hyperv-daemons.hv-vss-daemon.init vendored Executable file
View File

@ -0,0 +1,109 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: hyperv-daemons.hv-vss-daemon
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Hyper-V volume shadow copy service (VSS) daemon
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Hyper-V volume shadow copy service (VSS) daemon"
NAME=hv_vss_daemon
DAEMON=/usr/sbin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/hyperv-daemons.hv-vss-daemon
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Exit if we are not running under Hyper-V
/lib/hyperv-daemons/check-hyperv || exit 0
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --background --make-pidfile -- -n \
|| return 2
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
[ "$?" = 2 ] && return 2
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
RETVAL=$?
[ "$RETVAL" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac
:

View File

@ -0,0 +1,9 @@
[Unit]
Description=Hyper-V volume shadow copy service (VSS) daemon
ConditionVirtualization=microsoft
[Service]
ExecStart=/usr/sbin/hv_vss_daemon -n
[Install]
WantedBy=multi-user.target

1
debian/hyperv-daemons.install vendored Normal file
View File

@ -0,0 +1 @@
debian/hyperv-daemons.*.service lib/systemd/system/

2
debian/libcpupower-dev.install vendored Normal file
View File

@ -0,0 +1,2 @@
usr/include/*
usr/lib/lib*.so

1
debian/libcpupower0.install vendored Normal file
View File

@ -0,0 +1 @@
usr/lib/lib*.so.*

44
debian/libcpupower0.symbols vendored Normal file
View File

@ -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

13
debian/liblockdep-dev.README.Debian vendored Normal file
View File

@ -0,0 +1,13 @@
liblockdep for Debian
---------------------
liblockdep does not have proper documentation, but these articles
provide an introduction:
https://lwn.net/Articles/536363/
http://www.vctlabs.com/posts/2014/Jul/09/liblockdep/
'lockdep-design.txt' explains some more detail about what lockdep
does, both in the kernel and as liblockdep.
-- Ben Hutchings <ben@decadent.org.uk>, Fri, 14 Aug 2015 14:22:55 +0200

1
debian/liblockdep-dev.docs vendored Normal file
View File

@ -0,0 +1 @@
Documentation/locking/lockdep-design.txt

3
debian/liblockdep-dev.install vendored Normal file
View File

@ -0,0 +1,3 @@
usr/include/liblockdep
usr/lib/*/liblockdep.a
usr/lib/*/liblockdep.so

3
debian/libusbip-dev.install vendored Normal file
View File

@ -0,0 +1,3 @@
usr/lib/libusbip.la
usr/lib/libusbip.a
usr/include/usbip/*

2
debian/linux-cpupower.install vendored Normal file
View File

@ -0,0 +1,2 @@
usr/bin
usr/share/

1
debian/lockdep.dirs vendored Normal file
View File

@ -0,0 +1 @@
usr/bin

View File

@ -0,0 +1,56 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Tue, 29 Sep 2015 02:55:06 +0100
Subject: [PATCH] alpha: uapi: Add support for __SANE_USERSPACE_TYPES__
Forwarded: http://mid.gmane.org/1443659755.2730.14.camel@decadent.org.uk
This fixes compiler errors in perf such as:
tests/attr.c: In function 'store_event':
tests/attr.c:66:27: error: format '%llu' expects argument of type 'long long unsigned int', but argument 6 has type '__u64 {aka long unsigned int}' [-Werror=format=]
snprintf(path, PATH_MAX, "%s/event-%d-%llu-%d", dir,
^
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Tested-by: Michael Cree <mcree@orcon.net.nz>
Cc: stable@vger.kernel.org
---
arch/alpha/include/asm/types.h | 2 +-
arch/alpha/include/uapi/asm/types.h | 12 +++++++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
# diff --git a/arch/alpha/include/asm/types.h b/arch/alpha/include/asm/types.h
# index 4cb4b6d..0bc66e1 100644
# --- a/arch/alpha/include/asm/types.h
# +++ b/arch/alpha/include/asm/types.h
# @@ -1,6 +1,6 @@
# #ifndef _ALPHA_TYPES_H
# #define _ALPHA_TYPES_H
#
# -#include <asm-generic/int-ll64.h>
# +#include <uapi/asm/types.h>
#
# #endif /* _ALPHA_TYPES_H */
diff --git a/arch/alpha/include/uapi/asm/types.h b/arch/alpha/include/uapi/asm/types.h
index 9fd3cd4..8d1024d 100644
--- a/arch/alpha/include/uapi/asm/types.h
+++ b/arch/alpha/include/uapi/asm/types.h
@@ -9,8 +9,18 @@
* need to be careful to avoid a name clashes.
*/
-#ifndef __KERNEL__
+/*
+ * This is here because we used to use l64 for alpha
+ * and we don't want to impact user mode with our change to ll64
+ * in the kernel.
+ *
+ * However, some user programs are fine with this. They can
+ * flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here.
+ */
+#if !defined(__SANE_USERSPACE_TYPES__) && !defined(__KERNEL__)
#include <asm-generic/int-l64.h>
+#else
+#include <asm-generic/int-ll64.h>
#endif
#endif /* _UAPI_ALPHA_TYPES_H */

View File

@ -0,0 +1,22 @@
From: Ben Hutchings <ben@decadent.org.uk>
Subject: kbuild: Fix recordmcount dependency for OOT modules
Date: Mon, 08 Sep 2014 18:31:24 +0100
We never rebuild anything in-tree when building an out-of-tree
modules, so external modules should not depend on the recordmcount
sources.
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -240,6 +240,11 @@ cmd_record_mcount = \
fi;
endif
+# Don't require recordmcount source for an OOT build.
+ifdef KBUILD_EXTMOD
+recordmcount_source :=
+endif
+
define rule_cc_o_c
$(call echo-cmd,checksrc) $(cmd_checksrc) \
$(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \

View File

@ -0,0 +1,34 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Thu, 18 Feb 2016 03:34:25 +0000
Subject: lockdep: Add missing macros
liblockdep is broken again due to lockdep using kernel macros that it
doesn't have substitutes for.
---
--- a/tools/lib/lockdep/uinclude/linux/kernel.h
+++ b/tools/lib/lockdep/uinclude/linux/kernel.h
@@ -6,6 +6,7 @@
#include <linux/rcu.h>
#include <linux/hardirq.h>
#include <linux/kern_levels.h>
+#include <linux/compiler.h>
#ifndef container_of
#define container_of(ptr, type, member) ({ \
--- a/tools/lib/lockdep/uinclude/linux/list.h
+++ b/tools/lib/lockdep/uinclude/linux/list.h
@@ -1 +1,4 @@
#include "../../../include/linux/list.h"
+#define hlist_add_head_rcu hlist_add_head
+#define hlist_del_rcu hlist_del
+#define hlist_for_each_entry_rcu hlist_for_each_entry
--- a/tools/lib/lockdep/uinclude/linux/compiler.h
+++ b/tools/lib/lockdep/uinclude/linux/compiler.h
@@ -3,6 +3,7 @@
#define __used __attribute__((__unused__))
#define unlikely
+#define READ_ONCE(x) (x)
#define WRITE_ONCE(x, val) x=(val)
#define RCU_INIT_POINTER(p, v) p=(v)

View File

@ -0,0 +1,39 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Thu, 13 Aug 2015 20:48:12 +0200
Subject: liblockdep: Fix object file paths used in an out-of-tree build
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/tools/lib/lockdep/Makefile
+++ b/tools/lib/lockdep/Makefile
@@ -100,7 +100,7 @@ include $(srctree)/tools/build/Makefile.
do_compile_shared_library = \
($(print_shared_lib_compile) \
- $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='"$@"';$(shell ln -s $@ liblockdep.so))
+ $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='"$(@F)"';$(shell ln -s $(@F) $(@D)/liblockdep.so))
do_build_static_lib = \
($(print_static_lib_build) \
@@ -118,10 +118,10 @@ all_cmd: $(CMD_TARGETS)
$(LIB_IN): force
$(Q)$(MAKE) $(build)=liblockdep
-liblockdep.so.$(LIBLOCKDEP_VERSION): $(LIB_IN)
+$(OUTPUT)liblockdep.so.$(LIBLOCKDEP_VERSION): $(LIB_IN)
$(Q)$(do_compile_shared_library)
-liblockdep.a: $(LIB_IN)
+$(OUTPUT)liblockdep.a: $(LIB_IN)
$(Q)$(do_build_static_lib)
tags: force
@@ -149,7 +149,7 @@ install_lib: all_cmd
install: install_lib
clean:
- $(RM) *.o *~ $(TARGETS) *.a *liblockdep*.so* $(VERSION_FILES) .*.d .*.cmd
+ $(RM) $(OUTPUT)*.o *~ $(TARGETS) $(OUTPUT)*.a $(OUTPUT)*liblockdep*.so* $(VERSION_FILES) $(OUTPUT).*.d $(OUTPUT).*.cmd
$(RM) tags TAGS
PHONY += force

17
debian/patches/lockdep-fix-soname.patch vendored Normal file
View File

@ -0,0 +1,17 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Thu, 13 Aug 2015 20:48:12 +0200
Subject: liblockdep: Remove double-quotes from soname
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/tools/lib/lockdep/Makefile
+++ b/tools/lib/lockdep/Makefile
@@ -98,7 +98,7 @@ build := -f $(srctree)/tools/build/Makef
do_compile_shared_library = \
($(print_shared_lib_compile) \
- $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='"$(@F)"';$(shell ln -s $(@F) $(@D)/liblockdep.so))
+ $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='$(@F)';$(shell ln -s $(@F) $(@D)/liblockdep.so))
do_build_static_lib = \
($(print_static_lib_build) \

View File

@ -0,0 +1,22 @@
From: Chris Boot <debian@bootc.net>
Date: Mon, 01 Jul 2013 23:10:02 +0100
Subject: modpost symbol prefix setting
Forwarded: not-needed
[bwh: The original version of this was added by Bastian Blank. The
upstream code includes <generated/autoconf.h> so that <linux/export.h>
can tell whether C symbols have an underscore prefix. Since we build
modpost separately from the kernel, <generated/autoconf.h> won't exist.
However, no Debian Linux architecture uses the symbol prefix, so we
can simply omit it.]
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -19,7 +19,6 @@
#include <stdbool.h>
#include <errno.h>
#include "modpost.h"
-#include "../../include/generated/autoconf.h"
#include "../../include/linux/license.h"
#include "../../include/linux/export.h"

View File

@ -0,0 +1,26 @@
From: Markus Trippelsdorf <markus@trippelsdorf.de>
Subject: Fix misleadingly indented assignment (whitespace)
Date: Mon, 14 Dec 2015 16:44:40 +0100
Origin: http://article.gmane.org/gmane.linux.kernel/2108042
Fix misleadingly indented assignment.
This is just a simple whitespace fix.
The issue was pointed out by gcc-6's -Wmisleading-indentation.
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
---
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index e4b173dec4b9..c900b664ab8f 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -153,7 +153,7 @@ static int perf_pmu__parse_unit(struct perf_pmu_alias *alias, char *dir, char *n
if (fd == -1)
return -1;
- sret = read(fd, alias->unit, UNIT_MAX_LEN);
+ sret = read(fd, alias->unit, UNIT_MAX_LEN);
if (sret < 0)
goto error;

View File

@ -0,0 +1,75 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Tue, 19 Jan 2016 21:12:41 +0000
Subject: perf tools: Fix unused variables: x86_{32,64}_regoffset_table
Forwarded: http://mid.gmane.org/20160119213306.GE2637@decadent.org.uk
gcc 5 doesn't seem to care about these, but gcc 6 does and that
results in a build failure.
Fixes: bbbe6bf6037d ("perf tools: Introduce regs_query_register_offset() ...")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
tools/perf/arch/x86/util/dwarf-regs.c | 38 ++++++++++++++++-------------------
1 file changed, 17 insertions(+), 21 deletions(-)
diff --git a/tools/perf/arch/x86/util/dwarf-regs.c b/tools/perf/arch/x86/util/dwarf-regs.c
index 9223c16..fe1e516 100644
--- a/tools/perf/arch/x86/util/dwarf-regs.c
+++ b/tools/perf/arch/x86/util/dwarf-regs.c
@@ -55,26 +55,10 @@ struct pt_regs_offset {
#define REG_OFFSET_END {.name = NULL, .offset = 0}
+/* TODO: switching by dwarf address size */
#ifdef __x86_64__
-# define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
-# define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = -1}
-#else
-# define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = -1}
-# define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
-#endif
-
-static const struct pt_regs_offset x86_32_regoffset_table[] = {
- REG_OFFSET_NAME_32("%ax", eax),
- REG_OFFSET_NAME_32("%cx", ecx),
- REG_OFFSET_NAME_32("%dx", edx),
- REG_OFFSET_NAME_32("%bx", ebx),
- REG_OFFSET_NAME_32("$stack", esp), /* Stack address instead of %sp */
- REG_OFFSET_NAME_32("%bp", ebp),
- REG_OFFSET_NAME_32("%si", esi),
- REG_OFFSET_NAME_32("%di", edi),
- REG_OFFSET_END,
-};
+#define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
static const struct pt_regs_offset x86_64_regoffset_table[] = {
REG_OFFSET_NAME_64("%ax", rax),
REG_OFFSET_NAME_64("%dx", rdx),
@@ -94,12 +78,24 @@ static const struct pt_regs_offset x86_64_regoffset_table[] = {
REG_OFFSET_NAME_64("%r15", r15),
REG_OFFSET_END,
};
-
-/* TODO: switching by dwarf address size */
-#ifdef __x86_64__
#define regoffset_table x86_64_regoffset_table
+
#else
+
+#define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
+static const struct pt_regs_offset x86_32_regoffset_table[] = {
+ REG_OFFSET_NAME_32("%ax", eax),
+ REG_OFFSET_NAME_32("%cx", ecx),
+ REG_OFFSET_NAME_32("%dx", edx),
+ REG_OFFSET_NAME_32("%bx", ebx),
+ REG_OFFSET_NAME_32("$stack", esp), /* Stack address instead of %sp */
+ REG_OFFSET_NAME_32("%bp", ebp),
+ REG_OFFSET_NAME_32("%si", esi),
+ REG_OFFSET_NAME_32("%di", edi),
+ REG_OFFSET_END,
+};
#define regoffset_table x86_32_regoffset_table
+
#endif
/* Minus 1 for the ending REG_OFFSET_END */

View File

@ -0,0 +1,62 @@
From: Mattia Dongili <malattia@linux.it>
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 <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]

View File

@ -0,0 +1,23 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 25 Sep 2015 22:50:50 +0100
Subject: Revert "perf build: Fix libunwind feature detection on 32-bit x86"
This reverts commit 05b41775e2edd69a83f592e3534930c934d4038e.
It broke feature detection that was working just fine for us.
---
tools/perf/config/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 094ddae..9b8937c 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -32,7 +32,7 @@ ifeq ($(ARCH),x86)
LIBUNWIND_LIBS = -lunwind -lunwind-x86_64
$(call detected,CONFIG_X86_64)
else
- LIBUNWIND_LIBS = -lunwind-x86 -llzma -lunwind
+ LIBUNWIND_LIBS = -lunwind -lunwind-x86
endif
NO_PERF_REGS := 0
endif

View File

@ -0,0 +1,57 @@
From d9ea89d8408f647c05c720bf35a1fba4992dd4a8 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben@decadent.org.uk>
Date: Thu, 18 Feb 2016 23:37:19 +0000
Subject: [PATCH] Revert "perf tools, x86: Build perf on older user-space as
well"
This reverts commit eae7a755ee81129370c8f555b0d5672e6673735d.
The empty unistd_{32,64}.h headers prevent building on sh, which also
now splits its unistd.h this way.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
tools/perf/perf-sys.h | 6 ------
tools/perf/util/include/asm/unistd_32.h | 1 -
tools/perf/util/include/asm/unistd_64.h | 1 -
3 files changed, 8 deletions(-)
delete mode 100644 tools/perf/util/include/asm/unistd_32.h
delete mode 100644 tools/perf/util/include/asm/unistd_64.h
diff --git a/tools/perf/perf-sys.h b/tools/perf/perf-sys.h
index 83a25cef82fd..182a84eb5bd6 100644
--- a/tools/perf/perf-sys.h
+++ b/tools/perf/perf-sys.h
@@ -11,9 +11,6 @@
#if defined(__i386__)
#define cpu_relax() asm volatile("rep; nop" ::: "memory");
#define CPUINFO_PROC {"model name"}
-#ifndef __NR_perf_event_open
-# define __NR_perf_event_open 336
-#endif
#ifndef __NR_futex
# define __NR_futex 240
#endif
@@ -25,9 +22,6 @@
#if defined(__x86_64__)
#define cpu_relax() asm volatile("rep; nop" ::: "memory");
#define CPUINFO_PROC {"model name"}
-#ifndef __NR_perf_event_open
-# define __NR_perf_event_open 298
-#endif
#ifndef __NR_futex
# define __NR_futex 202
#endif
diff --git a/tools/perf/util/include/asm/unistd_32.h b/tools/perf/util/include/asm/unistd_32.h
deleted file mode 100644
index 8b137891791f..000000000000
--- a/tools/perf/util/include/asm/unistd_32.h
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/tools/perf/util/include/asm/unistd_64.h b/tools/perf/util/include/asm/unistd_64.h
deleted file mode 100644
index 8b137891791f..000000000000
--- a/tools/perf/util/include/asm/unistd_64.h
+++ /dev/null
@@ -1 +0,0 @@
-

23
debian/patches/series vendored
View File

@ -87,3 +87,26 @@ bugfix/all/uas-fix-high-order-alloc.patch
bugfix/x86/x86-mm-pat-fix-boot-crash-when-1gb-pages-are-not-supported.patch
bugfix/all/netfilter-x_tables-check-for-size-overflow.patch
bugfix/x86/vmxnet3-fix-lock-imbalance-in-vmxnet3_tq_xmit.patch
modpost-symbol-prefix.patch
tools-perf-version.patch
tools-perf-install.patch
usbip-document-tcp-wrappers.patch
kbuild-fix-recordmcount-dependency.patch
usbip-include-uninstalled-linux-usbip-h.patch
tools-perf-man-date.patch
lockdep-fix-oot-build.patch
lockdep-fix-soname.patch
tools-perf-remove-shebangs.patch
tools-lib-traceevent-use-ldflags.patch
tools-lib-lockdep-use-ldflags.patch
tools-hv-fix-fortify-format-warning.patch
revert-perf-build-fix-libunwind-feature-detection-on.patch
alpha-uapi-add-support-for-__sane_userspace_types__.patch
perf-fix-misleadingly-indented-assignment-whitespace.patch
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
tools-lib-traceevent-fix-use-of-uninitialized-variables.patches

View File

@ -0,0 +1,23 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sun, 21 Feb 2016 15:33:15 +0000
Subject: tools/build: Remove bpf() run-time check at build time
It is not correct to test that a syscall works on the build system's
kernel. We might be building on an earlier kernel version or with
security restrictions that block bpf().
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/tools/build/feature/test-bpf.c
+++ b/tools/build/feature/test-bpf.c
@@ -28,9 +28,5 @@ int main(void)
attr.kern_version = 0;
attr = attr;
- /*
- * Test existence of __NR_bpf and BPF_PROG_LOAD.
- * This call should fail if we run the testcase.
- */
- return syscall(__NR_bpf, BPF_PROG_LOAD, attr, sizeof(attr));
+ return 0;
}

View File

@ -0,0 +1,54 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 25 Sep 2015 20:28:10 +0100
Subject: tools/hv: Fix fortify format warning
With fortify enabled, gcc warns:
tools/hv/hv_kvp_daemon.c:705:2: error: format not a string literal and no format arguments [-Werror=format-security]
snprintf(dev_id, sizeof(dev_id), kvp_net_dir);
^
kvp_net_dir is a pointer to a string literal, but lacks const
qualification. As it is never modified, it should be a const
array rather than a pointer.
Also, while snprintf() has a bounds check, the following strcat()s
do not. Combine them into a single snprintf().
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -691,10 +691,10 @@ static char *kvp_mac_to_if_name(char *ma
DIR *dir;
struct dirent *entry;
FILE *file;
- char *p, *q, *x;
+ char *p, *x;
char *if_name = NULL;
char buf[256];
- char *kvp_net_dir = "/sys/class/net/";
+ const char kvp_net_dir[] = "/sys/class/net/";
char dev_id[256];
unsigned int i;
@@ -702,17 +702,9 @@ static char *kvp_mac_to_if_name(char *ma
if (dir == NULL)
return NULL;
- snprintf(dev_id, sizeof(dev_id), kvp_net_dir);
- q = dev_id + strlen(kvp_net_dir);
-
while ((entry = readdir(dir)) != NULL) {
- /*
- * Set the state for the next pass.
- */
- *q = '\0';
-
- strcat(dev_id, entry->d_name);
- strcat(dev_id, "/address");
+ snprintf(dev_id, sizeof(dev_id), "%s%s/address",
+ kvp_net_dir, entry->d_name);
file = fopen(dev_id, "r");
if (file == NULL)

View File

@ -0,0 +1,17 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 25 Sep 2015 21:36:29 +0100
Subject: tools/lib/lockdep: Use LDFLAGS
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/tools/lib/lockdep/Makefile
+++ b/tools/lib/lockdep/Makefile
@@ -98,7 +98,7 @@ build := -f $(srctree)/tools/build/Makef
do_compile_shared_library = \
($(print_shared_lib_compile) \
- $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='$(@F)';$(shell ln -s $(@F) $(@D)/liblockdep.so))
+ $(CC) $(LDFLAGS) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='$(@F)';$(shell ln -s $(@F) $(@D)/liblockdep.so))
do_build_static_lib = \
($(print_static_lib_build) \

View File

@ -0,0 +1,69 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sun, 20 Mar 2016 21:09:02 +0000
Subject: tools lib traceevent: Fix use of uninitialized variables
Fix a number of correct warnings from gcc:
> plugin_function.c:133:6: warning: 'index' may be used uninitialized in this function [-Wmaybe-uninitialized]
> int index;
> ^
'index' is initialized only if indentation is wanted. Move the
printing of indentation using 'index' into the same if-statement.
> kbuffer-parse.c:339:27: warning: 'length' may be used uninitialized in this function [-Wmaybe-uninitialized]
> kbuf->next = kbuf->index + length;
> ^
> kbuffer-parse.c:297:15: note: 'length' was declared here
> unsigned int length;
> ^
'length' is not initialized when handling an OLD_RINGBUF_TYPE_TIME_EXTEND
record. Based on what trace-cmd does, set length = 0 in this case.
> kbuffer-parse.c: In function 'kbuffer_read_at_offset':
> kbuffer-parse.c:632:9: warning: 'data' may be used uninitialized in this function [-Wmaybe-uninitialized]
> return data;
> ^
'data' is not initialized if the offset is too small. Initialize it
to NULL so that the behaviour is the same as when the offset is too
large.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/tools/lib/traceevent/kbuffer-parse.c
+++ b/tools/lib/traceevent/kbuffer-parse.c
@@ -314,6 +314,7 @@ static unsigned int old_update_pointers(
extend <<= TS_SHIFT;
extend += delta;
delta = extend;
+ length = 0;
ptr += 4;
break;
@@ -613,7 +614,7 @@ unsigned long long kbuffer_timestamp(str
void *kbuffer_read_at_offset(struct kbuffer *kbuf, int offset,
unsigned long long *ts)
{
- void *data;
+ void *data = NULL;
if (offset < kbuf->start)
offset = 0;
--- a/tools/lib/traceevent/plugin_function.c
+++ b/tools/lib/traceevent/plugin_function.c
@@ -142,10 +142,10 @@ static int function_handler(struct trace
parent = pevent_find_function(pevent, pfunction);
- if (parent && ftrace_indent->set)
+ if (parent && ftrace_indent->set) {
index = add_and_get_index(parent, func, record->cpu);
-
- trace_seq_printf(s, "%*s", index*3, "");
+ trace_seq_printf(s, "%*s", index*3, "");
+ }
if (func)
trace_seq_printf(s, "%s", func);

View File

@ -0,0 +1,26 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 25 Sep 2015 21:26:48 +0100
Subject: tools/lib/traceevent: Use LDFLAGS
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -172,7 +172,7 @@ $(TE_IN): force
$(Q)$(MAKE) $(build)=libtraceevent
$(OUTPUT)libtraceevent.so: $(TE_IN)
- $(QUIET_LINK)$(CC) --shared $^ -o $@
+ $(QUIET_LINK)$(CC) $(LDFLAGS) --shared $^ -o $@
$(OUTPUT)libtraceevent.a: $(TE_IN)
$(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^
@@ -189,7 +189,7 @@ $(PLUGINS_IN): force
$(Q)$(MAKE) $(build)=$(plugin_obj)
$(OUTPUT)%.so: $(OUTPUT)%-in.o
- $(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $^
+ $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) -shared -nostartfiles -o $@ $^
define make_version.h
(echo '/* This file is automatically generated. Do not modify. */'; \

50
debian/patches/tools-perf-install.patch vendored Normal file
View File

@ -0,0 +1,50 @@
From: Bastian Blank <waldi@debian.org>
Date: Fri, 07 Oct 2011 21:37:52 +0100
Subject: Install perf scripts non-executable
Forwarded: no
[bwh: Forward-ported to 3.12]
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -563,8 +563,8 @@ endif
ifndef NO_LIBPERL
$(call QUIET_INSTALL, perl-scripts) \
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \
- $(INSTALL) scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \
- $(INSTALL) scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl'; \
+ $(INSTALL) -m 644 scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \
+ $(INSTALL) -m 644 scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl'; \
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin'; \
$(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin'
endif
@@ -572,23 +572,23 @@ ifndef NO_LIBPYTHON
$(call QUIET_INSTALL, python-scripts) \
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'; \
- $(INSTALL) scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \
- $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'; \
+ $(INSTALL) -m 644 scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \
+ $(INSTALL) -m 644 scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'; \
$(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'
endif
$(call QUIET_INSTALL, perf_completion-script) \
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \
- $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)'
+ $(INSTALL) -m 644 perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)'
$(call QUIET_INSTALL, perf-tip) \
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(tip_instdir_SQ)'; \
- $(INSTALL) Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)'
+ $(INSTALL) -m 644 Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)'
install-tests: all install-gtk
$(call QUIET_INSTALL, tests) \
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \
- $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \
+ $(INSTALL) -m 644 tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \
- $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'
+ $(INSTALL) -m 644 tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'
install-bin: install-tools install-tests

View File

@ -0,0 +1,32 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Mon, 13 Jul 2015 20:29:20 +0100
Subject: perf tools: Use $KBUILD_BUILD_TIMESTAMP as man page date
This allows man pages to be built reproducibly.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -120,6 +120,9 @@ endif
ifdef DOCBOOK_SUPPRESS_SP
XMLTO_EXTRA += -m manpage-suppress-sp.xsl
endif
+ifdef KBUILD_BUILD_TIMESTAMP
+ASCIIDOC_EXTRA += -a revdate=$(shell date -u -d '$(KBUILD_BUILD_TIMESTAMP)' +%Y-%m-%d)
+endif
SHELL_PATH ?= $(SHELL)
# Shell quote;
--- a/tools/perf/Documentation/asciidoc.conf
+++ b/tools/perf/Documentation/asciidoc.conf
@@ -71,6 +71,9 @@ ifdef::backend-docbook[]
[header]
template::[header-declarations]
<refentry>
+<refentryinfo>
+template::[docinfo]
+</refentryinfo>
<refmeta>
<refentrytitle>{mantitle}</refentrytitle>
<manvolnum>{manvolnum}</manvolnum>

View File

@ -0,0 +1,38 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 25 Sep 2015 20:09:23 +0100
Subject: tools/perf: Remove shebang lines from perf scripts
perf scripts need to be invoked through perf, not directly through
perl (or other language interpreter). So including shebang lines in
them is useless and possibly misleading.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/tools/perf/scripts/perl/rw-by-file.pl
+++ b/tools/perf/scripts/perl/rw-by-file.pl
@@ -1,4 +1,3 @@
-#!/usr/bin/perl -w
# (c) 2009, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
--- a/tools/perf/scripts/perl/rw-by-pid.pl
+++ b/tools/perf/scripts/perl/rw-by-pid.pl
@@ -1,4 +1,3 @@
-#!/usr/bin/perl -w
# (c) 2009, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
--- a/tools/perf/scripts/perl/rwtop.pl
+++ b/tools/perf/scripts/perl/rwtop.pl
@@ -1,4 +1,3 @@
-#!/usr/bin/perl -w
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
--- a/tools/perf/scripts/perl/wakeup-latency.pl
+++ b/tools/perf/scripts/perl/wakeup-latency.pl
@@ -1,4 +1,3 @@
-#!/usr/bin/perl -w
# (c) 2009, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2

106
debian/patches/tools-perf-version.patch vendored Normal file
View File

@ -0,0 +1,106 @@
From: Bastian Blank <waldi@debian.org>
Date: Mon, 26 Sep 2011 13:53:12 +0100
Subject: Create manpages and binaries including the version
Forwarded: no
[bwh: Fix version insertion in perf man page cross-references and perf
man page title. Install bash_completion script for perf with a
version-dependent name. And do the same for trace.]
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -539,18 +539,18 @@ install-gtk:
install-tools: all install-gtk
$(call QUIET_INSTALL, binaries) \
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \
- $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)'; \
- $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf' '$(DESTDIR_SQ)$(bindir_SQ)/trace'
+ $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)'; \
+ $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)' '$(DESTDIR_SQ)$(bindir_SQ)/trace_$(VERSION)'
+ $(call QUIET_INSTALL, libexec) \
+ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'
ifndef NO_PERF_READ_VDSO32
$(call QUIET_INSTALL, perf-read-vdso32) \
- $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(bindir_SQ)';
+ $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)';
endif
ifndef NO_PERF_READ_VDSOX32
$(call QUIET_INSTALL, perf-read-vdsox32) \
- $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(bindir_SQ)';
+ $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)';
endif
- $(call QUIET_INSTALL, libexec) \
- $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'
$(call QUIET_INSTALL, perf-archive) \
$(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'
$(call QUIET_INSTALL, perf-with-kcore) \
@@ -578,7 +578,7 @@ ifndef NO_LIBPYTHON
endif
$(call QUIET_INSTALL, perf_completion-script) \
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \
- $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf'
+ $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)'
$(call QUIET_INSTALL, perf-tip) \
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(tip_instdir_SQ)'; \
$(INSTALL) Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)'
@@ -599,7 +599,7 @@ install-python_ext:
# 'make install-doc' should call 'make -C Documentation install'
$(INSTALL_DOC_TARGETS):
- $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) $(@:-doc=)
+ $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) $(@:-doc=) VERSION=$(VERSION)
### Cleaning rules
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -183,14 +183,16 @@ ifdef missing_tools
$(error "You need to install $(missing_tools) for man pages")
endif
-do-install-man: man
+do-install-man: $(addprefix install-man-,$(_DOC_MAN1))
+
+install-man-perf.1: $(OUTPUT)perf.1
+ $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
+ sed -e 's/"PERF"/"PERF_$(VERSION)"/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION).1
+
+install-man-perf%.1: $(OUTPUT)perf%.1
$(call QUIET_INSTALL, Documentation-man) \
$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir); \
-# $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir); \
-# $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir); \
- $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir); \
-# $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir); \
-# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir)
+ sed -e 's/"PERF\\-/"PERF_$(VERSION)\\-/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION)$*.1
install-man: check-man-tools man
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -138,6 +138,7 @@ CFLAGS_rbtree.o += -Wno-unused-pa
CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
CFLAGS_parse-events.o += -Wno-redundant-decls
+CFLAGS_vdso.o += -DPERFEXECDIR='"$(perfexec_instdir_SQ)"'
$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
$(call rule_mkdir)
--- a/tools/perf/util/vdso.c
+++ b/tools/perf/util/vdso.c
@@ -51,12 +51,12 @@ static struct vdso_info *vdso_info__new(
.vdso32 = {
.temp_file_name = VDSO__TEMP_FILE_NAME,
.dso_name = DSO__NAME_VDSO32,
- .read_prog = "perf-read-vdso32",
+ .read_prog = PERFEXECDIR "/perf-read-vdso32",
},
.vdsox32 = {
.temp_file_name = VDSO__TEMP_FILE_NAME,
.dso_name = DSO__NAME_VDSOX32,
- .read_prog = "perf-read-vdsox32",
+ .read_prog = PERFEXECDIR "/perf-read-vdsox32",
},
#endif
};

View File

@ -0,0 +1,29 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sun, 24 Jun 2012 02:51:39 +0100
Subject: usbip: Document TCP wrappers
Forwarded: no
Add references to TCP wrappers configuration in the manual page.
--- a/tools/usb/usbip/doc/usbipd.8
+++ b/tools/usb/usbip/doc/usbipd.8
@@ -14,7 +14,8 @@ Devices have to explicitly be exported u
before usbipd makes them available to other hosts.
The daemon accepts connections from USB/IP clients
-on TCP port 3240 by default.
+on TCP port 3240 by default. The clients authorised to connect may be
+configured as documented in hosts_access(5).
.SH OPTIONS
.HP
@@ -69,7 +70,8 @@ Show version.
.B usbipd
offers no authentication or authorization for USB/IP. Any
-USB/IP client can connect and use exported devices.
+USB/IP client running on an authorised host can connect and
+use exported devices.
.SH EXAMPLES

View File

@ -0,0 +1,27 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 17 Oct 2014 13:55:16 +0200
Subject: usbip: Include uninstalled <linux/usbip.h>
We need to include <linux/usbip.h> from the current kernel
source, not the installed linux-libc-dev. The clean way to
do this is probably to run 'make headers_install' and then
add $(top_srcdir)/usr/include to the front of the system
header list. But I don't have time to implement that right
now.
The wrong way to do it is to add include/uapi to the header
path. <linux/types.h> explicitly prevents this from working.
But we can get away with selectively including UAPI headers
without unifdef processing, so do that here.
--- a/tools/usb/usbip/libsrc/usbip_common.h
+++ b/tools/usb/usbip/libsrc/usbip_common.h
@@ -15,7 +15,7 @@
#include <syslog.h>
#include <unistd.h>
#include <linux/usb/ch9.h>
-#include <linux/usbip.h>
+#include "../../../../include/uapi/linux/usbip.h"
#ifndef USBIDS_FILE
#define USBIDS_FILE "/usr/share/hwdata/usb.ids"

4
debian/rules vendored
View File

@ -74,12 +74,12 @@ else
endif
maintainerclean:
rm -f debian/config.defines.dump debian/control debian/control.md5sum debian/linux-* debian/rules.gen debian/po/*.po
rm -f debian/config.defines.dump debian/control debian/control.md5sum debian/linux-headers-* debian/linux-image-* debian/rules.gen debian/po/*.po
rm -rf $(filter-out debian .svk .svn .git, $(wildcard * .[^.]*))
clean: debian/control
dh_testdir
rm -rf $(BUILD_DIR) $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc debian/lib/python/debian_linux/__pycache__ $$(find debian -maxdepth 1 -type d -name 'linux-*') debian/*-modules-*-di* debian/kernel-image-*-di* debian/xen-linux-system-*
rm -rf $(BUILD_DIR) $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc debian/lib/python/debian_linux/__pycache__ $$(find debian -maxdepth 1 -type d -name 'linux-*') debian/*-modules-*-di* debian/kernel-image-*-di* debian/xen-linux-system-* debian/*-tmp
dh_clean
CONTROL_FILES = debian/changelog $(wildcard debian/templates/*.in)

16
debian/rules.d/Makefile vendored Normal file
View File

@ -0,0 +1,16 @@
DATA = \
Kbuild \
Makefile \
SUBDIRS = \
scripts \
tools
include $(top_rulesdir)/Makefile.inc
# Build userland headers first
unexport VERSION
all-local:
$(MAKE) -C $(top_srcdir) O=$(CURDIR) \
INSTALL_HDR_PATH=$(CURDIR) headers_install
all-recursive: all-local

56
debian/rules.d/Makefile.inc vendored Normal file
View File

@ -0,0 +1,56 @@
# Normalise OUTDIR to avoid triggering rebuilds
override OUTDIR := $(patsubst ./%,%,$(OUTDIR))
VPATH = $(top_rulesdir)/$(OUTDIR) $(top_srcdir)/$(OUTDIR)
SHELL = /bin/sh -e
CC = gcc
CXX = g++
CFLAGS := $(shell dpkg-buildflags --get CFLAGS) -Wall
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) \
-I$(top_srcdir)/$(OUTDIR) -I$(top_srcdir)/debian/build/$(OUTDIR) \
-isystem $(top_srcdir)/debian/build/include
CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) -Wall
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
installdir ?= $(prefix)/$(OUTDIR)
all: all-local all-recursive
clean: clean-recursive
install: install-local install-recursive
%-recursive:
+@list='$(SUBDIRS)'; \
for subdir in $$list; do \
echo "Making $* in $$subdir"; \
mkdir -p $$subdir; \
$(MAKE) -C $$subdir -f $(top_rulesdir)/$(OUTDIR)/$$subdir/Makefile OUTDIR=$(OUTDIR)/$$subdir $*; \
done
all-local: $(PROGS)
install-local: install-local-progs install-local-scripts install-local-data
install-local-progs: $(PROGS)
@for p in $^; do \
echo " install -m755 '$$p' '$(DESTDIR)/$(installdir)'"; \
install -D -m755 "$$p" "$(DESTDIR)/$(installdir)/$$(basename $$p)"; \
done
SCRIPTS_REAL = $(wildcard $(addprefix $(top_srcdir)/$(OUTDIR)/,$(SCRIPTS)))
install-local-scripts: $(SCRIPTS_REAL)
@for p in $^; do \
echo " install -m755 '$$p' '$(DESTDIR)/$(installdir)'"; \
install -D -m755 "$$p" "$(DESTDIR)/$(installdir)/$$(basename $$p)"; \
done
DATA_REAL = $(wildcard $(addprefix $(top_srcdir)/$(OUTDIR)/,$(DATA)))
install-local-data: $(DATA_REAL)
@for p in $^; do \
echo " install -m644 '$$p' '$(DESTDIR)/$(installdir)'"; \
install -D -m644 "$$p" "$(DESTDIR)/$(installdir)/$$(basename $$p)"; \
done

39
debian/rules.d/scripts/Makefile vendored Normal file
View File

@ -0,0 +1,39 @@
PROGS = \
conmakehash \
kallsyms \
pnmtologo \
recordmcount
DATA = \
Kbuild.include \
Makefile.* \
mkversion \
module-common.lds
SCRIPTS = \
checkincludes.pl \
checkstack.pl \
checkversion.pl \
depmod.sh \
gcc-*.sh \
gen_initramfs_list.sh \
kernel-doc \
Lindent \
makelst \
mksysmap \
mkuboot.sh \
namespace.pl \
patch-kernel \
recordmcount.pl \
setlocalversion \
ver_linux
SUBDIRS = \
basic \
genksyms \
kconfig \
mod
include $(top_rulesdir)/Makefile.inc
CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64

5
debian/rules.d/scripts/basic/Makefile vendored Normal file
View File

@ -0,0 +1,5 @@
PROGS = \
bin2c \
fixdep
include $(top_rulesdir)/Makefile.inc

View File

@ -0,0 +1,13 @@
PROGS = genksyms
include $(top_rulesdir)/Makefile.inc
genksyms: genksyms.o parse.tab.o lex.lex.o
lex.lex.o: keywords.hash.c parse.tab.h
%.c: %.c_shipped
ln -s $< $@
%.h: %.h_shipped
ln -s $< $@

13
debian/rules.d/scripts/kconfig/Makefile vendored Normal file
View File

@ -0,0 +1,13 @@
PROGS = conf
include $(top_rulesdir)/Makefile.inc
conf: conf.o zconf.tab.o
zconf.tab.c: zconf.hash.c zconf.lex.c
%.c: %.c_shipped
ln -sf $< $@
%.h: %.h_shipped
ln -sf $< $@

22
debian/rules.d/scripts/mod/Makefile vendored Normal file
View File

@ -0,0 +1,22 @@
PROGS = \
modpost \
modpost.real-lsb-32 \
modpost.real-lsb-64 \
modpost.real-msb-32 \
modpost.real-msb-64
include $(top_rulesdir)/Makefile.inc
wrapperdir = $(top_rulesdir)/$(OUTDIR)
modpost.real-%:
$(MAKE) -f $(wrapperdir)/Makefile.real TYPE=$* SOURCEDIR=$(top_srcdir)/scripts/mod
%: %.o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
modpost-opts.h: $(top_srcdir)/scripts/mod/modpost.c
python $(wrapperdir)/gendef.py $< > $@
modpost.o: modpost.c modpost-opts.h
$(CC) $(CFLAGS) -I $(CURDIR) -c -o $@ $<

View File

@ -0,0 +1,23 @@
PROGS = modpost.real-$(TYPE)
include $(top_rulesdir)/Makefile.inc
wrapperdir = $(top_rulesdir)/$(OUTDIR)
CFLAGS += -I $(CURDIR)/real-$(TYPE) -I $(wrapperdir)/real-$(TYPE)
modpost.real-$(TYPE): file2alias.real-$(TYPE).o modpost.real-$(TYPE).o sumversion.real-$(TYPE).o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
%.real-$(TYPE).o: $(SOURCEDIR)/%.c real-$(TYPE)/devicetable-offsets.h
$(CC) $(CFLAGS) -c -o $@ $<
real-$(TYPE)/devicetable-offsets.s: $(SOURCEDIR)/devicetable-offsets.c
mkdir -p real-$(TYPE)
$(CC) -include $(wrapperdir)/real-$(TYPE)/types.h $(CFLAGS) -nostdinc -I$(top_srcdir)/include -S -o $@ $<
real-$(TYPE)/devicetable-offsets.h: real-$(TYPE)/devicetable-offsets.s
echo >$@ "#define __DEVICEVTABLE_OFFSETS_H__"
sed -ne "/^->/{s:->#\(.*\):/* \1 */:; \
s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \
s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
s:->::; p;}" $< >>$@

View File

@ -0,0 +1,7 @@
#include <endian.h>
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define HOST_ELFDATA ELFDATA2LSB
#elif __BYTE_ORDER == __BIG_ENDIAN
#define HOST_ELFDATA ELFDATA2MSB
#endif

20
debian/rules.d/scripts/mod/gendef.py vendored Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/python
import re
import sys
for line in open(sys.argv[1]):
match = re.search('getopt\(argc, argv, "([\w:]*?)"\)', line)
if match:
options = match.group(1)
break
else:
raise RuntimeError
print '#define GETOPT_OPTIONS "%s"' % options
print '#define GETOPT_CASE',
for c in options:
if c == ':' or c == 'T':
continue
print "case '%c':" % c,
print

136
debian/rules.d/scripts/mod/modpost.c vendored Normal file
View File

@ -0,0 +1,136 @@
#include <elf.h>
#include <errno.h>
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "modpost-opts.h"
int main (int argc, char *argv[])
{
char const *data, *class;
char *list_name = NULL;
char *name = NULL;
char prog[1024];
unsigned char ei[EI_NIDENT];
int opt;
FILE *file;
while ((opt = getopt (argc, argv, GETOPT_OPTIONS)) != -1)
{
switch(opt)
{
GETOPT_CASE
break;
case 'T':
list_name = optarg;
break;
default:
return EXIT_FAILURE;
}
}
if (optind != argc)
{
name = argv[optind];
}
else if (list_name)
{
size_t name_len;
int is_stdin = strcmp (list_name, "-") == 0;
/* Read first line of list file */
if (is_stdin)
{
file = stdin;
setvbuf(stdin, NULL, _IONBF, 0); /* don't over-read */
}
else
{
file = fopen (list_name, "r");
if (!file)
{
fprintf (stderr, "Can't open \"%s\"\n", list_name);
return EXIT_FAILURE;
}
}
if (getline (&name, &name_len, file) < 0)
{
if (errno)
{
fprintf (stderr, "Can't read \"%s\"\n", list_name);
return EXIT_FAILURE;
}
else
{
/* Empty list */
return EXIT_SUCCESS;
}
}
if (!is_stdin)
fclose(file);
/* Remove new-line */
name [strcspn (name, "\n")] = 0;
/* If this came from stdin, we need to add the first name to the
* arguments, because the upstream modpost can't read it again.
*/
if (is_stdin)
{
char **new_argv = malloc (sizeof(*argv) * (argc + 2));
memcpy(new_argv, argv, sizeof(*argv) * argc);
new_argv [argc] = name;
new_argv [argc + 1] = NULL;
argv = new_argv;
}
}
else
{
/* Empty list */
return EXIT_SUCCESS;
}
if (!(file = fopen (name, "r")))
{
fprintf (stderr, "Can't open \"%s\"\n", name);
return EXIT_FAILURE;
}
if (fread (ei, 1, EI_NIDENT, file) != EI_NIDENT)
{
fprintf (stderr, "Error: input truncated\n");
return EXIT_FAILURE;
}
if (memcmp (ei, ELFMAG, SELFMAG) != 0)
{
fprintf (stderr, "Error: not ELF\n");
return EXIT_FAILURE;
}
switch (ei[EI_DATA]) {
case ELFDATA2LSB:
data = "lsb";
break;
case ELFDATA2MSB:
data = "msb";
break;
default:
return EXIT_FAILURE;
}
switch (ei[EI_CLASS]) {
case ELFCLASS32:
class = "32";
break;
case ELFCLASS64:
class = "64";
break;
default:
return EXIT_FAILURE;
}
snprintf (prog, sizeof prog, "%s.real-%s-%s", argv[0], data, class);
return execv (prog, argv);
}

View File

@ -0,0 +1,4 @@
#define KERNEL_ELFCLASS ELFCLASS32
#define KERNEL_ELFDATA ELFDATA2LSB
#define MODULE_SYMBOL_PREFIX ""
#include "../elfconfig.h"

View File

@ -0,0 +1,3 @@
#include "../types.h"
typedef __u32 kernel_ulong_t;
#define BITS_PER_LONG 32

View File

@ -0,0 +1,4 @@
#define KERNEL_ELFCLASS ELFCLASS64
#define KERNEL_ELFDATA ELFDATA2LSB
#define MODULE_SYMBOL_PREFIX ""
#include "../elfconfig.h"

View File

@ -0,0 +1,3 @@
#include "../types.h"
typedef __u64 __attribute__((aligned(8))) kernel_ulong_t;
#define BITS_PER_LONG 64

View File

@ -0,0 +1,4 @@
#define KERNEL_ELFCLASS ELFCLASS32
#define KERNEL_ELFDATA ELFDATA2MSB
#define MODULE_SYMBOL_PREFIX ""
#include "../elfconfig.h"

View File

@ -0,0 +1,3 @@
#include "../types.h"
typedef __u32 kernel_ulong_t;
#define BITS_PER_LONG 32

View File

@ -0,0 +1,4 @@
#define KERNEL_ELFCLASS ELFCLASS64
#define KERNEL_ELFDATA ELFDATA2MSB
#define MODULE_SYMBOL_PREFIX ""
#include "../elfconfig.h"

View File

@ -0,0 +1,3 @@
#include "../types.h"
typedef __u64 __attribute__((aligned(8))) kernel_ulong_t;
#define BITS_PER_LONG 64

9
debian/rules.d/scripts/mod/types.h vendored Normal file
View File

@ -0,0 +1,9 @@
/* Minimal definitions for mod_devicetable.h and devicetable-offsets.c */
typedef unsigned char __u8;
typedef unsigned short __u16;
typedef unsigned int __u32;
typedef unsigned long long __u64;
typedef struct {
__u8 b[16];
} uuid_le;
#define offsetof(a,b) __builtin_offsetof(a,b)

8
debian/rules.d/tools/Makefile vendored Normal file
View File

@ -0,0 +1,8 @@
SUBDIRS = \
hv \
lib/lockdep \
perf \
power/cpupower \
usb/usbip
include $(top_rulesdir)/Makefile.inc

22
debian/rules.d/tools/hv/Makefile vendored Normal file
View File

@ -0,0 +1,22 @@
ifeq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),)
# Build nothing
include $(top_rulesdir)/Makefile.inc
else
PROGS = \
hv_fcopy_daemon \
hv_kvp_daemon \
hv_vss_daemon
installdir = /usr/sbin
include $(top_rulesdir)/Makefile.inc
# Handle check-hyperv separately since it's installed in a different directory
all-local: check-hyperv
install-local:
install -D -m755 check-hyperv '$(DESTDIR)/lib/hyperv-daemons/check-hyperv'
endif

103
debian/rules.d/tools/hv/check-hyperv.c vendored Normal file
View File

@ -0,0 +1,103 @@
/*
* This program is derived from systemd.
*
* Copyright 2011 Lennart Poettering
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#define streq(a, b) (!strcmp(a, b))
#define ELEMENTSOF(a) (sizeof(a) / sizeof((a)[0]))
enum {
VIRTUALIZATION_NONE,
VIRTUALIZATION_VM_OTHER,
VIRTUALIZATION_MICROSOFT,
};
static int detect_vm_cpuid(void) {
static const struct {
const char *cpuid;
int id;
} cpuid_vendor_table[] = {
/* http://msdn.microsoft.com/en-us/library/ff542428.aspx */
{ "Microsoft Hv", VIRTUALIZATION_MICROSOFT },
};
uint32_t eax, ecx;
bool hypervisor;
/* http://lwn.net/Articles/301888/ */
#if defined (__i386__)
#define REG_a "eax"
#define REG_b "ebx"
#elif defined (__amd64__)
#define REG_a "rax"
#define REG_b "rbx"
#endif
/* First detect whether there is a hypervisor */
eax = 1;
__asm__ __volatile__ (
/* ebx/rbx is being used for PIC! */
" push %%"REG_b" \n\t"
" cpuid \n\t"
" pop %%"REG_b" \n\t"
: "=a" (eax), "=c" (ecx)
: "0" (eax)
);
hypervisor = !!(ecx & 0x80000000U);
if (hypervisor) {
union {
uint32_t sig32[3];
char text[13];
} sig = {};
unsigned j;
/* There is a hypervisor, see what it is */
eax = 0x40000000U;
__asm__ __volatile__ (
/* ebx/rbx is being used for PIC! */
" push %%"REG_b" \n\t"
" cpuid \n\t"
" mov %%ebx, %1 \n\t"
" pop %%"REG_b" \n\t"
: "=a" (eax), "=r" (sig.sig32[0]), "=c" (sig.sig32[1]), "=d" (sig.sig32[2])
: "0" (eax)
);
for (j = 0; j < ELEMENTSOF(cpuid_vendor_table); j ++)
if (streq(sig.text, cpuid_vendor_table[j].cpuid))
return cpuid_vendor_table[j].id;
return VIRTUALIZATION_VM_OTHER;
}
return VIRTUALIZATION_NONE;
}
int main(void)
{
return detect_vm_cpuid() != VIRTUALIZATION_MICROSOFT;
}

View File

@ -0,0 +1,20 @@
include $(top_rulesdir)/Makefile.inc
DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
MAKE_LOCKDEP := +$(MAKE) -C $(top_srcdir)/$(OUTDIR) O=$(CURDIR) V=1 \
prefix=/usr libdir_relative=lib/$(DEB_HOST_MULTIARCH) \
LIBLOCKDEP_VERSION=$(VERSION) \
CONFIG_FLAGS='$(CFLAGS) $(filter -D%,$(CPPFLAGS))' LDFLAGS='$(LDFLAGS)'
unexport CFLAGS
all:
$(MAKE_LOCKDEP)
install:
$(MAKE_LOCKDEP) install
mkdir -p $(DESTDIR)/usr/include
cp -R $(top_srcdir)/$(OUTDIR)/include/liblockdep $(DESTDIR)/usr/include/
ln -s liblockdep.so.$(VERSION) \
$(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/liblockdep.so

View File

@ -0,0 +1,2 @@
#!/bin/sh
LD_PRELOAD="liblockdep.so.@VERSION@ $LD_PRELOAD" exec "$@"

72
debian/rules.d/tools/perf/Makefile vendored Normal file
View File

@ -0,0 +1,72 @@
include $(top_rulesdir)/Makefile.inc
DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
ifeq ($(DEB_HOST_ARCH_CPU),alpha)
KERNEL_ARCH_PERF = alpha
else ifeq ($(DEB_HOST_ARCH_CPU),arm)
KERNEL_ARCH_PERF = arm
else ifeq ($(DEB_HOST_ARCH_CPU),arm64)
KERNEL_ARCH_PERF = arm64
else ifneq ($(filter mips%,$(DEB_HOST_ARCH_CPU)),)
KERNEL_ARCH_PERF = mips
else ifeq ($(DEB_HOST_ARCH_CPU),hppa)
KERNEL_ARCH_PERF = parisc
else ifneq ($(filter powerpc% ppc%,$(DEB_HOST_ARCH_CPU)),)
KERNEL_ARCH_PERF = powerpc
else ifneq ($(filter s390%,$(DEB_HOST_ARCH_CPU)),)
KERNEL_ARCH_PERF = s390
else ifeq ($(DEB_HOST_ARCH_CPU),sh4)
KERNEL_ARCH_PERF = sh
else ifneq ($(filter sparc%,$(DEB_HOST_ARCH_CPU)),)
KERNEL_ARCH_PERF = sparc
else ifneq ($(filter amd64 i386,$(DEB_HOST_ARCH_CPU)),)
# But x32 isn't supported yet
ifneq ($(shell dpkg-architecture -qDEB_HOST_ARCH),x32)
KERNEL_ARCH_PERF = x86
endif
endif
MAKE_PERF := $(MAKE) O=$(CURDIR) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error EXTRA_CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)'
# Disable Gtk UI until it's more usable
MAKE_PERF += NO_GTK2=1
# Include version in all directory names
MAKE_PERF += perfexecdir=lib/perf_$(VERSION)-core plugindir=/usr/lib/traceevent_$(VERSION)/plugins STRACE_GROUPS_DIR=share/perf_$(VERSION)-core/strace/groups
# perf can link against libbfd if available, but the result is
# undistributable as they are licenced under GPL v2 and v3+
# respectively. Override detection of libbfd and insist that
# cplus_demangle() can be found in libiberty (LGPL v2.1+).
MAKE_PERF += feature-libbfd=0 HAVE_CPLUS_DEMANGLE_SUPPORT=1
all:
ifdef KERNEL_ARCH_PERF
# perf changes some default directories depending on whether DESTDIR is
# set. We must define it even when building to avoid a rebuild when we
# run 'make install'.
+$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf all VERSION=$(VERSION) DESTDIR=dummy
+$(MAKE_PERF) -C $(top_srcdir)/tools/perf/Documentation man VERSION=$(VERSION)
# Check that perf didn't get linked against libbfd
type ldd
! ldd $(CURDIR)/perf | grep '\blibbfd'
# Check that it includes cplus_demangle from libiberty
grep cplus_demangle $(CURDIR)/perf
endif
install:
ifdef KERNEL_ARCH_PERF
+$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf install VERSION=$(VERSION)
# Don't install a 'trace' alias yet:
# - We need a wrapper for it anyway, so there's little point adding a
# versioned link
# - It doesn't work out-of-the-box as non-root (it depends on debugfs),
# so it's less widely useful than strace
# - 'perf trace' doesn't take much more typing
rm -f $(DESTDIR)/usr/bin/trace_$(VERSION)
endif
mkdir -p $(DESTDIR)/usr/share/bash-completion/
mv $(DESTDIR)/etc/bash_completion.d \
$(DESTDIR)/usr/share/bash-completion/completions
rmdir --ignore-fail-on-non-empty $(DESTDIR)/etc

View File

@ -0,0 +1,14 @@
include $(top_rulesdir)/Makefile.inc
ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
DEBUG = true
endif
all:
$(shell dpkg-buildflags --export=cmdline) $(MAKE) -C $(top_srcdir)/tools/power/cpupower O=$(CURDIR) DEBUG=$(DEBUG) CPUFREQ_BENCH=false V=true
install:
$(MAKE) -C $(top_srcdir)/tools/power/cpupower O=$(CURDIR) install mandir=/usr/share/man DESTDIR=$(DESTDIR) CPUFREQ_BENCH=false
clean:
$(MAKE) -C $(top_srcdir)/tools/power/cpupower O=$(CURDIR) clean

22
debian/rules.d/tools/usb/usbip/Makefile vendored Normal file
View File

@ -0,0 +1,22 @@
srcdir := $(top_srcdir)/tools/usb/usbip
# Make sure we don't override top_srcdir in the sub-make. 'unexport
# top_srcdir' is *not* sufficient; nor is adding 'MAKEFLAGS=' to the
# sub-make command line.
unexport MAKEFLAGS
all:
cd $(srcdir) && ./autogen.sh
$(shell dpkg-buildflags --export=cmdline) $(srcdir)/configure \
--prefix=/usr \
--with-tcp-wrappers \
--with-usbids-dir=/usr/share/misc \
--disable-shared
$(MAKE)
install:
$(MAKE) install
clean:
rm -rf $(addprefix $(srcdir)/,autom4te.cache aclocal.m4 compile config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing)
find $(srcdir)/ -name Makefile.in -delete

182
debian/rules.real vendored
View File

@ -71,6 +71,18 @@ endif
binary-indep: install-source
binary-indep: install-support
ifneq ($(DO_TOOLS),False)
build-arch-arch: $(STAMPS_DIR)/build-tools
binary-arch-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-arch: install-perf
endif
ifneq ($(filter i386 amd64 x32,$(DEB_BUILD_ARCH)),)
binary-arch-arch: install-hyperv-daemons
endif
binary-indep: install-lockdep
endif
build-arch-flavour: $(STAMPS_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
setup-arch-flavour: $(STAMPS_DIR)/setup_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
@ -467,4 +479,174 @@ install-source: $(BUILD_DIR)/$(SOURCE_PACKAGE_NAME)-source-$(UPSTREAMVERSION).ta
# other things (#725492). So use the fastest real gzip mode.
+$(MAKE_SELF) install-base BUILDDEB_ARGS='-Zgzip -z1'
define submake
+mkdir -p $(BUILD_DIR)/$(1) && $(MAKE_CLEAN) -C $(BUILD_DIR)/$(1) -f $(CURDIR)/debian/rules.d/$(1)/Makefile top_srcdir=$(CURDIR) top_rulesdir=$(CURDIR)/debian/rules.d OUTDIR=$(1)
endef
$(STAMPS_DIR)/build-tools:
$(call submake,.)
@$(stamp)
install-kbuild: PACKAGE_NAME = linux-kbuild-$(VERSION)
install-kbuild: DH_OPTIONS = -p$(PACKAGE_NAME)
install-kbuild: PREFIX_DIR = /usr/lib/$(PACKAGE_NAME)
install-kbuild: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
install-kbuild: $(STAMPS_DIR)/build
dh_testdir
dh_testroot
dh_prep
$(call submake,scripts) install DESTDIR=$(DIR) prefix=$(PREFIX_DIR)
dh_link $(PREFIX_DIR) /usr/src/$(PACKAGE_NAME)
dh_installchangelogs
dh_installdocs
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
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
$(call submake,tools/power/cpupower) install 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)
install-perf: $(STAMPS_DIR)/build
dh_testdir
dh_testroot
dh_prep
$(call submake,tools/perf) install DESTDIR=$(DIR)
dh_perl /usr/share/perf_$(VERSION)-core/scripts/perl/Perf-Trace-Util/lib/
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
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
install-usbip: DH_OPTIONS = -plibusbip-dev -pusbip
install-usbip: DIR = $(CURDIR)/debian/usbip-tmp
install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/tools/usb/usbip/config.h)
install-usbip: $(STAMPS_DIR)/build
dh_testdir
dh_testroot
dh_prep
$(call submake,tools/usb/usbip) install DESTDIR=$(DIR)
dh_install --sourcedir=$(DIR)
dh_installchangelogs
dh_installdocs
dh_lintian
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
test -n "$(VERSION)" -a -n "$(DEB_VERSION)"
dh_gencontrol -- -v$(VERSION)+$(DEB_VERSION)
dh_md5sums
dh_builddeb
install-hyperv-daemons: PACKAGE_NAME = hyperv-daemons
install-hyperv-daemons: DH_OPTIONS = -p$(PACKAGE_NAME)
install-hyperv-daemons: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
install-hyperv-daemons: $(STAMPS_DIR)/build
dh_testdir
dh_testroot
dh_prep
$(call submake,tools/hv) install DESTDIR=$(DIR)
dh_install
for service in fcopy kvp vss; do \
install -D -m755 debian/hyperv-daemons.hv-$$service-daemon.init \
$(DIR)/etc/init.d/hyperv-daemons.hv-$$service-daemon \
|| break; \
done
dh_installchangelogs
dh_installdocs
dh_systemd_enable
for service in fcopy kvp vss; do \
dh_installinit --name hyperv-daemons.hv-$$service-daemon \
--onlyscripts \
|| break; \
done
dh_systemd_start
dh_lintian
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
install-liblockdep: DH_OPTIONS = -pliblockdep$(VERSION) -pliblockdep-dev
install-liblockdep: DIR = $(CURDIR)/debian/liblockdep-tmp
install-liblockdep: $(STAMPS_DIR)/build
dh_testdir
dh_testroot
dh_prep
$(call submake,tools/lib/lockdep) install DESTDIR=$(DIR)
env -u DH_OPTIONS dh_install -pliblockdep$(VERSION) --sourcedir=$(DIR) \
'usr/lib/*/liblockdep.so.*'
dh_install --sourcedir=$(DIR)
dh_installchangelogs
dh_installdocs
dh_strip
dh_compress
dh_fixperms
env -u DH_OPTIONS dh_makeshlibs -pliblockdep$(VERSION) \
liblockdep$(VERSION)
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
install-lockdep: PACKAGE_NAME = lockdep
install-lockdep: DH_OPTIONS = -p$(PACKAGE_NAME)
install-lockdep: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
install-lockdep:
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# Upstream lockdep preload script is not suitable for installation
sed 's/@VERSION@/$(VERSION)/' debian/rules.d/tools/lib/lockdep/lockdep.in \
> $(DIR)/usr/bin/lockdep
chmod 755 $(DIR)/usr/bin/lockdep
dh_installchangelogs
dh_installdocs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
# vim: filetype=make

View File

@ -4,7 +4,10 @@ Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Uploaders: Bastian Blank <waldi@debian.org>, maximilian attems <maks@debian.org>, Ben Hutchings <ben@decadent.org.uk>
Standards-Version: 3.9.5
Build-Depends: debhelper, python3:any, quilt,
cpio <!stage1>, kmod <!stage1>, xz-utils <!stage1>, kernel-wedge (>= 2.93~) <!stage1>, bc <!stage1>
cpio <!stage1>, kmod <!stage1>, xz-utils <!stage1>, kernel-wedge (>= 2.93~) <!stage1>, bc <!stage1>,
asciidoc <!stage1>, bison <!stage1>, flex <!stage1>, gcc-multilib [amd64 ppc64 s390x sparc64] <!stage1>, libaudit-dev <!stage1>, libdw-dev <!stage1>, libelf-dev <!stage1>, libiberty-dev <!stage1> | binutils-dev (<< 2.23.91.20131123-1) <!stage1>, libnewt-dev <!stage1>, libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32] <!stage1>, libperl-dev <!stage1>, libunwind8-dev [amd64 armel armhf arm64 i386] <!stage1>, python-dev <!stage1>, xmlto <!stage1>,
autoconf <!stage1>, automake <!stage1>, libtool <!stage1>, libglib2.0-dev <!stage1>, libudev-dev <!stage1>, libwrap0-dev <!stage1>, libpci-dev <!stage1>,
dh-python <!stage1>, dh-systemd <!stage1>
Build-Depends-Indep: patchutils <!stage1>, xmlto <!stage1>
Vcs-Git: https://anonscm.debian.org/git/kernel/linux.git
Vcs-Browser: https://anonscm.debian.org/cgit/kernel/linux.git

129
debian/templates/control.tools.in vendored Normal file
View File

@ -0,0 +1,129 @@
Package: linux-kbuild-@version@
Architecture: linux-any
Depends: ${shlibs:Depends}, ${misc:Depends}
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
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends}
Recommends: linux-base (>= 3.4~)
Provides: linux-tools-@version@
Conflicts: linux-tools-@version@
Replaces: linux-tools-@version@
Suggests: linux-doc-@version@
Description: Performance analysis tools for Linux @version@
This package contains the 'perf' performance analysis tools for Linux
kernel version @version@.
.
The linux-base package contains a 'perf' command which will invoke the
appropriate version for the running kernel.
Package: libusbip-dev
Architecture: linux-any
Depends: ${misc:Depends}
Section: libdevel
Description: USB device sharing system over IP network (development files)
USB/IP is a system for sharing USB devices over the network.
.
This package provides headers for the libusbip library and
the library itself for static linking.
Package: usbip
Architecture: linux-any
Depends: usbutils, ${shlibs:Depends}, ${misc:Depends}
Section: admin
Description: USB device sharing system over IP network
USB/IP is a system for sharing USB devices over the network.
.
To share USB devices between computers with their full
functionality, USB/IP encapsulates "USB requests" into IP
packets and transmits them between computers.
.
Original USB device drivers and applications can be used
for remote USB devices without any modification of them. A
computer can use remote USB devices as if they were
directly attached.
.
Currently USB/IP provides no access control or encryption.
It should only be used in trusted environments.
.
This package provides the server component 'usbipd' and the
client tool 'usbip'.
Package: hyperv-daemons
Architecture: i386 amd64 x32
Depends: lsb-base (>= 3.2-14), ${shlibs:Depends}, ${misc:Depends}
Section: admin
Description: Support daemons for Linux running on Hyper-V
Suite of daemons for Linux guests running on Hyper-V, consisting of
hv_fcopy_daemon, hv_kvp_daemon and hv_vss_daemon.
.
hv_fcopy_daemon provides the file copy service, allowing the host to
copy files into the guest.
.
hv_kvp_daemon provides the key-value pair (KVP) service, allowing the
host to get and set the IP networking configuration of the guest.
(This requires helper scripts which are not currently included.)
.
hv_vss_daemon provides the volume shadow copy service (VSS), allowing
the host to freeze the guest filesystems while taking a snapshot.
Package: lockdep
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, liblockdep@version@
Recommends: liblockdep-dev
Section: devel
Multi-Arch: allowed
Description: Runtime locking correctness validator
lockdep is a wrapper for programs that use the pthreads API, which detects
actual and potential deadlocks and other locking bugs.
Package: liblockdep@version@
Architecture: linux-any
Depends: ${shlibs:Depends}, ${misc:Depends}
Section: libs
Multi-Arch: same
Description: Runtime locking correctness validator (shared library)
liblockdep is a library for programs that use the pthreads API, which can
be used to detect actual and potential deadlocks and other locking bugs.
Package: liblockdep-dev
Architecture: linux-any
Depends: ${shlibs:Depends}, ${misc:Depends}
Section: libdevel
Multi-Arch: same
Description: Runtime locking correctness validator (development files)
liblockdep is a library for programs that use the pthreads API, which can
be used to detect actual and potential deadlocks and other locking bugs.

View File

@ -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

4
debian/usbip.install vendored Normal file
View File

@ -0,0 +1,4 @@
usr/sbin/usbip
usr/sbin/usbipd
usr/share/man/man8/usbip.8
usr/share/man/man8/usbipd.8