<?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>9888</bug_id>
          
          <creation_ts>2016-07-06 19:15:53 +0000</creation_ts>
          <short_desc>BB_NO_NETWORK prevents uninative fetch from file:// PREMIRROR</short_desc>
          <delta_ts>2017-08-16 14:43:58 +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>2.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86_64</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>2.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Shaun">yocto</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>brian.avery</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sgw</cc>
    
    <cc>yocto</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>63684</commentid>
    <comment_count>0</comment_count>
      <attachid>3272</attachid>
    <who name="Shaun">yocto</who>
    <bug_when>2016-07-06 19:15:53 +0000</bug_when>
    <thetext>Created attachment 3272
site.conf to set BB_NO_NETWORK and own-mirror

Reproduced with poky krogoth commit e8898f018862e7e398ea84732a11630e30fb2ceb on Ubuntu 14.04 LTS (64-bit).  Target is core-image-minimal for beaglebone black machine. Using attached site.conf file to disable network access and use my own-mirror. 

When running bitbake, I get: &quot;WARNING: Disabling uninative as unable to fetch uninative tarball: Network access disabled through BB_NO_NETWORK&quot; (from poky/meta/classes/uninative.bbclass). Besides uninative, the rest of bitbake core-image-minimal builds fine. 

I created the downloads mirror by making a build with the network enabled, then copied the downloads directory to a new downloads_mirror directory.  Then I deleted the downloads and the directory created by the oe init script (which contained tmp), re-ran the oe init script, and added the attached conf/site.conf which disables network access for the build and specifies my own-mirror directory. 

If I manually copy the uninative directory from downloads_mirror to downloads then the warning will go away. There seems to be an issue with the uninative.bbclass when using the premirror/no network build. I&apos;m not sure if this is related to the poky/meta/classes/uninative.bbclass recipe, or the bitbake do fetch.  Could this be related to bug 9175?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74141</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-06-14 13:01:18 +0000</bug_when>
    <thetext>There are related problems when trying to fetch the uninative tarball with own-mirrors enabled.

If I set the following in site.conf:

SOURCE_MIRROR_URL ?= &quot;http://downloads.yoctoproject.org/mirror/sources/&quot;
INHERIT += &quot;own-mirrors&quot;

fetching the uninative tarball fails with checksum mismatch:

NOTE: Fetching uninative binary shim from http://downloads.yoctoproject.org/releases/uninative/1.6/x86_64-nativesdk-libc.tar.bz2;sha256sum=2b4fffa308d9f19e0742a1a404ff42495fb50c165e5ca0458cedca157372691a
WARNING: Checksum mismatch for local file /srv/builds/mirror-test/downloads/uninative/2b4fffa308d9f19e0742a1a404ff42495fb50c165e5ca0458cedca157372691a/x86_64-nativesdk-libc.tar.bz2
Cleaning and trying again.
WARNING: Renaming /srv/builds/mirror-test/downloads/uninative/2b4fffa308d9f19e0742a1a404ff42495fb50c165e5ca0458cedca157372691a/x86_64-nativesdk-libc.tar.bz2 to /srv/builds/mirror-test/downloads/uninative/2b4fffa308d9f19e0742a1a404ff42495fb50c165e5ca0458cedca157372691a/x86_64-nativesdk-libc.tar.bz2_bad-checksum_4b6fb2106c2f18b8f9c8ac67e1cf9e57
ERROR: Checksum failure fetching http://downloads.yoctoproject.org/releases/uninative/1.6/x86_64-nativesdk-libc.tar.bz2;sha256sum=2b4fffa308d9f19e0742a1a404ff42495fb50c165e5ca0458cedca157372691a
WARNING: Disabling uninative as unable to fetch uninative tarball: Fetcher failure for URL: &apos;http://downloads.yoctoproject.org/releases/uninative/1.6/x86_64-nativesdk-libc.tar.bz2;sha256sum=2b4fffa308d9f19e0742a1a404ff42495fb50c165e5ca0458cedca157372691a&apos;. Checksum mismatch!
File: &apos;/srv/builds/mirror-test/downloads/uninative/2b4fffa308d9f19e0742a1a404ff42495fb50c165e5ca0458cedca157372691a/x86_64-nativesdk-libc.tar.bz2&apos; has sha256 checksum 26d46c61ad88cc245e31c88549717c0092a838d111b93ec169d88b08cc027581 when 2b4fffa308d9f19e0742a1a404ff42495fb50c165e5ca0458cedca157372691a was expected
If this change is expected (e.g. you have upgraded to a new version without updating the checksums) then you can use these lines within the recipe:
SRC_URI[md5sum] = &quot;4b6fb2106c2f18b8f9c8ac67e1cf9e57&quot;
SRC_URI[sha256sum] = &quot;26d46c61ad88cc245e31c88549717c0092a838d111b93ec169d88b08cc027581&quot;
Otherwise you should retry the download and/or check with upstream to determine if the file has become corrupted or otherwise unexpectedly modified.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75027</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-07-14 09:56:21 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; There are related problems when trying to fetch the uninative tarball with
&gt; own-mirrors enabled.

