Skip to contentSkip to conversation

Don't preserve ownership when copying files

PATCH Superseded Martin Nordqvist 2 participants 2 messages Nov 6, 2017 – Nov 8, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Don't preserve ownership when copying files

Don't preserve ownership when copying files. Instead let root be owner of all files.

---
 recipes-devtools/oracle-java/oracle-jse-jdk.inc | 3 ++-
 recipes-devtools/oracle-java/oracle-jse.inc     | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
recipes-devtools/oracle-java/oracle-jse-jdk.inc +2 -1
index a7210d9..ca6af22 100644
@@ -13,7 +13,8 @@ require oracle-jse.inc
 
 do_install_class-native() {
 	install -d				${D}${libdir_jvm}
-	cp -a ${S}/${JDK_JRE}${PV}_${PV_UPDATE}	${D}${JDK_HOME}
+	cp -a --no-preserve=ownership \
+		${S}/${JDK_JRE}${PV}_${PV_UPDATE}	${D}${JDK_HOME}
 
 	install -d				${D}${bindir}
 	ln -sf ${JDK_HOME}/bin/java		${D}${bindir}
recipes-devtools/oracle-java/oracle-jse.inc +2 -1
index 4346f23..5e5f406 100644
@@ -19,7 +19,8 @@ JDK_HOME = "${libdir_jvm}/${JDK_DIR}"
 
 do_install () {
 	install -d -m 0755			${D}${libdir_jvm}
-	cp -a ${S}/${JDK_JRE}${PV}_${PV_UPDATE}	${D}${JDK_HOME}
+	cp -a --no-preserve=ownership \
+		${S}/${JDK_JRE}${PV}_${PV_UPDATE}	${D}${JDK_HOME}
 }
 
 # All the files are provided in a binaray package, and keeping all the
Signature · 1 line
1.9.1
#1 lore raw

Hi Martin,

Any reason to give root rights to JDK?

Best Regards,
Vincent

2017-11-06 15:33 GMT+01:00 Martin Nordqvist <[email protected]>:

Quoted 46 lines

Don't preserve ownership when copying files. Instead let root be owner of all files.

---
 recipes-devtools/oracle-java/oracle-jse-jdk.inc | 3 ++-
 recipes-devtools/oracle-java/oracle-jse.inc     | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
recipes-devtools/oracle-java/oracle-jse-jdk.inc +2 -1
index a7210d9..ca6af22 100644
@@ -13,7 +13,8 @@ require oracle-jse.inc
 
 do_install_class-native() {
        install -d                              ${D}${libdir_jvm}
-       cp -a ${S}/${JDK_JRE}${PV}_${PV_UPDATE} ${D}${JDK_HOME}
+       cp -a --no-preserve=ownership \
+               ${S}/${JDK_JRE}${PV}_${PV_UPDATE}       ${D}${JDK_HOME}
 
        install -d                              ${D}${bindir}
        ln -sf ${JDK_HOME}/bin/java             ${D}${bindir}
recipes-devtools/oracle-java/oracle-jse.inc +2 -2
index 4346f23..5e5f406 100644
@@ -19,7 +19,8 @@ JDK_HOME = "${libdir_jvm}/${JDK_DIR}"
 
 do_install () {
        install -d -m 0755                      ${D}${libdir_jvm}
-       cp -a ${S}/${JDK_JRE}${PV}_${PV_UPDATE} ${D}${JDK_HOME}
+       cp -a --no-preserve=ownership \
+               ${S}/${JDK_JRE}${PV}_${PV_UPDATE}       ${D}${JDK_HOME}
 }
 
 # All the files are provided in a binaray package, and keeping all the
--

1.9.1

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto