<?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>6923</bug_id>
          
          <creation_ts>2014-11-03 10:03:52 +0000</creation_ts>
          <short_desc>Bitbake doesn&apos;t check the m5d and sha256 checksum for source tarball in some case</short_desc>
          <delta_ts>2014-11-04 09:44:08 +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.7</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>5571</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yi Zhao">yi.zhao</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>bluelightning</cc>
    
    <cc>ke.zou</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>zhangle.yang</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>46719</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2014-11-03 10:03:52 +0000</bug_when>
    <thetext>Git rev: master/f19b4e995ea47f9243f152b39337330307453c9f

I found the bitbake doesn&apos;t check the m5d and sha256 checksum for source tarball if the tarball and .done file already exist in download directory in some case.

Here is a simple example for connman:
1. bitbake connman
2. Set invalid md5 and sha256 checksums in connman bb file.
3. bitbake connman -c cleansstate
4. bitbake connman

Looks like the bitbake doesn&apos;t check the checksum and it can be built without errors.

Another example is a little complex. The current connman version is 1.25 in master and I want to downgrade to 1.24:
Steps:
1. Make sure the source tarball and .done file are in the download directory
   $ ls downloads/connman-1.24.tar.xz* -l
-rw-r--r-- 1 builder builder 629616 Jun  8 02:59 downloads/connman-1.24.tar.xz
-rw-r--r-- 1 builder builder      0 Nov  3 16:21 downloads/connman-1.24.tar.xz.done

2. mv meta/recipes-connectivity/connman/connman_1.25.bb to meta/recipes-connectivity/connman/connman_1.24.bb
   Do not change any lines in the bb file, that means the SRC_URI[md5sum] and SRC_URI[sha256sum] are for 1.25, not for 1.24

3. bitbake connman

The connman 1.24 can be built without any errors.

I need to clean the source tarball by using:
bitbake connman -c cleanall

And run:
bitbake connman

Then the checksum error occurs: 
#############
WARNING: Checksum failure encountered with download of http://kernel.org/pub/linux/network/connman/connman-1.24.tar.xz - will attempt other sources if available
WARNING: Renaming /buildarea3/yzhao1/poky-build/build-qemux86-64/downloads/connman-1.24.tar.xz to /buildarea3/yzhao1/poky-build/build-qemux86-64/downloads/connman-1.24.tar.xz_bad-checksum_dd6e1b4d9b9a28d127edb9f9b58bdec1
ERROR: Checksum failure fetching http://kernel.org/pub/linux/network/connman/connman-1.24.tar.xz
###############

If I change the SRC_URI[md5sum] and SRC_URI[sha256sum] to 1.24 in bb file and move the bb file to connman_1.25.bb, the connman 1.25 also can be built.(the 1.25 source tarball and .done file already exist in download directory).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46742</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-11-04 09:44:08 +0000</bug_when>
    <thetext>This is currently expected behaviour. There is an enhancement open relating to changing the behaviour though, therefore I&apos;m marking this one as a duplicate of that.

*** This bug has been marked as a duplicate of bug 5571 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>