aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2020-01-02 16:08:47 +0000
committerBen Hutchings <ben@decadent.org.uk>2020-01-02 16:08:47 +0000
commitd8e80a93f995b08636362dbd76d7a233deb5b752 (patch)
tree4fe8b4130f9af67417a74d170f611dd42cae680b
parent1d5e1de82a1e9e86d0f2e218a169c093bcc2ae81 (diff)
parent3ce6bbc6a168b84ac8d289e0012684f52f65ea73 (diff)
downloadkernel_replicant_linux-d8e80a93f995b08636362dbd76d7a233deb5b752.tar.gz
kernel_replicant_linux-d8e80a93f995b08636362dbd76d7a233deb5b752.tar.bz2
kernel_replicant_linux-d8e80a93f995b08636362dbd76d7a233deb5b752.zip
Merge branch 'master' into 'master'
# Conflicts: # debian/changelog
-rw-r--r--debian/changelog26
-rw-r--r--debian/config/amd64/config.cloud-amd6414
-rw-r--r--debian/config/arm64/config1
-rw-r--r--debian/config/defines2
-rw-r--r--debian/config/mips/defines4
-rw-r--r--debian/config/mips64/defines4
-rw-r--r--debian/config/mips64el/defines4
-rw-r--r--debian/config/mipsel/defines4
-rw-r--r--debian/libtraceevent-dev.install4
-rw-r--r--debian/libtraceevent1-plugin.install1
-rw-r--r--debian/libtraceevent1.symbols140
-rw-r--r--debian/patches/bugfix/all/0001-libtraceevent-Fix-header-installation.patch49
-rw-r--r--debian/patches/bugfix/all/0002-libtraceevent-Fix-lib-installation-with-O.patch51
-rw-r--r--debian/patches/bugfix/all/0003-libtraceevent-Copy-pkg-config-file-to-output-folder-.patch40
-rw-r--r--debian/patches/bugfix/all/0004-libtraceevent-allow-custom-libdir-path.patch71
-rw-r--r--debian/patches/bugfix/all/0005-libtraceevent-Add-dependency-on-libdl.patch31
-rw-r--r--debian/patches/features/all/lockdown/tracing-Do-not-create-directories-if-lockdown-is-in-.patch84
-rw-r--r--debian/patches/series6
-rw-r--r--debian/rules.d/tools/lib/traceevent/Makefile23
-rw-r--r--debian/rules.real35
-rw-r--r--debian/templates/control.tools-unversioned.in54
21 files changed, 636 insertions, 12 deletions
diff --git a/debian/changelog b/debian/changelog
index 22dad5385bf9..4da3d4a596cf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,7 +23,15 @@ linux (5.5~rc4-1~exp1) UNRELEASED; urgency=medium
-- Romain Perier <romain.perier@gmail.com> Thu, 02 Jan 2020 16:44:44 +0100
-linux (5.4.6-1~exp1) UNRELEASED; urgency=medium
+linux (5.4.6-2) UNRELEASED; urgency=medium
+
+ [ YunQiang Su ]
+ * [mips*/octeon] Fix ftbfs on mips* due to octeon image-file:
+ move "image-file: linux" to octeon_build from octeon_image.
+
+ -- YunQiang Su <syq@debian.org> Mon, 30 Dec 2019 17:47:51 +0800
+
+linux (5.4.6-1) unstable; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.4.3
@@ -381,8 +389,15 @@ linux (5.4.6-1~exp1) UNRELEASED; urgency=medium
- drm/amdgpu: add invalidate semaphore limit for SRIOV and picasso in gmc9
- ALSA: hda: Fix regression by strip mask fix
+ [ Joe Richey ]
+ * [amd64/cloud-amd64] tpm: Enable TPM drivers for Cloud (Closes: #946237)
+
[ Ben Hutchings ]
* [armel/rpi,armhf,arm64] Enable DEBUG_WX
+ * linux-cpupower: Fix grammar error in package description
+ * debian/control: Make library package descriptions more consistent
+ * Set ABI to 1
+ * tracing: Do not create directories if lockdown is in affect
[ Aurelien Jarno ]
* [armhf,arm64] Fix critical trip point on RPI 3.
@@ -398,7 +413,14 @@ linux (5.4.6-1~exp1) UNRELEASED; urgency=medium
* [mips*] enable CONFIG_MIPS_O32_FP64_SUPPORT.
* [mips*] enable CONFIG_CPU_HAS_MSA except octeon.
- -- Ben Hutchings <ben@decadent.org.uk> Thu, 05 Dec 2019 17:31:13 +0000
+ [ Vagrant Cascadian ]
+ * [arm64] drivers/gpu/drm/sun4i: Enable DRM_SUN8I_MIXER as a module.
+ (Closes: #946510). Thanks to Andrei POPESCU.
+
+ [ Sudip Mukherjee ]
+ * Add libtraceevent packages (Closes: #944138)
+
+ -- Ben Hutchings <ben@decadent.org.uk> Fri, 27 Dec 2019 22:17:44 +0000
linux (5.4.2-1~exp1) experimental; urgency=medium
diff --git a/debian/config/amd64/config.cloud-amd64 b/debian/config/amd64/config.cloud-amd64
index b71225db1971..26002df08717 100644
--- a/debian/config/amd64/config.cloud-amd64
+++ b/debian/config/amd64/config.cloud-amd64
@@ -176,7 +176,19 @@ CONFIG_XEN_BLKDEV_FRONTEND=m
##
## file: drivers/char/tpm/Kconfig
##
-# CONFIG_TCG_TPM is not set
+CONFIG_TCG_TPM=m
+# CONFIG_HW_RANDOM_TPM is not set
+CONFIG_TCG_TIS=m
+# CONFIG_TCG_TIS_SPI is not set
+# CONFIG_TCG_TIS_I2C_ATMEL is not set
+# CONFIG_TCG_TIS_I2C_INFINEON is not set
+# CONFIG_TCG_TIS_I2C_NUVOTON is not set
+# CONFIG_TCG_NSC is not set
+# CONFIG_TCG_ATMEL is not set
+# CONFIG_TCG_INFINEON is not set
+CONFIG_TCG_XEN=m
+CONFIG_TCG_CRB=m
+CONFIG_TCG_VTPM_PROXY=m
##
## file: drivers/char/xillybus/Kconfig
diff --git a/debian/config/arm64/config b/debian/config/arm64/config
index 7e71d1bd8900..9841e44ce42f 100644
--- a/debian/config/arm64/config
+++ b/debian/config/arm64/config
@@ -361,6 +361,7 @@ CONFIG_ROCKCHIP_DW_MIPI_DSI=y
##
CONFIG_DRM_SUN4I=m
CONFIG_DRM_SUN8I_DW_HDMI=m
+CONFIG_DRM_SUN8I_MIXER=m
##
## file: drivers/gpu/drm/tegra/Kconfig
diff --git a/debian/config/defines b/debian/config/defines
index e8b7bcb9e01c..1d4b534c0064 100644
--- a/debian/config/defines
+++ b/debian/config/defines
@@ -1,5 +1,5 @@
[abi]
-abiname: trunk
+abiname: 1
ignore-changes:
__cpuhp_*
bpf_analyzer
diff --git a/debian/config/mips/defines b/debian/config/mips/defines
index 1690d7b5baa4..20b6bc19bb47 100644
--- a/debian/config/mips/defines
+++ b/debian/config/mips/defines
@@ -33,7 +33,9 @@ configs:
hardware: Octeon
hardware-long: Cavium Networks Octeon
-[octeon_image]
+[octeon_build]
image-file: vmlinux
+
+[octeon_image]
install-stem: vmlinux
configs: kernelarch-mips/config.octeon
diff --git a/debian/config/mips64/defines b/debian/config/mips64/defines
index 077aee18e8b5..3a99fe9fff73 100644
--- a/debian/config/mips64/defines
+++ b/debian/config/mips64/defines
@@ -23,7 +23,9 @@ configs:
hardware: Octeon
hardware-long: Cavium Networks Octeon
-[octeon_image]
+[octeon_build]
image-file: vmlinux
+
+[octeon_image]
install-stem: vmlinux
configs: kernelarch-mips/config.octeon
diff --git a/debian/config/mips64el/defines b/debian/config/mips64el/defines
index 72f5a9bcbe2e..fb25ca9e9bf9 100644
--- a/debian/config/mips64el/defines
+++ b/debian/config/mips64el/defines
@@ -31,7 +31,9 @@ configs: kernelarch-mips/config.loongson-3
hardware: Octeon
hardware-long: Cavium Networks Octeon
-[octeon_image]
+[octeon_build]
image-file: vmlinux
+
+[octeon_image]
install-stem: vmlinux
configs: kernelarch-mips/config.octeon
diff --git a/debian/config/mipsel/defines b/debian/config/mipsel/defines
index f8b985a5347e..9fcf2d43bd45 100644
--- a/debian/config/mipsel/defines
+++ b/debian/config/mipsel/defines
@@ -41,7 +41,9 @@ configs: kernelarch-mips/config.loongson-3
hardware: Octeon
hardware-long: Cavium Networks Octeon
-[octeon_image]
+[octeon_build]
image-file: vmlinux
+
+[octeon_image]
install-stem: vmlinux
configs: kernelarch-mips/config.octeon
diff --git a/debian/libtraceevent-dev.install b/debian/libtraceevent-dev.install
new file mode 100644
index 000000000000..921facf00886
--- /dev/null
+++ b/debian/libtraceevent-dev.install
@@ -0,0 +1,4 @@
+usr/include/traceevent
+usr/lib/*/libtraceevent.a
+usr/lib/*/libtraceevent.so
+usr/lib/*/pkgconfig
diff --git a/debian/libtraceevent1-plugin.install b/debian/libtraceevent1-plugin.install
new file mode 100644
index 000000000000..1e981e8c429b
--- /dev/null
+++ b/debian/libtraceevent1-plugin.install
@@ -0,0 +1 @@
+usr/lib/*/traceevent/plugins
diff --git a/debian/libtraceevent1.symbols b/debian/libtraceevent1.symbols
new file mode 100644
index 000000000000..a018dc78d88d
--- /dev/null
+++ b/debian/libtraceevent1.symbols
@@ -0,0 +1,140 @@
+libtraceevent.so.1 libtraceevent1 #MINVER#
+ __pr_stat@Base 5.4
+ __tep_parse_format@Base 5.4
+ __vpr_stat@Base 5.4
+ __vwarning@Base 5.4
+ __warning@Base 5.4
+ alloc_arg@Base 5.4
+ breakpoint@Base 5.4
+ get_field_val@Base 5.4
+ kbuffer_alloc@Base 5.4
+ kbuffer_curr_index@Base 5.4
+ kbuffer_curr_offset@Base 5.4
+ kbuffer_curr_size@Base 5.4
+ kbuffer_event_size@Base 5.4
+ kbuffer_free@Base 5.4
+ kbuffer_load_subbuffer@Base 5.4
+ kbuffer_missed_events@Base 5.4
+ kbuffer_next_event@Base 5.4
+ kbuffer_raw_get@Base 5.4
+ kbuffer_read_at_offset@Base 5.4
+ kbuffer_read_event@Base 5.4
+ kbuffer_set_old_format@Base 5.4
+ kbuffer_start_of_data@Base 5.4
+ kbuffer_subbuffer_size@Base 5.4
+ kbuffer_timestamp@Base 5.4
+ kbuffer_translate_data@Base 5.4
+ pr_stat@Base 5.4
+ tep_alloc@Base 5.4
+ tep_buffer_init@Base 5.4
+ tep_clear_flag@Base 5.4
+ tep_cmdline_pid@Base 5.4
+ tep_data2host2@Base 5.4
+ tep_data2host4@Base 5.4
+ tep_data2host8@Base 5.4
+ tep_data_comm_from_pid@Base 5.4
+ tep_data_flags@Base 5.4
+ tep_data_pid@Base 5.4
+ tep_data_pid_from_comm@Base 5.4
+ tep_data_preempt_count@Base 5.4
+ tep_data_type@Base 5.4
+ tep_event_common_fields@Base 5.4
+ tep_event_fields@Base 5.4
+ tep_event_filtered@Base 5.4
+ tep_filter_add_filter_str@Base 5.4
+ tep_filter_alloc@Base 5.4
+ tep_filter_compare@Base 5.4
+ tep_filter_copy@Base 5.4
+ tep_filter_free@Base 5.4
+ tep_filter_make_string@Base 5.4
+ tep_filter_match@Base 5.4
+ tep_filter_remove_event@Base 5.4
+ tep_filter_reset@Base 5.4
+ tep_filter_strerror@Base 5.4
+ tep_find_any_field@Base 5.4
+ tep_find_common_field@Base 5.4
+ tep_find_event@Base 5.4
+ tep_find_event_by_name@Base 5.4
+ tep_find_event_by_record@Base 5.4
+ tep_find_field@Base 5.4
+ tep_find_function@Base 5.4
+ tep_find_function_address@Base 5.4
+ tep_free@Base 5.4
+ tep_free_event@Base 5.4
+ tep_free_format_field@Base 5.4
+ tep_free_token@Base 5.4
+ tep_get_any_field_val@Base 5.4
+ tep_get_common_field_val@Base 5.4
+ tep_get_cpus@Base 5.4
+ tep_get_event@Base 5.4
+ tep_get_events_count@Base 5.4
+ tep_get_field_raw@Base 5.4
+ tep_get_field_val@Base 5.4
+ tep_get_first_event@Base 5.4
+ tep_get_header_page_size@Base 5.4
+ tep_get_header_timestamp_size@Base 5.4
+ tep_get_input_buf@Base 5.4
+ tep_get_input_buf_ptr@Base 5.4
+ tep_get_long_size@Base 5.4
+ tep_get_page_size@Base 5.4
+ tep_get_ref@Base 5.4
+ tep_is_file_bigendian@Base 5.4
+ tep_is_local_bigendian@Base 5.4
+ tep_is_old_format@Base 5.4
+ tep_is_pid_registered@Base 5.4
+ tep_list_events@Base 5.4
+ tep_list_events_copy@Base 5.4
+ tep_load_plugins@Base 5.4
+ tep_override_comm@Base 5.4
+ tep_parse_event@Base 5.4
+ tep_parse_format@Base 5.4
+ tep_parse_header_page@Base 5.4
+ tep_peek_char@Base 5.4
+ tep_plugin_add_options@Base 5.4
+ tep_plugin_free_options_list@Base 5.4
+ tep_plugin_list_options@Base 5.4
+ tep_plugin_remove_options@Base 5.4
+ tep_print_event@Base 5.4
+ tep_print_field@Base 5.4
+ tep_print_fields@Base 5.4
+ tep_print_func_field@Base 5.4
+ tep_print_funcs@Base 5.4
+ tep_print_num_field@Base 5.4
+ tep_print_plugins@Base 5.4
+ tep_print_printk@Base 5.4
+ tep_read_number@Base 5.4
+ tep_read_number_field@Base 5.4
+ tep_read_token@Base 5.4
+ tep_ref@Base 5.4
+ tep_register_comm@Base 5.4
+ tep_register_event_handler@Base 5.4
+ tep_register_function@Base 5.4
+ tep_register_print_function@Base 5.4
+ tep_register_print_string@Base 5.4
+ tep_reset_function_resolver@Base 5.4
+ tep_set_cpus@Base 5.4
+ tep_set_file_bigendian@Base 5.4
+ tep_set_flag@Base 5.4
+ tep_set_function_resolver@Base 5.4
+ tep_set_local_bigendian@Base 5.4
+ tep_set_long_size@Base 5.4
+ tep_set_page_size@Base 5.4
+ tep_set_test_filters@Base 5.4
+ tep_strerror@Base 5.4
+ tep_test_flag@Base 5.4
+ tep_unload_plugins@Base 5.4
+ tep_unref@Base 5.4
+ tep_unregister_event_handler@Base 5.4
+ tep_unregister_print_function@Base 5.4
+ trace_seq_destroy@Base 5.4
+ trace_seq_do_fprintf@Base 5.4
+ trace_seq_do_printf@Base 5.4
+ trace_seq_init@Base 5.4
+ trace_seq_printf@Base 5.4
+ trace_seq_putc@Base 5.4
+ trace_seq_puts@Base 5.4
+ trace_seq_reset@Base 5.4
+ trace_seq_terminate@Base 5.4
+ trace_seq_vprintf@Base 5.4
+ vpr_stat@Base 5.4
+ warning@Base 5.4
diff --git a/debian/patches/bugfix/all/0001-libtraceevent-Fix-header-installation.patch b/debian/patches/bugfix/all/0001-libtraceevent-Fix-header-installation.patch
new file mode 100644
index 000000000000..cfed7f0b2a76
--- /dev/null
+++ b/debian/patches/bugfix/all/0001-libtraceevent-Fix-header-installation.patch
@@ -0,0 +1,49 @@
+From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
+Date: Thu, 14 Nov 2019 13:37:19 +0000
+Subject: [PATCH 1/5] libtraceevent: Fix header installation
+Origin: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=68401a1799fa14cb72c2a129bbefdacd44279772
+
+When we passed some location in DESTDIR, install_headers called
+do_install with DESTDIR as part of the second argument.
+
+But do_install is again using '$(DESTDIR_SQ)$2', so as a result the
+headers were installed in a location $DESTDIR/$DESTDIR.
+
+In my testing I passed DESTDIR=/home/sudip/test and the headers were
+installed in: /home/sudip/test/home/sudip/test/usr/include/traceevent.
+
+Lets remove DESTDIR from the second argument of do_install so that the
+headers are installed in the correct location.
+
+Signed-off-by: Sudipm Mukherjee <sudipm.mukherjee@gmail.com>
+Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+Cc: Sudipm Mukherjee <sudipm.mukherjee@gmail.com>
+Cc: linux-trace-devel@vger.kernel.org
+Link: http://lore.kernel.org/lkml/20191114133719.309-1-sudipm.mukherjee@gmail.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+---
+ tools/lib/traceevent/Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
+index 5315f3787f8d..cbb429f55062 100644
+--- a/tools/lib/traceevent/Makefile
++++ b/tools/lib/traceevent/Makefile
+@@ -232,10 +232,10 @@ install_pkgconfig:
+
+ install_headers:
+ $(call QUIET_INSTALL, headers) \
+- $(call do_install,event-parse.h,$(DESTDIR)$(includedir_SQ),644); \
+- $(call do_install,event-utils.h,$(DESTDIR)$(includedir_SQ),644); \
+- $(call do_install,trace-seq.h,$(DESTDIR)$(includedir_SQ),644); \
+- $(call do_install,kbuffer.h,$(DESTDIR)$(includedir_SQ),644)
++ $(call do_install,event-parse.h,$(includedir_SQ),644); \
++ $(call do_install,event-utils.h,$(includedir_SQ),644); \
++ $(call do_install,trace-seq.h,$(includedir_SQ),644); \
++ $(call do_install,kbuffer.h,$(includedir_SQ),644)
+
+ install: install_lib
+
+--
+2.11.0
+
diff --git a/debian/patches/bugfix/all/0002-libtraceevent-Fix-lib-installation-with-O.patch b/debian/patches/bugfix/all/0002-libtraceevent-Fix-lib-installation-with-O.patch
new file mode 100644
index 000000000000..28eede20e8f3
--- /dev/null
+++ b/debian/patches/bugfix/all/0002-libtraceevent-Fix-lib-installation-with-O.patch
@@ -0,0 +1,51 @@
+From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
+Date: Fri, 15 Nov 2019 11:36:09 +0000
+Subject: [PATCH 2/5] libtraceevent: Fix lib installation with O=
+Origin: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=587db8ebdac2c5eb3a8851e16b26f2e2711ab797
+
+When we use 'O=' with make to build libtraceevent in a separate folder
+it fails to install libtraceevent.a and libtraceevent.so.1.1.0 with the
+error:
+
+ INSTALL /home/sudip/linux/obj-trace/libtraceevent.a
+ INSTALL /home/sudip/linux/obj-trace/libtraceevent.so.1.1.0
+
+ cp: cannot stat 'libtraceevent.a': No such file or directory
+ Makefile:225: recipe for target 'install_lib' failed
+ make: *** [install_lib] Error 1
+
+I used the command:
+
+ make O=../../../obj-trace DESTDIR=~/test prefix==/usr install
+
+It turns out libtraceevent Makefile, even though it builds in a separate
+folder, searches for libtraceevent.a and libtraceevent.so.1.1.0 in its
+source folder.
+
+So, add the 'OUTPUT' prefix to the source path so that 'make' looks for
+the files in the correct place.
+
+Signed-off-by: Sudipm Mukherjee <sudipm.mukherjee@gmail.com>
+Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+Cc: linux-trace-devel@vger.kernel.org
+Link: http://lore.kernel.org/lkml/20191115113610.21493-1-sudipm.mukherjee@gmail.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+---
+ tools/lib/traceevent/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
+index cbb429f55062..83446fe2cf01 100644
+--- a/tools/lib/traceevent/Makefile
++++ b/tools/lib/traceevent/Makefile
+@@ -97,6 +97,7 @@ EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION)
+
+ LIB_TARGET = libtraceevent.a libtraceevent.so.$(EVENT_PARSE_VERSION)
+ LIB_INSTALL = libtraceevent.a libtraceevent.so*
++LIB_INSTALL := $(addprefix $(OUTPUT),$(LIB_INSTALL))
+
+ INCLUDES = -I. -I $(srctree)/tools/include $(CONFIG_INCLUDES)
+
+--
+2.11.0
+
diff --git a/debian/patches/bugfix/all/0003-libtraceevent-Copy-pkg-config-file-to-output-folder-.patch b/debian/patches/bugfix/all/0003-libtraceevent-Copy-pkg-config-file-to-output-folder-.patch
new file mode 100644
index 000000000000..98cef470dc2a
--- /dev/null
+++ b/debian/patches/bugfix/all/0003-libtraceevent-Copy-pkg-config-file-to-output-folder-.patch
@@ -0,0 +1,40 @@
+From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
+Date: Fri, 15 Nov 2019 11:36:10 +0000
+Subject: [PATCH 3/5] libtraceevent: Copy pkg-config file to output folder when using O=
+Origin: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=15b3904f8e884e0d34d5f09906cf6526d0b889a2
+
+When we use 'O=' with make to build libtraceevent in a separate folder
+it still copies 'libtraceevent.pc' to its source folder. Modify the
+Makefile so that it uses the output folder to copy the pkg-config file
+and install from there.
+
+Signed-off-by: Sudipm Mukherjee <sudipm.mukherjee@gmail.com>
+Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+Cc: linux-trace-devel@vger.kernel.org
+Link: http://lore.kernel.org/lkml/20191115113610.21493-2-sudipm.mukherjee@gmail.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+---
+ tools/lib/traceevent/Makefile | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
+index 83446fe2cf01..c5a03356a999 100644
+--- a/tools/lib/traceevent/Makefile
++++ b/tools/lib/traceevent/Makefile
+@@ -208,10 +208,11 @@ define do_install
+ $(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2'
+ endef
+
+-PKG_CONFIG_FILE = libtraceevent.pc
++PKG_CONFIG_SOURCE_FILE = libtraceevent.pc
++PKG_CONFIG_FILE := $(addprefix $(OUTPUT),$(PKG_CONFIG_SOURCE_FILE))
+ define do_install_pkgconfig_file
+ if [ -n "${pkgconfig_dir}" ]; then \
+- cp -f ${PKG_CONFIG_FILE}.template ${PKG_CONFIG_FILE}; \
++ cp -f ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE}; \
+ sed -i "s|INSTALL_PREFIX|${1}|g" ${PKG_CONFIG_FILE}; \
+ sed -i "s|LIB_VERSION|${EVENT_PARSE_VERSION}|g" ${PKG_CONFIG_FILE}; \
+ sed -i "s|LIB_DIR|${libdir}|g" ${PKG_CONFIG_FILE}; \
+--
+2.11.0
+
diff --git a/debian/patches/bugfix/all/0004-libtraceevent-allow-custom-libdir-path.patch b/debian/patches/bugfix/all/0004-libtraceevent-allow-custom-libdir-path.patch
new file mode 100644
index 000000000000..cb72df3e2268
--- /dev/null
+++ b/debian/patches/bugfix/all/0004-libtraceevent-allow-custom-libdir-path.patch
@@ -0,0 +1,71 @@
+From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
+Date: Sat, 7 Dec 2019 11:14:40 +0000
+Subject: [PATCH 4/5] libtraceevent: Allow custom libdir path
+Origin: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c09982f8e2bae80a66232630ec4ba50afacea486
+
+When I use prefix=/usr and try to install libtraceevent in my laptop it
+tries to install in /usr/lib64. I am not having any folder as /usr/lib64
+and also the debian policy doesnot allow installing in /usr/lib64. It
+should be in /usr/lib/x86_64-linux-gnu/.
+
+Quote: No package for a 64 bit architecture may install files in
+ /usr/lib64/ or in a subdirectory of it.
+
+ref: https://www.debian.org/doc/debian-policy/ch-opersys.html
+
+Make it more flexible by allowing to mention libdir_relative while
+installing so that distros can mention the path according to their
+policy or use the default one.
+
+Signed-off-by: Sudipm Mukherjee <sudipm.mukherjee@gmail.com>
+Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+Cc: Sudipm Mukherjee <sudipm.mukherjee@gmail.com>
+Cc: linux-trace-devel@vger.kernel.org
+Link: http://lore.kernel.org/lkml/20191207111440.6574-1-sudipm.mukherjee@gmail.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+---
+ tools/lib/traceevent/Makefile | 5 +++--
+ tools/lib/traceevent/plugins/Makefile | 5 +++--
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
+index c5a03356a999..c874c017c636 100644
+--- a/tools/lib/traceevent/Makefile
++++ b/tools/lib/traceevent/Makefile
+@@ -39,11 +39,12 @@ DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))'
+
+ LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
+ ifeq ($(LP64), 1)
+- libdir_relative = lib64
++ libdir_relative_temp = lib64
+ else
+- libdir_relative = lib
++ libdir_relative_temp = lib
+ endif
+
++libdir_relative ?= $(libdir_relative_temp)
+ prefix ?= /usr/local
+ libdir = $(prefix)/$(libdir_relative)
+ man_dir = $(prefix)/share/man
+diff --git a/tools/lib/traceevent/plugins/Makefile b/tools/lib/traceevent/plugins/Makefile
+index f440989fa55e..349bb81482ab 100644
+--- a/tools/lib/traceevent/plugins/Makefile
++++ b/tools/lib/traceevent/plugins/Makefile
+@@ -32,11 +32,12 @@ DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))'
+
+ LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
+ ifeq ($(LP64), 1)
+- libdir_relative = lib64
++ libdir_relative_tmp = lib64
+ else
+- libdir_relative = lib
++ libdir_relative_tmp = lib
+ endif
+
++libdir_relative ?= $(libdir_relative_tmp)
+ prefix ?= /usr/local
+ libdir = $(prefix)/$(libdir_relative)
+
+--
+2.11.0
+
diff --git a/debian/patches/bugfix/all/0005-libtraceevent-Add-dependency-on-libdl.patch b/debian/patches/bugfix/all/0005-libtraceevent-Add-dependency-on-libdl.patch
new file mode 100644
index 000000000000..f840d9979090
--- /dev/null
+++ b/debian/patches/bugfix/all/0005-libtraceevent-Add-dependency-on-libdl.patch
@@ -0,0 +1,31 @@
+From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
+Date: Thu, 26 Dec 2019 22:31:30 +0000
+Subject: [PATCH 5/5] libtraceevent: Add dependency on libdl
+Forwarded: https://lore.kernel.org/lkml/20191226224931.3458-1-sudipm.mukherjee@gmail.com/
+
+event-plugin.c is calling dl_*() functions but it is not linked with
+libdl. As a result when we use ldd on the generated libtraceevent.so
+file, it does not list libdl as one of its dependencies.
+Add -ldl explicitly as done in tools/lib/lockdep.
+
+Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
+---
+ tools/lib/traceevent/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
+index c874c017c636..0d0575981cc7 100644
+--- a/tools/lib/traceevent/Makefile
++++ b/tools/lib/traceevent/Makefile
+@@ -143,7 +143,7 @@ $(TE_IN): force
+ $(Q)$(MAKE) $(build)=libtraceevent
+
+ $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
+- $(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
++ $(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -ldl -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
+ @ln -sf $(@F) $(OUTPUT)libtraceevent.so
+ @ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)
+
+--
+2.11.0
+
diff --git a/debian/patches/features/all/lockdown/tracing-Do-not-create-directories-if-lockdown-is-in-.patch b/debian/patches/features/all/lockdown/tracing-Do-not-create-directories-if-lockdown-is-in-.patch
new file mode 100644
index 000000000000..ea827bdde6cd
--- /dev/null
+++ b/debian/patches/features/all/lockdown/tracing-Do-not-create-directories-if-lockdown-is-in-.patch
@@ -0,0 +1,84 @@
+From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
+Date: Mon, 2 Dec 2019 16:25:27 -0500
+Subject: tracing: Do not create directories if lockdown is in affect
+Origin: https://git.kernel.org/linus/a356646a56857c2e5ad875beec734d7145ecd49a
+
+If lockdown is disabling tracing on boot up, it prevents the tracing files
+from even bering created. But when that happens, there's several places that
+will give a warning that the files were not created as that is usually a
+sign of a bug.
+
+Add in strategic locations where a check is made to see if tracing is
+disabled by lockdown, and if it is, do not go further, and fail silently
+(but print that tracing is disabled by lockdown, without doing a WARN_ON()).
+
+Cc: Matthew Garrett <mjg59@google.com>
+Fixes: 17911ff38aa5 ("tracing: Add locked_down checks to the open calls of files created for tracefs")
+Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+---
+ kernel/trace/ring_buffer.c | 6 ++++++
+ kernel/trace/trace.c | 17 +++++++++++++++++
+ 2 files changed, 23 insertions(+)
+
+--- a/kernel/trace/ring_buffer.c
++++ b/kernel/trace/ring_buffer.c
+@@ -11,6 +11,7 @@
+ #include <linux/trace_seq.h>
+ #include <linux/spinlock.h>
+ #include <linux/irq_work.h>
++#include <linux/security.h>
+ #include <linux/uaccess.h>
+ #include <linux/hardirq.h>
+ #include <linux/kthread.h> /* for self test */
+@@ -5068,6 +5069,11 @@ static __init int test_ringbuffer(void)
+ int cpu;
+ int ret = 0;
+
++ if (security_locked_down(LOCKDOWN_TRACEFS)) {
++ pr_warning("Lockdown is enabled, skipping ring buffer tests\n");
++ return 0;
++ }
++
+ pr_info("Running ring buffer tests...\n");
+
+ buffer = ring_buffer_alloc(RB_TEST_BUFFER_SIZE, RB_FL_OVERWRITE);
+--- a/kernel/trace/trace.c
++++ b/kernel/trace/trace.c
+@@ -1804,6 +1804,12 @@ int __init register_tracer(struct tracer
+ return -1;
+ }
+
++ if (security_locked_down(LOCKDOWN_TRACEFS)) {
++ pr_warning("Can not register tracer %s due to lockdown\n",
++ type->name);
++ return -EPERM;
++ }
++
+ mutex_lock(&trace_types_lock);
+
+ tracing_selftest_running = true;
+@@ -8639,6 +8645,11 @@ struct dentry *tracing_init_dentry(void)
+ {
+ struct trace_array *tr = &global_trace;
+
++ if (security_locked_down(LOCKDOWN_TRACEFS)) {
++ pr_warning("Tracing disabled due to lockdown\n");
++ return ERR_PTR(-EPERM);
++ }
++
+ /* The top level trace array uses NULL as parent */
+ if (tr->dir)
+ return NULL;
+@@ -9081,6 +9092,12 @@ __init static int tracer_alloc_buffers(v
+ int ring_buf_size;
+ int ret = -ENOMEM;
+
++
++ if (security_locked_down(LOCKDOWN_TRACEFS)) {
++ pr_warning("Tracing disabled due to lockdown\n");
++ return -EPERM;
++ }
++
+ /*
+ * Make sure we don't accidently add more trace options
+ * than we have bits for.
diff --git a/debian/patches/series b/debian/patches/series
index 25f79e5765ea..68bbc4b6667d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -86,6 +86,7 @@ bugfix/all/partially-revert-net-socket-implement-64-bit-timestamps.patch
# Miscellaneous features
# Lockdown missing pieces
+features/all/lockdown/tracing-Do-not-create-directories-if-lockdown-is-in-.patch
features/all/lockdown/efi-add-an-efi_secure_boot-flag-to-indicate-secure-b.patch
features/all/lockdown/efi-lock-down-the-kernel-if-booted-in-secure-boot-mo.patch
features/all/lockdown/add-a-sysrq-option-to-lift-kernel-lockdown.patch
@@ -125,6 +126,11 @@ bugfix/all/tools-lib-api-fs-fs.c-fix-misuse-of-strncpy.patch
bugfix/all/usbip-fix-misuse-of-strncpy.patch
bugfix/all/usbip-network-fix-unaligned-member-access.patch
bugfix/all/tools-perf-pmu-events-fix-reproducibility.patch
+bugfix/all/0001-libtraceevent-Fix-header-installation.patch
+bugfix/all/0002-libtraceevent-Fix-lib-installation-with-O.patch
+bugfix/all/0003-libtraceevent-Copy-pkg-config-file-to-output-folder-.patch
+bugfix/all/0004-libtraceevent-allow-custom-libdir-path.patch
+bugfix/all/0005-libtraceevent-Add-dependency-on-libdl.patch
# wireless: Disable regulatory.db direct loading (until we sort out signing)
debian/wireless-disable-regulatory.db-direct-loading.patch
diff --git a/debian/rules.d/tools/lib/traceevent/Makefile b/debian/rules.d/tools/lib/traceevent/Makefile
new file mode 100644
index 000000000000..93620398b97a
--- /dev/null
+++ b/debian/rules.d/tools/lib/traceevent/Makefile
@@ -0,0 +1,23 @@
+include $(top_rulesdir)/Makefile.inc
+
+DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+# Catch use of missing kernel APIs early
+CFLAGS += -Werror=implicit-function-declaration
+
+# Don't let the kernel version override traceevent's version
+undefine VERSION
+PREFIX=/usr
+
+MAKE_TRACEEVENT := +$(MAKE) -C $(top_srcdir)/$(OUTDIR) O=$(CURDIR)
+MAKE_TRACEEVENT += prefix=$(PREFIX)
+MAKE_TRACEEVENT += libdir_relative=lib/$(DEB_HOST_MULTIARCH)
+MAKE_TRACEEVENT += pkgconfig_dir=$(PREFIX)/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
+MAKE_TRACEEVENT += V=$(KBUILD_VERBOSE)
+MAKE_TRACEEVENT += ARCH=$(KERNEL_ARCH)
+
+all:
+ $(MAKE_TRACEEVENT)
+
+install:
+ $(MAKE_TRACEEVENT) install
diff --git a/debian/rules.real b/debian/rules.real
index 1e526ff75a12..2dcbaf4fb5da 100644
--- a/debian/rules.real
+++ b/debian/rules.real
@@ -69,7 +69,8 @@ build-arch-arch: \
$(call if_package, linux-cpupower, build-cpupower) \
$(call if_package, liblockdep-dev, build-liblockdep) \
$(call if_package, libbpf-dev, build-libbpf) \
- $(call if_package, hyperv-daemons, build-hyperv-daemons)
+ $(call if_package, hyperv-daemons, build-hyperv-daemons) \
+ $(call if_package, libtraceevent-dev, build-libtraceevent)
binary-arch-arch: \
$(call if_package, $(SOURCE_BASENAME)-config-$(VERSION), install-config_$(ARCH)) \
$(call if_package, linux-headers-$(ABINAME)-all, install-headers_$(ARCH)) \
@@ -83,7 +84,8 @@ binary-arch-arch: \
$(call if_package, linux-cpupower, install-cpupower) \
$(call if_package, liblockdep-dev, install-liblockdep) \
$(call if_package, libbpf-dev, install-libbpf) \
- $(call if_package, hyperv-daemons, install-hyperv-daemons)
+ $(call if_package, hyperv-daemons, install-hyperv-daemons) \
+ $(call if_package, libtraceevent-dev, install-libtraceevent)
build-indep: \
$(call if_package, $(SOURCE_BASENAME)-doc-$(VERSION), $(STAMPS_DIR)/build-doc)
@@ -903,6 +905,35 @@ install-bootwrapper: build-bootwrapper
dh_md5sums
dh_builddeb
+build-libtraceevent: $(STAMPS_DIR)/build-tools-headers
+ $(call make-tools,tools/lib/traceevent)
+
+install-libtraceevent: DH_OPTIONS = $(addprefix -p,$(filter libtraceevent%,$(packages_enabled)))
+install-libtraceevent: SHLIB_PACKAGE = $(filter-out libtraceevent%-plugin,$(filter-out libtraceevent-dev,$(filter libtraceevent%,$(packages_enabled))))
+install-libtraceevent: DIR = $(CURDIR)/debian/libtraceevent-tmp
+install-libtraceevent: build-libtraceevent
+ dh_testdir
+ dh_testroot
+ dh_prep
+ $(call make-tools,tools/lib/traceevent) install DESTDIR=$(DIR)
+ env -u DH_OPTIONS dh_install -p$(SHLIB_PACKAGE) --sourcedir=$(DIR) \
+ 'usr/lib/*/libtraceevent.so.*'
+ dh_install --sourcedir=$(DIR)
+ dh_installchangelogs
+ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
+ dh_installdocs
+endif
+ dh_strip
+ dh_compress
+ dh_fixperms
+ env -u DH_OPTIONS dh_makeshlibs -p$(SHLIB_PACKAGE) \
+ $(SHLIB_PACKAGE)
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
.PHONY: binary-% build-% install-% setup-% source-%
# vim: filetype=make
diff --git a/debian/templates/control.tools-unversioned.in b/debian/templates/control.tools-unversioned.in
index bf23809c3971..0305546e3a21 100644
--- a/debian/templates/control.tools-unversioned.in
+++ b/debian/templates/control.tools-unversioned.in
@@ -6,7 +6,7 @@ Build-Depends: libpci-dev
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: CPU power management tools for Linux
The cpupower command allows inspection and control of cpufreq and
- cpuidle tunables for hardware that support these features. It
+ cpuidle tunables for hardware that supports these features. It
replaces "cpufreq-info" and "cpufreq-set" in cpufrequtils.
.
${cpupower:Arch-Description}
@@ -17,6 +17,9 @@ Section: libs
Architecture: linux-any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: CPU frequency and voltage scaling tools for Linux (libraries)
+ libcpupower is a library for inspecting and controlling cpufreq and
+ cpuidle tunables.
+ .
This package contains the shared library.
Package: libcpupower-dev
@@ -28,7 +31,10 @@ 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.
+ libcpupower is a library for inspecting and controlling cpufreq and
+ cpuidle tunables.
+ .
+ This package is needed to compile programs against libcpupower.
Package: usbip
Build-Profiles: <!stage1 !pkg.linux.notools>
@@ -99,6 +105,8 @@ Description: Support daemons for Linux running on Hyper-V
#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.
+# .
+# This package contains the shared library.
#
#Package: liblockdep-dev
#Build-Profiles: <!stage1 !pkg.linux.notools>
@@ -109,6 +117,8 @@ Description: Support daemons for Linux running on Hyper-V
#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.
+# .
+# This package is needed to compile programs against liblockdep.
Package: libbpf0
Build-Profiles: <!stage1 !pkg.linux.notools>
@@ -119,6 +129,8 @@ Multi-Arch: same
Description: eBPF helper library (shared library)
libbpf is a library for loading eBPF programs and reading and
manipulating eBPF objects from user-space.
+ .
+ This package contains the shared library.
Package: libbpf-dev
Build-Profiles: <!stage1 !pkg.linux.notools>
@@ -129,3 +141,41 @@ Multi-Arch: same
Description: eBPF helper library (development files)
libbpf is a library for loading eBPF programs and reading and
manipulating eBPF objects from user-space.
+ .
+ This package is needed to compile programs against libbpf.
+
+Package: libtraceevent1
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Architecture: linux-any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Section: libs
+Multi-Arch: same
+Description: Linux kernel trace event library (shared library)
+ The libtraceevent library provides APIs to access kernel tracepoint events,
+ located in the tracefs file system under the events directory.
+ .
+ This package contains the shared library.
+
+Package: libtraceevent-dev
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Architecture: linux-any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libtraceevent1 (= ${binary:Version})
+Section: libdevel
+Multi-Arch: same
+Description: Linux kernel trace event library (development files)
+ The libtraceevent library provides APIs to access kernel tracepoint events,
+ located in the tracefs file system under the events directory.
+ .
+ This package is needed to compile programs against libtraceevent1.
+
+Package: libtraceevent1-plugin
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Architecture: linux-any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libtraceevent1 (= ${binary:Version})
+Section: libs
+Multi-Arch: same
+Description: Linux kernel trace event library (plugins)
+ The libtraceevent library provides APIs to access kernel tracepoint events,
+ located in the tracefs file system under the events directory.
+ .
+ This package provides the plugins needed by the programs using libtraceevent1.