From patchwork Fri Nov 22 11:39:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anuj Mittal X-Patchwork-Id: 180056 Delivered-To: patch@linaro.org Received: by 2002:ac9:2f4d:0:0:0:0:0 with SMTP id c13csp93073ocg; Fri, 22 Nov 2019 03:40:56 -0800 (PST) X-Google-Smtp-Source: APXvYqy7Kzg/oTOswGnHuM1a8A6h+prxMBX9rZ31mH/bl+jL+Q1Khvg4H8P8cfNJeBB2N5yRGCra X-Received: by 2002:a17:902:8f94:: with SMTP id z20mr13861924plo.21.1574422855984; Fri, 22 Nov 2019 03:40:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574422855; cv=none; d=google.com; s=arc-20160816; b=XvXKo06f55dVo8aFpSR8JxUm0B5/HQZejBO2Oi6AbtATWkd0/DetUXxWr+JXtL5giI xCUJbFC5bv3fXrDJu7hSUXUQ8HbXOdAUYN7sSKJGXDBL5GZHKrL87IDBy1wQcAqVwLYI UjmT3ET983bUWBRofHfwUbFzcXz9afAxudrlRPeBc0gon9vIr3LsHGPXEIq/Qsdjr8PU aru7E+TOp15NduqeJAiHExi4LOomjflDQaSxEdMlf95iRhsHhtnz6EGdf3LS5xzec2F8 UbrEQ1tx03V7x5A87YdXcJmOQ6UKCcc7+rNEUDmo1rS0AguhKmtokZ33L7i2rchNokkY SJmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=caRZMs7JPwliZADoPE1G39TZ10X7iTw1BxEGjvoLC7I=; b=Z81or1cVVAGGdpc4+nH734+uVEQ02gfRNlgvje+DJeXMb22rDQpuoHX+Y0+yUZbrjL g0sVmDuv81R6991aOoTCZOgd2rtiz4dBaqZlnBXl+rJjQu5QrYDgttEcqclm1d94pzFj 6Cwnewkv/EHe+QlDZWRVelTZjGAmvTz57sJNApBzreLC2B/NnwiyPBZl3NlsFeZJA1Lf 7OEWMnwzxwsxwJgL0j2EzrVXY+ulofLY6Lz7IJNVo0BkaMGSCtjru/xoO4YHV3vKnqu/ q3DSUs6DfrLWHqR0pm4JymZSado/6GYliuv+M644XYGrDjZpPHa+Q1oUp+aVnklYRnna psxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id i23si2959152pju.82.2019.11.22.03.40.55; Fri, 22 Nov 2019 03:40:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id C9BDE7FCEA; Fri, 22 Nov 2019 11:40:35 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mail.openembedded.org (Postfix) with ESMTP id 4E8C47FCC6 for ; Fri, 22 Nov 2019 11:40:16 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Nov 2019 03:40:17 -0800 X-IronPort-AV: E=Sophos;i="5.69,229,1571727600"; d="scan'208";a="201485328" Received: from anmitta2-mobl1.gar.corp.intel.com ([10.255.164.245]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Nov 2019 03:40:15 -0800 From: Anuj Mittal To: openembedded-core@lists.openembedded.org Date: Fri, 22 Nov 2019 19:39:04 +0800 Message-Id: <668f8d0302fa8870f9c38e20d8de2a9e5991bf5f.1574422359.git.anuj.mittal@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Subject: [OE-core] [zeus][PATCH 05/15] cve-update-db-native: don't hardcode the database name X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org From: Ross Burton Don't hardcode the database filename, there's a variable for this in cve-check.bbclass. (From OE-Core rev: 0d188a9dc4ae64c64cd661e9d9c3841e86f226ab) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Signed-off-by: Anuj Mittal --- meta/recipes-core/meta/cve-update-db-native.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.21.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-core/meta/cve-update-db-native.bb b/meta/recipes-core/meta/cve-update-db-native.bb index 19875a49b1..c15534de08 100644 --- a/meta/recipes-core/meta/cve-update-db-native.bb +++ b/meta/recipes-core/meta/cve-update-db-native.bb @@ -28,8 +28,8 @@ python do_populate_cve_db() { BASE_URL = "https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-" YEAR_START = 2002 - db_dir = os.path.join(d.getVar("DL_DIR"), 'CVE_CHECK') - db_file = os.path.join(db_dir, 'nvdcve_1.0.db') + db_file = d.getVar("CVE_CHECK_DB_FILE") + db_dir = os.path.dirname(db_file) json_tmpfile = os.path.join(db_dir, 'nvd.json.gz') # Don't refresh the database more than once an hour