diff options
author | Ross Burton <ross.burton@arm.com> | 2022-11-04 16:28:25 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-11-07 14:32:42 +0000 |
commit | 2a9bfc7dc8c4159cab7af84f901aadb7b673c996 (patch) | |
tree | 1f6cc7e21e894efcf505c990359cb97b3089c02b | |
parent | 7fa4796eb8b5726af0176b8c47cd15804e584c2c (diff) | |
download | poky-2a9bfc7dc8c4159cab7af84f901aadb7b673c996.tar.gz |
insane: add codeload.github.com to src-uri-bad check
GitHub redirects /archive/ URLs to codeload.github.com, a dedicated
service for caching git archives:
$ wget -v https://github.com/unicode-org/icu/archive/refs/tags/release-72-1.zip
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/unicode-org/icu/zip/refs/tags/release-72-1 [following]
This is not the case for uploaded artifacts:
$ wget -v https://github.com/unicode-org/icu/releases/download/release-72-1/icu4c-72_1-data-bin-l.zip.asc
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/49244766/... [following]
Check for codeload.github.com URLs in the src-uri-bad check in case
the SRC_URI contains this final URL, and not the public URI.
(From OE-Core rev: a3b4575259fa304c596ed227ed60769b5f72f0a8)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes-global/insane.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index dc46857a19..df2c40c3c5 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass | |||
@@ -1346,7 +1346,7 @@ def unpack_check_src_uri(pn, d): | |||
1346 | 1346 | ||
1347 | for url in d.getVar("SRC_URI").split(): | 1347 | for url in d.getVar("SRC_URI").split(): |
1348 | # Search for github and gitlab URLs that pull unstable archives (comment for future greppers) | 1348 | # Search for github and gitlab URLs that pull unstable archives (comment for future greppers) |
1349 | if re.search(r"git(hu|la)b\.com/.+/.+/archive/.+", url): | 1349 | if re.search(r"git(hu|la)b\.com/.+/.+/archive/.+", url) or "//codeload.github.com/" in url: |
1350 | oe.qa.handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub/GitLab archives, convert recipe to use git protocol" % pn, d) | 1350 | oe.qa.handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub/GitLab archives, convert recipe to use git protocol" % pn, d) |
1351 | 1351 | ||
1352 | python do_qa_unpack() { | 1352 | python do_qa_unpack() { |