<?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>8323</bug_id>
          
          <creation_ts>2015-09-17 23:41:37 +0000</creation_ts>
          <short_desc>fetch2/hg mirror tarballs are kinda broken</short_desc>
          <delta_ts>2023-01-19 07:18:37 +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>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</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>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Tollerton">rich.tollerton</reporter>
          <assigned_to name="Pavel Zhukov">pavel</assigned_to>
          <cc>pavel</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>rich.tollerton</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>54244</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Tollerton">rich.tollerton</who>
    <bug_when>2015-09-17 23:41:37 +0000</bug_when>
    <thetext>The hg fetcher generates mirror tarballs as hg.localfile, cf bitbake/lib/bb/fetch2/hg.py:Hg.urldata_init(). But there are severe problems with them:

(1) They require SRC_URI[md5sum] or SRC_URI[sha256sum] checksums be supplied in recipes, in bitbake &gt;1.26 and when BB_STRICT_CHECKSUM is set. These ought not to be necessary in the first place, because Mercurial commits are merkle trees; when repos are properly cloned, commit ids provide an equivalent guarantee of integrity. 

And of course you can&apos;t really reproduce these tarballs outside the fetcher itself, so editing SRC_URI becomes an unnecessarily two-step process.

(2) AFAIK, they appear to be created but never extracted. They are not connected at all to the BB_GENERATE_MIRROR_TARBALLS facility in fetch2/git.

Note that fetch2/git does not suffer from these problems, because (a) Git.supports_checksum() returns False, and (b) Git.unpack() does a clone from the repo at DL_DIR to the work directory, implicitly verifying the integrity of the commit history.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54620</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-09-24 14:37:34 +0000</bug_when>
    <thetext>To be honest we don&apos;t use the hg fetcher much. Would you be able to send some patches to make it behave more like the git fetcher?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55196</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Tollerton">rich.tollerton</who>
    <bug_when>2015-10-12 17:48:32 +0000</bug_when>
    <thetext>I&apos;ll chuck it onto my team&apos;s backlog, but we&apos;re pretty hammered too and I don&apos;t think we&apos;ll get to it before end of dev for 2.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86195</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-01-30 16:14:59 +0000</bug_when>
    <thetext>Richard,
Are you able to send a patch to the list for this hopefully with a test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92628</commentid>
    <comment_count>4</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2022-02-22 17:27:43 +0000</bug_when>
    <thetext>Currently mercurial is broken in OE. mercurial-native failed to connect to any ssl enabled servers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94741</commentid>
    <comment_count>5</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2023-01-17 19:13:16 +0000</bug_when>
    <thetext>I&apos;ve created simple testcase for hg/premirrors functionality [1] and with small fix in fetcher code [2] is seems working. fetcher is able to fetch repo, create mirror tarball from it and then use the tarball to download() the project with networking disabled.

[1] https://lists.openembedded.org/g/bitbake-devel/message/14319
[2] https://lists.openembedded.org/g/bitbake-devel/message/14318</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94758</commentid>
    <comment_count>6</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2023-01-19 07:18:37 +0000</bug_when>
    <thetext>Mercurial mirror tarballs should be working and tested now:
 https://git.openembedded.org/bitbake/commit/?id=80421abd5bf3f1f751219c050fa93970cf1f2088
https://git.openembedded.org/bitbake/commit/?id=c0e349a5fc92e9c90afc53800c7e83495393ff79</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>