diff options
| author | Peter Marko <peter.marko@siemens.com> | 2025-08-24 16:57:39 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-08-28 10:47:08 +0100 |
| commit | 892b934e5548706abd76bec31bc037b7b929322e (patch) | |
| tree | 49f3ed10e3878c40ff468316c23cf562f30c3afd | |
| parent | 21cedd60863e41b7fbd808863136d1e933395fc4 (diff) | |
| download | poky-892b934e5548706abd76bec31bc037b7b929322e.tar.gz | |
cve-update-db-native: Use a local copy of the database during builds
OE-Core rev: 03596904392d257572a905a182b92c780d636744
This seems to be misimplemented when re-adding update from nvd1 feed.
Use file in temporary directory instead of downloads directory for
update process.
(From OE-Core rev: e5b0a74810fdd3f72fe61e0ae1f859a444dc1fa5)
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/meta/cve-update-db-native.bb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/recipes-core/meta/cve-update-db-native.bb b/meta/recipes-core/meta/cve-update-db-native.bb index dff5cd1c61..70bef2179f 100644 --- a/meta/recipes-core/meta/cve-update-db-native.bb +++ b/meta/recipes-core/meta/cve-update-db-native.bb | |||
| @@ -24,8 +24,7 @@ CVE_SOCKET_TIMEOUT ?= "60" | |||
| 24 | 24 | ||
| 25 | CVE_CHECK_DB_DLDIR_FILE ?= "${DL_DIR}/CVE_CHECK2/${CVE_CHECK_DB_FILENAME}" | 25 | CVE_CHECK_DB_DLDIR_FILE ?= "${DL_DIR}/CVE_CHECK2/${CVE_CHECK_DB_FILENAME}" |
| 26 | CVE_CHECK_DB_DLDIR_LOCK ?= "${CVE_CHECK_DB_DLDIR_FILE}.lock" | 26 | CVE_CHECK_DB_DLDIR_LOCK ?= "${CVE_CHECK_DB_DLDIR_FILE}.lock" |
| 27 | 27 | CVE_CHECK_DB_TEMP_FILE ?= "${CVE_CHECK_DB_FILE}.tmp" | |
| 28 | CVE_DB_TEMP_FILE ?= "${CVE_CHECK_DB_DLDIR_FILE}.tmp" | ||
| 29 | 28 | ||
| 30 | python () { | 29 | python () { |
| 31 | if not bb.data.inherits_class("cve-check", d): | 30 | if not bb.data.inherits_class("cve-check", d): |
| @@ -44,7 +43,7 @@ python do_fetch() { | |||
| 44 | 43 | ||
| 45 | db_file = d.getVar("CVE_CHECK_DB_DLDIR_FILE") | 44 | db_file = d.getVar("CVE_CHECK_DB_DLDIR_FILE") |
| 46 | db_dir = os.path.dirname(db_file) | 45 | db_dir = os.path.dirname(db_file) |
| 47 | db_tmp_file = d.getVar("CVE_DB_TEMP_FILE") | 46 | db_tmp_file = d.getVar("CVE_CHECK_DB_TEMP_FILE") |
| 48 | 47 | ||
| 49 | cleanup_db_download(db_file, db_tmp_file) | 48 | cleanup_db_download(db_file, db_tmp_file) |
| 50 | 49 | ||
| @@ -64,6 +63,7 @@ python do_fetch() { | |||
| 64 | pass | 63 | pass |
| 65 | 64 | ||
| 66 | bb.utils.mkdirhier(db_dir) | 65 | bb.utils.mkdirhier(db_dir) |
| 66 | bb.utils.mkdirhier(os.path.dirname(db_tmp_file)) | ||
| 67 | if os.path.exists(db_file): | 67 | if os.path.exists(db_file): |
| 68 | shutil.copy2(db_file, db_tmp_file) | 68 | shutil.copy2(db_file, db_tmp_file) |
| 69 | 69 | ||
