<?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>6422</bug_id>
          
          <creation_ts>2014-06-11 09:05:01 +0000</creation_ts>
          <short_desc>Add support for locked shared state</short_desc>
          <delta_ts>2015-06-08 18:25:01 +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.7</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>TC needed</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.7 M3</target_milestone>
          
          <blocked>6649</blocked>
    
    <blocked>6650</blocked>
    
    <blocked>6662</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>hongxu.jia</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>raj.khem</cc>
          
          <qa_contact name="Costin">costin.c.constantin</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>43847</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-06-11 09:05:01 +0000</bug_when>
    <thetext>We have had patches floating around for locked shared state support (i.e. locking the signature to a particular value for a task), but they haven&apos;t been integrated yet. 

Adding this functionality does carry some risk - in particular, if at all possible we&apos;d want to be able to tell when something that we should have rebuilt won&apos;t be rebuilt; e.g. if a patch has been added to a recipe. It&apos;s not clear to me how we will practically do this, but support could be a problem if we think an issue should have been fixed and the fix hasn&apos;t taken effect because it was locked out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45039</commentid>
    <comment_count>1</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2014-08-08 02:56:06 +0000</bug_when>
    <thetext>Can someone add the links to patches that are related to this bug ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45053</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-08-08 15:01:59 +0000</bug_when>
    <thetext>I thought Richard had a branch for these somewhere but I couldn&apos;t find it. Here&apos;s the original discussion:

http://patchwork.openembedded.org/patch/62707/

Plus, a little more up-to-date than that, here is a rebased branch with Richard&apos;s patches that I have been able to find (against poky though - OE-Core and bitbake changes are intermingled at the moment so that will need to be split apart before we can go further with this at the bare minimum):

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=paule/lockedsigs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45207</commentid>
    <comment_count>3</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-08-22 14:37:00 +0000</bug_when>
    <thetext>I&apos;ve retested this patchset now with master, and it still works - you can for example set the signatures up so that do_rootfs for an image can be executed alone with the rest of the tasks from sstate even if variable values get changed.

The things still blocking this from being merged:

* We need a means of restricting the targets built so that an error occurs if the build system thinks it needs to execute something outside of a whitelist despite the locked signatures. This can happen for example if a required sstate archive is missing.

* We need to report that locked signatures are in use when the build starts. (It&apos;s probably enough to just report that some have been set, a full list would be excessive.)

I&apos;ve also entered a couple of other related but separate bugs and marked them dependent upon this one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45563</commentid>
    <comment_count>4</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2014-09-12 05:58:04 +0000</bug_when>
    <thetext>Hi Paul,

I have some patches about locked share state

http://lists.openembedded.org/pipermail/openembedded-core/2014-September/097034.html


//Hongxu</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45682</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2014-09-18 15:20:02 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=c5cc4993f0555d3fc7a7aa5a471ec2b8e940dec6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46554</commentid>
    <comment_count>6</comment_count>
    <who name="Costin">costin.c.constantin</who>
    <bug_when>2014-10-24 07:02:52 +0000</bug_when>
    <thetext>Hello,

this freature is verified.

Simple steps to verify it:

1) build a package (eg. m4) 
2) go to tmp/stamps ...(details for machine used)... /m4 and observe/write down the m4 tasks related stamps
3) modify m4 recipe by adding to YOUR_YOCTO_DIR/meta/recipes-devtools/m4/m4_1.4.17.bb : 
###################################################
do_package_append() {
        bb.build.exec_func(&apos;do_test_prserv&apos;, d)
}

do_test_prserv() {
        echo &quot;unique text here like abc&quot;
}
##################################################

4) run:   bitbake -S none machine_type_set_in_local.conf
eg: for qemuarm:   bitbake -S none qemuarm
 
... and a locked-sigs.inc file is created. 

5) include locked-sigs.inc in local.conf by adding at the top of the file:

include full_path_to_locked-sigs.inc

eg.: /home/autobuilder/2poky/build/locked-sigs.inc

6) rebuild m4 and observe stamps present in tmp/stamps. They should coincide with stamps from locked-sigs.inc.

eg.: (present in locked-sigs.inc)
...
    m4:do_compile:c51a1533e7864e745f2f908dba00d4c3 \
    m4:do_configure:e06bf4fad2dfb6bd18491a605b55bd3a \
    m4:do_fetch:38cd097db1ba645412b1bb858c2993ae \
    m4:do_install:c7f5f53087b47d840fe868966c2f6785 \
    m4:do_package:a404cac4e4b675b59da2560bea0d805e \
    m4:do_package_write_rpm:6c9ab4e3da38d010fa20c4be72517d29 \
    m4:do_packagedata:a9bb53cfc3a679e09d6fb5002f9001aa \
    m4:do_patch:2932ecd450aaa9e97aa37a5a388c770f \
    m4:do_unpack:68e44cd283d4e828a1eb1f23730edf15 \
...


I&apos;ll mark the feature as verified.
 
Regards,

Costin</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>