Allow to overrule the URL in a bbappend.
PATCH 1/1 Allow to overrule the URL in a bbappend.
With this small patch, it's possible to overrule the public URL with a local mirror for those without Internet access.
Signed-off-by Jan Vermaete <[email protected]>
--- meta/recipes-core/meta/cve-update-db-native.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-core/meta/cve-update-db-native.bb +3 -2
@@ -12,6 +12,8 @@ deltask do_compile deltask do_install deltask do_populate_sysroot +NVDCVE_URL ?= "https://nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-" + python () { if not bb.data.inherits_class("cve-check", d): raise bb.parse.SkipRecipe("Skip recipe when cve-check class is not loaded.")
@@ -28,7 +30,6 @@ python do_fetch() { bb.utils.export_proxies(d) - BASE_URL = "https://nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-" YEAR_START = 2002 db_file = d.getVar("CVE_CHECK_DB_FILE")
@@ -64,7 +65,7 @@ python do_fetch() { for i, year in enumerate(range(YEAR_START, date.today().year + 1)): bb.debug(2, "Updating %d" % year) ph.update((float(i + 1) / total_years) * 100) - year_url = BASE_URL + str(year) + year_url = (d.getVar('NVDCVE_URL')) + str(year) meta_url = year_url + ".meta" json_url = year_url + ".json.gz"
Signature · 1 line
2.25.1
Quoted 7 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of jan
Sent: den 28 mars 2021 19:01
To: [email protected]
Cc: Jan Vermaete <[email protected]>
Subject: [OE-core] [PATCH] Allow to overrule the URL in a bbappend.
Please make sure to prefix the commit subject with the recipe name.
//Peter
Quoted 44 lines
With this small patch, it's possible to overrule the public URL with a local mirror for those without Internet access.
Signed-off-by Jan Vermaete <[email protected]>--- meta/recipes-core/meta/cve-update-db-native.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)meta/recipes-core/meta/cve-update-db-native.bb +2
-0@@ -12,6 +12,8 @@ deltask do_compile deltask do_install deltask do_populate_sysroot +NVDCVE_URL ?= "https://nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-" + python () { if not bb.data.inherits_class("cve-check", d): raise bb.parse.SkipRecipe("Skip recipe when cve-check class isnot loaded.")
meta/recipes-core/meta/cve-update-db-native.bb +0
-1@@ -28,7 +30,6 @@ python do_fetch() { bb.utils.export_proxies(d) - BASE_URL = "https://nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-" YEAR_START = 2002 db_file = d.getVar("CVE_CHECK_DB_FILE")@@ -64,7 +65,7 @@ python do_fetch() { for i, year in enumerate(range(YEAR_START, date.today().year +1)):
bb.debug(2, "Updating %d" % year) ph.update((float(i + 1) / total_years) * 100)meta/recipes-core/meta/cve-update-db-native.bb +1
-2- year_url = BASE_URL + str(year) + year_url = (d.getVar('NVDCVE_URL')) + str(year) meta_url = year_url + ".meta" json_url = year_url + ".json.gz" --2.25.1