Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 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 | |