All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][Patch v2 0/3] perf: add libtraceevent packageconfig
@ 2023-05-09 16:13 Max Krummenacher
  2023-05-09 16:13 ` [OE-core][Patch v2 1/3] libtraceevent: import from meta-openembedded Max Krummenacher
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Max Krummenacher @ 2023-05-09 16:13 UTC (permalink / raw)
  To: openembedded-core; +Cc: bruce.ashfield, raj.khem, Max Krummenacher

From: Max Krummenacher <max.krummenacher@toradex.com>

With kernel 6.4-rc1 commit 6898e60f709b ("perf build: If libtraceevent
isn't present error the build") having libtraceevent is a required
dependency unless building it with 'NO_LIBTRACEEVENT=1'.

Changes in V2
- add a patch importing libtraceevent from meta-openembedded
- move the pkg-config changes in a separate commit
- default to setting the packageconfig as we now have the dependecy in core

Max Krummenacher (3):
  libtraceevent: import from meta-openembedded
  perf: make pkg-config available
  perf: add libtraceevent packageconfig

 ...not-preserve-ownership-in-cp-command.patch | 40 +++++++++++++++++++
 .../libtraceevent/libtraceevent_1.7.2.bb      | 25 ++++++++++++
 meta/recipes-kernel/perf/perf.bb              |  5 ++-
 3 files changed, 69 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
 create mode 100644 meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb

-- 
2.35.3



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

* [OE-core][Patch v2 1/3] libtraceevent: import from meta-openembedded
  2023-05-09 16:13 [OE-core][Patch v2 0/3] perf: add libtraceevent packageconfig Max Krummenacher
@ 2023-05-09 16:13 ` Max Krummenacher
  2023-05-09 17:09   ` Jose Quaresma
  2023-05-09 16:13 ` [OE-core][Patch v2 2/3] perf: make pkg-config available Max Krummenacher
  2023-05-09 16:13 ` [OE-core][Patch v2 3/3] perf: add libtraceevent packageconfig Max Krummenacher
  2 siblings, 1 reply; 7+ messages in thread
From: Max Krummenacher @ 2023-05-09 16:13 UTC (permalink / raw)
  To: openembedded-core; +Cc: bruce.ashfield, raj.khem, Max Krummenacher

From: Max Krummenacher <max.krummenacher@toradex.com>

Import from meta-openembedded at commit d250a0dc0 ("libtraceevent:
upgrade 1.7.1 -> 1.7.2").
Starting with kernel 6.4 libtraceevent is a dependency of perf. While
one can still build perf without it by opting out one would loose its
functionality compared with building perf from kernels before 6.4

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
---
 ...not-preserve-ownership-in-cp-command.patch | 40 +++++++++++++++++++
 .../libtraceevent/libtraceevent_1.7.2.bb      | 25 ++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
 create mode 100644 meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb

diff --git a/meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch b/meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
new file mode 100644
index 0000000000..5e88048817
--- /dev/null
+++ b/meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
@@ -0,0 +1,40 @@
+From ed0a31000305d937abe47c44d705b5b52bb36f79 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 22 Dec 2022 18:32:17 -0800
+Subject: [PATCH] makefile: Do not preserve ownership in cp command
+
+Fixes
+
+ERROR: libtraceevent-1.7.0-r0 do_package_qa: QA Issue: libtraceevent: /usr/lib/libtraceevent.a 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 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 965ff47..0e782cb 100644
+--- a/Makefile
++++ b/Makefile
+@@ -287,7 +287,7 @@ $(BUILD_PREFIX): force
+ 	$(Q)$(call build_prefix,$(prefix))
+ 
+ define do_make_pkgconfig_file
+-	cp -f ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE};	\
++	install -m 0644 ${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_relative}|g" ${PKG_CONFIG_FILE}; \
+@@ -335,7 +335,7 @@ install: install_libs install_plugins
+ 
+ install_libs: libs install_headers install_pkgconfig
+ 	$(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ)); \
+-		cp -fpR $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ)
++		cp --no-preserve=ownership --recursive $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ)
+ 	$(Q)$(call install_ld_config)
+ 
+ install_pkgconfig: $(PKG_CONFIG_FILE)
+-- 
+2.39.0
+
diff --git a/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb b/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
new file mode 100644
index 0000000000..089b6814c7
--- /dev/null
+++ b/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
@@ -0,0 +1,25 @@
+# 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 = "1c6f0f3b2bb47571fc455dc565dc343152517d98"
+SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.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
+}
+
+PACKAGES += "${PN}-plugins"
+
+FILES:${PN}-plugins += "${libdir}/traceevent/plugins"
-- 
2.35.3



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

* [OE-core][Patch v2 2/3] perf: make pkg-config available
  2023-05-09 16:13 [OE-core][Patch v2 0/3] perf: add libtraceevent packageconfig Max Krummenacher
  2023-05-09 16:13 ` [OE-core][Patch v2 1/3] libtraceevent: import from meta-openembedded Max Krummenacher
