Skip to contentSkip to conversation

checksums...

RFC In review Koen Kooi 3 participants 4 messages Jan 21, 2009

lore
Share & tools
lore

Koen Kooi

author
#0 lore raw

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

regards,

Koen

#1 lore raw
Quoted 10 lines · Koen Kooi

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.

I also need to look up what "git commit --amend" does.

Philip

author
#2 lore raw

RFC 1/1 Add option for strict checksumming, was: Re: checksums...

Quoted 16 lines · Philip Balister
Quoted 7 lines · Koen Kooi

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:

Quoted 7 lines

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

Quoted 3 lines

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 <[email protected]>
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(-)
classes/base.bbclass +0 -0
index fca0edd..411adc9 100644
@@ -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))

Signature · 7 lines
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
#3 lore raw

Re: [RFC] Add option for strict checksumming, was: Re: checksums...

Quoted 21 lines · Koen Kooi
Quoted 16 lines · Philip Balister
Quoted 7 lines · Koen Kooi

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:

Quoted 7 lines

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

Quoted 3 lines

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.

Quoted 8 lines

What about this:

From a48ee59ac6ea569a5f88066d86de4b66d8f606c3 Mon Sep 17 00:00:00 2001
From: Koen Kooi <[email protected]>
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

This will bring us back to where we started. I think we just need to live with the pain a bit more and get people used to "Oops, no checksum in your patch" ...

And btw, git commit --amend will let you change things in the last commit you made. ONLY do this if you haven't also done a push.

Signature · 1 line
Tom Rini