aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2019-12-07 12:08:39 +0000
committerSudip Mukherjee <sudipm.mukherjee@gmail.com>2019-12-26 22:55:29 +0000
commitdc9b17550224acd46345dcf31ff74a831345fc6f (patch)
treeccba3b17b4080a56bf6a49ca29d670a07e3987bc
parentebd935120d25855b0dc2bda8ae815f5095dfffd8 (diff)
downloadkernel_replicant_linux-dc9b17550224acd46345dcf31ff74a831345fc6f.tar.gz
kernel_replicant_linux-dc9b17550224acd46345dcf31ff74a831345fc6f.tar.bz2
kernel_replicant_linux-dc9b17550224acd46345dcf31ff74a831345fc6f.zip
debian/patches: Add upstream patches for libtraceevent
These are needed to install in proper paths. 0004-libtraceevent-allow-custom-libdir-path.patch has been sent and still waiting for an Ack from Steven. https://lore.kernel.org/lkml/20191207111440.6574-1-sudipm.mukherjee@gmail.com/T/#u Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
-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/series5
6 files changed, 247 insertions, 0 deletions
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..755a0d622a27
--- /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
+Origin: 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/series b/debian/patches/series
index 93120a19e34e..e9e7ed4eec40 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -128,6 +128,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