@ 2023-05-09 16:13 ` Max Krummenacher
  2023-05-09 16:13 ` [OE-core][Patch v2 3/3] perf: add libtraceevent packageconfig Max Krummenacher
  2 siblings, 0 replies; 7+ messages in thread
From: Max Krummenacher @ 2023-05-09 16:13 UTC (permalink / raw)
  To: openembedded-core; +Cc: bruce.ashfield, raj.khem, Max Krummenacher

From: Max Krummenacher <max.krummenacher@toradex.com>

Fixup the to be called pkg-config as $(CROSS_COMPILE)pkg-config doesn't
exist.
With kernels < 6.4 pkg-config is only used for the gtk+-2.0 integration
which is disabled in the OE config. Thus the issue wasn't exposed so
far. With kernel 6.4 pkg-config is additionally used for libtraceevent
and libtracefs.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
---
 meta/recipes-kernel/perf/perf.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 2f28d16fba..80199a4515 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -87,6 +87,7 @@ EXTRA_OEMAKE = '\
     perfexecdir=${libexecdir} \
     NO_GTK2=1 \
     ${PACKAGECONFIG_CONFARGS} \
+    PKG_CONFIG=pkg-config \
     TMPDIR="${B}" \
     LIBUNWIND_DIR=${STAGING_EXECPREFIXDIR} \
 '
