[oe-commits] [openembedded-core] branch master updated: build-appliance-image: Fix permissions

git at git.openembedded.org git at git.openembedded.org
Mon Mar 28 15:21:33 UTC 2016


rpurdie pushed a commit to branch master
in repository openembedded-core.

The following commit(s) were added to refs/heads/master by this push:
       new  fcc5588   build-appliance-image: Fix permissions
fcc5588 is described below

commit fcc558874d1ea533fb6ca488d2ab2223c1e21881
Author: Juro Bystricky <juro.bystricky at intel.com>
AuthorDate: Sun Mar 27 12:46:48 2016 -0700

    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]
    
    Signed-off-by: Juro Bystricky <juro.bystricky at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 .../images/build-appliance-image_14.0.0.bb          | 21 +++++++++++++++------
 1 file 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 61f69f4..fb48657 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"
 
 inherit core-image
 
-SRCREV ?= "992e5774714ef44bc91d45e2aaf2acfc23c72d63"
+SRCREV ?= "b58e5b1fb3bcacbcfce17a748bca5f60c3528b4f"
 SRC_URI = "git://git.yoctoproject.org/poky \
            file://Yocto_Build_Appliance.vmx \
            file://Yocto_Build_Appliance.vmxf \
@@ -39,17 +39,16 @@ fakeroot do_populate_poky_src () {
 	rm -rf ${WORKDIR}/git/.git
 	rm -f ${WORKDIR}/git/.gitignore
 
-	cp -Rp ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
+	cp -R ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
 
 	mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf
 	mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/downloads
 	if [ ${BA_INCLUDE_SOURCES} != 0 ]; then
 		cp -RpL ${DL_DIR}/* ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/
+		# Remove the git2_* tarballs -- this is ok since we still have the git2/.
+		rm -rf ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/git2_*
 	fi
 
-	# Remove the git2_* tarballs -- this is ok since we still have the git2/.
-	rm -rf ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/git2_*
-
 	echo "/usr/bin" > ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone
 	echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
 	mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo
@@ -57,9 +56,19 @@ fakeroot do_populate_poky_src () {
 	echo "export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
 	echo "export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
 
+	# Also save (for reference only) the actual SRCREV used to create this image
+	echo "export BA_SRCREV=${SRCREV}" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+	echo "" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+	echo "# If working behind a proxy and using the provided oe-git-proxy script" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+	echo "# you need to set ALL_PROXY based on your proxy settings." >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+	echo "# Example ALL_PROXY values:" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+	echo "# export ALL_PROXY=https://proxy.example.com:8080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+	echo "# export ALL_PROXY=socks://socks.example.com:1080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+
 	chown builder.builder ${IMAGE_ROOTFS}/home/builder/pseudo
 
-	chown -R builder.builder  ${IMAGE_ROOTFS}/home/builder/poky
+	chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky
+	chmod -R ug+rw ${IMAGE_ROOTFS}/home/builder/poky
 
 	# Allow builder to use sudo to setup tap/tun
 	echo "builder ALL=(ALL) NOPASSWD: ALL" >> ${IMAGE_ROOTFS}/etc/sudoers

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list