diff mbox series

[1/7] glibc-locale: Fix host-user-contaminated QA errors

Message ID 20180721162715.12611-1-raj.khem@gmail.com
State Accepted
Commit 06d831d12fe2a2366480c79f4c018942937b753a
Headers show
Series [1/7] glibc-locale: Fix host-user-contaminated QA errors | expand

Commit Message

Khem Raj July 21, 2018, 4:27 p.m. UTC
Fixes

ERROR: glibc-locale-2.27-r0 do_package_qa: QA Issue: glibc-locale: /glibc-binary-localedata-hy-am/usr/lib/locale/hy_AM/LC_MEASUREMENT.tmp is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 meta/recipes-core/glibc/glibc-locale.inc | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

-- 
2.18.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Alexander Kanavin July 21, 2018, 5:03 p.m. UTC | #1
2018-07-21 18:27 GMT+02:00 Khem Raj <raj.khem@gmail.com>:
> Fixes

>

> ERROR: glibc-locale-2.27-r0 do_package_qa: QA Issue: glibc-locale: /glibc-binary-localedata-hy-am/usr/lib/locale/hy_AM/LC_MEASUREMENT.tmp is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]

>


This long-standing yet elusive error has acquired something of a
mythical status. Can you explain what was going on and how the patch
is fixing it?

Alex
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj July 21, 2018, 5:26 p.m. UTC | #2
On Sat, Jul 21, 2018 at 10:03 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>

> 2018-07-21 18:27 GMT+02:00 Khem Raj <raj.khem@gmail.com>:

> > Fixes

> >

> > ERROR: glibc-locale-2.27-r0 do_package_qa: QA Issue: glibc-locale: /glibc-binary-localedata-hy-am/usr/lib/locale/hy_AM/LC_MEASUREMENT.tmp is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]

> >

>

> This long-standing yet elusive error has acquired something of a

> mythical status. Can you explain what was going on and how the patch

> is fixing it?

>


-p option to cp was preserving original ownership of these files which
is actually same as build user
we were doing chown operation but it was escaping some of these files
especially these .tmp files
aside from this, why these tmp files are left in transition needs more
investigation meanwhile this
fix makes sure that we do not preserve the ownership when installing
into staging sysroot.

> Alex

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-core/glibc/glibc-locale.inc b/meta/recipes-core/glibc/glibc-locale.inc
index b3cb10b87a..e50e5cf5e3 100644
--- a/meta/recipes-core/glibc/glibc-locale.inc
+++ b/meta/recipes-core/glibc/glibc-locale.inc
@@ -74,23 +74,22 @@  LOCALETREESRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale"
 do_install () {
 	mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir}
 	if [ -n "$(ls ${LOCALETREESRC}/${bindir})" ]; then
-		cp -fpPR ${LOCALETREESRC}/${bindir}/* ${D}${bindir}
+		cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${bindir}/* ${D}${bindir}
 	fi
 	if [ -n "$(ls ${LOCALETREESRC}/${localedir})" ]; then
 		mkdir -p ${D}${localedir}
-		cp -fpPR ${LOCALETREESRC}/${localedir}/* ${D}${localedir}
+		cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${localedir}/* ${D}${localedir}
 	fi
 	if [ -e ${LOCALETREESRC}/${libdir}/gconv ]; then
-		cp -fpPR ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir}
+		cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir}
 	fi
 	if [ -e ${LOCALETREESRC}/${datadir}/i18n ]; then
-		cp -fpPR ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir}
+		cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir}
 	fi
 	if [ -e ${LOCALETREESRC}/${datadir}/locale ]; then
-		cp -fpPR ${LOCALETREESRC}/${datadir}/locale ${D}${datadir}
+		cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${datadir}/locale ${D}${datadir}
 	fi
-	chown root:root -R ${D}
-	cp -fpPR ${LOCALETREESRC}/SUPPORTED ${WORKDIR}
+	cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/SUPPORTED ${WORKDIR}
 }
 
 inherit libc-package