All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH 1/3] libtraceevent: Add recipe
@ 2022-12-22  9:08 Khem Raj
  2022-12-22  9:08 ` [meta-oe][PATCH 2/3] libtracefs: " Khem Raj
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Khem Raj @ 2022-12-22  9:08 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Its needed by trace-cmd

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../libtraceevent/libtraceevent_1.7.0.bb      | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 meta-oe/recipes-kernel/libtraceevent/libtraceevent_1.7.0.bb

diff --git a/meta-oe/recipes-kernel/libtraceevent/libtraceevent_1.7.0.bb b/meta-oe/recipes-kernel/libtraceevent/libtraceevent_1.7.0.bb
new file mode 100644
index 0000000000..cbd107a4b4
--- /dev/null
+++ b/meta-oe/recipes-kernel/libtraceevent/libtraceevent_1.7.0.bb
@@ -0,0 +1,22 @@
+# Copyright (C) 2022 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "API to access the kernel tracefs directory"
+HOMEPAGE = "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
+LIC_FILES_CHKSUM = "file://LICENSES/GPL-2.0;md5=e6a75371ba4d16749254a51215d13f97 \
+                    file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd"
+SECTION = "libs"
+
+SRCREV = "826b06bb2484a53fdae196e12ec507a67ec87055"
+SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git;branch=${BPN};protocol=https"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig
+
+do_install() {
+    oe_runmake install DESTDIR=${D} pkgconfig_dir=${libdir}/pkgconfig
+}
+
+FILES:${PN} += "${libdir}/traceevent"
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [meta-oe][PATCH 2/3] libtracefs: Add recipe
  2022-12-22  9:08 [meta-oe][PATCH 1/3] libtraceevent: Add recipe Khem Raj
@ 2022-12-22  9:08 ` Khem Raj
  2022-12-22  9:08 ` [meta-oe][PATCH 3/3] trace-cmd: Remove use of off64_t and lseek64 Khem Raj
  2023-01-02  0:19 ` [oe] [meta-oe][PATCH 1/3] libtraceevent: Add recipe robert.berger.oe.devel
  2 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2022-12-22  9:08 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Needed by trace-cmd

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...not-preserve-ownership-in-cp-command.patch | 31 +++++++++++++++++++
 .../libtracefs/libtracefs_1.6.3.bb            | 22 +++++++++++++
 2 files changed, 53 insertions(+)
 create mode 100644 meta-oe/recipes-kernel/libtracefs/libtracefs/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
 create mode 100644 meta-oe/recipes-kernel/libtracefs/libtracefs_1.6.3.bb