@@ -287,6 +288,7 @@ do_configure:prepend () {
         sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf
         sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/perf/Makefile.perf
         sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/perf/Makefile.perf
+        sed -i 's,PKG_CONFIG = $(CROSS_COMPILE)pkg-config,#PKG_CONFIG,' ${S}/tools/perf/Makefile.perf
     fi
     if [ -e "${S}/tools/lib/api/Makefile" ]; then
         sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile
-- 
2.35.3



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

* [OE-core][Patch v2 3/3] perf: add libtraceevent packageconfig
  2023-05-09 16:13 [OE-core][Patch v2 0/3] perf: add libtraceevent packageconfig Max Krummenacher
  2023-05-09 16:13 ` [OE-core][Patch v2 1/3] libtraceevent: import from meta-openembedded Max Krummenacher
  2023-05-09 16:13 ` [OE-core][Patch v2 2/3] perf: make pkg-config available Max Krummenacher
@ 2023-05-09 16:13 ` Max Krummenacher
  2 siblings, 0 replies; 7+ messages in thread
From: Max Krummenacher @ 2023-05-09 16:13 UTC (permalink / raw)
  To: openembedded-core; +Cc: bruce.ashfield, raj.khem, Max Krummenacher

From: Max Krummenacher <max.krummenacher@toradex.com>

With kernel 6.4-rc1 commit 6898e60f709b ("perf build: If libtraceevent
isn't present error the build") having libtraceevent is a required
dependency unless building it with 'NO_LIBTRACEEVENT=1'.

Older kernels did build libtraceevent as provided by the kernel sources.
(Unless LIBTRACEEVENT_DYNAMIC=1 was defined, then it tried to pickup
an external provided libtraceevent and printed a warning if not found.)

Add a libtraceevent packageconfig which adds the dependency on
libtraceevent if set, otherwise builds with NO_LIBTRACEEVENT=1.
For older kernels the old behaviour of building libtraceevent from
the kernel sources isn't changed.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
---
 meta/recipes-kernel/perf/perf.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 80199a4515..19f8aadaa0 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -11,7 +11,7 @@ LICENSE = "GPL-2.0-only"
 
 PR = "r9"
 
-PACKAGECONFIG ??= "scripting tui libunwind"
+PACKAGECONFIG ??= "scripting tui libunwind libtraceevent"
 PACKAGECONFIG[dwarf] = ",NO_DWARF=1"
 PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3 python3-setuptools-native"
 # gui support was added with kernel 3.6.35
@@ -27,6 +27,7 @@ PACKAGECONFIG[jvmti] = ",NO_JVMTI=1"
 PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit"
 PACKAGECONFIG[manpages] = ",,xmlto-native asciidoc-native"
 PACKAGECONFIG[cap] = ",,libcap"
+PACKAGECONFIG[libtraceevent] = ",NO_LIBTRACEEVENT=1,libtraceevent"
 # Arm CoreSight
 PACKAGECONFIG[coresight] = "CORESIGHT=1,,opencsd"
 
-- 
2.35.3



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

* Re: [OE-core][Patch v2 1/3] libtraceevent: import from meta-openembedded
  2023-05-09 16:13 ` [OE-core][Patch v2 1/3] libtraceevent: import from meta-openembedded Max Krummenacher
@ 2023-05-09 17:09   ` Jose Quaresma
  2023-05-10 20:00     ` Bruce Ashfield
  0 siblings, 1 reply; 7+ messages in thread
From: Jose Quaresma @ 2023-05-09 17:09 UTC (permalink / raw)
  To: Max Krummenacher
  Cc: openembedded-core, bruce.ashfield, raj.khem, Max Krummenacher

[-- Attachment #1: Type: text/plain, Size: 5186 bytes --]

Hi Max,

This also needs an entry on meta/conf/distro/include/maintainers.inc

Jose

Max Krummenacher <max.oss.09@gmail.com> escreveu no dia terça, 9/05/2023
à(s) 17:13:

> From: Max Krummenacher <max.krummenacher@toradex.com>
>
> Import from meta-openembedded at commit d250a0dc0 ("libtraceevent:
> upgrade 1.7.1 -> 1.7.2").
> Starting with kernel 6.4 libtraceevent is a dependency of perf. While
> one can still build perf without it by opting out one would loose its
> functionality compared with building perf from kernels before 6.4
>
> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
> ---
>  ...not-preserve-ownership-in-cp-command.patch | 40 +++++++++++++++++++
>  .../libtraceevent/libtraceevent_1.7.2.bb      | 25 ++++++++++++
>  2 files changed, 65 insertions(+)
>  create mode 100644
> meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
>  create mode 100644 meta/recipes-kernel/libtraceevent/
> libtraceevent_1.7.2.bb
>
> diff --git
> a/meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
> b/meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
> new file mode 100644
> index 0000000000..5e88048817
> --- /dev/null
> +++
> b/meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
> @@ -0,0 +1,40 @@
> +From ed0a31000305d937abe47c44d705b5b52bb36f79 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Thu, 22 Dec 2022 18:32:17 -0800
> +Subject: [PATCH] makefile: Do not preserve ownership in cp command
> +
> +Fixes
> +
> +ERROR: libtraceevent-1.7.0-r0 do_package_qa: QA Issue: libtraceevent:
> /usr/lib/libtraceevent.a 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 | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 965ff47..0e782cb 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -287,7 +287,7 @@ $(BUILD_PREFIX): force
> +       $(Q)$(call build_prefix,$(prefix))
> +
> + define do_make_pkgconfig_file
> +-      cp -f ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE};    \
> ++      install -m 0644 ${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_relative}|g" ${PKG_CONFIG_FILE}; \
> +@@ -335,7 +335,7 @@ install: install_libs install_plugins
> +
> + install_libs: libs install_headers install_pkgconfig
> +       $(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ)); \
> +-              cp -fpR $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ)
> ++              cp --no-preserve=ownership --recursive $(LIB_INSTALL)
> $(DESTDIR)$(libdir_SQ)
> +       $(Q)$(call install_ld_config)
> +
> + install_pkgconfig: $(PKG_CONFIG_FILE)
> +--
> +2.39.0
> +
> diff --git a/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
> b/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
> new file mode 100644
> index 0000000000..089b6814c7
> --- /dev/null
> +++ b/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
> @@ -0,0 +1,25 @@
> +# 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 = "1c6f0f3b2bb47571fc455dc565dc343152517d98"
> +SRC_URI = "git://
> git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git;branch=${BPN};protocol=https
> <http://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git;branch=$%7BBPN%7D;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
> +}
> +
> +PACKAGES += "${PN}-plugins"
> +
> +FILES:${PN}-plugins += "${libdir}/traceevent/plugins"
> --
> 2.35.3
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#181050):
> https://lists.openembedded.org/g/openembedded-core/message/181050
> Mute This Topic: https://lists.openembedded.org/mt/98787450/5052612
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> quaresma.jose@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

