diff options
author | Ross Burton <ross.burton@intel.com> | 2018-08-13 18:20:54 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-29 15:23:50 +0100 |
commit | 7b10c902cbd32a0a1b8fbe7747cee89b78584fb3 (patch) | |
tree | 8dc3e72f3b43687c223c0afa03c41945ee8513eb /meta/classes/license.bbclass | |
parent | fb3f8f14bd80f29d22afd846df550e96027c6f58 (diff) | |
download | poky-7b10c902cbd32a0a1b8fbe7747cee89b78584fb3.tar.gz |
classes: sanity-check LIC_FILES_CHKSUM
We assume that LIC_FILES_CHKSUM is a file: URI but don't actually verify this,
which can lead to problems if you have a URI that resolves to a path of / as
Bitbake will then dutifully checksum / recursively.
[ YOCTO #12883 ]
(From OE-Core rev: e2b8a3d5a10868f9c0dec8d7b9f5f89fdd100fc8)
(From OE-Core rev: a5db618986746bf9082c4b3cbdac4e523328432e)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r-- | meta/classes/license.bbclass | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index 06dd4a8c11..5103ed8533 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass | |||
@@ -480,7 +480,9 @@ def find_license_files(d): | |||
480 | 480 | ||
481 | for url in lic_files.split(): | 481 | for url in lic_files.split(): |
482 | try: | 482 | try: |
483 | (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url) | 483 | (method, host, path, user, pswd, parm) = bb.fetch.decodeurl(url) |
484 | if method != "file" or not path: | ||
485 | raise bb.fetch.MalformedUrl() | ||
484 | except bb.fetch.MalformedUrl: | 486 | except bb.fetch.MalformedUrl: |
485 | bb.fatal("%s: LIC_FILES_CHKSUM contains an invalid URL: %s" % (d.getVar('PF'), url)) | 487 | bb.fatal("%s: LIC_FILES_CHKSUM contains an invalid URL: %s" % (d.getVar('PF'), url)) |
486 | # We want the license filename and path | 488 | # We want the license filename and path |