diff --git a/meta-oe/recipes-kernel/libtracefs/libtracefs/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch b/meta-oe/recipes-kernel/libtracefs/libtracefs/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
new file mode 100644
index 0000000000..7ae0856f85
--- /dev/null
+++ b/meta-oe/recipes-kernel/libtracefs/libtracefs/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
@@ -0,0 +1,31 @@
+From 6650d0e79eea330b53635574885208a138fef97e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 21 Dec 2022 22:50:56 -0800
+Subject: [PATCH] makefile: Do not preserve ownership in cp command
+
+Fixes
+ERROR: libtracefs-1.6.3-r0 do_package_qa: QA Issue: libtracefs: /usr/lib/libtracefs.so is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 27d425c..3aea142 100644
+--- a/Makefile
++++ b/Makefile
+@@ -273,7 +273,7 @@ endif # DESTDIR = ""
+ 
+ install_libs: libs install_pkgconfig
+ 	$(Q)$(call do_install,$(LIBTRACEFS_SHARED),$(libdir_SQ)); \
+-		cp -fpR $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ)
++		cp --no-preserve=ownership --recursive $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ)
+ 	$(Q)$(call do_install,$(src)/include/tracefs.h,$(includedir_SQ),644)
+ 	$(Q)$(call install_ld_config)
+ 
+-- 
+2.39.0
+
diff --git a/meta-oe/recipes-kernel/libtracefs/libtracefs_1.6.3.bb b/meta-oe/recipes-kernel/libtracefs/libtracefs_1.6.3.bb
new file mode 100644
index 0000000000..fbb6b76d10
--- /dev/null
+++ b/meta-oe/recipes-kernel/libtracefs/libtracefs_1.6.3.bb
@@ -0,0 +1,22 @@
+# Copyright (C) 2022 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Library to parse raw trace event formats	"
+HOMEPAGE = "https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
+LIC_FILES_CHKSUM = "file://LICENSES/GPL-2.0;md5=e6a75371ba4d16749254a51215d13f97 \
+                    file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd"
+SECTION = "libs"
+DEPENDS = "libtraceevent bison-native flex-native"
+
+SRCREV = "3395d484eadfd8ab38311032f28e7f79c4f0e33b"
+SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git;branch=${BPN};protocol=https \
+           file://0001-makefile-Do-not-preserve-ownership-in-cp-command.patch \
+           "
+S = "${WORKDIR}/git"
+
+inherit pkgconfig
+
+do_install() {
+    oe_runmake install DESTDIR=${D} pkgconfig_dir=${libdir}/pkgconfig
+}
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [meta-oe][PATCH 3/3] trace-cmd: Remove use of off64_t and lseek64
  2022-12-22  9:08 [meta-oe][PATCH 1/3] libtraceevent: Add recipe Khem Raj
  2022-12-22  9:08 ` [meta-oe][PATCH 2/3] libtracefs: " Khem Raj
@ 2022-12-22  9:08 ` Khem Raj
  2023-01-02  0:19 ` [oe] [meta-oe][PATCH 1/3] libtraceevent: Add recipe robert.berger.oe.devel
  2 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2022-12-22  9:08 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0002-replace-off64_t-and-lseek64.patch    | 426 ++++++++++++++++++
 .../trace-cmd/trace-cmd_2.9.1.bb              |  16 +-
 2 files changed, 439 insertions(+), 3 deletions(-)
 create mode 100644 meta-oe/recipes-kernel/trace-cmd/files/0002-replace-off64_t-and-lseek64.patch

diff --git a/meta-oe/recipes-kernel/trace-cmd/files/0002-replace-off64_t-and-lseek64.patch b/meta-oe/recipes-kernel/trace-cmd/files/0002-replace-off64_t-and-lseek64.patch
new file mode 100644
index 0000000000..453a888b52
--- /dev/null
+++ b/meta-oe/recipes-kernel/trace-cmd/files/0002-replace-off64_t-and-lseek64.patch
@@ -0,0 +1,426 @@
+From 6dab4b10be4df906375d0dcfa5bbffc43d3d953a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 22 Dec 2022 00:58:26 -0800
+Subject: [PATCH 2/2] replace off64_t and lseek64
+
+Musl does not define these interfaces unless -D_LARGEFILE64_SOURCE is
+defined and that too it is transitional until apps switch to using 64bit
+off_t
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/trace-cmd/trace-input.c    | 54 +++++++++++++++++-----------------
+ lib/trace-cmd/trace-output.c   | 44 +++++++++++++--------------
+ lib/trace-cmd/trace-recorder.c |  8 ++---
+ tracecmd/trace-dump.c          |  6 ++--
+ tracecmd/trace-read.c          |  2 +-
+ 5 files changed, 57 insertions(+), 57 deletions(-)
+
+diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c
+index af97883e..c3f91fcd 100644
+--- a/lib/trace-cmd/trace-input.c
++++ b/lib/trace-cmd/trace-input.c
+@@ -33,15 +33,15 @@ static int force_read = 0;
+ 
+ struct page_map {
+ 	struct list_head	list;
+-	off64_t			offset;
+-	off64_t			size;
++	off_t			offset;
++	off_t			size;
+ 	void			*map;
+ 	int			ref_count;
+ };
+ 
+ struct page {
+ 	struct list_head	list;
+-	off64_t			offset;
++	off_t			offset;
+ 	struct tracecmd_input	*handle;
+ 	struct page_map		*page_map;
+ 	void			*map;
+@@ -385,7 +385,7 @@ static int read_header_files(struct tracecmd_input *handle)
+ 	free(header);
+ 
+ 	handle->ftrace_files_start =
+-		lseek64(handle->fd, 0, SEEK_CUR);
++		lseek(handle->fd, 0, SEEK_CUR);
+ 
+ 	return 0;
+ 
+@@ -581,7 +581,7 @@ static int read_ftrace_files(struct tracecmd_input *handle, const char *regex)
+ 	}
+ 
+ 	handle->event_files_start =
+-		lseek64(handle->fd, 0, SEEK_CUR);
++		lseek(handle->fd, 0, SEEK_CUR);
+ 
+ 	if (sreg) {
+ 		regfree(sreg);
+@@ -817,11 +817,11 @@ static unsigned long long calc_page_offset(struct tracecmd_input *handle,
+ 	return offset & ~(handle->page_size - 1);
+ }
+ 
+-static int read_page(struct tracecmd_input *handle, off64_t offset,
++static int read_page(struct tracecmd_input *handle, off_t offset,
+ 		     int cpu, void *map)
+ {
+-	off64_t save_seek;
+-	off64_t ret;
++	off_t save_seek;
++	off_t ret;
+ 
+ 	if (handle->use_pipe) {
+ 		ret = read(handle->cpu_data[cpu].pipe_fd, map, handle->page_size);
+@@ -839,9 +839,9 @@ static int read_page(struct tracecmd_input *handle, off64_t offset,
+ 	}
+ 
+ 	/* other parts of the code may expect the pointer to not move */
+-	save_seek = lseek64(handle->fd, 0, SEEK_CUR);
++	save_seek = lseek(handle->fd, 0, SEEK_CUR);
+ 
+-	ret = lseek64(handle->fd, offset, SEEK_SET);
++	ret = lseek(handle->fd, offset, SEEK_SET);
+ 	if (ret < 0)
+ 		return -1;
+ 	ret = read(handle->fd, map, handle->page_size);
+@@ -849,7 +849,7 @@ static int read_page(struct tracecmd_input *handle, off64_t offset,
+ 		return -1;
+ 
+ 	/* reset the file pointer back */
+-	lseek64(handle->fd, save_seek, SEEK_SET);
++	lseek(handle->fd, save_seek, SEEK_SET);
+ 
+ 	return 0;
+ }
+@@ -881,12 +881,12 @@ static void free_page_map(struct page_map *page_map)
+ }
+ 
+ static void *allocate_page_map(struct tracecmd_input *handle,
+-			       struct page *page, int cpu, off64_t offset)
++			       struct page *page, int cpu, off_t offset)
+ {
+ 	struct cpu_data *cpu_data = &handle->cpu_data[cpu];
+ 	struct page_map *page_map;
+-	off64_t map_size;
+-	off64_t map_offset;
++	off_t map_size;
++	off_t map_offset;
+ 	void *map;
+ 	int ret;
+ 
+@@ -967,7 +967,7 @@ static void *allocate_page_map(struct tracecmd_input *handle,
+ }
+ 
+ static struct page *allocate_page(struct tracecmd_input *handle,
+-				  int cpu, off64_t offset)
++				  int cpu, off_t offset)
+ {
+ 	struct cpu_data *cpu_data = &handle->cpu_data[cpu];
+ 	struct page **pages;
+@@ -1219,7 +1219,7 @@ static int update_page_info(struct tracecmd_input *handle, int cpu)
+  *        -1 on error
+  */
+ static int get_page(struct tracecmd_input *handle, int cpu,
+-		    off64_t offset)
++		    off_t offset)
+ {
+ 	/* Don't map if the page is already where we want */
+ 	if (handle->cpu_data[cpu].offset == offset &&
+@@ -1263,7 +1263,7 @@ static int get_page(struct tracecmd_input *handle, int cpu,
+ 
+ static int get_next_page(struct tracecmd_input *handle, int cpu)
+ {
+-	off64_t offset;
++	off_t offset;
+ 
+ 	if (!handle->cpu_data[cpu].page && !handle->use_pipe)
+ 		return 0;
+@@ -1484,7 +1484,7 @@ struct tep_record *
+ tracecmd_read_cpu_last(struct tracecmd_input *handle, int cpu)
+ {
+ 	struct tep_record *record = NULL;
+-	off64_t offset, page_offset;
++	off_t offset, page_offset;
+ 
+ 	offset = handle->cpu_data[cpu].file_offset +
+ 		handle->cpu_data[cpu].file_size;
+@@ -1545,7 +1545,7 @@ tracecmd_set_cpu_to_timestamp(struct tracecmd_input *handle, int cpu,
+ 			      unsigned long long ts)
+ {
+ 	struct cpu_data *cpu_data = &handle->cpu_data[cpu];
+-	off64_t start, end, next;
++	off_t start, end, next;
+ 
+ 	if (cpu < 0 || cpu >= handle->cpus) {
+ 		errno = -EINVAL;
+@@ -2965,7 +2965,7 @@ void tracecmd_print_events(struct tracecmd_input *handle, const char *regex)
+ 		regex = ".*";
+ 
+ 	if (!handle->ftrace_files_start) {
+-		lseek64(handle->fd, handle->header_files_start, SEEK_SET);
++		lseek(handle->fd, handle->header_files_start, SEEK_SET);
+ 		read_header_files(handle);
+ 	}
+ 	ret = read_ftrace_files(handle, regex);
+@@ -3120,13 +3120,13 @@ struct tracecmd_input *tracecmd_alloc_fd(int fd)
+ 	handle->page_size = page_size;
+ 
+ 	handle->header_files_start =
+-		lseek64(handle->fd, 0, SEEK_CUR);
++		lseek(handle->fd, 0, SEEK_CUR);
+ 
+ 	handle->total_file_size =
+-		lseek64(handle->fd, 0, SEEK_END);
++		lseek(handle->fd, 0, SEEK_END);
+ 
+ 	handle->header_files_start =
+-		lseek64(handle->fd, handle->header_files_start, SEEK_SET);
++		lseek(handle->fd, handle->header_files_start, SEEK_SET);
+ 
+ 	return handle;
+ 
+@@ -3419,7 +3419,7 @@ static int copy_header_files(struct tracecmd_input *handle, int fd)
+ {
+ 	unsigned long long size;
+ 
+-	lseek64(handle->fd, handle->header_files_start, SEEK_SET);
++	lseek(handle->fd, handle->header_files_start, SEEK_SET);
+ 
+ 	/* "header_page"  */
+ 	if (read_copy_data(handle, 12, fd) < 0)
+@@ -3713,9 +3713,9 @@ tracecmd_buffer_instance_handle(struct tracecmd_input *handle, int indx)
+ 	new_handle->pid_maps = NULL;
+ 
+ 	/* Save where we currently are */
+-	offset = lseek64(handle->fd, 0, SEEK_CUR);
++	offset = lseek(handle->fd, 0, SEEK_CUR);
+ 
+-	ret = lseek64(handle->fd, buffer->offset, SEEK_SET);
++	ret = lseek(handle->fd, buffer->offset, SEEK_SET);
+ 	if (ret < 0) {
+ 		warning("could not seek to buffer %s offset %ld\n",
+ 			buffer->name, buffer->offset);
+@@ -3730,7 +3730,7 @@ tracecmd_buffer_instance_handle(struct tracecmd_input *handle, int indx)
+ 		goto error;
+ 	}
+ 
+-	ret = lseek64(handle->fd, offset, SEEK_SET);
++	ret = lseek(handle->fd, offset, SEEK_SET);
+ 	if (ret < 0) {
+ 		warning("could not seek to back to offset %ld\n", offset);
+ 		goto error;
+diff --git a/lib/trace-cmd/trace-output.c b/lib/trace-cmd/trace-output.c
+index 4a9a857d..0f5acd2f 100644
+--- a/lib/trace-cmd/trace-output.c
++++ b/lib/trace-cmd/trace-output.c
+@@ -800,8 +800,8 @@ static int save_tracing_file_data(struct tracecmd_output *handle,
+ 	unsigned long long endian8;
+ 	char *file = NULL;
+ 	struct stat st;
+-	off64_t check_size;
+-	off64_t size;
++	off_t check_size;
++	off_t size;
+ 	int ret = -1;
+ 
+ 	file = get_tracing_file(handle, filename);
+@@ -1069,7 +1069,7 @@ int tracecmd_write_options(struct tracecmd_output *handle)
+ 			return -1;
+ 
+ 		/* Save the data location in case it needs to be updated */
+-		options->offset = lseek64(handle->fd, 0, SEEK_CUR);
++		options->offset = lseek(handle->fd, 0, SEEK_CUR);
+ 
+ 		if (do_write_check(handle, options->data,
+ 				   options->size))
+@@ -1099,9 +1099,9 @@ int tracecmd_append_options(struct tracecmd_output *handle)
+ 	if (handle->options_written)
+ 		return 0;
+ 
+-	if (lseek64(handle->fd, 0, SEEK_END) == (off_t)-1)
++	if (lseek(handle->fd, 0, SEEK_END) == (off_t)-1)
+ 		return -1;
+-	offset = lseek64(handle->fd, -2, SEEK_CUR);
++	offset = lseek(handle->fd, -2, SEEK_CUR);
+ 	if (offset == (off_t)-1)
+ 		return -1;
+ 
+@@ -1119,7 +1119,7 @@ int tracecmd_append_options(struct tracecmd_output *handle)
+ 			return -1;
+ 
+ 		/* Save the data location in case it needs to be updated */
+-		options->offset = lseek64(handle->fd, 0, SEEK_CUR);
++		options->offset = lseek(handle->fd, 0, SEEK_CUR);
+ 
+ 		if (do_write_check(handle, options->data,
+ 				   options->size))
+@@ -1156,10 +1156,10 @@ int tracecmd_update_option(struct tracecmd_output *handle,
+ 	}
+ 
+ 	/* Save current offset */
+-	offset = lseek64(handle->fd, 0, SEEK_CUR);
++	offset = lseek(handle->fd, 0, SEEK_CUR);
+ 
+-	ret = lseek64(handle->fd, option->offset, SEEK_SET);
+-	if (ret == (off64_t)-1) {
++	ret = lseek(handle->fd, option->offset, SEEK_SET);
++	if (ret == (off_t)-1) {
+ 		warning("could not seek to %lld\n", option->offset);
+ 		return -1;
+ 	}
+@@ -1167,8 +1167,8 @@ int tracecmd_update_option(struct tracecmd_output *handle,
+ 	if (do_write_check(handle, data, size))
+ 		return -1;
+ 
+-	ret = lseek64(handle->fd, offset, SEEK_SET);
+-	if (ret == (off64_t)-1) {
++	ret = lseek(handle->fd, offset, SEEK_SET);
++	if (ret == (off_t)-1) {
+ 		warning("could not seek to %lld\n", offset);
+ 		return -1;
+ 	}
+@@ -1243,11 +1243,11 @@ out_free:
+ int tracecmd_write_cpu_data(struct tracecmd_output *handle,
+ 			    int cpus, char * const *cpu_data_files)
+ {
+-	off64_t *offsets = NULL;
++	off_t *offsets = NULL;
+ 	unsigned long long *sizes = NULL;
+-	off64_t offset;
++	off_t offset;
+ 	unsigned long long endian8;
+-	off64_t check_size;
++	off_t check_size;
+ 	char *file;
+ 	struct stat st;
+ 	int ret;
+@@ -1263,7 +1263,7 @@ int tracecmd_write_cpu_data(struct tracecmd_output *handle,
+ 	if (!sizes)
+ 		goto out_free;
+ 
+-	offset = lseek64(handle->fd, 0, SEEK_CUR);
++	offset = lseek(handle->fd, 0, SEEK_CUR);
+ 
+ 	/* hold any extra data for data */
+ 	offset += cpus * (16);
+@@ -1318,8 +1318,8 @@ int tracecmd_write_cpu_data(struct tracecmd_output *handle,
+ 		if (!tracecmd_get_quiet(handle))
+ 			fprintf(stderr, "CPU%d data recorded at offset=0x%llx\n",
+ 				i, (unsigned long long) offsets[i]);
+-		offset = lseek64(handle->fd, offsets[i], SEEK_SET);
+-		if (offset == (off64_t)-1) {
++		offset = lseek(handle->fd, offsets[i], SEEK_SET);
++		if (offset == (off_t)-1) {
+ 			warning("could not seek to %lld\n", offsets[i]);
+ 			goto out_free;
+ 		}
+@@ -1369,11 +1369,11 @@ int tracecmd_append_buffer_cpu_data(struct tracecmd_output *handle,
+ 	tsize_t offset;
+ 	stsize_t ret;
+ 
+-	offset = lseek64(handle->fd, 0, SEEK_CUR);
++	offset = lseek(handle->fd, 0, SEEK_CUR);
+ 
+ 	/* Go to the option data, where will write the offest */
+-	ret = lseek64(handle->fd, option->offset, SEEK_SET);
+-	if (ret == (off64_t)-1) {
++	ret = lseek(handle->fd, option->offset, SEEK_SET);
++	if (ret == (off_t)-1) {
+ 		warning("could not seek to %lld\n", option->offset);
+ 		return -1;
+ 	}
+@@ -1382,8 +1382,8 @@ int tracecmd_append_buffer_cpu_data(struct tracecmd_output *handle,
+ 		return -1;
+ 
+ 	/* Go back to end of file */
+-	ret = lseek64(handle->fd, offset, SEEK_SET);
+-	if (ret == (off64_t)-1) {
++	ret = lseek(handle->fd, offset, SEEK_SET);
++	if (ret == (off_t)-1) {
+ 		warning("could not seek to %lld\n", offset);
+ 		return -1;
+ 	}
+diff --git a/lib/trace-cmd/trace-recorder.c b/lib/trace-cmd/trace-recorder.c
+index 2a6e2b67..d83320d9 100644
+--- a/lib/trace-cmd/trace-recorder.c
++++ b/lib/trace-cmd/trace-recorder.c
+@@ -53,7 +53,7 @@ static int append_file(int size, int dst, int src)
+ 	char buf[size];
+ 	int r;
+ 
+-	lseek64(src, 0, SEEK_SET);
++	lseek(src, 0, SEEK_SET);
+ 
+ 	/* If there's an error, then we are pretty much screwed :-p */
+ 	do {
+@@ -84,10 +84,10 @@ void tracecmd_free_recorder(struct tracecmd_recorder *recorder)
+ 					  recorder->fd2, recorder->fd1);
+ 			/* Error on copying, then just keep fd1 */
+ 			if (ret) {
+-				lseek64(recorder->fd1, 0, SEEK_END);
++				lseek(recorder->fd1, 0, SEEK_END);
+ 				goto close;
+ 			}
+-			lseek64(recorder->fd1, 0, SEEK_SET);
++			lseek(recorder->fd1, 0, SEEK_SET);
+ 			ftruncate(recorder->fd1, 0);
+ 		}
+ 		append_file(recorder->page_size, recorder->fd1, recorder->fd2);
+@@ -371,7 +371,7 @@ static inline void update_fd(struct tracecmd_recorder *recorder, int size)
+ 		fd = recorder->fd1;
+ 
+ 	/* Zero out the new file we are writing to */
+-	lseek64(fd, 0, SEEK_SET);
++	lseek(fd, 0, SEEK_SET);
+ 	ftruncate(fd, 0);
+ 
+ 	recorder->fd = fd;
+diff --git a/tracecmd/trace-dump.c b/tracecmd/trace-dump.c
+index 5642f12a..0a54bf42 100644
+--- a/tracecmd/trace-dump.c
++++ b/tracecmd/trace-dump.c
+@@ -487,7 +487,7 @@ static void dump_options(int fd)
+ 
+ 		count++;
+ 		if (!DUMP_CHECK(OPTIONS)) {
+-			lseek64(fd, size, SEEK_CUR);
++			lseek(fd, size, SEEK_CUR);
+ 			continue;
+ 		}
+ 		switch (option) {
+@@ -533,7 +533,7 @@ static void dump_options(int fd)
+ 		default:
+ 			do_print(OPTIONS, " %d %d\t[Unknown option, size - skipping]\n",
+ 				 option, size);
+-			lseek64(fd, size, SEEK_CUR);
++			lseek(fd, size, SEEK_CUR);
+ 			break;
+ 		}
+ 	}
+@@ -579,7 +579,7 @@ static void dump_therest(int fd)
+ 		else if (strncmp(str, HEAD_FLYRECORD, 10) == 0)
+ 			dump_flyrecord(fd);
+ 		else {
+-			lseek64(fd, -10, SEEK_CUR);
++			lseek(fd, -10, SEEK_CUR);
+ 			break;
+ 		}
+ 	}
+diff --git a/tracecmd/trace-read.c b/tracecmd/trace-read.c
+index e1811074..181a69df 100644
+--- a/tracecmd/trace-read.c
++++ b/tracecmd/trace-read.c
+@@ -187,7 +187,7 @@ static void print_event(struct trace_seq *s, struct tracecmd_input *handle,
+ #define TEST_READ_AT 0
+ #if TEST_READ_AT
+ #define DO_TEST
+-static off64_t test_read_at_offset;
++static off_t test_read_at_offset;
+ static int test_read_at_copy = 100;
+ static int test_read_at_index;
+ static void show_test(struct tracecmd_input *handle)
+-- 
+2.39.0
+
diff --git a/meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb b/meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb
index 6640707382..66bc2932ab 100644
--- a/meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb
+++ b/meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb
@@ -4,16 +4,26 @@ LICENSE = "GPL-2.0-only & LGPL-2.1-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=873f48a813bded3de6ebc54e6880c4ac"
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=master \
-	file://0001-trace-cmd-make-it-build-with-musl.patch"
+           file://0001-trace-cmd-make-it-build-with-musl.patch \
+           file://0002-replace-off64_t-and-lseek64.patch \
+           "
 
 SRCREV = "530b1a0caef39466e16bbd49de5afef89656f03f"
 
 S = "${WORKDIR}/git"
 
+DEPENDS += "libtraceevent libtracefs zstd xmlto-native asciidoc-native"
+
+inherit pkgconfig
+
+do_compile() {
+        oe_runmake libdir_relative=${BASELIB} all libs
+}
+
 do_install() {
-       oe_runmake etcdir=${sysconfdir} DESTDIR=${D} install
+       oe_runmake libdir_relative=${BASELIB} etcdir=${sysconfdir} DESTDIR=${D} install install_libs
        mkdir -p ${D}${libdir}/traceevent/plugins/${BPN}
        mv ${D}/${libdir}/traceevent/plugins/*.so ${D}${libdir}/traceevent/plugins/${BPN}/
 }
 
-FILES:${PN} += "${libdir}/traceevent/plugins"
+FILES:${PN} += "${libdir}/traceevent ${libdir}/traceevent/plugins ${libdir}/tracefs"
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [oe] [meta-oe][PATCH 1/3] libtraceevent: Add recipe
  2022-12-22  9:08 [meta-oe][PATCH 1/3] libtraceevent: Add recipe Khem Raj
  2022-12-22  9:08 ` [meta-oe][PATCH 2/3] libtracefs: " Khem Raj
  2022-12-22  9:08 ` [meta-oe][PATCH 3/3] trace-cmd: Remove use of off64_t and lseek64 Khem Raj
@ 2023-01-02  0:19 ` robert.berger.oe.devel
  2 siblings, 0 replies; 4+ messages in thread
From: robert.berger.oe.devel @ 2023-01-02  0:19 UTC (permalink / raw)
  To: Khem Raj, openembedded-devel

Hi Khem,

I saw issues with libtraceevent and trace-cmd when building an sdk or an 
-sdk image, since they seem to install the same header files on the same 
place.

I think I tried core-image-sato-sdk and also to build an SDK with it.

Regards,

Robert

-- 
Robert Berger
Embedded Software Evangelist

Reliable Embedded Systems
Consulting Training Engineering
URL: https://www.reliableembeddedsystems.com

Schedule a web meeting:
https://calendly.com/reliableembeddedsystems/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-02  0:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-22  9:08 [meta-oe][PATCH 1/3] libtraceevent: Add recipe Khem Raj
2022-12-22  9:08 ` [meta-oe][PATCH 2/3] libtracefs: " Khem Raj
2022-12-22  9:08 ` [meta-oe][PATCH 3/3] trace-cmd: Remove use of off64_t and lseek64 Khem Raj
2023-01-02  0:19 ` [oe] [meta-oe][PATCH 1/3] libtraceevent: Add recipe robert.berger.oe.devel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.