Message ID | 20230511232214.993328-2-max.oss.09@gmail.com |
---|---|
State | Accepted, archived |
Commit | 45dddecd1eebc76a9835844c9bd36ac865a792c9 |
Headers | show |
Series | perf: add libtraceevent packageconfig | expand |
Hi Max I am seeing The file /usr/lib/traceevent/plugins/plugin_cfg80211.so is installed by both perf and libtraceevent, aborting When building sdk with both libtraceevent and perf added to image. On Thu, May 11, 2023 at 4:22 PM Max Krummenacher <max.oss.09@gmail.com> wrote: > > 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> > --- > meta/conf/distro/include/maintainers.inc | 1 + > ...not-preserve-ownership-in-cp-command.patch | 40 +++++++++++++++++++ > .../libtraceevent/libtraceevent_1.7.2.bb | 25 ++++++++++++ > 3 files changed, 66 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/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc > index ec7ea90d16..3071671850 100644 > --- a/meta/conf/distro/include/maintainers.inc > +++ b/meta/conf/distro/include/maintainers.inc > @@ -402,6 +402,7 @@ RECIPE_MAINTAINER:pn-libtirpc = "Anuj Mittal <anuj.mittal@intel.com>" > RECIPE_MAINTAINER:pn-libtool = "Robert Yang <liezhi.yang@windriver.com>" > RECIPE_MAINTAINER:pn-libtool-cross = "Robert Yang <liezhi.yang@windriver.com>" > RECIPE_MAINTAINER:pn-libtool-native = "Robert Yang <liezhi.yang@windriver.com>" > +RECIPE_MAINTAINER:pn-libtraceevent = "Bruce Ashfield <bruce.ashfield@gmail.com>" > RECIPE_MAINTAINER:pn-libtry-tiny-perl = "Tim Orling <tim.orling@konsulko.com>" > RECIPE_MAINTAINER:pn-libucontext = "Khem Raj <raj.khem@gmail.com>" > RECIPE_MAINTAINER:pn-libunistring = "Anuj Mittal <anuj.mittal@intel.com>" > 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 >
Hi Khem On Thursday, May 25, 2023, Khem Raj <raj.khem@gmail.com> wrote: > Hi Max > > I am seeing > > The file /usr/lib/traceevent/plugins/plugin_cfg80211.so is installed > by both perf and libtraceevent, aborting > > When building sdk with both libtraceevent and perf added to image. I didn't test anything SDK with this patchset. Sorry. I'm currently on vacation and not able to do real OE work. I guess the quickest way out would be to remove in perf.bb libtraceevent from the enabled packageconfigs. I expect perf from kernels before 6.4 to work as before the patchset and perf at 6.4 to not fail to build, albeit without traceevent support. Does this sound like a plan? Max > > On Thu, May 11, 2023 at 4:22 PM Max Krummenacher <max.oss.09@gmail.com> wrote: >> >> 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> >> --- >> meta/conf/distro/include/maintainers.inc | 1 + >> ...not-preserve-ownership-in-cp-command.patch | 40 +++++++++++++++++++ >> .../libtraceevent/libtraceevent_1.7.2.bb | 25 ++++++++++++ >> 3 files changed, 66 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/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc >> index ec7ea90d16..3071671850 100644 >> --- a/meta/conf/distro/include/maintainers.inc >> +++ b/meta/conf/distro/include/maintainers.inc >> @@ -402,6 +402,7 @@ RECIPE_MAINTAINER:pn-libtirpc = "Anuj Mittal < anuj.mittal@intel.com>" >> RECIPE_MAINTAINER:pn-libtool = "Robert Yang <liezhi.yang@windriver.com>" >> RECIPE_MAINTAINER:pn-libtool-cross = "Robert Yang < liezhi.yang@windriver.com>" >> RECIPE_MAINTAINER:pn-libtool-native = "Robert Yang < liezhi.yang@windriver.com>" >> +RECIPE_MAINTAINER:pn-libtraceevent = "Bruce Ashfield < bruce.ashfield@gmail.com>" >> RECIPE_MAINTAINER:pn-libtry-tiny-perl = "Tim Orling < tim.orling@konsulko.com>" >> RECIPE_MAINTAINER:pn-libucontext = "Khem Raj <raj.khem@gmail.com>" >> RECIPE_MAINTAINER:pn-libunistring = "Anuj Mittal <anuj.mittal@intel.com >" >> 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 >> >
On Thu, May 25, 2023 at 12:14 AM Max Krummenacher <max.oss.09@gmail.com> wrote: > > Hi Khem > > On Thursday, May 25, 2023, Khem Raj <raj.khem@gmail.com> wrote: > > Hi Max > > > > I am seeing > > > > The file /usr/lib/traceevent/plugins/plugin_cfg80211.so is installed > > by both perf and libtraceevent, aborting > > > > When building sdk with both libtraceevent and perf added to image. > > > I didn't test anything SDK with this patchset. Sorry. > > I'm currently on vacation and not able to do real OE work. > > I guess the quickest way out would be to remove in perf.bb libtraceevent from the enabled packageconfigs. > > I expect perf from kernels before 6.4 to work as before the patchset and perf at 6.4 to not fail to build, albeit without traceevent support. > > Does this sound like a plan? I think it might make sense to package them in /usr/lib/${BPN}/plugins/ That makes space for both. > Max > > > > On Thu, May 11, 2023 at 4:22 PM Max Krummenacher <max.oss.09@gmail.com> wrote: > >> > >> 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> > >> --- > >> meta/conf/distro/include/maintainers.inc | 1 + > >> ...not-preserve-ownership-in-cp-command.patch | 40 +++++++++++++++++++ > >> .../libtraceevent/libtraceevent_1.7.2.bb | 25 ++++++++++++ > >> 3 files changed, 66 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/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc > >> index ec7ea90d16..3071671850 100644 > >> --- a/meta/conf/distro/include/maintainers.inc > >> +++ b/meta/conf/distro/include/maintainers.inc > >> @@ -402,6 +402,7 @@ RECIPE_MAINTAINER:pn-libtirpc = "Anuj Mittal <anuj.mittal@intel.com>" > >> RECIPE_MAINTAINER:pn-libtool = "Robert Yang <liezhi.yang@windriver.com>" > >> RECIPE_MAINTAINER:pn-libtool-cross = "Robert Yang <liezhi.yang@windriver.com>" > >> RECIPE_MAINTAINER:pn-libtool-native = "Robert Yang <liezhi.yang@windriver.com>" > >> +RECIPE_MAINTAINER:pn-libtraceevent = "Bruce Ashfield <bruce.ashfield@gmail.com>" > >> RECIPE_MAINTAINER:pn-libtry-tiny-perl = "Tim Orling <tim.orling@konsulko.com>" > >> RECIPE_MAINTAINER:pn-libucontext = "Khem Raj <raj.khem@gmail.com>" > >> RECIPE_MAINTAINER:pn-libunistring = "Anuj Mittal <anuj.mittal@intel.com>" > >> 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 > >> > >
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index ec7ea90d16..3071671850 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -402,6 +402,7 @@ RECIPE_MAINTAINER:pn-libtirpc = "Anuj Mittal <anuj.mittal@intel.com>" RECIPE_MAINTAINER:pn-libtool = "Robert Yang <liezhi.yang@windriver.com>" RECIPE_MAINTAINER:pn-libtool-cross = "Robert Yang <liezhi.yang@windriver.com>" RECIPE_MAINTAINER:pn-libtool-native = "Robert Yang <liezhi.yang@windriver.com>" +RECIPE_MAINTAINER:pn-libtraceevent = "Bruce Ashfield <bruce.ashfield@gmail.com>" RECIPE_MAINTAINER:pn-libtry-tiny-perl = "Tim Orling <tim.orling@konsulko.com>" RECIPE_MAINTAINER:pn-libucontext = "Khem Raj <raj.khem@gmail.com>" RECIPE_MAINTAINER:pn-libunistring = "Anuj Mittal <anuj.mittal@intel.com>" 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"