From patchwork Thu Feb 7 00:35:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 157670 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp9488jaa; Wed, 6 Feb 2019 16:35:53 -0800 (PST) X-Google-Smtp-Source: AHgI3IYhpZ33ef4tccYWVLinixV4Ox0ULpXgSdP8Ar+Ere9EYHSgef4a4H0ZU/nM1BXXKIMpBejw X-Received: by 2002:a62:7f93:: with SMTP id a141mr13400406pfd.96.1549499753491; Wed, 06 Feb 2019 16:35:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549499753; cv=none; d=google.com; s=arc-20160816; b=tGTVxF+kbSiIKYGQybLFnuWyvVzhhdRc/t926JzuByYI2OY0NQmnsmIIJQMvA4haUO UQSidNNWinztdMbccDh33MFhiGbre7xiXMhOjw//jF35tZ6Lo0kHf9/bi72UUn913dgj 5nUOIzxiPD+vUxDMSQmSKAUYA5hGZPx6kofFMER6cyagZ2CgJFjCMUeHSx/aHiVY0i/P mJjg9rohcg0MV2s494lpl9YkisJADhJX3txZgRPeZRbyClp/6s1fPG3KF0bMSMBklfxk gUAKpS9TntqsrOUkMGsYciFG5CiEQyC4KcMkXwBgHxyA4GN6tVJY4H4KQgMKhCO74FgR b9dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=/qNet0kPf6+GKmN88QAZxh12Jr4Zi17EXJylfnN1QFg=; b=bdiUwotBviwoE5SE28oHyUIWPEZwX9nZOA2grlok/QetQw+NsCcoM2oARJktx/ihhu SCyIe6Wwpiv5yArK6MylNP1gtjWXhPS6TDyPhC1sop1qTZ7UMRn1Vyn9Ag2OUWpxFSc6 J7e8qm2xecT7gvZWXK7rb6kEnEqx18F3n9ISPFN+836UlDwTekvRmN8bSvWzHu3mROxm R7habvdaTdmtL3/MfyUel4SK73jMUSDfX1FE36U4FRG47ZP1f7dehOgjeyTv9R9FJlRv Cn5Bh1dFk2EHqWjcsIVeH1bP27QlYTWPsQo1oVohKTtD+A785xPV20WqX/TpwfycYQlB CyjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=bKTF5G+i; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id v3si7032685pgh.305.2019.02.06.16.35.52; Wed, 06 Feb 2019 16:35:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=bKTF5G+i; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id C52167BFF5; Thu, 7 Feb 2019 00:35:47 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by mail.openembedded.org (Postfix) with ESMTP id AC8AC79DCC for ; Thu, 7 Feb 2019 00:35:46 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id gn14so3936555plb.10 for ; Wed, 06 Feb 2019 16:35:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=05RlairwE7G+mGiiUbbSHdWMctRuaHGDwFUOTY8+/D8=; b=bKTF5G+iulnuRQR6xHg5YdezOvhk68L9xDjEF3EcI2d7TNTLbncMC/p2tqZyzNI5n6 zmLWd1u2Np1CPN6VIvayduGThugr0nfg+m2mWD6OEJrOy9NvH1e1h09tpdJzX8P9vmry wVBkaLbO4Qj9Q6iMxLEJXSszA1FrluNPQ06HaAl3QyITTRrpjx2GKAxK2wkhLtpdhfRo qUfPV6fJyEHlu6+pWkmqQF+7x3BUFJHjgUdT6MNeer+3bwyW7Zgmm8fFTlfs2El3bX8h 0p3sEAbqd962bwofcADu6w5pX09ewxYqJrtITqfy8atPJC0axjCG0AZY6LOOxwDme/uO oSig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=05RlairwE7G+mGiiUbbSHdWMctRuaHGDwFUOTY8+/D8=; b=pnXQsZt/EgrUbuEI3RjkfWJWU1feZTrBAuWs0GbnJzu/nV7yd9fKCK2LF5/BC3IbUD KKs+PRtzqBwwY9pMemLkzZTMEkbQNL92qrbSDLTJwX4b/kk5tNWGv4GY6llS2L5H+1i8 4ckXQvFQ2EJVXzWoirgmeLKLE/LUX8llzeWvCkd9PIjABFiObqghq9zAT2SKkyltTOOB My9Cg1NCtRiUqt8LKlFnEeYhiRGjg8vho6+yPrYpDKOFBfAOCgDZDrBWk3teN9n3V5hg MNHW/ObJs0uwcrSE0XgG3w3uVcLABGZfeot7X02EQuJlYZA8br2gcZKB7tO1hRUEN1SV Er8w== X-Gm-Message-State: AHQUAuZby/hgXQnw30nUfgbmgPMPfMUHOpoXnom7IlKMh33UJPjhguyV F0lq00/vcFOdvONNwUimdOGNvcnF X-Received: by 2002:a17:902:bd86:: with SMTP id q6mr13300879pls.16.1549499746942; Wed, 06 Feb 2019 16:35:46 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:6bc6::a005]) by smtp.gmail.com with ESMTPSA id q3sm8023602pgv.74.2019.02.06.16.35.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Feb 2019 16:35:46 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Wed, 6 Feb 2019 16:35:37 -0800 Message-Id: <20190207003537.7135-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [OE-core] [PATCH] glibc-locale: Rewrite do_install using install utility instead of cp X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org This has been a constant source of trouble for build failures due to host-user-contaminated QA errors of sort ERROR: QA Issue: glibc-locale: /glibc-binary-localedata-ca-es+valencia/usr/lib/locale/ca_ES@valencia/LC_MONETARY is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated] So far we have tried to mould cp command into not carrying the build user permissions into install area but it is never entirely fixed since the issue keeps popping up in various scenes This patch replaces use of cp with install utility and specifies install mode for files explcitly Signed-off-by: Khem Raj --- meta/recipes-core/glibc/glibc-locale.inc | 44 ++++++++++++++---------- 1 file changed, 25 insertions(+), 19 deletions(-) -- 2.20.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-core/glibc/glibc-locale.inc b/meta/recipes-core/glibc/glibc-locale.inc index 6384f9cbf1..9b256a5108 100644 --- a/meta/recipes-core/glibc/glibc-locale.inc +++ b/meta/recipes-core/glibc/glibc-locale.inc @@ -72,27 +72,33 @@ FILES_localedef = "${bindir}/localedef" LOCALETREESRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale" do_install () { - mkdir -p ${D}${bindir} ${D}${datadir} - if [ -n "$(ls ${LOCALETREESRC}/${bindir})" ]; then - cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${bindir}/* ${D}${bindir} - fi - if [ -n "$(ls ${LOCALETREESRC}/${localedir})" ]; then - mkdir -p ${D}${localedir} - cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${localedir}/* ${D}${localedir} - fi + install -d ${D}${bindir} + find "${LOCALETREESRC}/${bindir}" -maxdepth 1 -type f \ + -exec install -m 0755 -t "${D}${bindir}" {} \; + + for d in . $(find "${LOCALETREESRC}/${localedir}" -type d -printf '%P ') ; do + install -d "${D}${localedir}/$d" + find "${LOCALETREESRC}/${localedir}/$d" -maxdepth 1 -type f \ + -exec install -m 0644 -t "${D}${localedir}/$d" {} \; + done if [ ${@d.getVar('PACKAGE_NO_GCONV')} -eq 0 ]; then - mkdir -p ${D}${libdir} - if [ -e ${LOCALETREESRC}/${libdir}/gconv ]; then - cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir} - fi - if [ -e ${LOCALETREESRC}/${datadir}/i18n ]; then - cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir} - fi - fi - if [ -e ${LOCALETREESRC}/${datadir}/locale ]; then - cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${datadir}/locale ${D}${datadir} + for d in . $(find "${LOCALETREESRC}/${libdir}/gconv" -type d -printf '%P ') ; do + install -d "${D}${libdir}/gconv/$d" + find "${LOCALETREESRC}/${libdir}/gconv/$d" -maxdepth 1 -type f \ + -exec install -m 0755 -t "${D}${libdir}/gconv/$d" {} \; + done + for d in . $(find "${LOCALETREESRC}/${datadir}/i18n" -type d -printf '%P ') ; do + install -d "${D}${datadir}/i18n/$d" + find "${LOCALETREESRC}/${datadir}/i18n/$d" -maxdepth 1 -type f \ + -exec install -m 0644 -t "${D}${datadir}/i18n/$d" {} \; + done fi - cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/SUPPORTED ${WORKDIR} + for d in . $(find "${LOCALETREESRC}/${datadir}/locale" -type d -printf '%P ') ; do + install -d "${D}${datadir}/locale/$d" + find "${LOCALETREESRC}/${datadir}/locale/$d" -maxdepth 1 -type f \ + -exec install -m 0644 -t "${D}${datadir}/locale/$d" {} \; + done + install -m 0644 ${LOCALETREESRC}/SUPPORTED ${WORKDIR}/SUPPORTED } inherit libc-package