<?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>1888</bug_id>
          
          <creation_ts>2012-01-09 12:25:32 +0000</creation_ts>
          <short_desc>SRC_URI checksum is now required</short_desc>
          <delta_ts>2012-04-02 22:07:43 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>Reference</product>
          <component>handbook</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>http://git.yoctoproject.org/cgit.cgi/yocto-docs/commit/?id=a1991f0b6f32a0a296ae4d115a834ed61042720b</bug_file_loc>
          <status_whiteboard>2-april-2012:  resolved/fixed</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.2 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Darren Hart">dvhart</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>poky.doc.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>18029</commentid>
    <comment_count>0</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-01-09 12:25:32 +0000</bug_when>
    <thetext>The Makefile recipe example does not include a SRC_URI checksum, without it, the recipe do_fetch command will fail. The do_fetch log will report something along the lines of:

WARNING: Fetcher failure for URL: &apos;http://iweb.dl.sourceforge.net/project/generalembedded/Downloads/Utility/phub_util_mac.tar.bz2&apos;. No checksum specified for /toph/yocto/downloads/phub_util_mac.tar.bz2, please add at least one to the recipe:
SRC_URI[md5sum] = &quot;f148f0a515ffa264ca5723df48cb7011&quot;
SRC_URI[sha256sum] = &quot;201818aa0540ecc7bec840fb993058eae5927a89a55ebbf57780c795ff200753&quot;

(NOTE: These checksums are not for the example in the recipe)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18030</commentid>
    <comment_count>1</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2012-01-09 13:07:25 +0000</bug_when>
    <thetext>What is the suggested documentation fix here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19615</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-03-29 12:30:57 +0000</bug_when>
    <thetext>Add the lines:

SRC_URI[md5sum] = &quot;f148f0a515ffa264ca5723df48cb7011&quot;
SRC_URI[sha256sum] =
&quot;201818aa0540ecc7bec840fb993058eae5927a89a55ebbf57780c795ff200753&quot;

to the example.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19617</commentid>
    <comment_count>3</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-03-29 14:52:06 +0000</bug_when>
    <thetext>Doh, I thought I had addressed this. Thanks RP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19620</commentid>
    <comment_count>4</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2012-03-29 15:30:33 +0000</bug_when>
    <thetext>I need to verify if this is the example you want the lines added to.  The bug does not specify the manual.  If this is the example, where do I put the lines Richard suggests?

----------------------

In the following example, mtd-utils is a makefile-based package:

     DESCRIPTION = &quot;Tools for managing memory technology devices.&quot;
     SECTION = &quot;base&quot;
     DEPENDS = &quot;zlib lzo e2fsprogs util-linux&quot;
     HOMEPAGE = &quot;http://www.linux-mtd.infradead.org/&quot;
     LICENSE = &quot;GPLv2&quot;
     LIC_FILES_CHKSUM = &quot;file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
                         file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c&quot;

     SRC_URI = &quot;git://git.infradead.org/mtd-utils.git;protocol=git;tag=v${PV}&quot;

     S = &quot;${WORKDIR}/git/&quot;

     EXTRA_OEMAKE = &quot;&apos;CC=${CC}&apos; &apos;CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR&apos; \
                     &apos;BUILDDIR=${S}&apos;&quot;

     do_install () {
             oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
                                INCLUDEDIR=${includedir}
             install -d ${D}${includedir}/mtd/
             for f in ${S}/include/mtd/*.h; do
                     install -m 0644 $f ${D}${includedir}/mtd/
             done
     }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19622</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-03-29 16:05:44 +0000</bug_when>
    <thetext>Darren, looking at this I don&apos;t understand it. Can you provide a link to the document which needs fixing? I can&apos;t find anything requesting phub_util_mac.tar.bz2 be downloaded...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19727</commentid>
    <comment_count>6</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-03-30 19:13:07 +0000</bug_when>
    <thetext>This was just an example. I followed those instructions to add a new recipe for the phub_util_mac tool (it doesn&apos;t exist in our repositories). The instructions do not mention the required SRC_URI checksum lines.

The docs, it turns out, are using a git SRC_URI, which I believe requires a SRCREV=&quot;...&quot; line. While tarball SRC_URIs require a SRC_URI[md5sum]=&quot;&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19728</commentid>
    <comment_count>7</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-03-30 19:55:29 +0000</bug_when>
    <thetext>This is what I&apos;d recommend:

To the existing example recipe, update it to match the one in the current sources:

replace:
SRC_URI = &quot;git://git.infradead.org/mtd-utils.git;protocol=git;tag=v${PV}&quot;

with:
SRC_URI = &quot;git://git.infradead.org/mtd-utils.git;protocol=git;tag=995cfe51b0a3cf32f381c140bf72b21bf91cef1b&quot;

You can see the entire file here:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/mtd/mtd-utils_1.4.9.bb

Using a named tag breaks working offline, so we shouldn&apos;t do that in example documentation. Apparently a SRCREV is not required here.

In the text describing the recipe, consider adding something like this:

&quot;&quot;&quot;
If your sources are available as a tarball instead of a git repository, you will need to provide the URL to the tarball as well as an md5 or sha256 sum of the download. For example:

SRC_URI=&quot;ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.4.9.tar.bz2&quot;
SRC_URI[md5sum]=&quot;82b8e714b90674896570968f70ca778b&quot;

You can generate the md5 or sha1 sums by using the md5sum or sha256sum commands with the target file as the only argument. For example:

$ md5sum mtd-utils-1.4.9.tar.bz2 
82b8e714b90674896570968f70ca778b  mtd-utils-1.4.9.tar.bz2
&quot;&quot;&quot;

Richard, do you agree with all the above?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19729</commentid>
    <comment_count>8</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-03-30 21:19:17 +0000</bug_when>
    <thetext>Yes, sounds reasonable to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19800</commentid>
    <comment_count>9</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2012-04-02 22:07:43 +0000</bug_when>
    <thetext>Implemented Darren&apos;s suggestions.  There might need to be some tweaking depending on his review.  New section can be found at http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#usingpoky-extend-addpkg-makefile

Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>