summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2016-03-27 12:46:48 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-28 16:21:07 +0100
commit7d251f75ebfb6d61c8576a1d7b371f1a0b82f75e (patch)
tree6054054c069c46a2f850aabeaa6dcff9a104aa70 /meta/recipes-core
parent60656d07ea87e0c905c4b4c01a76a696af0d0c4e (diff)
downloadpoky-7d251f75ebfb6d61c8576a1d7b371f1a0b82f75e.tar.gz
build-appliance-image: Fix permissions
Explicitly set all permissions. This fixes various problems such as: Unable to create '/home/builder/poky/bitbake/lib/bb/pysh/pyshtables.py' [Errno 22] invalid mode ('w') or filename '/home/builder/poky/bitbake/lib/bb/pysh/pyshtables.py' and failure to create sub-directories in the directory 'poky': mkdir: cannot create directory '<dir>': Invalid argument While in there, added a few non-functional changes: Added sample proxy settings into .bashrc Added environmental variable with SRCREV actually used to populate the Build Appliance into .bashrc (BA_SRCREV) [YOCTO#9314] (From OE-Core rev: fcc558874d1ea533fb6ca488d2ab2223c1e21881) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/images/build-appliance-image_14.0.0.bb21
1 files changed, 15 insertions, 6 deletions
diff --git a/meta/recipes-core/images/build-appliance-image_14.0.0.bb b/meta/recipes-core/images/build-appliance-image_14.0.0.bb
index 61f69f42ec..fb48657e8e 100644
--- a/meta/recipes-core/images/build-appliance-image_14.0.0.bb
+++ b/meta/recipes-core/images/build-appliance-image_14.0.0.bb
@@ -21,7 +21,7 @@ IMAGE_FSTYPES = "vmdk"
21 21
22inherit core-image 22inherit core-image
23 23
24SRCREV ?= "992e5774714ef44bc91d45e2aaf2acfc23c72d63" 24SRCREV ?= "b58e5b1fb3bcacbcfce17a748bca5f60c3528b4f"
25SRC_URI = "git://git.yoctoproject.org/poky \ 25SRC_URI = "git://git.yoctoproject.org/poky \
26 file://Yocto_Build_Appliance.vmx \ 26 file://Yocto_Build_Appliance.vmx \
27 file://Yocto_Build_Appliance.vmxf \ 27 file://Yocto_Build_Appliance.vmxf \
@@ -39,17 +39,16 @@ fakeroot do_populate_poky_src () {
39 rm -rf ${WORKDIR}/git/.git 39 rm -rf ${WORKDIR}/git/.git
40 rm -f ${WORKDIR}/git/.gitignore 40 rm -f ${WORKDIR}/git/.gitignore
41 41
42 cp -Rp ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky 42 cp -R ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
43 43
44 mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf 44 mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf
45 mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/downloads 45 mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/downloads
46 if [ ${BA_INCLUDE_SOURCES} != 0 ]; then 46 if [ ${BA_INCLUDE_SOURCES} != 0 ]; then
47 cp -RpL ${DL_DIR}/* ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/ 47 cp -RpL ${DL_DIR}/* ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/
48 # Remove the git2_* tarballs -- this is ok since we still have the git2/.
49 rm -rf ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/git2_*
48 fi 50 fi
49 51
50 # Remove the git2_* tarballs -- this is ok since we still have the git2/.
51 rm -rf ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/git2_*
52
53 echo "/usr/bin" > ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone 52 echo "/usr/bin" > ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone
54 echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf 53 echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
55 mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo 54 mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo
@@ -57,9 +56,19 @@ fakeroot do_populate_poky_src () {
57 echo "export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo" >> ${IMAGE_ROOTFS}/home/builder/.bashrc 56 echo "export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
58 echo "export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64" >> ${IMAGE_ROOTFS}/home/builder/.bashrc 57 echo "export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
59 58
59 # Also save (for reference only) the actual SRCREV used to create this image
60 echo "export BA_SRCREV=${SRCREV}" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
61 echo "" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
62 echo "# If working behind a proxy and using the provided oe-git-proxy script" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
63 echo "# you need to set ALL_PROXY based on your proxy settings." >> ${IMAGE_ROOTFS}/home/builder/.bashrc
64 echo "# Example ALL_PROXY values:" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
65 echo "# export ALL_PROXY=https://proxy.example.com:8080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
66 echo "# export ALL_PROXY=socks://socks.example.com:1080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
67
60 chown builder.builder ${IMAGE_ROOTFS}/home/builder/pseudo 68 chown builder.builder ${IMAGE_ROOTFS}/home/builder/pseudo
61 69
62 chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky 70 chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky
71 chmod -R ug+rw ${IMAGE_ROOTFS}/home/builder/poky
63 72
64 # Allow builder to use sudo to setup tap/tun 73 # Allow builder to use sudo to setup tap/tun
65 echo "builder ALL=(ALL) NOPASSWD: ALL" >> ${IMAGE_ROOTFS}/etc/sudoers 74 echo "builder ALL=(ALL) NOPASSWD: ALL" >> ${IMAGE_ROOTFS}/etc/sudoers