summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-06-21 23:56:25 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-30 20:57:05 +0100
commit477f685ce0cb48acf04074ff5be321b38e9974d5 (patch)
tree041dbede777e5e3c1fb54260301d408e64d06874 /meta
parentb320f558ed06fc1b1f5a61c638fbaabeb0e24f64 (diff)
downloadpoky-477f685ce0cb48acf04074ff5be321b38e9974d5.tar.gz
Add umask task control
Bitbake now allows the umask to be specified per task. The following tasks will have a umask of 022 set by default: do_configure do_compile do_install do_package do_populate_sysroot do_rootfs do_configure and do_compile need a umask of 022 set because -many- recipes directly copy generated files out of recipe's build directory. Instead of fixing each existing and future recipe, it was shown to be much easier to just set the umask. (From OE-Core rev: 0cfa7ebcf661aa0645c6d4d858b04946ebacb7e4) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/base.bbclass4
-rw-r--r--meta/classes/image.bbclass2
-rw-r--r--meta/classes/staging.bbclass1
-rw-r--r--meta/recipes-devtools/installer/adt-installer_1.0.bb2
-rw-r--r--meta/recipes-kernel/linux/linux-tools.inc2
5 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 1f9baf93bf..52f231675c 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -262,14 +262,18 @@ python () {
262 # If we're building a target package we need to use fakeroot (pseudo) 262 # If we're building a target package we need to use fakeroot (pseudo)
263 # in order to capture permissions, owners, groups and special files 263 # in order to capture permissions, owners, groups and special files
264 if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d): 264 if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
265 bb.data.setVarFlag('do_configure', 'umask', 022, d)
266 bb.data.setVarFlag('do_compile', 'umask', 022, d)
265 deps = (bb.data.getVarFlag('do_install', 'depends', d) or "").split() 267 deps = (bb.data.getVarFlag('do_install', 'depends', d) or "").split()
266 deps.append('virtual/fakeroot-native:do_populate_sysroot') 268 deps.append('virtual/fakeroot-native:do_populate_sysroot')
267 bb.data.setVarFlag('do_install', 'depends', " ".join(deps),d) 269 bb.data.setVarFlag('do_install', 'depends', " ".join(deps),d)
268 bb.data.setVarFlag('do_install', 'fakeroot', 1, d) 270 bb.data.setVarFlag('do_install', 'fakeroot', 1, d)
271 bb.data.setVarFlag('do_install', 'umask', 022, d)
269 deps = (bb.data.getVarFlag('do_package', 'depends', d) or "").split() 272 deps = (bb.data.getVarFlag('do_package', 'depends', d) or "").split()
270 deps.append('virtual/fakeroot-native:do_populate_sysroot') 273 deps.append('virtual/fakeroot-native:do_populate_sysroot')
271 bb.data.setVarFlag('do_package', 'depends', " ".join(deps),d) 274 bb.data.setVarFlag('do_package', 'depends', " ".join(deps),d)
272 bb.data.setVarFlag('do_package', 'fakeroot', 1, d) 275 bb.data.setVarFlag('do_package', 'fakeroot', 1, d)
276 bb.data.setVarFlag('do_package', 'umask', 022, d)
273 bb.data.setVarFlag('do_package_setscene', 'fakeroot', 1, d) 277 bb.data.setVarFlag('do_package_setscene', 'fakeroot', 1, d)
274 source_mirror_fetch = bb.data.getVar('SOURCE_MIRROR_FETCH', d, 0) 278 source_mirror_fetch = bb.data.getVar('SOURCE_MIRROR_FETCH', d, 0)
275 if not source_mirror_fetch: 279 if not source_mirror_fetch:
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 2469442d70..e77ec427fc 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -83,6 +83,8 @@ do_build[nostamp] = "1"
83 83
84# Must call real_do_rootfs() from inside here, rather than as a separate 84# Must call real_do_rootfs() from inside here, rather than as a separate
85# task, so that we have a single fakeroot context for the whole process. 85# task, so that we have a single fakeroot context for the whole process.
86do_rootfs[umask] = 022
87
86fakeroot do_rootfs () { 88fakeroot do_rootfs () {
87 #set -x 89 #set -x
88 rm -rf ${IMAGE_ROOTFS} 90 rm -rf ${IMAGE_ROOTFS}
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index fef6457398..04d51ede42 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -58,6 +58,7 @@ sysroot_stage_all() {
58} 58}
59 59
60do_populate_sysroot[dirs] = "${SYSROOT_DESTDIR}" 60do_populate_sysroot[dirs] = "${SYSROOT_DESTDIR}"
61do_populate_sysroot[umask] = 022
61 62
62addtask populate_sysroot after do_install 63addtask populate_sysroot after do_install
63 64
diff --git a/meta/recipes-devtools/installer/adt-installer_1.0.bb b/meta/recipes-devtools/installer/adt-installer_1.0.bb
index 8f6e91fc5b..0537440a6f 100644
--- a/meta/recipes-devtools/installer/adt-installer_1.0.bb
+++ b/meta/recipes-devtools/installer/adt-installer_1.0.bb
@@ -54,6 +54,8 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
54 file://opkg/conf/opkg-sdk-i686.conf \ 54 file://opkg/conf/opkg-sdk-i686.conf \
55 " 55 "
56 56
57do_deploy[umask] = 022
58
57fakeroot do_deploy () { 59fakeroot do_deploy () {
58 cd ${WORKDIR} 60 cd ${WORKDIR}
59 mkdir -p ${ADT_DEPLOY} 61 mkdir -p ${ADT_DEPLOY}
diff --git a/meta/recipes-kernel/linux/linux-tools.inc b/meta/recipes-kernel/linux/linux-tools.inc
index e4740d73bb..729e912714 100644
--- a/meta/recipes-kernel/linux/linux-tools.inc
+++ b/meta/recipes-kernel/linux/linux-tools.inc
@@ -19,6 +19,8 @@ fakeroot do_install_perf() {
19addtask compile_perf after do_compile before do_install 19addtask compile_perf after do_compile before do_install
20addtask install_perf after do_install before do_package 20addtask install_perf after do_install before do_package
21 21
22do_compile_perf[umask] = 022
23do_install_perf[umask] = 022
22 24
23PERFDEPENDS = "virtual/libc:do_populate_sysroot elfutils:do_populate_sysroot" 25PERFDEPENDS = "virtual/libc:do_populate_sysroot elfutils:do_populate_sysroot"
24PERFDEPENDS_libc-uclibc = "" 26PERFDEPENDS_libc-uclibc = ""