This was two separate issues:
1) that the YP mirror was carrying an invalid copy of the uninative tarball, triggering a correct checksum mismatch failure. This has been removed.
2) that if a file was fetched from a premirror but had an incorrect checksum, mirrors and upstream fetch locations wouldn&apos;t be tried. This has been fixed in master: 
http://git.openembedded.org/bitbake/commit/?id=022adb30dbb0df764c9fb515918cb9a88e4f8d6f

These turn out to be unrelated to the original reporter&apos;s issue, which we should test whether is still a valid bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75028</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-07-14 09:59:01 +0000</bug_when>
    <thetext>I&apos;m surprised that everything other than the uninative fetch succeeds, that suggests that uninative.bbclass is doing something different with file:// URIs than other uses of the fetcher.


Shaun, as own-mirrors sets PREMIRRORS up you may be able to achieve what you want by using BB_FETCH_PREMIRRORONLY rather than BB_NO_NETWORK?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75038</commentid>
    <comment_count>4</comment_count>
    <who name="Shaun">yocto</who>
    <bug_when>2017-07-14 15:13:01 +0000</bug_when>
    <thetext>Joshua, I was able to work around the problem by using BB_FETCH_PREMIRRORONLY using own mirrors. The uninative fetcher would print out 

&quot;NOTE: Fetching uninative binary shim from http://downloads.yoctoproject.org...&quot;

Which seemed like the fetch was ignoring my pre-mirror and using the network, but since it worked I was okay with the workaround. I was never sure if the network was being used for uninative or not.  If the build uses BB_FETCH_PREMIRROR_ONLY, I have my own mirror set up, and the NOTE above still prints out, is the network actually being used or is this a misleading NOTE?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75061</commentid>
    <comment_count>5</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-07-17 12:28:12 +0000</bug_when>
    <thetext>Shaun, the NOTE is misleading. It&apos;s reporting the upstream URI (from SRC_URL) for the uninative tarball, but should actually be fetching the version from your PREMIRROR.

For whoever ends up working on this; I can confirm that with own-mirrors enabled and a file:// uri in SOURCE_MIRROR_URL I observe:
* with BB_NO_NETWORK: uninative fetch always fails
* with BB_PREMIRRORS_ONLY: uninative fetch will succeed 

It&apos;s also noteworthy to emphasise that with BB_NO_NETWORK all other fetcher uses successfully access the file:// PREMIRRORS</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75896</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-08-16 14:43:58 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=64d15c298dd46e9ba200d77de6d0ab96ec24588c</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>3272</attachid>
            <date>2016-07-06 19:15:53 +0000</date>
            <delta_ts>2016-07-06 19:15:53 +0000</delta_ts>
            <desc>site.conf to set BB_NO_NETWORK and own-mirror</desc>
            <filename>site.conf</filename>
            <type>application/octet-stream</type>
            <size>162</size>
            <attacher name="Shaun">yocto</attacher>
            
              <data encoding="base64">U0NPTkZfVkVSU0lPTiA9ICIxIgpTT1VSQ0VfTUlSUk9SX1VSTCA/PSAiZmlsZTovLy9ob21lL2Rl
dmVsb3Blci9kb3dubG9hZHNfbWlycm9yIgpJTkhFUklUICs9ICJvd24tbWlycm9ycyIKQkJfR0VO
RVJBVEVfTUlSUk9SX1RBUkJBTExTID0gIjEiCkJCX05PX05FVFdPUksgPSAiMSIK
</data>

          </attachment>
      

    </bug>

</bugzilla>