[poky] [PATCH 0/1] SRC_URI checksum support v3

Yu Ke ke.yu at intel.com
Mon Dec 20 21:32:30 PST 2010


On Dec 20, 16:10, Richard Purdie wrote:
> On Fri, 2010-12-17 at 14:33 +0800, Yu Ke wrote:
> > This patch add SRC_URI checksum support. With this patch,fetcher
> > can verify the MD5 and SHA256 checksum of download src with the
> > value defined in recipes SRC_URI.
> > 
> > This is the v3 patch with following changes compared with v2:
> > - add configurable variable BB_STRICT_CHECKSUM to handle checksum missing case
> >   if checksum is missing and BB_STRICT_CHECKSUM = "1", bitbake will fatal
> > - add check to only verify checksum for protocol http/https/ftp/ftps, not
> >   verify checksum for local file and other SCM
> > 
> > Pull URL: git://git.pokylinux.org/poky-contrib.git
> >   Branch: kyu3/srcuri-v3
> >   Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kyu3/srcuri-v3
> 
> I merged this, then realised there was a problem with subsequent builds
> proceeding with corrupt files. I've pushed a fix for at least part of
> that.

Thanks, it is indeed necessary fix.

BTW, I am also thinking if we could merge Fetch.write_md5sum and Fetch.verify_md5sum into verify_checksum, since they are all checksum related, puting them together would be more clean logically.

> 
> I'm wondering if we should rename the file to something like the
> original name + ".corrupt" to make sure we don't use a known broken
> file?

Yes, I prefer to do that. It is more robust, and when meet corrupt file, if bitbake did not clean the downloaded file, user also need to do that. so it is better for bitbake to do that automatically for user.

so combined with the above points, the verify_checksum can be:
"
if ud.md5 file exist
	touch ud.md5 and return

check the checksum, if mismatch, rename download file to *.corrupt and raise exception

write the ud.md5 file
"

Comment?

Regards
Ke

> 
> Cheers,
> 
> Richard
> 
> _______________________________________________
> poky mailing list
> poky at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky



More information about the poky mailing list