Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Koen Kooi <k.kooi@student.utwente.nl>
To: openembedded-devel@openembedded.org
Subject: [RFC] Add option for strict checksumming, was: Re: checksums...
Date: Wed, 21 Jan 2009 20:34:51 +0100	[thread overview]
Message-ID: <gl7tcr$55v$1@ger.gmane.org> (raw)
In-Reply-To: <49777438.8070108@balister.org>

On 21-01-09 20:15, Philip Balister wrote:
> Koen Kooi wrote:
>> Hi,
>>
>> Could people adding new recipe and people git-am'ing patches adding
>> new recipes please add the corresponding checksums to checksums.ini?
>>
>> It's not hard:
>>
>> 1) bitbake <recipe>
>> 2) watch it fail
>> 3) cd $TMPDIR ; cat /OE/org.openembedded.dev/conf/checksums.ini >>
>> checksums.ini ; python
>> /OE/org.openembedded.dev/contrib/source-checker/oe-checksums-sorter.py
>> checksums.ini > /OE/org.openembedded.dev/conf/checksums.ini
>> 4) git commit --amend /OE/org.openembedded.dev/conf/checksums.ini
>
> I screwed this up once (and committed a recipe without the checksum)
> when I left ALLOW_INSECURE_DOWNLOADS set in my local.conf. Now I have it
> commented out and am really careful only to use it only when hacking.

What about this:

 From a48ee59ac6ea569a5f88066d86de4b66d8f606c3 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@openembedded.org>
Date: Wed, 21 Jan 2009 20:29:53 +0100
Subject: [PATCH] base.bbclass: only error out on missing checksums when 
OE_STRICT_CHECKSUMS is set
  * we want to error out on non-matching sums, missing ones are less bad

---
  classes/base.bbclass |    8 +++++++-
  1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/classes/base.bbclass b/classes/base.bbclass
index fca0edd..411adc9 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -71,7 +71,13 @@ def base_chk_file(parser, pn, pv, src_uri, localpath, 
data):

          file.write("[%s]\nmd5=%s\nsha256=%s\n\n" % (src_uri, md5data, 
shadata))
          file.close()
-        return False
+        if not bb.data.getVar("OE_STRICT_CHECKSUMS",data, True):
+            bb.note("This package has no entry in checksums.ini, please 
add one")
+            bb.note("\n[%s]\nmd5=%s\nsha256=%s" % (src_uri, md5data, 
shadata))
+            return True
+        else:
+            bb.note("Missing checksum")
+            return False

      if not md5 == md5data:
          bb.note("The MD5Sums did not match. Wanted: '%s' and Got: 
'%s'" % (md5,md5data))
-- 
1.5.6.3

Non-mangled version at 
http://dominion.thruhere.net/koen/OE/0001-base.bbclass-only-error-out-on-missing-checksums-wh.patch

regards,

Koen




  reply	other threads:[~2009-01-21 19:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21 18:55 checksums Koen Kooi
2009-01-21 19:15 ` checksums Philip Balister
2009-01-21 19:34   ` Koen Kooi [this message]
2009-01-21 22:41     ` [RFC] Add option for strict checksumming, was: checksums Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='gl7tcr$55v$1@ger.gmane.org' \
    --to=k.kooi@student.utwente.nl \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=openembedded-devel@openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox