<?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>9993</bug_id>
          
          <creation_ts>2016-07-21 19:08:50 +0000</creation_ts>
          <short_desc>fetch: uninative loader: no error on checksum failure for file:// urls</short_desc>
          <delta_ts>2026-09-23 19:49: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>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>2.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>IN PROGRESS REVIEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>NEWCOMER</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Sawas Etairidis">Falital</assigned_to>
          <cc>agnes.agonas</cc>
    
    <cc>Falital</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</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>64295</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2016-07-21 19:08:50 +0000</bug_when>
    <thetext>Downloading a uninative tarball which doesn&apos;t have the expected content, i.e. doesn&apos;t match the UNINATIVE_CHECKSUM, does not trigger any error. Instead, the content gets used.

To reproduce:
- check out 36feb38045b7a2af86ece147fec54b0db3bf491f (current master)
- &quot;bitbake uninative-tarball&quot;
- change UNINATIVE_URL in meta/conf/distro/include/yocto-uninative.inc into &quot;file:///tmp/&quot;
- cp tmp/deploy/sdk/x86_64-nativesdk-libc.tar.bz2 /tmp/
- rm -rf tmp downloads
- &quot;bitbake attr-native&quot; (fairly random example)

Against expectations, this results in downloading the file and unpacking it into tmp/sysroots-uninative. There&apos;s no error:

NOTE: Fetching uninative binary shim from file:////fast/build/poky/x86/x86_64-nativesdk-libc.tar.bz2;sha256sum=84e89ed675156d13a27fe56e8433f5fa9662802349bb0bbe9e6eba577fc140d3
Initialising tasks: 100% |############################################################################| Time: 0:00:00
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 79 tasks of which 78 didn&apos;t need to be rerun and all succeeded.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64300</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-07-21 19:23:17 +0000</bug_when>
    <thetext>This is because a file:// url is being used and we don&apos;t check checksums on file:// urls in general as its assumed the filesystem is reliable. If a checksum is specified, we probably should consider checking it though...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64324</commentid>
    <comment_count>2</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2016-07-22 06:42:16 +0000</bug_when>
    <thetext>That explains it. I think checking a checksum if provided makes sense, because it avoids surprises and catches potential errors (like &quot;checksum not updated&quot;). Not terribly important, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103536</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2025-12-11 16:27:54 +0000</bug_when>
    <thetext>We should make the fetcher error if checksums are specified and they don&apos;t match.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104093</commentid>
    <comment_count>4</comment_count>
    <who name="Ágnes Agonás">agnes.agonas</who>
    <bug_when>2026-01-29 06:42:26 +0000</bug_when>
    <thetext>bitbake version: cdd79c1768ac396a9c6577e38098da4331507f24 on master

Environment set up with: https://docs.yoctoproject.org/bitbake/dev/bitbake-user-manual/bitbake-user-manual-environment-setup.html

Was not able to reproduce the original issue:

1. Executed bitbake uninative-tarball
2. Copied the file x86_64-nativesdk-libc-5.0.tar.xz to /tmp
3. In openembedded-core/meta/conf/distro/include/yocto-uninative.inc:
set the UNINATIVE_CHECKSUM[x86_64] to &quot;0000000000000000000000000000000000000000000000000000000000000000&quot;
4. Set the UNINATIVE_URL to &quot;file:///tmp/&quot;
5. Deleted the tmp and cache folders.

6. After executing bitbake attr-native

NOTE: Fetching uninative binary shim file:///tmp/x86_64-nativesdk-libc-5.0.tar.xz;sha256sum=0000000000000000000000000000000000000000000000000000000000000000 (will check PREMIRRORS first)
WARNING: Failed to fetch URL file:///tmp/x86_64-nativesdk-libc-5.0.tar.xz;sha256sum=0000000000000000000000000000000000000000000000000000000000000000, attempting MIRRORS if available
ERROR: Fetcher failure: Unable to find file file:///tmp/x86_64-nativesdk-libc-5.0.tar.xz;sha256sum=0000000000000000000000000000000000000000000000000000000000000000 anywhere to download to /tmp/x86_64-nativesdk-libc-5.0.tar.xz. The paths that were searched were:

WARNING: Disabling uninative as unable to fetch uninative tarball: Fetcher failure for URL: &apos;file:///tmp/x86_64-nativesdk-libc-5.0.tar.xz;sha256sum=0000000000000000000000000000000000000000000000000000000000000000&apos;. Unable to fetch URL from any source.
WARNING: To build your own uninative loader, please bitbake uninative-tarball and set UNINATIVE_TARBALL appropriately.

7. Then I completely deleted the UNINATIVE_CHECKSUM[x86_64], and got the following:

ERROR: Uninative selected but not configured correctly, please set UNINATIVE_CHECKSUM[x86_64]

8. Then I added the original line back UNINATIVE_CHECKSUM[x86_64] ?= &quot;96045e8b1e242c8a849426a8506c7043f354b39f2bc0035192780e8205e23e9d&quot;

The build finished without error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105653</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-05-28 15:11:57 +0000</bug_when>
    <thetext>This patch on the list is good but not quite done:

https://lore.kernel.org/bitbake-devel/20260430-b4-yocto-9993-v1-1-a54d842cd0fd@gmail.com/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105790</commentid>
    <comment_count>6</comment_count>
    <who name="Aditya G S">adityags2004</who>
    <bug_when>2026-06-10 05:54:02 +0000</bug_when>
    <thetext>I would like to work on this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106282</commentid>
    <comment_count>7</comment_count>
    <who name="Aditya G S">adityags2004</who>
    <bug_when>2026-07-23 07:38:06 +0000</bug_when>
    <thetext>Hi,

I would like to provide an update on this issue.
I was able to reproduce the behavior locally using a small test recipe with a file:// URL and an intentionally incorrect checksum to verify the current fetcher behavior.

However, I am currently occupied with other higher-priority work and will not be able to dedicate the time required to investigate and complete this issue properly.

As a result, I will be unassigning myself from this bug so that it can be picked up by someone else if needed.

For reference, Comment #5 points to an existing patch on the mailing list which was described as &quot;good but not quite done&quot; and may provide a useful starting point for future work on this issue.

Thanks,
Aditya</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106919</commentid>
    <comment_count>8</comment_count>
    <who name="Sawas Etairidis">Falital</who>
    <bug_when>2026-09-23 19:30:22 +0000</bug_when>
    <thetext>Hi,

I will start working on this, I will fix the issues in https://lore.kernel.org/bitbake-devel/20260430-b4-yocto-9993-v1-1-a54d842cd0fd@gmail.com/ and add Jhonata Poma-Hansen as the Co-Author

Regards,
Savvas</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106920</commentid>
    <comment_count>9</comment_count>
    <who name="Sawas Etairidis">Falital</who>
    <bug_when>2026-09-23 19:49:12 +0000</bug_when>
    <thetext>See https://lists.openembedded.org/g/bitbake-devel/message/20248?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Arecentpostdate%2Fsticky%2C%2Cfetch2%2Flocal%3A+verify+checksums+for+file%3A%2F%2F+urls%2C20%2C2%2C0%2C121398937</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>