| Summary: | fetch: uninative loader: no error on checksum failure for file:// urls | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Patrick Ohly <patrick.ohly> |
| Component: | devtools / tool chain | Assignee: | Sawas Etairidis <Falital> |
| Status: | IN PROGRESS REVIEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | agnes.agonas, Falital, meta.mr.watcher, meta.watcher, randy.macleod, richard.purdie |
| Version: | 2.1 | ||
| Target Milestone: | 6.2 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | NEWCOMER | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Patrick Ohly
2016-07-21 19:08:50 UTC
This is because a file:// url is being used and we don'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... That explains it. I think checking a checksum if provided makes sense, because it avoids surprises and catches potential errors (like "checksum not updated"). Not terribly important, though. We should make the fetcher error if checksums are specified and they don't match. 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 "0000000000000000000000000000000000000000000000000000000000000000" 4. Set the UNINATIVE_URL to "file:///tmp/" 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: 'file:///tmp/x86_64-nativesdk-libc-5.0.tar.xz;sha256sum=0000000000000000000000000000000000000000000000000000000000000000'. 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] ?= "96045e8b1e242c8a849426a8506c7043f354b39f2bc0035192780e8205e23e9d" The build finished without error. 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/ I would like to work on this bug. 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 "good but not quite done" and may provide a useful starting point for future work on this issue. Thanks, Aditya 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 |