<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>5590</bug_id>
          
          <creation_ts>2013-11-22 16:27:59 +0000</creation_ts>
          <short_desc>System umask respected in checkout from git</short_desc>
          <delta_ts>2013-11-29 10:59:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>1.6</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Jansa">Martin.Jansa</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>39034</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2013-11-22 16:27:59 +0000</bug_when>
    <thetext>base.bbclass sets umask 022 for some tasks do_configure, do_install, do_package, but some files are copied with file permissions as they were in e.g. git checkout and this checkout should be the same on all builders, independent from system umask set on them.

Steps to reproduce:

# just in case
rm -rf tmp-eglibc/work/arm920tt-oe-linux-gnueabi/gnu-config/1.0+gitAUTOINC+a47f842264-r0/

umask 0022
bitbake -c cleansstate gnu-config
bitbake -c unpack -b openembedded-core/meta/recipes-devtools/gnu-config/gnu-config_git.bb
ls -laR tmp-eglibc/work/arm920tt-oe-linux-gnueabi/gnu-config/1.0+gitAUTOINC+a47f842264-r0/git/ &gt; ls-laR-0022.txt

# just in case
rm -rf tmp-eglibc/work/arm920tt-oe-linux-gnueabi/gnu-config/1.0+gitAUTOINC+a47f842264-r0/

umask 0002
bitbake -c cleansstate -b openembedded-core/meta/recipes-devtools/gnu-config/gnu-config_git.bb
bitbake -c unpack -b openembedded-core/meta/recipes-devtools/gnu-config/gnu-config_git.bb
ls -laR tmp-eglibc/work/arm920tt-oe-linux-gnueabi/gnu-config/1.0+gitAUTOINC+a47f842264-r0/git/ &gt; ls-laR-0002.txt

diff ls-laR-00* | head -n 20
3,11c3,11
&lt; drwxrwxr-x 4 bitbake bitbake  4096 Nov 22 16:09 .
&lt; drwxrwxr-x 4 bitbake bitbake  4096 Nov 22 16:09 ..
&lt; drwxrwxr-x 7 bitbake bitbake  4096 Nov 22 16:09 .git
&lt; -rw-rw-r-- 1 bitbake bitbake 74298 Nov 22 16:09 ChangeLog
&lt; -rw-rw-r-- 1 bitbake bitbake    81 Nov 22 16:09 Makefile
&lt; -rwxrwxr-x 1 bitbake bitbake 44525 Nov 22 16:09 config.guess
&lt; -rwxrwxr-x 1 bitbake bitbake 35370 Nov 22 16:09 config.sub
&lt; drwxrwxr-x 2 bitbake bitbake  4096 Nov 22 16:09 testsuite
&lt; -rwxrwxr-x 1 bitbake bitbake   244 Nov 22 16:09 uname
---
&gt; drwxr-xr-x 4 bitbake bitbake  4096 Nov 22 16:14 .
&gt; drwxr-xr-x 4 bitbake bitbake  4096 Nov 22 16:14 ..
&gt; drwxr-xr-x 7 bitbake bitbake  4096 Nov 22 16:14 .git
&gt; -rw-r--r-- 1 bitbake bitbake 74298 Nov 22 16:14 ChangeLog
&gt; -rw-r--r-- 1 bitbake bitbake    81 Nov 22 16:14 Makefile
&gt; -rwxr-xr-x 1 bitbake bitbake 44525 Nov 22 16:14 config.guess
&gt; -rwxr-xr-x 1 bitbake bitbake 35370 Nov 22 16:14 config.sub
&gt; drwxr-xr-x 2 bitbake bitbake  4096 Nov 22 16:14 testsuite
&gt; -rwxr-xr-x 1 bitbake bitbake   244 Nov 22 16:14 uname

I&apos;ve added setting umask varflag in base.bbclass and later some debug because it didn&apos;t work:
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 93bc700..76a41c3 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -485,6 +485,7 @@ python () {
     # If we&apos;re building a target package we need to use fakeroot (pseudo)
     # in order to capture permissions, owners, groups and special files
     if not bb.data.inherits_class(&apos;native&apos;, d) and not bb.data.inherits_class(&apos;cross&apos;, d):
+        d.setVarFlag(&apos;do_unpack&apos;, &apos;umask&apos;, 022)
         d.setVarFlag(&apos;do_configure&apos;, &apos;umask&apos;, 022)
         d.setVarFlag(&apos;do_compile&apos;, &apos;umask&apos;, 022)
         d.appendVarFlag(&apos;do_install&apos;, &apos;depends&apos;, &apos; virtual/fakeroot-native:do_populate_sysroot&apos;)

Seems to be working, will send patch in few minutes</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39051</commentid>
    <comment_count>1</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2013-11-23 00:23:02 +0000</bug_when>
    <thetext>http://lists.openembedded.org/pipermail/openembedded-core/2013-November/086881.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39139</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-11-29 10:59:12 +0000</bug_when>
    <thetext>Fixed in master with http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=79fbb1f69815abd3b835678a8e4b9114f6f0290e (thanks Martin!)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>