diff options
3 files changed, 77 insertions, 47 deletions
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 deleted file mode 100644 index 5e88048817..0000000000 --- a/meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | From ed0a31000305d937abe47c44d705b5b52bb36f79 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 22 Dec 2022 18:32:17 -0800 | ||
| 4 | Subject: [PATCH] makefile: Do not preserve ownership in cp command | ||
| 5 | |||
| 6 | Fixes | ||
| 7 | |||
| 8 | 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] | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | Makefile | 4 ++-- | ||
| 14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/Makefile b/Makefile | ||
| 17 | index 965ff47..0e782cb 100644 | ||
| 18 | --- a/Makefile | ||
| 19 | +++ b/Makefile | ||
| 20 | @@ -287,7 +287,7 @@ $(BUILD_PREFIX): force | ||
| 21 | $(Q)$(call build_prefix,$(prefix)) | ||
| 22 | |||
| 23 | define do_make_pkgconfig_file | ||
| 24 | - cp -f ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE}; \ | ||
| 25 | + install -m 0644 ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE}; \ | ||
| 26 | sed -i "s|INSTALL_PREFIX|${1}|g" ${PKG_CONFIG_FILE}; \ | ||
| 27 | sed -i "s|LIB_VERSION|${EVENT_PARSE_VERSION}|g" ${PKG_CONFIG_FILE}; \ | ||
| 28 | sed -i "s|LIB_DIR|${libdir_relative}|g" ${PKG_CONFIG_FILE}; \ | ||
| 29 | @@ -335,7 +335,7 @@ install: install_libs install_plugins | ||
| 30 | |||
| 31 | install_libs: libs install_headers install_pkgconfig | ||
| 32 | $(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ)); \ | ||
| 33 | - cp -fpR $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ) | ||
| 34 | + cp --no-preserve=ownership --recursive $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ) | ||
| 35 | $(Q)$(call install_ld_config) | ||
| 36 | |||
| 37 | install_pkgconfig: $(PKG_CONFIG_FILE) | ||
| 38 | -- | ||
| 39 | 2.39.0 | ||
| 40 | |||
diff --git a/meta/recipes-kernel/libtraceevent/libtraceevent/meson.patch b/meta/recipes-kernel/libtraceevent/libtraceevent/meson.patch new file mode 100644 index 0000000000..38b6107136 --- /dev/null +++ b/meta/recipes-kernel/libtraceevent/libtraceevent/meson.patch | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | Fixes for the Meson build of libtraceevent: | ||
| 2 | |||
| 3 | - Make the plugin directory the same as the Makefiles | ||
| 4 | - Install the plugins as modules not static and versioned shared libraries | ||
| 5 | - Add an option to disable building the documentation (needs asciidoc and xmlto) | ||
| 6 | |||
| 7 | Upstream-Status: Pending | ||
| 8 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 9 | |||
| 10 | diff --git a/meson.build b/meson.build | ||
| 11 | index b61c873..4bba4d8 100644 | ||
| 12 | --- a/meson.build | ||
| 13 | +++ b/meson.build | ||
| 14 | @@ -25,7 +25,7 @@ htmldir = join_paths(prefixdir, get_option('htmldir')) | ||
| 15 | libdir = join_paths(prefixdir, get_option('libdir')) | ||
| 16 | plugindir = get_option('plugindir') | ||
| 17 | if plugindir == '' | ||
| 18 | - plugindir = join_paths(libdir, 'libtraceevent/plugins') | ||
| 19 | + plugindir = join_paths(libdir, 'traceevent/plugins') | ||
| 20 | endif | ||
| 21 | |||
| 22 | add_project_arguments( | ||
| 23 | @@ -45,10 +45,13 @@ if cunit_dep.found() | ||
| 24 | subdir('utest') | ||
| 25 | endif | ||
| 26 | subdir('samples') | ||
| 27 | -subdir('Documentation') | ||
| 28 | |||
| 29 | -custom_target( | ||
| 30 | - 'docs', | ||
| 31 | - output: 'docs', | ||
| 32 | - depends: [html, man], | ||
| 33 | - command: ['echo']) | ||
| 34 | +if get_option('docs') | ||
| 35 | + subdir('Documentation') | ||
| 36 | + | ||
| 37 | + custom_target( | ||
| 38 | + 'docs', | ||
| 39 | + output: 'docs', | ||
| 40 | + depends: [html, man], | ||
| 41 | + command: ['echo']) | ||
| 42 | +endif | ||
| 43 | diff --git a/meson_options.txt b/meson_options.txt | ||
| 44 | index b2294f6..0611216 100644 | ||
| 45 | --- a/meson_options.txt | ||
| 46 | +++ b/meson_options.txt | ||
| 47 | @@ -4,6 +4,10 @@ | ||
| 48 | |||
| 49 | option('plugindir', type : 'string', | ||
| 50 | description : 'set the plugin dir') | ||
| 51 | + | ||
| 52 | +option('docs', type : 'boolean', value: true, | ||
| 53 | + description : 'build documentation') | ||
| 54 | + | ||
| 55 | option('htmldir', type : 'string', value : 'share/doc/libtraceevent-doc', | ||
| 56 | description : 'directory for HTML documentation') | ||
| 57 | option('asciidoctor', type : 'boolean', value: false, | ||
| 58 | diff --git a/plugins/meson.build b/plugins/meson.build | ||
| 59 | index 74ad664..4919be4 100644 | ||
| 60 | --- a/plugins/meson.build | ||
| 61 | +++ b/plugins/meson.build | ||
| 62 | @@ -19,11 +19,10 @@ plugins = [ | ||
| 63 | |||
| 64 | pdeps = [] | ||
| 65 | foreach plugin : plugins | ||
| 66 | - pdeps += library( | ||
| 67 | + pdeps += shared_module( | ||
| 68 | plugin.replace('.c', ''), | ||
| 69 | plugin, | ||
| 70 | name_prefix: '', | ||
| 71 | - version: library_version, | ||
| 72 | dependencies: [libtraceevent_dep], | ||
| 73 | include_directories: [incdir], | ||
| 74 | install: true, | ||
diff --git a/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.3.bb b/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.3.bb index f9a3811669..bee7891832 100644 --- a/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.3.bb +++ b/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.3.bb | |||
| @@ -10,17 +10,13 @@ SECTION = "libs" | |||
| 10 | 10 | ||
| 11 | SRCREV = "dd148189b74da3e2f45c7e536319fec97cb71213" | 11 | SRCREV = "dd148189b74da3e2f45c7e536319fec97cb71213" |
| 12 | SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git;branch=${BPN};protocol=https \ | 12 | SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git;branch=${BPN};protocol=https \ |
| 13 | file://0001-makefile-Do-not-preserve-ownership-in-cp-command.patch" | 13 | file://meson.patch" |
| 14 | 14 | ||
| 15 | S = "${WORKDIR}/git" | 15 | S = "${WORKDIR}/git" |
| 16 | 16 | ||
| 17 | export EXTRA_CFLAGS = "${CFLAGS}" | 17 | inherit meson pkgconfig |
| 18 | 18 | ||
| 19 | inherit pkgconfig | 19 | EXTRA_OEMESON = "-Ddocs=false" |
| 20 | |||
| 21 | do_install() { | ||
| 22 | oe_runmake install DESTDIR=${D} pkgconfig_dir=${libdir}/pkgconfig | ||
| 23 | } | ||
| 24 | 20 | ||
| 25 | PACKAGES += "${PN}-plugins" | 21 | PACKAGES += "${PN}-plugins" |
| 26 | 22 | ||