-- 
Best regards,

José Quaresma

[-- Attachment #2: Type: text/html, Size: 7503 bytes --]

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

* Re: [OE-core][Patch v2 1/3] libtraceevent: import from meta-openembedded
  2023-05-09 17:09   ` Jose Quaresma
@ 2023-05-10 20:00     ` Bruce Ashfield
  2023-05-11 12:47       ` Max Krummenacher
  0 siblings, 1 reply; 7+ messages in thread
From: Bruce Ashfield @ 2023-05-10 20:00 UTC (permalink / raw)
  To: Jose Quaresma
  Cc: Max Krummenacher, openembedded-core, raj.khem, Max Krummenacher

On Tue, May 9, 2023 at 1:09 PM Jose Quaresma <quaresma.jose@gmail.com> wrote:
>
> Hi Max,
>
> This also needs an entry on meta/conf/distro/include/maintainers.inc
>

Max,

I'm already maintaining perf, so if you want to put my name beside
libraceevent for a v3, that's fine with me.

Bruce

> Jose
>
> Max Krummenacher <max.oss.09@gmail.com> escreveu no dia terça, 9/05/2023 à(s) 17:13:
>>
>> From: Max Krummenacher <max.krummenacher@toradex.com>
>>
>> Import from meta-openembedded at commit d250a0dc0 ("libtraceevent:
>> upgrade 1.7.1 -> 1.7.2").
>> Starting with kernel 6.4 libtraceevent is a dependency of perf. While
>> one can still build perf without it by opting out one would loose its
>> functionality compared with building perf from kernels before 6.4
>>
>> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
>> ---
>>  ...not-preserve-ownership-in-cp-command.patch | 40 +++++++++++++++++++
>>  .../libtraceevent/libtraceevent_1.7.2.bb      | 25 ++++++++++++
>>  2 files changed, 65 insertions(+)
>>  create mode 100644 meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
>>  create mode 100644 meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
>>
>> diff --git a/meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch b/meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
>> new file mode 100644
>> index 0000000000..5e88048817
>> --- /dev/null
>> +++ b/meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
>> @@ -0,0 +1,40 @@
>> +From ed0a31000305d937abe47c44d705b5b52bb36f79 Mon Sep 17 00:00:00 2001
>> +From: Khem Raj <raj.khem@gmail.com>
>> +Date: Thu, 22 Dec 2022 18:32:17 -0800
>> +Subject: [PATCH] makefile: Do not preserve ownership in cp command
>> +
>> +Fixes
>> +
>> +ERROR: libtraceevent-1.7.0-r0 do_package_qa: QA Issue: libtraceevent: /usr/lib/libtraceevent.a 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 | 4 ++--
>> + 1 file changed, 2 insertions(+), 2 deletions(-)
>> +
>> +diff --git a/Makefile b/Makefile
>> +index 965ff47..0e782cb 100644
>> +--- a/Makefile
>> ++++ b/Makefile
>> +@@ -287,7 +287,7 @@ $(BUILD_PREFIX): force
>> +       $(Q)$(call build_prefix,$(prefix))
>> +
>> + define do_make_pkgconfig_file
>> +-      cp -f ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE};    \
>> ++      install -m 0644 ${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_relative}|g" ${PKG_CONFIG_FILE}; \
>> +@@ -335,7 +335,7 @@ install: install_libs install_plugins
>> +
>> + install_libs: libs install_headers install_pkgconfig
>> +       $(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ)); \
>> +-              cp -fpR $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ)
>> ++              cp --no-preserve=ownership --recursive $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ)
>> +       $(Q)$(call install_ld_config)
>> +
>> + install_pkgconfig: $(PKG_CONFIG_FILE)
>> +--
>> +2.39.0
>> +
>> diff --git a/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb b/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
>> new file mode 100644
>> index 0000000000..089b6814c7
>> --- /dev/null
>> +++ b/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
>> @@ -0,0 +1,25 @@
>> +# 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 = "1c6f0f3b2bb47571fc455dc565dc343152517d98"
>> +SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.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
>> +}
>> +
>> +PACKAGES += "${PN}-plugins"
>> +
>> +FILES:${PN}-plugins += "${libdir}/traceevent/plugins"
>> --
>> 2.35.3
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#181050): https://lists.openembedded.org/g/openembedded-core/message/181050
>> Mute This Topic: https://lists.openembedded.org/mt/98787450/5052612
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [quaresma.jose@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>
>
> --
> Best regards,
>
> José Quaresma



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


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

* Re: [OE-core][Patch v2 1/3] libtraceevent: import from meta-openembedded
  2023-05-10 20:00     ` Bruce Ashfield
@ 2023-05-11 12:47       ` Max Krummenacher
  0 siblings, 0 replies; 7+ messages in thread
From: Max Krummenacher @ 2023-05-11 12:47 UTC (permalink / raw)
  To: Bruce Ashfield
  Cc: Jose Quaresma, openembedded-core, raj.khem, Max Krummenacher

Hi all

Thanks for volunteering Bruce.
As there is no other feedback I will prepare a V3 in a minute.

Regards,
Max

On Wed, May 10, 2023 at 10:00 PM Bruce Ashfield
<bruce.ashfield@gmail.com> wrote:
>
> On Tue, May 9, 2023 at 1:09 PM Jose Quaresma <quaresma.jose@gmail.com> wrote:
> >
> > Hi Max,
> >
> > This also needs an entry on meta/conf/distro/include/maintainers.inc
> >
>
> Max,
>
> I'm already maintaining perf, so if you want to put my name beside
> libraceevent for a v3, that's fine with me.
>
> Bruce
>
> > Jose
> >
> > Max Krummenacher <max.oss.09@gmail.com> escreveu no dia terça, 9/05/2023 à(s) 17:13:
> >>
> >> From: Max Krummenacher <max.krummenacher@toradex.com>
> >>
> >> Import from meta-openembedded at commit d250a0dc0 ("libtraceevent:
> >> upgrade 1.7.1 -> 1.7.2").
> >> Starting with kernel 6.4 libtraceevent is a dependency of perf. While
> >> one can still build perf without it by opting out one would loose its
> >> functionality compared with building perf from kernels before 6.4
> >>
> >> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
> >> ---
> >>  ...not-preserve-ownership-in-cp-command.patch | 40 +++++++++++++++++++
> >>  .../libtraceevent/libtraceevent_1.7.2.bb      | 25 ++++++++++++
> >>  2 files changed, 65 insertions(+)
> >>  create mode 100644 meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
> >>  create mode 100644 meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
> >>
> >> diff --git a/meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch b/meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
> >> new file mode 100644
> >> index 0000000000..5e88048817
> >> --- /dev/null
> >> +++ b/meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
> >> @@ -0,0 +1,40 @@
> >> +From ed0a31000305d937abe47c44d705b5b52bb36f79 Mon Sep 17 00:00:00 2001
> >> +From: Khem Raj <raj.khem@gmail.com>
> >> +Date: Thu, 22 Dec 2022 18:32:17 -0800
> >> +Subject: [PATCH] makefile: Do not preserve ownership in cp command
> >> +
> >> +Fixes
> >> +
> >> +ERROR: libtraceevent-1.7.0-r0 do_package_qa: QA Issue: libtraceevent: /usr/lib/libtraceevent.a 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 | 4 ++--
> >> + 1 file changed, 2 insertions(+), 2 deletions(-)
> >> +
> >> +diff --git a/Makefile b/Makefile
> >> +index 965ff47..0e782cb 100644
> >> +--- a/Makefile
> >> ++++ b/Makefile
> >> +@@ -287,7 +287,7 @@ $(BUILD_PREFIX): force
> >> +       $(Q)$(call build_prefix,$(prefix))
> >> +
> >> + define do_make_pkgconfig_file
> >> +-      cp -f ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE};    \
> >> ++      install -m 0644 ${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_relative}|g" ${PKG_CONFIG_FILE}; \
> >> +@@ -335,7 +335,7 @@ install: install_libs install_plugins
> >> +
> >> + install_libs: libs install_headers install_pkgconfig
> >> +       $(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ)); \
> >> +-              cp -fpR $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ)
> >> ++              cp --no-preserve=ownership --recursive $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ)
> >> +       $(Q)$(call install_ld_config)
> >> +
> >> + install_pkgconfig: $(PKG_CONFIG_FILE)
> >> +--
> >> +2.39.0
> >> +
> >> diff --git a/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb b/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
> >> new file mode 100644
> >> index 0000000000..089b6814c7
> >> --- /dev/null
> >> +++ b/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
> >> @@ -0,0 +1,25 @@
> >> +# 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 = "1c6f0f3b2bb47571fc455dc565dc343152517d98"
> >> +SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.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
> >> +}
> >> +
> >> +PACKAGES += "${PN}-plugins"
> >> +
> >> +FILES:${PN}-plugins += "${libdir}/traceevent/plugins"
> >> --
> >> 2.35.3
> >>
> >>
> >> -=-=-=-=-=-=-=-=-=-=-=-
> >> Links: You receive all messages sent to this group.
> >> View/Reply Online (#181050): https://lists.openembedded.org/g/openembedded-core/message/181050
> >> Mute This Topic: https://lists.openembedded.org/mt/98787450/5052612
> >> Group Owner: openembedded-core+owner@lists.openembedded.org
> >> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [quaresma.jose@gmail.com]
> >> -=-=-=-=-=-=-=-=-=-=-=-
> >>
> >
> >
> > --
> > Best regards,
> >
> > José Quaresma
>
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II


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

end of thread, other threads:[~2023-05-11 12:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-09 16:13 [OE-core][Patch v2 0/3] perf: add libtraceevent packageconfig Max Krummenacher
2023-05-09 16:13 ` [OE-core][Patch v2 1/3] libtraceevent: import from meta-openembedded Max Krummenacher
2023-05-09 17:09   ` Jose Quaresma
2023-05-10 20:00     ` Bruce Ashfield
2023-05-11 12:47       ` Max Krummenacher
2023-05-09 16:13 ` [OE-core][Patch v2 2/3] perf: make pkg-config available Max Krummenacher
2023-05-09 16:13 ` [OE-core][Patch v2 3/3] perf: add libtraceevent packageconfig Max Krummenacher

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.