Patchwork [03/40] gcc: Fix owners/groups

login
register
mail settings
Submitter Mark Hatle
Date June 22, 2011, 5:35 p.m.
Message ID <60f955a2ba068db9e5d072c443a6ef7a894f114e.1308763995.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/6259/
State New, archived
Headers show

Comments

Mark Hatle - June 22, 2011, 5:35 p.m.
Many of the files being generated by gcc are gaining the build uid/gid.  This
is incorrect, as the files should be owned by root:root.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/recipes-devtools/gcc/gcc-4.6.0.inc   |    2 +-
 meta/recipes-devtools/gcc/gcc_4.5.1.bb    |    7 ++++++-
 meta/recipes-devtools/gcc/gcc_4.6.0.bb    |    5 +++++
 meta/recipes-devtools/gcc/libgcc_4.5.1.bb |    3 ++-
 meta/recipes-devtools/gcc/libgcc_4.6.0.bb |    3 ++-
 5 files changed, 16 insertions(+), 4 deletions(-)

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0.inc b/meta/recipes-devtools/gcc/gcc-4.6.0.inc
index cb9eb8e..5db6fda 100644
--- a/meta/recipes-devtools/gcc/gcc-4.6.0.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0.inc
@@ -7,7 +7,7 @@  require gcc-common.inc
 
 require gcc-4_6-branch-backports.inc
 
-PR = "r3"
+PR = "r4"
 
 DEPENDS =+ "mpfr gmp libmpc"
 NATIVEDEPS = "mpfr-native gmp-native gettext-native libmpc-native"
diff --git a/meta/recipes-devtools/gcc/gcc_4.5.1.bb b/meta/recipes-devtools/gcc/gcc_4.5.1.bb
index e04f443..2daf7fb 100644
--- a/meta/recipes-devtools/gcc/gcc_4.5.1.bb
+++ b/meta/recipes-devtools/gcc/gcc_4.5.1.bb
@@ -1,4 +1,4 @@ 
-PR = "r5"
+PR = "r6"
 require gcc-${PV}.inc
 require gcc-configure-target.inc
 require gcc-package-target.inc
@@ -10,3 +10,8 @@  ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
 
 SRC_URI[md5sum] = "48231a8e33ed6e058a341c53b819de1a"
 SRC_URI[sha256sum] = "45fa81face89203ccbf3ec73f7a372769d855f3ba7446f50125b613d9c163e2c"
+
+# We need to correct the owners/groups on some of the files
+do_install_append() {
+	chown -R root:root ${D}${gcclibdir}/${TARGET_SYS}/${BINV}
+}
diff --git a/meta/recipes-devtools/gcc/gcc_4.6.0.bb b/meta/recipes-devtools/gcc/gcc_4.6.0.bb
index bfaec86..e4d6fed 100644
--- a/meta/recipes-devtools/gcc/gcc_4.6.0.bb
+++ b/meta/recipes-devtools/gcc/gcc_4.6.0.bb
@@ -5,3 +5,8 @@  require gcc-package-target.inc
 SRC_URI_append = "file://fortran-cross-compile-hack.patch"
 
 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
+
+# We need to correct the owners/groups on some of the files
+do_install_append() {
+	chown -R root:root ${D}${gcclibdir}/${TARGET_SYS}/${BINV}
+}
diff --git a/meta/recipes-devtools/gcc/libgcc_4.5.1.bb b/meta/recipes-devtools/gcc/libgcc_4.5.1.bb
index b6cf268..ea9fd8f 100644
--- a/meta/recipes-devtools/gcc/libgcc_4.5.1.bb
+++ b/meta/recipes-devtools/gcc/libgcc_4.5.1.bb
@@ -1,6 +1,6 @@ 
 require gcc-${PV}.inc
 
-PR = "r0"
+PR = "r1"
 
 INHIBIT_DEFAULT_DEPS = "1"
 DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
@@ -28,6 +28,7 @@  do_install () {
 	# Install libgcc from our gcc-cross saved data
 	install -d ${D}${base_libdir} ${D}${libdir}
 	cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${D}
+	chown -R root:root ${D}
 
 	# Move libgcc_s into /lib
 	mkdir -p ${D}${base_libdir}
diff --git a/meta/recipes-devtools/gcc/libgcc_4.6.0.bb b/meta/recipes-devtools/gcc/libgcc_4.6.0.bb
index b6cf268..ea9fd8f 100644
--- a/meta/recipes-devtools/gcc/libgcc_4.6.0.bb
+++ b/meta/recipes-devtools/gcc/libgcc_4.6.0.bb
@@ -1,6 +1,6 @@ 
 require gcc-${PV}.inc
 
-PR = "r0"
+PR = "r1"
 
 INHIBIT_DEFAULT_DEPS = "1"
 DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
@@ -28,6 +28,7 @@  do_install () {
 	# Install libgcc from our gcc-cross saved data
 	install -d ${D}${base_libdir} ${D}${libdir}
 	cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${D}
+	chown -R root:root ${D}
 
 	# Move libgcc_s into /lib
 	mkdir -p ${D}${base_libdir}