Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] recipes: Replace "cp -a" with "cp -R --no-dereference --preserve=mode, links"
Date: Tue, 30 May 2017 10:08:36 +0200	[thread overview]
Message-ID: <20170530080836.25342-1-Martin.Jansa@gmail.com> (raw)

* Using "cp -a" leaks UID of user running the builds, causing
  many QA warnings.
* See this thread for details:
  http://lists.openembedded.org/pipermail/openembedded-core/2015-November/112904.html

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-core/coreutils/coreutils_8.27.bb       | 2 +-
 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb | 4 ++--
 meta/recipes-extended/mdadm/mdadm_4.0.bb            | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/coreutils/coreutils_8.27.bb b/meta/recipes-core/coreutils/coreutils_8.27.bb
index 667e0af560..ea8740a2d1 100644
--- a/meta/recipes-core/coreutils/coreutils_8.27.bb
+++ b/meta/recipes-core/coreutils/coreutils_8.27.bb
@@ -99,7 +99,7 @@ do_install_append() {
 	install -t ${D}/${mandir}/man1 ${S}/man/*.1
 	# prebuilt man pages don't do a separate man page for [ vs test.
 	# see comment above r.e. sed and update-alternatives
-	cp -a ${D}${mandir}/man1/test.1 ${D}${mandir}/man1/lbracket.1.${BPN}
+	cp -R --no-dereference --preserve=mode,links -v ${D}${mandir}/man1/test.1 ${D}${mandir}/man1/lbracket.1.${BPN}
 }
 
 inherit update-alternatives
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb
index 5216c7027c..7c8809a41e 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb
@@ -106,7 +106,7 @@ do_compile_ptest() {
 }
 
 do_install_ptest() {
-	cp -a ${B}/tests ${D}${PTEST_PATH}/test
-	cp -a ${S}/tests/* ${D}${PTEST_PATH}/test
+	cp -R --no-dereference --preserve=mode,links -v ${B}/tests ${D}${PTEST_PATH}/test
+	cp -R --no-dereference --preserve=mode,links -v ${S}/tests/* ${D}${PTEST_PATH}/test
 	sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect*
 }
diff --git a/meta/recipes-extended/mdadm/mdadm_4.0.bb b/meta/recipes-extended/mdadm/mdadm_4.0.bb
index 98a10a8b15..506b0bc315 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.0.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.0.bb
@@ -55,7 +55,7 @@ do_compile_ptest() {
 }
 
 do_install_ptest() {
-	cp -a ${S}/tests ${D}${PTEST_PATH}/tests
+	cp -R --no-dereference --preserve=mode,links -v ${S}/tests ${D}${PTEST_PATH}/tests
 	cp ${S}/test ${D}${PTEST_PATH}
 	sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test
 	ln -s ${base_sbindir}/mdadm ${D}${PTEST_PATH}/mdadm
-- 
2.13.0



             reply	other threads:[~2017-05-30 10:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-30  8:08 Martin Jansa [this message]
2017-05-30 14:45 ` [PATCH] recipes: Replace "cp -a" with "cp -R --no-dereference --preserve=mode, links" Andre McCurdy
2017-05-30 15:41   ` Mark Hatle
2017-05-30 16:30     ` Andre McCurdy
2017-05-30 17:33       ` Martin Jansa
2017-06-04  6:55         ` Martin Jansa
2017-06-04 11:06           ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170530080836.25342-1-Martin.Jansa@gmail.com \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox