<?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>8150</bug_id>
          
          <creation_ts>2015-08-11 12:44:58 +0000</creation_ts>
          <short_desc>Implement whitelisting for packages from imported layers</short_desc>
          <delta_ts>2015-10-14 07:39:53 +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.9</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.9 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexander Kanevskiy">alexander.kanevskiy</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>bogdanx.a.voiculescu</cc>
    
    <cc>jackie.huang</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>patrick.ohly</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          <qa_contact name="Lucian Musat">georgex.l.musat</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>52992</commentid>
    <comment_count>0</comment_count>
    <who name="Alexander Kanevskiy">alexander.kanevskiy</who>
    <bug_when>2015-08-11 12:44:58 +0000</bug_when>
    <thetext>In our custom distribution we need to provide enough content in our binary package feed repositories.
To populate those, we would like to use already existing layers like meta-oe from OpenEmbedded.org, but downside is that those repositories are providing so many recipes that we don&apos;t need to build or want to ship and respectively don&apos;t allow developer to build (unsupported set of recipes).

Using blacklisting feature is not really possible, as package set can be often changed and list would grow fast.
Thus needed functionality with behaviour  &quot;skip all recipes in layer XXX except ones explicitly allowed&quot;.
Those options can be located in distro specific configuration files, and should be layer specific. E.g. allow package &quot;gtest&quot; from custom layer, but skip it from &quot;meta-oe&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53088</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-08-13 15:07:23 +0000</bug_when>
    <thetext>FWIW, a function was added to bitbake&apos;s lib/bb/utils.py in order to make this possible - see bug 7723. With that it&apos;s pretty easy to add a class that you can inherit globally that raises SkipRecipe if the recipe is from a particular layer and isn&apos;t whitelisted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53089</commentid>
    <comment_count>2</comment_count>
    <who name="Alexander Kanevskiy">alexander.kanevskiy</who>
    <bug_when>2015-08-13 15:16:25 +0000</bug_when>
    <thetext>Yes, bug 7723 was prework for this feature. It shouldn&apos;t be hard to implement as we already discussed offline with Richard and Paul. However, I&apos;ve created that item specifically to get proper design on how to implement it from ideological point of view and make feature really usable.

E.g. how to name variables, how to make sure that it can be properly controlled on distro configuration level, etc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53105</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2015-08-13 21:27:06 +0000</bug_when>
    <thetext>We wrote a script to replay all commits and output a white-listed subset of a layer, preserving the original commit id in the long log. 

That works but it&apos;s slow, tedious and doesn&apos;t let naive users easily discover what they _could_ add without needing to clone meta-oe or find and use the layers index. We may drop the meta-oe-subset approach if a good white-list work-flow can be agreed upon.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53119</commentid>
    <comment_count>4</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-08-14 11:21:31 +0000</bug_when>
    <thetext>I&apos;ve put together an initial implementation here:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=paule/whitelist</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53121</commentid>
    <comment_count>5</comment_count>
    <who name="Alexander Kanevskiy">alexander.kanevskiy</who>
    <bug_when>2015-08-14 14:03:38 +0000</bug_when>
    <thetext>Looks good enough for me to get to community review and initial testing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53144</commentid>
    <comment_count>6</comment_count>
    <who name="Jackie Huang">jackie.huang</who>
    <bug_when>2015-08-17 10:59:30 +0000</bug_when>
    <thetext>I tried with the patch but it doesn&apos;t work with multilib and -native cases, you may need something like:

-            if not d.getVar(&apos;PN&apos;, True) in whitelist.split():
+            if not d.getVar(&apos;BPN&apos;, True) in whitelist.split():

or other way to properly handle multilib.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53223</commentid>
    <comment_count>7</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-08-19 13:35:47 +0000</bug_when>
    <thetext>OK, I&apos;ve switched to BPN, tweaked the comments a bit and sent it as an RFC patch to the OE-Core list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53471</commentid>
    <comment_count>8</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-08-27 12:38:57 +0000</bug_when>
    <thetext>Have sent a v2 with some changes:

http://lists.openembedded.org/pipermail/openembedded-core/2015-August/109520.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54060</commentid>
    <comment_count>9</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-09-15 09:26:47 +0000</bug_when>
    <thetext>The patch implementing this has been rejected; the community would rather not support this kind of thing in OE-Core. Distro layers can carry and use the class if needed though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55281</commentid>
    <comment_count>10</comment_count>
    <who name="Lucian Musat">georgex.l.musat</who>
    <bug_when>2015-10-14 07:39:53 +0000</bug_when>
    <thetext>Setting as verified as per last comment.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>